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

EA-203: Add metadata mappings for two new encounter types #244

Merged
merged 2 commits into from
Oct 8, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ public class EmrApiConstants {

public static final String GP_TRANSFER_WITHIN_HOSPITAL_ENCOUNTER_TYPE = "emr.transferWithinHospitalEncounterType";

public static final String GP_INPATIENT_NOTE_ENCOUNTER_TYPE = "emr.inpatientNoteEncounterType";

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

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 @@ -121,6 +121,14 @@ public EncounterType getTransferWithinHospitalEncounterType() {
return getEmrApiMetadataByCode(EncounterType.class, EmrApiConstants.GP_TRANSFER_WITHIN_HOSPITAL_ENCOUNTER_TYPE, false);
}

public EncounterType getInpatientNoteEncounterType() {
return getEmrApiMetadataByCode(EncounterType.class, EmrApiConstants.GP_INPATIENT_NOTE_ENCOUNTER_TYPE, false);
}

public EncounterType getTransferRequestEncounterType() {
return getEmrApiMetadataByCode(EncounterType.class, EmrApiConstants.GP_TRANSFER_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 @@ -66,7 +66,7 @@ public void shouldGetAsJson() throws Exception {
@Test
public void shouldGetDefaultRepresentation() {
SimpleObject config = emrApiConfigurationController.getEmrApiConfiguration(request, response);
assertEquals(48, config.keySet().size());
assertEquals(50, 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
Loading