From f62cd79be318ee06830d2b9f5f9e9be8235b3c91 Mon Sep 17 00:00:00 2001 From: Kevin Shekleton Date: Sat, 29 Sep 2018 12:11:45 -0400 Subject: [PATCH 1/7] Connectathon updates to align with 1.0 --- cds-hooks.yaml | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/cds-hooks.yaml b/cds-hooks.yaml index ff221d2..8e75bcb 100644 --- a/cds-hooks.yaml +++ b/cds-hooks.yaml @@ -25,7 +25,7 @@ paths: 200: description: Success (includes CDS service metadata) schema: - $ref: '#/definitions/CDS Service Information' + $ref: '#/definitions/CDS%20Service%20Information' /cds-services/{id}: post: @@ -41,12 +41,12 @@ paths: description: Body of CDS service request required: true schema: - $ref: '#/definitions/CDS Request' + $ref: '#/definitions/CDS%20Request' responses: 200: description: Success (includes CDS Cards and Decisions) schema: - $ref: '#/definitions/CDS Response' + $ref: '#/definitions/CDS%20Response' /cds-services/{id}/analytics/{uuid}: post: @@ -76,7 +76,7 @@ definitions: services: type: array items: - $ref: '#/definitions/CDS Service' + $ref: '#/definitions/CDS%20Service' CDS Service: type: object @@ -106,20 +106,12 @@ definitions: fhirServer: type: string format: url - oauth: + fhirAuthorization: type: object - redirect: - type: string user: type: string - patient: - type: string - encounter: - type: string context: - type: array - items: - type: object + type: object prefetch: type: object @@ -145,7 +137,7 @@ definitions: enum: - info - warning - - hard-stop + - critical source: $ref: '#/definitions/Source' suggestions: @@ -173,6 +165,9 @@ definitions: url: type: string format: url + icon: + type: string + format: url Link: type: object @@ -184,6 +179,8 @@ definitions: format: url type: type: string + appContext: + type: string Suggestion: type: object From 8abd5117244424c1c43064196d045139ee08d634 Mon Sep 17 00:00:00 2001 From: Kevin Shekleton Date: Sat, 12 Jan 2019 05:22:28 -0600 Subject: [PATCH 2/7] Updates to bring the API in line with the 1.0 specification. - Remove analytics endpoint - Remove user from the request - Remove decisions from the card response - Add selectionBehavior to suggestions --- cds-hooks.yaml | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/cds-hooks.yaml b/cds-hooks.yaml index 8e75bcb..28f8235 100644 --- a/cds-hooks.yaml +++ b/cds-hooks.yaml @@ -44,28 +44,10 @@ paths: $ref: '#/definitions/CDS%20Request' responses: 200: - description: Success (includes CDS Cards and Decisions) + description: Success (includes CDS Cards) schema: $ref: '#/definitions/CDS%20Response' - /cds-services/{id}/analytics/{uuid}: - post: - description: Creates an analytics event for this service to indicate the user engaged with the event identified by the given UUID - parameters: - - name: id - in: path - description: The id of this CDS service - required: true - type: string - - name: uuid - in: path - description: The UUID of the event (for example, a suggestion) - required: true - type: string - responses: - 200: - description: Success - ################################################################################ # Definitions # ################################################################################ @@ -108,8 +90,6 @@ definitions: format: url fhirAuthorization: type: object - user: - type: string context: type: object prefetch: @@ -122,8 +102,6 @@ definitions: type: array items: $ref: '#/definitions/Card' - decisions: - type: object Card: type: object @@ -144,6 +122,10 @@ definitions: type: array items: $ref: '#/definitions/Suggestion' + selectionBehavior: + type: string + enum: + - at-most-one links: type: array items: From 160474ad7cf41bde952659c5609d0a01067260e4 Mon Sep 17 00:00:00 2001 From: Kevin Shekleton Date: Sat, 12 Jan 2019 05:30:34 -0600 Subject: [PATCH 3/7] Relax hook type definition to that of a primitive string. This allows hooks other than the three example hooks previously defined to be used. --- cds-hooks.yaml | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/cds-hooks.yaml b/cds-hooks.yaml index 28f8235..4ce8808 100644 --- a/cds-hooks.yaml +++ b/cds-hooks.yaml @@ -67,7 +67,8 @@ definitions: type: string description: short id for this service, unique with the CDS Provider (will be used in URL paths) hook: - $ref: '#/definitions/Hook' + type: string + description: The hook this service should be invoked on. title: type: string description: Human-readable name for the CDS Service (e.g. "CMS Drug Pricing Service") @@ -81,7 +82,8 @@ definitions: type: object properties: hook: - $ref: '#/definitions/Hook' + type: string + description: The hook that triggered this CDS Service call. hookInstance: type: string format: uuid @@ -131,14 +133,6 @@ definitions: items: $ref: '#/definitions/Link' - Hook: - type: string - description: EHR event that triggers an external decision support request - enum: - - patient-view - - medication-prescribe - - order-review - Source: type: object properties: From a6ab21bcde2df562a3afebf186311c2dcca8cd22 Mon Sep 17 00:00:00 2001 From: Kevin Shekleton Date: Sat, 12 Jan 2019 05:31:39 -0600 Subject: [PATCH 4/7] EHR -> CDS Client --- cds-hooks.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cds-hooks.yaml b/cds-hooks.yaml index 4ce8808..993cc54 100644 --- a/cds-hooks.yaml +++ b/cds-hooks.yaml @@ -187,6 +187,6 @@ definitions: Prefetch: type: object - description: queries that the CDS Service would like the EHR to execute before every call + description: queries that the CDS Service would like the CDS Client to execute before every call additionalProperties: type: string From 44ba0ed7b811d9c5016bbb6a0bbbe17ccbf760c8 Mon Sep 17 00:00:00 2001 From: Kevin Shekleton Date: Sat, 12 Jan 2019 05:35:41 -0600 Subject: [PATCH 5/7] Model the fhirAuthorization object --- cds-hooks.yaml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/cds-hooks.yaml b/cds-hooks.yaml index 993cc54..2bca443 100644 --- a/cds-hooks.yaml +++ b/cds-hooks.yaml @@ -91,12 +91,26 @@ definitions: type: string format: url fhirAuthorization: - type: object + $ref: '#/definitions/FHIR%20Authorization' context: type: object prefetch: type: object + FHIR Authorization: + type: object + properties: + access_token: + type: string + token_type: + type: string + expires_in: + type: integer + scope: + type: string + subject: + type: string + CDS Response: type: object properties: From 488f7f52e8c7409fe8f33695b975a2e473212344 Mon Sep 17 00:00:00 2001 From: Kevin Shekleton Date: Sat, 12 Jan 2019 05:46:02 -0600 Subject: [PATCH 6/7] Document all required fields --- cds-hooks.yaml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/cds-hooks.yaml b/cds-hooks.yaml index 2bca443..889edb9 100644 --- a/cds-hooks.yaml +++ b/cds-hooks.yaml @@ -62,6 +62,10 @@ definitions: CDS Service: type: object + required: + - id + - hook + - description properties: id: type: string @@ -80,6 +84,10 @@ definitions: CDS Request: type: object + required: + - hook + - hookInstance + - context properties: hook: type: string @@ -99,6 +107,12 @@ definitions: FHIR Authorization: type: object + required: + - access_token + - token_type + - expires_in + - scope + - subject properties: access_token: type: string @@ -113,6 +127,8 @@ definitions: CDS Response: type: object + required: + - cards properties: cards: type: array @@ -121,6 +137,10 @@ definitions: Card: type: object + required: + - summary + - indicator + - source properties: summary: type: string @@ -149,6 +169,8 @@ definitions: Source: type: object + required: + - label properties: label: type: string @@ -174,6 +196,8 @@ definitions: Suggestion: type: object + required: + - label properties: label: type: string @@ -187,6 +211,9 @@ definitions: Action: type: object + required: + - type + - description properties: type: type: string From 35f4bcd8dc1a1c4291c7de08ff407e524a999fa6 Mon Sep 17 00:00:00 2001 From: Kevin Shekleton Date: Sat, 12 Jan 2019 05:48:20 -0600 Subject: [PATCH 7/7] Define fhirAuthorization.token_type as a fixed value of "Bearer" --- cds-hooks.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cds-hooks.yaml b/cds-hooks.yaml index 889edb9..b20868a 100644 --- a/cds-hooks.yaml +++ b/cds-hooks.yaml @@ -118,6 +118,8 @@ definitions: type: string token_type: type: string + enum: + - Bearer expires_in: type: integer scope: