Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


...

patient_id validate:

  1. patient_id is UUID
  2. patient exists in DB
  3. patient is active and is_active=true
  •   
  •   
  •  

...

encounter_id validate:

  1. encounter_id is UUID
  2. that $.{encounter}[*].id from the payload are all unique among themselves
  3. there is no entity with such id in the corresponding Medical events collection
  •   
  •   
  •  

...

status validate:

  1. by dictionary eHealth/encounter_statuses
  •   

...

  1. date is real
  2. current_date-encounter_max_days_passed  >= date <= current_date
  •   
  •    

...

visit. validate:

  1. visit as reference 
  2. "visit" is a visit that belongs to the current patient
  •   
  •   
  •  

...

episode validate 

...


ValidationSD
resourceType

meta.profile


subject (patient_id) validate:

  1. is sent
  2. patient_id is UUID
  3. patient exists in DB
  4. patient is active and is_active=true


  •   
  •   
  •   
  •   

id validate:

  1. is sent
  2. encounter_id is UUID
  3. that $.{encounter}[*].id from the payload are all unique among themselves
  4. there is no entity with such id in the corresponding Medical events collection


  •   
  •   
  •   
  •   

status validate:

  1. by dictionary eHealth/encounter_statuses


  •   
date validate:
  1. is sent
  2. date is real
  3. current_date-encounter_max_days_passed  >= date <= current_date


  •   
  •    
  •   

visit. validate:

  1. is sent
  2. visit as reference 
  3. "visit" is a visit that belongs to the current patient


  •   
  •   
  •   

episodeOfCare (episode) validate 

  1. is sent
  2. episode as reference 
  3. $.encounter.episode.identifier.value is one of  ME.patinet{patient_id}.episodes{*}.id
  4. ME.patient{patinet_id}.episodes{episode_id}.status = 'active'
  5. ME.patient{patinet_id}.episodes{episode_id}.managing_organization==token.client_id


  •   
  •   
  •   
  •   
  •   

basedOn (incoming referrals). Validate:

  1. as reference 
  2. is used_by_legal_entity.identifier.value==token.client_id OR null
  3. status==active or program_processing_status=in_progress (any status is valid in case program_processing_status = in_progress)
  4. category=='409063005' (Counselling)
  5. program is defined program_processing_status=new, in_queue or in_progress


  •   
  •   
  •   
  •   
  •   

class. Validate:

  1. is sent
  2. as coding item
  3. by dictionary eHealth/encounter_classes


  •   
  •   
  •   

type. Validate:

  1. is sent
  2. is codable concept
  3. by dictionary eHealth/encounter_types


  •   
  •   
  •   

participant. performer. Validate

  1. is sent
  2. performer as a reference to employee
  3. employee status = active and is_active=true
  4. is an ID of existing employee in PRM.Employees
  5. PRM.Employees.legal_entity== client_id


  •   
  •   
  •   
  •    
  •   
incoming referrals

serviceProvider. Validate

:program is defined program_processing_status=new, in_queue or in_progress 

  • as reference 
  • is used_by_legal_entity.identifier.value==token.client_id OR null
  • status==active or program_processing_status=in_progress (any status is valid in case program_processing_status = in_progress)
  • category=='409063005' (Counselling)
    1. is sent
    2. serviceProvider as a reference to legal_entity
    3. legal_entity status = active and is_active=true
    4. legal_entity.id == token.client_id


    •   
    •   
    •   
    •    
    class

    reasons. Validate:

    as coding item

    1. by
    dictionary
    1. dictionaries eHealth/ICPC2/reasons OR eHealth/
    encounter_classes 
    1. ambulatory/reasons


    •   
     
    type

    diagnoses. Validate:

    1. is codable concept
    2. by dictionary eHealth/encounter_types
    •   
    •   

    performer. Validate

    1. performer as a reference to employee
    2. employee status = active and is_active=true
    3. is an ID of existing employee in PRM.Employees
    4. PRM.Employees.legal_entity== client_id

    diagnosis.condition

    1. is sent
    2. as reference to condition
    3. condition is not in status `entered_in_error`
    4. condition is made for the same patient

    diagnosis.use

    1. codable_concept

    diagnosis.rank

    1. string


    •   
    •   
    •   
    •   
      
    reasons

    actions. Validate:

    1. by
    dictionaries
    1. dictionaries eHealth/ICPC2/
    reasons
    1. actions OR eHealth/ambulatory/
    reasons
    1. actions


    •  
     
    •   
    diagnoses

    location division. Validate:

    1. as a reference to
    condition
  • condition is not in status `entered_in_error`
  • condition is made for the same patient
    1. division 
    2. PRM.division.status = "ACTIVE" and is-active=true
    3. PRM.division.legal_entity= token.client_id


    •   
    •   
    •   
    actions

    prescriptions. Validate:

    1. by dictionaries eHealth/ICPC2/actions OR eHealth/ambulatory/actions
    •    
    division
    1. as a string with max length = 2000 


    •   

    supporting_info. Validate:

    1. as a reference to
    division 
  • PRM.division.status = "ACTIVE" and is-active=true
  • PRM.division.legal_entity= token.client_id
    •   
    •   
    •   

    prescriptions. Validate:

    1. as a string with max length = 2000 
    •   

    supporting_info. Valudate:

    1. as a reference to "observation" or "diagnostic_report"
    2. validate "observation" or "diagnostic_report" is not in status `entered_in_error`
    •    
    •   
    1. "observation" or "diagnostic_report"
    2. validate "observation" or "diagnostic_report" is not in status `entered_in_error`


    •    
    •   

    hospitalization.admitSource

    1. is codable concept
    2. by dictionary eHealth/encounter_sadmitSource


    •    
    •   

    hospitalization.reAdmission

    1. is codable concept
    2. by dictionary eHealth/encounter_reAdmission


    •    
    •   

    encounter.priority

    1. is codable concept
    2. by dictionary eHealth/encounter_priority


    •    
    •   

    encounter.period