Skip to content

Commit

Permalink
fix: update mandatory field validation in the frictionless specificat…
Browse files Browse the repository at this point in the history
…ion and its documentation #652
  • Loading branch information
megin1989 committed Jan 15, 2025
1 parent 43a009b commit e167d26
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@
"unknown"
]
}},
{"name": "ENCOUNTER_TYPE_CODE", "type": "string", "description":"Bundle.entry.resource.where(resourceType ='Encounter').type.coding.code", "constraints": { "enum": [
{"name": "ENCOUNTER_TYPE_CODE", "type": "string", "description":"Bundle.entry.resource.where(resourceType ='Encounter').type.coding.code", "constraints": { "required": true, "enum": [
"405672008", "23918007"
]
} },
{"name": "ENCOUNTER_TYPE_CODE_DESCRIPTION", "type": "string", "description":"Bundle.entry.resource.where(resourceType ='Encounter').type.text"},
{"name": "ENCOUNTER_TYPE_CODE_SYSTEM", "type": "string", "description":"Bundle.entry.resource.where(resourceType ='Encounter').type.coding.system", "constraints": {"enum": [
{"name": "ENCOUNTER_TYPE_CODE_SYSTEM", "type": "string", "description":"Bundle.entry.resource.where(resourceType ='Encounter').type.coding.system", "constraints": { "required": true, "enum": [
"http://snomed.info/sct"
]
} },
Expand All @@ -83,7 +83,7 @@
{ "name": "CONSENT_LAST_UPDATED", "type": "string", "description":"Bundle.entry.resource.where(resourceType ='Consent').meta.lastUpdated", "constraints": {"required": true,
"pattern": "^([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))$"
} },
{ "name": "CONSENT_DATE_TIME", "type": "string" , "description":"Bundle.entry.resource.where(resourceType ='Consent').dateTime", "constraints": {
{ "name": "CONSENT_DATE_TIME", "type": "string" , "description":"Bundle.entry.resource.where(resourceType ='Consent').dateTime", "constraints": { "required": true,
"pattern": "^([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))$"
} },
{ "name": "CONSENT_STATUS", "description":"Bundle.entry.resource.where(resourceType ='Consent').status", "type": "string", "constraints": {"required": true, "enum":[
Expand All @@ -94,7 +94,7 @@
"inactive",
"entered-in-error"
]} },
{ "name": "CONSENT_POLICY_AUTHORITY", "description":"Bundle.entry.resource.where(resourceType ='Consent').policy.authority", "type": "string" },
{ "name": "CONSENT_POLICY_AUTHORITY", "description":"Bundle.entry.resource.where(resourceType ='Consent').policy.authority", "type": "string", "constraints": {"required": true} },
{ "name": "CONSENT_PROVISION_TYPE", "type": "string", "description":"Bundle.entry.resource.where(resourceType ='Consent').provision.type", "constraints": { "enum": ["deny","permit"]} },
{ "name": "SCREENING_LAST_UPDATED", "type": "string" , "description":"Bundle.entry.resource.where(resourceType ='Observation').meta.lastUpdated", "constraints": { "required": true,
"pattern": "^([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))$"
Expand Down
5 changes: 5 additions & 0 deletions support/specifications/flat-file/documentation.auto.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
- `description` Bundle.entry.resource.where(resourceType ='Encounter').type.coding.code
- `type` string
- `constraints`:
- `required` True
- `enum` ['405672008', '23918007']
### `ENCOUNTER_TYPE_CODE_DESCRIPTION`
- `description` Bundle.entry.resource.where(resourceType ='Encounter').type.text
Expand All @@ -108,6 +109,7 @@
- `description` Bundle.entry.resource.where(resourceType ='Encounter').type.coding.system
- `type` string
- `constraints`:
- `required` True
- `enum` ['http://snomed.info/sct']
### `ENCOUNTER_LAST_UPDATED`
- `description` Bundle.entry.resource.where(resourceType ='Encounter').meta.lastUpdated
Expand All @@ -125,6 +127,7 @@
- `description` Bundle.entry.resource.where(resourceType ='Consent').dateTime
- `type` string
- `constraints`:
- `required` True
- `pattern` `^([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))$`
### `CONSENT_STATUS`
- `description` Bundle.entry.resource.where(resourceType ='Consent').status
Expand All @@ -135,6 +138,8 @@
### `CONSENT_POLICY_AUTHORITY`
- `description` Bundle.entry.resource.where(resourceType ='Consent').policy.authority
- `type` string
- `constraints`:
- `required` True
### `CONSENT_PROVISION_TYPE`
- `description` Bundle.entry.resource.where(resourceType ='Consent').provision.type
- `type` string
Expand Down

0 comments on commit e167d26

Please sign in to comment.