Skip to main content

Patient Service History Operation

info

Not all Netsmart solutions support Patient Service History via CareConnect. See supported extended operations table above and consult your target solution's documentation for more information.

The Patient Service History operation retrieves a historical collection of all versions of a patient.

Authorization

This operation will require the application obtain authorization to update a Patient using one of the following SMART clinical scopes.

  • v1: [patient|user|system]/Patient.[read|*]

Parameters

UseNameCardinalityTypeDocumentation
OUTpatient1..1ReferenceA direct resource reference to the patient resource.
OUTprogram1..*
OUTprogram.program-code1..1code
OUTprogram.program-name1..1string
OUTprogram.program-type1..1code
OUTprogram.program-type-name1..1string
OUTprogram.first-service-date1..1date
OUTprogram.last-service-date1..1date
OUTprogram.practitioner1..1Reference
OUTprogram.practitioner-name1..1HumanName
OUTprogram.principal-diagnosis1..1CodeableConcept
OUTprogram.service-count1..1integer
OUToutcome1..1OperationOutcomeThe outcome of the operation. On success this will provide a success statement or warnings related to the change. If the operation was unsuccessful, the OperationOutcome will include the reason for the failure.

Examples

curl -X POST 'https://fhir.netsmartcloud.com/v4/Patient/1/$service-history' \
-H "Authorization: {Bearer Token}" \
-H "Accept: application/fhir+json" \
-H "Content-Type: application/x-form-urlencoded" \
-d @payload.json

Payloads

Sample Patient Service History Response Payload

Service History Success
{
"resourceType": "Parameters",
"parameter": [
{
"name": "patient",
"valueReference": {
"reference": "Patient/1"
}
},
{
"name": "program",
"parts": [
[
{
"name": "program-code",
"valueCode": "AA"
},
{
"name": "program-name",
"valueCode": "AAA"
},
{
"name": "program-type",
"valueCode": "BB"
},
{
"name": "program-type-name",
"valueCode": "BBB"
},
{
"name": "first-service-date",
"valueDate": "01-01-2024"
},
{
"name": "last-service-date",
"valueDate": "31-12-2024"
},
{
"name": "practitioner",
"valueReference": {
"reference": "Practitioner/1"
}
},
{
"name": "principal-diagnosis",
"valueHumanName": {
"name" : {
"family" : "Everyman",
"given" : ["Adam", "A"]
}
}
},
{
"name": "practitioner-name",
"valueCodableConcept" : {
"coding" : [{
"system" : "http://hl7.org/fhir/sid/icd-10",
"code" : "R51"
}],
"text" : "general headache"
}
},
{
"name": "last-service-date",
"valueInteger": "12"
}
]
]
},
{
"name": "outcome",
"resource": {
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "information",
"code": "informational",
"details": {
"text": "Success message"
}
}
]
}
}
]
}
Invalid Service History Payload or Other Unprocessable Request
{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "error",
"code": "processing",
"details": {
"text": "Exception message"
}
}
]
}
Rejections or Other Service History Processing Errors
{
"resourceType": "Parameters",
"parameter": [
{
"name": "outcome",
"resource": {
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "error",
"code": "processing",
"details": {
"text": "err: Target Patient not found"
}
}
]
}
}
]
}

Errors

To be written.