use of org.hl7.fhir.r4.model.Immunization in project openmrs-module-fhir2 by openmrs.
the class ImmunizationFhirResourceProviderIntegrationTest method shouldReturnNotFoundWhenDeletingNonExistentImmunizationAsXML.
@Test
public void shouldReturnNotFoundWhenDeletingNonExistentImmunizationAsXML() throws Exception {
MockHttpServletResponse response = delete("/Immunization/" + UNKNOWN_IMMUNIZATION_UUID).accept(FhirMediaTypes.XML).go();
assertThat(response, isNotFound());
assertThat(response.getContentType(), is(FhirMediaTypes.XML.toString()));
assertThat(response.getContentAsString(), notNullValue());
OperationOutcome operationOutcome = readOperationOutcome(response);
assertThat(operationOutcome, notNullValue());
assertThat(operationOutcome.hasIssue(), is(true));
}
use of org.hl7.fhir.r4.model.Immunization in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeImmunizationImmunizationPractitionerComponent.
protected void composeImmunizationImmunizationPractitionerComponent(Complex parent, String parentType, String name, Immunization.ImmunizationPractitionerComponent element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeBackboneElement(t, "practitioner", name, element, index);
if (element.hasRole())
composeCodeableConcept(t, "Immunization", "role", element.getRole(), -1);
if (element.hasActor())
composeReference(t, "Immunization", "actor", element.getActor(), -1);
}
use of org.hl7.fhir.r4.model.Immunization in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeImmunizationImmunizationExplanationComponent.
protected void composeImmunizationImmunizationExplanationComponent(Complex parent, String parentType, String name, Immunization.ImmunizationExplanationComponent element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeBackboneElement(t, "explanation", name, element, index);
for (int i = 0; i < element.getReason().size(); i++) composeCodeableConcept(t, "Immunization", "reason", element.getReason().get(i), i);
for (int i = 0; i < element.getReasonNotGiven().size(); i++) composeCodeableConcept(t, "Immunization", "reasonNotGiven", element.getReasonNotGiven().get(i), i);
}
use of org.hl7.fhir.r4.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.r4.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);
}
Aggregations