Search in sources :

Example 1 with POCDMT000002UK01RelatedDocument1

use of uk.nhs.connect.iucds.cda.ucr.POCDMT000002UK01RelatedDocument1 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();
}
Also used : Reference(org.hl7.fhir.dstu3.model.Reference) POCDMT000002UK01RelatedDocument1(uk.nhs.connect.iucds.cda.ucr.POCDMT000002UK01RelatedDocument1) IdType(org.hl7.fhir.dstu3.model.IdType) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

IdType (org.hl7.fhir.dstu3.model.IdType)1 Reference (org.hl7.fhir.dstu3.model.Reference)1 BeforeEach (org.junit.jupiter.api.BeforeEach)1 POCDMT000002UK01RelatedDocument1 (uk.nhs.connect.iucds.cda.ucr.POCDMT000002UK01RelatedDocument1)1