@kenyaemr/esm-care-panel-app 5.4.2-pre.2180 → 5.4.2-pre.2188

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.
@@ -1,6 +1,7 @@
1
1
  @use '@carbon/styles/scss/type';
2
2
  @use '@carbon/styles/scss/spacing';
3
3
  @use '@carbon/colors';
4
+ @use '@carbon/layout';
4
5
  @import '~@openmrs/esm-styleguide/src/vars';
5
6
 
6
7
  .bodyContainer {
@@ -53,13 +54,14 @@
53
54
  }
54
55
 
55
56
  .value {
56
- @include type.type-style('productive-heading-03');
57
+ @include type.type-style('body-02');
57
58
  color: colors.$gray-100;
59
+ margin-top: spacing.$spacing-03;
58
60
  }
59
61
 
60
62
  .label {
61
- @include type.type-style('label-01');
62
- color: $text-02;
63
+ @include type.type-style('label-02');
64
+ color: colors.$gray-70;
63
65
  }
64
66
 
65
67
  .container {
@@ -67,12 +69,18 @@
67
69
  flex-direction: row;
68
70
  padding-left: 1rem;
69
71
  flex-wrap: wrap;
72
+ width: 100%;
73
+ justify-content: flex-start;
74
+ gap: layout.$spacing-04;
70
75
  }
71
76
 
72
77
  .content {
73
- margin-top: spacing.$spacing-05;
74
- width: 30%;
75
- margin-left: spacing.$spacing-03;
78
+ display: flex;
79
+ flex-direction: column;
80
+ gap: spacing.$spacing-01;
81
+ width: calc(33.333% - layout.$spacing-04);
82
+ min-width: 0;
83
+ margin-top: spacing.$spacing-03;
76
84
  }
77
85
 
78
86
  .btnHidden {
@@ -82,3 +90,10 @@
82
90
  .btnShow {
83
91
  visibility: visible;
84
92
  }
93
+
94
+ .divider {
95
+ height: 1px;
96
+ background-color: #e0e0e0;
97
+ margin: 1rem 0;
98
+ width: 100%;
99
+ }
@@ -1,16 +1,21 @@
1
- import React, { useRef } from 'react';
1
+ import React from 'react';
2
2
  import styles from './print.scss';
3
3
  import { useConfig } from '@openmrs/esm-framework';
4
+ import PatientSummaryBody from '../patient-summary/patient-summary-body.component';
5
+ import { type PatientSummary } from '../types';
4
6
 
5
- export function PrintComponent() {
6
- const componentRef = useRef(null);
7
+ const PrintComponent = React.forwardRef<HTMLDivElement, { data: PatientSummary }>(({ data }, ref) => {
7
8
  const { logo } = useConfig();
8
-
9
9
  return (
10
- <div className={styles.printPage}>
11
- <div ref={componentRef}>{logo?.src ? <img src={logo.src} alt={logo?.alt} width={110} height={40} /> : null}</div>
10
+ <div ref={ref} className={styles.printPage}>
11
+ {logo?.src && <img src={logo.src} alt={logo.alt || 'Logo'} width={110} height={40} />}
12
+ <div className={styles.bodyContainer}>
13
+ <div className={styles.card}>
14
+ <PatientSummaryBody data={data} />
15
+ </div>
16
+ </div>
12
17
  </div>
13
18
  );
14
- }
19
+ });
15
20
 
16
21
  export default PrintComponent;
@@ -3,7 +3,102 @@
3
3
  }
4
4
 
