Skip to content

Commit

Permalink
Merge pull request #253 from openmrs/EA-210
Browse files Browse the repository at this point in the history
EA-210 Add encounter types for cancelling ADT request and for bed ass…
  • Loading branch information
chibongho authored Nov 7, 2024
2 parents 9a6fa43 + be895ff commit 698225d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ public class EmrApiConstants {

public static final String GP_TRANSFER_REQUEST_ENCOUNTER_TYPE = "emr.transferRequestEncounterType";

public static final String GP_BED_ASSIGNMENT_ENCOUNTER_TYPE = "emr.bedAssignmentEncounterType";

public static final String GP_CANCEL_ADT_REQUEST_ENCOUNTER_TYPE = "emr.cancelADTRequestEncounterType";

public static final String GP_CHECK_IN_CLERK_ENCOUNTER_ROLE = "emr.checkInClerkEncounterRole";

public static final String GP_CLINICIAN_ENCOUNTER_ROLE = "emr.clinicianEncounterRole";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,14 @@ public EncounterType getTransferRequestEncounterType() {
return getEmrApiMetadataByCode(EncounterType.class, EmrApiConstants.GP_TRANSFER_REQUEST_ENCOUNTER_TYPE, false);
}

public EncounterType getBedAssignmentEncounterType() {
return getEmrApiMetadataByCode(EncounterType.class, EmrApiConstants.GP_BED_ASSIGNMENT_ENCOUNTER_TYPE, false);
}

public EncounterType getCancelADTRequestEncounterType() {
return getEmrApiMetadataByCode(EncounterType.class, EmrApiConstants.GP_CANCEL_ADT_REQUEST_ENCOUNTER_TYPE, false);
}

public Form getAdmissionForm() {
return getEmrApiMetadataByCode(Form.class, EmrApiConstants.GP_ADMISSION_FORM, false);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public void shouldGetAsJson() throws Exception {
@Test
public void shouldGetDefaultRepresentation() {
SimpleObject config = emrApiConfigurationController.getEmrApiConfiguration(request, response);
assertEquals(51, config.keySet().size());
assertEquals(53, config.keySet().size());
assertEquals("org.openmrs.module.emrapi", config.get("metadataSourceName"));
assertEquals("50", config.get("lastViewedPatientSizeLimit").toString());
Map<String, Object> unknownLocation = mapNode(config, "unknownLocation");
Expand Down

0 comments on commit 698225d

Please sign in to comment.