x-api-key: ********************
{
"status": "entered-in-error",
"class": "EMER",
"service_type": {
"code": "95",
"name": "Cardiology"
},
"priority": "S",
"subject": {
"type": "patient",
"id": "713a5ecc-632d-44f7-99bd-ab83ee45aace"
},
"based_on": [
"713a5ecc-632d-44f7-99bd-ab83ee45aace"
],
"appointment": [
"713a5ecc-632d-44f7-99bd-ab83ee45aace",
"8983a5ecc-87uu-42f7-99bd-ab83e9iuuac7"
],
"period": {
"start": "2025-01-12",
"end": "2025-06-11"
},
"reason_code": [
{
"code": "219006",
"name": "Alcohol user"
},
{
"code": "199004",
"name": "Decreased lactation"
}
],
"reason_reference": [
{
"type": "procedure",
"id": "ID of type above"
},
{
"type": "observation",
"id": "ID of type above"
},
{
"type": "condition",
"id": "ID of type above"
}
],
"participant": [
{
"type": "escort",
"period": {
"start": "2025-01-12",
"end": "2025-02-17"
},
"individual": {
"type": "relatedperson",
"id": "ID of type above"
}
},
{
"type": "attender",
"period": {
"start": "2025-01-12",
"end": "2025-02-17"
},
"individual": {
"type": "relatedperson",
"id": "ID of type above"
}
},
{
"type": "callback contact",
"period": {
"start": "2025-01-12",
"end": "2025-02-17"
},
"individual": {
"type": "practitionerrole",
"id": "ID of type above"
}
}
],
"diagnosis": [
{
"condition": {
"type": "procedure",
"id": "ID of type above"
},
"use": "post-op",
"rank": 1
},
{
"condition": {
"type": "condition",
"id": "ID of type above"
},
"use": "CC",
"rank": 2
}
],
"account": [
"713a5ecc-632d-44f7-99bd-ab83ee45aace",
"713a5ecc-632d-44f7-99bd-ab83ee45aace",
],
"hospitalization": {
"origin": {
"type": "location",
"id": "713a5ecc-632d-44f7-99bd-ab83ee45aace",
},
"diet_preference": [
"vegetarian",
"gluten-free"
],
"admit_source": "emd"
},
"location": [
{
"location": "713a5ecc-632d-44f7-99bd-ab83ee45aace",
"period": {
"start": "2025-01-12",
"end": "2025-02-17"
}
}
],
"part_of": "713a5ecc-632d-44f7-99bd-ab83ee45aace"
}
curl --location --request POST 'https://staging.onyeone.com/api/emr/encounter' \
--header 'Content-Type: application/json' \
--header 'x-api-key;' \
--data-raw '{
"status": "entered-in-error",
"class": "EMER",
"service_type": {
"code": "95",
"name": "Cardiology"
},
"priority": "S",
"subject": {
"type": "patient",
"id": "713a5ecc-632d-44f7-99bd-ab83ee45aace"
},
"based_on": [
"713a5ecc-632d-44f7-99bd-ab83ee45aace"
],
"appointment": [
"713a5ecc-632d-44f7-99bd-ab83ee45aace",
"8983a5ecc-87uu-42f7-99bd-ab83e9iuuac7"
],
"period": {
"start": "2025-01-12",
"end": "2025-06-11"
},
"reason_code": [
{
"code": "219006",
"name": "Alcohol user"
},
{
"code": "199004",
"name": "Decreased lactation"
}
],
"reason_reference": [
{
"type": "procedure",
"id": "ID of type above"
},
{
"type": "observation",
"id": "ID of type above"
},
{
"type": "condition",
"id": "ID of type above"
}
],
"participant": [
{
"type": "escort",
"period": {
"start": "2025-01-12",
"end": "2025-02-17"
},
"individual": {
"type": "relatedperson",
"id": "ID of type above"
}
},
{
"type": "attender",
"period": {
"start": "2025-01-12",
"end": "2025-02-17"
},
"individual": {
"type": "relatedperson",
"id": "ID of type above"
}
},
{
"type": "callback contact",
"period": {
"start": "2025-01-12",
"end": "2025-02-17"
},
"individual": {
"type": "practitionerrole",
"id": "ID of type above"
}
}
],
"diagnosis": [
{
"condition": {
"type": "procedure",
"id": "ID of type above"
},
"use": "post-op",
"rank": 1
},
{
"condition": {
"type": "condition",
"id": "ID of type above"
},
"use": "CC",
"rank": 2
}
],
"account": [
"713a5ecc-632d-44f7-99bd-ab83ee45aace",
"713a5ecc-632d-44f7-99bd-ab83ee45aace",
],
"hospitalization": {
"origin": {
"type": "location",
"id": "713a5ecc-632d-44f7-99bd-ab83ee45aace",
},
"diet_preference": [
"vegetarian",
"gluten-free"
],
"admit_source": "emd"
},
"location": [
{
"location": "713a5ecc-632d-44f7-99bd-ab83ee45aace",
"period": {
"start": "2025-01-12",
"end": "2025-02-17"
}
}
],
"part_of": "713a5ecc-632d-44f7-99bd-ab83ee45aace"
}'
{
"message": "Resource created successfully",
"resource_name": "Encounter",
"resource_id": "e59f43ba-e124-588e-b70d-da3c5025273c",
"full_resource": {
"resourceType": "Encounter",
"id": "e59f43ba-e124-588e-b70d-da3c5025273c",
"meta": {
"versionId": "1",
"lastUpdated": "2024-12-23T07:40:12.590+00:00",
"source": "#z3GsOUoB6Gmtf0kk",
"tag": [
{
"system": "http://onyeone.com/facility-tags/origination",
"code": "1",
"display": "Green Group Hospital"
}
]
},
"status": "in-progress",
"class": {
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "EMER",
"display": "Emergency"
},
"serviceType": {
"coding": [
{
"system": "http://hl7.org/fhir/ValueSet/service-type",
"code": "20",
"display": "Candace Stokes"
}
],
"text": "Candace Stokes"
},
"priority": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActPriority",
"code": "S",
"display": "stat"
}
],
"text": "stat"
},
"period": {
"start": "2025-01-12",
"end": "2025-06-11"
},
"reasonCode": [
{
"coding": [
{
"system": "http://hl7.org/fhir/ValueSet/encounter-reason",
"code": "219006",
"display": "Alcohol user"
}
],
"text": "Alcohol user"
},
{
"coding": [
{
"system": "http://hl7.org/fhir/ValueSet/encounter-reason",
"code": "199004",
"display": "Decreased lactation"
}
],
"text": "Decreased lactation"
}
],
"serviceProvider": {
"reference": "Organization/5abe99ee-0928-546b-93e9-0207ba8a556b",
"display": "Green Group Hospital"
}
}
}