Tervisetõendi teenus (HCERT)
1.0.0 - trial-use
Tervisetõendi teenus (HCERT) - Local Development build (v1.0.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions
Käesolevas juhendis kirjeldatakse HCERT teenuse poolt toetatud FHIR otspunktid ja operatsioonid. Toodud näidispäringud ja näidisvastused ei kajasta reaalseid andmeid aga vastavad oodatud/toetatud ressursi struktuurile.
Masinloetav FHIR serveri API kirjeldus ehk FHIR CapabilityStatement on kättesaadav URL: GET [base]/metadata
kaudu.
Diarammil on toodud lubatud liigutused Tervisetõendi olekute vahel, FHIR ressursi staatused ning HTTP operatsioonid.
@startuml
[*] --> Mustand: POST /Composition
[*] --> Lõpetatud: POST /Composition
Lõpetatud --> Lõpetatud: PUT /Composition/{id} with change reason
Mustand --> Kustutatud: DELETE /Composition/{id}
Mustand --> Mustand: PUT /Composition/{id}
Mustand --> Lõpetatud: PUT /Composition/{id}
Lõpetatud --> Peatatud: POST /Composition/{id}/$suspend with suspend reason
Lõpetatud --> Tühistatud: POST /Composition/{id}/$cancel with cancel reason
Peatatud --> Tühistatud: POST /Composition/{id}/$cancel with cancel reason
Lõpetatud: FHIR status: final
Mustand : FHIR status: preliminary
Kustutatud: soft delete
Kustutatud: FHIR status unchanged
Peatatud: FHIR status: cancelled
Tühistatud: FHIR status: entered-in-error
@enduml
Tervisetõendi loomine on kasutusala spetsiifiline, vastavalt kasutusalale tuleb saata Composition ressurss õige profiiliga. Profiil määrab mis ressursi väljad on kohustuslikud, nende eesmärki ja struktuuri.
Artifaktide leheküljel on toodud ka ressurside näidised.
URL: POST [base]/Composition
{
"resourceType" : "Composition",
"id" : "500",
"meta" : {
"profile" : [
🔗 "https://fhir.ee/hcert/StructureDefinition/ee-health-certificate-driver"
]
},
"text" : {
"status" : "generated",
"div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: Composition 500</b></p><a name=\"500\"> </a><a name=\"hc500\"> </a><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\"/><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-ee-health-certificate-driver.html\">Mootosõidukijuhi tervisetõend</a></p></div><p><b>identifier</b>: <code>https://fhir.ee/hcert/health-certificate-number</code>/HCERT-321</p><p><b>status</b>: Preliminary</p><p><b>type</b>: <span title=\"Codes:{http://snomed.info/sct 772786005}\">Medical certificate (record artifact)</span></p><p><b>category</b>: <span title=\"Codes:{https://fhir.ee/CodeSystem/tervisekontrolli-kasutusala driver-group-I}\">driver-group-I</span></p><p><b>date</b>: 2024-11-05 11:45:29+0000</p><p><b>author</b>: <a href=\"#hc500/100\">PractitionerRole</a></p><p><b>title</b>: Mootorsõiduki juhtimise tervisetõend</p><h3>Events</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Period</b></td></tr><tr><td style=\"display: none\">*</td><td>2024-11-05 00:00:00+0000 --> 2025-11-05 00:00:00+0000</td></tr></table><hr/><blockquote><p class=\"res-header-id\"><b>Generated Narrative: PractitionerRole #100</b></p><a name=\"500/100\"> </a><a name=\"hc500/100\"> </a><p><b>practitioner</b>: <a href=\"Practitioner-36109255737.html\">Practitioner Paavo Lepzig </a></p><p><b>organization</b>: <a href=\"Organization-90006399.html\">Organization PÕHJA-EESTI REGIONAALHAIGLA</a></p></blockquote><hr/><blockquote><p class=\"res-header-id\"><b>Generated Narrative: Observation #400</b></p><a name=\"500/400\"> </a><a name=\"hc500/400\"> </a><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\"/><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-ee-health-certificate-decision.html\">Tervisetõendi otsus</a></p></div><p><b>status</b>: Final</p><p><b>code</b>: <span title=\"Codes:{http://snomed.info/sct 419183001}\">Practitioner decision status</span></p><p><b>value</b>: <span title=\"Codes:{https://fhir.ee/CodeSystem/arsti-otsus 1}\">jah</span></p></blockquote></div>"
},
"contained" : [
{
"resourceType" : "PractitionerRole",
"id" : "100",
"practitioner" : {
🔗 "reference" : "Practitioner/36109255737"
},
"organization" : {
🔗 "reference" : "Organization/90006399"
}
},
{
"resourceType" : "Observation",
"id" : "400",
"meta" : {
"profile" : [
🔗 "https://fhir.ee/hcert/StructureDefinition/ee-health-certificate-decision"
]
},
"status" : "final",
"code" : {
"coding" : [
{
"system" : "http://snomed.info/sct",
"code" : "419183001",
"display" : "Practitioner decision status"
}
]
},
"valueCodeableConcept" : {
"coding" : [
{
"system" : "https://fhir.ee/CodeSystem/arsti-otsus",
"code" : "1"
}
]
}
}
],
"identifier" : [
{
"system" : "https://fhir.ee/hcert/health-certificate-number",
"value" : "HCERT-321"
}
],
"status" : "preliminary",
"type" : {
"coding" : [
{
"system" : "http://snomed.info/sct",
"code" : "772786005",
"display" : "Medical certificate (record artifact)"
}
]
},
"category" : [
{
"coding" : [
{
"system" : "https://fhir.ee/CodeSystem/tervisekontrolli-kasutusala",
"code" : "driver-group-I"
}
]
}
],
"subject" : [
{
🔗 "reference" : "Patient/200"
}
],
"date" : "2024-11-05T11:45:29.0437162+00:00",
"author" : [
{
"reference" : "#100"
}
],
"title" : "Mootorsõiduki juhtimise tervisetõend",
"event" : [
{
"period" : {
"start" : "2024-11-05T00:00:00.000+00:00",
"end" : "2025-11-05T00:00:00.000+00:00"
}
}
],
"section" : [
{
"code" : {
"coding" : [
{
"system" : "https://fhir.ee/CodeSystem/tervisetoendi-sektsioon",
"code" : "decision"
}
]
},
"entry" : [
{
"reference" : "#400"
}
]
},
{
"code" : {
"coding" : [
{
"system" : "https://fhir.ee/CodeSystem/tervisetoendi-sektsioon",
"code" : "reject-reason"
}
]
},
"text" : {
"status" : "additional",
"div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\">Ei tunne värve</div>"
}
},
{
"code" : {
"coding" : [
{
"system" : "https://fhir.ee/CodeSystem/tervisetoendi-sektsioon",
"code" : "health-declaration"
}
]
},
"entry" : [
{
🔗 "reference" : "QuestionnaireResponse/300"
}
]
}
]
}
Prefer: return=representation
korral tagastatakse loodud tervisetõend (Composition ressurss) vastuse kehas.HTTP/1.1 201 Created
Location: [base]/Composition/500/_history/1
URL: PUT [base]/Composition/500
{
"resourceType" : "Composition",
"id" : "500",
"meta" : {
"profile" : [
🔗 "https://fhir.ee/hcert/StructureDefinition/ee-health-certificate-driver"
]
},
"text" : {
"status" : "generated",
"div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: Composition 500</b></p><a name=\"500\"> </a><a name=\"hc500\"> </a><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\"/><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-ee-health-certificate-driver.html\">Mootosõidukijuhi tervisetõend</a></p></div><p><b>identifier</b>: <code>https://fhir.ee/hcert/health-certificate-number</code>/HCERT-321</p><p><b>status</b>: Preliminary</p><p><b>type</b>: <span title=\"Codes:{http://snomed.info/sct 772786005}\">Medical certificate (record artifact)</span></p><p><b>category</b>: <span title=\"Codes:{https://fhir.ee/CodeSystem/tervisekontrolli-kasutusala driver-group-I}\">driver-group-I</span></p><p><b>date</b>: 2024-11-05 11:45:29+0000</p><p><b>author</b>: <a href=\"#hc500/100\">PractitionerRole</a></p><p><b>title</b>: Mootorsõiduki juhtimise tervisetõend</p><h3>Events</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Period</b></td></tr><tr><td style=\"display: none\">*</td><td>2024-11-05 00:00:00+0000 --> 2025-11-05 00:00:00+0000</td></tr></table><hr/><blockquote><p class=\"res-header-id\"><b>Generated Narrative: PractitionerRole #100</b></p><a name=\"500/100\"> </a><a name=\"hc500/100\"> </a><p><b>practitioner</b>: <a href=\"Practitioner-36109255737.html\">Practitioner Paavo Lepzig </a></p><p><b>organization</b>: <a href=\"Organization-90006399.html\">Organization PÕHJA-EESTI REGIONAALHAIGLA</a></p></blockquote><hr/><blockquote><p class=\"res-header-id\"><b>Generated Narrative: Observation #400</b></p><a name=\"500/400\"> </a><a name=\"hc500/400\"> </a><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\"/><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-ee-health-certificate-decision.html\">Tervisetõendi otsus</a></p></div><p><b>status</b>: Final</p><p><b>code</b>: <span title=\"Codes:{http://snomed.info/sct 419183001}\">Practitioner decision status</span></p><p><b>value</b>: <span title=\"Codes:{https://fhir.ee/CodeSystem/arsti-otsus 1}\">jah</span></p></blockquote></div>"
},
"contained" : [
{
"resourceType" : "PractitionerRole",
"id" : "100",
"practitioner" : {
🔗 "reference" : "Practitioner/36109255737"
},
"organization" : {
🔗 "reference" : "Organization/90006399"
}
},
{
"resourceType" : "Observation",
"id" : "400",
"meta" : {
"profile" : [
🔗 "https://fhir.ee/hcert/StructureDefinition/ee-health-certificate-decision"
]
},
"status" : "final",
"code" : {
"coding" : [
{
"system" : "http://snomed.info/sct",
"code" : "419183001",
"display" : "Practitioner decision status"
}
]
},
"valueCodeableConcept" : {
"coding" : [
{
"system" : "https://fhir.ee/CodeSystem/arsti-otsus",
"code" : "1"
}
]
}
}
],
"identifier" : [
{
"system" : "https://fhir.ee/hcert/health-certificate-number",
"value" : "HCERT-321"
}
],
"status" : "preliminary",
"type" : {
"coding" : [
{
"system" : "http://snomed.info/sct",
"code" : "772786005",
"display" : "Medical certificate (record artifact)"
}
]
},
"category" : [
{
"coding" : [
{
"system" : "https://fhir.ee/CodeSystem/tervisekontrolli-kasutusala",
"code" : "driver-group-I"
}
]
}
],
"subject" : [
{
🔗 "reference" : "Patient/200"
}
],
"date" : "2024-11-05T11:45:29.0437162+00:00",
"author" : [
{
"reference" : "#100"
}
],
"title" : "Mootorsõiduki juhtimise tervisetõend",
"event" : [
{
"period" : {
"start" : "2024-11-05T00:00:00.000+00:00",
"end" : "2025-11-05T00:00:00.000+00:00"
}
}
],
"section" : [
{
"code" : {
"coding" : [
{
"system" : "https://fhir.ee/CodeSystem/tervisetoendi-sektsioon",
"code" : "decision"
}
]
},
"entry" : [
{
"reference" : "#400"
}
]
},
{
"code" : {
"coding" : [
{
"system" : "https://fhir.ee/CodeSystem/tervisetoendi-sektsioon",
"code" : "reject-reason"
}
]
},
"text" : {
"status" : "additional",
"div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\">Ei tunne värve</div>"
}
},
{
"code" : {
"coding" : [
{
"system" : "https://fhir.ee/CodeSystem/tervisetoendi-sektsioon",
"code" : "health-declaration"
}
]
},
"entry" : [
{
🔗 "reference" : "QuestionnaireResponse/300"
}
]
}
]
}
Prefer: return=representation
korral tagastatakse uuendatud tervisetõend (Composition ressurss) vastuse kehas.{
"resourceType" : "Composition",
"id" : "500",
"meta" : {
"profile" : [
🔗 "https://fhir.ee/hcert/StructureDefinition/ee-health-certificate-driver"
]
},
"text" : {
"status" : "generated",
"div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: Composition 500</b></p><a name=\"500\"> </a><a name=\"hc500\"> </a><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\"/><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-ee-health-certificate-driver.html\">Mootosõidukijuhi tervisetõend</a></p></div><p><b>identifier</b>: <code>https://fhir.ee/hcert/health-certificate-number</code>/HCERT-321</p><p><b>status</b>: Preliminary</p><p><b>type</b>: <span title=\"Codes:{http://snomed.info/sct 772786005}\">Medical certificate (record artifact)</span></p><p><b>category</b>: <span title=\"Codes:{https://fhir.ee/CodeSystem/tervisekontrolli-kasutusala driver-group-I}\">driver-group-I</span></p><p><b>date</b>: 2024-11-05 11:45:29+0000</p><p><b>author</b>: <a href=\"#hc500/100\">PractitionerRole</a></p><p><b>title</b>: Mootorsõiduki juhtimise tervisetõend</p><h3>Events</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Period</b></td></tr><tr><td style=\"display: none\">*</td><td>2024-11-05 00:00:00+0000 --> 2025-11-05 00:00:00+0000</td></tr></table><hr/><blockquote><p class=\"res-header-id\"><b>Generated Narrative: PractitionerRole #100</b></p><a name=\"500/100\"> </a><a name=\"hc500/100\"> </a><p><b>practitioner</b>: <a href=\"Practitioner-36109255737.html\">Practitioner Paavo Lepzig </a></p><p><b>organization</b>: <a href=\"Organization-90006399.html\">Organization PÕHJA-EESTI REGIONAALHAIGLA</a></p></blockquote><hr/><blockquote><p class=\"res-header-id\"><b>Generated Narrative: Observation #400</b></p><a name=\"500/400\"> </a><a name=\"hc500/400\"> </a><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\"/><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-ee-health-certificate-decision.html\">Tervisetõendi otsus</a></p></div><p><b>status</b>: Final</p><p><b>code</b>: <span title=\"Codes:{http://snomed.info/sct 419183001}\">Practitioner decision status</span></p><p><b>value</b>: <span title=\"Codes:{https://fhir.ee/CodeSystem/arsti-otsus 1}\">jah</span></p></blockquote></div>"
},
"contained" : [
{
"resourceType" : "PractitionerRole",
"id" : "100",
"practitioner" : {
🔗 "reference" : "Practitioner/36109255737"
},
"organization" : {
🔗 "reference" : "Organization/90006399"
}
},
{
"resourceType" : "Observation",
"id" : "400",
"meta" : {
"profile" : [
🔗 "https://fhir.ee/hcert/StructureDefinition/ee-health-certificate-decision"
]
},
"status" : "final",
"code" : {
"coding" : [
{
"system" : "http://snomed.info/sct",
"code" : "419183001",
"display" : "Practitioner decision status"
}
]
},
"valueCodeableConcept" : {
"coding" : [
{
"system" : "https://fhir.ee/CodeSystem/arsti-otsus",
"code" : "1"
}
]
}
}
],
"identifier" : [
{
"system" : "https://fhir.ee/hcert/health-certificate-number",
"value" : "HCERT-321"
}
],
"status" : "preliminary",
"type" : {
"coding" : [
{
"system" : "http://snomed.info/sct",
"code" : "772786005",
"display" : "Medical certificate (record artifact)"
}
]
},
"category" : [
{
"coding" : [
{
"system" : "https://fhir.ee/CodeSystem/tervisekontrolli-kasutusala",
"code" : "driver-group-I"
}
]
}
],
"subject" : [
{
🔗 "reference" : "Patient/200"
}
],
"date" : "2024-11-05T11:45:29.0437162+00:00",
"author" : [
{
"reference" : "#100"
}
],
"title" : "Mootorsõiduki juhtimise tervisetõend",
"event" : [
{
"period" : {
"start" : "2024-11-05T00:00:00.000+00:00",
"end" : "2025-11-05T00:00:00.000+00:00"
}
}
],
"section" : [
{
"code" : {
"coding" : [
{
"system" : "https://fhir.ee/CodeSystem/tervisetoendi-sektsioon",
"code" : "decision"
}
]
},
"entry" : [
{
"reference" : "#400"
}
]
},
{
"code" : {
"coding" : [
{
"system" : "https://fhir.ee/CodeSystem/tervisetoendi-sektsioon",
"code" : "reject-reason"
}
]
},
"text" : {
"status" : "additional",
"div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\">Ei tunne värve</div>"
}
},
{
"code" : {
"coding" : [
{
"system" : "https://fhir.ee/CodeSystem/tervisetoendi-sektsioon",
"code" : "health-declaration"
}
]
},
"entry" : [
{
🔗 "reference" : "QuestionnaireResponse/300"
}
]
}
]
}
URL: GET [base]/Composition/500
{
"resourceType" : "Composition",
"id" : "500",
"meta" : {
"profile" : [
🔗 "https://fhir.ee/hcert/StructureDefinition/ee-health-certificate-driver"
]
},
"text" : {
"status" : "generated",
"div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: Composition 500</b></p><a name=\"500\"> </a><a name=\"hc500\"> </a><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\"/><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-ee-health-certificate-driver.html\">Mootosõidukijuhi tervisetõend</a></p></div><p><b>identifier</b>: <code>https://fhir.ee/hcert/health-certificate-number</code>/HCERT-321</p><p><b>status</b>: Preliminary</p><p><b>type</b>: <span title=\"Codes:{http://snomed.info/sct 772786005}\">Medical certificate (record artifact)</span></p><p><b>category</b>: <span title=\"Codes:{https://fhir.ee/CodeSystem/tervisekontrolli-kasutusala driver-group-I}\">driver-group-I</span></p><p><b>date</b>: 2024-11-05 11:45:29+0000</p><p><b>author</b>: <a href=\"#hc500/100\">PractitionerRole</a></p><p><b>title</b>: Mootorsõiduki juhtimise tervisetõend</p><h3>Events</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Period</b></td></tr><tr><td style=\"display: none\">*</td><td>2024-11-05 00:00:00+0000 --> 2025-11-05 00:00:00+0000</td></tr></table><hr/><blockquote><p class=\"res-header-id\"><b>Generated Narrative: PractitionerRole #100</b></p><a name=\"500/100\"> </a><a name=\"hc500/100\"> </a><p><b>practitioner</b>: <a href=\"Practitioner-36109255737.html\">Practitioner Paavo Lepzig </a></p><p><b>organization</b>: <a href=\"Organization-90006399.html\">Organization PÕHJA-EESTI REGIONAALHAIGLA</a></p></blockquote><hr/><blockquote><p class=\"res-header-id\"><b>Generated Narrative: Observation #400</b></p><a name=\"500/400\"> </a><a name=\"hc500/400\"> </a><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\"/><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-ee-health-certificate-decision.html\">Tervisetõendi otsus</a></p></div><p><b>status</b>: Final</p><p><b>code</b>: <span title=\"Codes:{http://snomed.info/sct 419183001}\">Practitioner decision status</span></p><p><b>value</b>: <span title=\"Codes:{https://fhir.ee/CodeSystem/arsti-otsus 1}\">jah</span></p></blockquote></div>"
},
"contained" : [
{
"resourceType" : "PractitionerRole",
"id" : "100",
"practitioner" : {
🔗 "reference" : "Practitioner/36109255737"
},
"organization" : {
🔗 "reference" : "Organization/90006399"
}
},
{
"resourceType" : "Observation",
"id" : "400",
"meta" : {
"profile" : [
🔗 "https://fhir.ee/hcert/StructureDefinition/ee-health-certificate-decision"
]
},
"status" : "final",
"code" : {
"coding" : [
{
"system" : "http://snomed.info/sct",
"code" : "419183001",
"display" : "Practitioner decision status"
}
]
},
"valueCodeableConcept" : {
"coding" : [
{
"system" : "https://fhir.ee/CodeSystem/arsti-otsus",
"code" : "1"
}
]
}
}
],
"identifier" : [
{
"system" : "https://fhir.ee/hcert/health-certificate-number",
"value" : "HCERT-321"
}
],
"status" : "preliminary",
"type" : {
"coding" : [
{
"system" : "http://snomed.info/sct",
"code" : "772786005",
"display" : "Medical certificate (record artifact)"
}
]
},
"category" : [
{
"coding" : [
{
"system" : "https://fhir.ee/CodeSystem/tervisekontrolli-kasutusala",
"code" : "driver-group-I"
}
]
}
],
"subject" : [
{
🔗 "reference" : "Patient/200"
}
],
"date" : "2024-11-05T11:45:29.0437162+00:00",
"author" : [
{
"reference" : "#100"
}
],
"title" : "Mootorsõiduki juhtimise tervisetõend",
"event" : [
{
"period" : {
"start" : "2024-11-05T00:00:00.000+00:00",
"end" : "2025-11-05T00:00:00.000+00:00"
}
}
],
"section" : [
{
"code" : {
"coding" : [
{
"system" : "https://fhir.ee/CodeSystem/tervisetoendi-sektsioon",
"code" : "decision"
}
]
},
"entry" : [
{
"reference" : "#400"
}
]
},
{
"code" : {
"coding" : [
{
"system" : "https://fhir.ee/CodeSystem/tervisetoendi-sektsioon",
"code" : "reject-reason"
}
]
},
"text" : {
"status" : "additional",
"div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\">Ei tunne värve</div>"
}
},
{
"code" : {
"coding" : [
{
"system" : "https://fhir.ee/CodeSystem/tervisetoendi-sektsioon",
"code" : "health-declaration"
}
]
},
"entry" : [
{
🔗 "reference" : "QuestionnaireResponse/300"
}
]
}
]
}
URL: GET [base]/Composition/500/_history/1
{
"resourceType" : "Composition",
"id" : "500",
"meta" : {
"profile" : [
🔗 "https://fhir.ee/hcert/StructureDefinition/ee-health-certificate-driver"
]
},
"text" : {
"status" : "generated",
"div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: Composition 500</b></p><a name=\"500\"> </a><a name=\"hc500\"> </a><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\"/><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-ee-health-certificate-driver.html\">Mootosõidukijuhi tervisetõend</a></p></div><p><b>identifier</b>: <code>https://fhir.ee/hcert/health-certificate-number</code>/HCERT-321</p><p><b>status</b>: Preliminary</p><p><b>type</b>: <span title=\"Codes:{http://snomed.info/sct 772786005}\">Medical certificate (record artifact)</span></p><p><b>category</b>: <span title=\"Codes:{https://fhir.ee/CodeSystem/tervisekontrolli-kasutusala driver-group-I}\">driver-group-I</span></p><p><b>date</b>: 2024-11-05 11:45:29+0000</p><p><b>author</b>: <a href=\"#hc500/100\">PractitionerRole</a></p><p><b>title</b>: Mootorsõiduki juhtimise tervisetõend</p><h3>Events</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Period</b></td></tr><tr><td style=\"display: none\">*</td><td>2024-11-05 00:00:00+0000 --> 2025-11-05 00:00:00+0000</td></tr></table><hr/><blockquote><p class=\"res-header-id\"><b>Generated Narrative: PractitionerRole #100</b></p><a name=\"500/100\"> </a><a name=\"hc500/100\"> </a><p><b>practitioner</b>: <a href=\"Practitioner-36109255737.html\">Practitioner Paavo Lepzig </a></p><p><b>organization</b>: <a href=\"Organization-90006399.html\">Organization PÕHJA-EESTI REGIONAALHAIGLA</a></p></blockquote><hr/><blockquote><p class=\"res-header-id\"><b>Generated Narrative: Observation #400</b></p><a name=\"500/400\"> </a><a name=\"hc500/400\"> </a><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\"/><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-ee-health-certificate-decision.html\">Tervisetõendi otsus</a></p></div><p><b>status</b>: Final</p><p><b>code</b>: <span title=\"Codes:{http://snomed.info/sct 419183001}\">Practitioner decision status</span></p><p><b>value</b>: <span title=\"Codes:{https://fhir.ee/CodeSystem/arsti-otsus 1}\">jah</span></p></blockquote></div>"
},
"contained" : [
{
"resourceType" : "PractitionerRole",
"id" : "100",
"practitioner" : {
🔗 "reference" : "Practitioner/36109255737"
},
"organization" : {
🔗 "reference" : "Organization/90006399"
}
},
{
"resourceType" : "Observation",
"id" : "400",
"meta" : {
"profile" : [
🔗 "https://fhir.ee/hcert/StructureDefinition/ee-health-certificate-decision"
]
},
"status" : "final",
"code" : {
"coding" : [
{
"system" : "http://snomed.info/sct",
"code" : "419183001",
"display" : "Practitioner decision status"
}
]
},
"valueCodeableConcept" : {
"coding" : [
{
"system" : "https://fhir.ee/CodeSystem/arsti-otsus",
"code" : "1"
}
]
}
}
],
"identifier" : [
{
"system" : "https://fhir.ee/hcert/health-certificate-number",
"value" : "HCERT-321"
}
],
"status" : "preliminary",
"type" : {
"coding" : [
{
"system" : "http://snomed.info/sct",
"code" : "772786005",
"display" : "Medical certificate (record artifact)"
}
]
},
"category" : [
{
"coding" : [
{
"system" : "https://fhir.ee/CodeSystem/tervisekontrolli-kasutusala",
"code" : "driver-group-I"
}
]
}
],
"subject" : [
{
🔗 "reference" : "Patient/200"
}
],
"date" : "2024-11-05T11:45:29.0437162+00:00",
"author" : [
{
"reference" : "#100"
}
],
"title" : "Mootorsõiduki juhtimise tervisetõend",
"event" : [
{
"period" : {
"start" : "2024-11-05T00:00:00.000+00:00",
"end" : "2025-11-05T00:00:00.000+00:00"
}
}
],
"section" : [
{
"code" : {
"coding" : [
{
"system" : "https://fhir.ee/CodeSystem/tervisetoendi-sektsioon",
"code" : "decision"
}
]
},
"entry" : [
{
"reference" : "#400"
}
]
},
{
"code" : {
"coding" : [
{
"system" : "https://fhir.ee/CodeSystem/tervisetoendi-sektsioon",
"code" : "reject-reason"
}
]
},
"text" : {
"status" : "additional",
"div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\">Ei tunne värve</div>"
}
},
{
"code" : {
"coding" : [
{
"system" : "https://fhir.ee/CodeSystem/tervisetoendi-sektsioon",
"code" : "health-declaration"
}
]
},
"entry" : [
{
🔗 "reference" : "QuestionnaireResponse/300"
}
]
}
]
}
Tõendi kustutamine on võimalik vaid Mustand olekust. Kustutatud ressurss on kättesaadav ajaloost aga id järgi laadides ega otsinguga pole kättesaadav.
URL: DELETE [base]/Composition/500
Tõendi peatamine tehakse $suspend operatsiooniga.
Tõendi tühistamine tehakse $cancel operatsiooniga.
Otsing on implementeeritud FHIR standardi järgi: https://hl7.org/fhir/search.html
Parameeter | Kirjeldus | Väärtustatud näidis |
---|---|---|
_count | Mitu tulemust tagastada lehel, vaikimisi 20. | _count=5 |
_page | Lehe number mida tagastada | _page=1 |
_sort | Väli mille järgi sorteerida ja suund, võib olla mitu | _sort=-date |
subject:Patient.identifier | Patsiendi identifikaator kujul "system|value", eraldaja sümbol peab olema URL encode-itud. Võimalusel kasutada subject | subject:Patient.identifier=https://fhir.ee/sid/pid/est/ni%7C37412251234 |
subject | MPI patsiendi id. Eelisatud variant patsiendi identifitseerimiseks otsingus | subject=Patient/123 |
status | Tõendi staatus | status=final |
category | Tervisetõendi kasutusala | category=driver-group-I |
section-code-text | Tööandja asutus. Lubatud formaat employer$XXXXXX, kus XXXXXX on asutuse Äriregistri kood | section-code-text=employer$16978044 |
author:PractitionerRole.practitioner | Autori isikukoodi | author:PractitionerRole.practitioner=Practitioner/38912042211 |
author:PractitionerRole.organization | Autori asutuse kood (Äriregistri kood) | author:PractitionerRole.organization=Organization/1234567 |
entry | Tervisedeklaratsiooni id | entry=QuestionnaireResponse/1234 |
period | Kehtivus. Rakendus kontrollib kas antud kuupäev kuulub tõendi kehtivuse perioodi alla | period=2025-01-12 |
URL: GET [base]/Composition?{param1}={value1}&...
{
"resourceType": "Bundle",
"type": "searchset",
"total": 35,
"link": [
{
"relation": "self",
"url": "[base]/Composition?subject=Patient/582278&_sort=-date&_page=1"
},
{
"relation": "first",
"url": "[base]/Composition?subject=Patient/582278&_sort=-date&_page=1"
},
{
"relation": "last",
"url": "[base]/Composition?subject=Patient/582278&_sort=-date&_page=4"
},
{
"relation": "next",
"url": "[base]/Composition?subject=Patient/582278&_sort=-date&_page=2"
}
],
"entry": [
{
"fullUrl": "Composition/20695",
"resource": {
"resourceType": "Composition",
"id": "20695",
"meta": {
"versionId": "3",
"lastUpdated": "2025-05-19T10:24:51.113+03:00",
"profile": [
"https://fhir.ee/hcert/StructureDefinition/ee-health-certificate-driver"
]
},
"contained": [
...
],
...
"subject": [
{
"reference": "Patient/582278/_history/1"
}
],
"date": "2025-05-19T03:00:00+03:00",
...
}
},
{
"fullUrl": "Composition/20700",
"resource": {
"resourceType": "Composition",
"id": "20700",
"meta": {
"versionId": "1",
"lastUpdated": "2025-05-19T20:24:51.113+03:00",
"profile": [
"https://fhir.ee/hcert/StructureDefinition/ee-health-certificate-occupational"
]
},
"contained": [
...
],
...
"subject": [
{
"reference": "Patient/582278/_history/1"
}
],
"date": "2025-05-19T03:00:00+03:00",
...
}
}
...
]
}
Tõendi ligipääsu pärimine tehakse $get-consent operatsiooniga.
Tõendi ligipääsu muutmine tehakse $set-consent operatsiooniga.
API tagastab vead OperationOutcome ressursina mille sees võib olla mitu issue
elementi koos vigadega.
HCERT enda vead tulevad süsteemiga https://hcert.tehik.ee/issue
, vastus aga võib sisalda ka teiste teenuste (teise süsteemiga) vead.
Näide OperationOutcome
-ist:
{
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n<dt>HCERT-008</dt><dd>Could not find unique patient by https://tehik.ee/mpi/external-reference|123</dd>\n</div>"
},
"issue": [
{
"id": "4355b879-d490-47ee-be13-21239616bde6",
"severity": "error",
"code": "invalid",
"details": {
"coding": [
{
"system": "https://hcert.tehik.ee/issue",
"code": "HCERT-008"
}
],
"text": "Could not find unique patient by https://tehik.ee/mpi/external-reference|123"
}
}
]
}