@@ -57,12 +57,12 @@ public HttpRequestActionBuilder getVisitTypes() {
5757 }
5858
5959 public HttpRequestActionBuilder getVisitsOfPatient (String patientUuid ) {
60- String customRepresentation = "custom:(uuid,location,encounters:(uuid,diagnoses:(uuid,display,rank,diagnosis,voided)," +
61- "form:(uuid,display),encounterDatetime,orders:full,obs:(uuid,concept:(uuid,display,conceptClass:(uuid,display))," +
62- "display,groupMembers:(uuid,concept:(uuid,display),value:(uuid,display),display),value,obsDatetime)," +
63- "encounterType:(uuid,display,viewPrivilege,editPrivilege),encounterProviders:(uuid,display,encounterRole:(uuid,display)," +
64- "provider:(uuid,person:(uuid,display)))),visitType:(uuid,name,display),startDatetime,stopDatetime,patient," +
65- "attributes:(attributeType:ref,display,uuid,value)" ;
60+ String customRepresentation = "custom:(uuid,location,encounters:(uuid,diagnoses:(uuid,display,rank,diagnosis,voided),"
61+ + "form:(uuid,display),encounterDatetime,orders:full,obs:(uuid,concept:(uuid,display,conceptClass:(uuid,display)),"
62+ + "display,groupMembers:(uuid,concept:(uuid,display),value:(uuid,display),display),value,obsDatetime),"
63+ + "encounterType:(uuid,display,viewPrivilege,editPrivilege),encounterProviders:(uuid,display,encounterRole:(uuid,display),"
64+ + "provider:(uuid,person:(uuid,display)))),visitType:(uuid,name,display),startDatetime,stopDatetime,patient,"
65+ + "attributes:(attributeType:ref,display,uuid,value)" ;
6666
6767 return http ("Get Visits of Patient" )
6868 .get ("/openmrs/ws/rest/v1/visit?patient=" + patientUuid + "&v=" + customRepresentation + "&limit=5" );
@@ -149,33 +149,32 @@ public HttpRequestActionBuilder getAllActiveOrders(String patientUuid) {
149149 "/openmrs/ws/rest/v1/order?patient=" + patientUuid + "&careSetting=" + CARE_SETTING_UUID + "&status=ACTIVE" );
150150 }
151151
152-
153152 public HttpRequestActionBuilder getDrugOrdersExceptCancelledAndExpired (String patientUuid ) {
154153 String customRepresentation = """
155- custom:(uuid,dosingType,orderNumber,accessionNumber,patient:ref,action,careSetting:ref,
156- previousOrder:ref,dateActivated,scheduledDate,dateStopped,autoExpireDate,orderType:ref,
157- encounter:ref,orderer:(uuid,display,person:(display)),orderReason,orderReasonNonCoded,
158- orderType,urgency,instructions,commentToFulfiller,drug:(uuid,display,strength,dosageForm:(display,uuid),concept),
159- dose,doseUnits:ref,frequency:ref,asNeeded,asNeededCondition,quantity,quantityUnits:ref,
160- numRefills,dosingInstructions,duration,durationUnits:ref,route:ref,brandName,dispenseAsWritten)
161- """ ;
154+ custom:(uuid,dosingType,orderNumber,accessionNumber,patient:ref,action,careSetting:ref,
155+ previousOrder:ref,dateActivated,scheduledDate,dateStopped,autoExpireDate,orderType:ref,
156+ encounter:ref,orderer:(uuid,display,person:(display)),orderReason,orderReasonNonCoded,
157+ orderType,urgency,instructions,commentToFulfiller,drug:(uuid,display,strength,dosageForm:(display,uuid),concept),
158+ dose,doseUnits:ref,frequency:ref,asNeeded,asNeededCondition,quantity,quantityUnits:ref,
159+ numRefills,dosingInstructions,duration,durationUnits:ref,route:ref,brandName,dispenseAsWritten)
160+ """ ;
162161 return http ("Get Drug Orders except the cancelled and expired" ).get (
163- "/openmrs/ws/rest/v1/order" + "?patient=" + patientUuid + "&careSetting=" + CARE_SETTING_UUID
164- + "&status=any&orderType=" + DRUG_ORDER + "&excludeCanceledAndExpired=true&v=" + customRepresentation );
162+ "/openmrs/ws/rest/v1/order" + "?patient=" + patientUuid + "&careSetting=" + CARE_SETTING_UUID
163+ + "&status=any&orderType=" + DRUG_ORDER + "&excludeCanceledAndExpired=true&v=" + customRepresentation );
165164 }
166165
167166 public HttpRequestActionBuilder getDrugOrdersExceptDiscontinuedOrders (String patientUuid ) {
168167 String customRepresentation = """
169- custom:(uuid,dosingType,orderNumber,accessionNumber,patient:ref,action,careSetting:ref,
170- previousOrder:ref,dateActivated,scheduledDate,dateStopped,autoExpireDate,orderType:ref,
171- encounter:ref,orderer:(uuid,display,person:(display)),orderReason,orderReasonNonCoded,
172- orderType,urgency,instructions,commentToFulfiller,drug:(uuid,display,strength,dosageForm:(display,uuid),concept),
173- dose,doseUnits:ref,frequency:ref,asNeeded,asNeededCondition,quantity,quantityUnits:ref,
174- numRefills,dosingInstructions,duration,durationUnits:ref,route:ref,brandName,dispenseAsWritten)
175- """ ;
176- return http ("Get Drug Orders except the discontinued orders" )
177- . get ( "/openmrs/ws/rest/v1/order" + "?patient =" + patientUuid + "&careSetting= " + CARE_SETTING_UUID
178- + "&status=any&orderType=" + DRUG_ORDER + "&v=" + customRepresentation + "&excludeDiscontinueOrders=true" );
168+ custom:(uuid,dosingType,orderNumber,accessionNumber,patient:ref,action,careSetting:ref,
169+ previousOrder:ref,dateActivated,scheduledDate,dateStopped,autoExpireDate,orderType:ref,
170+ encounter:ref,orderer:(uuid,display,person:(display)),orderReason,orderReasonNonCoded,
171+ orderType,urgency,instructions,commentToFulfiller,drug:(uuid,display,strength,dosageForm:(display,uuid),concept),
172+ dose,doseUnits:ref,frequency:ref,asNeeded,asNeededCondition,quantity,quantityUnits:ref,
173+ numRefills,dosingInstructions,duration,durationUnits:ref,route:ref,brandName,dispenseAsWritten)
174+ """ ;
175+ return http ("Get Drug Orders except the discontinued orders" ). get ( "/openmrs/ws/rest/v1/order" + "?patient="
176+ + patientUuid + "&careSetting =" + CARE_SETTING_UUID + "&status=any&orderType= " + DRUG_ORDER + "&v="
177+ + customRepresentation + "&excludeDiscontinueOrders=true" );
179178 }
180179
181180 public HttpRequestActionBuilder getAllergies (String patientUuid ) {
0 commit comments