org.milyn.edi.unedifact.d05a.MEDPRE.SegmentGroup8 Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d05a.MEDPRE;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d05a.common.ItemDescription;
import org.milyn.edi.unedifact.d05a.common.Status;
import java.util.List;
import org.milyn.edi.unedifact.d05a.common.DosageAdministration;
import org.milyn.edi.unedifact.d05a.common.PartiesAndInstruction;
import org.milyn.edi.unedifact.d05a.common.FreeText;
import org.milyn.edi.unedifact.d05a.common.SchedulingConditions;
import org.milyn.edi.unedifact.d05a.common.Quantity;
import java.io.Writer;
import org.milyn.edisax.model.internal.Delimiters;
import java.io.IOException;
public class SegmentGroup8 implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private ItemDescription itemDescription;
private Status status;
private List dosageAdministration;
private List partiesAndInstruction;
private List freeText;
private List schedulingConditions;
private List quantity;
public void write(Writer writer, Delimiters delimiters) throws IOException {
Writer nodeWriter = writer;
if(itemDescription != null) {
nodeWriter.write("IMD");
nodeWriter.write(delimiters.getField());
itemDescription.write(nodeWriter, delimiters);
}
if(status != null) {
nodeWriter.write("STS");
nodeWriter.write(delimiters.getField());
status.write(nodeWriter, delimiters);
}
if(dosageAdministration != null && !dosageAdministration.isEmpty()) {
for(DosageAdministration dosageAdministrationInst : dosageAdministration) {
nodeWriter.write("DSG");
nodeWriter.write(delimiters.getField());
dosageAdministrationInst.write(nodeWriter, delimiters);
}
}
if(partiesAndInstruction != null && !partiesAndInstruction.isEmpty()) {
for(PartiesAndInstruction partiesAndInstructionInst : partiesAndInstruction) {
nodeWriter.write("INP");
nodeWriter.write(delimiters.getField());
partiesAndInstructionInst.write(nodeWriter, delimiters);
}
}
if(freeText != null && !freeText.isEmpty()) {
for(FreeText freeTextInst : freeText) {
nodeWriter.write("FTX");
nodeWriter.write(delimiters.getField());
freeTextInst.write(nodeWriter, delimiters);
}
}
if(schedulingConditions != null && !schedulingConditions.isEmpty()) {
for(SchedulingConditions schedulingConditionsInst : schedulingConditions) {
nodeWriter.write("SCC");
nodeWriter.write(delimiters.getField());
schedulingConditionsInst.write(nodeWriter, delimiters);
}
}
if(quantity != null && !quantity.isEmpty()) {
for(Quantity quantityInst : quantity) {
nodeWriter.write("QTY");
nodeWriter.write(delimiters.getField());
quantityInst.write(nodeWriter, delimiters);
}
}
}
public ItemDescription getItemDescription() {
return itemDescription;
}
public SegmentGroup8 setItemDescription(ItemDescription itemDescription) {
this.itemDescription = itemDescription; return this;
}
public Status getStatus() {
return status;
}
public SegmentGroup8 setStatus(Status status) {
this.status = status; return this;
}
public List getDosageAdministration() {
return dosageAdministration;
}
public SegmentGroup8 setDosageAdministration(List dosageAdministration) {
this.dosageAdministration = dosageAdministration; return this;
}
public List getPartiesAndInstruction() {
return partiesAndInstruction;
}
public SegmentGroup8 setPartiesAndInstruction(List partiesAndInstruction) {
this.partiesAndInstruction = partiesAndInstruction; return this;
}
public List getFreeText() {
return freeText;
}
public SegmentGroup8 setFreeText(List freeText) {
this.freeText = freeText; return this;
}
public List getSchedulingConditions() {
return schedulingConditions;
}
public SegmentGroup8 setSchedulingConditions(List schedulingConditions) {
this.schedulingConditions = schedulingConditions; return this;
}
public List getQuantity() {
return quantity;
}
public SegmentGroup8 setQuantity(List quantity) {
this.quantity = quantity; return this;
}
}