Versions Compared

Key

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

Purpose

API paragraph not found

Specification

...

idAPI_Specification

...

Link

...

https://ehealthmisapi1.docs.apiary.io/#reference/private.-reimbursement/private-medication-request/private.-get-medication-request-by-id

...

Посилання на Apiary або Swagger

...

Resource

...

/api/admin/medication_requests/{{id}}

...

Посилання на ресурс, наприклад: /api/persons/create

...

Scope

...

medication_request_admin:details

...

Scope для доступу

...

Components

...

ePrescription

...

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

...

Microservices

...

API paragraph not found

...

Перелік мікросервісів, які використовує метод API, наприклад: Auth, ABAC

...

Protocol type

...

REST

...

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

...

Request type

...

GET

...

Тип запиту API, наприклад: GET, POST, PATCH…

...

Sync/Async

...

Sync

...

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

...

Public/Private/Internal

...

Private

...

Потрібно зазначити тип методу за ступенем доступності

Logic

API paragraph not found

Input parameters

...

Input parameter

...

Values

...

Type

...

Description

...

Example

...

id

...

String

...

Medication Request identifier OR request_number. Required

...

48416485-cc98-46c4-8bba-e321de9e1ecd

Request structure

API paragraph not found

Authorize

Request to process the request using a token in the headers

Headers

Наприклад:

Content-Type:application/json

Authorization:Bearer c2778f3064753ea70de870a53795f5c9

Request data validation

API paragraph not found

Processing

API paragraph not found

Response structure

Example:

...

titleResponse example

...

Table of Contents

Purpose

WS returns data of MR to NHS Admin

Logic

  1. Verify the validity of access token

  2. Check user scopes in order to perform this action (scope = 'medication_request_request:read')

  3. Search Requests for Medication request requests by id in WS url: 

    Code Block
    SELECT * FROM medication_request_requests 
        WHERE id=$.id 
            AND legal_entity_id = $.context.legal_entity_id
    
    

Logic WS for medication request requests based on care plan

  1. Get party_id  from $.context.user_id

  2. Get list from $.prm.employees for this party_id

  3. Get care_plan_id from $.medication_request_requests.data_based_on_care_plan_id

  4. Check $.approvals for user's employees (granted_to) on care_plan_id (granted_resources) and $.medication_request_requests.person_id (granted_by)

  5. Search Medication request requests by filters: data_based_on_care_plan_id, person_id.

    Code Block
    SELECT * FROM medication_request_requests MRR
    WHERE MRR.id = $.id 
        AND MRR.data_based_on_care_plan_id = $.id
        AND MRR.person_id = $.id
        AND MRR.is_active = TRUE
    

Input parameters

Input parameter

Values

Type

Description

Example

id

 

String

Request id.

Required

48416485-cc98-46c4-8bba-e321de9e1ecd

Headers

Content-Type:application/json

Authorization:Bearer c2778f3064753ea70de870a53795f5c9

Validate request

Validate FK

  1. Validate id - medication_request_request_id exists

    • Return 422 in case validation fails (422 EView)

Dictionaries

API paragraph not found

Response structure

See on Apiary

Example:

