From 3e644c52e06e67b5d229a0e6b513011c83bcebf2 Mon Sep 17 00:00:00 2001 From: Reham Muzzamil Date: Tue, 11 Oct 2022 01:25:55 +0500 Subject: [PATCH 1/2] Add Search Parameter in PractitionerDetails --- pom.xml | 2 +- .../model/practitioner/PractitionerDetails.java | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f61b4ea..8f724f4 100755 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ org.smartregister fhir-common-utils - 0.0.2-SNAPSHOT + 0.0.3-SNAPSHOT diff --git a/src/main/java/org/smartregister/model/practitioner/PractitionerDetails.java b/src/main/java/org/smartregister/model/practitioner/PractitionerDetails.java index a86971e..7f046a1 100755 --- a/src/main/java/org/smartregister/model/practitioner/PractitionerDetails.java +++ b/src/main/java/org/smartregister/model/practitioner/PractitionerDetails.java @@ -18,6 +18,8 @@ import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.rest.gclient.TokenClientParam; import org.hl7.fhir.r4.model.Bundle; import org.hl7.fhir.r4.model.Practitioner; import org.hl7.fhir.r4.model.ResourceType; @@ -46,6 +48,16 @@ public class PractitionerDetails extends Practitioner { formalDefinition = "Get resources from FHIR Server") private FhirPractitionerDetails fhirPractitionerDetails; + @SearchParamDefinition( + name = "keycloak-uuid", + path = "PractitionerDetails.keycloak-uuid", + description = "A practitioner's keycloak-uuid", + type = "token" + ) + public static final String SP_KEYCLOAK_UUID = "keycloak-uuid"; + public static final TokenClientParam KEYCLOAK_UUID = new TokenClientParam("keycloak-uuid"); + + @Override public Practitioner copy() { Practitioner practitioner = new Practitioner(); @@ -79,4 +91,6 @@ public FhirPractitionerDetails getFhirPractitionerDetails() { public void setFhirPractitionerDetails(FhirPractitionerDetails fhirPractitionerDetails) { this.fhirPractitionerDetails = fhirPractitionerDetails; } + + } From 93f45e4b44938f3c513081a50952dfc911b975bf Mon Sep 17 00:00:00 2001 From: Reham Muzzamil Date: Thu, 13 Oct 2022 23:54:00 +0500 Subject: [PATCH 2/2] Add Search Parameter SP_IS_AUTH_PROVIDED in PractitionerDetails --- .../model/practitioner/PractitionerDetails.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/java/org/smartregister/model/practitioner/PractitionerDetails.java b/src/main/java/org/smartregister/model/practitioner/PractitionerDetails.java index 7f046a1..9b41dbd 100755 --- a/src/main/java/org/smartregister/model/practitioner/PractitionerDetails.java +++ b/src/main/java/org/smartregister/model/practitioner/PractitionerDetails.java @@ -20,6 +20,7 @@ import ca.uhn.fhir.model.api.annotation.ResourceDef; import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.rest.gclient.TokenClientParam; +import ca.uhn.fhir.rest.param.SpecialParam; import org.hl7.fhir.r4.model.Bundle; import org.hl7.fhir.r4.model.Practitioner; import org.hl7.fhir.r4.model.ResourceType; @@ -57,7 +58,15 @@ public class PractitionerDetails extends Practitioner { public static final String SP_KEYCLOAK_UUID = "keycloak-uuid"; public static final TokenClientParam KEYCLOAK_UUID = new TokenClientParam("keycloak-uuid"); + @SearchParamDefinition( + name = "isAuthProvided", + path = "PractitionerDetails.isAuthProvided", + description = "isAuthProvided", + type = "token" + ) + public static final String SP_IS_AUTH_PROVIDED = "isAuthProvided"; + public static final SpecialParam IS_AUTH_PROVIDED = new SpecialParam().setValue("isAuthProvided"); @Override public Practitioner copy() { Practitioner practitioner = new Practitioner();