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
| Use | Name | Cardinality | Type | Documentation |
|---|---|---|---|---|
| OUT | patient | 1..1 | Reference | A direct resource reference to the patient resource. |
| OUT | program | 1..* | ||
| OUT | program.program-code | 1..1 | code | |
| OUT | program.program-name | 1..1 | string | |
| OUT | program.program-type | 1..1 | code | |
| OUT | program.program-type-name | 1..1 | string | |
| OUT | program.first-service-date | 1..1 | date | |
| OUT | program.last-service-date | 1..1 | date | |
| OUT | program.practitioner | 1..1 | Reference | |
| OUT | program.practitioner-name | 1..1 | HumanName | |
| OUT | program.principal-diagnosis | 1..1 | CodeableConcept | |
| OUT | program.service-count | 1..1 | integer | |
| OUT | outcome | 1..1 | OperationOutcome | The 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
- Production
- Preview
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
curl -X POST 'https://fhirtest.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.
Integration Patterns
Service History Workflow
-
Identify Patient
- Obtain patient resource ID
- Validate patient exists in system
- Ensure proper authorization
-
Request Service History
- Submit service history operation
- Handle response parameters
- Process program information
-
Analyze History Data
- Review service patterns
- Extract program details
- Identify care continuity
Best Practices
- Use service history for care coordination
- Analyze patterns for quality improvement
- Respect patient privacy in historical data
- Implement appropriate access controls
Relationships to Other Resources
- Patient Resource - Patient data structure
- Practitioner Resource - Care providers
- OperationOutcome Resource - Operation results
Error Handling
For comprehensive error handling information, see Common Errors.
Support
For technical support with Patient Service History operations:
- Contact: Netsmart Technologies, Inc.
- Documentation: Extended Operations
- Availability: Check CapabilityStatement for support