@kenyaemr/esm-care-panel-app 5.4.1-pre.1874 → 5.4.1-pre.1878

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/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.1874"}
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.1878"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kenyaemr/esm-care-panel-app",
3
- "version": "5.4.1-pre.1874",
3
+ "version": "5.4.1-pre.1878",
4
4
  "description": "Patient care panels microfrontend for the OpenMRS SPA",
5
5
  "browser": "dist/kenyaemr-esm-care-panel-app.js",
6
6
  "main": "src/index.ts",
@@ -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}> {cd4.cd4Count} </span>
657
- <span className={styles.label}>
658
- {formattedDate ? formatDate(formattedDate) : 'Invalid date'}
659
- </span>
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
  );