@openmrs/esm-ward-app 10.0.2 → 10.0.3-pre.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (363) hide show
  1. package/.turbo/turbo-build.log +4 -3
  2. package/dist/1070.js +1 -0
  3. package/dist/1070.js.map +1 -0
  4. package/dist/1480.js +1 -0
  5. package/dist/1480.js.map +1 -0
  6. package/dist/1646.js +1 -0
  7. package/dist/1646.js.map +1 -0
  8. package/dist/1664.js +1 -0
  9. package/dist/1664.js.map +1 -0
  10. package/dist/1780.js +1 -0
  11. package/dist/1780.js.map +1 -0
  12. package/dist/1789.js +1 -0
  13. package/dist/1789.js.map +1 -0
  14. package/dist/1869.js +1 -0
  15. package/dist/1869.js.map +1 -0
  16. package/dist/1877.js +1 -0
  17. package/dist/1877.js.map +1 -0
  18. package/dist/1978.js +1 -0
  19. package/dist/1978.js.map +1 -0
  20. package/dist/2101.js +1 -0
  21. package/dist/2101.js.map +1 -0
  22. package/dist/2317.js +1 -0
  23. package/dist/2317.js.map +1 -0
  24. package/dist/2416.js +1 -0
  25. package/dist/2416.js.map +1 -0
  26. package/dist/2495.js +1 -0
  27. package/dist/2495.js.map +1 -0
  28. package/dist/282.js +1 -0
  29. package/dist/282.js.map +1 -0
  30. package/dist/2881.js +1 -0
  31. package/dist/2881.js.map +1 -0
  32. package/dist/2898.js +1 -0
  33. package/dist/2898.js.map +1 -0
  34. package/dist/3378.js +1 -0
  35. package/dist/3378.js.map +1 -0
  36. package/dist/3514.js +38 -0
  37. package/dist/3514.js.map +1 -0
  38. package/dist/3720.js +1 -0
  39. package/dist/3720.js.map +1 -0
  40. package/dist/3852.js +1 -0
  41. package/dist/3852.js.map +1 -0
  42. package/dist/3963.js +1 -0
  43. package/dist/3963.js.map +1 -0
  44. package/dist/3989.js +1 -0
  45. package/dist/3989.js.map +1 -0
  46. package/dist/4106.js +1 -0
  47. package/dist/4106.js.map +1 -0
  48. package/dist/4111.js +1 -0
  49. package/dist/4111.js.map +1 -0
  50. package/dist/434.js +1 -0
  51. package/dist/434.js.map +1 -0
  52. package/dist/4348.js +1 -0
  53. package/dist/4348.js.map +1 -0
  54. package/dist/4383.js +1 -0
  55. package/dist/4383.js.map +1 -0
  56. package/dist/4658.js +1 -0
  57. package/dist/4658.js.map +1 -0
  58. package/dist/466.js +1 -0
  59. package/dist/466.js.map +1 -0
  60. package/dist/4928.js +1 -0
  61. package/dist/4928.js.map +1 -0
  62. package/dist/502.js +1 -0
  63. package/dist/502.js.map +1 -0
  64. package/dist/5117.js +1 -0
  65. package/dist/5117.js.map +1 -0
  66. package/dist/5132.js +1 -0
  67. package/dist/5132.js.map +1 -0
  68. package/dist/5145.js +1 -0
  69. package/dist/5145.js.map +1 -0
  70. package/dist/5503.js +1 -0
  71. package/dist/5503.js.map +1 -0
  72. package/dist/5509.js +1 -0
  73. package/dist/5509.js.map +1 -0
  74. package/dist/556.js +1 -0
  75. package/dist/556.js.map +1 -0
  76. package/dist/5576.js +1 -0
  77. package/dist/5576.js.map +1 -0
  78. package/dist/5644.js +1 -0
  79. package/dist/5644.js.map +1 -0
  80. package/dist/5709.js +1 -0
  81. package/dist/5709.js.map +1 -0
  82. package/dist/5773.js +1 -0
  83. package/dist/5773.js.map +1 -0
  84. package/dist/582.js +1 -0
  85. package/dist/582.js.map +1 -0
  86. package/dist/5940.js +1 -0
  87. package/dist/5940.js.map +1 -0
  88. package/dist/6047.js +1 -0
  89. package/dist/6047.js.map +1 -0
  90. package/dist/6174.js +1 -0
  91. package/dist/6174.js.map +1 -0
  92. package/dist/6270.js +1 -0
  93. package/dist/6270.js.map +1 -0
  94. package/dist/6371.js +1 -0
  95. package/dist/6371.js.map +1 -0
  96. package/dist/6377.js +1 -0
  97. package/dist/6377.js.map +1 -0
  98. package/dist/6418.js +1 -0
  99. package/dist/6418.js.map +1 -0
  100. package/dist/6444.js +1 -0
  101. package/dist/6444.js.map +1 -0
  102. package/dist/6508.js +1 -0
  103. package/dist/6508.js.map +1 -0
  104. package/dist/6673.js +11 -0
  105. package/dist/6673.js.map +1 -0
  106. package/dist/6703.js +1 -0
  107. package/dist/6703.js.map +1 -0
  108. package/dist/6724.js +1 -0
  109. package/dist/6724.js.map +1 -0
  110. package/dist/6802.js +1 -0
  111. package/dist/6802.js.map +1 -0
  112. package/dist/689.js +1 -0
  113. package/dist/689.js.map +1 -0
  114. package/dist/6904.js +1 -0
  115. package/dist/6904.js.map +1 -0
  116. package/dist/7045.js +1 -0
  117. package/dist/7045.js.map +1 -0
  118. package/dist/7175.js +1 -0
  119. package/dist/7175.js.map +1 -0
  120. package/dist/7182.js +1 -0
  121. package/dist/7182.js.map +1 -0
  122. package/dist/7249.js +1 -0
  123. package/dist/7249.js.map +1 -0
  124. package/dist/7330.js +1 -0
  125. package/dist/7330.js.map +1 -0
  126. package/dist/7742.js +1 -0
  127. package/dist/7742.js.map +1 -0
  128. package/dist/7912.js +1 -0
  129. package/dist/7912.js.map +1 -0
  130. package/dist/8063.js +1 -0
  131. package/dist/8063.js.map +1 -0
  132. package/dist/833.js +1 -0
  133. package/dist/833.js.map +1 -0
  134. package/dist/8340.js +1 -0
  135. package/dist/8340.js.map +1 -0
  136. package/dist/8358.js +1 -0
  137. package/dist/8358.js.map +1 -0
  138. package/dist/8359.js +1 -0
  139. package/dist/8359.js.map +1 -0
  140. package/dist/8417.js +1 -0
  141. package/dist/8417.js.map +1 -0
  142. package/dist/8424.js +1 -0
  143. package/dist/8424.js.map +1 -0
  144. package/dist/8493.js +1 -0
  145. package/dist/8493.js.map +1 -0
  146. package/dist/85.js +1 -0
  147. package/dist/85.js.map +1 -0
  148. package/dist/8695.js +1 -0
  149. package/dist/8695.js.map +1 -0
  150. package/dist/9011.js +1 -0
  151. package/dist/{6925.js.map → 9011.js.map} +1 -1
  152. package/dist/903.js +1 -0
  153. package/dist/903.js.map +1 -0
  154. package/dist/9061.js +1 -0
  155. package/dist/9061.js.map +1 -0
  156. package/dist/9072.js +1 -0
  157. package/dist/9072.js.map +1 -0
  158. package/dist/9080.js +1 -0
  159. package/dist/9080.js.map +1 -0
  160. package/dist/9427.js +1 -0
  161. package/dist/9427.js.map +1 -0
  162. package/dist/9712.js +1 -0
  163. package/dist/9712.js.map +1 -0
  164. package/dist/9771.js +1 -0
  165. package/dist/9771.js.map +1 -0
  166. package/dist/9806.js +1 -0
  167. package/dist/9806.js.map +1 -0
  168. package/dist/9983.js +1 -0
  169. package/dist/9983.js.map +1 -0
  170. package/dist/main.js +6 -5
  171. package/dist/main.js.map +1 -1
  172. package/dist/openmrs-esm-ward-app.js +6 -5
  173. package/dist/openmrs-esm-ward-app.js.buildmanifest.json +669 -585
  174. package/dist/openmrs-esm-ward-app.js.map +1 -1
  175. package/dist/routes.json +1 -1
  176. package/package.json +3 -2
  177. package/src/action-menu-buttons/order-basket-action-button.component.tsx +3 -2
  178. package/src/beds/empty-bed.component.tsx +1 -1
  179. package/src/beds/ward-bed.component.tsx +6 -2
  180. package/src/ward-patient-card/card-rows/mother-child-row.component.tsx +3 -39
  181. package/src/ward-patient-card/row-elements/ward-mother-or-child.component.tsx +50 -0
  182. package/src/ward-view/maternal-ward/maternal-ward-pending-patients.component.tsx +14 -6
  183. package/src/ward-view/maternal-ward/maternal-ward-view.resource.ts +2 -2
  184. package/src/ward-workspace/admission-request-card/admission-request-card-actions.component.tsx +14 -5
  185. package/src/ward-workspace/admission-request-card/maternal-admission-request-card.component.tsx +136 -0
  186. package/src/ward-workspace/admission-request-card/maternal-admission-request-card.resource.ts +11 -0
  187. package/src/ward-workspace/admit-patient-button.component.tsx +44 -26
  188. package/src/ward-workspace/admit-patient-form-workspace/admit-patient-form.test.tsx +19 -4
  189. package/src/ward-workspace/admit-patient-form-workspace/admit-patient-form.workspace.tsx +74 -69
  190. package/src/ward-workspace/cancel-admission-request-workspace/cancel-admission-request.component.tsx +41 -17
  191. package/src/ward-workspace/cancel-admission-request-workspace/cancel-admission-request.workspace.tsx +8 -2
  192. package/src/ward-workspace/create-admission-encounter/create-admission-encounter.workspace.tsx +9 -5
  193. package/src/ward-workspace/patient-transfer-bed-swap/patient-admit-or-transfer-request-form.component.tsx +29 -14
  194. package/src/ward-workspace/patient-transfer-request-workspace/patient-transfer-request.workspace.tsx +6 -1
  195. package/src/ward.resource.ts +4 -0
  196. package/translations/am.json +13 -12
  197. package/translations/ar.json +13 -12
  198. package/translations/ar_SY.json +13 -12
  199. package/translations/bn.json +13 -12
  200. package/translations/cs.json +13 -12
  201. package/translations/de.json +137 -136
  202. package/translations/en.json +13 -12
  203. package/translations/en_US.json +13 -12
  204. package/translations/es.json +13 -12
  205. package/translations/es_MX.json +13 -12
  206. package/translations/fr.json +13 -12
  207. package/translations/he.json +13 -12
  208. package/translations/hi.json +13 -12
  209. package/translations/hi_IN.json +13 -12
  210. package/translations/id.json +13 -12
  211. package/translations/it.json +13 -12
  212. package/translations/ka.json +13 -12
  213. package/translations/km.json +13 -12
  214. package/translations/ku.json +13 -12
  215. package/translations/ky.json +13 -12
  216. package/translations/lg.json +13 -12
  217. package/translations/ne.json +13 -12
  218. package/translations/pl.json +13 -12
  219. package/translations/pt.json +13 -12
  220. package/translations/pt_BR.json +13 -12
  221. package/translations/qu.json +13 -12
  222. package/translations/ro_RO.json +13 -12
  223. package/translations/ru_RU.json +13 -12
  224. package/translations/si.json +13 -12
  225. package/translations/sq.json +13 -12
  226. package/translations/sw.json +13 -12
  227. package/translations/sw_KE.json +13 -12
  228. package/translations/tr.json +13 -12
  229. package/translations/tr_TR.json +13 -12
  230. package/translations/uk.json +13 -12
  231. package/translations/uz.json +13 -12
  232. package/translations/uz@Latn.json +13 -12
  233. package/translations/uz_UZ.json +13 -12
  234. package/translations/vi.json +13 -12
  235. package/translations/zh.json +142 -141
  236. package/translations/zh_CN.json +93 -92
  237. package/translations/zh_TW.json +13 -12
  238. package/dist/1011.js +0 -1
  239. package/dist/1011.js.map +0 -1
  240. package/dist/126.js +0 -1
  241. package/dist/1307.js +0 -1
  242. package/dist/1307.js.map +0 -1
  243. package/dist/1369.js +0 -1
  244. package/dist/1369.js.map +0 -1
  245. package/dist/15.js +0 -1
  246. package/dist/1554.js +0 -1
  247. package/dist/1554.js.map +0 -1
  248. package/dist/1564.js +0 -1
  249. package/dist/1567.js +0 -1
  250. package/dist/1739.js +0 -1
  251. package/dist/1739.js.map +0 -1
  252. package/dist/1845.js +0 -1
  253. package/dist/1895.js +0 -1
  254. package/dist/1895.js.map +0 -1
  255. package/dist/1953.js +0 -1
  256. package/dist/2016.js +0 -1
  257. package/dist/2016.js.map +0 -1
  258. package/dist/2117.js +0 -1
  259. package/dist/2117.js.map +0 -1
  260. package/dist/215.js +0 -1
  261. package/dist/2178.js +0 -1
  262. package/dist/2191.js +0 -1
  263. package/dist/2191.js.map +0 -1
  264. package/dist/239.js +0 -1
  265. package/dist/239.js.map +0 -1
  266. package/dist/2459.js +0 -1
  267. package/dist/2459.js.map +0 -1
  268. package/dist/2566.js +0 -1
  269. package/dist/2586.js +0 -1
  270. package/dist/2586.js.map +0 -1
  271. package/dist/2640.js +0 -1
  272. package/dist/2640.js.map +0 -1
  273. package/dist/2759.js +0 -1
  274. package/dist/3089.js +0 -1
  275. package/dist/3089.js.map +0 -1
  276. package/dist/3230.js +0 -1
  277. package/dist/3441.js +0 -1
  278. package/dist/3565.js +0 -1
  279. package/dist/3571.js +0 -1
  280. package/dist/3571.js.map +0 -1
  281. package/dist/3624.js +0 -1
  282. package/dist/3624.js.map +0 -1
  283. package/dist/3746.js +0 -1
  284. package/dist/3925.js +0 -1
  285. package/dist/3946.js +0 -1
  286. package/dist/3948.js +0 -11
  287. package/dist/3948.js.map +0 -1
  288. package/dist/4285.js +0 -1
  289. package/dist/4285.js.map +0 -1
  290. package/dist/4373.js +0 -1
  291. package/dist/4373.js.map +0 -1
  292. package/dist/4425.js +0 -1
  293. package/dist/4425.js.map +0 -1
  294. package/dist/4675.js +0 -1
  295. package/dist/4675.js.map +0 -1
  296. package/dist/4744.js +0 -1
  297. package/dist/4744.js.map +0 -1
  298. package/dist/4809.js +0 -1
  299. package/dist/4894.js +0 -1
  300. package/dist/4970.js +0 -1
  301. package/dist/4970.js.map +0 -1
  302. package/dist/5130.js +0 -1
  303. package/dist/5187.js +0 -1
  304. package/dist/5490.js +0 -1
  305. package/dist/5490.js.map +0 -1
  306. package/dist/5491.js +0 -1
  307. package/dist/5491.js.map +0 -1
  308. package/dist/5595.js +0 -1
  309. package/dist/5659.js +0 -1
  310. package/dist/5659.js.map +0 -1
  311. package/dist/5961.js +0 -1
  312. package/dist/6026.js +0 -1
  313. package/dist/6026.js.map +0 -1
  314. package/dist/6133.js +0 -1
  315. package/dist/6199.js +0 -1
  316. package/dist/6199.js.map +0 -1
  317. package/dist/6285.js +0 -1
  318. package/dist/6285.js.map +0 -1
  319. package/dist/6296.js +0 -1
  320. package/dist/6296.js.map +0 -1
  321. package/dist/634.js +0 -1
  322. package/dist/634.js.map +0 -1
  323. package/dist/6455.js +0 -1
  324. package/dist/6455.js.map +0 -1
  325. package/dist/6456.js +0 -1
  326. package/dist/6466.js +0 -1
  327. package/dist/6515.js +0 -1
  328. package/dist/6515.js.map +0 -1
  329. package/dist/6613.js +0 -1
  330. package/dist/6783.js +0 -1
  331. package/dist/6925.js +0 -1
  332. package/dist/7073.js +0 -1
  333. package/dist/7073.js.map +0 -1
  334. package/dist/7348.js +0 -1
  335. package/dist/74.js +0 -1
  336. package/dist/74.js.map +0 -1
  337. package/dist/7543.js +0 -1
  338. package/dist/7607.js +0 -1
  339. package/dist/772.js +0 -1
  340. package/dist/8599.js +0 -1
  341. package/dist/8727.js +0 -1
  342. package/dist/8847.js +0 -1
  343. package/dist/892.js +0 -38
  344. package/dist/892.js.map +0 -1
  345. package/dist/9015.js +0 -1
  346. package/dist/906.js +0 -1
  347. package/dist/9065.js +0 -1
  348. package/dist/9071.js +0 -1
  349. package/dist/9071.js.map +0 -1
  350. package/dist/9182.js +0 -1
  351. package/dist/9314.js +0 -1
  352. package/dist/9314.js.map +0 -1
  353. package/dist/9339.js +0 -1
  354. package/dist/9453.js +0 -1
  355. package/dist/9668.js +0 -1
  356. package/dist/9668.js.map +0 -1
  357. package/dist/9727.js +0 -1
  358. package/dist/9727.js.map +0 -1
  359. package/dist/9833.js +0 -1
  360. package/dist/9833.js.map +0 -1
  361. package/dist/9920.js +0 -1
  362. package/dist/9938.js +0 -1
  363. /package/src/ward-patient-card/{card-rows/mother-child-row.scss → row-elements/ward-mother-or-child.scss} +0 -0
