From 3b8d18cc0422750ec81e5ba656cd057db2ee48d0 Mon Sep 17 00:00:00 2001 From: Martin Ndegwa Date: Wed, 26 Jul 2023 21:26:46 +0300 Subject: [PATCH] Return FHIRPractitionerDetails practitioners as list (#11) * Return FHIRPractitionerDetails practitioners as list * Return Organization Affiliations in FhirPractitionerDetails --- pom.xml | 2 +- .../practitioner/FhirPractitionerDetails.java | 30 +++++++++++++++---- 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/pom.xml b/pom.xml index 61181a7..140c773 100755 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ org.smartregister fhir-common-utils - 0.0.7-SNAPSHOT + 0.0.9-SNAPSHOT diff --git a/src/main/java/org/smartregister/model/practitioner/FhirPractitionerDetails.java b/src/main/java/org/smartregister/model/practitioner/FhirPractitionerDetails.java index 4c89883..3db5d1e 100755 --- a/src/main/java/org/smartregister/model/practitioner/FhirPractitionerDetails.java +++ b/src/main/java/org/smartregister/model/practitioner/FhirPractitionerDetails.java @@ -95,7 +95,17 @@ public class FhirPractitionerDetails extends Type implements ICompositeType { max = -1, modifier = false, summary = false) - private Practitioner practitioner; + private List practitioners; + + @Child( + name = "organizationAffiliation", + type = {OrganizationAffiliation.class}, + order = 8, + min = 0, + max = -1, + modifier = false, + summary = false) + private List organizationAffiliations; public List getCareTeams() { return careTeams; @@ -146,12 +156,20 @@ public void setGroups(List groups) { this.groups = groups; } - public Practitioner getPractitioner() { - return practitioner; + public List getPractitioners() { + return practitioners; + } + + public void setPractitioners(List practitioners) { + this.practitioners = practitioners; + } + + public List getOrganizationAffiliations() { + return organizationAffiliations; } - public void setPractitioner(Practitioner practitioner) { - this.practitioner = practitioner; + public void setOrganizationAffiliations(List organizationAffiliations) { + this.organizationAffiliations = organizationAffiliations; } @Override @@ -163,7 +181,7 @@ public Type copy() { @Override public boolean isEmpty() { - return ElementUtil.isEmpty(practitioner); + return ElementUtil.isEmpty(practitioners); } @Override