-
Notifications
You must be signed in to change notification settings - Fork 39
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
Building and Testing Fern Definitions #1217
Merged
Merged
Changes from 12 commits
Commits
Show all changes
57 commits
Select commit
Hold shift + click to select a range
e3d3964
feat(sdk): java tests move and first test rewritten
jonahkaye 4019e89
feat(sdk): create facility
jonahkaye a017b8f
feat(sdk): waiting on contacts definition release
jonahkaye cd178b0
Merge branch 'develop' into 1212-test-migration-python-sdk-tests
jonahkaye e080497
feat(sdk): yaml def changes and get,post working
jonahkaye d1caa48
feat(sdk): yaml def changes and get,post working
jonahkaye 5dde81d
feat(sdk): updating defiitions
jonahkaye b0e540d
feat(sdk): updating defiitions
jonahkaye 609f3a4
feat(sdks): requestdd for documentquery in fern
jonahkaye c725147
feat(sdks): list document request update fern
jonahkaye cb88978
feat(sdks): update document reference, createDocumentReference endpoint
jonahkaye ff95013
feat(sdks): compiling
jonahkaye 46d8f9c
feat(sdks): testing changes complete. waiting on bug resolution and f…
jonahkaye 4652dc3
🌿 Metriport Fern Definition exports FHIR schemas (#1188)
dsinghvi cb117bd
feat(sdks): merged deeps changes
jonahkaye e227774
feat(sdks): update reqs
jonahkaye 39fd99e
Merge branch 'develop' into 1212-test-migration-python-sdk-tests
jonahkaye df2433b
🌿 Setup Local Java Project to setup Java SDK Testing (#1220)
dsinghvi eb51d87
feat(sdks): organizing things properly
jonahkaye d6d92d7
feat(sdks): removing fhir
jonahkaye 2fd0655
feat(sdks): merging w/ develop
jonahkaye f833366
feat(sdk): java code
jonahkaye e5463b1
feat(sdk): java bug I cant solv. I think fern issue
jonahkaye 86ed8bd
feat(sdk): java bug I cant solv. I think fern issue
jonahkaye 2556a8b
add back in fern deps and bump generator versions
armandobelardo 8d6598c
Merge pull request #1326 from armandobelardo/fern/fhir-confirm
jonahkaye 3b3591d
feat(fern): adding fhir and updating java fern version
jonahkaye d7dc2cd
feat(sdks): merging develop to branch
jonahkaye 3ed246e
bump FHIR and Java Fern versions to actually compile
armandobelardo 604a1a6
testing ts as well
armandobelardo 89d6450
Merge pull request #1359 from armandobelardo/ab/compile
jonahkaye b9f4673
feat(sdks): updating get consolidated status response type
jonahkaye 9b3d7e4
feat(sdks): python and java work. ts wip
jonahkaye 7603f5d
feat(sdks): ts working
jonahkaye 1b18922
feat(sdks): python tests passing and modifications to fern def
jonahkaye 3d904b6
feat(sdks): pushing java code for deep
jonahkaye 165e02d
feat(sdks): states lowercased in typescript
jonahkaye e3da22e
feat(sdks): typescript tests passing
jonahkaye c31a203
feat(sdks): merging to develop
jonahkaye 5fad20a
feat(sdks): nits
jonahkaye 7cb53c9
feat(sdks): scripts for easy running
jonahkaye 6cbfb97
feat(sdks): fern gen in script
jonahkaye fb4ac8d
feat(sdks): rebasing
jonahkaye d532230
feat(sdks): webhook types
jonahkaye d134716
feat(sdks): validating first webhook def
jonahkaye 3792b1a
feat(sdks): readme
jonahkaye 6576526
feat(sdks): bundle extension deep pls take a look
jonahkaye 13299bf
feat(sdks): resource not defined error
jonahkaye 4e538e6
feat(sdk): debugging with deep and handoff
jonahkaye fa8e6ac
Revert "feat(sdk): debugging with deep and handoff"
jonahkaye e89bf68
feat(sdks): fixed node webhook types
jonahkaye 92be8cd
Merge branch 'develop' into 1212-test-migration-python-sdk-tests
jonahkaye 84b6d07
Merge branch 'develop' into 1212-test-migration-python-sdk-tests
jonahkaye 99e288e
feat(sdks): pairing with ramil for his pr for fern
jonahkaye 9f4a0ac
feat(sdks): merging develop to branch
jonahkaye ec5c1c4
feat(sdks): responding to nits
jonahkaye 90dd1eb
Merge branch 'develop' into 1212-test-migration-python-sdk-tests
jonahkaye File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/fern-api/fern/main/fern.schema.json | ||
imports: | ||
commons: ../commons.yml | ||
|
||
service: | ||
base-path: /medical/v1/document | ||
|
@@ -32,16 +34,22 @@ service: | |
facilityId: | ||
docs: The ID of the Facility where the patient is receiving care. | ||
type: string | ||
body: | ||
docs: | | ||
Metadata holds a record of up to 50 custom string key-value pairs. Key names can be up to 40 characters long and values up to 500 characters long. | ||
This metadata will be returned in the webhook response. | ||
type: optional<map<string, string>> | ||
response: DocumentQuery | ||
examples: | ||
- name: Example1 | ||
query-parameters: | ||
patientId: "12345678" | ||
facilityId: "12345678" | ||
request: {"youCan": "putAny", "stringKeyValue": "pairsHere"} | ||
response: | ||
body: $DocumentQuery.Example1 | ||
|
||
getQueryStatus: | ||
getQueryStatus: | ||
display-name: Get Document Query Status | ||
docs: | | ||
Returns the document query status for the specified patient. | ||
|
@@ -79,25 +87,19 @@ service: | |
patientId: | ||
docs: The ID of the Patient for which to list available Documents. | ||
type: string | ||
facilityId: | ||
docs: The ID of the Facility where the patient is receiving care. | ||
type: string | ||
dateFrom: | ||
docs: The start date (inclusive) for which to filter returned documents - formatted `YYYY-MM-DD` as per ISO 8601. If not provided, no start date filter will be applied. | ||
type: optional<string> | ||
dateTo: | ||
docs: The end date (inclusive) for which to filter returned documents - formatted `YYYY-MM-DD` as per ISO 8601. If not provided, no end date filter will be applied. | ||
type: optional<string> | ||
content: | ||
docs: | | ||
Value to search on the document reference (minimum 3 chars). | ||
jonahkaye marked this conversation as resolved.
Show resolved
Hide resolved
|
||
type: optional<string> | ||
response: | ||
type: ListDocumentsResponse | ||
type: MedplumDocumentReference | ||
docs: An array of objects describing the Documents that can be retrieved for the Patient. | ||
examples: | ||
- name: Example1 | ||
query-parameters: | ||
patientId: "12345678" | ||
facilityId: "12345678" | ||
response: | ||
body: $ListDocumentsResponse.Example1 | ||
|
||
getURL: | ||
display-name: Get Document URL | ||
|
@@ -129,12 +131,42 @@ service: | |
conversionType: "pdf" | ||
response: | ||
body: $DocumentUrl.Example1 | ||
|
||
createDocumentReference: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was a missing endpoint I added |
||
display-name: Upload Document | ||
docs: | | ||
Creates a DocumentReference and returns its ID and a URL to use for a medical document upload to our servers. | ||
method: POST | ||
path: /upload | ||
request: | ||
name: UploadDocumentRequest | ||
query-parameters: | ||
patientId: | ||
docs: The ID of the Patient for which to list available Documents. | ||
type: string | ||
body: | ||
docs: | | ||
A FHIR DocumentReference. | ||
type: UploadDocumentReference | ||
response: | ||
type: UploadDocumentResponse | ||
docs: The DocumentReference ID and a URL to be used for file upload. | ||
examples: | ||
- name: Example1 | ||
query-parameters: | ||
patientId: "12345678" | ||
request: $UploadDocumentReference.Example1 | ||
response: | ||
body: $UploadDocumentResponse.Example1 | ||
|
||
types: | ||
DocumentQuery: | ||
properties: | ||
download: optional<Progress> | ||
convert: optional<Progress> | ||
requestId: | ||
type: optional<string> | ||
docs: The ID of the Document Query. | ||
examples: | ||
- name: Example1 | ||
value: | ||
|
@@ -177,16 +209,11 @@ types: | |
- html | ||
|
||
ListDocumentsResponse: | ||
MedplumDocumentReference: | ||
properties: | ||
documents: list<DocumentReference> | ||
examples: | ||
- name: Example1 | ||
value: | ||
documents: | ||
- $DocumentReference.Example1 | ||
documents: list<map<string, unknown>> | ||
|
||
DocumentReference: | ||
DocumentReferenceDocumentWebhook: | ||
properties: | ||
id: | ||
type: string | ||
|
@@ -265,6 +292,62 @@ types: | |
code: "62479008" | ||
display: Diagnoses | ||
|
||
|
||
UploadDocumentReference: | ||
properties: | ||
description: | ||
type: string | ||
docs: A brief description of the document - for example Discharge Summary | ||
type: | ||
type: CodeableConcept | ||
docs: A CodeableConcept of the document type. | ||
context: | ||
type: list<DocumentReferenceContext> | ||
docs: Context of the document content. | ||
examples: | ||
- name: Example1 | ||
value: | ||
description: "Third degree wrist burn treatment" | ||
type: | ||
text: "Burn management Hospital Progress note" | ||
coding: | ||
- code: "100556-0" | ||
system: "http://loinc.org" | ||
display: "Burn management Hospital Progress note" | ||
context: [$DocumentReferenceContext.Example1] | ||
|
||
|
||
DocumentReferenceContext: | ||
properties: | ||
period: | ||
type: optional<commons.Period> | ||
docs: The time period over which the document was created. | ||
facilityType: | ||
type: optional<CodeableConcept> | ||
docs: The kind of facility where the patient was seen. | ||
examples: | ||
- name: Example1 | ||
value: | ||
period: | ||
start: "2023-10-10T14:14:17Z" | ||
end: "2023-10-10T15:30:30Z" | ||
facilityType: | ||
text: "John Snow Clinic - Acute Care Centre" | ||
|
||
UploadDocumentResponse: | ||
properties: | ||
documentReferenceId: | ||
type: string | ||
docs: The ID of the DocumentReference. | ||
uploadUrl: | ||
type: string | ||
docs: The URL to use for uploading the document. | ||
examples: | ||
- name: Example1 | ||
value: | ||
documentReferenceId: "<DocumentReference-ID-string>" | ||
uploadUrl: "<url-string>" | ||
|
||
DocumentUrl: | ||
docs: A json object containing the URL will be returned. | ||
properties: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,62 +6,90 @@ service: | |
audiences: | ||
- public | ||
endpoints: | ||
startConsolidatedQuery: | ||
display-name: Start Consolidated Data Query | ||
docs: Trigger a consolidated data query for the given patient | ||
method: POST | ||
# startConsolidatedQuery: | ||
# display-name: Start Consolidated Data Query | ||
# docs: Trigger a consolidated data query for the given patient | ||
# method: POST | ||
# path: /patient/{id}/consolidated/query | ||
# path-parameters: | ||
# id: | ||
# type: string | ||
# docs: The ID of the Patient. | ||
# request: | ||
# name: GetPatientConsolidatedData | ||
# query-parameters: | ||
# resources: | ||
# docs: | | ||
# A comma separated, case sensitive list of resources to be returned. | ||
# If none are provided all resources will be included. | ||
# type: optional<string> | ||
# dateFrom: | ||
# docs: | | ||
# The start date (inclusive) for which to filter returned resources - | ||
# formatted `YYYY-MM-DD` as per ISO 8601. If not provided, | ||
# no start date filter will be applied. | ||
# type: optional<string> | ||
# dateTo: | ||
# docs: | | ||
# The end date (inclusive) for which to filter returned resources - | ||
# formatted `YYYY-MM-DD` as per ISO 8601. If not provided, | ||
# no end date filter will be applied. | ||
# type: optional<string> | ||
# conversionType: | ||
# docs: | | ||
# The doc type to convert to. Either html or pdf. | ||
# type: optional<string> | ||
# body: | ||
# docs: | | ||
# Metadata holds a record of up to 50 custom string key-value pairs. Key names can be up to 40 characters long and values up to 500 characters long. | ||
# This metadata will be returned in the webhook response. | ||
# type: optional<map<string, string>> | ||
|
||
# response: | ||
# type: StartConsolidatedQueryResponse | ||
# docs: Returns a Bundle that contains a property entry which is simply an array of FHIR resources. | ||
# examples: | ||
# - path-parameters: | ||
# id: "12345678" | ||
# response: | ||
# body: | ||
# status: processing | ||
|
||
getConsolidatedQueryStatus: | ||
display-name: Get Consolidated Data Query status | ||
docs: Get the status of querying for patient's consolidated data. | ||
method: GET | ||
path: /patient/{id}/consolidated/query | ||
path-parameters: | ||
id: | ||
type: string | ||
docs: The ID of the Patient. | ||
request: | ||
name: GetPatientConsolidatedData | ||
query-parameters: | ||
resources: | ||
docs: | | ||
A comma separated, case sensitive list of resources to be returned. | ||
If none are provided all resources will be included. | ||
type: optional<string> | ||
dateFrom: | ||
docs: | | ||
The start date (inclusive) for which to filter returned resources - | ||
formatted `YYYY-MM-DD` as per ISO 8601. If not provided, | ||
no start date filter will be applied. | ||
type: optional<string> | ||
dateTo: | ||
docs: | | ||
The end date (inclusive) for which to filter returned resources - | ||
formatted `YYYY-MM-DD` as per ISO 8601. If not provided, | ||
no end date filter will be applied. | ||
type: optional<string> | ||
docs: The ID of the Patient | ||
response: | ||
type: StartConsolidatedQueryResponse | ||
docs: Returns a Bundle that contains a property entry which is simply an array of FHIR resources. | ||
type: GetConsolidatedQueryStatusResponse | ||
examples: | ||
- path-parameters: | ||
- name: Example1 | ||
path-parameters: | ||
id: "12345678" | ||
response: | ||
body: | ||
status: processing | ||
body: $GetConsolidatedQueryStatusResponse.Example0 | ||
|
||
getConsolidatedQueryStatus: | ||
display-name: Get Consolidated Data Query status | ||
docs: Get the status of querying for patient's consolidated data. | ||
method: GET | ||
path: /patient/{id}/consolidated/query | ||
createPatientConsolidated: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. added missing endpoint |
||
display-name: Create Patient's Consolidated Data | ||
docs: Create Patient's Consolidated Data with a FHIR Bundle. | ||
method: PUT | ||
path: /patient/{id}/consolidated | ||
path-parameters: | ||
id: | ||
type: string | ||
docs: The ID of the Patient | ||
response: | ||
type: GetConsolidatedQueryStatusResponse | ||
type: TransactionResponse | ||
examples: | ||
- name: Example1 | ||
path-parameters: | ||
id: "12345678" | ||
response: | ||
body: $GetConsolidatedQueryStatusResponse.Example0 | ||
body: $TransactionResponse.Example0 | ||
|
||
countPatientData: | ||
display-name: Count Patient Data | ||
|
@@ -150,6 +178,28 @@ types: | |
no end date filter will be applied. | ||
type: optional<string> | ||
|
||
TransactionResponse: | ||
properties: | ||
resourceType: | ||
type: string | ||
docs: The type of the FHIR resource. For a transaction response, this is always "Bundle". | ||
id: | ||
type: string | ||
docs: A unique identifier for this transaction response. | ||
type: | ||
type: string | ||
docs: The type of the bundle, which is "transaction-response" in this case. | ||
entry: | ||
type: list<map<string, unknown>> | ||
docs: An array of responses for each transaction in the bundle. Each entry can be any arbitrary JSON object. | ||
examples: | ||
- name: Example0 | ||
value: | ||
resourceType: "Bundle" | ||
id: "12345" | ||
type: "transaction-response" | ||
entry: [{ "resourceId": "abc123", "status": "created", "details": "Resource created successfully" }] | ||
|
||
ResourcesSearchableByPatient: | ||
enum: | ||
- Account | ||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
modified to match endpoint definition.