API za Pull notifikacije - JSON
{
"openapi": "3.0.3",
"info": {
"version": "0.1.0",
"title": "FHIR Notification Pull Service",
"description": "API for pulling notifications about SGP referral and Clinical Documents Changes",
"contact": {
"name": "Krešimir Kerš",
"email": "kresimir.kers@ericsson.com"
}
},
"paths": {
"/getNotifications": {
"get": {
"description": "Get all notifications not yet received by recepient identifier",
"parameters": [{
"name": "recepient",
"description": "Identifier of recepient for which notifications need to be pulled. Depending on specified recepient_type this can be identifier of organization, practitioner, medical device or information system",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
},
{
"name": "recepient_type",
"description": "Type of recepient identifier for which notifications need to be pulled. It can be HC Organization (organization), HC practitioner (practitioner), Medical device or information system (device)",
"in": "query",
"required": true,
"schema": {
"$ref": "#/components/schemas/recepient_typeType"
}
},
{
"name": "date_from",
"description": "Notification created after specified date should be retireved.",
"in": "query",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "date_to",
"description": "Notification created before specified date should be retireved.",
"in": "query",
"required": false,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "All active notifications for organization",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/getNotificationsResponseOK"
}
}
}
},
"500": {
"description": "Error response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/responseError"
}
}
}
}
}
}
},
"/changeNotificationState": {
"post": {
"description": "Changes state of one notification",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/changeNotificationStateRequest"
}
}
}
},
"responses": {
"200": {
"description": "Notification state changed",
},
"500": {
"description": "Error response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/responseError"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"getNotificationsResponseOK": {
"type": "array",
"items": {
"$ref": "#/components/schemas/notification"
}
},
"notification": {
"type": "object",
"required": [
"uuid",
"resource",
"status",
"organization"
],
"properties": {
"uuid": {
"type": "string",
"description": "Unique identifier of notification. Each notification sent has different uuid except when notification state is changing then uuid of notification which state is changed must be sent"
},
"timestamp": {
"type": "string",
"description": "Notification creation timestamp. Can be used to sort messages"
},
"resource": {
"type": "object",
"description": "FHIR resource Task (notifications about changes in SGP referral process) or DocumentReference (changes in registration of clinical documents)"
},
"status": {
"$ref": "#/components/schemas/statusType"
},
"recepient": {
"type": "string",
"description": "Identifier of recepient of notification. Depending on type it can be HC organization, HC practitioner or medical device or information system"
},
"recepient_type": {
"$ref": "#/components/schemas/recepient_typeType"
},
"intendedRecepients": {
"type": "array",
"description": "Identifier of indended recepient (Healthcare practitioner) of notification",
"items": {
"type": "string"
}
}
}
},
"changeNotificationStateRequest": {
"type": "object",
"required": [
"uuid",
"status"
],
"properties": {
"uuid": {
"type": "string",
},
"status": {
"$ref": "#/components/schemas/statusType"
}
}
},
"responseError": {
"type": "object",
"required": [
"error"
],
"properties": {
"error": {
"type": "object",
"required": [
"errorCode"
],
"properties": {
"errorCode": {
"type": "object",
"required": [
"system",
"code"
],
"properties": {
"system": {
"type": "string"
},
"code": {
"type": "string"
}
}
},
"errorDescription": {
"type": "string"
}
}
}
}
},
"statusType": {
"type": "string",
"enum": ["active", "closed"],
"description": "status of notification ACTIVE or CLOSED"
},
"recepient_typeType": {
"type": "string",
"enum": ["organization", "practitioner", "device"],
"description": "Type of recepient of notification. It can be HC organization (organization), HC practitioner (practitioner), medical device or healthcare system (device)"
}
}
}
}