@kenyaemr/esm-care-panel-app 4.1.1-pre.72

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 (53) hide show
  1. package/.turbo/turbo-build.log +42 -0
  2. package/LICENSE.md +401 -0
  3. package/README.md +5 -0
  4. package/dist/150.js +1 -0
  5. package/dist/150.js.map +1 -0
  6. package/dist/24.js +2 -0
  7. package/dist/24.js.LICENSE.txt +19 -0
  8. package/dist/24.js.map +1 -0
  9. package/dist/561.js +1 -0
  10. package/dist/561.js.map +1 -0
  11. package/dist/574.js +1 -0
  12. package/dist/690.js +1 -0
  13. package/dist/690.js.map +1 -0
  14. package/dist/709.js +1 -0
  15. package/dist/709.js.map +1 -0
  16. package/dist/784.js +2 -0
  17. package/dist/784.js.LICENSE.txt +9 -0
  18. package/dist/784.js.map +1 -0
  19. package/dist/832.js +1 -0
  20. package/dist/832.js.map +1 -0
  21. package/dist/858.js +2 -0
  22. package/dist/858.js.LICENSE.txt +3 -0
  23. package/dist/858.js.map +1 -0
  24. package/dist/958.js +2 -0
  25. package/dist/958.js.LICENSE.txt +15 -0
  26. package/dist/958.js.map +1 -0
  27. package/dist/kenyaemr-esm-care-panel-app.js +1 -0
  28. package/dist/kenyaemr-esm-care-panel-app.js.buildmanifest.json +354 -0
  29. package/dist/kenyaemr-esm-care-panel-app.js.map +1 -0
  30. package/dist/kenyaemr-esm-care-panel-app.old +1 -0
  31. package/dist/main.js +1 -0
  32. package/dist/main.js.map +1 -0
  33. package/package.json +50 -0
  34. package/src/care-panel/care-panel.component.tsx +67 -0
  35. package/src/care-panel/care-panel.scss +50 -0
  36. package/src/config-schema.ts +1 -0
  37. package/src/declarations.d.tsx +2 -0
  38. package/src/hooks/useEnrollmentHistory.ts +34 -0
  39. package/src/hooks/usePatientSummary.ts +14 -0
  40. package/src/hooks/useProgramSummary.ts +14 -0
  41. package/src/index.ts +43 -0
  42. package/src/patient-summary/patient-summary.component.tsx +575 -0
  43. package/src/patient-summary/patient-summary.scss +83 -0
  44. package/src/print-layout/print.component.tsx +16 -0
  45. package/src/print-layout/print.scss +10 -0
  46. package/src/program-enrollment/program-enrollment.component.tsx +243 -0
  47. package/src/program-enrollment/program-enrollment.scss +75 -0
  48. package/src/program-summary/program-summary.component.tsx +233 -0
  49. package/src/program-summary/program-summary.scss +70 -0
  50. package/src/types/index.ts +156 -0
  51. package/translations/en.json +1 -0
  52. package/tsconfig.json +5 -0
  53. package/webpack.config.js +1 -0
