I have an OpenAPI document for HAPI FHIR that I am using to build a custom extension in Watson Assistant. Currently, when I make a call using this document, I only receive a "success" response. However, when I am examining the JSON response in the Extension Info from Watson Assistant, the full JSON response has a great deal more information than just "success." I would like to access that additional information.
Currently, the code for get CareTeam is:
"/CareTeam/{id}": {
"get": {
"tags": [
"CareTeam"
],
"summary": "read-instance: Read CareTeam instance",
"parameters": [
{
"name": "id",
"in": "path",
"description": "The resource ID",
"required": true,
"style": "simple",
"schema": {
"minimum": 1,
"type": "string",
"example": null
},
"example": "123"
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/fhir+json": {
"schema": {
"$ref": "#/components/schemas/FHIR-JSON-RESOURCE"
},
"example": null
},
"application/fhir+xml": {
"schema": {
"$ref": "#/components/schemas/FHIR-XML-RESOURCE"
},
"example": null
}
}
}
}
However, when I examine the full JSON response, I get:
{"status":200,"body":{"resourceType":"CareTeam","id":"va-team-visn6-vamc1-pc","meta":{"versionId":"1","lastUpdated":"2019-11-01T17:59:48.291+00:00","source":"#qsmu4cjPakjrXiTn"},"text":{"status":"additional","div":"<div xmlns="http://www.w3.org/1999/xhtml">Hampton, VA, VAMC, Primary Care PACT"},"name":"Primary Care PACT","participant":[{"role":[{"coding":[{"system":"http://snomed.info/sct","code":"446050000","display":"Primary care physician"}],"text":"Primary Care Physician"}],"member":{"reference":"Practitioner/va-prac-visn6-francis","display":"Dr. Francis"}}]}}
I would like to be able to access all the additional data that currently exists in "body". I tried modifying the OpenAPI document to read:
"/CareTeam/{id}": {
"get": {
"tags": [
"CareTeam"
],
"summary": "read-instance: Read CareTeam instance",
"parameters": [
{
"name": "id",
"in": "path",
"description": "The resource ID",
"required": true,
"style": "simple",
"schema": {
"minimum": 1,
"type": "string",
"example": null
},
"example": "123"
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/fhir+json": {
"schema": {
"type": "object",
"properties": {
"status": {
"type": "integer"
},
"body": {
"type": "object",
"properties": {
"resourceType": {
"type": "string"
},
"id": {
"type": "string"
},
"meta": {
"type": "object",
"properties": {
"versionId": {
"type": "string"
},
"lastUpdated": {
"type": "string",
"format": "date-time"
},
"source": {
"type": "string"
}
}
},
"text": {
"type": "object",
"properties": {
"status": {
"type": "string"
},
"div": {
"type": "string"
}
}
},
"name": {
"type": "string"
},
"participant": {
"type": "array",
"items": {
"type": "object",
"properties": {
"role": {
"type": "array",
"items": {
"type": "object",
"properties": {
"coding": {
"type": "array",
"items": {
"type": "object",
"properties": {
"system": {
"type": "string"
},
"code": {
"type": "string"
},
"display": {
"type": "string"
}
}
}
},
"text": {
"type": "string"
}
}
}
},
"member": {
"type": "object",
"properties": {
"reference": {
"type": "string"
},
"display": {
"type": "string"
}
}
}
}
}
}
}
}
}
},
"example": null
},
"application/fhir+xml": {
"schema": {
"$ref": "#/components/schemas/FHIR-XML-RESOURCE"
},
"example": null
}
}
}
}
but I get the same "success" or nothing responses.
How do I modify the OpenAPI document in order to do so? Is there a way to access that information via Watson Assistant without having to modify the OpenAPI document?
Currently application/fhir+json"
is not supported, pls change to application/json"