5
5
  .printPage {
6
+ padding: 20px;
7
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans',
8
+ 'Helvetica Neue', sans-serif;
9
+ color: #161616;
10
+ line-height: 1.5;
11
+ max-width: 800px;
12
+ margin: 0 auto;
13
+
14
+ img {
15
+ margin-bottom: 20px;
16
+ }
17
+ }
18
+
19
+ .bodyContainer {
20
+ background: #ffffff;
21
+ border-radius: 4px;
22
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
23
+ }
24
+
25
+ .card {
26
+ padding: 20px;
27
+ }
28
+
29
+ .section {
30
+ margin-bottom: 24px;
31
+ page-break-inside: avoid;
32
+
33
+ &:last-child {
34
+ margin-bottom: 0;
35
+ }
36
+ }
37
+
38
+ .sectionTitle {
39
+ font-size: 16px;
40
+ font-weight: 600;
41
+ color: #0f62fe;
42
+ margin: 0 0 12px 0;
43
+ padding-bottom: 8px;
44
+ border-bottom: 1px solid #e0e0e0;
45
+ }
46
+
47
+ .sectionContent {
48
+ display: grid;
49
+ grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
50
+ gap: 12px;
51
+ }
52
+
53
+ .infoRow {
6
54
  display: flex;
7
- justify-content: center;
8
- align-items: center;
55
+ align-items: baseline;
56
+ gap: 8px;
57
+ font-size: 14px;
58
+ }
59
+
60
+ .label {
61
+ color: #525252;
62
+ font-weight: 500;
63
+ min-width: 120px;
64
+ }
65
+
66
+ .value {
67
+ color: #161616;
68
+ flex: 1;
69
+ }
70
+
71
+ @media print {
72
+ body * {
73
+ visibility: hidden;
74
+ }
75
+
76
+ .printPage,
77
+ .printPage * {
78
+ visibility: visible;
79
+ }
80
+
81
+ .printPage {
82
+ position: absolute;
83
+ left: 0;
84
+ top: 0;
85
+ padding: 0;
86
+ box-shadow: none;
87
+ }
88
+
89
+ .bodyContainer {
90
+ box-shadow: none;
91
+ }
92
+
93
+ .card {
94
+ padding: 0;
95
+ }
96
+
97
+ .section {
98
+ margin-bottom: 16px;
99
+ }
100
+
101
+ .sectionTitle {
102
+ color: #000000;
103
+ }
9
104
  }
