use of org.hl7.fhir.dstu3.model.Immunization in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeImmunizationImmunizationVaccinationProtocolComponent.
protected void composeImmunizationImmunizationVaccinationProtocolComponent(Complex parent, String parentType, String name, Immunization.ImmunizationVaccinationProtocolComponent element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeBackboneElement(t, "vaccinationProtocol", name, element, index);
if (element.hasDoseSequenceElement())
composePositiveInt(t, "Immunization", "doseSequence", element.getDoseSequenceElement(), -1);
if (element.hasDescriptionElement())
composeString(t, "Immunization", "description", element.getDescriptionElement(), -1);
if (element.hasAuthority())
composeReference(t, "Immunization", "authority", element.getAuthority(), -1);
if (element.hasSeriesElement())
composeString(t, "Immunization", "series", element.getSeriesElement(), -1);
if (element.hasSeriesDosesElement())
composePositiveInt(t, "Immunization", "seriesDoses", element.getSeriesDosesElement(), -1);
for (int i = 0; i < element.getTargetDisease().size(); i++) composeCodeableConcept(t, "Immunization", "targetDisease", element.getTargetDisease().get(i), i);
if (element.hasDoseStatus())
composeCodeableConcept(t, "Immunization", "doseStatus", element.getDoseStatus(), -1);
if (element.hasDoseStatusReason())
composeCodeableConcept(t, "Immunization", "doseStatusReason", element.getDoseStatusReason(), -1);
}
use of org.hl7.fhir.dstu3.model.Immunization in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeImmunizationImmunizationReactionComponent.
protected void composeImmunizationImmunizationReactionComponent(Complex parent, String parentType, String name, Immunization.ImmunizationReactionComponent element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeBackboneElement(t, "reaction", name, element, index);
if (element.hasDateElement())
composeDateTime(t, "Immunization", "date", element.getDateElement(), -1);
if (element.hasDetail())
composeReference(t, "Immunization", "detail", element.getDetail(), -1);
if (element.hasReportedElement())
composeBoolean(t, "Immunization", "reported", element.getReportedElement(), -1);
}
use of org.hl7.fhir.dstu3.model.Immunization in project org.hl7.fhir.core by hapifhir.
the class ProfileUtilitiesTests method execute.
public void execute(String[] args) throws FileNotFoundException, IOException, FHIRException {
System.out.println("loading context");
context = SimpleWorkerContext.fromPack(Utilities.path(root, "validation.zip"));
comp = new ProfileComparer(context);
compare("patient-daf-dafpatient.profile.xml", "patient-qicore-qicore-patient.profile.xml");
compare("encounter-daf-dafencounter.profile.xml", "encounter-qicore-qicore-encounter.profile.xml");
compare("substance-daf-dafsubstance.profile.xml", "substance-qicore-qicore-substance.profile.xml");
compare("medication-daf-dafmedication.profile.xml", "medication-qicore-qicore-medication.profile.xml");
compare("procedure-daf-dafprocedure.profile.xml", "procedure-qicore-qicore-procedure.profile.xml");
compare("familymemberhistory-daf-daffamilymemberhistory.profile.xml", "familymemberhistory-qicore-qicore-familymemberhistory.profile.xml");
compare("immunization-daf-dafimmunization.profile.xml", "immunization-qicore-qicore-immunization.profile.xml");
compare("condition-daf-dafcondition.profile.xml", "condition-qicore-qicore-condition.profile.xml");
compare("allergyintolerance-daf-dafallergyintolerance.profile.xml", "allergyintolerance-qicore-qicore-allergyintolerance.profile.xml");
compare("medicationadministration-daf-dafmedicationadministration.profile.xml", "medicationadministration-qicore-qicore-medicationadministration.profile.xml");
compare("medicationdispense-daf-dafmedicationdispense.profile.xml", "medicationdispense-qicore-qicore-medicationdispense.profile.xml");
compare("medicationprescription-daf-dafmedicationprescription.profile.xml", "medicationprescription-qicore-qicore-medicationprescription.profile.xml");
compare("medicationstatement-daf-dafmedicationstatement.profile.xml", "medicationstatement-qicore-qicore-medicationstatement.profile.xml");
compare("observation-daf-smokingstatus-dafsmokingstatus.profile.xml", "observation-qicore-qicore-observation.profile.xml");
compare("observation-daf-vitalsigns-dafvitalsigns.profile.xml", "observation-qicore-qicore-observation.profile.xml");
// compare("observation-daf-results-dafresultobs.profile.xml", "observation-qicore-qicore-observation.profile.xml");
// compare("diagnosticorder-daf-dafdiagnosticorder.profile.xml", "diagnosticorder-qicore-qicore-diagnosticorder.profile.xml");
// compare("diagnosticreport-daf-dafdiagnosticreport.profile.xml", "diagnosticreport-qicore-qicore-diagnosticreport.profile.xml");
System.out.println("processing output");
for (ProfileComparison outcome : comp.getComparisons()) {
if (outcome.getSubset() != null)
new XmlParser().setOutputStyle(OutputStyle.PRETTY).compose(new FileOutputStream(Utilities.path("[tmp]", "intersection-" + outcome.getId() + ".xml")), outcome.getSubset());
if (outcome.getSuperset() != null)
new XmlParser().setOutputStyle(OutputStyle.PRETTY).compose(new FileOutputStream(Utilities.path("[tmp]", "union-" + outcome.getId() + ".xml")), outcome.getSuperset());
System.out.println("\r\n" + outcome.getId() + ": Comparison of " + outcome.getLeft().getUrl() + " and " + outcome.getRight().getUrl());
for (ValidationMessage vm : outcome.getMessages()) if (vm.getLevel() == IssueSeverity.INFORMATION)
System.out.println(vm.summary());
for (ValidationMessage vm : outcome.getMessages()) if (vm.getLevel() == IssueSeverity.WARNING)
System.out.println(vm.summary());
for (ValidationMessage vm : outcome.getMessages()) if (vm.getLevel() == IssueSeverity.ERROR)
System.out.println(vm.summary());
for (ValidationMessage vm : outcome.getMessages()) if (vm.getLevel() == IssueSeverity.FATAL)
System.out.println(vm.summary());
System.out.println("done. " + Integer.toString(outcome.getMessages().size()) + " messages");
System.out.println("=================================================================");
}
}
use of org.hl7.fhir.dstu3.model.Immunization in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeImmunization.
protected void composeImmunization(Complex parent, String parentType, String name, Immunization element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeDomainResource(t, "Immunization", name, element, index);
for (int i = 0; i < element.getIdentifier().size(); i++) composeIdentifier(t, "Immunization", "identifier", element.getIdentifier().get(i), i);
if (element.hasStatusElement())
composeEnum(t, "Immunization", "status", element.getStatusElement(), -1);
if (element.hasStatusReason())
composeCodeableConcept(t, "Immunization", "statusReason", element.getStatusReason(), -1);
if (element.hasVaccineCode())
composeCodeableConcept(t, "Immunization", "vaccineCode", element.getVaccineCode(), -1);
if (element.hasPatient())
composeReference(t, "Immunization", "patient", element.getPatient(), -1);
if (element.hasEncounter())
composeReference(t, "Immunization", "encounter", element.getEncounter(), -1);
if (element.hasOccurrence())
composeType(t, "Immunization", "occurrence", element.getOccurrence(), -1);
if (element.hasRecordedElement())
composeDateTime(t, "Immunization", "recorded", element.getRecordedElement(), -1);
if (element.hasPrimarySourceElement())
composeBoolean(t, "Immunization", "primarySource", element.getPrimarySourceElement(), -1);
if (element.hasReportOrigin())
composeCodeableConcept(t, "Immunization", "reportOrigin", element.getReportOrigin(), -1);
if (element.hasLocation())
composeReference(t, "Immunization", "location", element.getLocation(), -1);
if (element.hasManufacturer())
composeReference(t, "Immunization", "manufacturer", element.getManufacturer(), -1);
if (element.hasLotNumberElement())
composeString(t, "Immunization", "lotNumber", element.getLotNumberElement(), -1);
if (element.hasExpirationDateElement())
composeDate(t, "Immunization", "expirationDate", element.getExpirationDateElement(), -1);
if (element.hasSite())
composeCodeableConcept(t, "Immunization", "site", element.getSite(), -1);
if (element.hasRoute())
composeCodeableConcept(t, "Immunization", "route", element.getRoute(), -1);
if (element.hasDoseQuantity())
composeQuantity(t, "Immunization", "doseQuantity", element.getDoseQuantity(), -1);
for (int i = 0; i < element.getPerformer().size(); i++) composeImmunizationImmunizationPerformerComponent(t, "Immunization", "performer", element.getPerformer().get(i), i);
for (int i = 0; i < element.getNote().size(); i++) composeAnnotation(t, "Immunization", "note", element.getNote().get(i), i);
for (int i = 0; i < element.getReasonCode().size(); i++) composeCodeableConcept(t, "Immunization", "reasonCode", element.getReasonCode().get(i), i);
for (int i = 0; i < element.getReasonReference().size(); i++) composeReference(t, "Immunization", "reasonReference", element.getReasonReference().get(i), i);
if (element.hasIsSubpotentElement())
composeBoolean(t, "Immunization", "isSubpotent", element.getIsSubpotentElement(), -1);
for (int i = 0; i < element.getSubpotentReason().size(); i++) composeCodeableConcept(t, "Immunization", "subpotentReason", element.getSubpotentReason().get(i), i);
for (int i = 0; i < element.getEducation().size(); i++) composeImmunizationImmunizationEducationComponent(t, "Immunization", "education", element.getEducation().get(i), i);
for (int i = 0; i < element.getProgramEligibility().size(); i++) composeCodeableConcept(t, "Immunization", "programEligibility", element.getProgramEligibility().get(i), i);
if (element.hasFundingSource())
composeCodeableConcept(t, "Immunization", "fundingSource", element.getFundingSource(), -1);
for (int i = 0; i < element.getReaction().size(); i++) composeImmunizationImmunizationReactionComponent(t, "Immunization", "reaction", element.getReaction().get(i), i);
for (int i = 0; i < element.getProtocolApplied().size(); i++) composeImmunizationImmunizationProtocolAppliedComponent(t, "Immunization", "protocolApplied", element.getProtocolApplied().get(i), i);
}
use of org.hl7.fhir.dstu3.model.Immunization in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeImmunizationImmunizationReactionComponent.
protected void composeImmunizationImmunizationReactionComponent(Complex parent, String parentType, String name, Immunization.ImmunizationReactionComponent element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeBackboneElement(t, "reaction", name, element, index);
if (element.hasDateElement())
composeDateTime(t, "Immunization", "date", element.getDateElement(), -1);
if (element.hasDetail())
composeReference(t, "Immunization", "detail", element.getDetail(), -1);
if (element.hasReportedElement())
composeBoolean(t, "Immunization", "reported", element.getReportedElement(), -1);
}
Aggregations