org.milyn.edi.unedifact.d05a.MEDRPT.SegmentGroup15 Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d05a.MEDRPT;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d05a.common.ClinicalIntervention;
import org.milyn.edi.unedifact.d05a.common.ItemDescription;
import org.milyn.edi.unedifact.d05a.common.DosageAdministration;
import java.util.List;
import org.milyn.edi.unedifact.d05a.common.DateTimePeriod;
import org.milyn.edi.unedifact.d05a.common.FreeText;
import org.milyn.edi.unedifact.d05a.common.Quantity;
import org.milyn.edi.unedifact.d05a.common.PartiesAndInstruction;
import java.io.Writer;
import org.milyn.edisax.model.internal.Delimiters;
import java.io.IOException;
public class SegmentGroup15 implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private ClinicalIntervention clinicalIntervention;
private ItemDescription itemDescription;
private DosageAdministration dosageAdministration;
private List dateTimePeriod;
private List freeText;
private Quantity quantity;
private List partiesAndInstruction;
public void write(Writer writer, Delimiters delimiters) throws IOException {
Writer nodeWriter = writer;
if(clinicalIntervention != null) {
nodeWriter.write("CLI");
nodeWriter.write(delimiters.getField());
clinicalIntervention.write(nodeWriter, delimiters);
}
if(itemDescription != null) {
nodeWriter.write("IMD");
nodeWriter.write(delimiters.getField());
itemDescription.write(nodeWriter, delimiters);
}
if(dosageAdministration != null) {
nodeWriter.write("DSG");
nodeWriter.write(delimiters.getField());
dosageAdministration.write(nodeWriter, delimiters);
}
if(dateTimePeriod != null && !dateTimePeriod.isEmpty()) {
for(DateTimePeriod dateTimePeriodInst : dateTimePeriod) {
nodeWriter.write("DTM");
nodeWriter.write(delimiters.getField());
dateTimePeriodInst.write(nodeWriter, delimiters);
}
}
if(freeText != null && !freeText.isEmpty()) {
for(FreeText freeTextInst : freeText) {
nodeWriter.write("FTX");
nodeWriter.write(delimiters.getField());
freeTextInst.write(nodeWriter, delimiters);
}
}
if(quantity != null) {
nodeWriter.write("QTY");
nodeWriter.write(delimiters.getField());
quantity.write(nodeWriter, delimiters);
}
if(partiesAndInstruction != null && !partiesAndInstruction.isEmpty()) {
for(PartiesAndInstruction partiesAndInstructionInst : partiesAndInstruction) {
nodeWriter.write("INP");
nodeWriter.write(delimiters.getField());
partiesAndInstructionInst.write(nodeWriter, delimiters);
}
}
}
public ClinicalIntervention getClinicalIntervention() {
return clinicalIntervention;
}
public SegmentGroup15 setClinicalIntervention(ClinicalIntervention clinicalIntervention) {
this.clinicalIntervention = clinicalIntervention; return this;
}
public ItemDescription getItemDescription() {
return itemDescription;
}
public SegmentGroup15 setItemDescription(ItemDescription itemDescription) {
this.itemDescription = itemDescription; return this;
}
public DosageAdministration getDosageAdministration() {
return dosageAdministration;
}
public SegmentGroup15 setDosageAdministration(DosageAdministration dosageAdministration) {
this.dosageAdministration = dosageAdministration; return this;
}
public List getDateTimePeriod() {
return dateTimePeriod;
}
public SegmentGroup15 setDateTimePeriod(List dateTimePeriod) {
this.dateTimePeriod = dateTimePeriod; return this;
}
public List getFreeText() {
return freeText;
}
public SegmentGroup15 setFreeText(List freeText) {
this.freeText = freeText; return this;
}
public Quantity getQuantity() {
return quantity;
}
public SegmentGroup15 setQuantity(Quantity quantity) {
this.quantity = quantity; return this;
}
public List getPartiesAndInstruction() {
return partiesAndInstruction;
}
public SegmentGroup15 setPartiesAndInstruction(List partiesAndInstruction) {
this.partiesAndInstruction = partiesAndInstruction; return this;
}
}