Search in sources :

Example 1 with POCDMT000002UK01Consent

use of uk.nhs.connect.iucds.cda.ucr.POCDMT000002UK01Consent in project integration-adaptor-111 by nhsconnect.

the class ConsentMapper method extractAuthCodesFromDoc.

private void extractAuthCodesFromDoc(Consent consent, POCDMT000002UK01ClinicalDocument1 clinicalDocument) {
    if (clinicalDocument.sizeOfAuthorizationArray() > 0) {
        for (POCDMT000002UK01Authorization auth : clinicalDocument.getAuthorizationArray()) {
            POCDMT000002UK01Consent authConsent = auth.getConsent();
            if (authConsent.isSetCode()) {
                Optional<CodeableConcept> codeableConcept = getCodingFromCE(authConsent.getCode());
                codeableConcept.ifPresent(consent::addAction);
            }
        }
    }
}
Also used : POCDMT000002UK01Consent(uk.nhs.connect.iucds.cda.ucr.POCDMT000002UK01Consent) POCDMT000002UK01Authorization(uk.nhs.connect.iucds.cda.ucr.POCDMT000002UK01Authorization) CodeableConcept(org.hl7.fhir.dstu3.model.CodeableConcept)

Aggregations

CodeableConcept (org.hl7.fhir.dstu3.model.CodeableConcept)1 POCDMT000002UK01Authorization (uk.nhs.connect.iucds.cda.ucr.POCDMT000002UK01Authorization)1 POCDMT000002UK01Consent (uk.nhs.connect.iucds.cda.ucr.POCDMT000002UK01Consent)1