32
32
import ca .uhn .fhir .rest .api .SortSpec ;
33
33
import ca .uhn .fhir .rest .api .server .IBundleProvider ;
34
34
import ca .uhn .fhir .rest .param .DateRangeParam ;
35
+ import ca .uhn .fhir .rest .param .HasAndListParam ;
35
36
import ca .uhn .fhir .rest .param .StringAndListParam ;
36
37
import ca .uhn .fhir .rest .param .TokenAndListParam ;
37
38
import ca .uhn .fhir .rest .param .TokenParam ;
53
54
import org .hl7 .fhir .dstu3 .model .ProcedureRequest ;
54
55
import org .hl7 .fhir .instance .model .api .IBaseResource ;
55
56
import org .hl7 .fhir .r4 .model .ServiceRequest ;
57
+ import org .openmrs .module .fhir2 .FhirConstants ;
56
58
import org .openmrs .module .fhir2 .api .FhirPatientService ;
57
59
import org .openmrs .module .fhir2 .api .annotations .R3Provider ;
58
60
import org .openmrs .module .fhir2 .api .search .SearchQueryBundleProviderR3Wrapper ;
@@ -128,6 +130,7 @@ public IBundleProvider searchPatients(@OptionalParam(name = Patient.SP_NAME) Str
128
130
@ OptionalParam (name = Patient .SP_ADDRESS_POSTALCODE ) StringAndListParam postalCode ,
129
131
@ OptionalParam (name = Patient .SP_ADDRESS_COUNTRY ) StringAndListParam country ,
130
132
@ OptionalParam (name = Patient .SP_RES_ID ) TokenAndListParam id ,
133
+ @ OptionalParam (name = FhirConstants .HAS_SEARCH_HANDLER ) HasAndListParam hasAndListParam ,
131
134
@ OptionalParam (name = "_lastUpdated" ) DateRangeParam lastUpdated , @ Sort SortSpec sort ,
132
135
@ IncludeParam (reverse = true , allow = { "Observation:" + Observation .SP_PATIENT ,
133
136
"AllergyIntolerance:" + AllergyIntolerance .SP_PATIENT , "DiagnosticReport:" + DiagnosticReport .SP_PATIENT ,
@@ -138,9 +141,9 @@ public IBundleProvider searchPatients(@OptionalParam(name = Patient.SP_NAME) Str
138
141
revIncludes = null ;
139
142
}
140
143
141
- return new SearchQueryBundleProviderR3Wrapper (
142
- patientService .searchForPatients (new PatientSearchParams (name , given , family , identifier , gender , birthDate ,
143
- deathDate , deceased , city , state , postalCode , country , id , lastUpdated , sort , revIncludes )));
144
+ return new SearchQueryBundleProviderR3Wrapper (patientService
145
+ .searchForPatients (new PatientSearchParams (name , given , family , identifier , gender , birthDate , deathDate ,
146
+ deceased , city , state , postalCode , country , id , hasAndListParam , lastUpdated , sort , revIncludes )));
144
147
}
145
148
146
149
@ Search (queryName = "openmrsPatients" )
@@ -155,6 +158,7 @@ public IBundleProvider searchOpenmrsPatients(@OptionalParam(name = "q") StringAn
155
158
@ OptionalParam (name = org .hl7 .fhir .r4 .model .Patient .SP_ADDRESS_POSTALCODE ) StringAndListParam postalCode ,
156
159
@ OptionalParam (name = org .hl7 .fhir .r4 .model .Patient .SP_ADDRESS_COUNTRY ) StringAndListParam country ,
157
160
@ OptionalParam (name = org .hl7 .fhir .r4 .model .Patient .SP_RES_ID ) TokenAndListParam id ,
161
+ @ OptionalParam (name = FhirConstants .HAS_SEARCH_HANDLER ) HasAndListParam hasAndListParam ,
158
162
@ OptionalParam (name = "_lastUpdated" ) DateRangeParam lastUpdated , @ Sort SortSpec sort ,
159
163
@ IncludeParam (reverse = true , allow = { "Observation:" + org .hl7 .fhir .r4 .model .Observation .SP_PATIENT ,
160
164
"AllergyIntolerance:" + org .hl7 .fhir .r4 .model .AllergyIntolerance .SP_PATIENT ,
@@ -169,7 +173,7 @@ public IBundleProvider searchOpenmrsPatients(@OptionalParam(name = "q") StringAn
169
173
170
174
return new SearchQueryBundleProviderR3Wrapper (
171
175
patientService .searchForPatients (new OpenmrsPatientSearchParams (query , gender , birthDate , deathDate ,
172
- deceased , city , state , postalCode , country , id , lastUpdated , sort , revIncludes )));
176
+ deceased , city , state , postalCode , country , id , hasAndListParam , lastUpdated , sort , revIncludes )));
173
177
}
174
178
175
179
/**
0 commit comments