Skip to content

Commit

Permalink
(fix) O3-4104 Ward App - prevent cancelling of pending ADT request wh…
Browse files Browse the repository at this point in the history
…en patient swaps bed (#1367)
  • Loading branch information
chibongho authored Nov 12, 2024
1 parent 4bac6f9 commit d352d9f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/esm-ward-app/src/hooks/useEmrConfiguration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ interface EmrApiConfigurationResponse {
excludedEncounterTypes: Array<string>;
uuid: string;
}>;
bedAssignmentEncounterType: OpenmrsResource;
cancelADTRequestEncounterType: OpenmrsResource;
// There are many more keys to this object, but we only need these for now
// Add more keys as needed
}
Expand Down Expand Up @@ -94,6 +96,8 @@ const customRepProps = [
['unknownPatientPersonAttributeType', 'ref'],
['supportsVisitsLocationTag', '(uuid,display,name,links)'],
['transferForm', 'ref'],
['bedAssignmentEncounterType', 'ref'],
['cancelADTRequestEncounterType', 'ref'],
];

const customRep = `custom:${customRepProps.map((prop) => prop.join(':')).join(',')}`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export default function PatientBedSwapForm({
setShowErrorNotifications(false);
createEncounter({
patient: patient.uuid,
encounterType: emrConfiguration.transferWithinHospitalEncounterType.uuid,
encounterType: emrConfiguration.bedAssignmentEncounterType.uuid,
location: location?.uuid,
encounterProviders: [
{
Expand Down

0 comments on commit d352d9f

Please sign in to comment.