@@ -12,8 +12,12 @@ import {
12
12
  type Workspace2DefinitionProps,
13
13
  } from '@openmrs/esm-framework';
14
14
  import type { WardPatientWorkspaceProps, WardViewContext } from '../../types';
15
- import { useAssignedBedByPatient } from '../../hooks/useAssignedBedByPatient';
16
- import { assignPatientToBed, removePatientFromBed, useAdmitPatient } from '../../ward.resource';
15
+ import {
16
+ assignPatientToBed,
17
+ getAssignedBedByPatient,
18
+ removePatientFromBed,
19
+ useAdmitPatient,
20
+ } from '../../ward.resource';
17
21
  import useWardLocation from '../../hooks/useWardLocation';
18
22
  import BedSelector from '../bed-selector.component';
19
23
  import WardPatientWorkspaceBanner from '../patient-banner/patient-banner.component';
@@ -26,7 +30,7 @@ import styles from './admit-patient-form.scss';
26
30
  * a bed to assign to patient
27
31
  */
28
32
  const AdmitPatientFormWorkspace: React.FC<Workspace2DefinitionProps<WardPatientWorkspaceProps, {}, {}>> = ({
29
- workspaceProps: { wardPatient },
33
+ workspaceProps: { wardPatient, relatedTransferPatients },
30
34
  closeWorkspace,
31
35
  }) => {
32
36
  const { patient, inpatientRequest, visit } = wardPatient ?? {};
@@ -40,9 +44,6 @@ const AdmitPatientFormWorkspace: React.FC<Workspace2DefinitionProps<WardPatientW
40
44
  const { wardPatientGroupDetails } = useAppContext<WardViewContext>('ward-view-context') ?? {};
41
45
  const { isLoading } = wardPatientGroupDetails?.admissionLocationResponse ?? {};
42
46
 
43
- const { data: bedsAssignedToPatient, isLoading: isLoadingBedsAssignedToPatient } = useAssignedBedByPatient(
44
- patient.uuid,
45
- );
46
47
  const beds = isLoading ? [] : (wardPatientGroupDetails?.bedLayouts ?? []);
47
48
 
48
49
  const zodSchema = useMemo(
@@ -67,69 +68,76 @@ const AdmitPatientFormWorkspace: React.FC<Workspace2DefinitionProps<WardPatientW
67
68
  setShowErrorNotifications(false);
68
69
  setIsSubmitting(true);
69
70
  const bedSelected = beds.find((bed) => bed.bedId === values.bedId);
70
- admitPatient(patient, dispositionType, visit.uuid)
71
- .then(
72
- async (response) => {
73
- if (response.ok) {
74
- if (bedSelected) {
75
- return assignPatientToBed(values.bedId, patient.uuid, response.data.uuid);
76
- } else {
77
- const assignedBedId = bedsAssignedToPatient?.data?.results?.[0]?.bedId;
78
- if (assignedBedId) {
79
- return removePatientFromBed(assignedBedId, patient.uuid);
80
- }
81
- return response;
71
+ const allPatientsToAdmit = [wardPatient, ...(relatedTransferPatients ?? [])];
72
+
73
+ return Promise.allSettled(
74
+ allPatientsToAdmit.map((wp) =>
75
+ admitPatient(wp.patient, wp.inpatientRequest?.dispositionType ?? dispositionType, wp.visit.uuid),
76
+ ),
77
+ )
78
+ .then(async (admitResults) => {
79
+ await Promise.allSettled(
80
+ admitResults.map(async (result, i) => {
81
+ const wp = allPatientsToAdmit[i];
82
+ const patientName = wp.patient.person.preferredName.display;
83
+
84
+ if (result.status === 'rejected') {
85
+ showSnackbar({
86
+ kind: 'error',
87
+ title: t('errorAdmittingPatient', 'Failed to admit {{patientName}}', { patientName }),
88
+ subtitle: (result.reason as Error)?.message,
89
+ });
90
+ return;
82
91
  }
83
- }
84
- },
85
- (err: Error) => {
86
- showSnackbar({
87
- kind: 'error',
88
- title: t('errorCreatingEncounter', 'Failed to admit patient'),
89
- subtitle: err.message,
90
- });
91
- },
92
- )
93
- .then(
94
- (response) => {
95
- if (response && response?.ok) {
96
- if (bedSelected) {
92
+
93
+ try {
94
+ if (bedSelected) {
95
+ // assign patient, and related transfer patients to the same bed.
96
+ // (Support for related patients is only implemented for maternal ward)
97
+ await assignPatientToBed(values.bedId, wp.patient.uuid, result.value.data.uuid);
98
+ showSnackbar({
99
+ kind: 'success',
100
+ title: t('patientAdmittedSuccessfully', 'Patient admitted successfully'),
101
+ subtitle: t(
102
+ 'patientAdmittedSuccessfullySubtitle',
103
+ '{{patientName}} has been successfully admitted and assigned to bed {{bedNumber}}',
104
+ { patientName, bedNumber: bedSelected.bedNumber },
105
+ ),
106
+ });
107
+ } else {
108
+ const bedResponse = await getAssignedBedByPatient(wp.patient.uuid);
109
+ const assignedBedId = bedResponse.data?.results?.[0]?.bedId;
110
+ if (assignedBedId) {
111
+ await removePatientFromBed(assignedBedId, wp.patient.uuid);
112
+ }
113
+ showSnackbar({
114
+ kind: 'success',
115
+ title: t('patientAdmittedSuccessfully', 'Patient admitted successfully'),
116
+ subtitle: t('patientAdmittedWoBed', '{{patientName}} admitted successfully to {{location}}', {
117
+ patientName,
118
+ location: location?.display,
119
+ }),
120
+ });
121
+ }
122
+ } catch {
97
123
  showSnackbar({
98
- kind: 'success',
124
+ kind: 'warning',
99
125
  title: t('patientAdmittedSuccessfully', 'Patient admitted successfully'),
100
126
  subtitle: t(
101
- 'patientAdmittedSuccessfullySubtitle',
102
- '{{patientName}} has been successfully admitted and assigned to bed {{bedNumber}}',
103
- {
104
- patientName: patient.person.preferredName.display,
105
- bedNumber: bedSelected.bedNumber,
106
- },
127
+ 'patientAdmittedButBedNotAssigned',
128
+ '{{patientName}} admitted successfully but failed to assign bed',
129
+ { patientName },
107
130
  ),
108
131
  });
109
- } else {
110
- showSnackbar({
111
- kind: 'success',
112
- title: t('patientAdmittedSuccessfully', 'Patient admitted successfully'),
113
- subtitle: t('patientAdmittedWoBed', 'Patient admitted successfully to {{location}}', {
114
- location: location?.display,
115
- }),
116
- });
117
132
  }
118
- closeWorkspace({ discardUnsavedChanges: true });
119
- closeWorkspaceGroup2();
120
- }
121
- },
122
- () => {
123
- showSnackbar({
124
- kind: 'warning',
125
- title: t('patientAdmittedSuccessfully', 'Patient admitted successfully'),
126
- subtitle: t(
127
- 'patientAdmittedButBedNotAssigned',
128
- 'Patient admitted successfully but fail to assign bed to patient',
129
- ),
130
- });
131
- },
132
- )
133
+ }),
134
+ );
135
+
136
+ if (admitResults.some((r) => r.status === 'fulfilled')) {
137
+ closeWorkspace({ discardUnsavedChanges: true });
138
+ closeWorkspaceGroup2();
139
+ }
140
+ })
133
141
  .finally(async () => {
134
142
  await wardPatientGroupDetails?.mutate?.();
135
143
  setIsSubmitting(false);
@@ -149,6 +157,9 @@ const AdmitPatientFormWorkspace: React.FC<Workspace2DefinitionProps<WardPatientW
149
157
  <Workspace2 title={t('admitPatient', 'Admit patient')} hasUnsavedChanges={isDirty}>
150
158
  <div className={styles.flexWrapper}>
151
159
  <WardPatientWorkspaceBanner {...{ wardPatient }} />
160
+ {relatedTransferPatients?.map((rp) => (
161
+ <WardPatientWorkspaceBanner key={rp.patient.uuid} wardPatient={rp} />
162
+ ))}
152
163
  <Form className={styles.form} onSubmit={handleSubmit(onSubmit, onError)}>
153
164
  <div className={styles.formContent}>
154
165
  <Row>
@@ -195,13 +206,7 @@ const AdmitPatientFormWorkspace: React.FC<Workspace2DefinitionProps<WardPatientW
195
206
  <Button
196
207
  type="submit"
197
208
  size="xl"
198
- disabled={
199
- isSubmitting ||
200
- isLoadingEmrConfiguration ||
201
- errorFetchingEmrConfiguration ||
202
- isLoading ||
203
- isLoadingBedsAssignedToPatient
204
- }>
209
+ disabled={isSubmitting || isLoadingEmrConfiguration || errorFetchingEmrConfiguration || isLoading}>
205
210
  {!isSubmitting ? t('admit', 'Admit') : t('admitting', 'Admitting...')}
206
211
  </Button>
207
212
  </ButtonSet>
@@ -21,10 +21,15 @@ import styles from './cancel-admission-request.scss';
21
21
 
22
22
  interface CancelAdmissionRequestProps {
23
23
  wardPatient: WardPatient;
24
+ relatedTransferPatients?: WardPatient[];
24
25
  closeWorkspace: Workspace2DefinitionProps['closeWorkspace'];
25
26
  }
26
27
 
27
- const CancelAdmissionRequest: React.FC<CancelAdmissionRequestProps> = ({ closeWorkspace, wardPatient }) => {
28
+ const CancelAdmissionRequest: React.FC<CancelAdmissionRequestProps> = ({
29
+ closeWorkspace,
30
+ wardPatient,
31
+ relatedTransferPatients,
32
+ }) => {
28
33
  const { patient, visit } = wardPatient ?? {};
29
34
  const { t } = useTranslation();
30
35
  const [isSubmitting, setIsSubmitting] = useState(false);
@@ -75,21 +80,37 @@ const CancelAdmissionRequest: React.FC<CancelAdmissionRequestProps> = ({ closeWo
75
80
  },
76
81
  ];
77
82
 
78
- createEncounter(patient, emrConfiguration?.cancelADTRequestEncounterType, visit?.uuid, obs)
79
- .then(() => {
80
- showSnackbar({
81
- title: t('admissionRequestCancelled', 'Admission request cancelled.'),
82
- kind: 'success',
83
- });
84
- closeWorkspace({ discardUnsavedChanges: true });
85
- closeWorkspaceGroup2();
86
- })
87
- .catch((err: Error) => {
88
- showSnackbar({
89
- title: t('errorCancellingAdmissionRequest', 'Error cancelling admission request'),
90
- subtitle: err.message,
91
- kind: 'error',
83
+ const allPatientsToCancel = [wardPatient, ...(relatedTransferPatients ?? [])];
84
+ Promise.allSettled(
85
+ allPatientsToCancel.map(({ patient: p, visit: v }) =>
86
+ createEncounter(p, emrConfiguration?.cancelADTRequestEncounterType, v?.uuid, obs),
87
+ ),
88
+ )
89
+ .then((results) => {
90
+ results.forEach((result, i) => {
91
+ const patientName = allPatientsToCancel[i].patient.person.preferredName.display;
92
+ if (result.status === 'fulfilled') {
93
+ showSnackbar({
94
+ title: t('admissionRequestCancelledForPatient', 'Admission request cancelled for {{patientName}}', {
95
+ patientName,
96
+ }),
97
+ kind: 'success',
98
+ });
99
+ } else {
100
+ showSnackbar({
101
+ title: t('errorCancellingAdmissionRequest', 'Error cancelling admission request for {{patientName}}', {
102
+ patientName,
103
+ }),
104
+ subtitle: (result.reason as Error)?.message,
105
+ kind: 'error',
106
+ });
107
+ }
92
108
  });
109
+
110
+ if (results.some((r) => r.status === 'fulfilled')) {
111
+ closeWorkspace({ discardUnsavedChanges: true });
112
+ closeWorkspaceGroup2();
113
+ }
93
114
  })
94
115
  .finally(() => {
95
116
  setIsSubmitting(false);
@@ -102,10 +123,10 @@ const CancelAdmissionRequest: React.FC<CancelAdmissionRequestProps> = ({ closeWo
102
123
  emrConfiguration?.denyAdmissionConcept?.uuid,
103
124
  emrConfiguration?.cancelADTRequestEncounterType,
104
125
  createEncounter,
105
- patient,
126
+ wardPatient,
127
+ relatedTransferPatients,
106
128
  t,
107
129
  wardPatientGroupDetails,
108
- visit?.uuid,
109
130
  closeWorkspace,
110
131
  ],
111
132
  );
@@ -120,6 +141,9 @@ const CancelAdmissionRequest: React.FC<CancelAdmissionRequestProps> = ({ closeWo
120
141
  <Workspace2 title={t('cancelAdmissionRequest', 'Cancel admission request')} hasUnsavedChanges={isDirty}>
121
142
  <div className={styles.flexWrapper}>
122
143
  <WardPatientWorkspaceBanner wardPatient={wardPatient} />
144
+ {relatedTransferPatients?.map((rp) => (
145
+ <WardPatientWorkspaceBanner key={rp.patient.uuid} wardPatient={rp} />
146
+ ))}
123
147
  <Form
124
148
  onSubmit={handleSubmit(onSubmit, onError)}
125
149
  className={classNames(styles.formContainer, styles.workspaceContent)}>
@@ -9,9 +9,15 @@ import { type Workspace2DefinitionProps } from '@openmrs/esm-framework/src';
9
9
  */
10
10
  const CancelAdmissionRequestWorkspace: React.FC<Workspace2DefinitionProps<WardPatientWorkspaceProps, {}, {}>> = ({
11
11
  closeWorkspace,
12
- workspaceProps: { wardPatient },
12
+ workspaceProps: { wardPatient, relatedTransferPatients },
13
13
  }) => {
14
- return <CancelAdmissionRequest closeWorkspace={closeWorkspace} wardPatient={wardPatient} />;
14
+ return (
15
+ <CancelAdmissionRequest
16
+ closeWorkspace={closeWorkspace}
17
+ wardPatient={wardPatient}
18
+ relatedTransferPatients={relatedTransferPatients}
19
+ />
20
+ );
15
21
  };
16
22
 
17
23
  export default CancelAdmissionRequestWorkspace;
@@ -66,7 +66,7 @@ const CreateAdmissionEncounterWorkspace: React.FC<
66
66
  content = <SkeletonText />;
67
67
  } else if (hasError) {
68
68
  content = (
69
- <div>
69
+ <>
70
70
  <InlineNotification
71
71
  kind="error"
72
72
  lowContrast={true}
@@ -80,7 +80,7 @@ const CreateAdmissionEncounterWorkspace: React.FC<
80
80
  onClick={() => closeWorkspace()}>
81
81
  <span>{t('backToSearchResults', 'Back to search results')}</span>
82
82
  </Button>
83
- </div>
83
+ </>
84
84
  );
85
85
  } else {
86
86
  const assignedBedDetail = bedData.data.results[0];
@@ -102,7 +102,7 @@ const CreateAdmissionEncounterWorkspace: React.FC<
102
102
  inpatientRequest: null,
103
103
  };
104
104
  content = (
105
- <div>
105
+ <>
106
106
  <WardPatientWorkspaceBanner wardPatient={wardPatient} />
107
107
  {activeVisit ? (
108
108
  <div>
@@ -162,11 +162,15 @@ const CreateAdmissionEncounterWorkspace: React.FC<
162
162
  onClick={() => closeWorkspace()}>
163
163
  <span>{t('backToSearchResults', 'Back to search results')}</span>
164
164
  </Button>
165
- </div>
165
+ </>
166
166
  );
167
167
  }
168
168
 
169
- return <Workspace2 title={t('admitPatient', 'Admit patient')}>{content}</Workspace2>;
169
+ return (
170
+ <Workspace2 title={t('admitPatient', 'Admit patient')}>
171
+ <div id="create-admission-encounter-workspace">{content}</div>
172
+ </Workspace2>
173
+ );
170
174
  };
171
175
 
172
176
  export default CreateAdmissionEncounterWorkspace;
@@ -35,6 +35,7 @@ export interface PatientAdmitOrTransferFormProps {
35
35
 
36
36
  onSuccess(): void;
37
37
  onCancel(): void;
38
+ preSelectRelatedPatients?: boolean;
38
39
  }
39
40
 
40
41
  /**
@@ -48,6 +49,7 @@ export default function PatientAdmitOrTransferForm({
48
49
  relatedTransferPatients = [],
49
50
  onSuccess,
50
51
  onCancel,
52
+ preSelectRelatedPatients,
51
53
  }: PatientAdmitOrTransferFormProps) {
52
54
  const { t } = useTranslation();
53
55
  const { patient, inpatientRequest, visit } = wardPatient ?? {};
@@ -61,7 +63,9 @@ export default function PatientAdmitOrTransferForm({
61
63
  );
62
64
  const { wardPatientGroupDetails } = useAppContext<WardViewContext>('ward-view-context') ?? {};
63
65
  const currentAdmission = wardPatientGroupDetails?.inpatientAdmissionsByPatientUuid?.get(patient?.uuid);
64
- const [selectedRelatedPatient, setCheckedRelatedPatient] = useState<string[]>([]);
66
+ const [selectedRelatedPatient, setCheckedRelatedPatient] = useState<string[]>(() =>
67
+ preSelectRelatedPatients ? relatedTransferPatients.map((rp) => rp.patient.uuid) : [],
68
+ );
65
69
 
66
70
  const zodSchema = useMemo(
67
71
  () =>
@@ -130,7 +134,7 @@ export default function PatientAdmitOrTransferForm({
130
134
  ...relatedTransferPatients.filter((rp) => selectedRelatedPatient.includes(rp.patient.uuid)),
131
135
  ];
132
136
 
133
- Promise.all(
137
+ Promise.allSettled(
134
138
  wardPatientsToTransfer.map(async (wardPatientToTransfer) => {
135
139
  const { patient: patientToTransfer, visit: patientToTransferVisit } = wardPatientToTransfer;
136
140
 
@@ -147,19 +151,30 @@ export default function PatientAdmitOrTransferForm({
147
151
  );
148
152
  }),
149
153
  )
150
- .then(() => {
151
- showSnackbar({
152
- title: t('patientTransferRequestCreated', 'Patient transfer request created'),
153
- kind: 'success',
154
- });
155
- onSuccess();
156
- })
157
- .catch((err: Error) => {
158
- showSnackbar({
159
- title: t('errorCreatingTransferRequest', 'Error creating transfer request'),
160
- subtitle: err.message,
161
- kind: 'error',
154
+ .then((results) => {
155
+ results.forEach((result, i) => {
156
+ const patientName = wardPatientsToTransfer[i].patient.person.preferredName.display;
157
+ if (result.status === 'fulfilled') {
158
+ showSnackbar({
159
+ title: t('patientTransferRequestCreatedForPatient', 'Transfer request created for {{patientName}}', {
160
+ patientName,
161
+ }),
162
+ kind: 'success',
163
+ });
164
+ } else {
165
+ showSnackbar({
166
+ title: t('errorCreatingTransferRequest', 'Error creating transfer request for {{patientName}}', {
167
+ patientName,
168
+ }),
169
+ subtitle: (result.reason as Error)?.message,
170
+ kind: 'error',
171
+ });
172
+ }
162
173
  });
174
+
175
+ if (results.some((r) => r.status === 'fulfilled')) {
176
+ onSuccess();
177
+ }
163
178
  })
164
179
  .finally(() => {
165
180
  setIsSubmitting(false);
@@ -11,7 +11,7 @@ import styles from './patient-transfer-request.scss';
11
11
  * button on a pending request patient card is clicked on
12
12
  */
13
13
  const PatientTransferRequestWorkspace: React.FC<Workspace2DefinitionProps<WardPatientWorkspaceProps, {}, {}>> = ({
14
- workspaceProps: { wardPatient },
14
+ workspaceProps: { wardPatient, relatedTransferPatients },
15
15
  closeWorkspace,
16
16
  }) => {
17
17
  const { t } = useTranslation();
@@ -22,13 +22,18 @@ const PatientTransferRequestWorkspace: React.FC<Workspace2DefinitionProps<WardPa
22
22
  title={isTransfer ? t('transferElsewhere', 'Transfer elsewhere') : t('admitElsewhere', 'Admit elsewhere')}>
23
23
  <div className={styles.patientTransferRequestWorkspace}>
24
24
  <WardPatientWorkspaceBanner {...{ wardPatient }} />
25
+ {relatedTransferPatients?.map((rp) => (
26
+ <WardPatientWorkspaceBanner key={rp.patient.uuid} wardPatient={rp} />
27
+ ))}
25
28
  <PatientAdmitOrTransferForm
26
29
  wardPatient={wardPatient}
30
+ relatedTransferPatients={relatedTransferPatients}
27
31
  onSuccess={async () => {
28
32
  await closeWorkspace({ discardUnsavedChanges: true });
29
33
  closeWorkspaceGroup2();
30
34
  }}
31
35
  onCancel={() => closeWorkspace()}
36
+ preSelectRelatedPatients
32
37
  />
33
38
  </div>
34
39
  </Workspace2>
@@ -81,3 +81,7 @@ export function removePatientFromBed(bedId: number, patientUuid: string) {
81
81
  method: 'DELETE',
82
82
  });
83
83
  }
84
+
85
+ export function getAssignedBedByPatient(patientUuid: string) {
86
+ return openmrsFetch<{ results: Array<{ bedId: number }> }>(`${restBaseUrl}/beds?patientUuid=${patientUuid}`);
87
+ }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "addPatientToWard": "Add patient to ward",
3
- "admissionRequestCancelled": "Admission request cancelled.",
3
+ "admissionRequestCancelledForPatient": "Admission request cancelled for {{patientName}}",
4
4
  "admissionRequests": "Admission requests",
5
5
  "admissionRequestsCount_one": "{{count}} admission request",
6
6
  "admissionRequestsCount_other": "{{count}} admission requests",
@@ -10,8 +10,10 @@
10
10
  "admitPatient": "Admit patient",
11
11
  "admittedTo": "Admitted to {{locationName}}",
12
12
  "admitting": "Admitting...",
13
+ "alsoAdmitOrCancel": "Also admit / cancel:",
13
14
  "alsoSwap": "Also swap:",
14
15
  "alsoTransfer": "Also transfer:",
16
+ "alsoTransferOrCancel": "Also transfer / cancel:",
15
17
  "backToSearchResults": "Back to search results",
16
18
  "bedShare": "Bed share",
17
19
  "bedSwap": "Bed swap",
@@ -25,19 +27,19 @@
25
27
  "countItems_other": "{{count}} {{item}}",
26
28
  "days_one": "{{count}} day",
27
29
  "days_other": "{{count}} days",
28
- "deleteNote": "Delete Note",
30
+ "deleteNote": "Delete note",
29
31
  "deleteNoteConfirmationText": "Are you sure you want to delete this note? This action can't be undone.",
30
32
  "discharge": "Discharge",
31
33
  "editNote": "Edit note",
32
34
  "emptyBed": "Empty bed",
33
35
  "emptyText": "Empty",
34
36
  "encounterDisplay": "{{encounterType}} {{encounterDate}}",
35
- "errorCancellingAdmissionRequest": "Error cancelling admission request",
37
+ "errorAdmittingPatient": "Failed to admit {{patientName}}",
38
+ "errorCancellingAdmissionRequest": "Error cancelling admission request for {{patientName}}",
36
39
  "errorChangingPatientBedAssignment": "Error changing patient bed assignment",
37
40
  "errorConfiguringPatientCard": "Error configuring patient card",
38
41
  "errorConfiguringPatientCardMessage": "Unable to find configuration for {{elementType}}, id: {{id}}",
39
- "errorCreatingEncounter": "Failed to admit patient",
40
- "errorCreatingTransferRequest": "Error creating transfer request",
42
+ "errorCreatingTransferRequest": "Error creating transfer request for {{patientName}}",
41
43
  "errorDeletingNote": "Error deleting note",
42
44
  "errorDischargingPatient": "Error discharging patient",
43
45
  "errorLoadingBedDetails": "Error loading bed details",
@@ -48,8 +50,7 @@
48
50
  "errorLoadingPatients": "Error loading admitted patients",
49
51
  "errorLoadingWardLocation": "Error loading ward location",
50
52
  "errorSavingPatientNote": "Error saving patient note",
51
- "errorTransferringPatient": "Failed to transfer patient",
52
- "errrorAdmitingPatient": "Failed to admit patient",
53
+ "errorTransferringPatient": "Failed to transfer {{patientName}}",
53
54
  "female": "Female",
54
55
  "fetchingEmrConfigurationFailed": "Fetching EMR configuration failed. Try refreshing the page or contact your system administrator.",
55
56
  "fetchingPatientNotesFailed": "Fetching patient notes failed. Try refreshing the page or contact your system administrator.",
@@ -83,11 +84,11 @@
83
84
  "Orders": "Orders",
84
85
  "other": "Other",
85
86
  "patient": "Patient",
86
- "patientAdmittedButBedNotAssigned": "Patient admitted successfully but fail to assign bed to patient",
87
+ "patientAdmittedButBedNotAssigned": "{{patientName}} admitted successfully but failed to assign bed",
87
88
  "patientAdmittedSuccessfully": "Patient admitted successfully",
88
89
  "patientAdmittedSuccessfullySubtitle": "{{patientName}} has been successfully admitted and assigned to bed {{bedNumber}}",
89
- "patientAdmittedToLocation": "Patient admitted successfully to {{location}}",
90
- "patientAdmittedWoBed": "Patient admitted successfully to {{location}}",
90
+ "patientAdmittedToLocation": "{{patientName}} admitted successfully to {{location}}",
91
+ "patientAdmittedWoBed": "{{patientName}} admitted successfully to {{location}}",
91
92
  "patientAlreadyAdmittedToCurrentLocation": "Patient already admitted to current location",
92
93
  "patientAssignedNewBed": "Patient assigned to new bed",
93
94
  "patientAssignedNewBedDetail": "{{patientName}} assigned to bed {{bedNumber}}",
@@ -101,8 +102,8 @@
101
102
  "patientNotesDidntLoad": "Patient notes didn't load",
102
103
  "patients": "Patients",
103
104
  "patientTransferredSuccessfully": "Patient transferred successfully",
104
- "patientTransferredToLocation": "Patient transferred successfully to {{location}}",
105
- "patientTransferRequestCreated": "Patient transfer request created",
105
+ "patientTransferredToLocation": "{{patientName}} transferred successfully to {{location}}",
106
+ "patientTransferRequestCreatedForPatient": "Transfer request created for {{patientName}}",
106
107
  "patientUnassignedFromBed": "Patient unassigned from bed",
107
108
  "patientUnassignedFromBedDetail": "{{patientName}} is now unassigned from bed",
108
109
  "patientWasDischarged": "Patient was discharged",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "addPatientToWard": "Add patient to ward",
3
- "admissionRequestCancelled": "Admission request cancelled.",
3
+ "admissionRequestCancelledForPatient": "Admission request cancelled for {{patientName}}",
4
4
  "admissionRequests": "Admission requests",
5
5
  "admissionRequestsCount_one": "{{count}} admission request",
6
6
  "admissionRequestsCount_other": "{{count}} admission requests",
@@ -10,8 +10,10 @@
10
10
  "admitPatient": "Admit patient",
11
11
  "admittedTo": "Admitted to {{locationName}}",
12
12
  "admitting": "Admitting...",
13
+ "alsoAdmitOrCancel": "Also admit / cancel:",
13
14
  "alsoSwap": "Also swap:",
14
15
  "alsoTransfer": "Also transfer:",
16
+ "alsoTransferOrCancel": "Also transfer / cancel:",
15
17
  "backToSearchResults": "Back to search results",
16
18
  "bedShare": "Bed share",
17
19
  "bedSwap": "Bed swap",
@@ -25,19 +27,19 @@
25
27
  "countItems_other": "{{count}} {{item}}",
26
28
  "days_one": "{{count}} day",
27
29
  "days_other": "{{count}} days",
28
- "deleteNote": "Delete Note",
30
+ "deleteNote": "Delete note",
29
31
  "deleteNoteConfirmationText": "Are you sure you want to delete this note? This action can't be undone.",
30
32
  "discharge": "Discharge",
31
33
  "editNote": "Edit note",
32
34
  "emptyBed": "Empty bed",
33
35
  "emptyText": "Empty",
34
36
  "encounterDisplay": "{{encounterType}} {{encounterDate}}",
35
- "errorCancellingAdmissionRequest": "Error cancelling admission request",
37
+ "errorAdmittingPatient": "Failed to admit {{patientName}}",
38
+ "errorCancellingAdmissionRequest": "Error cancelling admission request for {{patientName}}",
36
39
  "errorChangingPatientBedAssignment": "Error changing patient bed assignment",
37
40
  "errorConfiguringPatientCard": "Error configuring patient card",
38
41
  "errorConfiguringPatientCardMessage": "Unable to find configuration for {{elementType}}, id: {{id}}",
39
- "errorCreatingEncounter": "Failed to admit patient",
40
- "errorCreatingTransferRequest": "Error creating transfer request",
42
+ "errorCreatingTransferRequest": "Error creating transfer request for {{patientName}}",
41
43
  "errorDeletingNote": "Error deleting note",
42
44
  "errorDischargingPatient": "Error discharging patient",
43
45
  "errorLoadingBedDetails": "Error loading bed details",
@@ -48,8 +50,7 @@
48
50
  "errorLoadingPatients": "Error loading admitted patients",
49
51
  "errorLoadingWardLocation": "Error loading ward location",
50
52
  "errorSavingPatientNote": "Error saving patient note",
51
- "errorTransferringPatient": "Failed to transfer patient",
52
- "errrorAdmitingPatient": "Failed to admit patient",
53
+ "errorTransferringPatient": "Failed to transfer {{patientName}}",
53
54
  "female": "Female",
54
55
  "fetchingEmrConfigurationFailed": "Fetching EMR configuration failed. Try refreshing the page or contact your system administrator.",
55
56
  "fetchingPatientNotesFailed": "Fetching patient notes failed. Try refreshing the page or contact your system administrator.",
@@ -83,11 +84,11 @@
83
84
  "Orders": "Orders",
84
85
  "other": "Other",
85
86
  "patient": "Patient",
86
- "patientAdmittedButBedNotAssigned": "Patient admitted successfully but fail to assign bed to patient",
87
+ "patientAdmittedButBedNotAssigned": "{{patientName}} admitted successfully but failed to assign bed",
87
88
  "patientAdmittedSuccessfully": "Patient admitted successfully",
88
89
  "patientAdmittedSuccessfullySubtitle": "{{patientName}} has been successfully admitted and assigned to bed {{bedNumber}}",
89
- "patientAdmittedToLocation": "Patient admitted successfully to {{location}}",
90
- "patientAdmittedWoBed": "Patient admitted successfully to {{location}}",
90
+ "patientAdmittedToLocation": "{{patientName}} admitted successfully to {{location}}",
91
+ "patientAdmittedWoBed": "{{patientName}} admitted successfully to {{location}}",
91
92
  "patientAlreadyAdmittedToCurrentLocation": "Patient already admitted to current location",
92
93
  "patientAssignedNewBed": "Patient assigned to new bed",
93
94
  "patientAssignedNewBedDetail": "{{patientName}} assigned to bed {{bedNumber}}",
@@ -101,8 +102,8 @@
101
102
  "patientNotesDidntLoad": "Patient notes didn't load",
102
103
  "patients": "Patients",
103
104
  "patientTransferredSuccessfully": "Patient transferred successfully",
104
- "patientTransferredToLocation": "Patient transferred successfully to {{location}}",
105
- "patientTransferRequestCreated": "Patient transfer request created",
105
+ "patientTransferredToLocation": "{{patientName}} transferred successfully to {{location}}",
106
+ "patientTransferRequestCreatedForPatient": "Transfer request created for {{patientName}}",
106
107
  "patientUnassignedFromBed": "Patient unassigned from bed",
107
108
  "patientUnassignedFromBedDetail": "{{patientName}} is now unassigned from bed",
108
109
  "patientWasDischarged": "Patient was discharged",