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

1040 Update WH docs #2284

Merged
merged 3 commits into from
Jun 19, 2024
Merged

1040 Update WH docs #2284

merged 3 commits into from
Jun 19, 2024

Conversation

leite08
Copy link
Member

@leite08 leite08 commented Jun 15, 2024

Ref. metriport/metriport-internal#1040

Dependencies

none

Description

Update WH documentation, including removing DAPI from WH.

Global WH page

Before After
image image

MAPI WH page

Before After
image image

Testing

  • Local
    • docs render
  • Staging
    • none
  • Sandbox
    • none
  • Production
    • none

Release Plan

  • Merge this

@leite08 leite08 marked this pull request as ready for review June 15, 2024 21:27
Copy link
Member

@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.

approve conditional on fixing typo and comment

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.

Thank you for taking care of this @leite08 ❤️

Generally LGTM - left some minor comments for improvements

1. Accepts and responds to a [`ping` message](#the-ping-message);
1. Be [idempotent](https://en.wikipedia.org/wiki/Idempotence) - it should accept being called more
Copy link
Member

Choose a reason for hiding this comment

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

Some thoughts/Qs:

  • Is the "idempotent" requirement essentially just telling the cx that we always expect a 200 HTTP response? Perhaps we should just tell them that, since we don't really care what they do on their end?
  • We've had problems where cx webhook endpoints take a long time to process the payload, and we timeout waiting for the response. Should we instruct them to process the payload async and return us 200 right away?

Copy link
Member Author

Choose a reason for hiding this comment

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

Is the "idempotent" requirement essentially just telling the cx that we always expect a 200 HTTP response? Perhaps we should just tell them that, since we don't really care what they do on their end?

No, saying it should be idempotent is not the same thing as saying it should always return 200. They need to design their endpoint in a way that allows it being called multiple times w/ the same payload w/o breaking their app.

We've had problems where cx webhook endpoints take a long time to process the payload, and we timeout waiting for the response. Should we instruct them to process the payload async and return us 200 right away?

Good point, added!

Comment on lines 42 to 44
When Metriport sends a webhook message, it includes an `x-metriport-signature` header.

- `x-metriport-signature`: This is an [HMAC](https://en.wikipedia.org/wiki/HMAC) SHA-256 hash computed using your webhook key and the body of the webhook message.
Copy link
Member

Choose a reason for hiding this comment

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

nit: formatting here is a bit weird - suggestion to combine the two:

When Metriport sends a webhook message, it includes an x-metriport-signature header - this is an HMAC SHA-256 hash computed using your webhook key and the body of the webhook message.

The previous method of authenticating webhooks, comparing your webhook key with the `x-webhook-key` in each request's HTTP header, is being deprecated on **December 9th, 2023**.
Please update your implementation to use the `x-metriport-signature` header for authentication.
The previous method of authenticating webhooks, comparing your webhook key with the
`x-webhook-key` in each request's HTTP header, is being deprecated on **December 9th, 2023**.
Copy link
Member

Choose a reason for hiding this comment

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

let's update the date, or take this out?

we're a bit past December 9th, 2023 😛

Copy link
Member Author

Choose a reason for hiding this comment

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

Missed that, removed!

Comment on lines 55 to 56
you'll be able to query for [patient consolidated data](#patient-consolidated-data) in
FHIR-compliant format.
Copy link
Member

Choose a reason for hiding this comment

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

for consistency - let's link to the endpoint they can use to do the query as per above, not the webhook message

Comment on lines +26 to +34
- `medical.document-download`: result of Document Query, containing the newly downloaded documents
for the patient - see [details](#patient-document-data) below;
- `medical.document-conversion`: result of converting the newly downloaded C-CDA documents into FHIR -
see [details](#patient-document-data) below;
- `medical.document-bulk-download-urls`: list of download urls for a patient's documents, see
[details](#bulk-document-download-urls) below;
- `medical.consolidated-data`: result of a Consolidated Data Query, containing the patient's data in FHIR
format - see [details](#patient-consolidated-data) below.

Copy link
Member

Choose a reason for hiding this comment

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

while we're at it - let's add mention of these types to each endpoint page?

ie for example https://docs.metriport.com/medical-api/api-reference/document/start-document-query should mention that medical.document-download and medical.document-conversion will be sent, and we can link do this page for details

@leite08
Copy link
Member Author

leite08 commented Jun 18, 2024

Updates:

General Webhook section

  • add requirement about response time
  • update first paragraph about auth

image

Start consolidated data query

image

Start document query

image

Start Bulk Get Document URL

Before After
image image

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.

🚢

@leite08 leite08 added this pull request to the merge queue Jun 19, 2024
Merged via the queue into develop with commit 4f7c54f Jun 19, 2024
7 checks passed
@leite08 leite08 deleted the 1040-update-wh-docs branch June 19, 2024 18:49
@leite08 leite08 mentioned this pull request Jun 19, 2024
15 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants