Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
minLevel1
maxLevel3

Required parameters are marked with "*"

...

Purpose*

API paragraph not found

...

Table of Contents
minLevel1
maxLevel3

Purpose

This method returns details of service request by identifier related to specified episode of care.

Specification

Page Properties

Link

https://ehealthmedicaleventsapimedicaleventsmisapi.docs.apiary.io/#reference/service-requests/manage-service-requests-in-patient-context/get-service-request-details-within-episode-context

Resource

/api/patients/{{patient_id}}/episodes/{{episode_id}}/service_requests/{{service_request_id}}

Scope

service_request:read

Components

Зазначається перелік бізнес компонентів, які використовують цей метод, наприклад: ePrescriptionService request

Microservices

Перелік мікросервісів, які використовує метод API. Наприклад: Auth, ABACAPI paragraph not found

Protocol type

Тип протоколу, який використовується запитом, наприклад: SOAP | REST

Request type

GET

Sync/Async

Метод є синхронним чи асинхронним?

Logic*

...

Async

Public/Private/Internal

Public

Filters

Filter

Values

Type

Description

Example

patient

Example

patient_id

String

Unique patient identifier

7075e0e2-6b57-47fd-aff7-324806efa7e5

episode_id

String

Unique episode identifier

ef30f210-5328-4f48-bfe6-c7150d4737a6

service_request_id

String

Unique

patient

service request identifier

7075e0e2

aff00bf6-

6b57

68bf-

47fd

4b49-

aff7-324806efa7e5

episode_id

String

Unique episode identifier

ef30f210-5328-4f48-bfe6-c7150d4737a6

service_request_id

String

Unique service request identifier

aff00bf6-68bf-4b49-b66d-f031d48922b3

Request structure*

API paragraph not found

Authorize*

Request to process the request using a token in the headers

...

b66d-f031d48922b3

Request structure

See on Apiary

Authorize

  • Verify the validity of access token

    • Return (401, 'Invalid access token') in case of validation fails

  • Verify that token is not expired

    • in case of error - return (401, 'Invalid access token')

  • Check user scopes in order to perform this action (scope = 'service_request:read')

    • Return (403, 'Your scope does not allow to access this resource. Missing allowances: service_request:read') in case of invalid scope(s)

Access to the resource is also managed by https://e-health-ua.atlassian.net/wiki/spaces/REHABILIT/pages/17325686977 .

Headers

Наприклад:

  • Content-Type:application/json

  • Authorization:Bearer mF_9.B5f-4.1JqMapi-key:aFBLVTZ6Z2dON1V{{access_token}}

  • API-key:{{secret}}

 

Request data validation

...

API paragraph not found

Processing

...

API paragraph not found

...

  1. Get Service request by person_id, episode_id and service_request_id from service_request (MongoDB)

  2. Validate data consistency:

    • Ensure that requested Service requests have ABAC context

      • Return 403 ('Access denied') in case of error

  3. Render a response according to specification with found Service requests entities.

Response structure

See on Apiary

Example:

