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

Add Search Parameter in PractitionerDetails #6

Merged
merged 2 commits into from
Oct 24, 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.2-SNAPSHOT</version>
<version>0.0.3-SNAPSHOT</version>

<distributionManagement>
<repository>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
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 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;
Expand Down Expand Up @@ -46,6 +49,24 @@ 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");

@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();
Expand Down Expand Up @@ -79,4 +100,6 @@ public FhirPractitionerDetails getFhirPractitionerDetails() {
public void setFhirPractitionerDetails(FhirPractitionerDetails fhirPractitionerDetails) {
this.fhirPractitionerDetails = fhirPractitionerDetails;
}


}