@@ -145,22 +145,32 @@ public HttpRequestActionBuilder getAllActiveOrders(String patientUuid) {
145145 "/openmrs/ws/rest/v1/order?patient=" + patientUuid + "&careSetting=" + CARE_SETTING_UUID + "&status=ACTIVE" );
146146 }
147147
148- public HttpRequestActionBuilder getDrugOrders (String patientUuid ) {
148+ public HttpRequestActionBuilder getDrugOrdersExceptCancelledAndExpired (String patientUuid ) {
149149 String customRepresentation = """
150- custom:(uuid,dosingType,orderNumber,accessionNumber,
151- patient:ref,action,careSetting:ref,previousOrder:ref,dateActivated,scheduledDate,dateStopped,autoExpireDate,
152- orderType:ref,encounter:ref,
153- orderer:(uuid,display,person:(display)),
154- orderReason,orderReasonNonCoded,orderType,urgency,instructions,
155- commentToFulfiller,
156- drug:(uuid,display,strength,
157- dosageForm:(display,uuid),concept),
158- dose,doseUnits:ref,
159- frequency:ref,asNeeded,asNeededCondition,quantity,quantityUnits:ref,numRefills,dosingInstructions,
160- duration,durationUnits:ref,route:ref,brandName,dispenseAsWritten)
150+ custom:(uuid,dosingType,orderNumber,accessionNumber,patient:ref,action,careSetting:ref,
151+ previousOrder:ref,dateActivated,scheduledDate,dateStopped,autoExpireDate,orderType:ref,
152+ encounter:ref,orderer:(uuid,display,person:(display)),orderReason,orderReasonNonCoded,
153+ orderType,urgency,instructions,commentToFulfiller,drug:(uuid,display,strength,dosageForm:(display,uuid),concept),
154+ dose,doseUnits:ref,frequency:ref,asNeeded,asNeededCondition,quantity,quantityUnits:ref,
155+ numRefills,dosingInstructions,duration,durationUnits:ref,route:ref,brandName,dispenseAsWritten)
161156 """ ;
162- return http ("Get Orders" ).get ("/openmrs/ws/rest/v1/order" + "?patient=" + patientUuid + "&careSetting="
163- + CARE_SETTING_UUID + "&status=any&orderType=" + DRUG_ORDER + "&v=" + customRepresentation );
157+ return http ("Get Drug Orders except the cancelled and expired" ).get (
158+ "/openmrs/ws/rest/v1/order" + "?patient=" + patientUuid + "&careSetting=" + CARE_SETTING_UUID
159+ + "&status=any&orderType=" + DRUG_ORDER + "&excludeCanceledAndExpired=true&v=" + customRepresentation );
160+ }
161+
162+ public HttpRequestActionBuilder getDrugOrdersExceptDiscontinuedOrders (String patientUuid ) {
163+ String customRepresentation = """
164+ custom:(uuid,dosingType,orderNumber,accessionNumber,patient:ref,action,careSetting:ref,
165+ previousOrder:ref,dateActivated,scheduledDate,dateStopped,autoExpireDate,orderType:ref,
166+ encounter:ref,orderer:(uuid,display,person:(display)),orderReason,orderReasonNonCoded,
167+ orderType,urgency,instructions,commentToFulfiller,drug:(uuid,display,strength,dosageForm:(display,uuid),concept),
168+ dose,doseUnits:ref,frequency:ref,asNeeded,asNeededCondition,quantity,quantityUnits:ref,
169+ numRefills,dosingInstructions,duration,durationUnits:ref,route:ref,brandName,dispenseAsWritten)
170+ """ ;
171+ return http ("Get Drug Orders except the discontinued orders" ).get ("/openmrs/ws/rest/v1/order" + "?patient="
172+ + patientUuid + "&careSetting=" + CARE_SETTING_UUID + "&status=any&orderType=" + DRUG_ORDER + "&v="
173+ + customRepresentation + "&excludeDiscontinueOrders=true" );
164174 }
165175
166176 public HttpRequestActionBuilder getAllergies (String patientUuid ) {
0 commit comments