DocumentReference Reponse
Possible status codes:
Status code 200 - success - the resource information is in the body as shown below.
Status code 400 - bad request - one or more request parameters was invalid.
Status code 401 - unauthorized (a valid bearer token is required).
Status code 404 - not found (the resource specified was not found).
Status code 500 - internal error.
Examples:
Request: GET /DocumentReference/1000.1000
Response:
{
"resourceType": "DocumentReference",
"id": "16",
"identifier": [
{
"system": "https://fhir.pcisgold.com/fhir/DocumentReference/",
"value": "16"
}
],
"status": "current",
"type": {
"coding": [
{
"system": "http://loinc.org",
"code": "11506-3"
}
]
},
"category": [
{
"coding": [
{
"system": "http://hl7.org/fhir/us/core/CodeSystem/us-core-documentreference-category",
"code": "clinical-note"
}
]
}
],
"subject": {
"reference": "https://fhir.pcisgold.com/fhir/Patient/1000.1000"
},
"date": "2022-01-25T08:45:00-07:00",
"author": [
{
"reference": "https://fhir.pcisgold.com/fhir/Practitioner/SDB"
},
{
"reference": "https://fhir.pcisgold.com/fhir/Organization/1"
}
],
"custodian": {
"reference": "https://fhir.pcisgold.com/fhir/Organization/1"
},
"content": [
{
"attachment": {
"contentType": "text/plain",
"data": "VGhpcyBpcyBhIHNpbXBsZSBwcm9ncmVzcyBub3Rl"
},
"format": {
"system": "http://ihe.net/fhir/ValueSet/IHE.FormatCode.codesystem",
"code": "urn:ihe:iti:xds:2017:mimeTypeSufficient"
}
}
],
"context": {
"encounter": [
{
"reference": "https://fhir.pcisgold.com/fhir/Encounter/128556"
}
],
"period": {
"start": "2022-01-25T08:45:00-07:00",
"end": "2022-01-25T08:45:00-07:00"
}
}
}
Description: Returns base64 encoded xml format CCDA by patient Id and optional date param
Request: GET /DocumentReference/$docref?patient=1000.1000
Response:
{
"resourceType": "Bundle",
"type": "searchset",
"total": 1,
"entry": [
{
"resource": {
"resourceType": "DocumentReference",
"status": "current",
"subject": {
"reference": "https://localhost:5002/Patient/1000.1000"
},
"date": "2022-10-11T15:00:11-06:00",
"author": [
{
"reference": "https://localhost:5002/Practitioner/SDB"
},
{
"reference": "https://localhost:5002/Organization/1"
}
],
"custodian": {
"reference": "https://localhost:5002/Organization/1"
},
"content": [
{
"attachment": {
"contentType": "text/xml",
"data": "CCDA DATA HERE"
},
"format": {
"system": "http://ihe.net/fhir/ihe.formatcode.fhir/CodeSystem/formatcode",
"code": "urn:ihe:iti:xds:2017:mimeTypeSufficient"
}
}
],
"context": {
"encounter": [
{
"reference": "https://localhost:5002/Encounter/28316"
}
],
"period": {
"start": "2022-10-11T15:00:11-06:00",
"end": "2022-10-11T15:00:11-06:00"
}
}
},
"search": {
"mode": "match"
}
}
]
}