@@ -1,99 +1,51 @@
1
1
  {
2
- "age": "Age",
3
- "artInterruptionReason": "ART interruptions reason",
4
- "birthDate": "Birth date",
5
- "bloodPressure": "Blood pressure",
6
- "bmi": "BMI",
7
2
  "carePanel": "Care panel",
8
3
  "carePanelError": "Care panel",
9
4
  "careProgram": "care program",
10
5
  "carePrograms": "Care Programs",
11
6
  "careProgramsEnrollement": "Care panel",
12
- "caxcScreeningOutcome": "Caxc screening",
13
- "cd4AtArtStart": "CD4 at ART start",
14
7
  "CD4Percentage": "CD4 percentage",
15
8
  "cd4Trends": "CD4 Trends",
16
9
  "changeReason": "Change reason",
17
10
  "changeRegimen": "Change",
18
- "chronicDisease": "Chronic disease",
19
- "clinicalNotes": "Clinical notes",
20
- "clinicalStageART": "Clinical stage at ART",
21
- "clinicianName": "Clinician name",
22
- "clinicianSignature": "Clinician signature",
23
- "clinicName": "Clinic name",
24
- "clinicsEnrolled": "Clinics enrolled",
25
- "currentArtRegimen": "Current Art regimen",
26
- "currentArtRegimenDate": "Current Art regimen date",
27
11
  "currentFeedingOption": "Current feeding option",
28
12
  "currentStatus": "Current status",
29
- "Dapsone": "Dapsone",
30
13
  "date": "Date",
31
- "dateCompletedInTb": "TPT completion date",
32
- "dateConfirmedPositive": "Date confirmed HIV positive",
33
- "dateEnrolledInTb": "TPT start date",
34
- "dateEnrolledToCare": "Date enrolled into care",
35
- "dateFirstCD4": "Date first CD4",
36
- "dateOfEntryPoint": "Date of entry point",
37
- "dateStartedART": "Date started ART",
38
- "deathDate": "Death date",
39
14
  "deleteRegimen": "Delete Regimen",
40
15
  "deleteRegimenModalConfirmationText": "Are you sure you want to delete regimen?",
41
16
  "description": "Description",
42
17
  "discard": "Discard",
43
18
  "discontinue": "Discontinue",
44
19
  "diseaseClassification": "Disease classification",
45
- "drugAllergies": "Drug allergies",
46
20
  "edit": "Edit",
47
21
  "editRegimen": "Edit",
48
22
  "end": "End",
49
23
  "EnrollmentDetails": "Enrollment History",
50
24
  "enrollments": "Program enrollment",
51
- "entryPoint": "Entry point",
52
25
  "errorCarePrograms": "Care programs",
53
26
  "errorPatientSummary": "Error loading patient summary",
54
27
  "errorProgramSummary": "Error loading HIV summary",
55
28
  "errorRegimenHistory": "Error loading regimen history",
56
29
  "evaluationDate": "Evaluation Date",
57
- "facilityTransferredFrom": "Facility transferred from",
58
- "familyProtection": "FP method",
59
- "firstCD4": "First CD4",
60
- "gender": "Gender",
61
- "height": "Height",
62
30
  "heiOutcome": "HEI Outcome",
63
31
  "hivStatus": "HIV Status",
64
32
  "iitRiscScore": "IIT Risk Score",
65
33
  "iitRiskscore": "IIT Risk Score",
66
- "initialRegimen": "Initial regimen",
67
- "initialRegimenDate": "Initial regimen date",
68
- "ioHistory": " OI history",
69
34
  "lastCd4Count": "Last CD4 count",
70
35
  "lastViralLoad": "Last viral load",
71
36
  "lastWhoStage": "Last WHO stage",
72
- "lmp": "LMP",
73
37
  "loading": "Loading",
74
38
  "machineLearning": "Machine Learning",
75
- "maritalStatus": "Marital status",
76
- "mflCode": "MFL code",
77
39
  "milestonesAttained": "Milestones Attained",
78
40
  "mlPredictions": "machine learning predictions",
79
- "mostRecentCD4": "Most recent CD4",
80
- "mostRecentVL": "Most recent VL",
81
- "nationalUniquePatientIdentifier": "National unique patient identifier",
82
41
  "neverOnArvRegimen": "Never on ARVs",
83
42
  "neverOnTbRegimen": "Never on TB regimen",
84
- "nextAppointmentDate": " Next appointment",
85
- "none": "None",
43
+ "noPatientSummary": "No patient summary available",
86
44
  "onART": "On ART",
87
- "oxygenSaturation": "Oxygen saturation",
88
45
  "panelSummary": "Panel summary",
89
46
  "patientClassification": "Patient classification",
90
- "patientName": "Patient name",
91
47
  "patientSummary": "Patient summary",
92
- "previousART": "Previous ART",
93
48
  "print": "Print",
94
- "pulseRate": "Pulse rate",
95
- "purposeDate": "Purpose drugs date",
96
- "purposeDrugs": "Purpose drugs",
97
49
  "regimen": "Regimen",
98
50
  "regimenDeleted": "Regimen deleted",
99
51
  "regimenDeletedError": "Error deleting regimen",
@@ -105,8 +57,6 @@
105
57
  "regimenStartDate": " Date started regimen",
106
58
  "regimenUpdated": "Regimen updated",
107
59
  "regimenUpdatedSuccessfully": "Regimen updated successfully.",
108
- "reportDate": "Report date",
109
- "respiratoryRate": "Respiratory rate",
110
60
  "restartRegimen": "Restart",
111
61
  "riskFactors": "Risk Factors",
112
62
  "riskScore": "Risk Score",
@@ -116,23 +66,9 @@
116
66
  "selectRegimenLine": "Select Regimen Line",
117
67
  "start": "Start",
118
68
  "startRegimen": "Start",
119
- "stiScreeningOutcome": "Sti screening",
120
69
  "stopRegimen": "Stop",
121
- "substitutionWithin1stLineRegimen": "Substitution within 1st line regimen",
122
- "switchTo2ndLineRegimen": "Switch to 2nd line regimen",
123
- "tbScreeningOutcome": "TB screening outcome",
124
- "tpt": "TPT",
125
- "transferInDate": "Transfer in date",
126
- "transferOutDate": "Transfer out date",
127
- "transferOutFacility": "Transfer out facility",
128
- "treatmentSupporterContact": "Treatment Supporter contact",
129
- "treatmentSupporterName": "Treatment supporter name",
130
- "treatmentSupporterRelationship": "Treatment supporter relationship",
131
70
  "undoRegimen": "Undo",
132
- "uniquePatientIdentifier": "Unique patient identifier",
133
71
  "validating": "Validating data...",
134
72
  "viralLoadTrends": "Viral load trends",
135
- "weight": "Weight",
136
- "whoAtEnrollment": "WHO stage at enrollment",
137
73
  "whoStage": "WHO STAGE"
138
74
  }