Skip to content

Commit

Permalink
Merge branch 'main' into O3-3480
Browse files Browse the repository at this point in the history
  • Loading branch information
denniskigen authored Jul 26, 2024
2 parents 61c042a + 2c08c60 commit 1960c73
Show file tree
Hide file tree
Showing 51 changed files with 746 additions and 534 deletions.
2 changes: 1 addition & 1 deletion __mocks__/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ export * from './queue-rooms.mock';
export * from './search.mock';
export * from './session.mock';
export * from './wards.mock';
export * from './ward-patient';
export * from './inpatient-request';
export * from './visits.mock';
74 changes: 74 additions & 0 deletions __mocks__/inpatient-request.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
import { mockPatientAlice } from './patient.mock';
import { mockLocationInpatientWard } from './locations.mock';
import { type InpatientRequest } from '@openmrs/esm-ward-app/src/types';

export const mockInpatientRequest: InpatientRequest = {
patient: mockPatientAlice,
dispositionLocation: mockLocationInpatientWard,
dispositionType: 'ADMIT',
disposition: {
uuid: '6c047a20-c2bf-43ef-9e88-6da7b17e8c1a',
display: 'Admit to hospital',
name: {
display: 'Admit to hospital',
uuid: 'b1e494ef-4779-4262-bc42-56a79c39303c',
name: 'Admit to hospital',
locale: 'en',
localePreferred: true,
conceptNameType: 'FULLY_SPECIFIED',
},
datatype: {
uuid: '8d4a4c94-c2cc-11de-8d13-0010c6dffd0f',
display: 'N/A',
},
conceptClass: {
uuid: '8d492774-c2cc-11de-8d13-0010c6dffd0f',
display: 'Misc',
},
set: false,
version: null,
retired: false,
names: [
{
uuid: '122a523c-cbec-4283-991f-858f44ffccca',
display: 'Hospital admission',
},
{
uuid: 'b1e494ef-4779-4262-bc42-56a79c39303c',
display: 'Admit to hospital',
},
{
uuid: 'f72fadb0-d5db-102d-ad2a-000c29c2a5d7',
display: "ADMIS Á L'HÔPITAL",
},
{
uuid: 'acdcc1d2-7414-4337-890e-c8ccbccda41a',
display: 'Admèt nan lopital',
},
{
uuid: '4f12edd7-e516-493b-bc21-da1a9d29873f',
display: "Admettre à l'hôpital",
},
],
descriptions: [
{
uuid: '7d29309b-faaa-4767-83e6-6c75117fc569',
display: 'patient will be admitted from the clinic to the hospital for managment of an acute problem.',
},
],
mappings: [
{
uuid: '75a1a11e-4943-102e-96e9-000c29c2a5d7',
display: 'PIH: ADMIT TO HOSPITAL',
},
{
uuid: 'b260d122-4864-102e-96e9-000c29c2a5d7',
display: 'PIH: 3799',
},
],
answers: [],
setMembers: [],
attributes: [],
resourceVersion: '2.0',
},
};
17 changes: 16 additions & 1 deletion __mocks__/patient.mock.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import { type Patient, type PersonAddress } from '@openmrs/esm-framework';
import { mockAddress } from './address.mock';
import { mockPastVisit } from './visits.mock';
import { mockLocationInpatientWard } from './locations.mock';

/* Patients as returned by `usePatient` and the service queues endpoints */

export const mockPatientAlice: Patient = {
uuid: '00000000-0000-0001-0000-000000000000',
Expand All @@ -15,7 +19,12 @@ export const mockPatientAlice: Patient = {
dead: false,
deathDate: null,
causeOfDeath: null,
preferredName: null,
preferredName: {
display: 'Alice Johnson',
givenName: 'Alice',
familyName: 'Johnson',
uuid: 'preferred-name-uuid',
},
preferredAddress: mockAddress as PersonAddress,
names: [null],
addresses: [],
Expand All @@ -42,6 +51,12 @@ export const mockPatientBrian: Patient = {
causeOfDeath: null,
preferredName: null,
preferredAddress: mockAddress as PersonAddress,
preferredName: {
display: 'Brian Johnson',
givenName: 'Brian ',
familyName: 'Johnson',
uuid: 'preferred-name-uuid',
},
names: [null],
addresses: [],
attributes: [],
Expand Down
22 changes: 0 additions & 22 deletions __mocks__/ward-patient.ts

This file was deleted.

Loading

0 comments on commit 1960c73

Please sign in to comment.