Expand
titleResponse example
Code Block
{
  "meta": {
    "code": 200,
    "url": "https://example.com/resource",
    "type": "object",
    "request_id": "req-adasdoijasdojsda"
  },
  "data": {
      "id": "b075f148-7f93-4fc2-b2ec-2d81b19a9b7b",
 
    "namestatus": "Клініка НоунеймNEW",
      "shortrequest_namenumber": "Ноунейм0000-243P-1X53-EH38",
 
    "publiccreated_nameat": "Клініка Ноунейм2017-08-17",
 
    "typestarted_at": "MSP2017-08-17",

     "edrpouended_at": "54323454322017-09-16",
      "status"dispense_valid_from": "ACTIVE"
    },
    "division": {2017-08-17",
      "id"dispense_valid_to": "d290f1ee2017-6c54-4b01-90e6-d701748f085109-16",

     "legal_entity_": {
      "id": "c8aadb87b075f148-ecb97f93-41ca4fc2-9ad4b2ec-ffdfe1dd89c92d81b19a9b7b",
      "name": "БориспільськеКлініка відділення Клініки Ноунейм",
      "addressesshort_name": [
        {"Ноунейм",
           "type"public_name": "RESIDENCEКлініка Ноунейм",
   
      "countrytype": "UAMSP",
          "areaedrpou": "Житомирська5432345432",
  
       "regionstatus": "БердичівськийACTIVE",
    },
     "settlementdivision": "Київ",
  {
       "settlement_typeid": "CITYd290f1ee-6c54-4b01-90e6-d701748f0851",
          "settlement"legal_entity_id": "b075f148c8aadb87-ecb9-41ca-9ad4-ffdfe1dd89c9",
      "name": "Бориспільське відділення Клініки "street_type": "STREET",Ноунейм",
      "addresses": [
      "street": "вул. Ніжинська", {
          "buildingtype": "15RESIDENCE",
          "apartmentcountry": "23UA",
          "ziparea": "02090Житомирська",
        }  "region": "Бердичівський",
   ],       "phonessettlement": [
        {"Київ",
          "settlement_type": "MOBILECITY",
          "numbersettlement_id": "+380503410870b075f148",
        }  "street_type": "STREET",
   ],       "emailstreet": "email@exampleвул.com Ніжинська",
          "working_hoursbuilding": "15",
{          "monapartment": ["23",
          [
"zip": "02090"
        }
  "08.00",    ],
        "12.00phones": [
        {
],           ["type": "MOBILE",
           "number": "14.00+380503410870",
        }
   "18.00"   ],
       ]"email": "email@example.com",
        ],"working_hours": {
        "tuemon": [
          [
            "08.00",
            "12.00"
       
  ]         ],
        "wed":
[           [
            "0814.00",
            "1218.00"
          ]
        ],
        "thutue": [
          [
            "08.00",
            "12.00"
          ]
        ],
        "friwed": [
          [
            "08.00",
            "12.00"
          ]
        ],
        "thu": [
          [
 },           "type": "CLINIC",08.00",
            "external_id": "3213213",12.00"
        "location": { ]
       "latitude": 30.1233 ],
        "longitudefri": [
50.32423        },  [
    "dls_id": "2872985",       "dls_verified": true
    }08.00",
    "employee": {       "id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
 12.00"
          ]
    "position": "P6",   ]
   "party": {  },
      "idtype": "b075f148-7f93-4fc2-b2ec-2d81b19a9b7bCLINIC",
        "no_taxexternal_id": true"3213213",
        "first_namelocation": "Петро",{
        "last_namelatitude": "Іванов"30.1233,
        "second_namelongitude": "Миколайович", 50.32423
      },
      "emaildls_id": "email@example.com2872985",
        "phonesdls_verified": [true
    },
    "employee": {
      "id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
      "typeposition": "MOBILEP6",
      "party": {
        "numberid": "+380503410870"b075f148-7f93-4fc2-b2ec-2d81b19a9b7b",
        "no_tax_id": true,
}         ]
      }"first_name": "Петро",
     },   "last_name":  "personІванов":,
 {       "idsecond_name": "01352B970879A80E19B60C15C8E488DA26CABC3B9F7FA71684904A99DBD5ACE4Миколайович",
        "short_nameemail": "Петро І. І.email@example.com",
        "agephones": 35[
    },     "medication_info": {
        "medication_id    "type": "4a63b858-c138-4921-9341-ae9e384bcbd6MOBILE",
  
   "medication_name": "Аміодарон 200мг таблетки",       "formnumber": "PILL+380503410870",
      "dosage": {   }
     "numerator_unit": "MG",  ]
      "numerator_value": 200,}
    },
    "denumerator_unitperson": "PILL",{
        "denumerator_valueid": 1
      }"b075f148-7f93-4fc2-b2ec-2d81b19a9b7b",
      "ingredientsshort_name": "Петро [
І. І.",
      "age": {35
    },
     "idmedication_info": "1349a693-4db1-4a3f-9ac6-8c2f9e541982",{
          "name"medication_id": "Інсулін деглюдек4a63b858-c138-4921-9341-ae9e384bcbd6",
 
        "medication_name_original": "InsulinАміодарон 200мг degludecтаблетки",
          "sctidform": "52574003PILL",
 
        "dosage": {
            "numerator_unit": "MG",
   
        "numerator_value": 200,

           "denumerator_unit": "PILL",
   
        "denumerator_value": 1
   
      },
          "is_primary"ingredients": true[
        }{
      ],     "id":  "medication_qty": 10.34"1349a693-4db1-4a3f-9ac6-8c2f9e541982",
     },     "medical_programname": {
   "Інсулін деглюдек",
  "id": "c7d52544-0bd4-4129-97b0-2d72633e0490",       "name_original": "ДоступніInsulin лікиdegludec",
          "medical_program_settingssctid": "52574003",
{          "care_plan_requireddosage": true, {
            "employee_types_to_create_medication_request": [numerator_unit": "MG",
            "SPECIALIST",numerator_value": 200,
            "DOCTORdenumerator_unit":  "PILL",
      ],         "skip_mnn_in_treatment_perioddenumerator_value": true,1
          "skip_employee_validation": true,},
          "specialityis_types_allowedprimary": true
[        }
  "ENDOCRINOLOGY",    ],
      "PEDIATRICmedication_NEUROLOGYqty": 10.34
    },
  ],
   "medical_program": {
      "conditions_icd10_am_allowedid": ["c7d52544-0bd4-4129-97b0-2d72633e0490",
      "name": "Доступні   "A00.0"ліки",
          "A00.1""medical_program_settings": {
         ]"care_plan_required": true,
        "conditions_icpc2_allowedemployee_types_to_create_medication_request": [
          "A01SPECIALIST",
          "A02DOCTOR"
        ],
        "providing_conditions_allowed": [
          "INPATIENT",
skip_mnn_in_treatment_period": true,
         "OUTPATIENTskip_employee_validation"
        ]: true,
        "medicationspeciality_request_max_period_daytypes_allowed": 90,[
          "skip_medication_request_employee_declaration_verify": true,ENDOCRINOLOGY",
          "skip_medication_request_legal_entity_declaration_verify": truePEDIATRIC_NEUROLOGY"
        ],
        "multiconditions_medicationicd10_dispenseam_allowed": true,[
          "skip_medication_dispense_sign": true,A00.0",
          "medication_request_notification_disabled": trueA00.1"
        ],
        "skipconditions_contracticpc2_provision_verifyallowed": [
true,          "medication_dispense_period_day": 90,A01",
          "medical_program_change_on_dispense_allowed": trueA02"
        ],
        "patientproviding_categoriesconditions_allowed": [
          "insulin_1INPATIENT",
          "insulin_2OUTPATIENT"
        ],
        "license_types_allowedmedication_request_max_period_day": [90,
          "PHARMACY""skip_medication_request_employee_declaration_verify": true,
          "PHARMACY_DRUGS"
"skip_medication_request_legal_entity_declaration_verify": true,
       ]
      }, "multi_medication_dispense_allowed": true,
        "funding_sourceskip_medication_dispense_sign": "NHS"true,
        "mrmedication_request_blanknotification_typedisabled": "F-1"true,
    },     "intent": "plan",
