Skip to content

Commit

Permalink
Return FHIRPractitionerDetails practitioners as list (#11)
Browse files Browse the repository at this point in the history
* Return FHIRPractitionerDetails practitioners as list

* Return Organization Affiliations in FhirPractitionerDetails
  • Loading branch information
ndegwamartin authored Jul 26, 2023
1 parent af373ad commit 3b8d18c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>org.smartregister</groupId>
<artifactId>fhir-common-utils</artifactId>
<version>0.0.7-SNAPSHOT</version>
<version>0.0.9-SNAPSHOT</version>

<distributionManagement>
<repository>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,17 @@ public class FhirPractitionerDetails extends Type implements ICompositeType {
max = -1,
modifier = false,
summary = false)
private Practitioner practitioner;
private List<Practitioner> practitioners;

@Child(
name = "organizationAffiliation",
type = {OrganizationAffiliation.class},
order = 8,
min = 0,
max = -1,
modifier = false,
summary = false)
private List<OrganizationAffiliation> organizationAffiliations;

public List<CareTeam> getCareTeams() {
return careTeams;
Expand Down Expand Up @@ -146,12 +156,20 @@ public void setGroups(List<Group> groups) {
this.groups = groups;
}

public Practitioner getPractitioner() {
return practitioner;
public List<Practitioner> getPractitioners() {
return practitioners;
}

public void setPractitioners(List<Practitioner> practitioners) {
this.practitioners = practitioners;
}

public List<OrganizationAffiliation> getOrganizationAffiliations() {
return organizationAffiliations;
}

public void setPractitioner(Practitioner practitioner) {
this.practitioner = practitioner;
public void setOrganizationAffiliations(List<OrganizationAffiliation> organizationAffiliations) {
this.organizationAffiliations = organizationAffiliations;
}

@Override
Expand All @@ -163,7 +181,7 @@ public Type copy() {

@Override
public boolean isEmpty() {
return ElementUtil.isEmpty(practitioner);
return ElementUtil.isEmpty(practitioners);
}

@Override
Expand Down

0 comments on commit 3b8d18c

Please sign in to comment.