Skip to content

Commit

Permalink
Merge pull request #610 from masslight/duplicate-visit
Browse files Browse the repository at this point in the history
Remove duplicate appointments
  • Loading branch information
AykhanAhmadli authored Nov 21, 2024
2 parents 392bd03 + 76f1a7d commit 17b3ae7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/telemed-ehr/zambdas/src/get-appointments/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ export const index = async (input: ZambdaInput): Promise<APIGatewayProxyResult>
const healthcareServiceIdToResourceMap: Record<string, HealthcareService> = {};

searchResultsForSelectedDate.forEach((resource) => {
if (resource.resourceType === 'Appointment') {
if (resource.resourceType === 'Appointment' && (resource as Appointment).serviceType?.[0]?.text === 'in-person') {
allAppointments.push(resource as Appointment);
} else if (resource.resourceType === 'Patient' && resource.id) {
patientIdMap[resource.id] = resource as Patient;
Expand Down

0 comments on commit 17b3ae7

Please sign in to comment.