Versions Compared

Key

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


...

patient_id validate:

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

...

encounter_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


  •   
  •   
  •    
  •  
visit. validateclass
  • is sent
  • as coding item dictionary eHealth/encounter_classes
    •   
    •   
    dictionaries reasons reasons 
    •    
    division
    1. by dictionaries eHealth/ICPC2/actions OR eHealth/ambulatory/actions
    division 
  • PRM.division.status = "ACTIVE" and is-active=true
  • PRM.division.legal_entity= token.client_id
    •   
    •   
    •   
    •   
    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


    •   
    •   
    •   
    •   
    •   

    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

    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. visit as reference "visit" is a visit that belongs to the current patientcoding item
    3. by dictionary eHealth/encounter_classes


    •   
    •   
    •   
    episode validate 

    type. 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.is codable concept
    6. 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 referralsserviceProvider. Validate:

    as reference 

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


    •   
    •   
    •   
    •     

    reasons. Validate:

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


    •   

    typediagnoses. Validate:

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

    performer. Validate

    diagnosis.condition

    1. is sent
    performer
    1. as
    a
    1. reference to
    employee
  • employee status = active and is_active=true
  • is an ID of existing employee in PRM.Employees
  • PRM.Employees.legal_entity== client_id
    1. condition
    2. condition is not in status `entered_in_error`
    3. condition is made for the same patient

    diagnosis.use

    1. codable_concept

    diagnosis.rank

    1. string


    •   
    •   
    •   
    •     
    reasons

    actions. Validate:

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


    •  
    •   

    diagnoseslocation division. Validate:

    is sent

    1. as a reference to condition
    2. condition is not in status `entered_in_error`
    3. 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. as a string with max length = 2000 


    •   

    supporting_info. Validate:

    1. as a reference to

    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