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);
}
}
}
}
Aggregations