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

ihe stack 3/4 - DQ Response #1362

Merged
merged 32 commits into from
Jan 26, 2024
Merged

ihe stack 3/4 - DQ Response #1362

merged 32 commits into from
Jan 26, 2024

Conversation

jonahkaye
Copy link
Member

@jonahkaye jonahkaye commented Dec 21, 2023

Ticket: #1379

Dependencies

Description

  • generating metadata response objects for DQs when customers upload documents
  • implementing proper DQ responses

Testing

  • Local
    • used the core component in utils, and uploaded a file, inserted a docRef into local hapi fhir server, and then ran document upload handler and it successfully created metadata file is s3
  • Staging
    • branch to staging

Release Plan

  • Merge this
  • This still doesn't touch production live code. Downstream PR is the one that will

@jonahkaye jonahkaye changed the title 1379 incoming dq dr ihe stack 3/4 - iti38 and iti39 Dec 21, 2023
@jonahkaye jonahkaye self-assigned this Dec 21, 2023
@jonahkaye jonahkaye changed the base branch from develop to 574-mpi-v2 December 21, 2023 05:40
@jonahkaye jonahkaye mentioned this pull request Dec 21, 2023
9 tasks
@jonahkaye jonahkaye changed the title ihe stack 3/4 - iti38 and iti39 ihe stack 3/4 - iti38 Dec 29, 2023
const { size, contentType, eTag } = await s3Utils.getFileInfoFromS3(
destinationKey,
destinationBucket
);
Copy link
Member Author

Choose a reason for hiding this comment

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

eTag is md5 hash of document. At documents greater than 5gb this is not exactly true but good enough for now.

@@ -62,7 +62,7 @@ export type DocumentQueryRequestIncoming = z.infer<typeof documentQueryRequestIn

export type DocumentQueryResponseOutgoing =
| (BaseResponse & {
documentReference: DocumentReference[];
extrinsicObjectXmls: string[];
})
Copy link
Member Author

Choose a reason for hiding this comment

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

updating sdk

@jonahkaye jonahkaye mentioned this pull request Jan 4, 2024
9 tasks
@jonahkaye jonahkaye changed the title ihe stack 3/4 - iti38 ihe stack 3/4 - DQ Response Jan 4, 2024
@jonahkaye jonahkaye marked this pull request as ready for review January 5, 2024 15:45
Copy link

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

The release is available on GitHub release

Your semantic-release bot 📦🚀

const uniqueId = createPatientUniqueId(patient.cxId, patient.id);
const updatedPatient: Patient = {
...patient,
id: uniqueId,
Copy link
Member

Choose a reason for hiding this comment

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

I think we should store uniqueId on a property other than id... this will be super confusing when we try to debug and/or reuse this endpoint (id is the patient ID, not something else). If the lambda needs to convert it to something else when responding to CQ, that's cool, but that's a lambda's job IMO.

Copy link
Member Author

Choose a reason for hiding this comment

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

the issue is we the docIds needs to be made of the cxId and patientId in order to support the flow we have with retrieving metadata files from s3. PatientDTO in api-sdk understandably does not return cxID, so the best place to do this is here. I think this is not worth changing since odds are we will move domain to core before we reuse this endpoint for anything else, and then we wont need the endpoint at all since the lambda can read from db directly and all this code will be refactored.

I can't think of any upcoming situations where we will resuse this endpoint in the near future I think this is the best solution for now

packages/core/src/external/aws/s3.ts Show resolved Hide resolved
packages/core/src/external/aws/s3.ts Show resolved Hide resolved
packages/core/src/external/aws/s3.ts Show resolved Hide resolved
packages/utils/src/carequality/mock-dq.ts Show resolved Hide resolved
@jonahkaye jonahkaye mentioned this pull request Jan 26, 2024
3 tasks
Copy link
Member Author

@jonahkaye jonahkaye left a comment

Choose a reason for hiding this comment

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

Nits addressed here: fdb3373

Copy link

🎉 This PR is included in version 5.49.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

4 participants