"skip_contract_provision_verify": true,
   "category": "community",     "based_onmedication_dispense_period_day": [90
      {
},
       "identifier"medical_program_settings_text": {
   "Some text",
      "typeis_active": {true,
      "medication_dispense_allowed": true,
      "codingmedication_dispense_allowed_text": ["Some text",
             {"medication_request_allowed": true,
      "medication_request_allowed_text":    "Some text",
      "systemtype": "eHealth/resourcesMEDICATION",
      "funding_source": "NHS",
        "code"mr_blank_type": "care_plan"F-1",
      "inserted_at": "2017-04-20T19:14:13Z",
      }
"inserted_by": "e1453f4c-1077-4e85-8c98-c13ffca0063e",
      "updated_at": "2017-04-20T19:14:13Z",
   ]   "updated_by": "2922a240-63db-404e-b730-09222bfeb2dd"
      },
    "intent": "plan",
    "valuecategory": "9183a36b-4d45-4244-9339-63d81cd08d9c"community",
        }
      },"based_on": [
      {
        "identifier": {
          "type": {
            "coding": [
              {
                "system": "eHealth/resources",
                "code": "activitycare_plan"
              }
            ]
          },
          "value": "9183a36b-4d45-4244-9339-63d81cd08d9c"
        }
      }
 ,
  ],    {
"context": {       "identifier": {
          "type": {
            "coding": [
              {
                "system": "eHealth/resources",
                "code": "encounteractivity"
              }
            ]
          },
          "value": "9183a36b-4d45-4244-9339-63d81cd08d9c"
      }     },
    "dosage_instruction": [ }
     {
  ],
     "sequencecontext": 1,
 {
      "text": "0.25mg PO every 6-12 hours as needed for menses from Jan 15-20, 2015.  Do not exceed more than 4mg per day",identifier": {
        "type": {
          "additional_instructioncoding": [
            {
              "codingsystem": ["eHealth/resources",
              {
"code": "encounter"
            }
  "system": "eHealth/SNOMED/additional_dosage_instructions",       ]
        },
"code": "311504000"       "value": "9183a36b-4d45-4244-9339-63d81cd08d9c"
      }
    },
    "dosage_instruction": [
 ]     {
     }         ]"sequence": 1,
        "patient_instructiontext": "0.25mg PO every 6-12 hours as needed for menses from Jan 15-20, 2015.  Do not exceed more than 4mg per day",
        "timingadditional_instruction": [
          {
            "eventcoding": [
              {
                "system"2017-04-20T19:14:13Z": "eHealth/SNOMED/additional_dosage_instructions",
             ],    "code": "311504000"
          "repeat": {   }
         "bounds_duration": {  ]
          }
 "value": 10,      ],
        "unitpatient_instruction": "days",
              "system": "eHealth/ucum/units",
     0.25mg PO every 6-12 hours as needed for menses from Jan 15-20, 2015.  Do not exceed more than 4mg per day",
        "codetiming": "d"{
          "event": [
},             "count": 2,"2017-04-20T19:14:13Z"
             "count_max": 4,
 ],
          "durationrepeat": 4,{
            "bounds_duration_max": {
 6,             "duration_unitvalue": "d"10,
              "frequencyunit": 1"days",
              "frequency_maxsystem": 2, "eHealth/ucum/units",
              "periodcode": 4,"d"
            "period_max": 6},
            "period_unitcount": "d"2,
            "daycount_of_weekmax": [4,
            "duration": 4,
"mon"             ]"duration_max": 6,
            "timeduration_of_dayunit": ["d",
            "frequency":  "2017-04-20T19:14:13Z"1,
             ]"frequency_max": 2,
            "whenperiod": [4,
            "period_max": 6,
"WAKE"             ]"period_unit": "d",
            "offsetday_of_week": 4[
          },       "mon"
   "code": {        ],
    "coding": [        "time_of_day": [
     {         "2017-04-20T19:14:13Z"
       "system": "TIMING_ABBREVIATIONS",    ],
            "codewhen": "patient"[
              }"WAKE"
            ],
          }  "offset": 4
     },         "as_needed_boolean": true,},
          "sitecode": {
            "coding": [
              {
                "system": "eHealth/SNOMED/anatomical_structure_administration_site_codes",TIMING_ABBREVIATIONS",
                "code": "patient"
              }
         "code": "344001"  ]
          }
        },
 ]         }"as_needed_boolean": true,
        "routesite": {
          "coding": [
            {
              "system": "eHealth/SNOMED/routeanatomical_structure_administration_site_codes",
              "code": "46713006344001"
            }
          ]
        },
        "methodroute": {
          "coding": [
            {
              "system": "eHealth/SNOMED/administrationroute_methodscodes",
              "code": "41974700046713006"
            }
          ]
        },
        "dose_and_rate": {
          "type"method": {
 
          "coding": [

             {
 
              "system": "eHealth/dose_and_rateSNOMED/administration_methods",
 
              "code": "'ordered'"419747000"
            }
     }     ]
       ] },
         },"dose_and_rate": {
          "dose_rangetype": {
            "lowcoding": [
{              {
"value": 0,               "unitsystem": "mgeHealth/dose_and_rate",
                "systemcode": "eHealth/ucum/units",'ordered'"
              }
            ]
        "code": "mg" },
           },"dose_range": {
            "highlow": {
              "value": 0,
              "unit": "mg",
              "system": "eHealth/ucum/units",
              "code": "mg"
          
 }           },
        
 "rate_ratio": {             "numeratorhigh": {
              "value": 0,
              "unit": "mg",
              "system": "eHealth/ucum/units",
              "code": "mg"
            }
          },,
          "rate_ratio": {
            "denominatornumerator": {
              "value": 0,
              "unit": "mg",
              "system": "eHealth/ucum/units",
              "code": "mg"
            },
          }  "denominator": {
     },         "max_dose_per_periodvalue": 0,
   {           "numeratorunit": "mg",
{              "valuesystem": 0,"eHealth/ucum/units",
              "unitcode": "mg",
            }
       "system": "eHealth/ucum/units",  }
        },
 "code": "mg"           },"max_dose_per_period": {
          "denominatornumerator": {
            "value": 0,
            "unit": "mg",
            "system": "eHealth/ucum/units",
            "code": "mg"
          }
,
       },         "max_dose_per_administrationdenominator": {
            "value": 0,
            "unit": "mg",
            "system": "eHealth/ucum/units",
            "code": "mg"
          }
        },
        "max_dose_per_lifetimeadministration": {
          "value": 0,
          "unit": "mg",
          "system": "eHealth/ucum/units",
          "code": "mg"
        }
      }",
      ],     "rejected_atcode": "2022-01-28mg",
    "rejected_by": "e8e5a969-74d8-4620-8496-f5e41f2e8312",   },
 "reject_reason": "Incompatible drugs",     "rejectmax_dose_reasonper_codelifetime": "PATIENT_REJECT",{
    "is_blocked": false,     "block_reasonvalue": "Підозра на фрод", 0,
          "block_reason_codeunit": "BLOCK_WRONG_QTY_DRUGmg",

   "block_legal_entity": {       "idsystem": "UUIDeHealth/ucum/units",
          "typecode": "NHSmg"
        }
      }
    ],
    "priority": "routine",
    "prior_prescription": {
      "identifier": {
        "type": {
          "coding": [
            {
              "system": "eHealth/resources",
              "code": "medication_request"
            }
          ]
        },
        "value": "9183a36b-4d45-4244-9339-63d81cd08d9c"
      }
    },
    "container_dosage": {
      "system": "MEDICATION_UNIT",
      "code": "ML",
      "value": 4
    }
  }
}

Post-processing processes

API paragraph not found

HTTP status codes

idAPI_
Page Properties

HTTP status codes

HTTP status code

Message

What caused the error

...

200

 Response

 

422

 

 validation fails