@@ -0,0 +1,70 @@
1
+ @use '@carbon/styles/scss/type';
2
+ @use '@carbon/styles/scss/spacing';
3
+ @use '@carbon/colors';
4
+ @import '~@openmrs/esm-styleguide/src/vars';
5
+
6
+ .desktopHeading {
7
+ h4 {
8
+ @include type.type-style('heading-compact-02');
9
+ color: $text-02;
10
+ }
11
+ }
12
+
13
+ .tabletHeading {
14
+ h4 {
15
+ @include type.type-style('heading-03');
16
+ color: $text-02;
17
+ }
18
+ }
19
+
20
+ .desktopHeading,
21
+ .tabletHeading {
22
+ text-align: left;
23
+ text-transform: capitalize;
24
+ margin-bottom: spacing.$spacing-05;
25
+
26
+ h4:after {
27
+ content: '';
28
+ display: block;
29
+ width: 2rem;
30
+ padding-top: 0.188rem;
31
+ border-bottom: 0.375rem solid var(--brand-03);
32
+ }
33
+ }
34
+
35
+ .heading:after {
36
+ content: '';
37
+ display: block;
38
+ width: 2rem;
39
+ padding-top: 0.188rem;
40
+ border-bottom: 0.375rem solid var(--brand-03);
41
+ }
42
+
43
+ .card {
44
+ background-color: $ui-02;
45
+ padding-bottom: spacing.$spacing-04;
46
+ }
47
+
48
+ .label {
49
+ font-weight: bold;
50
+ @include type.type-style('label-01');
51
+ color: colors.$gray-70;
52
+ }
53
+
54
+ .container {
55
+ display: flex;
56
+ flex-direction: row;
57
+ padding-left: 1rem;
58
+ flex-wrap: wrap;
59
+ }
60
+
61
+ .value {
62
+ @include type.type-style('productive-heading-03');
63
+ color: colors.$gray-100;
64
+ }
65
+
66
+ .content {
67
+ margin-top: spacing.$spacing-05;
68
+ width: 30%;
69
+ margin-left: spacing.$spacing-03;
70
+ }
@@ -0,0 +1,156 @@
1
+ type HIVData = {
2
+ whoStage: number;
3
+ whoStageDate: string;
4
+ cd4: string;
5
+ cd4Date: string;
6
+ cd4Percent: string;
7
+ cd4PercentDate: string;
8
+ ldlValue: string;
9
+ ldlDate: string;
10
+ enrolledInHiv: boolean;
11
+ lastEncDetails: {
12
+ startDate: string;
13
+ endDate: string;
14
+ regimenShortDisplay: string;
15
+ regimenLine: string;
16
+ regimenLongDisplay: string;
17
+ changeReasons: string[];
18
+ regimenUuid: string;
19
+ current: boolean;
20
+ };
21
+ };
22
+
23
+ type TBData = {
24
+ tbDiseaseClassification: string;
25
+ tbPatientClassification: string;
26
+ tbTreatmentNumber: string;
27
+ lastTbEncounter: {
28
+ startDate: string;
29
+ endDate: string;
30
+ regimenShortDisplay: string;
31
+ regimenLine: string;
32
+ regimenLongDisplay: string;
33
+ changeReasons: string[];
34
+ regimenUuid: string;
35
+ current: boolean;
36
+ };
37
+ tbDiseaseClassificationDate: String;
38
+ };
39
+
40
+ type MCHMotherData = {
41
+ hivStatus: string;
42
+ hivStatusDate: string;
43
+ onHaart: string;
44
+ onHaartDate: string;
45
+ };
46
+
47
+ export type MCHChildData = {
48
+ currentProphylaxisUsed: string;
49
+ currentProphylaxisUsedDate: string;
50
+ currentFeedingOption: string;
51
+ currentFeedingOptionDate: string;
52
+ milestonesAttained: string;
53
+ milestonesAttainedDate: string;
54
+ heiOutcome: string;
55
+ heiOutcomeDate: string;
56
+ hivStatus: string;
57
+ hivStatusDate: string;
58
+ };
59
+
60
+ export type ProgramSummary = {
61
+ HIV?: HIVData;
62
+ TB?: TBData;
63
+ mchMother?: MCHMotherData;
64
+ mchChild?: MCHChildData;
65
+ };
66
+
67
+ export enum ProgramType {
68
+ HIV = 'HIV',
69
+ TB = 'TB',
70
+ TPT = 'TPT',
71
+ MCH_MOTHER = 'MCH - Mother Services',
72
+ MCH_CHILD = 'MCH - Child Services',
73
+ MCHMOTHER = 'mchMother',
74
+ MCHCHILD = 'mchChild',
75
+ }
76
+
77
+ export type PatientSummary = {
78
+ reportDate: string;
79
+ clinicName: string;
80
+ mflCode: string;
81
+ patientName: string;
82
+ birthDate: string;
83
+ age: string;
84
+ gender: string;
85
+ uniquePatientIdentifier: string;
86
+ nationalUniquePatientIdentifier: string;
87
+ maritalStatus: string;
88
+ height: string;
89
+ weight: string;
90
+ bmi: string;
91
+ oxygenSaturation: string;
92
+ pulseRate: string;
93
+ bloodPressure: string;
94
+ bpDiastolic: string;
95
+ lmp: string;
96
+ respiratoryRate: string;
97
+ dateConfirmedHIVPositive: string;
98
+ firstCd4: string;
99
+ firstCd4Date: string;
100
+ dateEnrolledIntoCare: string;
101
+ whoStagingAtEnrollment: string;
102
+ caxcScreeningOutcome: string;
103
+ stiScreeningOutcome: string;
104
+ familyProtection: string;
105
+ transferInFacility: string;
106
+ patientEntryPoint: string;
107
+ patientEntryPointDate: string;
108
+ nameOfTreatmentSupporter: string;
109
+ relationshipToTreatmentSupporter: string;
110
+ transferInDate: string;
111
+ contactOfTreatmentSupporter: string;
112
+ dateEnrolledInTb: string;
113
+ dateCompletedInTb: string;
114
+ tbScreeningOutcome: string;
115
+ chronicDisease: string;
116
+ previousArtStatus: string;
117
+ dateStartedArt: string;
118
+ whoStageAtArtStart: string;
119
+ cd4AtArtStart: string;
120
+ heightArtInitiation: string;
121
+ firstRegimen: string;
122
+ purposeDrugs: string;
123
+ purposeDate: string;
124
+ iosResults: string;
125
+ currentArtRegimen: string;
126
+ currentWhoStaging: string;
127
+ ctxValue: string;
128
+ dapsone: string;
129
+ onIpt: string;
130
+ allergies: string;
131
+ clinicsEnrolled: string;
132
+ mostRecentCd4: string;
133
+ mostRecentCd4Date: string;
134
+ deathDate: string;
135
+ nextAppointmentDate: string;
136
+ transferOutDate: string;
137
+ transferOutFacility: string;
138
+ viralLoadValue: string;
139
+ viralLoadDate: string;
140
+ allCd4CountResults: Array<cd4Results>;
141
+ allVlResults: vlResults;
142
+ };
143
+
144
+ type cd4Results = {
145
+ cd4Count: string;
146
+ cd4CountDate: string;
147
+ };
148
+
149
+ type vlResults = {
150
+ value: Array<vl>;
151
+ };
152
+
153
+ type vl = {
154
+ vl?: string;
155
+ vlDate?: string;
156
+ };
@@ -0,0 +1 @@
1
+ {}
package/tsconfig.json ADDED
@@ -0,0 +1,5 @@
1
+ {
2
+ "extends": "../../tsconfig.json",
3
+ "include": ["src/**/*"],
4
+ "exclude": ["src/**/*.test.tsx", "src/**/*.outdated.tsx"]
5
+ }
@@ -0,0 +1 @@
1
+ module.exports = require("openmrs/default-webpack-config");