Expand
titleResponse example
Code Block
{
  "data": {
    "id": "90a9e15b-b71b-4caf-8f2e-ff247e8a5600",
    "requisition": "AX654654T",
    "status": "active",
    "program": {
      "identifier": {
        "type": {
          "coding": [
            {
              "system": "eHealth/resources",
              "code": "medical_program"
            }
          ]
        },
        "value": "9183a36b-4d45-4244-9339-63d81cd08d9c"
      },
      "display_value": "null"
    },
    "program_processing_status": "new",
    "status_history": [
      {
        "status": "closed",
        "status_reason": {
          "coding": [
            {
              "system": "eHealth/service_request_recall_reasons",
              "code": "cured"
            }
          ]
        },
        "inserted_at": "2018-08-02T10:45:16.000Z"
      }
    ],
    "program_processing_status_history": [
      {
        "program_processing_status": "new",
        "inserted_at": "2018-08-02T10:45:16.000Z",
        "inserted_by": "f7bdce4c-9d6e-4b08-913c-97c4b972f9be"
      }
    ],
    "program_service": {
      "identifier": {
        "type": {
          "coding": [
            {
              "system": "eHealth/resources",
              "code": "program_service"
            }
          ]
        },
        "value": "9183a36b-4d45-4244-9339-63d81cd08d9c"
      },
      "display_value": "null"
    },
    "intent": "order",
    "priority": "routine",
    "based_on": [
      {
        "identifier": {
          "type": {
            "coding": [
              {
                "system": "eHealth/resources",
                "code": "care_plan"
              }
            ]
          },
          "value": "9183a36b-4d45-4244-9339-63d81cd08d9c"
        }
      },
      {
        "identifier": {
          "type": {
            "coding": [
              {
                "system": "eHealth/resources",
                "code": "activity"
              }
            ]
          },
          "value": "9183a36b-4d45-4244-9339-63d81cd08d9c"
        }
      }
    ],
    "category": {
      "coding": [
        {
          "system": "eHealth/SNOMED/service_request_categories",
          "code": "409063005"
        }
      ]
    },
    "code": {
      "identifier": {
        "type": {
          "coding": [
            {
              "system": "eHealth/resources",
              "code": "service"
            }
          ]
        },
        "value": "9183a36b-4d45-4244-9339-63d81cd08d9c"
      },
      "display_value": "null"
    },
    "subject": {
      "identifier": {
        "type": {
          "coding": [
            {
              "system": "eHealth/resources",
              "code": "patient"
            }
          ]
        },
        "value": "9183a36b-4d45-4244-9339-63d81cd08d9c"
      },
      "display_value": "null"
    },
    "context": {
      "identifier": {
        "type": {
          "coding": [
            {
              "system": "eHealth/resources",
              "code": "encounter"
            }
          ]
        },
        "value": "9183a36b-4d45-4244-9339-63d81cd08d9c"
      },
      "display_value": "null"
    },
    "occurrence_period": {
      "start": "2018-08-02T10:45:16.000Z",
      "end": "2018-08-02T11:00:00.000Z"
    },
    "requester_employee": {
      "identifier": {
        "type": {
          "coding": [
            {
              "system": "eHealth/resources",
              "code": "employee"
            }
          ]
        },
        "value": "9183a36b-4d45-4244-9339-63d81cd08d9c"
      },
      "display_value": "null"
    },
    "requester_legal_entity": {
      "identifier": {
        "type": {
          "coding": [
            {
              "system": "eHealth/resources",
              "code": "legal_entity"
            }
          ]
        },
        "value": "75a6d991-0bf7-476f-b3cf-bec83f044b2a"
      },
      "display_value": "null"
    },
    "reason_references": [
      {
        "identifier": {
          "type": {
            "coding": [
              {
                "system": "eHealth/resources",
                "code": "condition"
              }
            ]
          },
          "value": "9183a36b-4d45-4244-9339-63d81cd08d9c"
        },
        "display_value": "null"
      }
    ],
    "supporting_info": [
      {
        "identifier": {
          "type": {
            "coding": [
              {
                "system": "eHealth/resources",
                "code": "episode_of_care"
              }
            ]
          },
          "value": "9183a36b-4d45-4244-9339-63d81cd08d9c"
        },
        "display_value": "null"
      }
    ],
    "note": "Some notes",
    "patient_instruction": "Some patient instructions",
    "expiration_date": "2018-08-02T10:45:16.000Z",
    "permitted_resources": [
      {
        "identifier": {
          "type": {
            "coding": [
              {
                "system": "eHealth/resources",
                "code": "episode_of_care"
              }
            ]
          },
          "value": "9183a36b-4d45-4244-9339-63d81cd08d9c"
        },
        "display_value": "null"
      }
    ],
    "used_by_employee": {
      "identifier": {
        "type": {
          "coding": [
            {
              "system": "eHealth/resources",
              "code": "legal_entity"
            }
          ]
        },
        "value": "9183a36b-4d45-4244-9339-63d81cd08d9c"
      },
      "display_value": "null"
    },
    "inserted_at": "2018-08-02T10:45:16.000Z",
    "updated_at": "2018-08-02T10:45:16.000Z",
    "completed_with": {
      "identifier": {
        "type": {
          "coding": [
            {
              "system": "eHealth/resources",
              "code": "diagnostic_report"
            }
          ]
        },
        "value": "9183a36b-4d45-4244-9339-63d81cd08d9c"
      },
      "display_value": "null"
    },
    "used_by_legal_entity": {
      "identifier": {
        "type": {
          "coding": [
            {
              "system": "eHealth/resources",
              "code": "legal_entity"
            }
          ]
        },
        "value": "c5a6d991-0bf7-476f-b3cf-bec83f044b2a"
      },
      "display_value": "null"
    },
    "performer": {
      "identifier": {
        "type": {
          "coding": [
            {
              "system": "eHealth/resources",
              "code": "legal_entity"
            }
          ]
        },
        "value": "c5a6d991-0bf7-476f-b3cf-bec83f044b2a"
      },
      "display_value": "Опанасенко Олексій Володимирович"
    },
    "location_reference": {
      "identifier": {
        "type": {
          "coding": [
            {
              "system": "eHealth/resources",
              "code": "division"
            }
          ]
        },
        "value": "c5a6d991-0bf7-476f-b3cf-bec83f044b2a"
      },
      "display_value": "null"
    },
    "performer_type": {
      "coding": [
        {
          "system": "SPECIALITY_TYPE",
          "code": "DIETETICS"
        }
      ]
    }
  },
  "meta": {
    "code": 200,
    "url": "http://example.com/resource",
    "type": "object",
    "request_id": "req-adasdoijasdojsda"
  }
}

Expand
titleResponse example
Code Block
{
  "meta": {
    "code": 404,
    "url": "http://example.com/resource",
    "type": "object",
    "request_id": "req-adasdoijasdojsda"
  },
  "error": {
    "type": "NOT_FOUND",
    "message": "Service request not found"
  }
}

Post-processing processes

...

API paragraph not found

HTTP status codes

...

Page Properties

HTTP status code

Message

What caused the error

 200

 

 

 404

  

 Service request not found