@kenyaemr/esm-patient-clinical-view-app 5.4.2-pre.2716 → 5.4.2-pre.2724

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 (72) hide show
  1. package/.turbo/turbo-build.log +4 -4
  2. package/dist/127.js +1 -1
  3. package/dist/40.js +1 -1
  4. package/dist/805.js +1 -0
  5. package/dist/805.js.map +1 -0
  6. package/dist/916.js +1 -1
  7. package/dist/kenyaemr-esm-patient-clinical-view-app.js +2 -2
  8. package/dist/kenyaemr-esm-patient-clinical-view-app.js.buildmanifest.json +36 -36
  9. package/dist/main.js +27 -27
  10. package/dist/main.js.map +1 -1
  11. package/dist/routes.json +1 -1
  12. package/package.json +1 -1
  13. package/src/config-schema.ts +97 -0
  14. package/src/contact-list/contact-tracing-history.component.tsx +18 -15
  15. package/src/maternal-and-child-health/partography/components/pulse-bp-graph.component.tsx +1 -0
  16. package/src/maternal-and-child-health/partography/components/temperature-graph.component.tsx +218 -0
  17. package/src/maternal-and-child-health/partography/components/uterine-contractions-graph.component.tsx +209 -0
  18. package/src/maternal-and-child-health/partography/forms/cervical-contractions-form.component.tsx +211 -0
  19. package/src/maternal-and-child-health/partography/forms/cervix-form.component.tsx +354 -0
  20. package/src/maternal-and-child-health/partography/forms/drugs-iv-fluids-form.component.tsx +321 -0
  21. package/src/maternal-and-child-health/partography/forms/fetal-heart-rate-form.component.tsx +275 -0
  22. package/src/maternal-and-child-health/partography/forms/index.ts +9 -0
  23. package/src/maternal-and-child-health/partography/forms/membrane-amniotic-fluid-form.component.tsx +330 -0
  24. package/src/maternal-and-child-health/partography/forms/oxytocin-form.component.tsx +207 -0
  25. package/src/maternal-and-child-health/partography/forms/pulse-bp-form.component.tsx +174 -0
  26. package/src/maternal-and-child-health/partography/forms/temperature-form.component.tsx +210 -0
  27. package/src/maternal-and-child-health/partography/forms/time-picker-dropdown.component.tsx +218 -0
  28. package/src/maternal-and-child-health/partography/forms/time-picker-dropdown.scss +107 -0
  29. package/src/maternal-and-child-health/partography/forms/time-picker-with-clock.component.tsx +174 -0
  30. package/src/maternal-and-child-health/partography/forms/time-picker-with-clock.scss +178 -0
  31. package/src/maternal-and-child-health/partography/forms/urine-test-form.component.tsx +255 -0
  32. package/src/maternal-and-child-health/partography/forms/useCervixData.ts +16 -0
  33. package/src/maternal-and-child-health/partography/graphs/cervical-contractions-graph.component.tsx +266 -0
  34. package/src/maternal-and-child-health/partography/graphs/cervix-graph.component.tsx +429 -0
  35. package/src/maternal-and-child-health/partography/graphs/drugs-iv-fluids-graph-wrapper.component.tsx +163 -0
  36. package/src/maternal-and-child-health/partography/graphs/drugs-iv-fluids-graph.component.tsx +82 -0
  37. package/src/maternal-and-child-health/partography/graphs/fetal-heart-rate-graph.component.tsx +359 -0
  38. package/src/maternal-and-child-health/partography/graphs/index.ts +10 -0
  39. package/src/maternal-and-child-health/partography/graphs/membrane-amniotic-fluid-graph.component.tsx +266 -0
  40. package/src/maternal-and-child-health/partography/graphs/oxytocin-graph-wrapper.component.tsx +190 -0
  41. package/src/maternal-and-child-health/partography/graphs/oxytocin-graph.component.tsx +126 -0
  42. package/src/maternal-and-child-health/partography/graphs/partograph-graph.component.tsx +266 -0
  43. package/src/maternal-and-child-health/partography/graphs/pulse-bp-graph-wrapper.component.tsx +298 -0
  44. package/src/maternal-and-child-health/partography/graphs/pulse-bp-graph.component.tsx +267 -0
  45. package/src/maternal-and-child-health/partography/graphs/temperature-graph.component.tsx +242 -0
  46. package/src/maternal-and-child-health/partography/graphs/urine-test-graph.component.tsx +246 -0
  47. package/src/maternal-and-child-health/partography/partograph.component.tsx +2141 -118
  48. package/src/maternal-and-child-health/partography/partography-dashboard.meta.ts +8 -0
  49. package/src/maternal-and-child-health/partography/partography-data-form.scss +163 -0
  50. package/src/maternal-and-child-health/partography/partography.resource.ts +233 -326
  51. package/src/maternal-and-child-health/partography/partography.scss +1341 -3
  52. package/src/maternal-and-child-health/partography/resources/blood-pressure.resource.ts +96 -0
  53. package/src/maternal-and-child-health/partography/resources/cervical-dilation.resource.ts +109 -0
  54. package/src/maternal-and-child-health/partography/resources/cervix.resource.ts +362 -0
  55. package/src/maternal-and-child-health/partography/resources/descent-of-head.resource.ts +101 -0
  56. package/src/maternal-and-child-health/partography/resources/drugs-fluids.resource.ts +88 -0
  57. package/src/maternal-and-child-health/partography/resources/fetal-heart-rate.resource.ts +122 -0
  58. package/src/maternal-and-child-health/partography/resources/maternal-pulse.resource.ts +77 -0
  59. package/src/maternal-and-child-health/partography/resources/membrane-amniotic-fluid.resource.ts +108 -0
  60. package/src/maternal-and-child-health/partography/resources/oxytocin.resource.ts +159 -0
  61. package/src/maternal-and-child-health/partography/resources/progress-events.resource.ts +6 -0
  62. package/src/maternal-and-child-health/partography/resources/pulse-bp-combined.resource.ts +53 -0
  63. package/src/maternal-and-child-health/partography/resources/temperature.resource.ts +84 -0
  64. package/src/maternal-and-child-health/partography/resources/uterine-contractions.resource.ts +173 -0
  65. package/src/maternal-and-child-health/partography/table/temperature-table.component.tsx +99 -0
  66. package/src/maternal-and-child-health/partography/table/uterine-contractions-table.component.tsx +86 -0
  67. package/src/maternal-and-child-health/partography/types/index.ts +319 -101
  68. package/translations/am.json +121 -1
  69. package/translations/en.json +121 -1
  70. package/translations/sw.json +121 -1
  71. package/dist/397.js +0 -1
  72. package/dist/397.js.map +0 -1
