use of org.hl7.fhir.r4b.model.Dosage in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeMedicationStatement.
protected void composeMedicationStatement(Complex parent, String parentType, String name, MedicationStatement element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeDomainResource(t, "MedicationStatement", name, element, index);
for (int i = 0; i < element.getIdentifier().size(); i++) composeIdentifier(t, "MedicationStatement", "identifier", element.getIdentifier().get(i), i);
for (int i = 0; i < element.getBasedOn().size(); i++) composeReference(t, "MedicationStatement", "basedOn", element.getBasedOn().get(i), i);
for (int i = 0; i < element.getPartOf().size(); i++) composeReference(t, "MedicationStatement", "partOf", element.getPartOf().get(i), i);
if (element.hasStatusElement())
composeEnum(t, "MedicationStatement", "status", element.getStatusElement(), -1);
for (int i = 0; i < element.getStatusReason().size(); i++) composeCodeableConcept(t, "MedicationStatement", "statusReason", element.getStatusReason().get(i), i);
if (element.hasCategory())
composeCodeableConcept(t, "MedicationStatement", "category", element.getCategory(), -1);
if (element.hasMedication())
composeType(t, "MedicationStatement", "medication", element.getMedication(), -1);
if (element.hasSubject())
composeReference(t, "MedicationStatement", "subject", element.getSubject(), -1);
if (element.hasContext())
composeReference(t, "MedicationStatement", "context", element.getContext(), -1);
if (element.hasEffective())
composeType(t, "MedicationStatement", "effective", element.getEffective(), -1);
if (element.hasDateAssertedElement())
composeDateTime(t, "MedicationStatement", "dateAsserted", element.getDateAssertedElement(), -1);
if (element.hasInformationSource())
composeReference(t, "MedicationStatement", "informationSource", element.getInformationSource(), -1);
for (int i = 0; i < element.getDerivedFrom().size(); i++) composeReference(t, "MedicationStatement", "derivedFrom", element.getDerivedFrom().get(i), i);
for (int i = 0; i < element.getReasonCode().size(); i++) composeCodeableConcept(t, "MedicationStatement", "reasonCode", element.getReasonCode().get(i), i);
for (int i = 0; i < element.getReasonReference().size(); i++) composeReference(t, "MedicationStatement", "reasonReference", element.getReasonReference().get(i), i);
for (int i = 0; i < element.getNote().size(); i++) composeAnnotation(t, "MedicationStatement", "note", element.getNote().get(i), i);
for (int i = 0; i < element.getDosage().size(); i++) composeDosage(t, "MedicationStatement", "dosage", element.getDosage().get(i), i);
}
use of org.hl7.fhir.r4b.model.Dosage in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeDosage.
protected void composeDosage(Complex parent, String parentType, String name, Dosage element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeElement(t, "Dosage", name, element, index);
if (element.hasSequenceElement())
composeInteger(t, "Dosage", "sequence", element.getSequenceElement(), -1);
if (element.hasTextElement())
composeString(t, "Dosage", "text", element.getTextElement(), -1);
for (int i = 0; i < element.getAdditionalInstruction().size(); i++) composeCodeableConcept(t, "Dosage", "additionalInstruction", element.getAdditionalInstruction().get(i), i);
if (element.hasPatientInstructionElement())
composeString(t, "Dosage", "patientInstruction", element.getPatientInstructionElement(), -1);
if (element.hasTiming())
composeTiming(t, "Dosage", "timing", element.getTiming(), -1);
if (element.hasAsNeeded())
composeType(t, "Dosage", "asNeeded", element.getAsNeeded(), -1);
if (element.hasSite())
composeCodeableConcept(t, "Dosage", "site", element.getSite(), -1);
if (element.hasRoute())
composeCodeableConcept(t, "Dosage", "route", element.getRoute(), -1);
if (element.hasMethod())
composeCodeableConcept(t, "Dosage", "method", element.getMethod(), -1);
for (int i = 0; i < element.getDoseAndRate().size(); i++) composeDosageDosageDoseAndRateComponent(t, "Dosage", "doseAndRate", element.getDoseAndRate().get(i), i);
if (element.hasMaxDosePerPeriod())
composeRatio(t, "Dosage", "maxDosePerPeriod", element.getMaxDosePerPeriod(), -1);
if (element.hasMaxDosePerAdministration())
composeQuantity(t, "Dosage", "maxDosePerAdministration", element.getMaxDosePerAdministration(), -1);
if (element.hasMaxDosePerLifetime())
composeQuantity(t, "Dosage", "maxDosePerLifetime", element.getMaxDosePerLifetime(), -1);
}
use of org.hl7.fhir.r4b.model.Dosage in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeMedicationAdministrationMedicationAdministrationDosageComponent.
protected void composeMedicationAdministrationMedicationAdministrationDosageComponent(Complex parent, String parentType, String name, MedicationAdministration.MedicationAdministrationDosageComponent element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeBackboneElement(t, "dosage", name, element, index);
if (element.hasTextElement())
composeString(t, "MedicationAdministration", "text", element.getTextElement(), -1);
if (element.hasSite())
composeCodeableConcept(t, "MedicationAdministration", "site", element.getSite(), -1);
if (element.hasRoute())
composeCodeableConcept(t, "MedicationAdministration", "route", element.getRoute(), -1);
if (element.hasMethod())
composeCodeableConcept(t, "MedicationAdministration", "method", element.getMethod(), -1);
if (element.hasDose())
composeQuantity(t, "MedicationAdministration", "dose", element.getDose(), -1);
if (element.hasRate())
composeType(t, "MedicationAdministration", "rate", element.getRate(), -1);
}
use of org.hl7.fhir.r4b.model.Dosage in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeMedicationStatementMedicationStatementDosageComponent.
protected void composeMedicationStatementMedicationStatementDosageComponent(Complex parent, String parentType, String name, MedicationStatement.MedicationStatementDosageComponent element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeBackboneElement(t, "dosage", name, element, index);
if (element.hasTextElement())
composeString(t, "MedicationStatement", "text", element.getTextElement(), -1);
if (element.hasTiming())
composeTiming(t, "MedicationStatement", "timing", element.getTiming(), -1);
if (element.hasAsNeeded())
composeType(t, "MedicationStatement", "asNeeded", element.getAsNeeded(), -1);
if (element.hasSite())
composeType(t, "MedicationStatement", "site", element.getSite(), -1);
if (element.hasRoute())
composeCodeableConcept(t, "MedicationStatement", "route", element.getRoute(), -1);
if (element.hasMethod())
composeCodeableConcept(t, "MedicationStatement", "method", element.getMethod(), -1);
if (element.hasQuantity())
composeType(t, "MedicationStatement", "quantity", element.getQuantity(), -1);
if (element.hasRate())
composeType(t, "MedicationStatement", "rate", element.getRate(), -1);
if (element.hasMaxDosePerPeriod())
composeRatio(t, "MedicationStatement", "maxDosePerPeriod", element.getMaxDosePerPeriod(), -1);
}
use of org.hl7.fhir.r4b.model.Dosage in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeMedicationStatement.
protected void composeMedicationStatement(Complex parent, String parentType, String name, MedicationStatement element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeDomainResource(t, "MedicationStatement", name, element, index);
for (int i = 0; i < element.getIdentifier().size(); i++) composeIdentifier(t, "MedicationStatement", "identifier", element.getIdentifier().get(i), i);
if (element.hasStatusElement())
composeEnum(t, "MedicationStatement", "status", element.getStatusElement(), -1);
if (element.hasMedication())
composeType(t, "MedicationStatement", "medication", element.getMedication(), -1);
if (element.hasPatient())
composeReference(t, "MedicationStatement", "patient", element.getPatient(), -1);
if (element.hasEffective())
composeType(t, "MedicationStatement", "effective", element.getEffective(), -1);
if (element.hasInformationSource())
composeReference(t, "MedicationStatement", "informationSource", element.getInformationSource(), -1);
for (int i = 0; i < element.getSupportingInformation().size(); i++) composeReference(t, "MedicationStatement", "supportingInformation", element.getSupportingInformation().get(i), i);
if (element.hasDateAssertedElement())
composeDateTime(t, "MedicationStatement", "dateAsserted", element.getDateAssertedElement(), -1);
if (element.hasWasNotTakenElement())
composeBoolean(t, "MedicationStatement", "wasNotTaken", element.getWasNotTakenElement(), -1);
for (int i = 0; i < element.getReasonNotTaken().size(); i++) composeCodeableConcept(t, "MedicationStatement", "reasonNotTaken", element.getReasonNotTaken().get(i), i);
if (element.hasReasonForUse())
composeType(t, "MedicationStatement", "reasonForUse", element.getReasonForUse(), -1);
for (int i = 0; i < element.getNote().size(); i++) composeAnnotation(t, "MedicationStatement", "note", element.getNote().get(i), i);
for (int i = 0; i < element.getDosage().size(); i++) composeMedicationStatementMedicationStatementDosageComponent(t, "MedicationStatement", "dosage", element.getDosage().get(i), i);
}
Aggregations