Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1350 Add CQ PD to patient update #1661

Merged
merged 2 commits into from
Feb 25, 2024
Merged

Conversation

leite08
Copy link
Member

@leite08 leite08 commented Feb 24, 2024

Ref. metriport/metriport-internal#1350

Dependencies

none

Description

  • Add CQ PD to patient update
  • Fix PD response schema

Testing

  • Local
    • Patient create triggers PD to IHE GW
    • Patient update triggers PD to IHE GW
    • Patient update adds address location to Patient
    • PD response gets processed and stored on the DB
    • Patient gets links updated

Release Plan

  • nothing special

Comment on lines +58 to +63
const addressWithCoordinates = await addCoordinatesToAddresses({
addresses: patientUpdate.address,
patient: patientUpdate,
reportRelevance: true,
});
if (addressWithCoordinates) patientUpdate.address = addressWithCoordinates;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was no reason to have this inside the DB tx, moved to improve performance of the platform as a whole.

Comment on lines -130 to -138
// temp solution until we migrate to FHIR
const fhirPatient = toFHIR(updatedPatient);
await upsertPatientToFHIRServer(updatedPatient.cxId, fhirPatient);

// TODO: #393 declarative, event-based integration
// Intentionally asynchronous - it takes too long to perform
cwCommands.patient
.update(updatedPatient, facilityId)
.catch(processAsyncError(`cw.patient.update`));
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved to inside updatePatient so the command does all its needed when we update a patient

@leite08 leite08 force-pushed the 1350-trigger-dq-on-patient-udpate branch from 9768841 to 32b6496 Compare February 25, 2024 19:20
Copy link
Member

@Goncharo Goncharo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit: - one flag

@leite08 leite08 merged commit 9dd53ac into develop Feb 25, 2024
7 checks passed
@leite08 leite08 deleted the 1350-trigger-dq-on-patient-udpate branch February 25, 2024 20:27
@RamilGaripov RamilGaripov mentioned this pull request Feb 26, 2024
16 tasks
Copy link

🎉 This PR is included in version 5.63.0-develop.7 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Copy link

🎉 This PR is included in version 5.64.0-develop.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Copy link

🎉 This PR is included in version 5.64.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants