-
Notifications
You must be signed in to change notification settings - Fork 40
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
1413 cq doc retrieval #1437
1413 cq doc retrieval #1437
Conversation
- add AsyncLocalStorage and update logs to include the request ID Ref: metriport/metriport-internal#1040
- remove deprecated updateDocQuery - move jobId create/decompose to single place Ref: metriport/metriport-internal#1040
@leite08 it was merged into develop so there is no more upstream branch as this is pointing there now |
packages/api/src/external/carequality/document/create-outbound-document-retrieval-req.ts
Outdated
Show resolved
Hide resolved
packages/api/src/external/carequality/document/process-outbound-document-query-resps.ts
Outdated
Show resolved
Hide resolved
if (content) { | ||
const metriportFHIRContent = createDocReferenceContent({ | ||
...baseAttachment, | ||
location: location, | ||
extension: [metriportDataSourceExtension], | ||
}); | ||
|
||
return [...content, metriportFHIRContent]; | ||
} | ||
|
||
const cqFHIRContent = createDocReferenceContent({ | ||
...baseAttachment, | ||
location: location, | ||
extension: [cqExtension], | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still don't understand this. AFAIK:
- doc refs downloaded from HIE have the respective HIE extension;
- doc refs contributed by cxs have the Metriport extension.
I don't see how having content
or not indicates that. If that's because we don't have content when in a certain flow, this is error prone, as if we change the flow to have the content at that point, its not obvious from there that this function works like this.
|
||
const docId = docRef.metriportId ?? ""; | ||
|
||
const fhirDocRef = cqToFHIR(docId, docRef, patientId, true, currentFHIRDocRef[0]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make currentFHIRDocRef
be a single object, please? Its confusing to read the code and see both currentFHIRDocRefs
and currentFHIRDocRef
be an array.
|
||
export const cqToFHIR = ( | ||
docId: string, | ||
doc: IHEGWDocumentReference, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: doc > docRef
🎉 This PR is included in version 5.63.0-develop.4 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 5.64.0-develop.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 5.64.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Ticket: #1413
Description
Add doc retrieval for CQ flow
Testing
Wont be able to test until we have infra setup in staging. This code can be merged though as it should not be triggered in staging or prod.
Release Plan
Once the infra gets merged ill will edit the trigger to be called in the cloud so we can test