Skip to content

Commit

Permalink
Revert "Merge remote-tracking branch 'origin/ft-ward-patient-notes' i…
Browse files Browse the repository at this point in the history
…nto ft-ward-patient-notes"

This reverts commit fcbcbd6, reversing
changes made to fb1c52a.
  • Loading branch information
usamaidrsk committed Jul 23, 2024
1 parent 06c840c commit 086de7b
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 420 deletions.
269 changes: 0 additions & 269 deletions __mocks__/wards.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,272 +65,3 @@ export const mockAdmissionLocation: AdmissionLocation = {
},
],
};

// TODO rework (and likely trim) after we rework this endpoint
export const mockInpatientVisits = [
{
visit: {
uuid: 'decd8e01-de67-42da-a24b-66e2369e44fb',
display: 'Clinic or Hospital Visit @ KGH - 07/19/2024 10:06 AM',
patient: {
uuid: 'cf52e661-7bbe-4260-8685-6ae7bc430e67',
display: 'KGH24070005 - Nicks, Stevie',
links: [
{
rel: 'self',
uri: 'http://localhost:8080/openmrs/ws/rest/v1/patient/cf52e661-7bbe-4260-8685-6ae7bc430e67',
resourceAlias: 'patient',
},
],
},
visitType: {
uuid: 'f01c54cb-2225-471a-9cd5-d348552c337c',
display: 'Clinic or Hospital Visit',
links: [
{
rel: 'self',
uri: 'http://localhost:8080/openmrs/ws/rest/v1/visittype/f01c54cb-2225-471a-9cd5-d348552c337c',
resourceAlias: 'visittype',
},
],
},
indication: null,
location: {
uuid: '074b2ab0-716a-11eb-8aa6-0242ac110002',
display: 'KGH',
links: [
{
rel: 'self',
uri: 'http://localhost:8080/openmrs/ws/rest/v1/location/074b2ab0-716a-11eb-8aa6-0242ac110002',
resourceAlias: 'location',
},
],
},
startDatetime: '2024-07-19T10:06:00.000-0400',
stopDatetime: null,
encounters: [
{
uuid: '86d4ef13-1c2b-4b69-b2ae-4d8a4c6b2a3c',
display: 'Admission aux soins hospitaliers 07/19/2024',
links: [
{
rel: 'self',
uri: 'http://localhost:8080/openmrs/ws/rest/v1/encounter/86d4ef13-1c2b-4b69-b2ae-4d8a4c6b2a3c',
resourceAlias: 'encounter',
},
],
},
],
attributes: [],
voided: false,
links: [
{
rel: 'self',
uri: 'http://localhost:8080/openmrs/ws/rest/v1/visit/decd8e01-de67-42da-a24b-66e2369e44fb',
resourceAlias: 'visit',
},
{
rel: 'full',
uri: 'http://localhost:8080/openmrs/ws/rest/v1/visit/decd8e01-de67-42da-a24b-66e2369e44fb?v=full',
resourceAlias: 'visit',
},
],
resourceVersion: '1.9',
},
patient: {
uuid: 'cf52e661-7bbe-4260-8685-6ae7bc430e67',
display: 'KGH24070005 - Nicks, Stevie',
identifiers: [
{
uuid: 'ea5b61a8-cd35-4785-b894-1aa0fe154435',
display: 'KGH EMR ID = KGH24070005',
links: [
{
rel: 'self',
uri: 'http://localhost:8080/openmrs/ws/rest/v1/patient/cf52e661-7bbe-4260-8685-6ae7bc430e67/identifier/ea5b61a8-cd35-4785-b894-1aa0fe154435',
resourceAlias: 'identifier',
},
],
},
],
person: {
uuid: 'cf52e661-7bbe-4260-8685-6ae7bc430e67',
display: 'Nicks, Stevie',
gender: 'F',
age: 32,
birthdate: '1992-01-01T00:00:00.000-0500',
birthdateEstimated: true,
dead: false,
deathDate: null,
causeOfDeath: null,
preferredName: {
uuid: '20939530-ccf2-4743-b17d-72f64115fceb',
display: 'Nicks, Stevie',
links: [
{
rel: 'self',
uri: 'http://localhost:8080/openmrs/ws/rest/v1/person/cf52e661-7bbe-4260-8685-6ae7bc430e67/name/20939530-ccf2-4743-b17d-72f64115fceb',
resourceAlias: 'name',
},
],
},
preferredAddress: {
uuid: '6eaa7b62-368e-4fdb-94c6-653adeaebbb7',
display: null,
links: [
{
rel: 'self',
uri: 'http://localhost:8080/openmrs/ws/rest/v1/person/cf52e661-7bbe-4260-8685-6ae7bc430e67/address/6eaa7b62-368e-4fdb-94c6-653adeaebbb7',
resourceAlias: 'address',
},
],
},
attributes: [],
voided: false,
birthtime: null,
deathdateEstimated: false,
links: [
{
rel: 'self',
uri: 'http://localhost:8080/openmrs/ws/rest/v1/person/cf52e661-7bbe-4260-8685-6ae7bc430e67',
resourceAlias: 'person',
},
{
rel: 'full',
uri: 'http://localhost:8080/openmrs/ws/rest/v1/person/cf52e661-7bbe-4260-8685-6ae7bc430e67?v=full',
resourceAlias: 'person',
},
],
resourceVersion: '1.11',
},
voided: false,
links: [
{
rel: 'self',
uri: 'http://localhost:8080/openmrs/ws/rest/v1/patient/cf52e661-7bbe-4260-8685-6ae7bc430e67',
resourceAlias: 'patient',
},
{
rel: 'full',
uri: 'http://localhost:8080/openmrs/ws/rest/v1/patient/cf52e661-7bbe-4260-8685-6ae7bc430e67?v=full',
resourceAlias: 'patient',
},
],
resourceVersion: '1.8',
},
currentLocation: {
uuid: '4d7e927d-6850-11ee-ab8d-0242ac120002',
display: 'MCCU',
name: 'MCCU',
description: 'MCCU',
address1: null,
address2: null,
cityVillage: null,
stateProvince: null,
country: null,
postalCode: null,
latitude: null,
longitude: null,
countyDistrict: null,
address3: null,
address4: null,
address5: null,
address6: null,
tags: [
{
uuid: 'd192602a-fa83-47b5-8831-a669c49aa22a',
display: 'Maternal Admission Location',
links: [
{
rel: 'self',
uri: 'http://localhost:8080/openmrs/ws/rest/v1/locationtag/d192602a-fa83-47b5-8831-a669c49aa22a',
resourceAlias: 'locationtag',
},
],
},
{
uuid: 'cc42791b-858e-11ee-b8b7-0242ac110002',
display: 'Appointment Location',
links: [
{
rel: 'self',
uri: 'http://localhost:8080/openmrs/ws/rest/v1/locationtag/cc42791b-858e-11ee-b8b7-0242ac110002',
resourceAlias: 'locationtag',
},
],
},
{
uuid: 'b8bbf83e-645f-451f-8efe-a0db56f09676',
display: 'Login Location',
links: [
{
rel: 'self',
uri: 'http://localhost:8080/openmrs/ws/rest/v1/locationtag/b8bbf83e-645f-451f-8efe-a0db56f09676',
resourceAlias: 'locationtag',
},
],
},
{
uuid: 'd9865139-dfb4-11e4-bccc-56847afe9799',
display: 'Vitals Location',
links: [
{
rel: 'self',
uri: 'http://localhost:8080/openmrs/ws/rest/v1/locationtag/d9865139-dfb4-11e4-bccc-56847afe9799',
resourceAlias: 'locationtag',
},
],
},
{
uuid: 'f5b9737b-14d5-402b-8475-dd558808e172',
display: 'Admission Location',
links: [
{
rel: 'self',
uri: 'http://localhost:8080/openmrs/ws/rest/v1/locationtag/f5b9737b-14d5-402b-8475-dd558808e172',
resourceAlias: 'locationtag',
},
],
},
],
parentLocation: {
uuid: '067c83ad-6850-11ee-ab8d-0242ac120002',
display: 'MCOE',
links: [
{
rel: 'self',
uri: 'http://localhost:8080/openmrs/ws/rest/v1/location/067c83ad-6850-11ee-ab8d-0242ac120002',
resourceAlias: 'location',
},
],
},
childLocations: [],
retired: false,
attributes: [],
address7: null,
address8: null,
address9: null,
address10: null,
address11: null,
address12: null,
address13: null,
address14: null,
address15: null,
links: [
{
rel: 'self',
uri: 'http://localhost:8080/openmrs/ws/rest/v1/location/4d7e927d-6850-11ee-ab8d-0242ac120002',
resourceAlias: 'location',
},
{
rel: 'full',
uri: 'http://localhost:8080/openmrs/ws/rest/v1/location/4d7e927d-6850-11ee-ab8d-0242ac120002?v=full',
resourceAlias: 'location',
},
],
resourceVersion: '2.0',
},
timeSinceAdmissionInMinutes: 15,
timeAtInpatientLocationInMinutes: 15,
},
];
20 changes: 0 additions & 20 deletions packages/esm-ward-app/src/beds/unassigned-patient.component.tsx

