Versions Compared

Key

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

Table of Contents

#Block DescriptionInputExpected resultActual resultStatus
1

Common validations

Single Valid Encounter reference existing Visit, ConditionEncounter200
created
current diagnoses are set to the episode
200
created
current diagnoses are set to the episode
passed
2Encouner+Visit

Encounter

Visit

200
created
200
created
passed
3Encouner+Several conditions

Encounter

2 Conditions

200
created
200
created
passed
4Encounter + Several conditions + Historical conditionEncounter
2 Conditions (1 historical)
201
passed
5Encounter + Several Observations

Encounter

2 Observations

200
created
200
created
passed
6Encounter + Observations+Conditions
Observations are Evidences for Conditions

Encounter

2 Observations

2 Conditions

Conditions reference observations

200
created
200
created
passed
7Encounter+Several Allergy_Intolerances

Encounter

2 Allergy_Intolerances

201
passed
8Encounter+Immunizations

Encounter

2 Immunizations

201
passed
9Encounter+Immunizations+Observations
Observations are reactions for Immunizations

Encounter

2 Immunizations

2 Observations

Observations reference Immuizations

201
passed
10Full Package

Visit
Encounter
3 Conditions (1 historical)

25 Observations (10 historical)

5 immunization (4 historical, 1 with reaction)

5 allergy_intolerances

201
passed
11

Encounter

Encounter reference visit that does not exist

id of visit that does not exist

409422passed
12Encounter reference visit that belongs to the other patient
409409passed
13Encounter reference episode that does not exist
409422

passed
14Encounter reference episode that belongs to the other patientid of an episode that belongs to another patient409422passed
15Encounter reference episode that belongs to other LE
409422passed
16Encounter reference episode that is not active
409422passed
17Encounter reference condition that does not exist
409422passed
18Encounter reference condition that does not belong to the current patient
409422passed
19Encounter reference condition that canceled
409422passed
20Encounter reference division that does not exist
409422passed
21Encounter reference division that does not belong to the current legal_entity
409422passed
22Encounter reference division that is not active
409422passed
23Encounter date >current_date
422422passed
24Encounter date < permitted min date
422422

passed
25

Invalid

not unique visit id
409409passed
26Period validation handled
handledhandledpassed
27Visit submitted but not referenced
not handled422
"description": "Visit with such ID is not found",
passed
28Empty sign content

422passed
29Sign content is not a base 64 string

422passed
30Sign content IS a base 64 string but not JSON

422passed
31Sign content IS a json but not corresponding

422passed
32

Condition

condition id that already exists in DB
409409
"Condition with id  already exists"
passed
33condition id that repeated in the request
409409

passed
34condition reference wrong  encounter (not from payload)
409409passed
35onset_date longer than current datetime2300 г422422passed
36evidence reference observation that does not exist
422422passed
37evidence reference observation that belongs to another patient 
422422passed
38evidence reference observation in entered_in_error status
409can not reproduce
39asserter validation handled
truetruepassed
40date < permitted min date
422422passed
41Submit condition with 2 codes in different systems


Code Block
"code": {
"coding": [
{
"system": "eHealth/ICPC2/condition_codes",
"code": "R80"
},
{
"system": "eHealth/ICD10/condition_codes",
"code": "J11.1"
}
]
},


422422passed
42

Observation

observation id that already exists in DB
409409passed
43observation id that repeated in the request
409409passed
44observation reference encounter that is not in payload
409409passed
45Period validation handled
handledhandledpassed
46issued > current date_time
409409passed
47Performer validation handled
handledhandledpassed
48All value_types handled

quantity
codeable_concept
string
boolean
range
ratio
sampled_data
time
date_time
period


passed
49Component types
+

+


50date < permitted min date
422422passed
51

Immunization

Valid request case immunization is given


passed
52Valid request case immunization is not given


passed
53Historical immunization


passed
54immunization id that already exists in DB


passed
55immunization id that repeated in the request


passed
56immunization reference encounter that is not in payload


passed
57date < permitted min date
422422passed
58

Allergy Intolerance

Valid requestPackage contains 2 AIs

202

created


202

created

passed
59Allergy Intolerance id that already exists in DB
409409passed
60Allergy Intolerance id that repeated in the request
422422passed
61Allergy Intolerance reference encounter that is not in payload
422422passed
62Onset date is longer than the current date time
422422passed
63

Last occurrence is longer than the current date time


422422passed
64Performer validation handled
handledhandledpassed
65date < permitted min date
422422passed
66

Risk Assessment

Valid request
201
created
201
created
passed
67Risk_assessment structure does not correspond to JSONSchema
422422passed
68Risk_assessment id is not unique in the payload
422422passed
69risk_assessment id already exists in DB
422422passed
70

context is not a current encounter


422422passed
71asserted_date is in future
422422passed
72asserted_date is less than allowed in config
422422passed
73check that performer validation is handled
truetruepassed
74check that reference validation is handled for reason_reference
truetruepassed
75check that reference validation is handled for basis: observation
truetruepassed
76check that reference validation is handled for basis: condition
truetruepassed
77check that reference validation is handled for basis: diagnostic_report



78check that period validation for when_period when_period 
truetruepassed
79

Device

Valid request
201201passed
80Device structure does not correspond to JSONSchema
422422passed
81Device id is not unique in the payload
422422passed
82Device id already exists in DB
422422passed
83context is not a current encounter
422422passed
84asserted_date is in future
422422passed
85asserted_date is less than allowed in config
422422passed
86check that performer validation is handled
truetruepassed
87check that period validation for usage_period handled
truetruepassed
88

Medication Statement








Valid request
201201passed
89MS structure does not correspond to JSONSchema
422
passed
90MS id is not unique in the payload
422
passed
91MS id already exists in DB
422
passed
92context is not a current encounter
422
passed
93asserted_date is in future
422
passed
94asserted_date is less than allowed in config
422
passed
95check that asserter validation is handled
true
passed
96check based_on validates as reference
true

97Diagnostic reportValid request
201201passed
98
JSON Schema validation
422422passed
99
primary key validation: id duplicated in the request
409409passed
100
primary key validation: id duplicated in the DB



101
Based on validation: Based_on is validated as a reference



102
effective_period is validated as a Period



103
 issued  limits are validated



104
recorded by is validated as an employee



105
Only current encounter can be referenced as a encounter



106
performer is validated as an employee



107
As a managing organization could be submitted only current LE



108
Result interpreter is validated as an employee



109
Only one of the fields could be filled simultaneously  results_interpreter.reference Or results_interpreter.text



110
Only one of the fields could be filled simultaneously performer.reference OR performer.text
 




111
primary source == true 



112
primary source == false



113
postprocessing is done



...