Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update model classes to use FHIR known resources instead of custom classes. #4

Merged
merged 2 commits into from
Feb 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.1-SNAPSHOT</version>
<version>0.0.2-SNAPSHOT</version>

<distributionManagement>
<repository>
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import ca.uhn.fhir.util.ElementUtil;
import org.hl7.fhir.instance.model.api.ICompositeType;
import org.hl7.fhir.r4.model.StringType;
import org.hl7.fhir.r4.model.Type;
import org.hl7.fhir.r4.model.*;
import org.smartregister.model.location.LocationHierarchy;

import java.util.List;
Expand All @@ -30,28 +29,39 @@ public class FhirPractitionerDetails extends Type implements ICompositeType {

@Child(
name = "careteams",
type = {FhirCareTeamExtension.class},
type = {CareTeam.class},
order = 1,
min = 0,
max = -1,
modifier = false,
summary = false)
List<FhirCareTeamExtension> fhirCareTeamExtensionList;
List<CareTeam> careTeams;

@Child(
name = "teams",
type = {FhirOrganizationExtension.class},
type = {Organization.class},
order = 2,
min = 0,
max = -1,
modifier = false,
summary = false)
List<FhirOrganizationExtension> fhirOrganizationExtensions;
List<Organization> organizations;


@Child(
name = "locations",
type = {Location.class},
order = 3,
min = 0,
max = -1,
modifier = false,
summary = false)
private List<Location> locations;

@Child(
name = "locationHierarchyList",
type = {LocationHierarchy.class},
order = 3,
order = 4,
min = 0,
max = -1,
modifier = false,
Expand All @@ -61,29 +71,36 @@ public class FhirPractitionerDetails extends Type implements ICompositeType {
@Child(
name = "practitionerId",
type = {StringType.class},
order = 4,
order = 5,
min = 0,
max = -1,
modifier = false,
summary = false)
private StringType practitionerId;

public List<FhirCareTeamExtension> getFhirCareTeamExtensionList() {
return fhirCareTeamExtensionList;
public List<CareTeam> getCareTeams() {
return careTeams;
}

public void setCareTeams(
List<CareTeam> careTeams) {
this.careTeams = careTeams;
}

public List<Organization> getOrganizations() {
return organizations;
}

public void setFhirCareTeamExtensionList(
List<FhirCareTeamExtension> fhirCareTeamExtensionList) {
this.fhirCareTeamExtensionList = fhirCareTeamExtensionList;
public void setOrganizations(List<Organization> organizations) {
this.organizations = organizations;
}

public List<FhirOrganizationExtension> getFhirOrganizationExtensions() {
return fhirOrganizationExtensions;
public List<Location> getLocations() {
return locations;
}

public void setFhirOrganizationExtensions(
List<FhirOrganizationExtension> fhirOrganizationExtensions) {
this.fhirOrganizationExtensions = fhirOrganizationExtensions;
public void setLocations(List<Location> locations) {
this.locations = locations;
}

public List<LocationHierarchy> getLocationHierarchyList() {
Expand Down

This file was deleted.

Loading