This file was deleted.

9 changes: 0 additions & 9 deletions packages/esm-ward-app/src/beds/unassigned-patient.scss

This file was deleted.

2 changes: 1 addition & 1 deletion packages/esm-ward-app/src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import type React from 'react';
export interface WardPatientCardProps {
patient: Patient;
visit: Visit;
bed?: Bed;
bed: Bed;
}

export type WardPatientCardRow = React.FC<WardPatientCardProps>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import styles from '../ward-patient-card.scss';

const WardPatientName: WardPatientCardElement = ({ patient }) => {
// TODO: BED-10
// TODO: this is a hack to support both the patient name rep returned by the bed endpoint (given and family) and the display used by the emr api; this should be fixed once the emr api endpoint is updated
const { givenName, familyName, display } = patient?.person?.preferredName || {};
const name = display ?? `${givenName} ${familyName}`;
// make server return patient.display and use that instead
const { givenName, familyName } = patient?.person?.preferredName;
const name = `${givenName} ${familyName}`;
return <div className={styles.wardPatientName}>{name}</div>;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const WardPatientCard: React.FC<WardPatientCardProps> = (props) => {
activeBedSelection?.patient.uuid === props.patient?.uuid,
})}
onClick={() => {
closeWorkspace('ward-patient-workspace');
wardStore.setState({ activeBedSelection: { ...props } });
launchWorkspace('ward-patient-workspace');
}}>
Expand Down
1 change: 1 addition & 0 deletions packages/esm-ward-app/src/ward-view/ward-bed.component.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { type Visit, type Patient } from '@openmrs/esm-framework';
import React from 'react';
import EmptyBed from '../beds/empty-bed.component';
import { type WardPatient, type Bed } from '../types';
Expand Down
Loading

0 comments on commit 086de7b

Please sign in to comment.