@kenyaemr/esm-care-panel-app 5.4.1-pre.1874 → 5.4.1-pre.1880
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.
- package/.turbo/turbo-build.log +9 -9
- package/dist/933.js +1 -1
- package/dist/933.js.map +1 -1
- package/dist/kenyaemr-esm-care-panel-app.js.buildmanifest.json +6 -6
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/routes.json +1 -1
- package/package.json +1 -1
- package/src/iit-risk-score/iit-risk-score.component.tsx +4 -3
- package/src/patient-summary/patient-summary.component.tsx +7 -25
package/dist/routes.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"kenyaemr":"^19.0.0"},"pages":[],"extensions":[{"name":"care-panel-patient-summary","component":"carePanelPatientSummary","slot":"patient-chart-care-panel-dashboard-slot","order":10,"meta":{"columnSpan":4}},{"name":"care-panel-summary-dashboard-link","component":"carePanelSummaryDashboardLink","slot":"patient-chart-dashboard-slot","order":3,"meta":{"columns":1,"columnSpan":1,"slot":"patient-chart-care-panel-dashboard-slot","layoutMode":"anchored","path":"Care panel"}},{"name":"delete-regimen-confirmation-dialog","component":"deleteRegimenConfirmationDialog"},{"name":"hiv-patient-visit-summary-dashboard-link","component":"hivPatientSummaryDashboardLink","slot":"hiv-care-and-treatment-slot","meta":{"columns":1,"columnSpan":1,"slot":"patient-chart-hiv-patient-summary-slot","path":"HIV Patient Summary","layoutMode":"anchored"}},{"name":"hiv-patient-visit-summary","slot":"patient-chart-hiv-patient-summary-slot","component":"hivPatientSummary","order":3,"online":true,"offline":false}],"workspaces":[{"name":"patient-regimen-workspace","title":"Patient Regimen","component":"regimenFormWorkspace","type":"form","canMaximize":true,"canHide":true,"width":"wider"}],"version":"5.4.1-pre.
|
|
1
|
+
{"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"kenyaemr":"^19.0.0"},"pages":[],"extensions":[{"name":"care-panel-patient-summary","component":"carePanelPatientSummary","slot":"patient-chart-care-panel-dashboard-slot","order":10,"meta":{"columnSpan":4}},{"name":"care-panel-summary-dashboard-link","component":"carePanelSummaryDashboardLink","slot":"patient-chart-dashboard-slot","order":3,"meta":{"columns":1,"columnSpan":1,"slot":"patient-chart-care-panel-dashboard-slot","layoutMode":"anchored","path":"Care panel"}},{"name":"delete-regimen-confirmation-dialog","component":"deleteRegimenConfirmationDialog"},{"name":"hiv-patient-visit-summary-dashboard-link","component":"hivPatientSummaryDashboardLink","slot":"hiv-care-and-treatment-slot","meta":{"columns":1,"columnSpan":1,"slot":"patient-chart-hiv-patient-summary-slot","path":"HIV Patient Summary","layoutMode":"anchored"}},{"name":"hiv-patient-visit-summary","slot":"patient-chart-hiv-patient-summary-slot","component":"hivPatientSummary","order":3,"online":true,"offline":false}],"workspaces":[{"name":"patient-regimen-workspace","title":"Patient Regimen","component":"regimenFormWorkspace","type":"form","canMaximize":true,"canHide":true,"width":"wider"}],"version":"5.4.1-pre.1880"}
|
package/package.json
CHANGED
|
@@ -41,9 +41,10 @@ const CarePanellIITRiskScore: React.FC<CarePanellIITRiskScoreProps> = ({ patient
|
|
|
41
41
|
);
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
const evaluationDate =
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
const evaluationDate =
|
|
45
|
+
riskScore?.evaluationDate && dayjs(riskScore.evaluationDate).isValid()
|
|
46
|
+
? formatDate(parseDate(riskScore?.evaluationDate))
|
|
47
|
+
: '--';
|
|
47
48
|
|
|
48
49
|
if (error) {
|
|
49
50
|
return <ErrorState error={error} headerTitle={t('iitRiscScore', 'IIT Risk Score')} />;
|
|
@@ -631,32 +631,14 @@ const PatientSummary: React.FC<PatientSummaryProps> = ({ patientUuid }) => {
|
|
|
631
631
|
<p className={styles.label}>{t('cd4Trends', 'CD4 Trends')}</p>
|
|
632
632
|
{data?.allCd4CountResults?.length > 0
|
|
633
633
|
? data?.allCd4CountResults?.map((cd4, index) => {
|
|
634
|
-
let formattedDate: Date | null = null;
|
|
635
|
-
|
|
636
|
-
if (dayjs(cd4.cd4CountDate, 'DD/MM/YYYY', true).isValid()) {
|
|
637
|
-
const parts = cd4.cd4CountDate?.split('/');
|
|
638
|
-
if (parts && parts.length === 3) {
|
|
639
|
-
const day = parseInt(parts[0], 10);
|
|
640
|
-
const month = parseInt(parts[1], 10) - 1; // Subtract 1 since months are zero-based
|
|
641
|
-
const year = parseInt(parts[2], 10);
|
|
642
|
-
|
|
643
|
-
if (!isNaN(day) && !isNaN(month) && !isNaN(year)) {
|
|
644
|
-
formattedDate = new Date(year, month, day);
|
|
645
|
-
|
|
646
|
-
// Check if the date is valid
|
|
647
|
-
if (isNaN(formattedDate.getTime())) {
|
|
648
|
-
formattedDate = null;
|
|
649
|
-
}
|
|
650
|
-
}
|
|
651
|
-
}
|
|
652
|
-
}
|
|
653
|
-
|
|
654
634
|
return (
|
|
655
|
-
<div key={`cd4Trend-${cd4}-${index}`}>
|
|
656
|
-
<span className={styles.value}>
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
635
|
+
<div key={`cd4Trend-${cd4?.cd4Count}-${index}`}>
|
|
636
|
+
<span className={styles.value}>{cd4?.cd4Count}</span>
|
|
637
|
+
{cd4?.cd4Count === 'N/A' || cd4?.cd4Count === '' ? (
|
|
638
|
+
<span>None</span>
|
|
639
|
+
) : (
|
|
640
|
+
<span>( {cd4?.cd4CountDate ? cd4?.cd4CountDate : '--'})</span>
|
|
641
|
+
)}
|
|
660
642
|
<br />
|
|
661
643
|
</div>
|
|
662
644
|
);
|