package/dist/routes.json CHANGED
@@ -1 +1 @@
1
- {"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"kenyaemr":"^19.0.0"},"pages":[{"component":"wrapComponent","route":"case-management"}],"extensions":[{"name":"hiv-care-and-treatment-dashboard-link","component":"hivCareAndTreatmentLink","slot":"patient-chart-dashboard-slot","meta":{"columns":1,"columnSpan":1,"slot":"patient-chart-hiv-care-and-treatment-dashboard-slot","path":"hiv-care-and-treatment-dashboard","layoutMode":"anchored"}},{"name":"hiv-care-and-treatment-dashboard","slot":"patient-chart-hiv-care-and-treatment-dashboard-slot","component":"hivCareAndTreatment","order":0,"online":true,"offline":false},{"name":"relationship-dashboard-link","component":"relationshipsLink","order":24,"online":true,"offline":false,"meta":{"columns":1,"columnSpan":1,"slot":"patient-chart-relationship-slot","path":"relationships","layoutMode":"anchored"}},{"name":"relationship-dashboard","slot":"patient-chart-relationship-slot","component":"relationships","order":0,"online":true,"offline":false},{"name":"clinical-encounter-dashboard-link","component":"clinicalEncounterLink","order":25,"meta":{"columns":1,"columnSpan":1,"slot":"patient-chart-clinical-encounter-slot","path":"clinical-encounter","layoutMode":"anchored"}},{"name":"clinical-encounter-dashboard","slot":"patient-chart-clinical-encounter-slot","component":"clinicalEncounter","order":0,"online":true,"offline":false},{"name":"maternal-and-child-health-dashboard-link","component":"maternalAndChildHealthDashboardLink","order":26,"meta":{"columns":1,"columnSpan":1,"slot":"patient-chart-maternal-and-child-health-slot","path":"maternal-and-child-health","layoutMode":"anchored"}},{"name":"maternal-and-child-health-dashboard","slot":"patient-chart-maternal-and-child-health-slot","component":"maternalAndChildHealthDashboard","order":0,"online":true,"offline":false},{"name":"maternal-and-child-health-partograph","slot":"maternal-and-child-health-partograph-slot","component":"partograph","order":0,"online":true,"offline":false},{"name":"contact-list-dashboard-link","component":"contactListLink","order":27,"meta":{"columns":1,"columnSpan":1,"slot":"patient-chart-contact-list-slot","path":"contact-list","layoutMode":"anchored"}},{"name":"contact-list-dashboard","slot":"patient-chart-contact-list-slot","component":"contactList","order":0,"online":true,"offline":false},{"component":"caseManagementDashboardLink","name":"case-management-dashboard-link","meta":{"name":"case-management","title":"Case Management","slot":"case-management-dashboard-slot","path":"/case-management"}},{"name":"wrap-component-view","slot":"case-management-dashboard-slot","component":"wrapComponent","order":2,"online":true,"offline":false},{"name":"case-encounter-link","component":"caseEncounterDashboardLink","order":14,"meta":{"columns":1,"columnSpan":1,"slot":"patient-chart-case-encounter-slot","path":"case-management-encounters","layoutMode":"anchored"}},{"name":"case-encounter-table","slot":"patient-chart-case-encounter-slot","component":"caseEncounterTable","order":0,"online":true,"offline":false},{"component":"peerCalendarDashboardLink","name":"peer-calendar-dashboard-link","meta":{"name":"peer-calendar","title":"Peer Calendar","slot":"peer-calendar-dashboard-slot","path":"peer-management"}},{"name":"peer-calendar","slot":"peer-calendar-dashboard-slot","component":"peerCalendar","order":0,"online":true,"offline":false},{"name":"special-clinics-dashboard-link","component":"specialClinicsDashboardLink","order":15,"meta":{"columns":1,"columnSpan":1,"slot":"patient-chart-special-clinics-slot","path":"special-clinics","layoutMode":"anchored"}},{"name":"special-clinics-dashboard","slot":"patient-chart-special-clinics-slot","component":"specialClinicsDashboard","order":0,"online":true,"offline":false}],"modals":[{"name":"birth-date-calculator","component":"birthDateCalculator"},{"name":"relationship-delete-confirm-dialog","component":"relationshipDeleteConfirmialog"},{"name":"end-relationship-dialog","component":"endRelationshipModal"}],"workspaces":[{"name":"contact-list-form","component":"contactListForm","title":"Contact List Form","type":"form"},{"name":"case-management-form","component":"caseManagementForm","title":"Case Management Form","type":"form"},{"name":"add-patient-case-form","component":"addPatientCaseForm","title":"Add patient case Form","type":"form"},{"name":"family-relationship-form","component":"familyRelationshipForm","title":"Family Relationship Form","type":"form"},{"name":"peers-form","component":"peersForm","title":"Add New Peer","type":"form"},{"name":"kenyaemr-cusom-form-entry-workspace","component":"peerCalendarFormEntry","title":"KVP Peer Educator Outreach Calendar","type":"form","width":"extra-wide","canMaximize":true,"canHide":true},{"name":"contact-list-update-form","component":"contactListUpdateForm","title":"Contact List Update Form","type":"form"},{"name":"other-relationship-form","component":"otherRelationshipsForm","title":"Other Relationships Form","type":"form"},{"name":"end-relationship-form","component":"endRelationshipWorkspace","title":"Discontinue relationship form","type":"form"}],"version":"5.4.2-pre.2716"}
1
+ {"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"kenyaemr":"^19.0.0"},"pages":[{"component":"wrapComponent","route":"case-management"}],"extensions":[{"name":"hiv-care-and-treatment-dashboard-link","component":"hivCareAndTreatmentLink","slot":"patient-chart-dashboard-slot","meta":{"columns":1,"columnSpan":1,"slot":"patient-chart-hiv-care-and-treatment-dashboard-slot","path":"hiv-care-and-treatment-dashboard","layoutMode":"anchored"}},{"name":"hiv-care-and-treatment-dashboard","slot":"patient-chart-hiv-care-and-treatment-dashboard-slot","component":"hivCareAndTreatment","order":0,"online":true,"offline":false},{"name":"relationship-dashboard-link","component":"relationshipsLink","order":24,"online":true,"offline":false,"meta":{"columns":1,"columnSpan":1,"slot":"patient-chart-relationship-slot","path":"relationships","layoutMode":"anchored"}},{"name":"relationship-dashboard","slot":"patient-chart-relationship-slot","component":"relationships","order":0,"online":true,"offline":false},{"name":"clinical-encounter-dashboard-link","component":"clinicalEncounterLink","order":25,"meta":{"columns":1,"columnSpan":1,"slot":"patient-chart-clinical-encounter-slot","path":"clinical-encounter","layoutMode":"anchored"}},{"name":"clinical-encounter-dashboard","slot":"patient-chart-clinical-encounter-slot","component":"clinicalEncounter","order":0,"online":true,"offline":false},{"name":"maternal-and-child-health-dashboard-link","component":"maternalAndChildHealthDashboardLink","order":26,"meta":{"columns":1,"columnSpan":1,"slot":"patient-chart-maternal-and-child-health-slot","path":"maternal-and-child-health","layoutMode":"anchored"}},{"name":"maternal-and-child-health-dashboard","slot":"patient-chart-maternal-and-child-health-slot","component":"maternalAndChildHealthDashboard","order":0,"online":true,"offline":false},{"name":"maternal-and-child-health-partograph","slot":"maternal-and-child-health-partograph-slot","component":"partograph","order":0,"online":true,"offline":false},{"name":"contact-list-dashboard-link","component":"contactListLink","order":27,"meta":{"columns":1,"columnSpan":1,"slot":"patient-chart-contact-list-slot","path":"contact-list","layoutMode":"anchored"}},{"name":"contact-list-dashboard","slot":"patient-chart-contact-list-slot","component":"contactList","order":0,"online":true,"offline":false},{"component":"caseManagementDashboardLink","name":"case-management-dashboard-link","meta":{"name":"case-management","title":"Case Management","slot":"case-management-dashboard-slot","path":"/case-management"}},{"name":"wrap-component-view","slot":"case-management-dashboard-slot","component":"wrapComponent","order":2,"online":true,"offline":false},{"name":"case-encounter-link","component":"caseEncounterDashboardLink","order":14,"meta":{"columns":1,"columnSpan":1,"slot":"patient-chart-case-encounter-slot","path":"case-management-encounters","layoutMode":"anchored"}},{"name":"case-encounter-table","slot":"patient-chart-case-encounter-slot","component":"caseEncounterTable","order":0,"online":true,"offline":false},{"component":"peerCalendarDashboardLink","name":"peer-calendar-dashboard-link","meta":{"name":"peer-calendar","title":"Peer Calendar","slot":"peer-calendar-dashboard-slot","path":"peer-management"}},{"name":"peer-calendar","slot":"peer-calendar-dashboard-slot","component":"peerCalendar","order":0,"online":true,"offline":false},{"name":"special-clinics-dashboard-link","component":"specialClinicsDashboardLink","order":15,"meta":{"columns":1,"columnSpan":1,"slot":"patient-chart-special-clinics-slot","path":"special-clinics","layoutMode":"anchored"}},{"name":"special-clinics-dashboard","slot":"patient-chart-special-clinics-slot","component":"specialClinicsDashboard","order":0,"online":true,"offline":false}],"modals":[{"name":"birth-date-calculator","component":"birthDateCalculator"},{"name":"relationship-delete-confirm-dialog","component":"relationshipDeleteConfirmialog"},{"name":"end-relationship-dialog","component":"endRelationshipModal"}],"workspaces":[{"name":"contact-list-form","component":"contactListForm","title":"Contact List Form","type":"form"},{"name":"case-management-form","component":"caseManagementForm","title":"Case Management Form","type":"form"},{"name":"add-patient-case-form","component":"addPatientCaseForm","title":"Add patient case Form","type":"form"},{"name":"family-relationship-form","component":"familyRelationshipForm","title":"Family Relationship Form","type":"form"},{"name":"peers-form","component":"peersForm","title":"Add New Peer","type":"form"},{"name":"kenyaemr-cusom-form-entry-workspace","component":"peerCalendarFormEntry","title":"KVP Peer Educator Outreach Calendar","type":"form","width":"extra-wide","canMaximize":true,"canHide":true},{"name":"contact-list-update-form","component":"contactListUpdateForm","title":"Contact List Update Form","type":"form"},{"name":"other-relationship-form","component":"otherRelationshipsForm","title":"Other Relationships Form","type":"form"},{"name":"end-relationship-form","component":"endRelationshipWorkspace","title":"Discontinue relationship form","type":"form"}],"version":"5.4.2-pre.2724"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kenyaemr/esm-patient-clinical-view-app",
3
- "version": "5.4.2-pre.2716",
3
+ "version": "5.4.2-pre.2724",
4
4
  "description": "Patient clinical view microfrontend for the OpenMRS SPA",
5
5
  "keywords": [
6
6
  "openmrs"
@@ -42,6 +42,7 @@ export const configSchema = {
42
42
  antenatal: 'e8f98494-af35-4bb8-9fc7-c409c8fed843',
43
43
  postNatal: '72aa78e0-ee4b-47c3-9073-26f3b9ecc4a7',
44
44
  labourAndDelivery: '496c7cc3-0eea-4e84-a04c-2292949e2f7f',
45
+ admissionRequestFormUuid: '',
45
46
  defaulterTracingFormUuid: 'a1a62d1e-2def-11e9-b210-d663bd873d93',
46
47
  htsScreening: '04295648-7606-11e8-adc0-fa7ae01bbebc',
47
48
  htsInitialTest: '402dc5d7-46da-42d4-b2be-f43ea4ad87b0',
@@ -349,6 +350,13 @@ export const configSchema = {
349
350
  unit: 'per 10min',
350
351
  },
351
352
  },
353
+
354
+ uuids: {
355
+ timeSlot: 'a1b2c3d4-1111-2222-3333-444455556666',
356
+ mchPartographyEncounterUuid: '022d62af-e2a5-4282-953b-52dd5cba3296',
357
+ drugsFluidsEncounterUuid: '39da3525-afe4-45ff-8977-c53b7b359158',
358
+ contractionStrongConceptUuid: '4b90b73a-ad11-4650-91b0-baea131974e0',
359
+ },
352
360
  graphTypeDisplayNames: {
353
361
  'fetal-heart-rate': 'Fetal Heart Rate',
354
362
  'cervical-dilation': 'Cervical Dilation',
@@ -361,6 +369,19 @@ export const configSchema = {
361
369
  'drugs-fluids': 'Drugs & Fluids',
362
370
  'progress-events': 'Progress & Events',
363
371
  },
372
+ amnioticFluidMap: {
373
+ 'Membrane intact': '164899AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
374
+ 'Clear liquor': '159484AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
375
+ 'Meconium Stained': '134488AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
376
+ Absent: '163747AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
377
+ 'Blood Stained': '1077AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
378
+ },
379
+ mouldingMap: {
380
+ '0': '1107AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
381
+ '+': '1362AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
382
+ '++': '1363AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
383
+ '+++': '1364AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
384
+ },
364
385
  testData: {
365
386
  testGraphTypes: ['fetal-heart-rate', 'cervical-dilation', 'maternal-pulse', 'temperature', 'blood-pressure'],
366
387
  sampleDataPoints: [
@@ -372,14 +393,83 @@ export const configSchema = {
372
393
  valueIncrement: 10,
373
394
  bloodPressureDecrement: 40,
374
395
  },
396
+ descentOfHeadUuidToValue: {
397
+ '160769AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA': 0,
398
+ '162135AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA': 1,
399
+ '166065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA': 2,
400
+ '166066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA': 3,
401
+ '166067AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA': 4,
402
+ '163734AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA': 5,
403
+ },
375
404
  },
376
405
  },
406
+
377
407
  caseManagerRelationshipType: {
378
408
  _type: Type.UUID,
379
409
  _description: 'Case manager/Client relationship type UUID',
380
410
  _default: '9065e3c6-b2f5-4f99-9cbf-f67fd9f82ec5',
381
411
  },
382
412
  };
413
+ export const DRUG_ORDER_TYPE_UUID = '131168f4-15f5-102d-96e4-000c29c2a5d7';
414
+ export const ENCOUNTER_ROLE = '240b26f9-dd88-4172-823d-4a8bfeb7841f';
415
+ export const MOULDING_NONE_CONCEPT = '1107AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
416
+ export const MOULDING_SLIGHT_CONCEPT = '1362AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
417
+ export const MOULDING_MODERATE_CONCEPT = '1363AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
418
+ export const MOULDING_SEVERE_CONCEPT = '1364AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
419
+ export const CONTRACTION_LEVEL_MILD_CONCEPT = '1498AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
420
+ export const CONTRACTION_LEVEL_MODERATE_CONCEPT = '1499AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
421
+ export const CONTRACTION_LEVEL_STRONG_CONCEPT = '166788AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
422
+ export const CERVIX_CONCEPT = '162261AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
423
+ export const FETAL_HEART_RATE_CONCEPT = '1440AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
424
+ export const FETAL_HEART_RATE_HOUR_CONCEPT = '160632AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
425
+ export const FETAL_HEART_RATE_TIME_CONCEPT = '160632AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
426
+ export const DESCENT_OF_HEAD_CONCEPT = '1810AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
427
+ export const UTERINE_CONTRACTIONS_CONCEPT = '163750AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
428
+ export const UTERINE_CONTRACTION_FREQUENCY_CONCEPT = '166529AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
429
+ export const UTERINE_CONTRACTION_DURATION_CONCEPT = '159368AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
430
+ export const MATERNAL_PULSE_CONCEPT = '5087AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
431
+ export const SYSTOLIC_BP_CONCEPT = '5085AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
432
+ export const DIASTOLIC_BP_CONCEPT = '5086AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
433
+ export const TEMPERATURE_CONCEPT = '5088AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
434
+ export const GLUCOSE_LEVEL_CONCEPT = '887AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
435
+ export const PROTEIN_LEVEL_CONCEPT = '161442AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
436
+ export const KETONE_LEVEL_CONCEPT = '165438AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
437
+ export const URINE_VOLUME_CONCEPT = '159660AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
438
+ export const CONTRACTION_COUNT_CONCEPT = '159682AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
439
+ export const URINE_CHARACTERISTICS_CONCEPT = '56AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
440
+ export const MEDICATION_CONCEPT = '1282AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
441
+ export const MEDICATION_NAME_CONCEPT = '164231AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
442
+ export const OXYTOCIN_DOSE_CONCEPT = '81369AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
443
+ export const ROUTE_CONCEPT = '8878f9c0-a1ce-47ec-a88f-69ef0f6576ba';
444
+ export const FREQUENCY_CONCEPT = 'fd9f82fd-f327-4502-ac8e-5d9144dbd504';
445
+ export const IV_FLUIDS_CONCEPT = '161911AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
446
+ export const DOSAGE_CONCEPT = 'b71ddb80-2d7f-4bde-a44b-236e62d4c1b6';
447
+ export const DRUG_DOSE_CONCEPT = '162384AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
448
+ export const EVENT_TYPE_CONCEPT = '162879AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
449
+ export const EVENT_DESCRIPTION_CONCEPT = '160632AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
450
+ export const AMNIOTIC_FLUID_CONCEPT = '162653AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
451
+ export const MOULDING_CONCEPT = '166527AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
452
+ export const BLOOD_GROUP_CONCEPT = '300AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
453
+ export const TIME_SLOT_CONCEPT = '163286AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
454
+ export const PULSE_BP_TIME_CONCEPT = 'bb3724c9-fbcc-49c5-9702-6cde0be325ca';
455
+ export const LABOR_PATTERN_CONCEPT = '164135AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
456
+ export const HOURS_SINCE_RUPTURE_CONCEPT = '167149AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
457
+ export const RUPTURED_MEMBRANES_CONCEPT = '164900AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
458
+ export const DATE_OF_ADMISSION_CONCEPT = '1640AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
459
+ export const GESTATION_WEEKS_CONCEPT = '1789AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
460
+ export const ESTIMATED_DELIVERY_DATE_CONCEPT = '5596AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
461
+ export const LAST_MENSTRUAL_PERIOD_CONCEPT = '1427AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
462
+ export const AMNIOTIC_CLEAR_LIQUOR_CONCEPT = '159484AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
463
+ export const AMNIOTIC_MECONIUM_STAINED_CONCEPT = '134488AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
464
+ export const AMNIOTIC_ABSENT_CONCEPT = '163747AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
465
+ export const AMNIOTIC_BLOOD_STAINED_CONCEPT = '1077AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
466
+ export const AMNIOTIC_MEMBRANE_INTACT_CONCEPT = 'd1787a76-7310-4223-a645-9fd410d418c1';
467
+ export const STATION_0_CONCEPT = '160769AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
468
+ export const STATION_1_CONCEPT = '162135AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
469
+ export const STATION_2_CONCEPT = '166065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
470
+ export const STATION_3_CONCEPT = '166066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
471
+ export const STATION_4_CONCEPT = '166067AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
472
+ export const STATION_5_CONCEPT = '163734AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
383
473
 
384
474
  export interface ConfigObject {
385
475
  requireMaritalStatusOnAgeGreaterThanOrEqualTo: number;
@@ -404,6 +494,7 @@ export interface ConfigObject {
404
494
  labourAndDelivery: string;
405
495
  antenatal: string;
406
496
  postnatal: string;
497
+ admissionRequestFormUuid: string;
407
498
  htsScreening: string;
408
499
  htsInitialTest: string;
409
500
  htsRetest: string;
@@ -470,6 +561,12 @@ export interface ConfigObject {
470
561
  valueIncrement: number;
471
562
  bloodPressureDecrement: number;
472
563
  };
564
+ uuids?: {
565
+ timeSlot: string;
566
+ mchPartographyEncounterUuid: string;
567
+ drugsFluidsEncounterUuid: string;
568
+ contractionStrongConceptUuid: string;
569
+ };
473
570
  };
474
571
  caseManagerRelationshipType: string;
475
572
  }
@@ -13,7 +13,7 @@ import {
13
13
  import { Edit } from '@carbon/react/icons';
14
14
  import { launchWorkspace, useConfig, usePagination } from '@openmrs/esm-framework';
15
15
  import { CardHeader, EmptyState, ErrorState } from '@openmrs/esm-patient-common-lib';
16
- import React, { useMemo, useState } from 'react';
16
+ import React, { useCallback, useMemo, useState } from 'react';
17
17
  import { useTranslation } from 'react-i18next';
18
18
  import { mutate } from 'swr';
19
19
  import { ConfigObject } from '../config-schema';
@@ -33,19 +33,22 @@ const ContactTracingHistory: React.FC<ContactTracingHistoryProps> = ({ patientUu
33
33
  formsList: { htsClientTracingFormUuid },
34
34
  } = useConfig<ConfigObject>();
35
35
 
36
- const handleLaunchContactTracingForm = (encounterUuid: string) => {
37
- launchWorkspace('kenyaemr-cusom-form-entry-workspace', {
38
- workspaceTitle: t('contactTracingForm', 'Contact tracing form'),
39
- formUuid: htsClientTracingFormUuid,
40
- patientUuid,
41
- encounterUuid,
42
- mutateForm: () => {
43
- mutate((key) => true, undefined, {
44
- revalidate: true,
45
- });
46
- },
47
- });
48
- };
36
+ const handleLaunchContactTracingForm = useCallback(
37
+ (encounterUuid: string) => {
38
+ launchWorkspace('kenyaemr-cusom-form-entry-workspace', {
39
+ workspaceTitle: t('contactTracingForm', 'Contact tracing form'),
40
+ formUuid: htsClientTracingFormUuid,
41
+ patientUuid,
42
+ encounterUuid,
43
+ mutateForm: () => {
44
+ mutate((key) => true, undefined, {
45
+ revalidate: true,
46
+ });
47
+ },
48
+ });
49
+ },
50
+ [htsClientTracingFormUuid, patientUuid, t],
51
+ );
49
52
 
50
53
  const headers = [
51
54
  {
@@ -94,7 +97,7 @@ const ContactTracingHistory: React.FC<ContactTracingHistoryProps> = ({ patientUu
94
97
  />
95
98
  ),
96
99
  })),
97
- [results, t],
100
+ [handleLaunchContactTracingForm, results, t],
98
101
  );
99
102
 
100
103
  if (contactTracesHistory.length === 0) {
@@ -0,0 +1 @@
1
+ export { default } from '../graphs/pulse-bp-graph.component';
@@ -0,0 +1,218 @@
1
+ import React from 'react';
2
+ import { useTranslation } from 'react-i18next';
3
+ import { Button, SkeletonText } from '@carbon/react';
4
+ import { Add, ChartColumn, Table as TableIcon } from '@carbon/react/icons';
5
+ import styles from '../partography.scss';
6
+ import TemperatureTable from '../table/temperature-table.component';
7
+
8
+ interface TemperatureTableRow {
9
+ id: string;
10
+ date: string;
11
+ timeSlot: string;
12
+ exactTime: string;
13
+ temperature: number;
14
+ }
15
+
16
+ interface TemperatureGraphProps {
17
+ tableData: TemperatureTableRow[];
18
+ viewMode: 'graph' | 'table';
19
+ currentPage: number;
20
+ pageSize: number;
21
+ totalItems: number;
22
+ controlSize: 'sm' | 'md';
23
+ onPageChange: (page: number) => void;
24
+ onPageSizeChange: (size: number) => void;
25
+ onAddData?: () => void;
26
+ onViewModeChange?: (mode: 'graph' | 'table') => void;
27
+ isAddButtonDisabled?: boolean;
28
+ isLoading?: boolean;
29
+ }
30
+
31
+ const TemperatureGraph: React.FC<TemperatureGraphProps> = ({
32
+ tableData,
33
+ viewMode,
34
+ currentPage,
35
+ pageSize,
36
+ totalItems,
37
+ controlSize,
38
+ onPageChange,
39
+ onPageSizeChange,
40
+ onAddData,
41
+ onViewModeChange,
42
+ isAddButtonDisabled = false,
43
+ isLoading = false,
44
+ }) => {
45
+ const { t } = useTranslation();
46
+
47
+ // Only show rows with both date and a time (exactTime or timeSlot)
48
+ const filteredTableData = tableData.filter((item) => item.date && (item.exactTime || item.timeSlot));
49
+ const timeColumns = filteredTableData.map((item) => item.exactTime || item.timeSlot || '--');
50
+
51
+ const getTemperatureStatus = (temperature: number): string => {
52
+ if (temperature < 36.1) {
53
+ return styles.temperatureLow;
54
+ }
55
+ if (temperature >= 36.1 && temperature <= 37.2) {
56
+ return styles.temperatureNormal;
57
+ }
58
+ if (temperature > 37.2) {
59
+ return styles.temperatureHigh;
60
+ }
61
+ return '';
62
+ };
63
+
64
+ // Carbon skeleton for loading state
65
+ const renderSkeleton = () => (
66
+ <div className={styles.membraneGrid}>
67
+ <div className={styles.gridContainer}>
68
+ <div className={styles.gridHeader}>
69
+ <div className={styles.gridCell}>
70
+ <SkeletonText width="60px" />
71
+ </div>
72
+ {[...Array(6)].map((_, idx) => (
73
+ <div key={idx} className={styles.gridCell}>
74
+ <SkeletonText width="60px" />
75
+ </div>
76
+ ))}
77
+ </div>
78
+ <div className={styles.gridRow}>
79
+ <div className={styles.gridRowLabel}>
80
+ <SkeletonText width="80px" />
81
+ </div>
82
+ {[...Array(6)].map((_, idx) => (
83
+ <div key={idx} className={styles.gridCell}>
84
+ <SkeletonText width="40px" />
85
+ </div>
86
+ ))}
87
+ </div>
88
+ </div>
89
+ </div>
90
+ );
91
+
92
+ // Empty state for no data
93
+ const renderEmptyGraph = () => (
94
+ <div className={styles.membraneGrid}>
95
+ <div className={styles.gridContainer}>
96
+ <div className={styles.gridHeader}>
97
+ <div className={styles.gridCell}>{t('time', 'Time')}</div>
98
+ {[...Array(6)].map((_, idx) => (
99
+ <div key={idx} className={styles.gridCell}>
100
+ --
101
+ </div>
102
+ ))}
103
+ </div>
104
+ <div className={styles.gridRow}>
105
+ <div className={styles.gridRowLabel}>{t('temperature', 'Temp °C')}</div>
106
+ {[...Array(6)].map((_, idx) => (
107
+ <div key={idx} className={styles.gridCell}>
108
+ --
109
+ </div>
110
+ ))}
111
+ </div>
112
+ <div style={{ textAlign: 'center', marginTop: '2rem', width: '100%' }}>
113
+ <p>{t('noDataAvailable', 'No temperature data available')}</p>
114
+ <Button kind="primary" size={controlSize} renderIcon={Add} onClick={onAddData}>
115
+ {t('addFirstDataPoint', 'Add first data point')}
116
+ </Button>
117
+ </div>
118
+ </div>
119
+ </div>
120
+ );
121
+
122
+ return (
123
+ <div className={styles.fetalHeartRateSection}>
124
+ <div className={styles.fetalHeartRateContainer}>
125
+ <div className={styles.fetalHeartRateHeader}>
126
+ <div className={styles.fetalHeartRateHeaderLeft}>
127
+ <h3 className={styles.fetalHeartRateTitle}>Temperature</h3>
128
+ <div className={styles.fetalHeartRateControls}>
129
+ <span className={styles.legendText}>Normal: 36.1-37.2°C | Low: &lt;36.1°C | High: &gt;37.2°C</span>
130
+ </div>
131
+ </div>
132
+ <div className={styles.fetalHeartRateHeaderRight}>
133
+ <div className={styles.fetalHeartRateActions}>
134
+ <div className={styles.viewSwitcher}>
135
+ <Button
136
+ kind={viewMode === 'graph' ? 'primary' : 'secondary'}
137
+ size={controlSize}
138
+ hasIconOnly
139
+ iconDescription={t('graphView', 'Graph View')}
140
+ onClick={() => onViewModeChange?.('graph')}
141
+ className={styles.viewButton}>
142
+ <ChartColumn />
143
+ </Button>
144
+ <Button
145
+ kind={viewMode === 'table' ? 'primary' : 'secondary'}
146
+ size={controlSize}
147
+ hasIconOnly
148
+ iconDescription={t('tableView', 'Table View')}
149
+ onClick={() => onViewModeChange?.('table')}
150
+ className={styles.viewButton}>
151
+ <TableIcon />
152
+ </Button>
153
+ </div>
154
+ <Button
155
+ kind="primary"
156
+ size={controlSize}
157
+ renderIcon={Add}
158
+ iconDescription="Add temperature data"
159
+ disabled={isAddButtonDisabled}
160
+ onClick={onAddData}
161
+ className={styles.addButton}>
162
+ Add
163
+ </Button>
164
+ </div>
165
+ </div>
166
+ </div>
167
+ {viewMode === 'graph' ? (
168
+ isLoading ? (
169
+ renderSkeleton()
170
+ ) : filteredTableData.length === 0 ? (
171
+ renderEmptyGraph()
172
+ ) : (
173
+ <div className={styles.membraneGrid}>
174
+ <div className={styles.gridContainer}>
175
+ {/* Header row with time columns */}
176
+ <div className={styles.gridHeader}>
177
+ <div className={styles.gridCell}>{t('time', 'Time')}</div>
178
+ {timeColumns.map((timeColumn, idx) => (
179
+ <div key={idx} className={styles.gridCell}>
180
+ {timeColumn}
181
+ </div>
182
+ ))}
183
+ </div>
184
+ {/* Temperature row */}
185
+ <div className={styles.gridRow}>
186
+ <div className={styles.gridRowLabel}>{t('temperature', 'Temp °C')}</div>
187
+ {filteredTableData.map((item, idx) => (
188
+ <div
189
+ key={`temp-${idx}`}
190
+ className={`${styles.gridCell} ${
191
+ item.temperature ? getTemperatureStatus(item.temperature) : ''
192
+ }`}>
193
+ {item.temperature !== undefined && item.temperature !== null ? item.temperature : '--'}
194
+ </div>
195
+ ))}
196
+ </div>
197
+ </div>
198
+ </div>
199
+ )
200
+ ) : (
201
+ <div className={styles.tableContainer}>
202
+ <TemperatureTable
203
+ tableData={filteredTableData}
204
+ currentPage={currentPage}
205
+ pageSize={pageSize}
206
+ totalItems={filteredTableData.length}
207
+ controlSize={controlSize}
208
+ onPageChange={onPageChange}
209
+ onPageSizeChange={onPageSizeChange}
210
+ />
211
+ </div>
212
+ )}
213
+ </div>
214
+ </div>
215
+ );
216
+ };
217
+
218
+ export default TemperatureGraph;