use of org.hl7.fhir.r4.model.CarePlan in project integration-adaptor-111 by nhsconnect.
the class CompositionMapperTest method setUp.
@BeforeEach
public void setUp() {
effectiveTime.setValue(EFFECTIVE_DATE);
questionnaireResponseList = new ArrayList<>();
questionnaireResponseList.add(questionnaireResponse);
POCDMT000002UK01RelatedDocument1[] relatedDocsArray = { mock(POCDMT000002UK01RelatedDocument1.class) };
when(clinicalDocument.getRelatedDocumentArray()).thenReturn(relatedDocsArray);
when(clinicalDocument.getRelatedDocumentArray(0)).thenReturn(relatedDocument1);
when(relatedDocument1.getParentDocument()).thenReturn(parentDocument1);
when(parentDocument1.getIdArray(0)).thenReturn(ii);
when(clinicalDocument.getSetId()).thenReturn(ii);
when(clinicalDocument.getEffectiveTime()).thenReturn(effectiveTime);
when(ii.getRoot()).thenReturn("411910CF-1A76-4330-98FE-C345DDEE5553");
when(clinicalDocument.getConfidentialityCode()).thenReturn(ce);
when(ce.getCode()).thenReturn("V");
when(ce.isSetCode()).thenReturn(true);
when(ii.isSetRoot()).thenReturn(true);
when(referralRequest.fhirType()).thenReturn("ReferralRequest");
when(resourceUtil.newRandomUuid()).thenReturn(new IdType(RANDOM_UUID));
when(resourceUtil.createReference(encounter)).thenReturn(new Reference(encounter));
when(resourceUtil.createReference(questionnaireResponse)).thenReturn(new Reference(questionnaireResponse));
when(resourceUtil.createReference(carePlan)).thenReturn(new Reference(carePlan));
when(resourceUtil.createReference(referralRequest)).thenReturn(new Reference(referralRequest));
mockStructuredBody();
}
use of org.hl7.fhir.r4.model.CarePlan in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeCarePlanCarePlanParticipantComponent.
protected void composeCarePlanCarePlanParticipantComponent(Complex parent, String parentType, String name, CarePlan.CarePlanParticipantComponent element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeBackboneElement(t, "participant", name, element, index);
if (element.hasRole())
composeCodeableConcept(t, "CarePlan", "role", element.getRole(), -1);
if (element.hasMember())
composeReference(t, "CarePlan", "member", element.getMember(), -1);
}
use of org.hl7.fhir.r4.model.CarePlan in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeCarePlanCarePlanActivityComponent.
protected void composeCarePlanCarePlanActivityComponent(Complex parent, String parentType, String name, CarePlan.CarePlanActivityComponent element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeBackboneElement(t, "activity", name, element, index);
for (int i = 0; i < element.getActionResulting().size(); i++) composeReference(t, "CarePlan", "actionResulting", element.getActionResulting().get(i), i);
for (int i = 0; i < element.getProgress().size(); i++) composeAnnotation(t, "CarePlan", "progress", element.getProgress().get(i), i);
if (element.hasReference())
composeReference(t, "CarePlan", "reference", element.getReference(), -1);
if (element.hasDetail())
composeCarePlanCarePlanActivityDetailComponent(t, "CarePlan", "detail", element.getDetail(), -1);
}
use of org.hl7.fhir.r4.model.CarePlan in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeCarePlan.
protected void composeCarePlan(Complex parent, String parentType, String name, CarePlan element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeDomainResource(t, "CarePlan", name, element, index);
for (int i = 0; i < element.getIdentifier().size(); i++) composeIdentifier(t, "CarePlan", "identifier", element.getIdentifier().get(i), i);
for (int i = 0; i < element.getInstantiatesCanonical().size(); i++) composeCanonical(t, "CarePlan", "instantiatesCanonical", element.getInstantiatesCanonical().get(i), i);
for (int i = 0; i < element.getInstantiatesUri().size(); i++) composeUri(t, "CarePlan", "instantiatesUri", element.getInstantiatesUri().get(i), i);
for (int i = 0; i < element.getBasedOn().size(); i++) composeReference(t, "CarePlan", "basedOn", element.getBasedOn().get(i), i);
for (int i = 0; i < element.getReplaces().size(); i++) composeReference(t, "CarePlan", "replaces", element.getReplaces().get(i), i);
for (int i = 0; i < element.getPartOf().size(); i++) composeReference(t, "CarePlan", "partOf", element.getPartOf().get(i), i);
if (element.hasStatusElement())
composeEnum(t, "CarePlan", "status", element.getStatusElement(), -1);
if (element.hasIntentElement())
composeEnum(t, "CarePlan", "intent", element.getIntentElement(), -1);
for (int i = 0; i < element.getCategory().size(); i++) composeCodeableConcept(t, "CarePlan", "category", element.getCategory().get(i), i);
if (element.hasTitleElement())
composeString(t, "CarePlan", "title", element.getTitleElement(), -1);
if (element.hasDescriptionElement())
composeString(t, "CarePlan", "description", element.getDescriptionElement(), -1);
if (element.hasSubject())
composeReference(t, "CarePlan", "subject", element.getSubject(), -1);
if (element.hasEncounter())
composeReference(t, "CarePlan", "encounter", element.getEncounter(), -1);
if (element.hasPeriod())
composePeriod(t, "CarePlan", "period", element.getPeriod(), -1);
if (element.hasCreatedElement())
composeDateTime(t, "CarePlan", "created", element.getCreatedElement(), -1);
if (element.hasAuthor())
composeReference(t, "CarePlan", "author", element.getAuthor(), -1);
for (int i = 0; i < element.getContributor().size(); i++) composeReference(t, "CarePlan", "contributor", element.getContributor().get(i), i);
for (int i = 0; i < element.getCareTeam().size(); i++) composeReference(t, "CarePlan", "careTeam", element.getCareTeam().get(i), i);
for (int i = 0; i < element.getAddresses().size(); i++) composeReference(t, "CarePlan", "addresses", element.getAddresses().get(i), i);
for (int i = 0; i < element.getSupportingInfo().size(); i++) composeReference(t, "CarePlan", "supportingInfo", element.getSupportingInfo().get(i), i);
for (int i = 0; i < element.getGoal().size(); i++) composeReference(t, "CarePlan", "goal", element.getGoal().get(i), i);
for (int i = 0; i < element.getActivity().size(); i++) composeCarePlanCarePlanActivityComponent(t, "CarePlan", "activity", element.getActivity().get(i), i);
for (int i = 0; i < element.getNote().size(); i++) composeAnnotation(t, "CarePlan", "note", element.getNote().get(i), i);
}
use of org.hl7.fhir.r4.model.CarePlan in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeCarePlanCarePlanActivityComponent.
protected void composeCarePlanCarePlanActivityComponent(Complex parent, String parentType, String name, CarePlan.CarePlanActivityComponent element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeBackboneElement(t, "activity", name, element, index);
for (int i = 0; i < element.getOutcomeCodeableConcept().size(); i++) composeCodeableConcept(t, "CarePlan", "outcomeCodeableConcept", element.getOutcomeCodeableConcept().get(i), i);
for (int i = 0; i < element.getOutcomeReference().size(); i++) composeReference(t, "CarePlan", "outcomeReference", element.getOutcomeReference().get(i), i);
for (int i = 0; i < element.getProgress().size(); i++) composeAnnotation(t, "CarePlan", "progress", element.getProgress().get(i), i);
if (element.hasReference())
composeReference(t, "CarePlan", "reference", element.getReference(), -1);
if (element.hasDetail())
composeCarePlanCarePlanActivityDetailComponent(t, "CarePlan", "detail", element.getDetail(), -1);
}
Aggregations