diff --git a/src/main/java/org/openehealth/app/xdstofhir/registry/common/mapper/AbstractXdsToFhirMapper.java b/src/main/java/org/openehealth/app/xdstofhir/registry/common/mapper/AbstractXdsToFhirMapper.java index 5b0d6ff..479da17 100644 --- a/src/main/java/org/openehealth/app/xdstofhir/registry/common/mapper/AbstractXdsToFhirMapper.java +++ b/src/main/java/org/openehealth/app/xdstofhir/registry/common/mapper/AbstractXdsToFhirMapper.java @@ -77,7 +77,7 @@ protected Coding map(final Code code) { protected Reference fromAuthor(final Author author) { var role = new PractitionerRole(); var doc = new Practitioner(); - if(!author.getAuthorPerson().isEmpty()) { + if((author.getAuthorPerson() != null) && !author.getAuthorPerson().isEmpty()) { if (!author.getAuthorPerson().getName().isEmpty()) doc.setName(singletonList(fromName(author.getAuthorPerson().getName()))); if (!author.getAuthorPerson().getId().isEmpty()) diff --git a/src/main/java/org/openehealth/app/xdstofhir/registry/query/StoredQueryMapper.java b/src/main/java/org/openehealth/app/xdstofhir/registry/query/StoredQueryMapper.java index 4a0f549..6feaf15 100644 --- a/src/main/java/org/openehealth/app/xdstofhir/registry/query/StoredQueryMapper.java +++ b/src/main/java/org/openehealth/app/xdstofhir/registry/query/StoredQueryMapper.java @@ -117,7 +117,7 @@ public static void mapPatientIdToQuery(PatientIdBasedStoredQuery query, IQuery