Versions Compared

Key

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


ValidationSD

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


  •   
date validate:
  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 

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


  •   
  •   
  •   
  •   

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. as coding item
  2. by dictionary eHealth/encounter_classes


  •   
  •   

type. 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


  •   
  •   
  •   
  •    

reasons. Validate:

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


  •   

diagnoses. Validate:

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


  •   
  •   
  •   

actions. Validate:

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


  •    

division. Validate:

  1. as a reference to division 
  2. PRM.division.status = "ACTIVE" and is-active=true
  3. 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`


  •    
  •