Skip to content

Commit

Permalink
Merge branch 'main' into new-discharge
Browse files Browse the repository at this point in the history
  • Loading branch information
its-kios09 authored Nov 12, 2024
2 parents bd079af + 8c2c1a2 commit 545aac8
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
4 changes: 2 additions & 2 deletions packages/esm-patient-clinical-view-app/src/hooks/usePeers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ function getPeer(relationship: Relationship, config: ConfigObject, person: 'pers
relationshipType: relationship.relationshipType.bIsToA,
patientUuid: relationship[person].uuid,
gender: relationship[person].gender,
startDate: !relationship.startDate ? null : formatDate(parseDate(relationship.startDate)),
startDate: !relationship.startDate ? null : relationship.startDate,
age: relationship[person].age,
endDate: !relationship.endDate ? null : formatDate(parseDate(relationship.endDate)),
endDate: !relationship.endDate ? null : relationship.endDate,
} as Peer;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ const PeerCalendarMetricsHeader: React.FC<PeerCalendarMetricsHeaderProps> = ({
<MetricsCard title={t('total', 'Total')} header={t('totalPeers', 'Total Peers')} value={peers.length} />
<MetricsCard
title={t('pending', 'Pending')}
header={t('pendingPeers', 'Pending Peers')}
header={t('pendingDocumentations', 'Pending Documentation')}
value={peers.length - completedPeers.length}
/>
<MetricsCard
title={t('completed', 'Completed')}
header={t('completedPeers', 'Completed Peers')}
header={t('completedDocumentations', 'Completed Documentation')}
value={completedPeers.length}
/>
</Layer>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DataTableSkeleton } from '@carbon/react';
import { ConfigurableLink, useSession } from '@openmrs/esm-framework';
import { ConfigurableLink, formatDate, parseDate, useSession } from '@openmrs/esm-framework';
import { ErrorState } from '@openmrs/esm-patient-common-lib';
import React, { useEffect, useState } from 'react';
import { useTranslation } from 'react-i18next';
Expand Down Expand Up @@ -89,8 +89,14 @@ const PeerCalendarTable: React.FC<PeerCalendarTableProps> = ({
),
age: peer.age ?? '--',
contact: peer.contact ?? '--',
startDate: peer.patientUuid === peerEducatorUuid ? '--' : peer.startDate ?? '--',
endDate: peer.patientUuid === peerEducatorUuid ? '--' : peer.endDate ?? '--',
startDate:
peer.patientUuid === peerEducatorUuid
? '--'
: peer.startDate
? formatDate(parseDate(peer.startDate))
: '--',
endDate:
peer.patientUuid === peerEducatorUuid ? '--' : peer.endDate ? formatDate(parseDate(peer.endDate)) : '--',
status: (
<PeerCompletionStatus
peer={peer}
Expand Down
4 changes: 2 additions & 2 deletions packages/esm-patient-clinical-view-app/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"clinicalEncounter": "Clinical Encounter",
"clinicalViews": "Clinical views",
"completed": "Completed",
"completedPeers": "Completed Peers",
"completedDocumentations": "Completed Documentation",
"contact": "Contact",
"contactCreated": "Contact created",
"contacted": "Contacted",
Expand Down Expand Up @@ -130,7 +130,7 @@
"partographData": "Vital Components",
"peerCalendar": "Peer Calendar",
"pending": "Pending",
"pendingPeers": "Pending Peers",
"pendingDocumentations": "Pending Documentation",
"placeOfDelivery": "Place of Delivery",
"pnsAproach": "PNS Aproach",
"populationType": "Population type",
Expand Down

0 comments on commit 545aac8

Please sign in to comment.