1.7.1 - release

SHINNYHRSN - Local Development build (v1.7.1) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions

## Resource Profile: SHINNY SDOH Bundle Profile

Official URL: http://test.shinny.org/us/ny/hrsn/StructureDefinition/SHINNYBundleProfile | Version: 1.7.1
Draft as of 2025-12-09 | Computable Name: SHINNYBundleProfile

- SHINNY HRSN: Needed for submission of all FHIR profiles.
- Profiled off of the base FHIR: A container for a collection of resources.

Usages:

- Examples for this Profile: Bundle/AHCHRSNQuestionnaireResponseExample, Bundle/AHCHRSNScreeningResponseExample, Bundle/NYScreeningResponseExample, Bundle/NYScreeningResponseExampleDeclined9to12... Show 8 more, Bundle/NYScreeningResponseExampleUnknown1to8, Bundle/ObservationAssessmentFoodInsecurityExample, Bundle/PatientNegativeConsent, Bundle/ServiceRequestExample, Bundle/TaskCompletedExample, Bundle/TaskExample, Bundle/TaskExampleMultipleEncounters and Bundle/TaskOutputProcedureExample

You can also check for usages in the FHIR IG Statistics

### Formal Views of Profile Content

Description of Profiles, Differentials, Snapshots and how the different presentations work.

- Key Elements Table
- Differential Table
- Snapshot Table
- Statistics/References
- All

Name | Flags | Card. | Type | Description & Constraints Filter: Bindings Constraints Obligations
--- | --- | --- | --- | ---
Bundle | C | 0..* | Bundle | Contains a collection of resources Constraints: bdl-1, bdl-2, bdl-3, bdl-4, bdl-7, bdl-9, bdl-10, bdl-11, bdl-12, SHINNY-Patient-MRN, SHINNY-Patient-MA, SHINNY-Patient-SSN, SHINNY-Patient-Address, SHINNY-Patient-DOB, SHINNY-Patient-Gender, SHINNY-Patient-GenderId, SHINNY-Patient-Race-Ethnicity, SHINNY-Patient-Communication, SHINNY-Patient-MiddleName, SHINNY-Patient-Pronouns, shinny-sexual-orientation, SHINNY-Bundle-Obs-hasMember-RI, SHINNY-Encounter-Class, SHINNY-Encounter-Type, Encounter-PeriodStart, Encounter-PeriodEnd, SHINNY-Obs-Encounter, SHINNY-Obs-Patient, SHINNY-Obs-Code, SHINNY-Obs-Category, SHINNY-Screening-Patient, ObservationScreenRes-Langauge, ObservationScreenRes-CategoryDisplay, ObservationScreenRes-CodeCode, ObservationScreenRes-CodeDisplay, ObservationScreenRes-Interpretation, SHINNY-Screening-Consent, Assessment-ConditionID, Assessment-ConditionSNOMED, Assessment-ConditionICD10, Assessment-ApprovalQuestionnaire, Assessment-OutreachQuestionnaire, Assessment-AdminQuestionnaire, Assessment-ServiceDupQuestionnaire, SHINNY-Assessment-Encounter, SHINNY-Assessment-Patient, ServiceRequest-Quantity, ServiceRequest-CategoryCode, ServiceRequest-OccurrencePeriod, ServiceRequest-AuthoredOn, SHINNYServiceRequestSDOHCategory, Task-StatusReason, Task-Repetitions, Task-EndPeriod, Task-StartPeriod, Referral-ApprovalQuestionnaire, Referral-HRSNOutreachQuestionnaire, Referral-SCNOutreachQuestionnaire, SHINNY-Bundle-Required-Resources, SHINNY-Bundle-Required, SHINNY-Bundle-Patient-Org-RI, SHINNY-Bundle-Encounter-RI, SHINNY-Bundle-Obs-derivedFrom-RI, SHINNY-Bundle-Obs-Patient-RI, SHINNY-Bundle-Obs-Encounter-RI, Screening-Crosswalk-44250-9, Screening-Crosswalk-44255-8, Screening-Crosswalk-68516-4, Screening-Crosswalk-68517-2, Screening-Crosswalk-68524-8, Screening-Crosswalk-69858-9, Screening-Crosswalk-69861-3, Screening-Crosswalk-71802-3, Screening-Crosswalk-76513-1, Screening-Crosswalk-88122-7, Screening-Crosswalk-88123-5, Screening-Crosswalk-89555-7, Screening-Crosswalk-93030-5, Screening-Crosswalk-93038-8, Screening-Crosswalk-93159-2, Screening-Crosswalk-95530-2, Screening-Crosswalk-95615-1, Screening-Crosswalk-95616-9, Screening-Crosswalk-95617-7, Screening-Crosswalk-95618-5, Screening-Crosswalk-96778-6, Screening-Crosswalk-96779-4, Screening-Crosswalk-96780-2, Screening-Crosswalk-96781-0, Screening-Crosswalk-96782-8, Screening-Crosswalk-96842-0, Screening-Crosswalk-97027-7, SHINNY-Consent-Category, Consent-ProvisionType, SHINNY-Bundle-screening-consent, Goal-StatusDate, Goal-AchievementStatus, Location-Address, Location-Type, Organization-Address, Organization-Type, SHINNY-Resources-Profile-Check
id | S Σ | 1..1 | id | Logical id of this artifact
meta | S Σ | 1..1 | SHINNYMeta | Metadata about the resource
implicitRules | ?!Σ | 0..1 | uri | A set of rules under which this content was created
language |  | 0..1 | code | Language of the resource content Binding: SHINNYLanguageVS (preferred)
type | Σ | 1..1 | code | document | message | transaction | transaction-response | batch | batch-response | history | searchset | collection Binding: BundleType (required): Indicates the purpose of a bundle - how it is intended to be used.
Documentation for this format

#### Terminology Bindings

Path | Conformance | ValueSet | URI
Bundle.language | preferred | SHINNYLanguageVS `http://test.shinny.org/us/ny/hrsn/ValueSet/SHINNYLanguageVS` From this IG
Bundle.type | required | BundleType `http://hl7.org/fhir/ValueSet/bundle-type|4.0.1` From the FHIR Standard

#### Constraints

Id | Grade | Path(s) | Details | Requirements
Assessment-AdminQuestionnaire | warning | Bundle | Ensure that all Assessment Questionnaire bundles have a response to the service duplication indicators. : entry.select(resource as QuestionnaireResponse).exists() implies entry.select(resource as QuestionnaireResponse).exists ( (QuestionnaireResponse|repeat('Yes'|PatientAssessmentApproval)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|EnhancedPopulationCheck)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|ServiceDuplicationCheck)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|ClinicalCriteriaCheck)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() ) |
Assessment-ApprovalQuestionnaire | warning | Bundle | Ensure that all Assessment Questionnaire bundles have a response to PatientAssessmentApproval. : entry.select(resource as QuestionnaireResponse).exists() implies entry.select(resource as QuestionnaireResponse).exists ( (QuestionnaireResponse|repeat('Yes'|PatientAssessmentApproval)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() or (QuestionnaireResponse|repeat('No'|PatientAssessmentApproval)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() ) |
Assessment-ConditionICD10 | warning | Bundle | Ensure that all final assessments have a Condition ICD-10 term. : entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-assessment') and status='final').exists() implies entry.select(resource as Condition).count() = entry.select(resource as Condition).select(code.coding) .where(system.contains('http://hl7.org/fhir/sid/icd-10-cm')) .count() and entry.select(resource as Condition).count() !=0 |
Assessment-ConditionID | warning | Bundle | Ensure that all final assessments have a Condition identifier. : entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-assessment') and status = 'final').exists() implies entry.select(resource as Observation) .where( meta.profile.contains('shinny-observation-assessment') and status = 'final' ).count() = entry.select(resource as Condition).id.count() |
Assessment-ConditionSNOMED | warning | Bundle | Ensure that all final assessments have a Condition category SNOMED term. : entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-assessment') and status='final').exists() implies entry.select(resource as Condition).count() = entry.select(resource as Condition).select(code.coding) .where(system.contains('http://snomed.info/sct')) .count() and entry.select(resource as Condition).count() !=0 |
Assessment-OutreachQuestionnaire | warning | Bundle | Ensure that all Assessment Questionnaire bundles with patient approval contain a Patient Assessment Outreach Date and a Patient Assessment Status. : entry.select(resource as QuestionnaireResponse).exists() implies entry.select(resource as QuestionnaireResponse).exists ( (QuestionnaireResponse|repeat('Yes'|PatientAssessmentApproval)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|PatientAssessmentOutreachDate)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|PatientAssessmentOutreachStatus)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() ) |
Assessment-ServiceDupQuestionnaire | warning | Bundle | Ensure that all Assessment Questionnaire bundles have a response to the service duplication indicators. : entry.select(resource as QuestionnaireResponse).exists() implies entry.select(resource as QuestionnaireResponse).exists ( (QuestionnaireResponse|repeat('Yes'|PatientAssessmentApproval)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|CurrentHousingProgramRecipientIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|CurrentNutritionalEducationProgramRecipientIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|CurrentNutritionalServicesProgramRecipientIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|CurrentFoodServiceProgramRecipientIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|CurrentSNAPProgramRecipientIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|CurrentWICProgramRecipientIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|CurrentTANFProgramRecipientIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|CurrentTransportationProgramRecipientIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|MedicationRequiringRefrigerationIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|BreastMilkRequiringRefrigerationIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|ADLs/IADLsIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|MedicalRespiteRequirementsIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|ChildcareAssistanceIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() ) |
Consent-ProvisionType | warning | Bundle | Ensure that all Consents include a value for provision type. : entry.select(resource as Consent) .all(provision.type.exists()) |
Encounter-PeriodEnd | warning | Bundle | Ensure that all finished Encounters include a value for period.end. : entry.select(resource as Encounter) .where(status.contains('finished')) .all(period.end.exists()) |
Encounter-PeriodStart | warning | Bundle | Ensure that all Encounters include a value for period.start. : entry.select(resource as Encounter) .all(period.start.exists()) |
Goal-AchievementStatus | warning | Bundle | Ensure that all Goals include a value for achivementStatus. : entry.select(resource as Goal).exists() implies entry.select(resource as Goal).all(achievementStatus.exists()) |
Goal-StatusDate | warning | Bundle | Ensure that all Goals include a value for statusDate. : entry.select(resource as Goal).exists() implies entry.select(resource as Goal).all(statusDate.exists()) |
Location-Address | warning | Bundle | Ensure that all Location resources include all address elements. : entry.select(resource as Location). address.where(line.count() > 0 and city.trim().length() > 0 and state.trim().length() > 0 and postalCode.trim().length() > 0 and district.trim().length() > 0).count() > 0 |
Location-Type | warning | Bundle | Ensure that all Location resources include a value for type. : entry.select(resource as Location).exists() implies entry.select(resource as Location).all(type.exists()) |
ObservationScreenRes-CategoryDisplay | warning | Bundle | Ensure that all Observation Screening Responses have a category display. : entry.select(resource as Observation) .where(meta.profile.contains('shinny-observation-screening-response') ) .category.coding.where( system.contains('/CodeSystem/observation-category').not() ). all(display.exists()) |
ObservationScreenRes-CodeCode | warning | Bundle | Ensure that all Observation Screening Responses have a code code. : entry.select(resource as Observation) .where(meta.profile.contains('shinny-observation-screening-response')) .code.coding .all(code.exists()) |
ObservationScreenRes-CodeDisplay | warning | Bundle | Ensure that all Observation Screening Responses have a code dispay. : entry.select(resource as Observation) .where(meta.profile.contains('shinny-observation-screening-response')) .code.coding .all(display.exists()) |
ObservationScreenRes-Interpretation | warning | Bundle | Ensure that specific Observation Screening Responses have an interpretation. : entry.select(resource as Observation) .where(meta.profile.contains('shinny-observation-screening-response')) .where(derivedFrom.exists().not()) .all(interpretation.exists()) |
ObservationScreenRes-Langauge | warning | Bundle | Ensure that all Observation Screening Responses have a language. : entry.select(resource as Observation) .where(meta.profile.contains('shinny-observation-screening-response') ) .all(language.exists()) |
Organization-Address | warning | Bundle | Ensure that all Organization resources include all address elements. : entry.select(resource as Organization). address.where(line.count() > 0 and city.trim().length() > 0 and state.trim().length() > 0 and postalCode.trim().length() > 0 and district.trim().length() > 0).count() > 0 |
Organization-Type | warning | Bundle | Ensure that all Organization resources include a value for type. : entry.select(resource as Organization).exists() implies entry.select(resource as Organization).all(type.exists()) |
Referral-ApprovalQuestionnaire | warning | Bundle | Ensure that all Referral Questionnaire bundles have a response to PatientReferralApproval. : entry.select(resource as QuestionnaireResponse).exists() implies entry.select(resource as QuestionnaireResponse).exists ( (QuestionnaireResponse|repeat('Yes'|PatientReferralApproval)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() or (QuestionnaireResponse|repeat('No'|PatientReferralApproval)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() ) |
Referral-HRSNOutreachQuestionnaire | warning | Bundle | Ensure that all approved Referral Questionnaire bundles have a response to HRSNServiceProviderReferralOutreachDate. : entry.select(resource as QuestionnaireResponse).exists() implies entry.select(resource as QuestionnaireResponse).exists ( (QuestionnaireResponse|repeat('Yes'|PatientReferralApproval)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|HRSNServiceProviderReferralOutreachDate)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() ) |
Referral-SCNOutreachQuestionnaire | warning | Bundle | Ensure that all approved Referral Questionnaire bundles have a response to SCNReferralOutreachDate. : entry.select(resource as QuestionnaireResponse).exists() implies entry.select(resource as QuestionnaireResponse).exists ( (QuestionnaireResponse|repeat('Yes'|PatientReferralApproval)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|SCNReferralOutreachDate)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() ) |
SHINNY-Assessment-Encounter | error | Bundle | Assessment-Encounter should exist : entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-assessment')).exists() implies entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-assessment')) .where(encounter.reference.exists().not()) .count()=0 |
SHINNY-Assessment-Patient | error | Bundle | Assessment-Subject should exist : entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-assessment')).exists() implies entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-assessment')) .where(subject.reference.exists().not()) .count()=0 |
SHINNY-Bundle-Encounter-RI | error | Bundle | Checks for RI between all resources & Encounter : entry.select(resource) .where(encounter.exists()) .encounter.select(reference.split('/')[1]).distinct() .intersect( entry.select(resource as Encounter).id ) .count() = entry.select(resource) .where(encounter.exists()) .encounter.select(reference.split('/')[1]).distinct() .count() |
SHINNY-Bundle-Obs-Encounter-RI | error | Bundle | Checks for RI between Screening Obs & Encounter : entry.select(resource as Observation) .exists(encounter.reference.exists() and meta.profile.contains('shinny-observation-screening-response')) implies entry.select(resource as Observation) .where(encounter.reference.exists() and meta.profile.contains('shinny-observation-screening-response')) .select(encounter.reference.split('/')[1]).distinct() = entry.select(resource as Encounter).id |
SHINNY-Bundle-Obs-Patient-RI | error | Bundle | Checks for RI between Obs & Patient : entry.select(resource as Observation) .where(encounter.reference.exists() and meta.profile.contains('shinny-observation')).count()>1 implies entry.select(resource as Observation) .where(encounter.reference.exists() and meta.profile.contains('shinny-observation')) .encounter.reference.distinct() .contains(entry.select(resource as Encounter).id) |
SHINNY-Bundle-Obs-derivedFrom-RI | error | Bundle | Checks for RI between Observation & child Observation : entry.select(resource as Observation) .where(derivedFrom.exists() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or meta.where(profile.lower().contains('sdohcc-observation')))) .derivedFrom.select(reference.split('/')[1]) .intersect( entry.select(resource as Observation).where(derivedFrom.empty() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or meta.where(profile.lower().contains('sdohcc-observation')))).id) .count() = entry.select(resource as Observation) .where(derivedFrom.exists() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or $this.meta.where(profile.lower().contains('sdohcc-observationscreeningresponse')))) .derivedFrom.reference .count() |
SHINNY-Bundle-Obs-hasMember-RI | error | Bundle | Checks for RI between Observation & child Observations : entry.select(resource as Observation) .where(hasMember.exists() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or meta.where(profile.lower().contains('sdohcc-observation')))) .hasMember.select(reference.split('/')[1]) .intersect( entry.select(resource as Observation).where(hasMember.empty() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or meta.where(profile.lower().contains('sdohcc-observation')))).id) .count() = entry.select(resource as Observation) .where(hasMember.exists() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or $this.meta.where(profile.lower().contains('sdohcc-observationscreeningresponse')))) .hasMember.reference .count() and (entry.select(resource as Observation) .where(hasMember.exists() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or meta.where(profile.lower().contains('sdohcc-observation')))).exists() implies entry.select(resource as Observation) .where(hasMember.exists() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or meta.where(profile.lower().contains('sdohcc-observation')))) .hasMember.select(reference.split('/')[1]) .intersect( entry.select(resource as Observation).where(hasMember.empty() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or meta.where(profile.lower().contains('sdohcc-observationscreeningresponse')))).id) .count() = entry.select(resource as Observation).where(hasMember.empty() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or meta.where(profile.lower().contains('sdohcc-observationscreeningresponse')))).count()) |
SHINNY-Bundle-Patient-Org-RI | error | Bundle | Checks for RI between Patient & Assigning Org : entry.select(resource as Organization).id contains entry.select(resource as Patient) .identifier.where(type.coding.code='MR') .assigner.reference.split('/')[1] |
SHINNY-Bundle-Required | error | Bundle | Every submitted resource should be part of a bundle. : select($this as Bundle).exists() |
SHINNY-Bundle-Required-Resources | error | Bundle | Every bundle should always have one and only one 'Patient' & 'Encounter' and atleast one Org : entry.select(resource as Patient).count() = 1 and entry.select(resource as Encounter).count() > 0 and entry.select(resource as Organization).count() > 0 |
SHINNY-Bundle-screening-consent | error | Bundle | Ensures all bundles with a screening included also includes the consent profile. : ( (select($this as Bundle).where(meta.profile.upper() != 'http://test.shinny.org/us/ny/hrsn/StructureDefinition/SHINNYBundleProfile'.upper()).count() > 0) and ( entry.select(resource as Observation) .where(meta.profile.contains('shinny-observation-screening')).count() > 0 ) ) implies entry.select(resource as Consent).exists() |
SHINNY-Consent-Category | warning | Bundle | Patient Consent category code is 59284-0 : entry.select(resource as Consent).exists() implies entry.select(resource as Consent).category.coding.where(code='59284-0').exists() |
SHINNY-Encounter-Class | warning | Bundle | Ensure that the Encounter resource has a class code; Ensure that the Encounter resource has a class code system : entry.select(resource as Encounter).class .all(code.exists() and system.exists()) |
SHINNY-Encounter-Type | warning | Bundle | Ensure that the Encounter resource has a status code : entry.select(resource as Encounter).type.coding .all(code.exists() and system.exists()) |
SHINNY-Obs-Category | error | Bundle | Ensure that all Observation categories have an SDOH code : entry.select(resource as Observation) .where(meta.profile.contains('shinny-observation-screening-response')) .all(category.coding.system .exists($this.contains('SDOHCC-CodeSystemTemporaryCodes'))) |
SHINNY-Obs-Code | warning | Bundle | Ensure that all Observation resources have screening code; Ensure that all Observation resources have screening code system : entry.select(resource as Observation).where( code.coding.system.exists().not() or code.coding.code.not().exists().not()) .count() = 0 |
SHINNY-Obs-Encounter | warning | Bundle | SDOH Observations should have an Encounter : entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-screening-response')) .all(encounter.reference.exists()) |
SHINNY-Obs-Patient | warning | Bundle | SDOH Observations should have a Patient : entry.select(resource as Observation).where(meta.profile.contains('shinny-observation')) .all(subject.reference.exists()) |
SHINNY-Patient-Address | warning | Bundle | All elements of address should be present : entry.select(resource as Patient). address.where(line.count() > 0 and city.trim().length() > 0 and state.trim().length() > 0 and postalCode.trim().length() > 0 and district.trim().length() > 0).count() > 0 |
SHINNY-Patient-Communication | warning | Bundle | Communication should exist : entry.select(resource as Patient).communication.exists() |
SHINNY-Patient-DOB | error | Bundle | birthDate should be a valid date : entry.select(resource as Patient).birthDate.trim().length() = 10 and entry.select(resource as Patient).birthDate.trim().split('-').count() = 3 |
SHINNY-Patient-Gender | error | Bundle | Gender should be present : entry.select(resource as Patient).where(gender.exists() and gender.trim().length()).count() > 0 |
SHINNY-Patient-GenderId | warning | Bundle | Gender Id should be present : entry.select(resource as Patient).extension.where(url='http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex').count() > 0 |
SHINNY-Patient-MA | error | Bundle | Every bundle should always have only 1 Medicaid CIN (i.e MA) Object within patient.identifier AND the CIN is always in the format of 2 letters, 5 numbers, and 1 letter, e.g., 'AB12345C' : entry.select(resource as Patient).identifier.where(type.coding.code='MA' and value.trim().length() > 0).count() = 1 and entry.select(resource as Patient).identifier.where( value.trim().length() = 8 and type.coding.code='MA' and value.substring(0,1).matches('^[a-zA-Z]+$') and value.substring(1,1).matches('^[a-zA-Z]+$') and value.substring(2,1).matches('^[0-9]*$') and value.substring(3,1).matches('^[0-9]*$') and value.substring(4,1).matches('^[0-9]*$') and value.substring(5,1).matches('^[0-9]*$') and value.substring(6,1).matches('^[0-9]*$') and value.substring(7,1).matches('^[a-zA-Z]+$') ).exists() |
SHINNY-Patient-MRN | error | Bundle | Every bundle should always have only 1 MR (i.e MRN) Object within patient.identifier, system.contains('facility') and value (MRN) is provided : entry.select(resource as Patient).identifier.where(type.coding.code='MR' and value.trim().length() > 0).count() = 1 |
SHINNY-Patient-MiddleName | warning | Bundle | MiddleName should be present : entry.select(resource as Patient).name .extension.where(url.contains('middle-name')) .value.trim().length()>0 |
SHINNY-Patient-Pronouns | warning | Bundle | Pronouns should be present : entry.select(resource as Patient).extension.where(url='http://test.shinny.org/us/ny/hrsn/ValueSet/SHINNYPersonalPronounsVS').exists() implies entry.select(resource as Patient).extension.where(url='http://test.shinny.org/us/ny/hrsn/ValueSet/SHINNYPersonalPronounsVS' and value.select($this as CodeableConcept).coding.code.exists()).exists() |
SHINNY-Patient-Race-Ethnicity | warning | Bundle | Race & Ethnicity should be present : entry.select(resource as Patient).extension.where(url='http://hl7.org/fhir/us/core/StructureDefinition/us-core-race').extension.where(url='ombCategory' and value.system = 'http://terminology.hl7.org/CodeSystem/v3-NullFlavor').exists().not() implies entry.select(resource as Patient). extension.where(url='http://hl7.org/fhir/us/core/StructureDefinition/us-core-race').exists() and entry.select(resource as Patient). extension.where(url='http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity').exists() |
SHINNY-Patient-SSN | warning | Bundle | Every bundle should always have only 1 SSN (i.e SS) Object within patient.identifier : entry.select(resource as Patient).identifier.where(type.coding.code='SS' and value.trim().length() > 0).count() <= 1 |
SHINNY-Resources-Profile-Check | error | Bundle | SHINNY-Resources-Profile-Check : select($this as Bundle).where(meta.profile.upper() != 'http://test.shinny.org/us/ny/hrsn/StructureDefinition/SHINNYBundleProfile'.upper()).count() = 0 and ( entry.select(resource as Patient).exists() implies entry.select(resource as Patient).where(meta.profile.upper() != 'http://test.shinny.org/us/ny/hrsn/StructureDefinition/shinny-patient'.upper()).count() = 0 ) and ( entry.select(resource as Encounter).exists() implies entry.select(resource as Encounter).where(meta.profile.upper() != 'http://test.shinny.org/us/ny/hrsn/StructureDefinition/shinny-encounter'.upper()).count() = 0 ) and ( entry.select(resource as Observation).exists() implies entry.select(resource as Observation).meta.where(profile.upper().startsWith('http://test.shinny.org/us/ny/hrsn/StructureDefinition/shinny-observation'.upper()).not()).count() = 0 ) and ( entry.select(resource as ServiceRequest).exists() implies entry.select(resource as ServiceRequest).where(meta.profile.upper() != 'http://test.shinny.org/us/ny/hrsn/StructureDefinition/SHINNYSDOHServiceRequest'.upper()).count() = 0 ) and ( entry.select(resource as Task).exists() implies entry.select(resource as Task).where(meta.profile.upper() != 'http://test.shinny.org/us/ny/hrsn/StructureDefinition/SHINNYSDOHTaskForReferralManagement'.upper()).count() = 0 ) and ( entry.select(resource as Consent).exists() implies entry.select(resource as Consent).where(meta.profile.upper() != 'http://test.shinny.org/us/ny/hrsn/StructureDefinition/shinny-Consent'.upper()).count() = 0 ) .allTrue() |
SHINNY-Screening-Consent | error | Bundle | All screening bundles must include a consent : entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-screening-response')).exists() implies entry.select(resource as Consent).exists() |
SHINNY-Screening-Patient | error | Bundle | SDOH Screening Observations should have an Patient : entry.select(resource as Observation) .where(meta.profile.contains('shinny-observation-screening') and hasMember.exists()) .all(subject.reference.exists()) |
SHINNYServiceRequestSDOHCategory | error | Bundle | Ensure that all Service Request categories have an SDOH code : entry.select(resource as ServiceRequest) .where(meta.profile.contains('SHINNYSDOHServiceRequest')) .all(category.coding.system .exists($this.contains('SDOHCC-CodeSystemTemporaryCodes'))) |
Screening-Crosswalk-44255-8 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 44255-8 then answer codes must be one of the following: LA6568-5 LA6569-3 LA6570-1 LA6571-9 : entry.select(resource as Observation).where(code.coding.code contains '44255-8').exists() implies entry.select(resource as Observation).where(code.coding.code contains '44255-8').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '44255-8') .value.select($this as CodeableConcept).coding .where(code='LA6568-5' or code='LA6569-3' or code='LA6570-1' or code='LA6571-9').exists() |
Screening-Crosswalk-44250-9 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 44250-9 then answer codes must be one of the following: LA6568-5 LA6569-3 LA6570-1 LA6571-9 : entry.select(resource as Observation).where(code.coding.code contains '44250-9').exists() implies entry.select(resource as Observation).where(code.coding.code contains '44250-9').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '44250-9') .value.select($this as CodeableConcept).coding .where(code='LA6568-5' or code='LA6569-3' or code='LA6570-1' or code='LA6571-9').exists() |
Screening-Crosswalk-68517-2 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 68517-2 then answer codes must be one of the following: LA6270-8 LA26460-8 LA18876-5 LA18891-4 LA18934-2 : entry.select(resource as Observation).where(code.coding.code contains '68517-2').exists() implies entry.select(resource as Observation).where(code.coding.code contains '68517-2').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '68517-2') .value.select($this as CodeableConcept).coding .where(code='LA6270-8' or code='LA26460-8' or code='LA18876-5' or code='LA18891-4' or code='LA18934-2').exists() |
Screening-Crosswalk-68516-4 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 68516-4 then answer codes must be one of the following: LA6111-4 LA13942-0 LA19282-5 LA28855-7 LA28858-1 LA28854-0 LA28853-2 LA28891-2 LA32059-0 LA32060-8 : entry.select(resource as Observation).where(code.coding.code contains '68516-4').exists() implies entry.select(resource as Observation).where(code.coding.code contains '68516-4').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '68516-4') .value.select($this as CodeableConcept).coding .where(code='LA6111-4' or code='LA13942-0' or code='LA19282-5' or code='LA28855-7' or code='LA28858-1' or code='LA28854-0' or code='LA28853-2' or code='LA28891-2' or code='LA32059-0' or code='LA32060-8').exists() |
Screening-Crosswalk-68524-8 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 68524-8 then answer codes must be one of the following: LA6270-8 LA26460-8 LA18876-5 LA18891-4 LA18934-2 : entry.select(resource as Observation).where(code.coding.code contains '68524-8').exists() implies entry.select(resource as Observation).where(code.coding.code contains '68524-8').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '68524-8') .value.select($this as CodeableConcept).coding .where(code='LA6270-8' or code='LA26460-8' or code='LA18876-5' or code='LA18891-4' or code='LA18934-2').exists() |
Screening-Crosswalk-69858-9 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 69858-9 then answer codes must be one of the following: LA33-6 LA32-8 : entry.select(resource as Observation).where(code.coding.code contains '69858-9').exists() implies entry.select(resource as Observation).where(code.coding.code contains '69858-9').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '69858-9') .value.select($this as CodeableConcept).coding .where(code='LA33-6' or code='LA32-8').exists() |
Screening-Crosswalk-69861-3 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 69861-3 then answer codes must be one of the following: LA33-6 LA32-8 : entry.select(resource as Observation).where(code.coding.code contains '69861-3').exists() implies entry.select(resource as Observation).where(code.coding.code contains '69861-3').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '69861-3') .value.select($this as CodeableConcept).coding .where(code='LA33-6' or code='LA32-8').exists() |
Screening-Crosswalk-71802-3 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 71802-3 then answer codes must be one of the following: LA31993-1, LA31994-9, LA31995-6 : entry.select(resource as Observation).where(code.coding.code contains '71802-3').exists() implies entry.select(resource as Observation).where(code.coding.code contains '71802-3').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '71802-3') .value.select($this as CodeableConcept).coding .where(code='LA31993-1' or code='LA31994-9' or code='LA31995-6').exists() |
Screening-Crosswalk-76513-1 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 76513-1 then answer codes must be one of the following: LA15832-1 LA22683-9 LA31980-8 : entry.select(resource as Observation).where(code.coding.code contains '76513-1').exists() implies entry.select(resource as Observation).where(code.coding.code contains '76513-1').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '76513-1') .value.select($this as CodeableConcept).coding .where(code='LA15832-1' or code='LA22683-9' or code='LA31980-8').exists() |
Screening-Crosswalk-88123-5 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 88123-5 then answer codes must be one of the following: LA28397-0 LA6729-3 LA28398-8 : entry.select(resource as Observation).where(code.coding.code contains '88123-5').exists() implies entry.select(resource as Observation).where(code.coding.code contains '88123-5').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '88123-5') .value.select($this as CodeableConcept).coding .where(code='LA28397-0' or code='LA6729-3' or code='LA28398-8').exists() |
Screening-Crosswalk-88122-7 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 88122-7 then answer codes must be one of the following: LA28397-0 LA6729-3 LA28398-8 : entry.select(resource as Observation).where(code.coding.code contains '88122-7').exists() implies entry.select(resource as Observation).where(code.coding.code contains '88122-7').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '88122-7') .value.select($this as CodeableConcept).coding .where(code='LA28397-0' or code='LA6729-3' or code='LA28398-8').exists() |
Screening-Crosswalk-89555-7 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 89555-7 then answer codes must be one of the following: LA6111-4 LA6112-2 LA6113-0 LA6114-8 LA6115-5 LA10137-0 LA10138-8 LA10139-6 : entry.select(resource as Observation).where(code.coding.code contains '89555-7').exists() implies entry.select(resource as Observation).where(code.coding.code contains '89555-7').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '89555-7') .value.select($this as CodeableConcept).coding .where(code='LA6111-4' or code='LA6112-2' or code='LA6113-0' or code='LA6114-8' or code='LA6115-5' or code='LA10137-0' or code='LA10138-8' or code='LA10139-6').exists() |
Screening-Crosswalk-93030-5 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 93030-5 then answer codes must be one of the following: LA33-6 LA32-8 : entry.select(resource as Observation).where(code.coding.code contains '93030-5').exists() implies entry.select(resource as Observation).where(code.coding.code contains '93030-5').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '93030-5') .value.select($this as CodeableConcept).coding .where(code='LA33-6' or code='LA32-8').exists() |
Screening-Crosswalk-93038-8 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 93038-8 then answer codes must be one of the following: LA6568-5 LA13863-8 LA13909-9 LA13902-4 LA13914-9 LA30122-8 : entry.select(resource as Observation).where(code.coding.code contains '93038-8').exists() implies entry.select(resource as Observation).where(code.coding.code contains '93038-8').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '93038-8') .value.select($this as CodeableConcept).coding .where(code='LA6568-5' or code='LA13863-8' or code='LA13909-9' or code='LA13902-4' or code='LA13914-9' or code='LA30122-8').exists() |
Screening-Crosswalk-93159-2 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 93159-2 then answer codes must be one of the following: LA6270-8 LA10066-1 LA10082-8 LA10044-8 LA9933-8 : entry.select(resource as Observation).where(code.coding.code contains '93159-2').exists() implies entry.select(resource as Observation).where(code.coding.code contains '93159-2').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '93159-2') .value.select($this as CodeableConcept).coding .where(code='LA6270-8' or code='LA10066-1' or code='LA10082-8' or code='LA10044-8' or code='LA9933-8').exists() |
Screening-Crosswalk-95530-2 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 95530-2 then answer codes must be one of the following: LA6270-8 LA26460-8 LA18876-5 LA18891-4 LA18934-2 : entry.select(resource as Observation).where(code.coding.code contains '95530-2').exists() implies entry.select(resource as Observation).where(code.coding.code contains '95530-2').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '95530-2') .value.select($this as CodeableConcept).coding .where(code='LA6270-8' or code='LA26460-8' or code='LA18876-5' or code='LA18891-4' or code='LA18934-2').exists() |
Screening-Crosswalk-95615-1 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 95615-1 then answer codes must be one of the following: LA6270-8 LA10066-1 LA10082-8 LA16644-9 LA6482-9 : entry.select(resource as Observation).where(code.coding.code contains '95615-1').exists() implies entry.select(resource as Observation).where(code.coding.code contains '95615-1').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '95615-1') .value.select($this as CodeableConcept).coding .where(code='LA6270-8' or code='LA10066-1' or code='LA10082-8' or code='LA16644-9' or code='LA6482-9').exists() |
Screening-Crosswalk-95618-5 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 95618-5 then answer codes must be one of the following: LA6270-8 LA10066-1 LA10082-8 LA16644-9 LA6482-9 : entry.select(resource as Observation).where(code.coding.code contains '95618-5').exists() implies entry.select(resource as Observation).where(code.coding.code contains '95618-5').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '95618-5') .value.select($this as CodeableConcept).coding .where(code='LA6270-8' or code='LA10066-1' or code='LA10082-8' or code='LA16644-9' or code='LA6482-9').exists() |
Screening-Crosswalk-95617-7 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 95617-7 then answer codes must be one of the following: LA6270-8 LA10066-1 LA10082-8 LA16644-9 LA6482-9 : entry.select(resource as Observation).where(code.coding.code contains '95617-7').exists() implies entry.select(resource as Observation).where(code.coding.code contains '95617-7').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '95617-7') .value.select($this as CodeableConcept).coding .where(code='LA6270-8' or code='LA10066-1' or code='LA10082-8' or code='LA16644-9' or code='LA6482-9').exists() |
Screening-Crosswalk-95616-9 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 95616-9 then answer codes must be one of the following: LA6270-8 LA10066-1 LA10082-8 LA16644-9 LA6482-9 : entry.select(resource as Observation).where(code.coding.code contains '95616-9').exists() implies entry.select(resource as Observation).where(code.coding.code contains '95616-9').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '95616-9') .value.select($this as CodeableConcept).coding .where(code='LA6270-8' or code='LA10066-1' or code='LA10082-8' or code='LA16644-9' or code='LA6482-9').exists() |
Screening-Crosswalk-96779-4 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 96779-4 then answer codes must be one of the following: LA33-6 LA32-8 LA32002-0 : entry.select(resource as Observation).where(code.coding.code contains '96779-4').exists() implies entry.select(resource as Observation).where(code.coding.code contains '96779-4').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '96779-4') .value.select($this as CodeableConcept).coding .where(code='LA33-6' or code='LA32-8' or code='LA32002-0').exists() |
Screening-Crosswalk-96778-6 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 96778-6 then answer codes must be one of the following: LA31996-4 LA28580-1 LA31997-2 LA31998-0 LA31999-8 LA32000-4 LA32001-2 LA9-3 : entry.select(resource as Observation).where(code.coding.code contains '96778-6').exists() implies entry.select(resource as Observation).where(code.coding.code contains '96778-6').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '96778-6') .value.select($this as CodeableConcept).coding .where(code='LA31996-4' or code='LA28580-1' or code='LA31997-2' or code='LA31998-0' or code='LA31999-8' or code='LA32000-4' or code='LA32001-2' or code='LA9-3').exists() |
Screening-Crosswalk-96781-0 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 96781-0 then answer codes must be one of the following: LA31976-6 LA31977-4 LA31978-2 LA31979-0 : entry.select(resource as Observation).where(code.coding.code contains '96781-0').exists() implies entry.select(resource as Observation).where(code.coding.code contains '96781-0').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '96781-0') .value.select($this as CodeableConcept).coding .where(code='LA31976-6' or code='LA31977-4' or code='LA31978-2' or code='LA31978-2').exists() |
Screening-Crosswalk-96780-2 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 96780-2 then answer codes must be one of the following: LA31981-6 LA31982-4 LA31983-2 : entry.select(resource as Observation).where(code.coding.code contains '96780-2').exists() implies entry.select(resource as Observation).where(code.coding.code contains '96780-2').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '96780-2') .value.select($this as CodeableConcept).coding .where(code='LA31981-6' or code='LA31982-4' or code='LA31983-2').exists() |
Screening-Crosswalk-96782-8 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 96782-8 then answer codes must be one of the following: LA33-6 LA32-8 : entry.select(resource as Observation).where(code.coding.code contains '96782-8').exists() implies entry.select(resource as Observation).where(code.coding.code contains '96782-8').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '96782-8') .value.select($this as CodeableConcept).coding .where(code='LA33-6' or code='LA32-8').exists() |
Screening-Crosswalk-96842-0 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 96842-0 then answer codes must be one of the following: LA6270-8 LA26460-8 LA18876-5 LA18891-4 LA18934-2 : entry.select(resource as Observation).where(code.coding.code contains '96842-0').exists() implies entry.select(resource as Observation).where(code.coding.code contains '96842-0').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '96842-0') .value.select($this as CodeableConcept).coding .where(code='LA6270-8' or code='LA26460-8' or code='LA18876-5' or code='LA18891-4' or code='LA18934-2').exists() |
Screening-Crosswalk-97027-7 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 97027-7 then answer codes must be one of the following: LA33-6 LA32-8 : entry.select(resource as Observation).where(code.coding.code contains '97027-7').exists() implies entry.select(resource as Observation).where(code.coding.code contains '97027-7').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '97027-7') .value.select($this as CodeableConcept).coding .where(code='LA33-6' or code='LA32-8').exists() |
ServiceRequest-AuthoredOn | warning | Bundle | Ensure that all Service Requests have a authored on date. : entry.select(resource as ServiceRequest).exists() implies entry.select(resource as ServiceRequest).all(authoredOn.exists()) |
ServiceRequest-CategoryCode | warning | Bundle | Ensure that all Service Requests have a category code. : entry.select(resource as ServiceRequest).exists() implies entry.select(resource as ServiceRequest).( all(category.exists()) and category.all(coding.exists()) and category.coding.all(code.exists()) ) |
ServiceRequest-OccurrencePeriod | warning | Bundle | Ensure that all Service Requests have an occurrence period start and end, or occurrence datetime. : entry.select(resource as ServiceRequest).exists() implies entry.select(resource as ServiceRequest).count() = ( entry.select(resource as ServiceRequest).where(occurrence is Period).select(occurrence) .where(start and end).count() + entry.select(resource as ServiceRequest).where(occurrence is dateTime).count() ) |
ServiceRequest-Quantity | warning | Bundle | Ensure that all Service Requests have a quantity. : entry.select(resource as ServiceRequest).exists() implies entry.select(resource as ServiceRequest) .all(quantity.value.exists()) |
Task-EndPeriod | warning | Bundle | Ensure that all completed Tasks have an end execution period. : entry.select(resource as Task).where(status = 'completed').exists() implies entry.select(resource as Task).where(status = 'completed').all(executionPeriod.end.exists()) |
Task-Repetitions | warning | Bundle | Ensure that all Tasks have a value for repetitions. : entry.select(resource as Task).exists() implies entry.select(resource as Task).all(restriction.repetitions.exists()) |
Task-StartPeriod | warning | Bundle | Ensure that all Tasks have a starting execution period. : entry.select(resource as Task).exists() implies entry.select(resource as Task).all(executionPeriod.start.exists()) |
Task-StatusReason | error | Bundle | Ensure that all tasks exists, have a statusReason If the Task.status is rejected, cancelled, completed, or failed. : entry.select(resource as Task).where(status = 'rejected' or status = 'cancelled' or status = 'completed' or status = 'failed').exists() implies entry.select(resource as Task).where(status = 'rejected' or status = 'cancelled' or status = 'completed' or status = 'failed') .all(statusReason.text.exists()) |
bdl-1 | error | Bundle | total only when a search or history : total.empty() or (type = 'searchset') or (type = 'history') |
bdl-2 | error | Bundle | entry.search only when a search : entry.search.empty() or (type = 'searchset') |
bdl-3 | error | Bundle | entry.request mandatory for batch/transaction/history, otherwise prohibited : entry.all(request.exists() = (%resource.type = 'batch' or %resource.type = 'transaction' or %resource.type = 'history')) |
bdl-4 | error | Bundle | entry.response mandatory for batch-response/transaction-response/history, otherwise prohibited : entry.all(response.exists() = (%resource.type = 'batch-response' or %resource.type = 'transaction-response' or %resource.type = 'history')) |
bdl-7 | error | Bundle | FullUrl must be unique in a bundle, or else entries with the same fullUrl must have different meta.versionId (except in history bundles) : (type = 'history') or entry.where(fullUrl.exists()).select(fullUrl&resource.meta.versionId).isDistinct() |
bdl-9 | error | Bundle | A document must have an identifier with a system and a value : type = 'document' implies (identifier.system.exists() and identifier.value.exists()) |
bdl-10 | error | Bundle | A document must have a date : type = 'document' implies (timestamp.hasValue()) |
bdl-11 | error | Bundle | A document must have a Composition as the first resource : type = 'document' implies entry.first().resource.is(Composition) |
bdl-12 | error | Bundle | A message must have a MessageHeader as the first resource : type = 'message' implies entry.first().resource.is(MessageHeader) |
ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children : hasValue() or (children().count() > id.count()) |
shinny-sexual-orientation | warning | Bundle | If there is no component or hasMember element then either a value[x] or a data absent reason must be present : entry.select(resource as Observation).where(meta.profile.contains('shin-ny-observation-sexual-orientation')).exists() implies entry.select(resource as Observation).where(meta.profile.contains('shin-ny-observation-sexual-orientation')) .where(value.exists() or dataAbsentReason.exists()) .count()=1 |

This structure is derived from Bundle

Name | Flags | Card. | Type | Description & Constraints Filter: Bindings Constraints Obligations
--- | --- | --- | --- | ---
Bundle | C | 0..* | Bundle | Contains a collection of resources Constraints: SHINNY-Patient-MRN, SHINNY-Patient-MA, SHINNY-Patient-SSN, SHINNY-Patient-Address, SHINNY-Patient-DOB, SHINNY-Patient-Gender, SHINNY-Patient-GenderId, SHINNY-Patient-Race-Ethnicity, SHINNY-Patient-Communication, SHINNY-Patient-MiddleName, SHINNY-Patient-Pronouns, shinny-sexual-orientation, SHINNY-Bundle-Obs-hasMember-RI, SHINNY-Encounter-Class, SHINNY-Encounter-Type, Encounter-PeriodStart, Encounter-PeriodEnd, SHINNY-Obs-Encounter, SHINNY-Obs-Patient, SHINNY-Obs-Code, SHINNY-Obs-Category, SHINNY-Screening-Patient, ObservationScreenRes-Langauge, ObservationScreenRes-CategoryDisplay, ObservationScreenRes-CodeCode, ObservationScreenRes-CodeDisplay, ObservationScreenRes-Interpretation, SHINNY-Screening-Consent, Assessment-ConditionID, Assessment-ConditionSNOMED, Assessment-ConditionICD10, Assessment-ApprovalQuestionnaire, Assessment-OutreachQuestionnaire, Assessment-AdminQuestionnaire, Assessment-ServiceDupQuestionnaire, SHINNY-Assessment-Encounter, SHINNY-Assessment-Patient, ServiceRequest-Quantity, ServiceRequest-CategoryCode, ServiceRequest-OccurrencePeriod, ServiceRequest-AuthoredOn, SHINNYServiceRequestSDOHCategory, Task-StatusReason, Task-Repetitions, Task-EndPeriod, Task-StartPeriod, Referral-ApprovalQuestionnaire, Referral-HRSNOutreachQuestionnaire, Referral-SCNOutreachQuestionnaire, SHINNY-Bundle-Required-Resources, SHINNY-Bundle-Required, SHINNY-Bundle-Patient-Org-RI, SHINNY-Bundle-Encounter-RI, SHINNY-Bundle-Obs-derivedFrom-RI, SHINNY-Bundle-Obs-Patient-RI, SHINNY-Bundle-Obs-Encounter-RI, Screening-Crosswalk-44250-9, Screening-Crosswalk-44255-8, Screening-Crosswalk-68516-4, Screening-Crosswalk-68517-2, Screening-Crosswalk-68524-8, Screening-Crosswalk-69858-9, Screening-Crosswalk-69861-3, Screening-Crosswalk-71802-3, Screening-Crosswalk-76513-1, Screening-Crosswalk-88122-7, Screening-Crosswalk-88123-5, Screening-Crosswalk-89555-7, Screening-Crosswalk-93030-5, Screening-Crosswalk-93038-8, Screening-Crosswalk-93159-2, Screening-Crosswalk-95530-2, Screening-Crosswalk-95615-1, Screening-Crosswalk-95616-9, Screening-Crosswalk-95617-7, Screening-Crosswalk-95618-5, Screening-Crosswalk-96778-6, Screening-Crosswalk-96779-4, Screening-Crosswalk-96780-2, Screening-Crosswalk-96781-0, Screening-Crosswalk-96782-8, Screening-Crosswalk-96842-0, Screening-Crosswalk-97027-7, SHINNY-Consent-Category, Consent-ProvisionType, SHINNY-Bundle-screening-consent, Goal-StatusDate, Goal-AchievementStatus, Location-Address, Location-Type, Organization-Address, Organization-Type, SHINNY-Resources-Profile-Check
id | S | 1..1 | id | Logical id of this artifact
meta | S | 1..1 | SHINNYMeta | Metadata about the resource
language |  | 0..1 | code | Language of the resource content Binding: SHINNYLanguageVS (preferred)
Documentation for this format

#### Terminology Bindings (Differential)

Path | Conformance | ValueSet | URI
Bundle.language | preferred | SHINNYLanguageVS `http://test.shinny.org/us/ny/hrsn/ValueSet/SHINNYLanguageVS` From this IG

#### Constraints

Id | Grade | Path(s) | Details | Requirements
Assessment-AdminQuestionnaire | warning | Bundle | Ensure that all Assessment Questionnaire bundles have a response to the service duplication indicators. : entry.select(resource as QuestionnaireResponse).exists() implies entry.select(resource as QuestionnaireResponse).exists ( (QuestionnaireResponse|repeat('Yes'|PatientAssessmentApproval)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|EnhancedPopulationCheck)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|ServiceDuplicationCheck)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|ClinicalCriteriaCheck)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() ) |
Assessment-ApprovalQuestionnaire | warning | Bundle | Ensure that all Assessment Questionnaire bundles have a response to PatientAssessmentApproval. : entry.select(resource as QuestionnaireResponse).exists() implies entry.select(resource as QuestionnaireResponse).exists ( (QuestionnaireResponse|repeat('Yes'|PatientAssessmentApproval)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() or (QuestionnaireResponse|repeat('No'|PatientAssessmentApproval)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() ) |
Assessment-ConditionICD10 | warning | Bundle | Ensure that all final assessments have a Condition ICD-10 term. : entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-assessment') and status='final').exists() implies entry.select(resource as Condition).count() = entry.select(resource as Condition).select(code.coding) .where(system.contains('http://hl7.org/fhir/sid/icd-10-cm')) .count() and entry.select(resource as Condition).count() !=0 |
Assessment-ConditionID | warning | Bundle | Ensure that all final assessments have a Condition identifier. : entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-assessment') and status = 'final').exists() implies entry.select(resource as Observation) .where( meta.profile.contains('shinny-observation-assessment') and status = 'final' ).count() = entry.select(resource as Condition).id.count() |
Assessment-ConditionSNOMED | warning | Bundle | Ensure that all final assessments have a Condition category SNOMED term. : entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-assessment') and status='final').exists() implies entry.select(resource as Condition).count() = entry.select(resource as Condition).select(code.coding) .where(system.contains('http://snomed.info/sct')) .count() and entry.select(resource as Condition).count() !=0 |
Assessment-OutreachQuestionnaire | warning | Bundle | Ensure that all Assessment Questionnaire bundles with patient approval contain a Patient Assessment Outreach Date and a Patient Assessment Status. : entry.select(resource as QuestionnaireResponse).exists() implies entry.select(resource as QuestionnaireResponse).exists ( (QuestionnaireResponse|repeat('Yes'|PatientAssessmentApproval)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|PatientAssessmentOutreachDate)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|PatientAssessmentOutreachStatus)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() ) |
Assessment-ServiceDupQuestionnaire | warning | Bundle | Ensure that all Assessment Questionnaire bundles have a response to the service duplication indicators. : entry.select(resource as QuestionnaireResponse).exists() implies entry.select(resource as QuestionnaireResponse).exists ( (QuestionnaireResponse|repeat('Yes'|PatientAssessmentApproval)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|CurrentHousingProgramRecipientIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|CurrentNutritionalEducationProgramRecipientIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|CurrentNutritionalServicesProgramRecipientIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|CurrentFoodServiceProgramRecipientIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|CurrentSNAPProgramRecipientIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|CurrentWICProgramRecipientIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|CurrentTANFProgramRecipientIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|CurrentTransportationProgramRecipientIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|MedicationRequiringRefrigerationIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|BreastMilkRequiringRefrigerationIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|ADLs/IADLsIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|MedicalRespiteRequirementsIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|ChildcareAssistanceIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() ) |
Consent-ProvisionType | warning | Bundle | Ensure that all Consents include a value for provision type. : entry.select(resource as Consent) .all(provision.type.exists()) |
Encounter-PeriodEnd | warning | Bundle | Ensure that all finished Encounters include a value for period.end. : entry.select(resource as Encounter) .where(status.contains('finished')) .all(period.end.exists()) |
Encounter-PeriodStart | warning | Bundle | Ensure that all Encounters include a value for period.start. : entry.select(resource as Encounter) .all(period.start.exists()) |
Goal-AchievementStatus | warning | Bundle | Ensure that all Goals include a value for achivementStatus. : entry.select(resource as Goal).exists() implies entry.select(resource as Goal).all(achievementStatus.exists()) |
Goal-StatusDate | warning | Bundle | Ensure that all Goals include a value for statusDate. : entry.select(resource as Goal).exists() implies entry.select(resource as Goal).all(statusDate.exists()) |
Location-Address | warning | Bundle | Ensure that all Location resources include all address elements. : entry.select(resource as Location). address.where(line.count() > 0 and city.trim().length() > 0 and state.trim().length() > 0 and postalCode.trim().length() > 0 and district.trim().length() > 0).count() > 0 |
Location-Type | warning | Bundle | Ensure that all Location resources include a value for type. : entry.select(resource as Location).exists() implies entry.select(resource as Location).all(type.exists()) |
ObservationScreenRes-CategoryDisplay | warning | Bundle | Ensure that all Observation Screening Responses have a category display. : entry.select(resource as Observation) .where(meta.profile.contains('shinny-observation-screening-response') ) .category.coding.where( system.contains('/CodeSystem/observation-category').not() ). all(display.exists()) |
ObservationScreenRes-CodeCode | warning | Bundle | Ensure that all Observation Screening Responses have a code code. : entry.select(resource as Observation) .where(meta.profile.contains('shinny-observation-screening-response')) .code.coding .all(code.exists()) |
ObservationScreenRes-CodeDisplay | warning | Bundle | Ensure that all Observation Screening Responses have a code dispay. : entry.select(resource as Observation) .where(meta.profile.contains('shinny-observation-screening-response')) .code.coding .all(display.exists()) |
ObservationScreenRes-Interpretation | warning | Bundle | Ensure that specific Observation Screening Responses have an interpretation. : entry.select(resource as Observation) .where(meta.profile.contains('shinny-observation-screening-response')) .where(derivedFrom.exists().not()) .all(interpretation.exists()) |
ObservationScreenRes-Langauge | warning | Bundle | Ensure that all Observation Screening Responses have a language. : entry.select(resource as Observation) .where(meta.profile.contains('shinny-observation-screening-response') ) .all(language.exists()) |
Organization-Address | warning | Bundle | Ensure that all Organization resources include all address elements. : entry.select(resource as Organization). address.where(line.count() > 0 and city.trim().length() > 0 and state.trim().length() > 0 and postalCode.trim().length() > 0 and district.trim().length() > 0).count() > 0 |
Organization-Type | warning | Bundle | Ensure that all Organization resources include a value for type. : entry.select(resource as Organization).exists() implies entry.select(resource as Organization).all(type.exists()) |
Referral-ApprovalQuestionnaire | warning | Bundle | Ensure that all Referral Questionnaire bundles have a response to PatientReferralApproval. : entry.select(resource as QuestionnaireResponse).exists() implies entry.select(resource as QuestionnaireResponse).exists ( (QuestionnaireResponse|repeat('Yes'|PatientReferralApproval)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() or (QuestionnaireResponse|repeat('No'|PatientReferralApproval)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() ) |
Referral-HRSNOutreachQuestionnaire | warning | Bundle | Ensure that all approved Referral Questionnaire bundles have a response to HRSNServiceProviderReferralOutreachDate. : entry.select(resource as QuestionnaireResponse).exists() implies entry.select(resource as QuestionnaireResponse).exists ( (QuestionnaireResponse|repeat('Yes'|PatientReferralApproval)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|HRSNServiceProviderReferralOutreachDate)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() ) |
Referral-SCNOutreachQuestionnaire | warning | Bundle | Ensure that all approved Referral Questionnaire bundles have a response to SCNReferralOutreachDate. : entry.select(resource as QuestionnaireResponse).exists() implies entry.select(resource as QuestionnaireResponse).exists ( (QuestionnaireResponse|repeat('Yes'|PatientReferralApproval)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|SCNReferralOutreachDate)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() ) |
SHINNY-Assessment-Encounter | error | Bundle | Assessment-Encounter should exist : entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-assessment')).exists() implies entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-assessment')) .where(encounter.reference.exists().not()) .count()=0 |
SHINNY-Assessment-Patient | error | Bundle | Assessment-Subject should exist : entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-assessment')).exists() implies entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-assessment')) .where(subject.reference.exists().not()) .count()=0 |
SHINNY-Bundle-Encounter-RI | error | Bundle | Checks for RI between all resources & Encounter : entry.select(resource) .where(encounter.exists()) .encounter.select(reference.split('/')[1]).distinct() .intersect( entry.select(resource as Encounter).id ) .count() = entry.select(resource) .where(encounter.exists()) .encounter.select(reference.split('/')[1]).distinct() .count() |
SHINNY-Bundle-Obs-Encounter-RI | error | Bundle | Checks for RI between Screening Obs & Encounter : entry.select(resource as Observation) .exists(encounter.reference.exists() and meta.profile.contains('shinny-observation-screening-response')) implies entry.select(resource as Observation) .where(encounter.reference.exists() and meta.profile.contains('shinny-observation-screening-response')) .select(encounter.reference.split('/')[1]).distinct() = entry.select(resource as Encounter).id |
SHINNY-Bundle-Obs-Patient-RI | error | Bundle | Checks for RI between Obs & Patient : entry.select(resource as Observation) .where(encounter.reference.exists() and meta.profile.contains('shinny-observation')).count()>1 implies entry.select(resource as Observation) .where(encounter.reference.exists() and meta.profile.contains('shinny-observation')) .encounter.reference.distinct() .contains(entry.select(resource as Encounter).id) |
SHINNY-Bundle-Obs-derivedFrom-RI | error | Bundle | Checks for RI between Observation & child Observation : entry.select(resource as Observation) .where(derivedFrom.exists() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or meta.where(profile.lower().contains('sdohcc-observation')))) .derivedFrom.select(reference.split('/')[1]) .intersect( entry.select(resource as Observation).where(derivedFrom.empty() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or meta.where(profile.lower().contains('sdohcc-observation')))).id) .count() = entry.select(resource as Observation) .where(derivedFrom.exists() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or $this.meta.where(profile.lower().contains('sdohcc-observationscreeningresponse')))) .derivedFrom.reference .count() |
SHINNY-Bundle-Obs-hasMember-RI | error | Bundle | Checks for RI between Observation & child Observations : entry.select(resource as Observation) .where(hasMember.exists() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or meta.where(profile.lower().contains('sdohcc-observation')))) .hasMember.select(reference.split('/')[1]) .intersect( entry.select(resource as Observation).where(hasMember.empty() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or meta.where(profile.lower().contains('sdohcc-observation')))).id) .count() = entry.select(resource as Observation) .where(hasMember.exists() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or $this.meta.where(profile.lower().contains('sdohcc-observationscreeningresponse')))) .hasMember.reference .count() and (entry.select(resource as Observation) .where(hasMember.exists() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or meta.where(profile.lower().contains('sdohcc-observation')))).exists() implies entry.select(resource as Observation) .where(hasMember.exists() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or meta.where(profile.lower().contains('sdohcc-observation')))) .hasMember.select(reference.split('/')[1]) .intersect( entry.select(resource as Observation).where(hasMember.empty() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or meta.where(profile.lower().contains('sdohcc-observationscreeningresponse')))).id) .count() = entry.select(resource as Observation).where(hasMember.empty() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or meta.where(profile.lower().contains('sdohcc-observationscreeningresponse')))).count()) |
SHINNY-Bundle-Patient-Org-RI | error | Bundle | Checks for RI between Patient & Assigning Org : entry.select(resource as Organization).id contains entry.select(resource as Patient) .identifier.where(type.coding.code='MR') .assigner.reference.split('/')[1] |
SHINNY-Bundle-Required | error | Bundle | Every submitted resource should be part of a bundle. : select($this as Bundle).exists() |
SHINNY-Bundle-Required-Resources | error | Bundle | Every bundle should always have one and only one 'Patient' & 'Encounter' and atleast one Org : entry.select(resource as Patient).count() = 1 and entry.select(resource as Encounter).count() > 0 and entry.select(resource as Organization).count() > 0 |
SHINNY-Bundle-screening-consent | error | Bundle | Ensures all bundles with a screening included also includes the consent profile. : ( (select($this as Bundle).where(meta.profile.upper() != 'http://test.shinny.org/us/ny/hrsn/StructureDefinition/SHINNYBundleProfile'.upper()).count() > 0) and ( entry.select(resource as Observation) .where(meta.profile.contains('shinny-observation-screening')).count() > 0 ) ) implies entry.select(resource as Consent).exists() |
SHINNY-Consent-Category | warning | Bundle | Patient Consent category code is 59284-0 : entry.select(resource as Consent).exists() implies entry.select(resource as Consent).category.coding.where(code='59284-0').exists() |
SHINNY-Encounter-Class | warning | Bundle | Ensure that the Encounter resource has a class code; Ensure that the Encounter resource has a class code system : entry.select(resource as Encounter).class .all(code.exists() and system.exists()) |
SHINNY-Encounter-Type | warning | Bundle | Ensure that the Encounter resource has a status code : entry.select(resource as Encounter).type.coding .all(code.exists() and system.exists()) |
SHINNY-Obs-Category | error | Bundle | Ensure that all Observation categories have an SDOH code : entry.select(resource as Observation) .where(meta.profile.contains('shinny-observation-screening-response')) .all(category.coding.system .exists($this.contains('SDOHCC-CodeSystemTemporaryCodes'))) |
SHINNY-Obs-Code | warning | Bundle | Ensure that all Observation resources have screening code; Ensure that all Observation resources have screening code system : entry.select(resource as Observation).where( code.coding.system.exists().not() or code.coding.code.not().exists().not()) .count() = 0 |
SHINNY-Obs-Encounter | warning | Bundle | SDOH Observations should have an Encounter : entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-screening-response')) .all(encounter.reference.exists()) |
SHINNY-Obs-Patient | warning | Bundle | SDOH Observations should have a Patient : entry.select(resource as Observation).where(meta.profile.contains('shinny-observation')) .all(subject.reference.exists()) |
SHINNY-Patient-Address | warning | Bundle | All elements of address should be present : entry.select(resource as Patient). address.where(line.count() > 0 and city.trim().length() > 0 and state.trim().length() > 0 and postalCode.trim().length() > 0 and district.trim().length() > 0).count() > 0 |
SHINNY-Patient-Communication | warning | Bundle | Communication should exist : entry.select(resource as Patient).communication.exists() |
SHINNY-Patient-DOB | error | Bundle | birthDate should be a valid date : entry.select(resource as Patient).birthDate.trim().length() = 10 and entry.select(resource as Patient).birthDate.trim().split('-').count() = 3 |
SHINNY-Patient-Gender | error | Bundle | Gender should be present : entry.select(resource as Patient).where(gender.exists() and gender.trim().length()).count() > 0 |
SHINNY-Patient-GenderId | warning | Bundle | Gender Id should be present : entry.select(resource as Patient).extension.where(url='http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex').count() > 0 |
SHINNY-Patient-MA | error | Bundle | Every bundle should always have only 1 Medicaid CIN (i.e MA) Object within patient.identifier AND the CIN is always in the format of 2 letters, 5 numbers, and 1 letter, e.g., 'AB12345C' : entry.select(resource as Patient).identifier.where(type.coding.code='MA' and value.trim().length() > 0).count() = 1 and entry.select(resource as Patient).identifier.where( value.trim().length() = 8 and type.coding.code='MA' and value.substring(0,1).matches('^[a-zA-Z]+$') and value.substring(1,1).matches('^[a-zA-Z]+$') and value.substring(2,1).matches('^[0-9]*$') and value.substring(3,1).matches('^[0-9]*$') and value.substring(4,1).matches('^[0-9]*$') and value.substring(5,1).matches('^[0-9]*$') and value.substring(6,1).matches('^[0-9]*$') and value.substring(7,1).matches('^[a-zA-Z]+$') ).exists() |
SHINNY-Patient-MRN | error | Bundle | Every bundle should always have only 1 MR (i.e MRN) Object within patient.identifier, system.contains('facility') and value (MRN) is provided : entry.select(resource as Patient).identifier.where(type.coding.code='MR' and value.trim().length() > 0).count() = 1 |
SHINNY-Patient-MiddleName | warning | Bundle | MiddleName should be present : entry.select(resource as Patient).name .extension.where(url.contains('middle-name')) .value.trim().length()>0 |
SHINNY-Patient-Pronouns | warning | Bundle | Pronouns should be present : entry.select(resource as Patient).extension.where(url='http://test.shinny.org/us/ny/hrsn/ValueSet/SHINNYPersonalPronounsVS').exists() implies entry.select(resource as Patient).extension.where(url='http://test.shinny.org/us/ny/hrsn/ValueSet/SHINNYPersonalPronounsVS' and value.select($this as CodeableConcept).coding.code.exists()).exists() |
SHINNY-Patient-Race-Ethnicity | warning | Bundle | Race & Ethnicity should be present : entry.select(resource as Patient).extension.where(url='http://hl7.org/fhir/us/core/StructureDefinition/us-core-race').extension.where(url='ombCategory' and value.system = 'http://terminology.hl7.org/CodeSystem/v3-NullFlavor').exists().not() implies entry.select(resource as Patient). extension.where(url='http://hl7.org/fhir/us/core/StructureDefinition/us-core-race').exists() and entry.select(resource as Patient). extension.where(url='http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity').exists() |
SHINNY-Patient-SSN | warning | Bundle | Every bundle should always have only 1 SSN (i.e SS) Object within patient.identifier : entry.select(resource as Patient).identifier.where(type.coding.code='SS' and value.trim().length() > 0).count() <= 1 |
SHINNY-Resources-Profile-Check | error | Bundle | SHINNY-Resources-Profile-Check : select($this as Bundle).where(meta.profile.upper() != 'http://test.shinny.org/us/ny/hrsn/StructureDefinition/SHINNYBundleProfile'.upper()).count() = 0 and ( entry.select(resource as Patient).exists() implies entry.select(resource as Patient).where(meta.profile.upper() != 'http://test.shinny.org/us/ny/hrsn/StructureDefinition/shinny-patient'.upper()).count() = 0 ) and ( entry.select(resource as Encounter).exists() implies entry.select(resource as Encounter).where(meta.profile.upper() != 'http://test.shinny.org/us/ny/hrsn/StructureDefinition/shinny-encounter'.upper()).count() = 0 ) and ( entry.select(resource as Observation).exists() implies entry.select(resource as Observation).meta.where(profile.upper().startsWith('http://test.shinny.org/us/ny/hrsn/StructureDefinition/shinny-observation'.upper()).not()).count() = 0 ) and ( entry.select(resource as ServiceRequest).exists() implies entry.select(resource as ServiceRequest).where(meta.profile.upper() != 'http://test.shinny.org/us/ny/hrsn/StructureDefinition/SHINNYSDOHServiceRequest'.upper()).count() = 0 ) and ( entry.select(resource as Task).exists() implies entry.select(resource as Task).where(meta.profile.upper() != 'http://test.shinny.org/us/ny/hrsn/StructureDefinition/SHINNYSDOHTaskForReferralManagement'.upper()).count() = 0 ) and ( entry.select(resource as Consent).exists() implies entry.select(resource as Consent).where(meta.profile.upper() != 'http://test.shinny.org/us/ny/hrsn/StructureDefinition/shinny-Consent'.upper()).count() = 0 ) .allTrue() |
SHINNY-Screening-Consent | error | Bundle | All screening bundles must include a consent : entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-screening-response')).exists() implies entry.select(resource as Consent).exists() |
SHINNY-Screening-Patient | error | Bundle | SDOH Screening Observations should have an Patient : entry.select(resource as Observation) .where(meta.profile.contains('shinny-observation-screening') and hasMember.exists()) .all(subject.reference.exists()) |
SHINNYServiceRequestSDOHCategory | error | Bundle | Ensure that all Service Request categories have an SDOH code : entry.select(resource as ServiceRequest) .where(meta.profile.contains('SHINNYSDOHServiceRequest')) .all(category.coding.system .exists($this.contains('SDOHCC-CodeSystemTemporaryCodes'))) |
Screening-Crosswalk-44255-8 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 44255-8 then answer codes must be one of the following: LA6568-5 LA6569-3 LA6570-1 LA6571-9 : entry.select(resource as Observation).where(code.coding.code contains '44255-8').exists() implies entry.select(resource as Observation).where(code.coding.code contains '44255-8').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '44255-8') .value.select($this as CodeableConcept).coding .where(code='LA6568-5' or code='LA6569-3' or code='LA6570-1' or code='LA6571-9').exists() |
Screening-Crosswalk-44250-9 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 44250-9 then answer codes must be one of the following: LA6568-5 LA6569-3 LA6570-1 LA6571-9 : entry.select(resource as Observation).where(code.coding.code contains '44250-9').exists() implies entry.select(resource as Observation).where(code.coding.code contains '44250-9').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '44250-9') .value.select($this as CodeableConcept).coding .where(code='LA6568-5' or code='LA6569-3' or code='LA6570-1' or code='LA6571-9').exists() |
Screening-Crosswalk-68517-2 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 68517-2 then answer codes must be one of the following: LA6270-8 LA26460-8 LA18876-5 LA18891-4 LA18934-2 : entry.select(resource as Observation).where(code.coding.code contains '68517-2').exists() implies entry.select(resource as Observation).where(code.coding.code contains '68517-2').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '68517-2') .value.select($this as CodeableConcept).coding .where(code='LA6270-8' or code='LA26460-8' or code='LA18876-5' or code='LA18891-4' or code='LA18934-2').exists() |
Screening-Crosswalk-68516-4 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 68516-4 then answer codes must be one of the following: LA6111-4 LA13942-0 LA19282-5 LA28855-7 LA28858-1 LA28854-0 LA28853-2 LA28891-2 LA32059-0 LA32060-8 : entry.select(resource as Observation).where(code.coding.code contains '68516-4').exists() implies entry.select(resource as Observation).where(code.coding.code contains '68516-4').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '68516-4') .value.select($this as CodeableConcept).coding .where(code='LA6111-4' or code='LA13942-0' or code='LA19282-5' or code='LA28855-7' or code='LA28858-1' or code='LA28854-0' or code='LA28853-2' or code='LA28891-2' or code='LA32059-0' or code='LA32060-8').exists() |
Screening-Crosswalk-68524-8 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 68524-8 then answer codes must be one of the following: LA6270-8 LA26460-8 LA18876-5 LA18891-4 LA18934-2 : entry.select(resource as Observation).where(code.coding.code contains '68524-8').exists() implies entry.select(resource as Observation).where(code.coding.code contains '68524-8').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '68524-8') .value.select($this as CodeableConcept).coding .where(code='LA6270-8' or code='LA26460-8' or code='LA18876-5' or code='LA18891-4' or code='LA18934-2').exists() |
Screening-Crosswalk-69858-9 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 69858-9 then answer codes must be one of the following: LA33-6 LA32-8 : entry.select(resource as Observation).where(code.coding.code contains '69858-9').exists() implies entry.select(resource as Observation).where(code.coding.code contains '69858-9').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '69858-9') .value.select($this as CodeableConcept).coding .where(code='LA33-6' or code='LA32-8').exists() |
Screening-Crosswalk-69861-3 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 69861-3 then answer codes must be one of the following: LA33-6 LA32-8 : entry.select(resource as Observation).where(code.coding.code contains '69861-3').exists() implies entry.select(resource as Observation).where(code.coding.code contains '69861-3').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '69861-3') .value.select($this as CodeableConcept).coding .where(code='LA33-6' or code='LA32-8').exists() |
Screening-Crosswalk-71802-3 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 71802-3 then answer codes must be one of the following: LA31993-1, LA31994-9, LA31995-6 : entry.select(resource as Observation).where(code.coding.code contains '71802-3').exists() implies entry.select(resource as Observation).where(code.coding.code contains '71802-3').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '71802-3') .value.select($this as CodeableConcept).coding .where(code='LA31993-1' or code='LA31994-9' or code='LA31995-6').exists() |
Screening-Crosswalk-76513-1 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 76513-1 then answer codes must be one of the following: LA15832-1 LA22683-9 LA31980-8 : entry.select(resource as Observation).where(code.coding.code contains '76513-1').exists() implies entry.select(resource as Observation).where(code.coding.code contains '76513-1').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '76513-1') .value.select($this as CodeableConcept).coding .where(code='LA15832-1' or code='LA22683-9' or code='LA31980-8').exists() |
Screening-Crosswalk-88123-5 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 88123-5 then answer codes must be one of the following: LA28397-0 LA6729-3 LA28398-8 : entry.select(resource as Observation).where(code.coding.code contains '88123-5').exists() implies entry.select(resource as Observation).where(code.coding.code contains '88123-5').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '88123-5') .value.select($this as CodeableConcept).coding .where(code='LA28397-0' or code='LA6729-3' or code='LA28398-8').exists() |
Screening-Crosswalk-88122-7 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 88122-7 then answer codes must be one of the following: LA28397-0 LA6729-3 LA28398-8 : entry.select(resource as Observation).where(code.coding.code contains '88122-7').exists() implies entry.select(resource as Observation).where(code.coding.code contains '88122-7').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '88122-7') .value.select($this as CodeableConcept).coding .where(code='LA28397-0' or code='LA6729-3' or code='LA28398-8').exists() |
Screening-Crosswalk-89555-7 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 89555-7 then answer codes must be one of the following: LA6111-4 LA6112-2 LA6113-0 LA6114-8 LA6115-5 LA10137-0 LA10138-8 LA10139-6 : entry.select(resource as Observation).where(code.coding.code contains '89555-7').exists() implies entry.select(resource as Observation).where(code.coding.code contains '89555-7').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '89555-7') .value.select($this as CodeableConcept).coding .where(code='LA6111-4' or code='LA6112-2' or code='LA6113-0' or code='LA6114-8' or code='LA6115-5' or code='LA10137-0' or code='LA10138-8' or code='LA10139-6').exists() |
Screening-Crosswalk-93030-5 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 93030-5 then answer codes must be one of the following: LA33-6 LA32-8 : entry.select(resource as Observation).where(code.coding.code contains '93030-5').exists() implies entry.select(resource as Observation).where(code.coding.code contains '93030-5').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '93030-5') .value.select($this as CodeableConcept).coding .where(code='LA33-6' or code='LA32-8').exists() |
Screening-Crosswalk-93038-8 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 93038-8 then answer codes must be one of the following: LA6568-5 LA13863-8 LA13909-9 LA13902-4 LA13914-9 LA30122-8 : entry.select(resource as Observation).where(code.coding.code contains '93038-8').exists() implies entry.select(resource as Observation).where(code.coding.code contains '93038-8').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '93038-8') .value.select($this as CodeableConcept).coding .where(code='LA6568-5' or code='LA13863-8' or code='LA13909-9' or code='LA13902-4' or code='LA13914-9' or code='LA30122-8').exists() |
Screening-Crosswalk-93159-2 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 93159-2 then answer codes must be one of the following: LA6270-8 LA10066-1 LA10082-8 LA10044-8 LA9933-8 : entry.select(resource as Observation).where(code.coding.code contains '93159-2').exists() implies entry.select(resource as Observation).where(code.coding.code contains '93159-2').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '93159-2') .value.select($this as CodeableConcept).coding .where(code='LA6270-8' or code='LA10066-1' or code='LA10082-8' or code='LA10044-8' or code='LA9933-8').exists() |
Screening-Crosswalk-95530-2 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 95530-2 then answer codes must be one of the following: LA6270-8 LA26460-8 LA18876-5 LA18891-4 LA18934-2 : entry.select(resource as Observation).where(code.coding.code contains '95530-2').exists() implies entry.select(resource as Observation).where(code.coding.code contains '95530-2').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '95530-2') .value.select($this as CodeableConcept).coding .where(code='LA6270-8' or code='LA26460-8' or code='LA18876-5' or code='LA18891-4' or code='LA18934-2').exists() |
Screening-Crosswalk-95615-1 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 95615-1 then answer codes must be one of the following: LA6270-8 LA10066-1 LA10082-8 LA16644-9 LA6482-9 : entry.select(resource as Observation).where(code.coding.code contains '95615-1').exists() implies entry.select(resource as Observation).where(code.coding.code contains '95615-1').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '95615-1') .value.select($this as CodeableConcept).coding .where(code='LA6270-8' or code='LA10066-1' or code='LA10082-8' or code='LA16644-9' or code='LA6482-9').exists() |
Screening-Crosswalk-95618-5 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 95618-5 then answer codes must be one of the following: LA6270-8 LA10066-1 LA10082-8 LA16644-9 LA6482-9 : entry.select(resource as Observation).where(code.coding.code contains '95618-5').exists() implies entry.select(resource as Observation).where(code.coding.code contains '95618-5').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '95618-5') .value.select($this as CodeableConcept).coding .where(code='LA6270-8' or code='LA10066-1' or code='LA10082-8' or code='LA16644-9' or code='LA6482-9').exists() |
Screening-Crosswalk-95617-7 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 95617-7 then answer codes must be one of the following: LA6270-8 LA10066-1 LA10082-8 LA16644-9 LA6482-9 : entry.select(resource as Observation).where(code.coding.code contains '95617-7').exists() implies entry.select(resource as Observation).where(code.coding.code contains '95617-7').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '95617-7') .value.select($this as CodeableConcept).coding .where(code='LA6270-8' or code='LA10066-1' or code='LA10082-8' or code='LA16644-9' or code='LA6482-9').exists() |
Screening-Crosswalk-95616-9 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 95616-9 then answer codes must be one of the following: LA6270-8 LA10066-1 LA10082-8 LA16644-9 LA6482-9 : entry.select(resource as Observation).where(code.coding.code contains '95616-9').exists() implies entry.select(resource as Observation).where(code.coding.code contains '95616-9').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '95616-9') .value.select($this as CodeableConcept).coding .where(code='LA6270-8' or code='LA10066-1' or code='LA10082-8' or code='LA16644-9' or code='LA6482-9').exists() |
Screening-Crosswalk-96779-4 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 96779-4 then answer codes must be one of the following: LA33-6 LA32-8 LA32002-0 : entry.select(resource as Observation).where(code.coding.code contains '96779-4').exists() implies entry.select(resource as Observation).where(code.coding.code contains '96779-4').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '96779-4') .value.select($this as CodeableConcept).coding .where(code='LA33-6' or code='LA32-8' or code='LA32002-0').exists() |
Screening-Crosswalk-96778-6 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 96778-6 then answer codes must be one of the following: LA31996-4 LA28580-1 LA31997-2 LA31998-0 LA31999-8 LA32000-4 LA32001-2 LA9-3 : entry.select(resource as Observation).where(code.coding.code contains '96778-6').exists() implies entry.select(resource as Observation).where(code.coding.code contains '96778-6').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '96778-6') .value.select($this as CodeableConcept).coding .where(code='LA31996-4' or code='LA28580-1' or code='LA31997-2' or code='LA31998-0' or code='LA31999-8' or code='LA32000-4' or code='LA32001-2' or code='LA9-3').exists() |
Screening-Crosswalk-96781-0 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 96781-0 then answer codes must be one of the following: LA31976-6 LA31977-4 LA31978-2 LA31979-0 : entry.select(resource as Observation).where(code.coding.code contains '96781-0').exists() implies entry.select(resource as Observation).where(code.coding.code contains '96781-0').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '96781-0') .value.select($this as CodeableConcept).coding .where(code='LA31976-6' or code='LA31977-4' or code='LA31978-2' or code='LA31978-2').exists() |
Screening-Crosswalk-96780-2 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 96780-2 then answer codes must be one of the following: LA31981-6 LA31982-4 LA31983-2 : entry.select(resource as Observation).where(code.coding.code contains '96780-2').exists() implies entry.select(resource as Observation).where(code.coding.code contains '96780-2').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '96780-2') .value.select($this as CodeableConcept).coding .where(code='LA31981-6' or code='LA31982-4' or code='LA31983-2').exists() |
Screening-Crosswalk-96782-8 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 96782-8 then answer codes must be one of the following: LA33-6 LA32-8 : entry.select(resource as Observation).where(code.coding.code contains '96782-8').exists() implies entry.select(resource as Observation).where(code.coding.code contains '96782-8').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '96782-8') .value.select($this as CodeableConcept).coding .where(code='LA33-6' or code='LA32-8').exists() |
Screening-Crosswalk-96842-0 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 96842-0 then answer codes must be one of the following: LA6270-8 LA26460-8 LA18876-5 LA18891-4 LA18934-2 : entry.select(resource as Observation).where(code.coding.code contains '96842-0').exists() implies entry.select(resource as Observation).where(code.coding.code contains '96842-0').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '96842-0') .value.select($this as CodeableConcept).coding .where(code='LA6270-8' or code='LA26460-8' or code='LA18876-5' or code='LA18891-4' or code='LA18934-2').exists() |
Screening-Crosswalk-97027-7 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 97027-7 then answer codes must be one of the following: LA33-6 LA32-8 : entry.select(resource as Observation).where(code.coding.code contains '97027-7').exists() implies entry.select(resource as Observation).where(code.coding.code contains '97027-7').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '97027-7') .value.select($this as CodeableConcept).coding .where(code='LA33-6' or code='LA32-8').exists() |
ServiceRequest-AuthoredOn | warning | Bundle | Ensure that all Service Requests have a authored on date. : entry.select(resource as ServiceRequest).exists() implies entry.select(resource as ServiceRequest).all(authoredOn.exists()) |
ServiceRequest-CategoryCode | warning | Bundle | Ensure that all Service Requests have a category code. : entry.select(resource as ServiceRequest).exists() implies entry.select(resource as ServiceRequest).( all(category.exists()) and category.all(coding.exists()) and category.coding.all(code.exists()) ) |
ServiceRequest-OccurrencePeriod | warning | Bundle | Ensure that all Service Requests have an occurrence period start and end, or occurrence datetime. : entry.select(resource as ServiceRequest).exists() implies entry.select(resource as ServiceRequest).count() = ( entry.select(resource as ServiceRequest).where(occurrence is Period).select(occurrence) .where(start and end).count() + entry.select(resource as ServiceRequest).where(occurrence is dateTime).count() ) |
ServiceRequest-Quantity | warning | Bundle | Ensure that all Service Requests have a quantity. : entry.select(resource as ServiceRequest).exists() implies entry.select(resource as ServiceRequest) .all(quantity.value.exists()) |
Task-EndPeriod | warning | Bundle | Ensure that all completed Tasks have an end execution period. : entry.select(resource as Task).where(status = 'completed').exists() implies entry.select(resource as Task).where(status = 'completed').all(executionPeriod.end.exists()) |
Task-Repetitions | warning | Bundle | Ensure that all Tasks have a value for repetitions. : entry.select(resource as Task).exists() implies entry.select(resource as Task).all(restriction.repetitions.exists()) |
Task-StartPeriod | warning | Bundle | Ensure that all Tasks have a starting execution period. : entry.select(resource as Task).exists() implies entry.select(resource as Task).all(executionPeriod.start.exists()) |
Task-StatusReason | error | Bundle | Ensure that all tasks exists, have a statusReason If the Task.status is rejected, cancelled, completed, or failed. : entry.select(resource as Task).where(status = 'rejected' or status = 'cancelled' or status = 'completed' or status = 'failed').exists() implies entry.select(resource as Task).where(status = 'rejected' or status = 'cancelled' or status = 'completed' or status = 'failed') .all(statusReason.text.exists()) |
shinny-sexual-orientation | warning | Bundle | If there is no component or hasMember element then either a value[x] or a data absent reason must be present : entry.select(resource as Observation).where(meta.profile.contains('shin-ny-observation-sexual-orientation')).exists() implies entry.select(resource as Observation).where(meta.profile.contains('shin-ny-observation-sexual-orientation')) .where(value.exists() or dataAbsentReason.exists()) .count()=1 |

Name | Flags | Card. | Type | Description & Constraints Filter: Bindings Constraints Obligations
--- | --- | --- | --- | ---
Bundle | C | 0..* | Bundle | Contains a collection of resources Constraints: bdl-1, bdl-2, bdl-3, bdl-4, bdl-7, bdl-9, bdl-10, bdl-11, bdl-12, SHINNY-Patient-MRN, SHINNY-Patient-MA, SHINNY-Patient-SSN, SHINNY-Patient-Address, SHINNY-Patient-DOB, SHINNY-Patient-Gender, SHINNY-Patient-GenderId, SHINNY-Patient-Race-Ethnicity, SHINNY-Patient-Communication, SHINNY-Patient-MiddleName, SHINNY-Patient-Pronouns, shinny-sexual-orientation, SHINNY-Bundle-Obs-hasMember-RI, SHINNY-Encounter-Class, SHINNY-Encounter-Type, Encounter-PeriodStart, Encounter-PeriodEnd, SHINNY-Obs-Encounter, SHINNY-Obs-Patient, SHINNY-Obs-Code, SHINNY-Obs-Category, SHINNY-Screening-Patient, ObservationScreenRes-Langauge, ObservationScreenRes-CategoryDisplay, ObservationScreenRes-CodeCode, ObservationScreenRes-CodeDisplay, ObservationScreenRes-Interpretation, SHINNY-Screening-Consent, Assessment-ConditionID, Assessment-ConditionSNOMED, Assessment-ConditionICD10, Assessment-ApprovalQuestionnaire, Assessment-OutreachQuestionnaire, Assessment-AdminQuestionnaire, Assessment-ServiceDupQuestionnaire, SHINNY-Assessment-Encounter, SHINNY-Assessment-Patient, ServiceRequest-Quantity, ServiceRequest-CategoryCode, ServiceRequest-OccurrencePeriod, ServiceRequest-AuthoredOn, SHINNYServiceRequestSDOHCategory, Task-StatusReason, Task-Repetitions, Task-EndPeriod, Task-StartPeriod, Referral-ApprovalQuestionnaire, Referral-HRSNOutreachQuestionnaire, Referral-SCNOutreachQuestionnaire, SHINNY-Bundle-Required-Resources, SHINNY-Bundle-Required, SHINNY-Bundle-Patient-Org-RI, SHINNY-Bundle-Encounter-RI, SHINNY-Bundle-Obs-derivedFrom-RI, SHINNY-Bundle-Obs-Patient-RI, SHINNY-Bundle-Obs-Encounter-RI, Screening-Crosswalk-44250-9, Screening-Crosswalk-44255-8, Screening-Crosswalk-68516-4, Screening-Crosswalk-68517-2, Screening-Crosswalk-68524-8, Screening-Crosswalk-69858-9, Screening-Crosswalk-69861-3, Screening-Crosswalk-71802-3, Screening-Crosswalk-76513-1, Screening-Crosswalk-88122-7, Screening-Crosswalk-88123-5, Screening-Crosswalk-89555-7, Screening-Crosswalk-93030-5, Screening-Crosswalk-93038-8, Screening-Crosswalk-93159-2, Screening-Crosswalk-95530-2, Screening-Crosswalk-95615-1, Screening-Crosswalk-95616-9, Screening-Crosswalk-95617-7, Screening-Crosswalk-95618-5, Screening-Crosswalk-96778-6, Screening-Crosswalk-96779-4, Screening-Crosswalk-96780-2, Screening-Crosswalk-96781-0, Screening-Crosswalk-96782-8, Screening-Crosswalk-96842-0, Screening-Crosswalk-97027-7, SHINNY-Consent-Category, Consent-ProvisionType, SHINNY-Bundle-screening-consent, Goal-StatusDate, Goal-AchievementStatus, Location-Address, Location-Type, Organization-Address, Organization-Type, SHINNY-Resources-Profile-Check
id | S Σ | 1..1 | id | Logical id of this artifact
meta | S Σ | 1..1 | SHINNYMeta | Metadata about the resource
implicitRules | ?!Σ | 0..1 | uri | A set of rules under which this content was created
language |  | 0..1 | code | Language of the resource content Binding: SHINNYLanguageVS (preferred)
identifier | Σ | 0..1 | Identifier | Persistent identifier for the bundle
type | Σ | 1..1 | code | document | message | transaction | transaction-response | batch | batch-response | history | searchset | collection Binding: BundleType (required): Indicates the purpose of a bundle - how it is intended to be used.
timestamp | Σ | 0..1 | instant | When the bundle was assembled
total | Σ C | 0..1 | unsignedInt | If search, the total number of matches
link | Σ | 0..* | BackboneElement | Links related to this Bundle
id |  | 0..1 | string | Unique id for inter-element referencing
extension |  | 0..* | Extension | Additional content defined by implementations
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized
relation | Σ | 1..1 | string | See http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1
url | Σ | 1..1 | uri | Reference details for the link
entry | Σ C | 0..* | BackboneElement | Entry in the bundle - will have a resource or information Constraints: bdl-5, bdl-8 This repeating element order: For bundles of type 'document' and 'message', the first resource is special (must be Composition or MessageHeader respectively). For all bundles, the meaning of the order of entries depends on the bundle type
id |  | 0..1 | string | Unique id for inter-element referencing
extension |  | 0..* | Extension | Additional content defined by implementations
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized
link | Σ | 0..* | See link (Bundle) | Links related to this entry
fullUrl | Σ | 0..1 | uri | URI for resource (Absolute URL server address or URI for UUID/OID)
resource | Σ | 0..1 | Resource | A resource in the bundle
search | Σ C | 0..1 | BackboneElement | Search related information
id |  | 0..1 | string | Unique id for inter-element referencing
extension |  | 0..* | Extension | Additional content defined by implementations
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized
mode | Σ | 0..1 | code | match | include | outcome - why this is in the result set Binding: SearchEntryMode (required): Why an entry is in the result set - whether it's included as a match or because of an _include requirement, or to convey information or warning information about the search process.
score | Σ | 0..1 | decimal | Search ranking (between 0 and 1)
request | Σ C | 0..1 | BackboneElement | Additional execution information (transaction/batch/history)
id |  | 0..1 | string | Unique id for inter-element referencing
extension |  | 0..* | Extension | Additional content defined by implementations
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized
method | Σ | 1..1 | code | GET | HEAD | POST | PUT | DELETE | PATCH Binding: HTTPVerb (required): HTTP verbs (in the HTTP command line). See HTTP rfc for details.
url | Σ | 1..1 | uri | URL for HTTP equivalent of this entry
ifNoneMatch | Σ | 0..1 | string | For managing cache currency
ifModifiedSince | Σ | 0..1 | instant | For managing cache currency
ifMatch | Σ | 0..1 | string | For managing update contention
ifNoneExist | Σ | 0..1 | string | For conditional creates
response | Σ C | 0..1 | BackboneElement | Results of execution (transaction/batch/history)
id |  | 0..1 | string | Unique id for inter-element referencing
extension |  | 0..* | Extension | Additional content defined by implementations
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized
status | Σ | 1..1 | string | Status response code (text optional)
location | Σ | 0..1 | uri | The location (if the operation returns a location)
etag | Σ | 0..1 | string | The Etag for the resource (if relevant)
lastModified | Σ | 0..1 | instant | Server's date time modified
outcome | Σ | 0..1 | Resource | OperationOutcome with hints and warnings (for batch/transaction)
signature | Σ | 0..1 | Signature | Digital Signature
Documentation for this format

#### Terminology Bindings

Path | Conformance | ValueSet | URI
Bundle.language | preferred | SHINNYLanguageVS `http://test.shinny.org/us/ny/hrsn/ValueSet/SHINNYLanguageVS` From this IG
Bundle.type | required | BundleType `http://hl7.org/fhir/ValueSet/bundle-type|4.0.1` From the FHIR Standard
Bundle.entry.search.mode | required | SearchEntryMode `http://hl7.org/fhir/ValueSet/search-entry-mode|4.0.1` From the FHIR Standard
Bundle.entry.request.method | required | HTTPVerb `http://hl7.org/fhir/ValueSet/http-verb|4.0.1` From the FHIR Standard

#### Constraints

Id | Grade | Path(s) | Details | Requirements
Assessment-AdminQuestionnaire | warning | Bundle | Ensure that all Assessment Questionnaire bundles have a response to the service duplication indicators. : entry.select(resource as QuestionnaireResponse).exists() implies entry.select(resource as QuestionnaireResponse).exists ( (QuestionnaireResponse|repeat('Yes'|PatientAssessmentApproval)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|EnhancedPopulationCheck)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|ServiceDuplicationCheck)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|ClinicalCriteriaCheck)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() ) |
Assessment-ApprovalQuestionnaire | warning | Bundle | Ensure that all Assessment Questionnaire bundles have a response to PatientAssessmentApproval. : entry.select(resource as QuestionnaireResponse).exists() implies entry.select(resource as QuestionnaireResponse).exists ( (QuestionnaireResponse|repeat('Yes'|PatientAssessmentApproval)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() or (QuestionnaireResponse|repeat('No'|PatientAssessmentApproval)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() ) |
Assessment-ConditionICD10 | warning | Bundle | Ensure that all final assessments have a Condition ICD-10 term. : entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-assessment') and status='final').exists() implies entry.select(resource as Condition).count() = entry.select(resource as Condition).select(code.coding) .where(system.contains('http://hl7.org/fhir/sid/icd-10-cm')) .count() and entry.select(resource as Condition).count() !=0 |
Assessment-ConditionID | warning | Bundle | Ensure that all final assessments have a Condition identifier. : entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-assessment') and status = 'final').exists() implies entry.select(resource as Observation) .where( meta.profile.contains('shinny-observation-assessment') and status = 'final' ).count() = entry.select(resource as Condition).id.count() |
Assessment-ConditionSNOMED | warning | Bundle | Ensure that all final assessments have a Condition category SNOMED term. : entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-assessment') and status='final').exists() implies entry.select(resource as Condition).count() = entry.select(resource as Condition).select(code.coding) .where(system.contains('http://snomed.info/sct')) .count() and entry.select(resource as Condition).count() !=0 |
Assessment-OutreachQuestionnaire | warning | Bundle | Ensure that all Assessment Questionnaire bundles with patient approval contain a Patient Assessment Outreach Date and a Patient Assessment Status. : entry.select(resource as QuestionnaireResponse).exists() implies entry.select(resource as QuestionnaireResponse).exists ( (QuestionnaireResponse|repeat('Yes'|PatientAssessmentApproval)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|PatientAssessmentOutreachDate)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|PatientAssessmentOutreachStatus)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() ) |
Assessment-ServiceDupQuestionnaire | warning | Bundle | Ensure that all Assessment Questionnaire bundles have a response to the service duplication indicators. : entry.select(resource as QuestionnaireResponse).exists() implies entry.select(resource as QuestionnaireResponse).exists ( (QuestionnaireResponse|repeat('Yes'|PatientAssessmentApproval)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|CurrentHousingProgramRecipientIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|CurrentNutritionalEducationProgramRecipientIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|CurrentNutritionalServicesProgramRecipientIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|CurrentFoodServiceProgramRecipientIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|CurrentSNAPProgramRecipientIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|CurrentWICProgramRecipientIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|CurrentTANFProgramRecipientIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|CurrentTransportationProgramRecipientIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|MedicationRequiringRefrigerationIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|BreastMilkRequiringRefrigerationIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|ADLs/IADLsIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|MedicalRespiteRequirementsIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|ChildcareAssistanceIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() ) |
Consent-ProvisionType | warning | Bundle | Ensure that all Consents include a value for provision type. : entry.select(resource as Consent) .all(provision.type.exists()) |
Encounter-PeriodEnd | warning | Bundle | Ensure that all finished Encounters include a value for period.end. : entry.select(resource as Encounter) .where(status.contains('finished')) .all(period.end.exists()) |
Encounter-PeriodStart | warning | Bundle | Ensure that all Encounters include a value for period.start. : entry.select(resource as Encounter) .all(period.start.exists()) |
Goal-AchievementStatus | warning | Bundle | Ensure that all Goals include a value for achivementStatus. : entry.select(resource as Goal).exists() implies entry.select(resource as Goal).all(achievementStatus.exists()) |
Goal-StatusDate | warning | Bundle | Ensure that all Goals include a value for statusDate. : entry.select(resource as Goal).exists() implies entry.select(resource as Goal).all(statusDate.exists()) |
Location-Address | warning | Bundle | Ensure that all Location resources include all address elements. : entry.select(resource as Location). address.where(line.count() > 0 and city.trim().length() > 0 and state.trim().length() > 0 and postalCode.trim().length() > 0 and district.trim().length() > 0).count() > 0 |
Location-Type | warning | Bundle | Ensure that all Location resources include a value for type. : entry.select(resource as Location).exists() implies entry.select(resource as Location).all(type.exists()) |
ObservationScreenRes-CategoryDisplay | warning | Bundle | Ensure that all Observation Screening Responses have a category display. : entry.select(resource as Observation) .where(meta.profile.contains('shinny-observation-screening-response') ) .category.coding.where( system.contains('/CodeSystem/observation-category').not() ). all(display.exists()) |
ObservationScreenRes-CodeCode | warning | Bundle | Ensure that all Observation Screening Responses have a code code. : entry.select(resource as Observation) .where(meta.profile.contains('shinny-observation-screening-response')) .code.coding .all(code.exists()) |
ObservationScreenRes-CodeDisplay | warning | Bundle | Ensure that all Observation Screening Responses have a code dispay. : entry.select(resource as Observation) .where(meta.profile.contains('shinny-observation-screening-response')) .code.coding .all(display.exists()) |
ObservationScreenRes-Interpretation | warning | Bundle | Ensure that specific Observation Screening Responses have an interpretation. : entry.select(resource as Observation) .where(meta.profile.contains('shinny-observation-screening-response')) .where(derivedFrom.exists().not()) .all(interpretation.exists()) |
ObservationScreenRes-Langauge | warning | Bundle | Ensure that all Observation Screening Responses have a language. : entry.select(resource as Observation) .where(meta.profile.contains('shinny-observation-screening-response') ) .all(language.exists()) |
Organization-Address | warning | Bundle | Ensure that all Organization resources include all address elements. : entry.select(resource as Organization). address.where(line.count() > 0 and city.trim().length() > 0 and state.trim().length() > 0 and postalCode.trim().length() > 0 and district.trim().length() > 0).count() > 0 |
Organization-Type | warning | Bundle | Ensure that all Organization resources include a value for type. : entry.select(resource as Organization).exists() implies entry.select(resource as Organization).all(type.exists()) |
Referral-ApprovalQuestionnaire | warning | Bundle | Ensure that all Referral Questionnaire bundles have a response to PatientReferralApproval. : entry.select(resource as QuestionnaireResponse).exists() implies entry.select(resource as QuestionnaireResponse).exists ( (QuestionnaireResponse|repeat('Yes'|PatientReferralApproval)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() or (QuestionnaireResponse|repeat('No'|PatientReferralApproval)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() ) |
Referral-HRSNOutreachQuestionnaire | warning | Bundle | Ensure that all approved Referral Questionnaire bundles have a response to HRSNServiceProviderReferralOutreachDate. : entry.select(resource as QuestionnaireResponse).exists() implies entry.select(resource as QuestionnaireResponse).exists ( (QuestionnaireResponse|repeat('Yes'|PatientReferralApproval)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|HRSNServiceProviderReferralOutreachDate)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() ) |
Referral-SCNOutreachQuestionnaire | warning | Bundle | Ensure that all approved Referral Questionnaire bundles have a response to SCNReferralOutreachDate. : entry.select(resource as QuestionnaireResponse).exists() implies entry.select(resource as QuestionnaireResponse).exists ( (QuestionnaireResponse|repeat('Yes'|PatientReferralApproval)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|SCNReferralOutreachDate)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() ) |
SHINNY-Assessment-Encounter | error | Bundle | Assessment-Encounter should exist : entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-assessment')).exists() implies entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-assessment')) .where(encounter.reference.exists().not()) .count()=0 |
SHINNY-Assessment-Patient | error | Bundle | Assessment-Subject should exist : entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-assessment')).exists() implies entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-assessment')) .where(subject.reference.exists().not()) .count()=0 |
SHINNY-Bundle-Encounter-RI | error | Bundle | Checks for RI between all resources & Encounter : entry.select(resource) .where(encounter.exists()) .encounter.select(reference.split('/')[1]).distinct() .intersect( entry.select(resource as Encounter).id ) .count() = entry.select(resource) .where(encounter.exists()) .encounter.select(reference.split('/')[1]).distinct() .count() |
SHINNY-Bundle-Obs-Encounter-RI | error | Bundle | Checks for RI between Screening Obs & Encounter : entry.select(resource as Observation) .exists(encounter.reference.exists() and meta.profile.contains('shinny-observation-screening-response')) implies entry.select(resource as Observation) .where(encounter.reference.exists() and meta.profile.contains('shinny-observation-screening-response')) .select(encounter.reference.split('/')[1]).distinct() = entry.select(resource as Encounter).id |
SHINNY-Bundle-Obs-Patient-RI | error | Bundle | Checks for RI between Obs & Patient : entry.select(resource as Observation) .where(encounter.reference.exists() and meta.profile.contains('shinny-observation')).count()>1 implies entry.select(resource as Observation) .where(encounter.reference.exists() and meta.profile.contains('shinny-observation')) .encounter.reference.distinct() .contains(entry.select(resource as Encounter).id) |
SHINNY-Bundle-Obs-derivedFrom-RI | error | Bundle | Checks for RI between Observation & child Observation : entry.select(resource as Observation) .where(derivedFrom.exists() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or meta.where(profile.lower().contains('sdohcc-observation')))) .derivedFrom.select(reference.split('/')[1]) .intersect( entry.select(resource as Observation).where(derivedFrom.empty() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or meta.where(profile.lower().contains('sdohcc-observation')))).id) .count() = entry.select(resource as Observation) .where(derivedFrom.exists() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or $this.meta.where(profile.lower().contains('sdohcc-observationscreeningresponse')))) .derivedFrom.reference .count() |
SHINNY-Bundle-Obs-hasMember-RI | error | Bundle | Checks for RI between Observation & child Observations : entry.select(resource as Observation) .where(hasMember.exists() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or meta.where(profile.lower().contains('sdohcc-observation')))) .hasMember.select(reference.split('/')[1]) .intersect( entry.select(resource as Observation).where(hasMember.empty() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or meta.where(profile.lower().contains('sdohcc-observation')))).id) .count() = entry.select(resource as Observation) .where(hasMember.exists() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or $this.meta.where(profile.lower().contains('sdohcc-observationscreeningresponse')))) .hasMember.reference .count() and (entry.select(resource as Observation) .where(hasMember.exists() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or meta.where(profile.lower().contains('sdohcc-observation')))).exists() implies entry.select(resource as Observation) .where(hasMember.exists() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or meta.where(profile.lower().contains('sdohcc-observation')))) .hasMember.select(reference.split('/')[1]) .intersect( entry.select(resource as Observation).where(hasMember.empty() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or meta.where(profile.lower().contains('sdohcc-observationscreeningresponse')))).id) .count() = entry.select(resource as Observation).where(hasMember.empty() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or meta.where(profile.lower().contains('sdohcc-observationscreeningresponse')))).count()) |
SHINNY-Bundle-Patient-Org-RI | error | Bundle | Checks for RI between Patient & Assigning Org : entry.select(resource as Organization).id contains entry.select(resource as Patient) .identifier.where(type.coding.code='MR') .assigner.reference.split('/')[1] |
SHINNY-Bundle-Required | error | Bundle | Every submitted resource should be part of a bundle. : select($this as Bundle).exists() |
SHINNY-Bundle-Required-Resources | error | Bundle | Every bundle should always have one and only one 'Patient' & 'Encounter' and atleast one Org : entry.select(resource as Patient).count() = 1 and entry.select(resource as Encounter).count() > 0 and entry.select(resource as Organization).count() > 0 |
SHINNY-Bundle-screening-consent | error | Bundle | Ensures all bundles with a screening included also includes the consent profile. : ( (select($this as Bundle).where(meta.profile.upper() != 'http://test.shinny.org/us/ny/hrsn/StructureDefinition/SHINNYBundleProfile'.upper()).count() > 0) and ( entry.select(resource as Observation) .where(meta.profile.contains('shinny-observation-screening')).count() > 0 ) ) implies entry.select(resource as Consent).exists() |
SHINNY-Consent-Category | warning | Bundle | Patient Consent category code is 59284-0 : entry.select(resource as Consent).exists() implies entry.select(resource as Consent).category.coding.where(code='59284-0').exists() |
SHINNY-Encounter-Class | warning | Bundle | Ensure that the Encounter resource has a class code; Ensure that the Encounter resource has a class code system : entry.select(resource as Encounter).class .all(code.exists() and system.exists()) |
SHINNY-Encounter-Type | warning | Bundle | Ensure that the Encounter resource has a status code : entry.select(resource as Encounter).type.coding .all(code.exists() and system.exists()) |
SHINNY-Obs-Category | error | Bundle | Ensure that all Observation categories have an SDOH code : entry.select(resource as Observation) .where(meta.profile.contains('shinny-observation-screening-response')) .all(category.coding.system .exists($this.contains('SDOHCC-CodeSystemTemporaryCodes'))) |
SHINNY-Obs-Code | warning | Bundle | Ensure that all Observation resources have screening code; Ensure that all Observation resources have screening code system : entry.select(resource as Observation).where( code.coding.system.exists().not() or code.coding.code.not().exists().not()) .count() = 0 |
SHINNY-Obs-Encounter | warning | Bundle | SDOH Observations should have an Encounter : entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-screening-response')) .all(encounter.reference.exists()) |
SHINNY-Obs-Patient | warning | Bundle | SDOH Observations should have a Patient : entry.select(resource as Observation).where(meta.profile.contains('shinny-observation')) .all(subject.reference.exists()) |
SHINNY-Patient-Address | warning | Bundle | All elements of address should be present : entry.select(resource as Patient). address.where(line.count() > 0 and city.trim().length() > 0 and state.trim().length() > 0 and postalCode.trim().length() > 0 and district.trim().length() > 0).count() > 0 |
SHINNY-Patient-Communication | warning | Bundle | Communication should exist : entry.select(resource as Patient).communication.exists() |
SHINNY-Patient-DOB | error | Bundle | birthDate should be a valid date : entry.select(resource as Patient).birthDate.trim().length() = 10 and entry.select(resource as Patient).birthDate.trim().split('-').count() = 3 |
SHINNY-Patient-Gender | error | Bundle | Gender should be present : entry.select(resource as Patient).where(gender.exists() and gender.trim().length()).count() > 0 |
SHINNY-Patient-GenderId | warning | Bundle | Gender Id should be present : entry.select(resource as Patient).extension.where(url='http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex').count() > 0 |
SHINNY-Patient-MA | error | Bundle | Every bundle should always have only 1 Medicaid CIN (i.e MA) Object within patient.identifier AND the CIN is always in the format of 2 letters, 5 numbers, and 1 letter, e.g., 'AB12345C' : entry.select(resource as Patient).identifier.where(type.coding.code='MA' and value.trim().length() > 0).count() = 1 and entry.select(resource as Patient).identifier.where( value.trim().length() = 8 and type.coding.code='MA' and value.substring(0,1).matches('^[a-zA-Z]+$') and value.substring(1,1).matches('^[a-zA-Z]+$') and value.substring(2,1).matches('^[0-9]*$') and value.substring(3,1).matches('^[0-9]*$') and value.substring(4,1).matches('^[0-9]*$') and value.substring(5,1).matches('^[0-9]*$') and value.substring(6,1).matches('^[0-9]*$') and value.substring(7,1).matches('^[a-zA-Z]+$') ).exists() |
SHINNY-Patient-MRN | error | Bundle | Every bundle should always have only 1 MR (i.e MRN) Object within patient.identifier, system.contains('facility') and value (MRN) is provided : entry.select(resource as Patient).identifier.where(type.coding.code='MR' and value.trim().length() > 0).count() = 1 |
SHINNY-Patient-MiddleName | warning | Bundle | MiddleName should be present : entry.select(resource as Patient).name .extension.where(url.contains('middle-name')) .value.trim().length()>0 |
SHINNY-Patient-Pronouns | warning | Bundle | Pronouns should be present : entry.select(resource as Patient).extension.where(url='http://test.shinny.org/us/ny/hrsn/ValueSet/SHINNYPersonalPronounsVS').exists() implies entry.select(resource as Patient).extension.where(url='http://test.shinny.org/us/ny/hrsn/ValueSet/SHINNYPersonalPronounsVS' and value.select($this as CodeableConcept).coding.code.exists()).exists() |
SHINNY-Patient-Race-Ethnicity | warning | Bundle | Race & Ethnicity should be present : entry.select(resource as Patient).extension.where(url='http://hl7.org/fhir/us/core/StructureDefinition/us-core-race').extension.where(url='ombCategory' and value.system = 'http://terminology.hl7.org/CodeSystem/v3-NullFlavor').exists().not() implies entry.select(resource as Patient). extension.where(url='http://hl7.org/fhir/us/core/StructureDefinition/us-core-race').exists() and entry.select(resource as Patient). extension.where(url='http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity').exists() |
SHINNY-Patient-SSN | warning | Bundle | Every bundle should always have only 1 SSN (i.e SS) Object within patient.identifier : entry.select(resource as Patient).identifier.where(type.coding.code='SS' and value.trim().length() > 0).count() <= 1 |
SHINNY-Resources-Profile-Check | error | Bundle | SHINNY-Resources-Profile-Check : select($this as Bundle).where(meta.profile.upper() != 'http://test.shinny.org/us/ny/hrsn/StructureDefinition/SHINNYBundleProfile'.upper()).count() = 0 and ( entry.select(resource as Patient).exists() implies entry.select(resource as Patient).where(meta.profile.upper() != 'http://test.shinny.org/us/ny/hrsn/StructureDefinition/shinny-patient'.upper()).count() = 0 ) and ( entry.select(resource as Encounter).exists() implies entry.select(resource as Encounter).where(meta.profile.upper() != 'http://test.shinny.org/us/ny/hrsn/StructureDefinition/shinny-encounter'.upper()).count() = 0 ) and ( entry.select(resource as Observation).exists() implies entry.select(resource as Observation).meta.where(profile.upper().startsWith('http://test.shinny.org/us/ny/hrsn/StructureDefinition/shinny-observation'.upper()).not()).count() = 0 ) and ( entry.select(resource as ServiceRequest).exists() implies entry.select(resource as ServiceRequest).where(meta.profile.upper() != 'http://test.shinny.org/us/ny/hrsn/StructureDefinition/SHINNYSDOHServiceRequest'.upper()).count() = 0 ) and ( entry.select(resource as Task).exists() implies entry.select(resource as Task).where(meta.profile.upper() != 'http://test.shinny.org/us/ny/hrsn/StructureDefinition/SHINNYSDOHTaskForReferralManagement'.upper()).count() = 0 ) and ( entry.select(resource as Consent).exists() implies entry.select(resource as Consent).where(meta.profile.upper() != 'http://test.shinny.org/us/ny/hrsn/StructureDefinition/shinny-Consent'.upper()).count() = 0 ) .allTrue() |
SHINNY-Screening-Consent | error | Bundle | All screening bundles must include a consent : entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-screening-response')).exists() implies entry.select(resource as Consent).exists() |
SHINNY-Screening-Patient | error | Bundle | SDOH Screening Observations should have an Patient : entry.select(resource as Observation) .where(meta.profile.contains('shinny-observation-screening') and hasMember.exists()) .all(subject.reference.exists()) |
SHINNYServiceRequestSDOHCategory | error | Bundle | Ensure that all Service Request categories have an SDOH code : entry.select(resource as ServiceRequest) .where(meta.profile.contains('SHINNYSDOHServiceRequest')) .all(category.coding.system .exists($this.contains('SDOHCC-CodeSystemTemporaryCodes'))) |
Screening-Crosswalk-44255-8 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 44255-8 then answer codes must be one of the following: LA6568-5 LA6569-3 LA6570-1 LA6571-9 : entry.select(resource as Observation).where(code.coding.code contains '44255-8').exists() implies entry.select(resource as Observation).where(code.coding.code contains '44255-8').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '44255-8') .value.select($this as CodeableConcept).coding .where(code='LA6568-5' or code='LA6569-3' or code='LA6570-1' or code='LA6571-9').exists() |
Screening-Crosswalk-44250-9 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 44250-9 then answer codes must be one of the following: LA6568-5 LA6569-3 LA6570-1 LA6571-9 : entry.select(resource as Observation).where(code.coding.code contains '44250-9').exists() implies entry.select(resource as Observation).where(code.coding.code contains '44250-9').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '44250-9') .value.select($this as CodeableConcept).coding .where(code='LA6568-5' or code='LA6569-3' or code='LA6570-1' or code='LA6571-9').exists() |
Screening-Crosswalk-68517-2 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 68517-2 then answer codes must be one of the following: LA6270-8 LA26460-8 LA18876-5 LA18891-4 LA18934-2 : entry.select(resource as Observation).where(code.coding.code contains '68517-2').exists() implies entry.select(resource as Observation).where(code.coding.code contains '68517-2').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '68517-2') .value.select($this as CodeableConcept).coding .where(code='LA6270-8' or code='LA26460-8' or code='LA18876-5' or code='LA18891-4' or code='LA18934-2').exists() |
Screening-Crosswalk-68516-4 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 68516-4 then answer codes must be one of the following: LA6111-4 LA13942-0 LA19282-5 LA28855-7 LA28858-1 LA28854-0 LA28853-2 LA28891-2 LA32059-0 LA32060-8 : entry.select(resource as Observation).where(code.coding.code contains '68516-4').exists() implies entry.select(resource as Observation).where(code.coding.code contains '68516-4').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '68516-4') .value.select($this as CodeableConcept).coding .where(code='LA6111-4' or code='LA13942-0' or code='LA19282-5' or code='LA28855-7' or code='LA28858-1' or code='LA28854-0' or code='LA28853-2' or code='LA28891-2' or code='LA32059-0' or code='LA32060-8').exists() |
Screening-Crosswalk-68524-8 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 68524-8 then answer codes must be one of the following: LA6270-8 LA26460-8 LA18876-5 LA18891-4 LA18934-2 : entry.select(resource as Observation).where(code.coding.code contains '68524-8').exists() implies entry.select(resource as Observation).where(code.coding.code contains '68524-8').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '68524-8') .value.select($this as CodeableConcept).coding .where(code='LA6270-8' or code='LA26460-8' or code='LA18876-5' or code='LA18891-4' or code='LA18934-2').exists() |
Screening-Crosswalk-69858-9 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 69858-9 then answer codes must be one of the following: LA33-6 LA32-8 : entry.select(resource as Observation).where(code.coding.code contains '69858-9').exists() implies entry.select(resource as Observation).where(code.coding.code contains '69858-9').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '69858-9') .value.select($this as CodeableConcept).coding .where(code='LA33-6' or code='LA32-8').exists() |
Screening-Crosswalk-69861-3 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 69861-3 then answer codes must be one of the following: LA33-6 LA32-8 : entry.select(resource as Observation).where(code.coding.code contains '69861-3').exists() implies entry.select(resource as Observation).where(code.coding.code contains '69861-3').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '69861-3') .value.select($this as CodeableConcept).coding .where(code='LA33-6' or code='LA32-8').exists() |
Screening-Crosswalk-71802-3 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 71802-3 then answer codes must be one of the following: LA31993-1, LA31994-9, LA31995-6 : entry.select(resource as Observation).where(code.coding.code contains '71802-3').exists() implies entry.select(resource as Observation).where(code.coding.code contains '71802-3').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '71802-3') .value.select($this as CodeableConcept).coding .where(code='LA31993-1' or code='LA31994-9' or code='LA31995-6').exists() |
Screening-Crosswalk-76513-1 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 76513-1 then answer codes must be one of the following: LA15832-1 LA22683-9 LA31980-8 : entry.select(resource as Observation).where(code.coding.code contains '76513-1').exists() implies entry.select(resource as Observation).where(code.coding.code contains '76513-1').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '76513-1') .value.select($this as CodeableConcept).coding .where(code='LA15832-1' or code='LA22683-9' or code='LA31980-8').exists() |
Screening-Crosswalk-88123-5 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 88123-5 then answer codes must be one of the following: LA28397-0 LA6729-3 LA28398-8 : entry.select(resource as Observation).where(code.coding.code contains '88123-5').exists() implies entry.select(resource as Observation).where(code.coding.code contains '88123-5').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '88123-5') .value.select($this as CodeableConcept).coding .where(code='LA28397-0' or code='LA6729-3' or code='LA28398-8').exists() |
Screening-Crosswalk-88122-7 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 88122-7 then answer codes must be one of the following: LA28397-0 LA6729-3 LA28398-8 : entry.select(resource as Observation).where(code.coding.code contains '88122-7').exists() implies entry.select(resource as Observation).where(code.coding.code contains '88122-7').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '88122-7') .value.select($this as CodeableConcept).coding .where(code='LA28397-0' or code='LA6729-3' or code='LA28398-8').exists() |
Screening-Crosswalk-89555-7 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 89555-7 then answer codes must be one of the following: LA6111-4 LA6112-2 LA6113-0 LA6114-8 LA6115-5 LA10137-0 LA10138-8 LA10139-6 : entry.select(resource as Observation).where(code.coding.code contains '89555-7').exists() implies entry.select(resource as Observation).where(code.coding.code contains '89555-7').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '89555-7') .value.select($this as CodeableConcept).coding .where(code='LA6111-4' or code='LA6112-2' or code='LA6113-0' or code='LA6114-8' or code='LA6115-5' or code='LA10137-0' or code='LA10138-8' or code='LA10139-6').exists() |
Screening-Crosswalk-93030-5 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 93030-5 then answer codes must be one of the following: LA33-6 LA32-8 : entry.select(resource as Observation).where(code.coding.code contains '93030-5').exists() implies entry.select(resource as Observation).where(code.coding.code contains '93030-5').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '93030-5') .value.select($this as CodeableConcept).coding .where(code='LA33-6' or code='LA32-8').exists() |
Screening-Crosswalk-93038-8 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 93038-8 then answer codes must be one of the following: LA6568-5 LA13863-8 LA13909-9 LA13902-4 LA13914-9 LA30122-8 : entry.select(resource as Observation).where(code.coding.code contains '93038-8').exists() implies entry.select(resource as Observation).where(code.coding.code contains '93038-8').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '93038-8') .value.select($this as CodeableConcept).coding .where(code='LA6568-5' or code='LA13863-8' or code='LA13909-9' or code='LA13902-4' or code='LA13914-9' or code='LA30122-8').exists() |
Screening-Crosswalk-93159-2 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 93159-2 then answer codes must be one of the following: LA6270-8 LA10066-1 LA10082-8 LA10044-8 LA9933-8 : entry.select(resource as Observation).where(code.coding.code contains '93159-2').exists() implies entry.select(resource as Observation).where(code.coding.code contains '93159-2').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '93159-2') .value.select($this as CodeableConcept).coding .where(code='LA6270-8' or code='LA10066-1' or code='LA10082-8' or code='LA10044-8' or code='LA9933-8').exists() |
Screening-Crosswalk-95530-2 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 95530-2 then answer codes must be one of the following: LA6270-8 LA26460-8 LA18876-5 LA18891-4 LA18934-2 : entry.select(resource as Observation).where(code.coding.code contains '95530-2').exists() implies entry.select(resource as Observation).where(code.coding.code contains '95530-2').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '95530-2') .value.select($this as CodeableConcept).coding .where(code='LA6270-8' or code='LA26460-8' or code='LA18876-5' or code='LA18891-4' or code='LA18934-2').exists() |
Screening-Crosswalk-95615-1 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 95615-1 then answer codes must be one of the following: LA6270-8 LA10066-1 LA10082-8 LA16644-9 LA6482-9 : entry.select(resource as Observation).where(code.coding.code contains '95615-1').exists() implies entry.select(resource as Observation).where(code.coding.code contains '95615-1').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '95615-1') .value.select($this as CodeableConcept).coding .where(code='LA6270-8' or code='LA10066-1' or code='LA10082-8' or code='LA16644-9' or code='LA6482-9').exists() |
Screening-Crosswalk-95618-5 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 95618-5 then answer codes must be one of the following: LA6270-8 LA10066-1 LA10082-8 LA16644-9 LA6482-9 : entry.select(resource as Observation).where(code.coding.code contains '95618-5').exists() implies entry.select(resource as Observation).where(code.coding.code contains '95618-5').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '95618-5') .value.select($this as CodeableConcept).coding .where(code='LA6270-8' or code='LA10066-1' or code='LA10082-8' or code='LA16644-9' or code='LA6482-9').exists() |
Screening-Crosswalk-95617-7 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 95617-7 then answer codes must be one of the following: LA6270-8 LA10066-1 LA10082-8 LA16644-9 LA6482-9 : entry.select(resource as Observation).where(code.coding.code contains '95617-7').exists() implies entry.select(resource as Observation).where(code.coding.code contains '95617-7').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '95617-7') .value.select($this as CodeableConcept).coding .where(code='LA6270-8' or code='LA10066-1' or code='LA10082-8' or code='LA16644-9' or code='LA6482-9').exists() |
Screening-Crosswalk-95616-9 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 95616-9 then answer codes must be one of the following: LA6270-8 LA10066-1 LA10082-8 LA16644-9 LA6482-9 : entry.select(resource as Observation).where(code.coding.code contains '95616-9').exists() implies entry.select(resource as Observation).where(code.coding.code contains '95616-9').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '95616-9') .value.select($this as CodeableConcept).coding .where(code='LA6270-8' or code='LA10066-1' or code='LA10082-8' or code='LA16644-9' or code='LA6482-9').exists() |
Screening-Crosswalk-96779-4 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 96779-4 then answer codes must be one of the following: LA33-6 LA32-8 LA32002-0 : entry.select(resource as Observation).where(code.coding.code contains '96779-4').exists() implies entry.select(resource as Observation).where(code.coding.code contains '96779-4').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '96779-4') .value.select($this as CodeableConcept).coding .where(code='LA33-6' or code='LA32-8' or code='LA32002-0').exists() |
Screening-Crosswalk-96778-6 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 96778-6 then answer codes must be one of the following: LA31996-4 LA28580-1 LA31997-2 LA31998-0 LA31999-8 LA32000-4 LA32001-2 LA9-3 : entry.select(resource as Observation).where(code.coding.code contains '96778-6').exists() implies entry.select(resource as Observation).where(code.coding.code contains '96778-6').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '96778-6') .value.select($this as CodeableConcept).coding .where(code='LA31996-4' or code='LA28580-1' or code='LA31997-2' or code='LA31998-0' or code='LA31999-8' or code='LA32000-4' or code='LA32001-2' or code='LA9-3').exists() |
Screening-Crosswalk-96781-0 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 96781-0 then answer codes must be one of the following: LA31976-6 LA31977-4 LA31978-2 LA31979-0 : entry.select(resource as Observation).where(code.coding.code contains '96781-0').exists() implies entry.select(resource as Observation).where(code.coding.code contains '96781-0').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '96781-0') .value.select($this as CodeableConcept).coding .where(code='LA31976-6' or code='LA31977-4' or code='LA31978-2' or code='LA31978-2').exists() |
Screening-Crosswalk-96780-2 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 96780-2 then answer codes must be one of the following: LA31981-6 LA31982-4 LA31983-2 : entry.select(resource as Observation).where(code.coding.code contains '96780-2').exists() implies entry.select(resource as Observation).where(code.coding.code contains '96780-2').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '96780-2') .value.select($this as CodeableConcept).coding .where(code='LA31981-6' or code='LA31982-4' or code='LA31983-2').exists() |
Screening-Crosswalk-96782-8 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 96782-8 then answer codes must be one of the following: LA33-6 LA32-8 : entry.select(resource as Observation).where(code.coding.code contains '96782-8').exists() implies entry.select(resource as Observation).where(code.coding.code contains '96782-8').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '96782-8') .value.select($this as CodeableConcept).coding .where(code='LA33-6' or code='LA32-8').exists() |
Screening-Crosswalk-96842-0 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 96842-0 then answer codes must be one of the following: LA6270-8 LA26460-8 LA18876-5 LA18891-4 LA18934-2 : entry.select(resource as Observation).where(code.coding.code contains '96842-0').exists() implies entry.select(resource as Observation).where(code.coding.code contains '96842-0').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '96842-0') .value.select($this as CodeableConcept).coding .where(code='LA6270-8' or code='LA26460-8' or code='LA18876-5' or code='LA18891-4' or code='LA18934-2').exists() |
Screening-Crosswalk-97027-7 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 97027-7 then answer codes must be one of the following: LA33-6 LA32-8 : entry.select(resource as Observation).where(code.coding.code contains '97027-7').exists() implies entry.select(resource as Observation).where(code.coding.code contains '97027-7').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '97027-7') .value.select($this as CodeableConcept).coding .where(code='LA33-6' or code='LA32-8').exists() |
ServiceRequest-AuthoredOn | warning | Bundle | Ensure that all Service Requests have a authored on date. : entry.select(resource as ServiceRequest).exists() implies entry.select(resource as ServiceRequest).all(authoredOn.exists()) |
ServiceRequest-CategoryCode | warning | Bundle | Ensure that all Service Requests have a category code. : entry.select(resource as ServiceRequest).exists() implies entry.select(resource as ServiceRequest).( all(category.exists()) and category.all(coding.exists()) and category.coding.all(code.exists()) ) |
ServiceRequest-OccurrencePeriod | warning | Bundle | Ensure that all Service Requests have an occurrence period start and end, or occurrence datetime. : entry.select(resource as ServiceRequest).exists() implies entry.select(resource as ServiceRequest).count() = ( entry.select(resource as ServiceRequest).where(occurrence is Period).select(occurrence) .where(start and end).count() + entry.select(resource as ServiceRequest).where(occurrence is dateTime).count() ) |
ServiceRequest-Quantity | warning | Bundle | Ensure that all Service Requests have a quantity. : entry.select(resource as ServiceRequest).exists() implies entry.select(resource as ServiceRequest) .all(quantity.value.exists()) |
Task-EndPeriod | warning | Bundle | Ensure that all completed Tasks have an end execution period. : entry.select(resource as Task).where(status = 'completed').exists() implies entry.select(resource as Task).where(status = 'completed').all(executionPeriod.end.exists()) |
Task-Repetitions | warning | Bundle | Ensure that all Tasks have a value for repetitions. : entry.select(resource as Task).exists() implies entry.select(resource as Task).all(restriction.repetitions.exists()) |
Task-StartPeriod | warning | Bundle | Ensure that all Tasks have a starting execution period. : entry.select(resource as Task).exists() implies entry.select(resource as Task).all(executionPeriod.start.exists()) |
Task-StatusReason | error | Bundle | Ensure that all tasks exists, have a statusReason If the Task.status is rejected, cancelled, completed, or failed. : entry.select(resource as Task).where(status = 'rejected' or status = 'cancelled' or status = 'completed' or status = 'failed').exists() implies entry.select(resource as Task).where(status = 'rejected' or status = 'cancelled' or status = 'completed' or status = 'failed') .all(statusReason.text.exists()) |
bdl-1 | error | Bundle | total only when a search or history : total.empty() or (type = 'searchset') or (type = 'history') |
bdl-2 | error | Bundle | entry.search only when a search : entry.search.empty() or (type = 'searchset') |
bdl-3 | error | Bundle | entry.request mandatory for batch/transaction/history, otherwise prohibited : entry.all(request.exists() = (%resource.type = 'batch' or %resource.type = 'transaction' or %resource.type = 'history')) |
bdl-4 | error | Bundle | entry.response mandatory for batch-response/transaction-response/history, otherwise prohibited : entry.all(response.exists() = (%resource.type = 'batch-response' or %resource.type = 'transaction-response' or %resource.type = 'history')) |
bdl-5 | error | Bundle.entry | must be a resource unless there's a request or response : resource.exists() or request.exists() or response.exists() |
bdl-7 | error | Bundle | FullUrl must be unique in a bundle, or else entries with the same fullUrl must have different meta.versionId (except in history bundles) : (type = 'history') or entry.where(fullUrl.exists()).select(fullUrl&resource.meta.versionId).isDistinct() |
bdl-8 | error | Bundle.entry | fullUrl cannot be a version specific reference : fullUrl.contains('/_history/').not() |
bdl-9 | error | Bundle | A document must have an identifier with a system and a value : type = 'document' implies (identifier.system.exists() and identifier.value.exists()) |
bdl-10 | error | Bundle | A document must have a date : type = 'document' implies (timestamp.hasValue()) |
bdl-11 | error | Bundle | A document must have a Composition as the first resource : type = 'document' implies entry.first().resource.is(Composition) |
bdl-12 | error | Bundle | A message must have a MessageHeader as the first resource : type = 'message' implies entry.first().resource.is(MessageHeader) |
ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children : hasValue() or (children().count() > id.count()) |
ext-1 | error | **ALL** extensions | Must have either extensions or value[x], not both : extension.exists() != value.exists() |
shinny-sexual-orientation | warning | Bundle | If there is no component or hasMember element then either a value[x] or a data absent reason must be present : entry.select(resource as Observation).where(meta.profile.contains('shin-ny-observation-sexual-orientation')).exists() implies entry.select(resource as Observation).where(meta.profile.contains('shin-ny-observation-sexual-orientation')) .where(value.exists() or dataAbsentReason.exists()) .count()=1 |

This structure is derived from Bundle

Summary

Mandatory: 2 elements
Must-Support: 2 elements

Structures

This structure refers to these other structures:

- SHINNYMeta (http://test.shinny.org/us/ny/hrsn/StructureDefinition/SHINNYMeta)

Key Elements View

Name | Flags | Card. | Type | Description & Constraints Filter: Bindings Constraints Obligations
--- | --- | --- | --- | ---
Bundle | C | 0..* | Bundle | Contains a collection of resources Constraints: bdl-1, bdl-2, bdl-3, bdl-4, bdl-7, bdl-9, bdl-10, bdl-11, bdl-12, SHINNY-Patient-MRN, SHINNY-Patient-MA, SHINNY-Patient-SSN, SHINNY-Patient-Address, SHINNY-Patient-DOB, SHINNY-Patient-Gender, SHINNY-Patient-GenderId, SHINNY-Patient-Race-Ethnicity, SHINNY-Patient-Communication, SHINNY-Patient-MiddleName, SHINNY-Patient-Pronouns, shinny-sexual-orientation, SHINNY-Bundle-Obs-hasMember-RI, SHINNY-Encounter-Class, SHINNY-Encounter-Type, Encounter-PeriodStart, Encounter-PeriodEnd, SHINNY-Obs-Encounter, SHINNY-Obs-Patient, SHINNY-Obs-Code, SHINNY-Obs-Category, SHINNY-Screening-Patient, ObservationScreenRes-Langauge, ObservationScreenRes-CategoryDisplay, ObservationScreenRes-CodeCode, ObservationScreenRes-CodeDisplay, ObservationScreenRes-Interpretation, SHINNY-Screening-Consent, Assessment-ConditionID, Assessment-ConditionSNOMED, Assessment-ConditionICD10, Assessment-ApprovalQuestionnaire, Assessment-OutreachQuestionnaire, Assessment-AdminQuestionnaire, Assessment-ServiceDupQuestionnaire, SHINNY-Assessment-Encounter, SHINNY-Assessment-Patient, ServiceRequest-Quantity, ServiceRequest-CategoryCode, ServiceRequest-OccurrencePeriod, ServiceRequest-AuthoredOn, SHINNYServiceRequestSDOHCategory, Task-StatusReason, Task-Repetitions, Task-EndPeriod, Task-StartPeriod, Referral-ApprovalQuestionnaire, Referral-HRSNOutreachQuestionnaire, Referral-SCNOutreachQuestionnaire, SHINNY-Bundle-Required-Resources, SHINNY-Bundle-Required, SHINNY-Bundle-Patient-Org-RI, SHINNY-Bundle-Encounter-RI, SHINNY-Bundle-Obs-derivedFrom-RI, SHINNY-Bundle-Obs-Patient-RI, SHINNY-Bundle-Obs-Encounter-RI, Screening-Crosswalk-44250-9, Screening-Crosswalk-44255-8, Screening-Crosswalk-68516-4, Screening-Crosswalk-68517-2, Screening-Crosswalk-68524-8, Screening-Crosswalk-69858-9, Screening-Crosswalk-69861-3, Screening-Crosswalk-71802-3, Screening-Crosswalk-76513-1, Screening-Crosswalk-88122-7, Screening-Crosswalk-88123-5, Screening-Crosswalk-89555-7, Screening-Crosswalk-93030-5, Screening-Crosswalk-93038-8, Screening-Crosswalk-93159-2, Screening-Crosswalk-95530-2, Screening-Crosswalk-95615-1, Screening-Crosswalk-95616-9, Screening-Crosswalk-95617-7, Screening-Crosswalk-95618-5, Screening-Crosswalk-96778-6, Screening-Crosswalk-96779-4, Screening-Crosswalk-96780-2, Screening-Crosswalk-96781-0, Screening-Crosswalk-96782-8, Screening-Crosswalk-96842-0, Screening-Crosswalk-97027-7, SHINNY-Consent-Category, Consent-ProvisionType, SHINNY-Bundle-screening-consent, Goal-StatusDate, Goal-AchievementStatus, Location-Address, Location-Type, Organization-Address, Organization-Type, SHINNY-Resources-Profile-Check
id | S Σ | 1..1 | id | Logical id of this artifact
meta | S Σ | 1..1 | SHINNYMeta | Metadata about the resource
implicitRules | ?!Σ | 0..1 | uri | A set of rules under which this content was created
language |  | 0..1 | code | Language of the resource content Binding: SHINNYLanguageVS (preferred)
type | Σ | 1..1 | code | document | message | transaction | transaction-response | batch | batch-response | history | searchset | collection Binding: BundleType (required): Indicates the purpose of a bundle - how it is intended to be used.
Documentation for this format

#### Terminology Bindings

Path | Conformance | ValueSet | URI
Bundle.language | preferred | SHINNYLanguageVS `http://test.shinny.org/us/ny/hrsn/ValueSet/SHINNYLanguageVS` From this IG
Bundle.type | required | BundleType `http://hl7.org/fhir/ValueSet/bundle-type|4.0.1` From the FHIR Standard

#### Constraints

Id | Grade | Path(s) | Details | Requirements
Assessment-AdminQuestionnaire | warning | Bundle | Ensure that all Assessment Questionnaire bundles have a response to the service duplication indicators. : entry.select(resource as QuestionnaireResponse).exists() implies entry.select(resource as QuestionnaireResponse).exists ( (QuestionnaireResponse|repeat('Yes'|PatientAssessmentApproval)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|EnhancedPopulationCheck)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|ServiceDuplicationCheck)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|ClinicalCriteriaCheck)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() ) |
Assessment-ApprovalQuestionnaire | warning | Bundle | Ensure that all Assessment Questionnaire bundles have a response to PatientAssessmentApproval. : entry.select(resource as QuestionnaireResponse).exists() implies entry.select(resource as QuestionnaireResponse).exists ( (QuestionnaireResponse|repeat('Yes'|PatientAssessmentApproval)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() or (QuestionnaireResponse|repeat('No'|PatientAssessmentApproval)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() ) |
Assessment-ConditionICD10 | warning | Bundle | Ensure that all final assessments have a Condition ICD-10 term. : entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-assessment') and status='final').exists() implies entry.select(resource as Condition).count() = entry.select(resource as Condition).select(code.coding) .where(system.contains('http://hl7.org/fhir/sid/icd-10-cm')) .count() and entry.select(resource as Condition).count() !=0 |
Assessment-ConditionID | warning | Bundle | Ensure that all final assessments have a Condition identifier. : entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-assessment') and status = 'final').exists() implies entry.select(resource as Observation) .where( meta.profile.contains('shinny-observation-assessment') and status = 'final' ).count() = entry.select(resource as Condition).id.count() |
Assessment-ConditionSNOMED | warning | Bundle | Ensure that all final assessments have a Condition category SNOMED term. : entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-assessment') and status='final').exists() implies entry.select(resource as Condition).count() = entry.select(resource as Condition).select(code.coding) .where(system.contains('http://snomed.info/sct')) .count() and entry.select(resource as Condition).count() !=0 |
Assessment-OutreachQuestionnaire | warning | Bundle | Ensure that all Assessment Questionnaire bundles with patient approval contain a Patient Assessment Outreach Date and a Patient Assessment Status. : entry.select(resource as QuestionnaireResponse).exists() implies entry.select(resource as QuestionnaireResponse).exists ( (QuestionnaireResponse|repeat('Yes'|PatientAssessmentApproval)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|PatientAssessmentOutreachDate)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|PatientAssessmentOutreachStatus)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() ) |
Assessment-ServiceDupQuestionnaire | warning | Bundle | Ensure that all Assessment Questionnaire bundles have a response to the service duplication indicators. : entry.select(resource as QuestionnaireResponse).exists() implies entry.select(resource as QuestionnaireResponse).exists ( (QuestionnaireResponse|repeat('Yes'|PatientAssessmentApproval)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|CurrentHousingProgramRecipientIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|CurrentNutritionalEducationProgramRecipientIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|CurrentNutritionalServicesProgramRecipientIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|CurrentFoodServiceProgramRecipientIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|CurrentSNAPProgramRecipientIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|CurrentWICProgramRecipientIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|CurrentTANFProgramRecipientIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|CurrentTransportationProgramRecipientIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|MedicationRequiringRefrigerationIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|BreastMilkRequiringRefrigerationIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|ADLs/IADLsIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|MedicalRespiteRequirementsIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|ChildcareAssistanceIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() ) |
Consent-ProvisionType | warning | Bundle | Ensure that all Consents include a value for provision type. : entry.select(resource as Consent) .all(provision.type.exists()) |
Encounter-PeriodEnd | warning | Bundle | Ensure that all finished Encounters include a value for period.end. : entry.select(resource as Encounter) .where(status.contains('finished')) .all(period.end.exists()) |
Encounter-PeriodStart | warning | Bundle | Ensure that all Encounters include a value for period.start. : entry.select(resource as Encounter) .all(period.start.exists()) |
Goal-AchievementStatus | warning | Bundle | Ensure that all Goals include a value for achivementStatus. : entry.select(resource as Goal).exists() implies entry.select(resource as Goal).all(achievementStatus.exists()) |
Goal-StatusDate | warning | Bundle | Ensure that all Goals include a value for statusDate. : entry.select(resource as Goal).exists() implies entry.select(resource as Goal).all(statusDate.exists()) |
Location-Address | warning | Bundle | Ensure that all Location resources include all address elements. : entry.select(resource as Location). address.where(line.count() > 0 and city.trim().length() > 0 and state.trim().length() > 0 and postalCode.trim().length() > 0 and district.trim().length() > 0).count() > 0 |
Location-Type | warning | Bundle | Ensure that all Location resources include a value for type. : entry.select(resource as Location).exists() implies entry.select(resource as Location).all(type.exists()) |
ObservationScreenRes-CategoryDisplay | warning | Bundle | Ensure that all Observation Screening Responses have a category display. : entry.select(resource as Observation) .where(meta.profile.contains('shinny-observation-screening-response') ) .category.coding.where( system.contains('/CodeSystem/observation-category').not() ). all(display.exists()) |
ObservationScreenRes-CodeCode | warning | Bundle | Ensure that all Observation Screening Responses have a code code. : entry.select(resource as Observation) .where(meta.profile.contains('shinny-observation-screening-response')) .code.coding .all(code.exists()) |
ObservationScreenRes-CodeDisplay | warning | Bundle | Ensure that all Observation Screening Responses have a code dispay. : entry.select(resource as Observation) .where(meta.profile.contains('shinny-observation-screening-response')) .code.coding .all(display.exists()) |
ObservationScreenRes-Interpretation | warning | Bundle | Ensure that specific Observation Screening Responses have an interpretation. : entry.select(resource as Observation) .where(meta.profile.contains('shinny-observation-screening-response')) .where(derivedFrom.exists().not()) .all(interpretation.exists()) |
ObservationScreenRes-Langauge | warning | Bundle | Ensure that all Observation Screening Responses have a language. : entry.select(resource as Observation) .where(meta.profile.contains('shinny-observation-screening-response') ) .all(language.exists()) |
Organization-Address | warning | Bundle | Ensure that all Organization resources include all address elements. : entry.select(resource as Organization). address.where(line.count() > 0 and city.trim().length() > 0 and state.trim().length() > 0 and postalCode.trim().length() > 0 and district.trim().length() > 0).count() > 0 |
Organization-Type | warning | Bundle | Ensure that all Organization resources include a value for type. : entry.select(resource as Organization).exists() implies entry.select(resource as Organization).all(type.exists()) |
Referral-ApprovalQuestionnaire | warning | Bundle | Ensure that all Referral Questionnaire bundles have a response to PatientReferralApproval. : entry.select(resource as QuestionnaireResponse).exists() implies entry.select(resource as QuestionnaireResponse).exists ( (QuestionnaireResponse|repeat('Yes'|PatientReferralApproval)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() or (QuestionnaireResponse|repeat('No'|PatientReferralApproval)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() ) |
Referral-HRSNOutreachQuestionnaire | warning | Bundle | Ensure that all approved Referral Questionnaire bundles have a response to HRSNServiceProviderReferralOutreachDate. : entry.select(resource as QuestionnaireResponse).exists() implies entry.select(resource as QuestionnaireResponse).exists ( (QuestionnaireResponse|repeat('Yes'|PatientReferralApproval)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|HRSNServiceProviderReferralOutreachDate)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() ) |
Referral-SCNOutreachQuestionnaire | warning | Bundle | Ensure that all approved Referral Questionnaire bundles have a response to SCNReferralOutreachDate. : entry.select(resource as QuestionnaireResponse).exists() implies entry.select(resource as QuestionnaireResponse).exists ( (QuestionnaireResponse|repeat('Yes'|PatientReferralApproval)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|SCNReferralOutreachDate)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() ) |
SHINNY-Assessment-Encounter | error | Bundle | Assessment-Encounter should exist : entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-assessment')).exists() implies entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-assessment')) .where(encounter.reference.exists().not()) .count()=0 |
SHINNY-Assessment-Patient | error | Bundle | Assessment-Subject should exist : entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-assessment')).exists() implies entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-assessment')) .where(subject.reference.exists().not()) .count()=0 |
SHINNY-Bundle-Encounter-RI | error | Bundle | Checks for RI between all resources & Encounter : entry.select(resource) .where(encounter.exists()) .encounter.select(reference.split('/')[1]).distinct() .intersect( entry.select(resource as Encounter).id ) .count() = entry.select(resource) .where(encounter.exists()) .encounter.select(reference.split('/')[1]).distinct() .count() |
SHINNY-Bundle-Obs-Encounter-RI | error | Bundle | Checks for RI between Screening Obs & Encounter : entry.select(resource as Observation) .exists(encounter.reference.exists() and meta.profile.contains('shinny-observation-screening-response')) implies entry.select(resource as Observation) .where(encounter.reference.exists() and meta.profile.contains('shinny-observation-screening-response')) .select(encounter.reference.split('/')[1]).distinct() = entry.select(resource as Encounter).id |
SHINNY-Bundle-Obs-Patient-RI | error | Bundle | Checks for RI between Obs & Patient : entry.select(resource as Observation) .where(encounter.reference.exists() and meta.profile.contains('shinny-observation')).count()>1 implies entry.select(resource as Observation) .where(encounter.reference.exists() and meta.profile.contains('shinny-observation')) .encounter.reference.distinct() .contains(entry.select(resource as Encounter).id) |
SHINNY-Bundle-Obs-derivedFrom-RI | error | Bundle | Checks for RI between Observation & child Observation : entry.select(resource as Observation) .where(derivedFrom.exists() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or meta.where(profile.lower().contains('sdohcc-observation')))) .derivedFrom.select(reference.split('/')[1]) .intersect( entry.select(resource as Observation).where(derivedFrom.empty() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or meta.where(profile.lower().contains('sdohcc-observation')))).id) .count() = entry.select(resource as Observation) .where(derivedFrom.exists() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or $this.meta.where(profile.lower().contains('sdohcc-observationscreeningresponse')))) .derivedFrom.reference .count() |
SHINNY-Bundle-Obs-hasMember-RI | error | Bundle | Checks for RI between Observation & child Observations : entry.select(resource as Observation) .where(hasMember.exists() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or meta.where(profile.lower().contains('sdohcc-observation')))) .hasMember.select(reference.split('/')[1]) .intersect( entry.select(resource as Observation).where(hasMember.empty() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or meta.where(profile.lower().contains('sdohcc-observation')))).id) .count() = entry.select(resource as Observation) .where(hasMember.exists() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or $this.meta.where(profile.lower().contains('sdohcc-observationscreeningresponse')))) .hasMember.reference .count() and (entry.select(resource as Observation) .where(hasMember.exists() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or meta.where(profile.lower().contains('sdohcc-observation')))).exists() implies entry.select(resource as Observation) .where(hasMember.exists() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or meta.where(profile.lower().contains('sdohcc-observation')))) .hasMember.select(reference.split('/')[1]) .intersect( entry.select(resource as Observation).where(hasMember.empty() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or meta.where(profile.lower().contains('sdohcc-observationscreeningresponse')))).id) .count() = entry.select(resource as Observation).where(hasMember.empty() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or meta.where(profile.lower().contains('sdohcc-observationscreeningresponse')))).count()) |
SHINNY-Bundle-Patient-Org-RI | error | Bundle | Checks for RI between Patient & Assigning Org : entry.select(resource as Organization).id contains entry.select(resource as Patient) .identifier.where(type.coding.code='MR') .assigner.reference.split('/')[1] |
SHINNY-Bundle-Required | error | Bundle | Every submitted resource should be part of a bundle. : select($this as Bundle).exists() |
SHINNY-Bundle-Required-Resources | error | Bundle | Every bundle should always have one and only one 'Patient' & 'Encounter' and atleast one Org : entry.select(resource as Patient).count() = 1 and entry.select(resource as Encounter).count() > 0 and entry.select(resource as Organization).count() > 0 |
SHINNY-Bundle-screening-consent | error | Bundle | Ensures all bundles with a screening included also includes the consent profile. : ( (select($this as Bundle).where(meta.profile.upper() != 'http://test.shinny.org/us/ny/hrsn/StructureDefinition/SHINNYBundleProfile'.upper()).count() > 0) and ( entry.select(resource as Observation) .where(meta.profile.contains('shinny-observation-screening')).count() > 0 ) ) implies entry.select(resource as Consent).exists() |
SHINNY-Consent-Category | warning | Bundle | Patient Consent category code is 59284-0 : entry.select(resource as Consent).exists() implies entry.select(resource as Consent).category.coding.where(code='59284-0').exists() |
SHINNY-Encounter-Class | warning | Bundle | Ensure that the Encounter resource has a class code; Ensure that the Encounter resource has a class code system : entry.select(resource as Encounter).class .all(code.exists() and system.exists()) |
SHINNY-Encounter-Type | warning | Bundle | Ensure that the Encounter resource has a status code : entry.select(resource as Encounter).type.coding .all(code.exists() and system.exists()) |
SHINNY-Obs-Category | error | Bundle | Ensure that all Observation categories have an SDOH code : entry.select(resource as Observation) .where(meta.profile.contains('shinny-observation-screening-response')) .all(category.coding.system .exists($this.contains('SDOHCC-CodeSystemTemporaryCodes'))) |
SHINNY-Obs-Code | warning | Bundle | Ensure that all Observation resources have screening code; Ensure that all Observation resources have screening code system : entry.select(resource as Observation).where( code.coding.system.exists().not() or code.coding.code.not().exists().not()) .count() = 0 |
SHINNY-Obs-Encounter | warning | Bundle | SDOH Observations should have an Encounter : entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-screening-response')) .all(encounter.reference.exists()) |
SHINNY-Obs-Patient | warning | Bundle | SDOH Observations should have a Patient : entry.select(resource as Observation).where(meta.profile.contains('shinny-observation')) .all(subject.reference.exists()) |
SHINNY-Patient-Address | warning | Bundle | All elements of address should be present : entry.select(resource as Patient). address.where(line.count() > 0 and city.trim().length() > 0 and state.trim().length() > 0 and postalCode.trim().length() > 0 and district.trim().length() > 0).count() > 0 |
SHINNY-Patient-Communication | warning | Bundle | Communication should exist : entry.select(resource as Patient).communication.exists() |
SHINNY-Patient-DOB | error | Bundle | birthDate should be a valid date : entry.select(resource as Patient).birthDate.trim().length() = 10 and entry.select(resource as Patient).birthDate.trim().split('-').count() = 3 |
SHINNY-Patient-Gender | error | Bundle | Gender should be present : entry.select(resource as Patient).where(gender.exists() and gender.trim().length()).count() > 0 |
SHINNY-Patient-GenderId | warning | Bundle | Gender Id should be present : entry.select(resource as Patient).extension.where(url='http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex').count() > 0 |
SHINNY-Patient-MA | error | Bundle | Every bundle should always have only 1 Medicaid CIN (i.e MA) Object within patient.identifier AND the CIN is always in the format of 2 letters, 5 numbers, and 1 letter, e.g., 'AB12345C' : entry.select(resource as Patient).identifier.where(type.coding.code='MA' and value.trim().length() > 0).count() = 1 and entry.select(resource as Patient).identifier.where( value.trim().length() = 8 and type.coding.code='MA' and value.substring(0,1).matches('^[a-zA-Z]+$') and value.substring(1,1).matches('^[a-zA-Z]+$') and value.substring(2,1).matches('^[0-9]*$') and value.substring(3,1).matches('^[0-9]*$') and value.substring(4,1).matches('^[0-9]*$') and value.substring(5,1).matches('^[0-9]*$') and value.substring(6,1).matches('^[0-9]*$') and value.substring(7,1).matches('^[a-zA-Z]+$') ).exists() |
SHINNY-Patient-MRN | error | Bundle | Every bundle should always have only 1 MR (i.e MRN) Object within patient.identifier, system.contains('facility') and value (MRN) is provided : entry.select(resource as Patient).identifier.where(type.coding.code='MR' and value.trim().length() > 0).count() = 1 |
SHINNY-Patient-MiddleName | warning | Bundle | MiddleName should be present : entry.select(resource as Patient).name .extension.where(url.contains('middle-name')) .value.trim().length()>0 |
SHINNY-Patient-Pronouns | warning | Bundle | Pronouns should be present : entry.select(resource as Patient).extension.where(url='http://test.shinny.org/us/ny/hrsn/ValueSet/SHINNYPersonalPronounsVS').exists() implies entry.select(resource as Patient).extension.where(url='http://test.shinny.org/us/ny/hrsn/ValueSet/SHINNYPersonalPronounsVS' and value.select($this as CodeableConcept).coding.code.exists()).exists() |
SHINNY-Patient-Race-Ethnicity | warning | Bundle | Race & Ethnicity should be present : entry.select(resource as Patient).extension.where(url='http://hl7.org/fhir/us/core/StructureDefinition/us-core-race').extension.where(url='ombCategory' and value.system = 'http://terminology.hl7.org/CodeSystem/v3-NullFlavor').exists().not() implies entry.select(resource as Patient). extension.where(url='http://hl7.org/fhir/us/core/StructureDefinition/us-core-race').exists() and entry.select(resource as Patient). extension.where(url='http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity').exists() |
SHINNY-Patient-SSN | warning | Bundle | Every bundle should always have only 1 SSN (i.e SS) Object within patient.identifier : entry.select(resource as Patient).identifier.where(type.coding.code='SS' and value.trim().length() > 0).count() <= 1 |
SHINNY-Resources-Profile-Check | error | Bundle | SHINNY-Resources-Profile-Check : select($this as Bundle).where(meta.profile.upper() != 'http://test.shinny.org/us/ny/hrsn/StructureDefinition/SHINNYBundleProfile'.upper()).count() = 0 and ( entry.select(resource as Patient).exists() implies entry.select(resource as Patient).where(meta.profile.upper() != 'http://test.shinny.org/us/ny/hrsn/StructureDefinition/shinny-patient'.upper()).count() = 0 ) and ( entry.select(resource as Encounter).exists() implies entry.select(resource as Encounter).where(meta.profile.upper() != 'http://test.shinny.org/us/ny/hrsn/StructureDefinition/shinny-encounter'.upper()).count() = 0 ) and ( entry.select(resource as Observation).exists() implies entry.select(resource as Observation).meta.where(profile.upper().startsWith('http://test.shinny.org/us/ny/hrsn/StructureDefinition/shinny-observation'.upper()).not()).count() = 0 ) and ( entry.select(resource as ServiceRequest).exists() implies entry.select(resource as ServiceRequest).where(meta.profile.upper() != 'http://test.shinny.org/us/ny/hrsn/StructureDefinition/SHINNYSDOHServiceRequest'.upper()).count() = 0 ) and ( entry.select(resource as Task).exists() implies entry.select(resource as Task).where(meta.profile.upper() != 'http://test.shinny.org/us/ny/hrsn/StructureDefinition/SHINNYSDOHTaskForReferralManagement'.upper()).count() = 0 ) and ( entry.select(resource as Consent).exists() implies entry.select(resource as Consent).where(meta.profile.upper() != 'http://test.shinny.org/us/ny/hrsn/StructureDefinition/shinny-Consent'.upper()).count() = 0 ) .allTrue() |
SHINNY-Screening-Consent | error | Bundle | All screening bundles must include a consent : entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-screening-response')).exists() implies entry.select(resource as Consent).exists() |
SHINNY-Screening-Patient | error | Bundle | SDOH Screening Observations should have an Patient : entry.select(resource as Observation) .where(meta.profile.contains('shinny-observation-screening') and hasMember.exists()) .all(subject.reference.exists()) |
SHINNYServiceRequestSDOHCategory | error | Bundle | Ensure that all Service Request categories have an SDOH code : entry.select(resource as ServiceRequest) .where(meta.profile.contains('SHINNYSDOHServiceRequest')) .all(category.coding.system .exists($this.contains('SDOHCC-CodeSystemTemporaryCodes'))) |
Screening-Crosswalk-44255-8 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 44255-8 then answer codes must be one of the following: LA6568-5 LA6569-3 LA6570-1 LA6571-9 : entry.select(resource as Observation).where(code.coding.code contains '44255-8').exists() implies entry.select(resource as Observation).where(code.coding.code contains '44255-8').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '44255-8') .value.select($this as CodeableConcept).coding .where(code='LA6568-5' or code='LA6569-3' or code='LA6570-1' or code='LA6571-9').exists() |
Screening-Crosswalk-44250-9 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 44250-9 then answer codes must be one of the following: LA6568-5 LA6569-3 LA6570-1 LA6571-9 : entry.select(resource as Observation).where(code.coding.code contains '44250-9').exists() implies entry.select(resource as Observation).where(code.coding.code contains '44250-9').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '44250-9') .value.select($this as CodeableConcept).coding .where(code='LA6568-5' or code='LA6569-3' or code='LA6570-1' or code='LA6571-9').exists() |
Screening-Crosswalk-68517-2 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 68517-2 then answer codes must be one of the following: LA6270-8 LA26460-8 LA18876-5 LA18891-4 LA18934-2 : entry.select(resource as Observation).where(code.coding.code contains '68517-2').exists() implies entry.select(resource as Observation).where(code.coding.code contains '68517-2').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '68517-2') .value.select($this as CodeableConcept).coding .where(code='LA6270-8' or code='LA26460-8' or code='LA18876-5' or code='LA18891-4' or code='LA18934-2').exists() |
Screening-Crosswalk-68516-4 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 68516-4 then answer codes must be one of the following: LA6111-4 LA13942-0 LA19282-5 LA28855-7 LA28858-1 LA28854-0 LA28853-2 LA28891-2 LA32059-0 LA32060-8 : entry.select(resource as Observation).where(code.coding.code contains '68516-4').exists() implies entry.select(resource as Observation).where(code.coding.code contains '68516-4').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '68516-4') .value.select($this as CodeableConcept).coding .where(code='LA6111-4' or code='LA13942-0' or code='LA19282-5' or code='LA28855-7' or code='LA28858-1' or code='LA28854-0' or code='LA28853-2' or code='LA28891-2' or code='LA32059-0' or code='LA32060-8').exists() |
Screening-Crosswalk-68524-8 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 68524-8 then answer codes must be one of the following: LA6270-8 LA26460-8 LA18876-5 LA18891-4 LA18934-2 : entry.select(resource as Observation).where(code.coding.code contains '68524-8').exists() implies entry.select(resource as Observation).where(code.coding.code contains '68524-8').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '68524-8') .value.select($this as CodeableConcept).coding .where(code='LA6270-8' or code='LA26460-8' or code='LA18876-5' or code='LA18891-4' or code='LA18934-2').exists() |
Screening-Crosswalk-69858-9 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 69858-9 then answer codes must be one of the following: LA33-6 LA32-8 : entry.select(resource as Observation).where(code.coding.code contains '69858-9').exists() implies entry.select(resource as Observation).where(code.coding.code contains '69858-9').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '69858-9') .value.select($this as CodeableConcept).coding .where(code='LA33-6' or code='LA32-8').exists() |
Screening-Crosswalk-69861-3 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 69861-3 then answer codes must be one of the following: LA33-6 LA32-8 : entry.select(resource as Observation).where(code.coding.code contains '69861-3').exists() implies entry.select(resource as Observation).where(code.coding.code contains '69861-3').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '69861-3') .value.select($this as CodeableConcept).coding .where(code='LA33-6' or code='LA32-8').exists() |
Screening-Crosswalk-71802-3 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 71802-3 then answer codes must be one of the following: LA31993-1, LA31994-9, LA31995-6 : entry.select(resource as Observation).where(code.coding.code contains '71802-3').exists() implies entry.select(resource as Observation).where(code.coding.code contains '71802-3').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '71802-3') .value.select($this as CodeableConcept).coding .where(code='LA31993-1' or code='LA31994-9' or code='LA31995-6').exists() |
Screening-Crosswalk-76513-1 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 76513-1 then answer codes must be one of the following: LA15832-1 LA22683-9 LA31980-8 : entry.select(resource as Observation).where(code.coding.code contains '76513-1').exists() implies entry.select(resource as Observation).where(code.coding.code contains '76513-1').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '76513-1') .value.select($this as CodeableConcept).coding .where(code='LA15832-1' or code='LA22683-9' or code='LA31980-8').exists() |
Screening-Crosswalk-88123-5 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 88123-5 then answer codes must be one of the following: LA28397-0 LA6729-3 LA28398-8 : entry.select(resource as Observation).where(code.coding.code contains '88123-5').exists() implies entry.select(resource as Observation).where(code.coding.code contains '88123-5').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '88123-5') .value.select($this as CodeableConcept).coding .where(code='LA28397-0' or code='LA6729-3' or code='LA28398-8').exists() |
Screening-Crosswalk-88122-7 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 88122-7 then answer codes must be one of the following: LA28397-0 LA6729-3 LA28398-8 : entry.select(resource as Observation).where(code.coding.code contains '88122-7').exists() implies entry.select(resource as Observation).where(code.coding.code contains '88122-7').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '88122-7') .value.select($this as CodeableConcept).coding .where(code='LA28397-0' or code='LA6729-3' or code='LA28398-8').exists() |
Screening-Crosswalk-89555-7 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 89555-7 then answer codes must be one of the following: LA6111-4 LA6112-2 LA6113-0 LA6114-8 LA6115-5 LA10137-0 LA10138-8 LA10139-6 : entry.select(resource as Observation).where(code.coding.code contains '89555-7').exists() implies entry.select(resource as Observation).where(code.coding.code contains '89555-7').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '89555-7') .value.select($this as CodeableConcept).coding .where(code='LA6111-4' or code='LA6112-2' or code='LA6113-0' or code='LA6114-8' or code='LA6115-5' or code='LA10137-0' or code='LA10138-8' or code='LA10139-6').exists() |
Screening-Crosswalk-93030-5 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 93030-5 then answer codes must be one of the following: LA33-6 LA32-8 : entry.select(resource as Observation).where(code.coding.code contains '93030-5').exists() implies entry.select(resource as Observation).where(code.coding.code contains '93030-5').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '93030-5') .value.select($this as CodeableConcept).coding .where(code='LA33-6' or code='LA32-8').exists() |
Screening-Crosswalk-93038-8 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 93038-8 then answer codes must be one of the following: LA6568-5 LA13863-8 LA13909-9 LA13902-4 LA13914-9 LA30122-8 : entry.select(resource as Observation).where(code.coding.code contains '93038-8').exists() implies entry.select(resource as Observation).where(code.coding.code contains '93038-8').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '93038-8') .value.select($this as CodeableConcept).coding .where(code='LA6568-5' or code='LA13863-8' or code='LA13909-9' or code='LA13902-4' or code='LA13914-9' or code='LA30122-8').exists() |
Screening-Crosswalk-93159-2 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 93159-2 then answer codes must be one of the following: LA6270-8 LA10066-1 LA10082-8 LA10044-8 LA9933-8 : entry.select(resource as Observation).where(code.coding.code contains '93159-2').exists() implies entry.select(resource as Observation).where(code.coding.code contains '93159-2').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '93159-2') .value.select($this as CodeableConcept).coding .where(code='LA6270-8' or code='LA10066-1' or code='LA10082-8' or code='LA10044-8' or code='LA9933-8').exists() |
Screening-Crosswalk-95530-2 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 95530-2 then answer codes must be one of the following: LA6270-8 LA26460-8 LA18876-5 LA18891-4 LA18934-2 : entry.select(resource as Observation).where(code.coding.code contains '95530-2').exists() implies entry.select(resource as Observation).where(code.coding.code contains '95530-2').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '95530-2') .value.select($this as CodeableConcept).coding .where(code='LA6270-8' or code='LA26460-8' or code='LA18876-5' or code='LA18891-4' or code='LA18934-2').exists() |
Screening-Crosswalk-95615-1 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 95615-1 then answer codes must be one of the following: LA6270-8 LA10066-1 LA10082-8 LA16644-9 LA6482-9 : entry.select(resource as Observation).where(code.coding.code contains '95615-1').exists() implies entry.select(resource as Observation).where(code.coding.code contains '95615-1').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '95615-1') .value.select($this as CodeableConcept).coding .where(code='LA6270-8' or code='LA10066-1' or code='LA10082-8' or code='LA16644-9' or code='LA6482-9').exists() |
Screening-Crosswalk-95618-5 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 95618-5 then answer codes must be one of the following: LA6270-8 LA10066-1 LA10082-8 LA16644-9 LA6482-9 : entry.select(resource as Observation).where(code.coding.code contains '95618-5').exists() implies entry.select(resource as Observation).where(code.coding.code contains '95618-5').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '95618-5') .value.select($this as CodeableConcept).coding .where(code='LA6270-8' or code='LA10066-1' or code='LA10082-8' or code='LA16644-9' or code='LA6482-9').exists() |
Screening-Crosswalk-95617-7 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 95617-7 then answer codes must be one of the following: LA6270-8 LA10066-1 LA10082-8 LA16644-9 LA6482-9 : entry.select(resource as Observation).where(code.coding.code contains '95617-7').exists() implies entry.select(resource as Observation).where(code.coding.code contains '95617-7').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '95617-7') .value.select($this as CodeableConcept).coding .where(code='LA6270-8' or code='LA10066-1' or code='LA10082-8' or code='LA16644-9' or code='LA6482-9').exists() |
Screening-Crosswalk-95616-9 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 95616-9 then answer codes must be one of the following: LA6270-8 LA10066-1 LA10082-8 LA16644-9 LA6482-9 : entry.select(resource as Observation).where(code.coding.code contains '95616-9').exists() implies entry.select(resource as Observation).where(code.coding.code contains '95616-9').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '95616-9') .value.select($this as CodeableConcept).coding .where(code='LA6270-8' or code='LA10066-1' or code='LA10082-8' or code='LA16644-9' or code='LA6482-9').exists() |
Screening-Crosswalk-96779-4 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 96779-4 then answer codes must be one of the following: LA33-6 LA32-8 LA32002-0 : entry.select(resource as Observation).where(code.coding.code contains '96779-4').exists() implies entry.select(resource as Observation).where(code.coding.code contains '96779-4').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '96779-4') .value.select($this as CodeableConcept).coding .where(code='LA33-6' or code='LA32-8' or code='LA32002-0').exists() |
Screening-Crosswalk-96778-6 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 96778-6 then answer codes must be one of the following: LA31996-4 LA28580-1 LA31997-2 LA31998-0 LA31999-8 LA32000-4 LA32001-2 LA9-3 : entry.select(resource as Observation).where(code.coding.code contains '96778-6').exists() implies entry.select(resource as Observation).where(code.coding.code contains '96778-6').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '96778-6') .value.select($this as CodeableConcept).coding .where(code='LA31996-4' or code='LA28580-1' or code='LA31997-2' or code='LA31998-0' or code='LA31999-8' or code='LA32000-4' or code='LA32001-2' or code='LA9-3').exists() |
Screening-Crosswalk-96781-0 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 96781-0 then answer codes must be one of the following: LA31976-6 LA31977-4 LA31978-2 LA31979-0 : entry.select(resource as Observation).where(code.coding.code contains '96781-0').exists() implies entry.select(resource as Observation).where(code.coding.code contains '96781-0').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '96781-0') .value.select($this as CodeableConcept).coding .where(code='LA31976-6' or code='LA31977-4' or code='LA31978-2' or code='LA31978-2').exists() |
Screening-Crosswalk-96780-2 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 96780-2 then answer codes must be one of the following: LA31981-6 LA31982-4 LA31983-2 : entry.select(resource as Observation).where(code.coding.code contains '96780-2').exists() implies entry.select(resource as Observation).where(code.coding.code contains '96780-2').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '96780-2') .value.select($this as CodeableConcept).coding .where(code='LA31981-6' or code='LA31982-4' or code='LA31983-2').exists() |
Screening-Crosswalk-96782-8 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 96782-8 then answer codes must be one of the following: LA33-6 LA32-8 : entry.select(resource as Observation).where(code.coding.code contains '96782-8').exists() implies entry.select(resource as Observation).where(code.coding.code contains '96782-8').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '96782-8') .value.select($this as CodeableConcept).coding .where(code='LA33-6' or code='LA32-8').exists() |
Screening-Crosswalk-96842-0 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 96842-0 then answer codes must be one of the following: LA6270-8 LA26460-8 LA18876-5 LA18891-4 LA18934-2 : entry.select(resource as Observation).where(code.coding.code contains '96842-0').exists() implies entry.select(resource as Observation).where(code.coding.code contains '96842-0').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '96842-0') .value.select($this as CodeableConcept).coding .where(code='LA6270-8' or code='LA26460-8' or code='LA18876-5' or code='LA18891-4' or code='LA18934-2').exists() |
Screening-Crosswalk-97027-7 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 97027-7 then answer codes must be one of the following: LA33-6 LA32-8 : entry.select(resource as Observation).where(code.coding.code contains '97027-7').exists() implies entry.select(resource as Observation).where(code.coding.code contains '97027-7').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '97027-7') .value.select($this as CodeableConcept).coding .where(code='LA33-6' or code='LA32-8').exists() |
ServiceRequest-AuthoredOn | warning | Bundle | Ensure that all Service Requests have a authored on date. : entry.select(resource as ServiceRequest).exists() implies entry.select(resource as ServiceRequest).all(authoredOn.exists()) |
ServiceRequest-CategoryCode | warning | Bundle | Ensure that all Service Requests have a category code. : entry.select(resource as ServiceRequest).exists() implies entry.select(resource as ServiceRequest).( all(category.exists()) and category.all(coding.exists()) and category.coding.all(code.exists()) ) |
ServiceRequest-OccurrencePeriod | warning | Bundle | Ensure that all Service Requests have an occurrence period start and end, or occurrence datetime. : entry.select(resource as ServiceRequest).exists() implies entry.select(resource as ServiceRequest).count() = ( entry.select(resource as ServiceRequest).where(occurrence is Period).select(occurrence) .where(start and end).count() + entry.select(resource as ServiceRequest).where(occurrence is dateTime).count() ) |
ServiceRequest-Quantity | warning | Bundle | Ensure that all Service Requests have a quantity. : entry.select(resource as ServiceRequest).exists() implies entry.select(resource as ServiceRequest) .all(quantity.value.exists()) |
Task-EndPeriod | warning | Bundle | Ensure that all completed Tasks have an end execution period. : entry.select(resource as Task).where(status = 'completed').exists() implies entry.select(resource as Task).where(status = 'completed').all(executionPeriod.end.exists()) |
Task-Repetitions | warning | Bundle | Ensure that all Tasks have a value for repetitions. : entry.select(resource as Task).exists() implies entry.select(resource as Task).all(restriction.repetitions.exists()) |
Task-StartPeriod | warning | Bundle | Ensure that all Tasks have a starting execution period. : entry.select(resource as Task).exists() implies entry.select(resource as Task).all(executionPeriod.start.exists()) |
Task-StatusReason | error | Bundle | Ensure that all tasks exists, have a statusReason If the Task.status is rejected, cancelled, completed, or failed. : entry.select(resource as Task).where(status = 'rejected' or status = 'cancelled' or status = 'completed' or status = 'failed').exists() implies entry.select(resource as Task).where(status = 'rejected' or status = 'cancelled' or status = 'completed' or status = 'failed') .all(statusReason.text.exists()) |
bdl-1 | error | Bundle | total only when a search or history : total.empty() or (type = 'searchset') or (type = 'history') |
bdl-2 | error | Bundle | entry.search only when a search : entry.search.empty() or (type = 'searchset') |
bdl-3 | error | Bundle | entry.request mandatory for batch/transaction/history, otherwise prohibited : entry.all(request.exists() = (%resource.type = 'batch' or %resource.type = 'transaction' or %resource.type = 'history')) |
bdl-4 | error | Bundle | entry.response mandatory for batch-response/transaction-response/history, otherwise prohibited : entry.all(response.exists() = (%resource.type = 'batch-response' or %resource.type = 'transaction-response' or %resource.type = 'history')) |
bdl-7 | error | Bundle | FullUrl must be unique in a bundle, or else entries with the same fullUrl must have different meta.versionId (except in history bundles) : (type = 'history') or entry.where(fullUrl.exists()).select(fullUrl&resource.meta.versionId).isDistinct() |
bdl-9 | error | Bundle | A document must have an identifier with a system and a value : type = 'document' implies (identifier.system.exists() and identifier.value.exists()) |
bdl-10 | error | Bundle | A document must have a date : type = 'document' implies (timestamp.hasValue()) |
bdl-11 | error | Bundle | A document must have a Composition as the first resource : type = 'document' implies entry.first().resource.is(Composition) |
bdl-12 | error | Bundle | A message must have a MessageHeader as the first resource : type = 'message' implies entry.first().resource.is(MessageHeader) |
ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children : hasValue() or (children().count() > id.count()) |
shinny-sexual-orientation | warning | Bundle | If there is no component or hasMember element then either a value[x] or a data absent reason must be present : entry.select(resource as Observation).where(meta.profile.contains('shin-ny-observation-sexual-orientation')).exists() implies entry.select(resource as Observation).where(meta.profile.contains('shin-ny-observation-sexual-orientation')) .where(value.exists() or dataAbsentReason.exists()) .count()=1 |

Differential View

This structure is derived from Bundle

Name | Flags | Card. | Type | Description & Constraints Filter: Bindings Constraints Obligations
--- | --- | --- | --- | ---
Bundle | C | 0..* | Bundle | Contains a collection of resources Constraints: SHINNY-Patient-MRN, SHINNY-Patient-MA, SHINNY-Patient-SSN, SHINNY-Patient-Address, SHINNY-Patient-DOB, SHINNY-Patient-Gender, SHINNY-Patient-GenderId, SHINNY-Patient-Race-Ethnicity, SHINNY-Patient-Communication, SHINNY-Patient-MiddleName, SHINNY-Patient-Pronouns, shinny-sexual-orientation, SHINNY-Bundle-Obs-hasMember-RI, SHINNY-Encounter-Class, SHINNY-Encounter-Type, Encounter-PeriodStart, Encounter-PeriodEnd, SHINNY-Obs-Encounter, SHINNY-Obs-Patient, SHINNY-Obs-Code, SHINNY-Obs-Category, SHINNY-Screening-Patient, ObservationScreenRes-Langauge, ObservationScreenRes-CategoryDisplay, ObservationScreenRes-CodeCode, ObservationScreenRes-CodeDisplay, ObservationScreenRes-Interpretation, SHINNY-Screening-Consent, Assessment-ConditionID, Assessment-ConditionSNOMED, Assessment-ConditionICD10, Assessment-ApprovalQuestionnaire, Assessment-OutreachQuestionnaire, Assessment-AdminQuestionnaire, Assessment-ServiceDupQuestionnaire, SHINNY-Assessment-Encounter, SHINNY-Assessment-Patient, ServiceRequest-Quantity, ServiceRequest-CategoryCode, ServiceRequest-OccurrencePeriod, ServiceRequest-AuthoredOn, SHINNYServiceRequestSDOHCategory, Task-StatusReason, Task-Repetitions, Task-EndPeriod, Task-StartPeriod, Referral-ApprovalQuestionnaire, Referral-HRSNOutreachQuestionnaire, Referral-SCNOutreachQuestionnaire, SHINNY-Bundle-Required-Resources, SHINNY-Bundle-Required, SHINNY-Bundle-Patient-Org-RI, SHINNY-Bundle-Encounter-RI, SHINNY-Bundle-Obs-derivedFrom-RI, SHINNY-Bundle-Obs-Patient-RI, SHINNY-Bundle-Obs-Encounter-RI, Screening-Crosswalk-44250-9, Screening-Crosswalk-44255-8, Screening-Crosswalk-68516-4, Screening-Crosswalk-68517-2, Screening-Crosswalk-68524-8, Screening-Crosswalk-69858-9, Screening-Crosswalk-69861-3, Screening-Crosswalk-71802-3, Screening-Crosswalk-76513-1, Screening-Crosswalk-88122-7, Screening-Crosswalk-88123-5, Screening-Crosswalk-89555-7, Screening-Crosswalk-93030-5, Screening-Crosswalk-93038-8, Screening-Crosswalk-93159-2, Screening-Crosswalk-95530-2, Screening-Crosswalk-95615-1, Screening-Crosswalk-95616-9, Screening-Crosswalk-95617-7, Screening-Crosswalk-95618-5, Screening-Crosswalk-96778-6, Screening-Crosswalk-96779-4, Screening-Crosswalk-96780-2, Screening-Crosswalk-96781-0, Screening-Crosswalk-96782-8, Screening-Crosswalk-96842-0, Screening-Crosswalk-97027-7, SHINNY-Consent-Category, Consent-ProvisionType, SHINNY-Bundle-screening-consent, Goal-StatusDate, Goal-AchievementStatus, Location-Address, Location-Type, Organization-Address, Organization-Type, SHINNY-Resources-Profile-Check
id | S | 1..1 | id | Logical id of this artifact
meta | S | 1..1 | SHINNYMeta | Metadata about the resource
language |  | 0..1 | code | Language of the resource content Binding: SHINNYLanguageVS (preferred)
Documentation for this format

#### Terminology Bindings (Differential)

Path | Conformance | ValueSet | URI
Bundle.language | preferred | SHINNYLanguageVS `http://test.shinny.org/us/ny/hrsn/ValueSet/SHINNYLanguageVS` From this IG

#### Constraints

Id | Grade | Path(s) | Details | Requirements
Assessment-AdminQuestionnaire | warning | Bundle | Ensure that all Assessment Questionnaire bundles have a response to the service duplication indicators. : entry.select(resource as QuestionnaireResponse).exists() implies entry.select(resource as QuestionnaireResponse).exists ( (QuestionnaireResponse|repeat('Yes'|PatientAssessmentApproval)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|EnhancedPopulationCheck)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|ServiceDuplicationCheck)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|ClinicalCriteriaCheck)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() ) |
Assessment-ApprovalQuestionnaire | warning | Bundle | Ensure that all Assessment Questionnaire bundles have a response to PatientAssessmentApproval. : entry.select(resource as QuestionnaireResponse).exists() implies entry.select(resource as QuestionnaireResponse).exists ( (QuestionnaireResponse|repeat('Yes'|PatientAssessmentApproval)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() or (QuestionnaireResponse|repeat('No'|PatientAssessmentApproval)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() ) |
Assessment-ConditionICD10 | warning | Bundle | Ensure that all final assessments have a Condition ICD-10 term. : entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-assessment') and status='final').exists() implies entry.select(resource as Condition).count() = entry.select(resource as Condition).select(code.coding) .where(system.contains('http://hl7.org/fhir/sid/icd-10-cm')) .count() and entry.select(resource as Condition).count() !=0 |
Assessment-ConditionID | warning | Bundle | Ensure that all final assessments have a Condition identifier. : entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-assessment') and status = 'final').exists() implies entry.select(resource as Observation) .where( meta.profile.contains('shinny-observation-assessment') and status = 'final' ).count() = entry.select(resource as Condition).id.count() |
Assessment-ConditionSNOMED | warning | Bundle | Ensure that all final assessments have a Condition category SNOMED term. : entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-assessment') and status='final').exists() implies entry.select(resource as Condition).count() = entry.select(resource as Condition).select(code.coding) .where(system.contains('http://snomed.info/sct')) .count() and entry.select(resource as Condition).count() !=0 |
Assessment-OutreachQuestionnaire | warning | Bundle | Ensure that all Assessment Questionnaire bundles with patient approval contain a Patient Assessment Outreach Date and a Patient Assessment Status. : entry.select(resource as QuestionnaireResponse).exists() implies entry.select(resource as QuestionnaireResponse).exists ( (QuestionnaireResponse|repeat('Yes'|PatientAssessmentApproval)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|PatientAssessmentOutreachDate)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|PatientAssessmentOutreachStatus)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() ) |
Assessment-ServiceDupQuestionnaire | warning | Bundle | Ensure that all Assessment Questionnaire bundles have a response to the service duplication indicators. : entry.select(resource as QuestionnaireResponse).exists() implies entry.select(resource as QuestionnaireResponse).exists ( (QuestionnaireResponse|repeat('Yes'|PatientAssessmentApproval)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|CurrentHousingProgramRecipientIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|CurrentNutritionalEducationProgramRecipientIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|CurrentNutritionalServicesProgramRecipientIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|CurrentFoodServiceProgramRecipientIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|CurrentSNAPProgramRecipientIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|CurrentWICProgramRecipientIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|CurrentTANFProgramRecipientIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|CurrentTransportationProgramRecipientIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|MedicationRequiringRefrigerationIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|BreastMilkRequiringRefrigerationIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|ADLs/IADLsIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|MedicalRespiteRequirementsIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|ChildcareAssistanceIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() ) |
Consent-ProvisionType | warning | Bundle | Ensure that all Consents include a value for provision type. : entry.select(resource as Consent) .all(provision.type.exists()) |
Encounter-PeriodEnd | warning | Bundle | Ensure that all finished Encounters include a value for period.end. : entry.select(resource as Encounter) .where(status.contains('finished')) .all(period.end.exists()) |
Encounter-PeriodStart | warning | Bundle | Ensure that all Encounters include a value for period.start. : entry.select(resource as Encounter) .all(period.start.exists()) |
Goal-AchievementStatus | warning | Bundle | Ensure that all Goals include a value for achivementStatus. : entry.select(resource as Goal).exists() implies entry.select(resource as Goal).all(achievementStatus.exists()) |
Goal-StatusDate | warning | Bundle | Ensure that all Goals include a value for statusDate. : entry.select(resource as Goal).exists() implies entry.select(resource as Goal).all(statusDate.exists()) |
Location-Address | warning | Bundle | Ensure that all Location resources include all address elements. : entry.select(resource as Location). address.where(line.count() > 0 and city.trim().length() > 0 and state.trim().length() > 0 and postalCode.trim().length() > 0 and district.trim().length() > 0).count() > 0 |
Location-Type | warning | Bundle | Ensure that all Location resources include a value for type. : entry.select(resource as Location).exists() implies entry.select(resource as Location).all(type.exists()) |
ObservationScreenRes-CategoryDisplay | warning | Bundle | Ensure that all Observation Screening Responses have a category display. : entry.select(resource as Observation) .where(meta.profile.contains('shinny-observation-screening-response') ) .category.coding.where( system.contains('/CodeSystem/observation-category').not() ). all(display.exists()) |
ObservationScreenRes-CodeCode | warning | Bundle | Ensure that all Observation Screening Responses have a code code. : entry.select(resource as Observation) .where(meta.profile.contains('shinny-observation-screening-response')) .code.coding .all(code.exists()) |
ObservationScreenRes-CodeDisplay | warning | Bundle | Ensure that all Observation Screening Responses have a code dispay. : entry.select(resource as Observation) .where(meta.profile.contains('shinny-observation-screening-response')) .code.coding .all(display.exists()) |
ObservationScreenRes-Interpretation | warning | Bundle | Ensure that specific Observation Screening Responses have an interpretation. : entry.select(resource as Observation) .where(meta.profile.contains('shinny-observation-screening-response')) .where(derivedFrom.exists().not()) .all(interpretation.exists()) |
ObservationScreenRes-Langauge | warning | Bundle | Ensure that all Observation Screening Responses have a language. : entry.select(resource as Observation) .where(meta.profile.contains('shinny-observation-screening-response') ) .all(language.exists()) |
Organization-Address | warning | Bundle | Ensure that all Organization resources include all address elements. : entry.select(resource as Organization). address.where(line.count() > 0 and city.trim().length() > 0 and state.trim().length() > 0 and postalCode.trim().length() > 0 and district.trim().length() > 0).count() > 0 |
Organization-Type | warning | Bundle | Ensure that all Organization resources include a value for type. : entry.select(resource as Organization).exists() implies entry.select(resource as Organization).all(type.exists()) |
Referral-ApprovalQuestionnaire | warning | Bundle | Ensure that all Referral Questionnaire bundles have a response to PatientReferralApproval. : entry.select(resource as QuestionnaireResponse).exists() implies entry.select(resource as QuestionnaireResponse).exists ( (QuestionnaireResponse|repeat('Yes'|PatientReferralApproval)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() or (QuestionnaireResponse|repeat('No'|PatientReferralApproval)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() ) |
Referral-HRSNOutreachQuestionnaire | warning | Bundle | Ensure that all approved Referral Questionnaire bundles have a response to HRSNServiceProviderReferralOutreachDate. : entry.select(resource as QuestionnaireResponse).exists() implies entry.select(resource as QuestionnaireResponse).exists ( (QuestionnaireResponse|repeat('Yes'|PatientReferralApproval)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|HRSNServiceProviderReferralOutreachDate)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() ) |
Referral-SCNOutreachQuestionnaire | warning | Bundle | Ensure that all approved Referral Questionnaire bundles have a response to SCNReferralOutreachDate. : entry.select(resource as QuestionnaireResponse).exists() implies entry.select(resource as QuestionnaireResponse).exists ( (QuestionnaireResponse|repeat('Yes'|PatientReferralApproval)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|SCNReferralOutreachDate)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() ) |
SHINNY-Assessment-Encounter | error | Bundle | Assessment-Encounter should exist : entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-assessment')).exists() implies entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-assessment')) .where(encounter.reference.exists().not()) .count()=0 |
SHINNY-Assessment-Patient | error | Bundle | Assessment-Subject should exist : entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-assessment')).exists() implies entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-assessment')) .where(subject.reference.exists().not()) .count()=0 |
SHINNY-Bundle-Encounter-RI | error | Bundle | Checks for RI between all resources & Encounter : entry.select(resource) .where(encounter.exists()) .encounter.select(reference.split('/')[1]).distinct() .intersect( entry.select(resource as Encounter).id ) .count() = entry.select(resource) .where(encounter.exists()) .encounter.select(reference.split('/')[1]).distinct() .count() |
SHINNY-Bundle-Obs-Encounter-RI | error | Bundle | Checks for RI between Screening Obs & Encounter : entry.select(resource as Observation) .exists(encounter.reference.exists() and meta.profile.contains('shinny-observation-screening-response')) implies entry.select(resource as Observation) .where(encounter.reference.exists() and meta.profile.contains('shinny-observation-screening-response')) .select(encounter.reference.split('/')[1]).distinct() = entry.select(resource as Encounter).id |
SHINNY-Bundle-Obs-Patient-RI | error | Bundle | Checks for RI between Obs & Patient : entry.select(resource as Observation) .where(encounter.reference.exists() and meta.profile.contains('shinny-observation')).count()>1 implies entry.select(resource as Observation) .where(encounter.reference.exists() and meta.profile.contains('shinny-observation')) .encounter.reference.distinct() .contains(entry.select(resource as Encounter).id) |
SHINNY-Bundle-Obs-derivedFrom-RI | error | Bundle | Checks for RI between Observation & child Observation : entry.select(resource as Observation) .where(derivedFrom.exists() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or meta.where(profile.lower().contains('sdohcc-observation')))) .derivedFrom.select(reference.split('/')[1]) .intersect( entry.select(resource as Observation).where(derivedFrom.empty() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or meta.where(profile.lower().contains('sdohcc-observation')))).id) .count() = entry.select(resource as Observation) .where(derivedFrom.exists() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or $this.meta.where(profile.lower().contains('sdohcc-observationscreeningresponse')))) .derivedFrom.reference .count() |
SHINNY-Bundle-Obs-hasMember-RI | error | Bundle | Checks for RI between Observation & child Observations : entry.select(resource as Observation) .where(hasMember.exists() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or meta.where(profile.lower().contains('sdohcc-observation')))) .hasMember.select(reference.split('/')[1]) .intersect( entry.select(resource as Observation).where(hasMember.empty() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or meta.where(profile.lower().contains('sdohcc-observation')))).id) .count() = entry.select(resource as Observation) .where(hasMember.exists() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or $this.meta.where(profile.lower().contains('sdohcc-observationscreeningresponse')))) .hasMember.reference .count() and (entry.select(resource as Observation) .where(hasMember.exists() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or meta.where(profile.lower().contains('sdohcc-observation')))).exists() implies entry.select(resource as Observation) .where(hasMember.exists() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or meta.where(profile.lower().contains('sdohcc-observation')))) .hasMember.select(reference.split('/')[1]) .intersect( entry.select(resource as Observation).where(hasMember.empty() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or meta.where(profile.lower().contains('sdohcc-observationscreeningresponse')))).id) .count() = entry.select(resource as Observation).where(hasMember.empty() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or meta.where(profile.lower().contains('sdohcc-observationscreeningresponse')))).count()) |
SHINNY-Bundle-Patient-Org-RI | error | Bundle | Checks for RI between Patient & Assigning Org : entry.select(resource as Organization).id contains entry.select(resource as Patient) .identifier.where(type.coding.code='MR') .assigner.reference.split('/')[1] |
SHINNY-Bundle-Required | error | Bundle | Every submitted resource should be part of a bundle. : select($this as Bundle).exists() |
SHINNY-Bundle-Required-Resources | error | Bundle | Every bundle should always have one and only one 'Patient' & 'Encounter' and atleast one Org : entry.select(resource as Patient).count() = 1 and entry.select(resource as Encounter).count() > 0 and entry.select(resource as Organization).count() > 0 |
SHINNY-Bundle-screening-consent | error | Bundle | Ensures all bundles with a screening included also includes the consent profile. : ( (select($this as Bundle).where(meta.profile.upper() != 'http://test.shinny.org/us/ny/hrsn/StructureDefinition/SHINNYBundleProfile'.upper()).count() > 0) and ( entry.select(resource as Observation) .where(meta.profile.contains('shinny-observation-screening')).count() > 0 ) ) implies entry.select(resource as Consent).exists() |
SHINNY-Consent-Category | warning | Bundle | Patient Consent category code is 59284-0 : entry.select(resource as Consent).exists() implies entry.select(resource as Consent).category.coding.where(code='59284-0').exists() |
SHINNY-Encounter-Class | warning | Bundle | Ensure that the Encounter resource has a class code; Ensure that the Encounter resource has a class code system : entry.select(resource as Encounter).class .all(code.exists() and system.exists()) |
SHINNY-Encounter-Type | warning | Bundle | Ensure that the Encounter resource has a status code : entry.select(resource as Encounter).type.coding .all(code.exists() and system.exists()) |
SHINNY-Obs-Category | error | Bundle | Ensure that all Observation categories have an SDOH code : entry.select(resource as Observation) .where(meta.profile.contains('shinny-observation-screening-response')) .all(category.coding.system .exists($this.contains('SDOHCC-CodeSystemTemporaryCodes'))) |
SHINNY-Obs-Code | warning | Bundle | Ensure that all Observation resources have screening code; Ensure that all Observation resources have screening code system : entry.select(resource as Observation).where( code.coding.system.exists().not() or code.coding.code.not().exists().not()) .count() = 0 |
SHINNY-Obs-Encounter | warning | Bundle | SDOH Observations should have an Encounter : entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-screening-response')) .all(encounter.reference.exists()) |
SHINNY-Obs-Patient | warning | Bundle | SDOH Observations should have a Patient : entry.select(resource as Observation).where(meta.profile.contains('shinny-observation')) .all(subject.reference.exists()) |
SHINNY-Patient-Address | warning | Bundle | All elements of address should be present : entry.select(resource as Patient). address.where(line.count() > 0 and city.trim().length() > 0 and state.trim().length() > 0 and postalCode.trim().length() > 0 and district.trim().length() > 0).count() > 0 |
SHINNY-Patient-Communication | warning | Bundle | Communication should exist : entry.select(resource as Patient).communication.exists() |
SHINNY-Patient-DOB | error | Bundle | birthDate should be a valid date : entry.select(resource as Patient).birthDate.trim().length() = 10 and entry.select(resource as Patient).birthDate.trim().split('-').count() = 3 |
SHINNY-Patient-Gender | error | Bundle | Gender should be present : entry.select(resource as Patient).where(gender.exists() and gender.trim().length()).count() > 0 |
SHINNY-Patient-GenderId | warning | Bundle | Gender Id should be present : entry.select(resource as Patient).extension.where(url='http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex').count() > 0 |
SHINNY-Patient-MA | error | Bundle | Every bundle should always have only 1 Medicaid CIN (i.e MA) Object within patient.identifier AND the CIN is always in the format of 2 letters, 5 numbers, and 1 letter, e.g., 'AB12345C' : entry.select(resource as Patient).identifier.where(type.coding.code='MA' and value.trim().length() > 0).count() = 1 and entry.select(resource as Patient).identifier.where( value.trim().length() = 8 and type.coding.code='MA' and value.substring(0,1).matches('^[a-zA-Z]+$') and value.substring(1,1).matches('^[a-zA-Z]+$') and value.substring(2,1).matches('^[0-9]*$') and value.substring(3,1).matches('^[0-9]*$') and value.substring(4,1).matches('^[0-9]*$') and value.substring(5,1).matches('^[0-9]*$') and value.substring(6,1).matches('^[0-9]*$') and value.substring(7,1).matches('^[a-zA-Z]+$') ).exists() |
SHINNY-Patient-MRN | error | Bundle | Every bundle should always have only 1 MR (i.e MRN) Object within patient.identifier, system.contains('facility') and value (MRN) is provided : entry.select(resource as Patient).identifier.where(type.coding.code='MR' and value.trim().length() > 0).count() = 1 |
SHINNY-Patient-MiddleName | warning | Bundle | MiddleName should be present : entry.select(resource as Patient).name .extension.where(url.contains('middle-name')) .value.trim().length()>0 |
SHINNY-Patient-Pronouns | warning | Bundle | Pronouns should be present : entry.select(resource as Patient).extension.where(url='http://test.shinny.org/us/ny/hrsn/ValueSet/SHINNYPersonalPronounsVS').exists() implies entry.select(resource as Patient).extension.where(url='http://test.shinny.org/us/ny/hrsn/ValueSet/SHINNYPersonalPronounsVS' and value.select($this as CodeableConcept).coding.code.exists()).exists() |
SHINNY-Patient-Race-Ethnicity | warning | Bundle | Race & Ethnicity should be present : entry.select(resource as Patient).extension.where(url='http://hl7.org/fhir/us/core/StructureDefinition/us-core-race').extension.where(url='ombCategory' and value.system = 'http://terminology.hl7.org/CodeSystem/v3-NullFlavor').exists().not() implies entry.select(resource as Patient). extension.where(url='http://hl7.org/fhir/us/core/StructureDefinition/us-core-race').exists() and entry.select(resource as Patient). extension.where(url='http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity').exists() |
SHINNY-Patient-SSN | warning | Bundle | Every bundle should always have only 1 SSN (i.e SS) Object within patient.identifier : entry.select(resource as Patient).identifier.where(type.coding.code='SS' and value.trim().length() > 0).count() <= 1 |
SHINNY-Resources-Profile-Check | error | Bundle | SHINNY-Resources-Profile-Check : select($this as Bundle).where(meta.profile.upper() != 'http://test.shinny.org/us/ny/hrsn/StructureDefinition/SHINNYBundleProfile'.upper()).count() = 0 and ( entry.select(resource as Patient).exists() implies entry.select(resource as Patient).where(meta.profile.upper() != 'http://test.shinny.org/us/ny/hrsn/StructureDefinition/shinny-patient'.upper()).count() = 0 ) and ( entry.select(resource as Encounter).exists() implies entry.select(resource as Encounter).where(meta.profile.upper() != 'http://test.shinny.org/us/ny/hrsn/StructureDefinition/shinny-encounter'.upper()).count() = 0 ) and ( entry.select(resource as Observation).exists() implies entry.select(resource as Observation).meta.where(profile.upper().startsWith('http://test.shinny.org/us/ny/hrsn/StructureDefinition/shinny-observation'.upper()).not()).count() = 0 ) and ( entry.select(resource as ServiceRequest).exists() implies entry.select(resource as ServiceRequest).where(meta.profile.upper() != 'http://test.shinny.org/us/ny/hrsn/StructureDefinition/SHINNYSDOHServiceRequest'.upper()).count() = 0 ) and ( entry.select(resource as Task).exists() implies entry.select(resource as Task).where(meta.profile.upper() != 'http://test.shinny.org/us/ny/hrsn/StructureDefinition/SHINNYSDOHTaskForReferralManagement'.upper()).count() = 0 ) and ( entry.select(resource as Consent).exists() implies entry.select(resource as Consent).where(meta.profile.upper() != 'http://test.shinny.org/us/ny/hrsn/StructureDefinition/shinny-Consent'.upper()).count() = 0 ) .allTrue() |
SHINNY-Screening-Consent | error | Bundle | All screening bundles must include a consent : entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-screening-response')).exists() implies entry.select(resource as Consent).exists() |
SHINNY-Screening-Patient | error | Bundle | SDOH Screening Observations should have an Patient : entry.select(resource as Observation) .where(meta.profile.contains('shinny-observation-screening') and hasMember.exists()) .all(subject.reference.exists()) |
SHINNYServiceRequestSDOHCategory | error | Bundle | Ensure that all Service Request categories have an SDOH code : entry.select(resource as ServiceRequest) .where(meta.profile.contains('SHINNYSDOHServiceRequest')) .all(category.coding.system .exists($this.contains('SDOHCC-CodeSystemTemporaryCodes'))) |
Screening-Crosswalk-44255-8 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 44255-8 then answer codes must be one of the following: LA6568-5 LA6569-3 LA6570-1 LA6571-9 : entry.select(resource as Observation).where(code.coding.code contains '44255-8').exists() implies entry.select(resource as Observation).where(code.coding.code contains '44255-8').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '44255-8') .value.select($this as CodeableConcept).coding .where(code='LA6568-5' or code='LA6569-3' or code='LA6570-1' or code='LA6571-9').exists() |
Screening-Crosswalk-44250-9 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 44250-9 then answer codes must be one of the following: LA6568-5 LA6569-3 LA6570-1 LA6571-9 : entry.select(resource as Observation).where(code.coding.code contains '44250-9').exists() implies entry.select(resource as Observation).where(code.coding.code contains '44250-9').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '44250-9') .value.select($this as CodeableConcept).coding .where(code='LA6568-5' or code='LA6569-3' or code='LA6570-1' or code='LA6571-9').exists() |
Screening-Crosswalk-68517-2 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 68517-2 then answer codes must be one of the following: LA6270-8 LA26460-8 LA18876-5 LA18891-4 LA18934-2 : entry.select(resource as Observation).where(code.coding.code contains '68517-2').exists() implies entry.select(resource as Observation).where(code.coding.code contains '68517-2').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '68517-2') .value.select($this as CodeableConcept).coding .where(code='LA6270-8' or code='LA26460-8' or code='LA18876-5' or code='LA18891-4' or code='LA18934-2').exists() |
Screening-Crosswalk-68516-4 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 68516-4 then answer codes must be one of the following: LA6111-4 LA13942-0 LA19282-5 LA28855-7 LA28858-1 LA28854-0 LA28853-2 LA28891-2 LA32059-0 LA32060-8 : entry.select(resource as Observation).where(code.coding.code contains '68516-4').exists() implies entry.select(resource as Observation).where(code.coding.code contains '68516-4').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '68516-4') .value.select($this as CodeableConcept).coding .where(code='LA6111-4' or code='LA13942-0' or code='LA19282-5' or code='LA28855-7' or code='LA28858-1' or code='LA28854-0' or code='LA28853-2' or code='LA28891-2' or code='LA32059-0' or code='LA32060-8').exists() |
Screening-Crosswalk-68524-8 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 68524-8 then answer codes must be one of the following: LA6270-8 LA26460-8 LA18876-5 LA18891-4 LA18934-2 : entry.select(resource as Observation).where(code.coding.code contains '68524-8').exists() implies entry.select(resource as Observation).where(code.coding.code contains '68524-8').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '68524-8') .value.select($this as CodeableConcept).coding .where(code='LA6270-8' or code='LA26460-8' or code='LA18876-5' or code='LA18891-4' or code='LA18934-2').exists() |
Screening-Crosswalk-69858-9 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 69858-9 then answer codes must be one of the following: LA33-6 LA32-8 : entry.select(resource as Observation).where(code.coding.code contains '69858-9').exists() implies entry.select(resource as Observation).where(code.coding.code contains '69858-9').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '69858-9') .value.select($this as CodeableConcept).coding .where(code='LA33-6' or code='LA32-8').exists() |
Screening-Crosswalk-69861-3 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 69861-3 then answer codes must be one of the following: LA33-6 LA32-8 : entry.select(resource as Observation).where(code.coding.code contains '69861-3').exists() implies entry.select(resource as Observation).where(code.coding.code contains '69861-3').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '69861-3') .value.select($this as CodeableConcept).coding .where(code='LA33-6' or code='LA32-8').exists() |
Screening-Crosswalk-71802-3 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 71802-3 then answer codes must be one of the following: LA31993-1, LA31994-9, LA31995-6 : entry.select(resource as Observation).where(code.coding.code contains '71802-3').exists() implies entry.select(resource as Observation).where(code.coding.code contains '71802-3').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '71802-3') .value.select($this as CodeableConcept).coding .where(code='LA31993-1' or code='LA31994-9' or code='LA31995-6').exists() |
Screening-Crosswalk-76513-1 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 76513-1 then answer codes must be one of the following: LA15832-1 LA22683-9 LA31980-8 : entry.select(resource as Observation).where(code.coding.code contains '76513-1').exists() implies entry.select(resource as Observation).where(code.coding.code contains '76513-1').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '76513-1') .value.select($this as CodeableConcept).coding .where(code='LA15832-1' or code='LA22683-9' or code='LA31980-8').exists() |
Screening-Crosswalk-88123-5 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 88123-5 then answer codes must be one of the following: LA28397-0 LA6729-3 LA28398-8 : entry.select(resource as Observation).where(code.coding.code contains '88123-5').exists() implies entry.select(resource as Observation).where(code.coding.code contains '88123-5').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '88123-5') .value.select($this as CodeableConcept).coding .where(code='LA28397-0' or code='LA6729-3' or code='LA28398-8').exists() |
Screening-Crosswalk-88122-7 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 88122-7 then answer codes must be one of the following: LA28397-0 LA6729-3 LA28398-8 : entry.select(resource as Observation).where(code.coding.code contains '88122-7').exists() implies entry.select(resource as Observation).where(code.coding.code contains '88122-7').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '88122-7') .value.select($this as CodeableConcept).coding .where(code='LA28397-0' or code='LA6729-3' or code='LA28398-8').exists() |
Screening-Crosswalk-89555-7 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 89555-7 then answer codes must be one of the following: LA6111-4 LA6112-2 LA6113-0 LA6114-8 LA6115-5 LA10137-0 LA10138-8 LA10139-6 : entry.select(resource as Observation).where(code.coding.code contains '89555-7').exists() implies entry.select(resource as Observation).where(code.coding.code contains '89555-7').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '89555-7') .value.select($this as CodeableConcept).coding .where(code='LA6111-4' or code='LA6112-2' or code='LA6113-0' or code='LA6114-8' or code='LA6115-5' or code='LA10137-0' or code='LA10138-8' or code='LA10139-6').exists() |
Screening-Crosswalk-93030-5 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 93030-5 then answer codes must be one of the following: LA33-6 LA32-8 : entry.select(resource as Observation).where(code.coding.code contains '93030-5').exists() implies entry.select(resource as Observation).where(code.coding.code contains '93030-5').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '93030-5') .value.select($this as CodeableConcept).coding .where(code='LA33-6' or code='LA32-8').exists() |
Screening-Crosswalk-93038-8 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 93038-8 then answer codes must be one of the following: LA6568-5 LA13863-8 LA13909-9 LA13902-4 LA13914-9 LA30122-8 : entry.select(resource as Observation).where(code.coding.code contains '93038-8').exists() implies entry.select(resource as Observation).where(code.coding.code contains '93038-8').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '93038-8') .value.select($this as CodeableConcept).coding .where(code='LA6568-5' or code='LA13863-8' or code='LA13909-9' or code='LA13902-4' or code='LA13914-9' or code='LA30122-8').exists() |
Screening-Crosswalk-93159-2 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 93159-2 then answer codes must be one of the following: LA6270-8 LA10066-1 LA10082-8 LA10044-8 LA9933-8 : entry.select(resource as Observation).where(code.coding.code contains '93159-2').exists() implies entry.select(resource as Observation).where(code.coding.code contains '93159-2').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '93159-2') .value.select($this as CodeableConcept).coding .where(code='LA6270-8' or code='LA10066-1' or code='LA10082-8' or code='LA10044-8' or code='LA9933-8').exists() |
Screening-Crosswalk-95530-2 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 95530-2 then answer codes must be one of the following: LA6270-8 LA26460-8 LA18876-5 LA18891-4 LA18934-2 : entry.select(resource as Observation).where(code.coding.code contains '95530-2').exists() implies entry.select(resource as Observation).where(code.coding.code contains '95530-2').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '95530-2') .value.select($this as CodeableConcept).coding .where(code='LA6270-8' or code='LA26460-8' or code='LA18876-5' or code='LA18891-4' or code='LA18934-2').exists() |
Screening-Crosswalk-95615-1 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 95615-1 then answer codes must be one of the following: LA6270-8 LA10066-1 LA10082-8 LA16644-9 LA6482-9 : entry.select(resource as Observation).where(code.coding.code contains '95615-1').exists() implies entry.select(resource as Observation).where(code.coding.code contains '95615-1').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '95615-1') .value.select($this as CodeableConcept).coding .where(code='LA6270-8' or code='LA10066-1' or code='LA10082-8' or code='LA16644-9' or code='LA6482-9').exists() |
Screening-Crosswalk-95618-5 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 95618-5 then answer codes must be one of the following: LA6270-8 LA10066-1 LA10082-8 LA16644-9 LA6482-9 : entry.select(resource as Observation).where(code.coding.code contains '95618-5').exists() implies entry.select(resource as Observation).where(code.coding.code contains '95618-5').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '95618-5') .value.select($this as CodeableConcept).coding .where(code='LA6270-8' or code='LA10066-1' or code='LA10082-8' or code='LA16644-9' or code='LA6482-9').exists() |
Screening-Crosswalk-95617-7 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 95617-7 then answer codes must be one of the following: LA6270-8 LA10066-1 LA10082-8 LA16644-9 LA6482-9 : entry.select(resource as Observation).where(code.coding.code contains '95617-7').exists() implies entry.select(resource as Observation).where(code.coding.code contains '95617-7').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '95617-7') .value.select($this as CodeableConcept).coding .where(code='LA6270-8' or code='LA10066-1' or code='LA10082-8' or code='LA16644-9' or code='LA6482-9').exists() |
Screening-Crosswalk-95616-9 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 95616-9 then answer codes must be one of the following: LA6270-8 LA10066-1 LA10082-8 LA16644-9 LA6482-9 : entry.select(resource as Observation).where(code.coding.code contains '95616-9').exists() implies entry.select(resource as Observation).where(code.coding.code contains '95616-9').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '95616-9') .value.select($this as CodeableConcept).coding .where(code='LA6270-8' or code='LA10066-1' or code='LA10082-8' or code='LA16644-9' or code='LA6482-9').exists() |
Screening-Crosswalk-96779-4 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 96779-4 then answer codes must be one of the following: LA33-6 LA32-8 LA32002-0 : entry.select(resource as Observation).where(code.coding.code contains '96779-4').exists() implies entry.select(resource as Observation).where(code.coding.code contains '96779-4').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '96779-4') .value.select($this as CodeableConcept).coding .where(code='LA33-6' or code='LA32-8' or code='LA32002-0').exists() |
Screening-Crosswalk-96778-6 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 96778-6 then answer codes must be one of the following: LA31996-4 LA28580-1 LA31997-2 LA31998-0 LA31999-8 LA32000-4 LA32001-2 LA9-3 : entry.select(resource as Observation).where(code.coding.code contains '96778-6').exists() implies entry.select(resource as Observation).where(code.coding.code contains '96778-6').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '96778-6') .value.select($this as CodeableConcept).coding .where(code='LA31996-4' or code='LA28580-1' or code='LA31997-2' or code='LA31998-0' or code='LA31999-8' or code='LA32000-4' or code='LA32001-2' or code='LA9-3').exists() |
Screening-Crosswalk-96781-0 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 96781-0 then answer codes must be one of the following: LA31976-6 LA31977-4 LA31978-2 LA31979-0 : entry.select(resource as Observation).where(code.coding.code contains '96781-0').exists() implies entry.select(resource as Observation).where(code.coding.code contains '96781-0').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '96781-0') .value.select($this as CodeableConcept).coding .where(code='LA31976-6' or code='LA31977-4' or code='LA31978-2' or code='LA31978-2').exists() |
Screening-Crosswalk-96780-2 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 96780-2 then answer codes must be one of the following: LA31981-6 LA31982-4 LA31983-2 : entry.select(resource as Observation).where(code.coding.code contains '96780-2').exists() implies entry.select(resource as Observation).where(code.coding.code contains '96780-2').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '96780-2') .value.select($this as CodeableConcept).coding .where(code='LA31981-6' or code='LA31982-4' or code='LA31983-2').exists() |
Screening-Crosswalk-96782-8 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 96782-8 then answer codes must be one of the following: LA33-6 LA32-8 : entry.select(resource as Observation).where(code.coding.code contains '96782-8').exists() implies entry.select(resource as Observation).where(code.coding.code contains '96782-8').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '96782-8') .value.select($this as CodeableConcept).coding .where(code='LA33-6' or code='LA32-8').exists() |
Screening-Crosswalk-96842-0 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 96842-0 then answer codes must be one of the following: LA6270-8 LA26460-8 LA18876-5 LA18891-4 LA18934-2 : entry.select(resource as Observation).where(code.coding.code contains '96842-0').exists() implies entry.select(resource as Observation).where(code.coding.code contains '96842-0').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '96842-0') .value.select($this as CodeableConcept).coding .where(code='LA6270-8' or code='LA26460-8' or code='LA18876-5' or code='LA18891-4' or code='LA18934-2').exists() |
Screening-Crosswalk-97027-7 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 97027-7 then answer codes must be one of the following: LA33-6 LA32-8 : entry.select(resource as Observation).where(code.coding.code contains '97027-7').exists() implies entry.select(resource as Observation).where(code.coding.code contains '97027-7').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '97027-7') .value.select($this as CodeableConcept).coding .where(code='LA33-6' or code='LA32-8').exists() |
ServiceRequest-AuthoredOn | warning | Bundle | Ensure that all Service Requests have a authored on date. : entry.select(resource as ServiceRequest).exists() implies entry.select(resource as ServiceRequest).all(authoredOn.exists()) |
ServiceRequest-CategoryCode | warning | Bundle | Ensure that all Service Requests have a category code. : entry.select(resource as ServiceRequest).exists() implies entry.select(resource as ServiceRequest).( all(category.exists()) and category.all(coding.exists()) and category.coding.all(code.exists()) ) |
ServiceRequest-OccurrencePeriod | warning | Bundle | Ensure that all Service Requests have an occurrence period start and end, or occurrence datetime. : entry.select(resource as ServiceRequest).exists() implies entry.select(resource as ServiceRequest).count() = ( entry.select(resource as ServiceRequest).where(occurrence is Period).select(occurrence) .where(start and end).count() + entry.select(resource as ServiceRequest).where(occurrence is dateTime).count() ) |
ServiceRequest-Quantity | warning | Bundle | Ensure that all Service Requests have a quantity. : entry.select(resource as ServiceRequest).exists() implies entry.select(resource as ServiceRequest) .all(quantity.value.exists()) |
Task-EndPeriod | warning | Bundle | Ensure that all completed Tasks have an end execution period. : entry.select(resource as Task).where(status = 'completed').exists() implies entry.select(resource as Task).where(status = 'completed').all(executionPeriod.end.exists()) |
Task-Repetitions | warning | Bundle | Ensure that all Tasks have a value for repetitions. : entry.select(resource as Task).exists() implies entry.select(resource as Task).all(restriction.repetitions.exists()) |
Task-StartPeriod | warning | Bundle | Ensure that all Tasks have a starting execution period. : entry.select(resource as Task).exists() implies entry.select(resource as Task).all(executionPeriod.start.exists()) |
Task-StatusReason | error | Bundle | Ensure that all tasks exists, have a statusReason If the Task.status is rejected, cancelled, completed, or failed. : entry.select(resource as Task).where(status = 'rejected' or status = 'cancelled' or status = 'completed' or status = 'failed').exists() implies entry.select(resource as Task).where(status = 'rejected' or status = 'cancelled' or status = 'completed' or status = 'failed') .all(statusReason.text.exists()) |
shinny-sexual-orientation | warning | Bundle | If there is no component or hasMember element then either a value[x] or a data absent reason must be present : entry.select(resource as Observation).where(meta.profile.contains('shin-ny-observation-sexual-orientation')).exists() implies entry.select(resource as Observation).where(meta.profile.contains('shin-ny-observation-sexual-orientation')) .where(value.exists() or dataAbsentReason.exists()) .count()=1 |

Snapshot View

Name | Flags | Card. | Type | Description & Constraints Filter: Bindings Constraints Obligations
--- | --- | --- | --- | ---
Bundle | C | 0..* | Bundle | Contains a collection of resources Constraints: bdl-1, bdl-2, bdl-3, bdl-4, bdl-7, bdl-9, bdl-10, bdl-11, bdl-12, SHINNY-Patient-MRN, SHINNY-Patient-MA, SHINNY-Patient-SSN, SHINNY-Patient-Address, SHINNY-Patient-DOB, SHINNY-Patient-Gender, SHINNY-Patient-GenderId, SHINNY-Patient-Race-Ethnicity, SHINNY-Patient-Communication, SHINNY-Patient-MiddleName, SHINNY-Patient-Pronouns, shinny-sexual-orientation, SHINNY-Bundle-Obs-hasMember-RI, SHINNY-Encounter-Class, SHINNY-Encounter-Type, Encounter-PeriodStart, Encounter-PeriodEnd, SHINNY-Obs-Encounter, SHINNY-Obs-Patient, SHINNY-Obs-Code, SHINNY-Obs-Category, SHINNY-Screening-Patient, ObservationScreenRes-Langauge, ObservationScreenRes-CategoryDisplay, ObservationScreenRes-CodeCode, ObservationScreenRes-CodeDisplay, ObservationScreenRes-Interpretation, SHINNY-Screening-Consent, Assessment-ConditionID, Assessment-ConditionSNOMED, Assessment-ConditionICD10, Assessment-ApprovalQuestionnaire, Assessment-OutreachQuestionnaire, Assessment-AdminQuestionnaire, Assessment-ServiceDupQuestionnaire, SHINNY-Assessment-Encounter, SHINNY-Assessment-Patient, ServiceRequest-Quantity, ServiceRequest-CategoryCode, ServiceRequest-OccurrencePeriod, ServiceRequest-AuthoredOn, SHINNYServiceRequestSDOHCategory, Task-StatusReason, Task-Repetitions, Task-EndPeriod, Task-StartPeriod, Referral-ApprovalQuestionnaire, Referral-HRSNOutreachQuestionnaire, Referral-SCNOutreachQuestionnaire, SHINNY-Bundle-Required-Resources, SHINNY-Bundle-Required, SHINNY-Bundle-Patient-Org-RI, SHINNY-Bundle-Encounter-RI, SHINNY-Bundle-Obs-derivedFrom-RI, SHINNY-Bundle-Obs-Patient-RI, SHINNY-Bundle-Obs-Encounter-RI, Screening-Crosswalk-44250-9, Screening-Crosswalk-44255-8, Screening-Crosswalk-68516-4, Screening-Crosswalk-68517-2, Screening-Crosswalk-68524-8, Screening-Crosswalk-69858-9, Screening-Crosswalk-69861-3, Screening-Crosswalk-71802-3, Screening-Crosswalk-76513-1, Screening-Crosswalk-88122-7, Screening-Crosswalk-88123-5, Screening-Crosswalk-89555-7, Screening-Crosswalk-93030-5, Screening-Crosswalk-93038-8, Screening-Crosswalk-93159-2, Screening-Crosswalk-95530-2, Screening-Crosswalk-95615-1, Screening-Crosswalk-95616-9, Screening-Crosswalk-95617-7, Screening-Crosswalk-95618-5, Screening-Crosswalk-96778-6, Screening-Crosswalk-96779-4, Screening-Crosswalk-96780-2, Screening-Crosswalk-96781-0, Screening-Crosswalk-96782-8, Screening-Crosswalk-96842-0, Screening-Crosswalk-97027-7, SHINNY-Consent-Category, Consent-ProvisionType, SHINNY-Bundle-screening-consent, Goal-StatusDate, Goal-AchievementStatus, Location-Address, Location-Type, Organization-Address, Organization-Type, SHINNY-Resources-Profile-Check
id | S Σ | 1..1 | id | Logical id of this artifact
meta | S Σ | 1..1 | SHINNYMeta | Metadata about the resource
implicitRules | ?!Σ | 0..1 | uri | A set of rules under which this content was created
language |  | 0..1 | code | Language of the resource content Binding: SHINNYLanguageVS (preferred)
identifier | Σ | 0..1 | Identifier | Persistent identifier for the bundle
type | Σ | 1..1 | code | document | message | transaction | transaction-response | batch | batch-response | history | searchset | collection Binding: BundleType (required): Indicates the purpose of a bundle - how it is intended to be used.
timestamp | Σ | 0..1 | instant | When the bundle was assembled
total | Σ C | 0..1 | unsignedInt | If search, the total number of matches
link | Σ | 0..* | BackboneElement | Links related to this Bundle
id |  | 0..1 | string | Unique id for inter-element referencing
extension |  | 0..* | Extension | Additional content defined by implementations
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized
relation | Σ | 1..1 | string | See http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1
url | Σ | 1..1 | uri | Reference details for the link
entry | Σ C | 0..* | BackboneElement | Entry in the bundle - will have a resource or information Constraints: bdl-5, bdl-8 This repeating element order: For bundles of type 'document' and 'message', the first resource is special (must be Composition or MessageHeader respectively). For all bundles, the meaning of the order of entries depends on the bundle type
id |  | 0..1 | string | Unique id for inter-element referencing
extension |  | 0..* | Extension | Additional content defined by implementations
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized
link | Σ | 0..* | See link (Bundle) | Links related to this entry
fullUrl | Σ | 0..1 | uri | URI for resource (Absolute URL server address or URI for UUID/OID)
resource | Σ | 0..1 | Resource | A resource in the bundle
search | Σ C | 0..1 | BackboneElement | Search related information
id |  | 0..1 | string | Unique id for inter-element referencing
extension |  | 0..* | Extension | Additional content defined by implementations
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized
mode | Σ | 0..1 | code | match | include | outcome - why this is in the result set Binding: SearchEntryMode (required): Why an entry is in the result set - whether it's included as a match or because of an _include requirement, or to convey information or warning information about the search process.
score | Σ | 0..1 | decimal | Search ranking (between 0 and 1)
request | Σ C | 0..1 | BackboneElement | Additional execution information (transaction/batch/history)
id |  | 0..1 | string | Unique id for inter-element referencing
extension |  | 0..* | Extension | Additional content defined by implementations
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized
method | Σ | 1..1 | code | GET | HEAD | POST | PUT | DELETE | PATCH Binding: HTTPVerb (required): HTTP verbs (in the HTTP command line). See HTTP rfc for details.
url | Σ | 1..1 | uri | URL for HTTP equivalent of this entry
ifNoneMatch | Σ | 0..1 | string | For managing cache currency
ifModifiedSince | Σ | 0..1 | instant | For managing cache currency
ifMatch | Σ | 0..1 | string | For managing update contention
ifNoneExist | Σ | 0..1 | string | For conditional creates
response | Σ C | 0..1 | BackboneElement | Results of execution (transaction/batch/history)
id |  | 0..1 | string | Unique id for inter-element referencing
extension |  | 0..* | Extension | Additional content defined by implementations
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized
status | Σ | 1..1 | string | Status response code (text optional)
location | Σ | 0..1 | uri | The location (if the operation returns a location)
etag | Σ | 0..1 | string | The Etag for the resource (if relevant)
lastModified | Σ | 0..1 | instant | Server's date time modified
outcome | Σ | 0..1 | Resource | OperationOutcome with hints and warnings (for batch/transaction)
signature | Σ | 0..1 | Signature | Digital Signature
Documentation for this format

#### Terminology Bindings

Path | Conformance | ValueSet | URI
Bundle.language | preferred | SHINNYLanguageVS `http://test.shinny.org/us/ny/hrsn/ValueSet/SHINNYLanguageVS` From this IG
Bundle.type | required | BundleType `http://hl7.org/fhir/ValueSet/bundle-type|4.0.1` From the FHIR Standard
Bundle.entry.search.mode | required | SearchEntryMode `http://hl7.org/fhir/ValueSet/search-entry-mode|4.0.1` From the FHIR Standard
Bundle.entry.request.method | required | HTTPVerb `http://hl7.org/fhir/ValueSet/http-verb|4.0.1` From the FHIR Standard

#### Constraints

Id | Grade | Path(s) | Details | Requirements
Assessment-AdminQuestionnaire | warning | Bundle | Ensure that all Assessment Questionnaire bundles have a response to the service duplication indicators. : entry.select(resource as QuestionnaireResponse).exists() implies entry.select(resource as QuestionnaireResponse).exists ( (QuestionnaireResponse|repeat('Yes'|PatientAssessmentApproval)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|EnhancedPopulationCheck)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|ServiceDuplicationCheck)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|ClinicalCriteriaCheck)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() ) |
Assessment-ApprovalQuestionnaire | warning | Bundle | Ensure that all Assessment Questionnaire bundles have a response to PatientAssessmentApproval. : entry.select(resource as QuestionnaireResponse).exists() implies entry.select(resource as QuestionnaireResponse).exists ( (QuestionnaireResponse|repeat('Yes'|PatientAssessmentApproval)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() or (QuestionnaireResponse|repeat('No'|PatientAssessmentApproval)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() ) |
Assessment-ConditionICD10 | warning | Bundle | Ensure that all final assessments have a Condition ICD-10 term. : entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-assessment') and status='final').exists() implies entry.select(resource as Condition).count() = entry.select(resource as Condition).select(code.coding) .where(system.contains('http://hl7.org/fhir/sid/icd-10-cm')) .count() and entry.select(resource as Condition).count() !=0 |
Assessment-ConditionID | warning | Bundle | Ensure that all final assessments have a Condition identifier. : entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-assessment') and status = 'final').exists() implies entry.select(resource as Observation) .where( meta.profile.contains('shinny-observation-assessment') and status = 'final' ).count() = entry.select(resource as Condition).id.count() |
Assessment-ConditionSNOMED | warning | Bundle | Ensure that all final assessments have a Condition category SNOMED term. : entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-assessment') and status='final').exists() implies entry.select(resource as Condition).count() = entry.select(resource as Condition).select(code.coding) .where(system.contains('http://snomed.info/sct')) .count() and entry.select(resource as Condition).count() !=0 |
Assessment-OutreachQuestionnaire | warning | Bundle | Ensure that all Assessment Questionnaire bundles with patient approval contain a Patient Assessment Outreach Date and a Patient Assessment Status. : entry.select(resource as QuestionnaireResponse).exists() implies entry.select(resource as QuestionnaireResponse).exists ( (QuestionnaireResponse|repeat('Yes'|PatientAssessmentApproval)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|PatientAssessmentOutreachDate)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|PatientAssessmentOutreachStatus)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() ) |
Assessment-ServiceDupQuestionnaire | warning | Bundle | Ensure that all Assessment Questionnaire bundles have a response to the service duplication indicators. : entry.select(resource as QuestionnaireResponse).exists() implies entry.select(resource as QuestionnaireResponse).exists ( (QuestionnaireResponse|repeat('Yes'|PatientAssessmentApproval)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|CurrentHousingProgramRecipientIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|CurrentNutritionalEducationProgramRecipientIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|CurrentNutritionalServicesProgramRecipientIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|CurrentFoodServiceProgramRecipientIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|CurrentSNAPProgramRecipientIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|CurrentWICProgramRecipientIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|CurrentTANFProgramRecipientIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|CurrentTransportationProgramRecipientIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|MedicationRequiringRefrigerationIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|BreastMilkRequiringRefrigerationIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|ADLs/IADLsIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|MedicalRespiteRequirementsIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|ChildcareAssistanceIndicator)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() ) |
Consent-ProvisionType | warning | Bundle | Ensure that all Consents include a value for provision type. : entry.select(resource as Consent) .all(provision.type.exists()) |
Encounter-PeriodEnd | warning | Bundle | Ensure that all finished Encounters include a value for period.end. : entry.select(resource as Encounter) .where(status.contains('finished')) .all(period.end.exists()) |
Encounter-PeriodStart | warning | Bundle | Ensure that all Encounters include a value for period.start. : entry.select(resource as Encounter) .all(period.start.exists()) |
Goal-AchievementStatus | warning | Bundle | Ensure that all Goals include a value for achivementStatus. : entry.select(resource as Goal).exists() implies entry.select(resource as Goal).all(achievementStatus.exists()) |
Goal-StatusDate | warning | Bundle | Ensure that all Goals include a value for statusDate. : entry.select(resource as Goal).exists() implies entry.select(resource as Goal).all(statusDate.exists()) |
Location-Address | warning | Bundle | Ensure that all Location resources include all address elements. : entry.select(resource as Location). address.where(line.count() > 0 and city.trim().length() > 0 and state.trim().length() > 0 and postalCode.trim().length() > 0 and district.trim().length() > 0).count() > 0 |
Location-Type | warning | Bundle | Ensure that all Location resources include a value for type. : entry.select(resource as Location).exists() implies entry.select(resource as Location).all(type.exists()) |
ObservationScreenRes-CategoryDisplay | warning | Bundle | Ensure that all Observation Screening Responses have a category display. : entry.select(resource as Observation) .where(meta.profile.contains('shinny-observation-screening-response') ) .category.coding.where( system.contains('/CodeSystem/observation-category').not() ). all(display.exists()) |
ObservationScreenRes-CodeCode | warning | Bundle | Ensure that all Observation Screening Responses have a code code. : entry.select(resource as Observation) .where(meta.profile.contains('shinny-observation-screening-response')) .code.coding .all(code.exists()) |
ObservationScreenRes-CodeDisplay | warning | Bundle | Ensure that all Observation Screening Responses have a code dispay. : entry.select(resource as Observation) .where(meta.profile.contains('shinny-observation-screening-response')) .code.coding .all(display.exists()) |
ObservationScreenRes-Interpretation | warning | Bundle | Ensure that specific Observation Screening Responses have an interpretation. : entry.select(resource as Observation) .where(meta.profile.contains('shinny-observation-screening-response')) .where(derivedFrom.exists().not()) .all(interpretation.exists()) |
ObservationScreenRes-Langauge | warning | Bundle | Ensure that all Observation Screening Responses have a language. : entry.select(resource as Observation) .where(meta.profile.contains('shinny-observation-screening-response') ) .all(language.exists()) |
Organization-Address | warning | Bundle | Ensure that all Organization resources include all address elements. : entry.select(resource as Organization). address.where(line.count() > 0 and city.trim().length() > 0 and state.trim().length() > 0 and postalCode.trim().length() > 0 and district.trim().length() > 0).count() > 0 |
Organization-Type | warning | Bundle | Ensure that all Organization resources include a value for type. : entry.select(resource as Organization).exists() implies entry.select(resource as Organization).all(type.exists()) |
Referral-ApprovalQuestionnaire | warning | Bundle | Ensure that all Referral Questionnaire bundles have a response to PatientReferralApproval. : entry.select(resource as QuestionnaireResponse).exists() implies entry.select(resource as QuestionnaireResponse).exists ( (QuestionnaireResponse|repeat('Yes'|PatientReferralApproval)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() or (QuestionnaireResponse|repeat('No'|PatientReferralApproval)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() ) |
Referral-HRSNOutreachQuestionnaire | warning | Bundle | Ensure that all approved Referral Questionnaire bundles have a response to HRSNServiceProviderReferralOutreachDate. : entry.select(resource as QuestionnaireResponse).exists() implies entry.select(resource as QuestionnaireResponse).exists ( (QuestionnaireResponse|repeat('Yes'|PatientReferralApproval)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|HRSNServiceProviderReferralOutreachDate)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() ) |
Referral-SCNOutreachQuestionnaire | warning | Bundle | Ensure that all approved Referral Questionnaire bundles have a response to SCNReferralOutreachDate. : entry.select(resource as QuestionnaireResponse).exists() implies entry.select(resource as QuestionnaireResponse).exists ( (QuestionnaireResponse|repeat('Yes'|PatientReferralApproval)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() and (QuestionnaireResponse|repeat(''|SCNReferralOutreachDate)).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() ) |
SHINNY-Assessment-Encounter | error | Bundle | Assessment-Encounter should exist : entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-assessment')).exists() implies entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-assessment')) .where(encounter.reference.exists().not()) .count()=0 |
SHINNY-Assessment-Patient | error | Bundle | Assessment-Subject should exist : entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-assessment')).exists() implies entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-assessment')) .where(subject.reference.exists().not()) .count()=0 |
SHINNY-Bundle-Encounter-RI | error | Bundle | Checks for RI between all resources & Encounter : entry.select(resource) .where(encounter.exists()) .encounter.select(reference.split('/')[1]).distinct() .intersect( entry.select(resource as Encounter).id ) .count() = entry.select(resource) .where(encounter.exists()) .encounter.select(reference.split('/')[1]).distinct() .count() |
SHINNY-Bundle-Obs-Encounter-RI | error | Bundle | Checks for RI between Screening Obs & Encounter : entry.select(resource as Observation) .exists(encounter.reference.exists() and meta.profile.contains('shinny-observation-screening-response')) implies entry.select(resource as Observation) .where(encounter.reference.exists() and meta.profile.contains('shinny-observation-screening-response')) .select(encounter.reference.split('/')[1]).distinct() = entry.select(resource as Encounter).id |
SHINNY-Bundle-Obs-Patient-RI | error | Bundle | Checks for RI between Obs & Patient : entry.select(resource as Observation) .where(encounter.reference.exists() and meta.profile.contains('shinny-observation')).count()>1 implies entry.select(resource as Observation) .where(encounter.reference.exists() and meta.profile.contains('shinny-observation')) .encounter.reference.distinct() .contains(entry.select(resource as Encounter).id) |
SHINNY-Bundle-Obs-derivedFrom-RI | error | Bundle | Checks for RI between Observation & child Observation : entry.select(resource as Observation) .where(derivedFrom.exists() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or meta.where(profile.lower().contains('sdohcc-observation')))) .derivedFrom.select(reference.split('/')[1]) .intersect( entry.select(resource as Observation).where(derivedFrom.empty() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or meta.where(profile.lower().contains('sdohcc-observation')))).id) .count() = entry.select(resource as Observation) .where(derivedFrom.exists() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or $this.meta.where(profile.lower().contains('sdohcc-observationscreeningresponse')))) .derivedFrom.reference .count() |
SHINNY-Bundle-Obs-hasMember-RI | error | Bundle | Checks for RI between Observation & child Observations : entry.select(resource as Observation) .where(hasMember.exists() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or meta.where(profile.lower().contains('sdohcc-observation')))) .hasMember.select(reference.split('/')[1]) .intersect( entry.select(resource as Observation).where(hasMember.empty() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or meta.where(profile.lower().contains('sdohcc-observation')))).id) .count() = entry.select(resource as Observation) .where(hasMember.exists() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or $this.meta.where(profile.lower().contains('sdohcc-observationscreeningresponse')))) .hasMember.reference .count() and (entry.select(resource as Observation) .where(hasMember.exists() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or meta.where(profile.lower().contains('sdohcc-observation')))).exists() implies entry.select(resource as Observation) .where(hasMember.exists() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or meta.where(profile.lower().contains('sdohcc-observation')))) .hasMember.select(reference.split('/')[1]) .intersect( entry.select(resource as Observation).where(hasMember.empty() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or meta.where(profile.lower().contains('sdohcc-observationscreeningresponse')))).id) .count() = entry.select(resource as Observation).where(hasMember.empty() and (meta.where(profile.lower().contains('shinny-observation-screening-response')) or meta.where(profile.lower().contains('sdohcc-observationscreeningresponse')))).count()) |
SHINNY-Bundle-Patient-Org-RI | error | Bundle | Checks for RI between Patient & Assigning Org : entry.select(resource as Organization).id contains entry.select(resource as Patient) .identifier.where(type.coding.code='MR') .assigner.reference.split('/')[1] |
SHINNY-Bundle-Required | error | Bundle | Every submitted resource should be part of a bundle. : select($this as Bundle).exists() |
SHINNY-Bundle-Required-Resources | error | Bundle | Every bundle should always have one and only one 'Patient' & 'Encounter' and atleast one Org : entry.select(resource as Patient).count() = 1 and entry.select(resource as Encounter).count() > 0 and entry.select(resource as Organization).count() > 0 |
SHINNY-Bundle-screening-consent | error | Bundle | Ensures all bundles with a screening included also includes the consent profile. : ( (select($this as Bundle).where(meta.profile.upper() != 'http://test.shinny.org/us/ny/hrsn/StructureDefinition/SHINNYBundleProfile'.upper()).count() > 0) and ( entry.select(resource as Observation) .where(meta.profile.contains('shinny-observation-screening')).count() > 0 ) ) implies entry.select(resource as Consent).exists() |
SHINNY-Consent-Category | warning | Bundle | Patient Consent category code is 59284-0 : entry.select(resource as Consent).exists() implies entry.select(resource as Consent).category.coding.where(code='59284-0').exists() |
SHINNY-Encounter-Class | warning | Bundle | Ensure that the Encounter resource has a class code; Ensure that the Encounter resource has a class code system : entry.select(resource as Encounter).class .all(code.exists() and system.exists()) |
SHINNY-Encounter-Type | warning | Bundle | Ensure that the Encounter resource has a status code : entry.select(resource as Encounter).type.coding .all(code.exists() and system.exists()) |
SHINNY-Obs-Category | error | Bundle | Ensure that all Observation categories have an SDOH code : entry.select(resource as Observation) .where(meta.profile.contains('shinny-observation-screening-response')) .all(category.coding.system .exists($this.contains('SDOHCC-CodeSystemTemporaryCodes'))) |
SHINNY-Obs-Code | warning | Bundle | Ensure that all Observation resources have screening code; Ensure that all Observation resources have screening code system : entry.select(resource as Observation).where( code.coding.system.exists().not() or code.coding.code.not().exists().not()) .count() = 0 |
SHINNY-Obs-Encounter | warning | Bundle | SDOH Observations should have an Encounter : entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-screening-response')) .all(encounter.reference.exists()) |
SHINNY-Obs-Patient | warning | Bundle | SDOH Observations should have a Patient : entry.select(resource as Observation).where(meta.profile.contains('shinny-observation')) .all(subject.reference.exists()) |
SHINNY-Patient-Address | warning | Bundle | All elements of address should be present : entry.select(resource as Patient). address.where(line.count() > 0 and city.trim().length() > 0 and state.trim().length() > 0 and postalCode.trim().length() > 0 and district.trim().length() > 0).count() > 0 |
SHINNY-Patient-Communication | warning | Bundle | Communication should exist : entry.select(resource as Patient).communication.exists() |
SHINNY-Patient-DOB | error | Bundle | birthDate should be a valid date : entry.select(resource as Patient).birthDate.trim().length() = 10 and entry.select(resource as Patient).birthDate.trim().split('-').count() = 3 |
SHINNY-Patient-Gender | error | Bundle | Gender should be present : entry.select(resource as Patient).where(gender.exists() and gender.trim().length()).count() > 0 |
SHINNY-Patient-GenderId | warning | Bundle | Gender Id should be present : entry.select(resource as Patient).extension.where(url='http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex').count() > 0 |
SHINNY-Patient-MA | error | Bundle | Every bundle should always have only 1 Medicaid CIN (i.e MA) Object within patient.identifier AND the CIN is always in the format of 2 letters, 5 numbers, and 1 letter, e.g., 'AB12345C' : entry.select(resource as Patient).identifier.where(type.coding.code='MA' and value.trim().length() > 0).count() = 1 and entry.select(resource as Patient).identifier.where( value.trim().length() = 8 and type.coding.code='MA' and value.substring(0,1).matches('^[a-zA-Z]+$') and value.substring(1,1).matches('^[a-zA-Z]+$') and value.substring(2,1).matches('^[0-9]*$') and value.substring(3,1).matches('^[0-9]*$') and value.substring(4,1).matches('^[0-9]*$') and value.substring(5,1).matches('^[0-9]*$') and value.substring(6,1).matches('^[0-9]*$') and value.substring(7,1).matches('^[a-zA-Z]+$') ).exists() |
SHINNY-Patient-MRN | error | Bundle | Every bundle should always have only 1 MR (i.e MRN) Object within patient.identifier, system.contains('facility') and value (MRN) is provided : entry.select(resource as Patient).identifier.where(type.coding.code='MR' and value.trim().length() > 0).count() = 1 |
SHINNY-Patient-MiddleName | warning | Bundle | MiddleName should be present : entry.select(resource as Patient).name .extension.where(url.contains('middle-name')) .value.trim().length()>0 |
SHINNY-Patient-Pronouns | warning | Bundle | Pronouns should be present : entry.select(resource as Patient).extension.where(url='http://test.shinny.org/us/ny/hrsn/ValueSet/SHINNYPersonalPronounsVS').exists() implies entry.select(resource as Patient).extension.where(url='http://test.shinny.org/us/ny/hrsn/ValueSet/SHINNYPersonalPronounsVS' and value.select($this as CodeableConcept).coding.code.exists()).exists() |
SHINNY-Patient-Race-Ethnicity | warning | Bundle | Race & Ethnicity should be present : entry.select(resource as Patient).extension.where(url='http://hl7.org/fhir/us/core/StructureDefinition/us-core-race').extension.where(url='ombCategory' and value.system = 'http://terminology.hl7.org/CodeSystem/v3-NullFlavor').exists().not() implies entry.select(resource as Patient). extension.where(url='http://hl7.org/fhir/us/core/StructureDefinition/us-core-race').exists() and entry.select(resource as Patient). extension.where(url='http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity').exists() |
SHINNY-Patient-SSN | warning | Bundle | Every bundle should always have only 1 SSN (i.e SS) Object within patient.identifier : entry.select(resource as Patient).identifier.where(type.coding.code='SS' and value.trim().length() > 0).count() <= 1 |
SHINNY-Resources-Profile-Check | error | Bundle | SHINNY-Resources-Profile-Check : select($this as Bundle).where(meta.profile.upper() != 'http://test.shinny.org/us/ny/hrsn/StructureDefinition/SHINNYBundleProfile'.upper()).count() = 0 and ( entry.select(resource as Patient).exists() implies entry.select(resource as Patient).where(meta.profile.upper() != 'http://test.shinny.org/us/ny/hrsn/StructureDefinition/shinny-patient'.upper()).count() = 0 ) and ( entry.select(resource as Encounter).exists() implies entry.select(resource as Encounter).where(meta.profile.upper() != 'http://test.shinny.org/us/ny/hrsn/StructureDefinition/shinny-encounter'.upper()).count() = 0 ) and ( entry.select(resource as Observation).exists() implies entry.select(resource as Observation).meta.where(profile.upper().startsWith('http://test.shinny.org/us/ny/hrsn/StructureDefinition/shinny-observation'.upper()).not()).count() = 0 ) and ( entry.select(resource as ServiceRequest).exists() implies entry.select(resource as ServiceRequest).where(meta.profile.upper() != 'http://test.shinny.org/us/ny/hrsn/StructureDefinition/SHINNYSDOHServiceRequest'.upper()).count() = 0 ) and ( entry.select(resource as Task).exists() implies entry.select(resource as Task).where(meta.profile.upper() != 'http://test.shinny.org/us/ny/hrsn/StructureDefinition/SHINNYSDOHTaskForReferralManagement'.upper()).count() = 0 ) and ( entry.select(resource as Consent).exists() implies entry.select(resource as Consent).where(meta.profile.upper() != 'http://test.shinny.org/us/ny/hrsn/StructureDefinition/shinny-Consent'.upper()).count() = 0 ) .allTrue() |
SHINNY-Screening-Consent | error | Bundle | All screening bundles must include a consent : entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-screening-response')).exists() implies entry.select(resource as Consent).exists() |
SHINNY-Screening-Patient | error | Bundle | SDOH Screening Observations should have an Patient : entry.select(resource as Observation) .where(meta.profile.contains('shinny-observation-screening') and hasMember.exists()) .all(subject.reference.exists()) |
SHINNYServiceRequestSDOHCategory | error | Bundle | Ensure that all Service Request categories have an SDOH code : entry.select(resource as ServiceRequest) .where(meta.profile.contains('SHINNYSDOHServiceRequest')) .all(category.coding.system .exists($this.contains('SDOHCC-CodeSystemTemporaryCodes'))) |
Screening-Crosswalk-44255-8 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 44255-8 then answer codes must be one of the following: LA6568-5 LA6569-3 LA6570-1 LA6571-9 : entry.select(resource as Observation).where(code.coding.code contains '44255-8').exists() implies entry.select(resource as Observation).where(code.coding.code contains '44255-8').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '44255-8') .value.select($this as CodeableConcept).coding .where(code='LA6568-5' or code='LA6569-3' or code='LA6570-1' or code='LA6571-9').exists() |
Screening-Crosswalk-44250-9 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 44250-9 then answer codes must be one of the following: LA6568-5 LA6569-3 LA6570-1 LA6571-9 : entry.select(resource as Observation).where(code.coding.code contains '44250-9').exists() implies entry.select(resource as Observation).where(code.coding.code contains '44250-9').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '44250-9') .value.select($this as CodeableConcept).coding .where(code='LA6568-5' or code='LA6569-3' or code='LA6570-1' or code='LA6571-9').exists() |
Screening-Crosswalk-68517-2 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 68517-2 then answer codes must be one of the following: LA6270-8 LA26460-8 LA18876-5 LA18891-4 LA18934-2 : entry.select(resource as Observation).where(code.coding.code contains '68517-2').exists() implies entry.select(resource as Observation).where(code.coding.code contains '68517-2').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '68517-2') .value.select($this as CodeableConcept).coding .where(code='LA6270-8' or code='LA26460-8' or code='LA18876-5' or code='LA18891-4' or code='LA18934-2').exists() |
Screening-Crosswalk-68516-4 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 68516-4 then answer codes must be one of the following: LA6111-4 LA13942-0 LA19282-5 LA28855-7 LA28858-1 LA28854-0 LA28853-2 LA28891-2 LA32059-0 LA32060-8 : entry.select(resource as Observation).where(code.coding.code contains '68516-4').exists() implies entry.select(resource as Observation).where(code.coding.code contains '68516-4').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '68516-4') .value.select($this as CodeableConcept).coding .where(code='LA6111-4' or code='LA13942-0' or code='LA19282-5' or code='LA28855-7' or code='LA28858-1' or code='LA28854-0' or code='LA28853-2' or code='LA28891-2' or code='LA32059-0' or code='LA32060-8').exists() |
Screening-Crosswalk-68524-8 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 68524-8 then answer codes must be one of the following: LA6270-8 LA26460-8 LA18876-5 LA18891-4 LA18934-2 : entry.select(resource as Observation).where(code.coding.code contains '68524-8').exists() implies entry.select(resource as Observation).where(code.coding.code contains '68524-8').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '68524-8') .value.select($this as CodeableConcept).coding .where(code='LA6270-8' or code='LA26460-8' or code='LA18876-5' or code='LA18891-4' or code='LA18934-2').exists() |
Screening-Crosswalk-69858-9 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 69858-9 then answer codes must be one of the following: LA33-6 LA32-8 : entry.select(resource as Observation).where(code.coding.code contains '69858-9').exists() implies entry.select(resource as Observation).where(code.coding.code contains '69858-9').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '69858-9') .value.select($this as CodeableConcept).coding .where(code='LA33-6' or code='LA32-8').exists() |
Screening-Crosswalk-69861-3 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 69861-3 then answer codes must be one of the following: LA33-6 LA32-8 : entry.select(resource as Observation).where(code.coding.code contains '69861-3').exists() implies entry.select(resource as Observation).where(code.coding.code contains '69861-3').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '69861-3') .value.select($this as CodeableConcept).coding .where(code='LA33-6' or code='LA32-8').exists() |
Screening-Crosswalk-71802-3 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 71802-3 then answer codes must be one of the following: LA31993-1, LA31994-9, LA31995-6 : entry.select(resource as Observation).where(code.coding.code contains '71802-3').exists() implies entry.select(resource as Observation).where(code.coding.code contains '71802-3').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '71802-3') .value.select($this as CodeableConcept).coding .where(code='LA31993-1' or code='LA31994-9' or code='LA31995-6').exists() |
Screening-Crosswalk-76513-1 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 76513-1 then answer codes must be one of the following: LA15832-1 LA22683-9 LA31980-8 : entry.select(resource as Observation).where(code.coding.code contains '76513-1').exists() implies entry.select(resource as Observation).where(code.coding.code contains '76513-1').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '76513-1') .value.select($this as CodeableConcept).coding .where(code='LA15832-1' or code='LA22683-9' or code='LA31980-8').exists() |
Screening-Crosswalk-88123-5 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 88123-5 then answer codes must be one of the following: LA28397-0 LA6729-3 LA28398-8 : entry.select(resource as Observation).where(code.coding.code contains '88123-5').exists() implies entry.select(resource as Observation).where(code.coding.code contains '88123-5').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '88123-5') .value.select($this as CodeableConcept).coding .where(code='LA28397-0' or code='LA6729-3' or code='LA28398-8').exists() |
Screening-Crosswalk-88122-7 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 88122-7 then answer codes must be one of the following: LA28397-0 LA6729-3 LA28398-8 : entry.select(resource as Observation).where(code.coding.code contains '88122-7').exists() implies entry.select(resource as Observation).where(code.coding.code contains '88122-7').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '88122-7') .value.select($this as CodeableConcept).coding .where(code='LA28397-0' or code='LA6729-3' or code='LA28398-8').exists() |
Screening-Crosswalk-89555-7 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 89555-7 then answer codes must be one of the following: LA6111-4 LA6112-2 LA6113-0 LA6114-8 LA6115-5 LA10137-0 LA10138-8 LA10139-6 : entry.select(resource as Observation).where(code.coding.code contains '89555-7').exists() implies entry.select(resource as Observation).where(code.coding.code contains '89555-7').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '89555-7') .value.select($this as CodeableConcept).coding .where(code='LA6111-4' or code='LA6112-2' or code='LA6113-0' or code='LA6114-8' or code='LA6115-5' or code='LA10137-0' or code='LA10138-8' or code='LA10139-6').exists() |
Screening-Crosswalk-93030-5 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 93030-5 then answer codes must be one of the following: LA33-6 LA32-8 : entry.select(resource as Observation).where(code.coding.code contains '93030-5').exists() implies entry.select(resource as Observation).where(code.coding.code contains '93030-5').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '93030-5') .value.select($this as CodeableConcept).coding .where(code='LA33-6' or code='LA32-8').exists() |
Screening-Crosswalk-93038-8 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 93038-8 then answer codes must be one of the following: LA6568-5 LA13863-8 LA13909-9 LA13902-4 LA13914-9 LA30122-8 : entry.select(resource as Observation).where(code.coding.code contains '93038-8').exists() implies entry.select(resource as Observation).where(code.coding.code contains '93038-8').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '93038-8') .value.select($this as CodeableConcept).coding .where(code='LA6568-5' or code='LA13863-8' or code='LA13909-9' or code='LA13902-4' or code='LA13914-9' or code='LA30122-8').exists() |
Screening-Crosswalk-93159-2 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 93159-2 then answer codes must be one of the following: LA6270-8 LA10066-1 LA10082-8 LA10044-8 LA9933-8 : entry.select(resource as Observation).where(code.coding.code contains '93159-2').exists() implies entry.select(resource as Observation).where(code.coding.code contains '93159-2').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '93159-2') .value.select($this as CodeableConcept).coding .where(code='LA6270-8' or code='LA10066-1' or code='LA10082-8' or code='LA10044-8' or code='LA9933-8').exists() |
Screening-Crosswalk-95530-2 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 95530-2 then answer codes must be one of the following: LA6270-8 LA26460-8 LA18876-5 LA18891-4 LA18934-2 : entry.select(resource as Observation).where(code.coding.code contains '95530-2').exists() implies entry.select(resource as Observation).where(code.coding.code contains '95530-2').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '95530-2') .value.select($this as CodeableConcept).coding .where(code='LA6270-8' or code='LA26460-8' or code='LA18876-5' or code='LA18891-4' or code='LA18934-2').exists() |
Screening-Crosswalk-95615-1 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 95615-1 then answer codes must be one of the following: LA6270-8 LA10066-1 LA10082-8 LA16644-9 LA6482-9 : entry.select(resource as Observation).where(code.coding.code contains '95615-1').exists() implies entry.select(resource as Observation).where(code.coding.code contains '95615-1').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '95615-1') .value.select($this as CodeableConcept).coding .where(code='LA6270-8' or code='LA10066-1' or code='LA10082-8' or code='LA16644-9' or code='LA6482-9').exists() |
Screening-Crosswalk-95618-5 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 95618-5 then answer codes must be one of the following: LA6270-8 LA10066-1 LA10082-8 LA16644-9 LA6482-9 : entry.select(resource as Observation).where(code.coding.code contains '95618-5').exists() implies entry.select(resource as Observation).where(code.coding.code contains '95618-5').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '95618-5') .value.select($this as CodeableConcept).coding .where(code='LA6270-8' or code='LA10066-1' or code='LA10082-8' or code='LA16644-9' or code='LA6482-9').exists() |
Screening-Crosswalk-95617-7 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 95617-7 then answer codes must be one of the following: LA6270-8 LA10066-1 LA10082-8 LA16644-9 LA6482-9 : entry.select(resource as Observation).where(code.coding.code contains '95617-7').exists() implies entry.select(resource as Observation).where(code.coding.code contains '95617-7').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '95617-7') .value.select($this as CodeableConcept).coding .where(code='LA6270-8' or code='LA10066-1' or code='LA10082-8' or code='LA16644-9' or code='LA6482-9').exists() |
Screening-Crosswalk-95616-9 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 95616-9 then answer codes must be one of the following: LA6270-8 LA10066-1 LA10082-8 LA16644-9 LA6482-9 : entry.select(resource as Observation).where(code.coding.code contains '95616-9').exists() implies entry.select(resource as Observation).where(code.coding.code contains '95616-9').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '95616-9') .value.select($this as CodeableConcept).coding .where(code='LA6270-8' or code='LA10066-1' or code='LA10082-8' or code='LA16644-9' or code='LA6482-9').exists() |
Screening-Crosswalk-96779-4 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 96779-4 then answer codes must be one of the following: LA33-6 LA32-8 LA32002-0 : entry.select(resource as Observation).where(code.coding.code contains '96779-4').exists() implies entry.select(resource as Observation).where(code.coding.code contains '96779-4').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '96779-4') .value.select($this as CodeableConcept).coding .where(code='LA33-6' or code='LA32-8' or code='LA32002-0').exists() |
Screening-Crosswalk-96778-6 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 96778-6 then answer codes must be one of the following: LA31996-4 LA28580-1 LA31997-2 LA31998-0 LA31999-8 LA32000-4 LA32001-2 LA9-3 : entry.select(resource as Observation).where(code.coding.code contains '96778-6').exists() implies entry.select(resource as Observation).where(code.coding.code contains '96778-6').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '96778-6') .value.select($this as CodeableConcept).coding .where(code='LA31996-4' or code='LA28580-1' or code='LA31997-2' or code='LA31998-0' or code='LA31999-8' or code='LA32000-4' or code='LA32001-2' or code='LA9-3').exists() |
Screening-Crosswalk-96781-0 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 96781-0 then answer codes must be one of the following: LA31976-6 LA31977-4 LA31978-2 LA31979-0 : entry.select(resource as Observation).where(code.coding.code contains '96781-0').exists() implies entry.select(resource as Observation).where(code.coding.code contains '96781-0').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '96781-0') .value.select($this as CodeableConcept).coding .where(code='LA31976-6' or code='LA31977-4' or code='LA31978-2' or code='LA31978-2').exists() |
Screening-Crosswalk-96780-2 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 96780-2 then answer codes must be one of the following: LA31981-6 LA31982-4 LA31983-2 : entry.select(resource as Observation).where(code.coding.code contains '96780-2').exists() implies entry.select(resource as Observation).where(code.coding.code contains '96780-2').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '96780-2') .value.select($this as CodeableConcept).coding .where(code='LA31981-6' or code='LA31982-4' or code='LA31983-2').exists() |
Screening-Crosswalk-96782-8 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 96782-8 then answer codes must be one of the following: LA33-6 LA32-8 : entry.select(resource as Observation).where(code.coding.code contains '96782-8').exists() implies entry.select(resource as Observation).where(code.coding.code contains '96782-8').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '96782-8') .value.select($this as CodeableConcept).coding .where(code='LA33-6' or code='LA32-8').exists() |
Screening-Crosswalk-96842-0 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 96842-0 then answer codes must be one of the following: LA6270-8 LA26460-8 LA18876-5 LA18891-4 LA18934-2 : entry.select(resource as Observation).where(code.coding.code contains '96842-0').exists() implies entry.select(resource as Observation).where(code.coding.code contains '96842-0').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '96842-0') .value.select($this as CodeableConcept).coding .where(code='LA6270-8' or code='LA26460-8' or code='LA18876-5' or code='LA18891-4' or code='LA18934-2').exists() |
Screening-Crosswalk-97027-7 | warning | Bundle | If the ObservationScreeningResponse LOINC question code is 97027-7 then answer codes must be one of the following: LA33-6 LA32-8 : entry.select(resource as Observation).where(code.coding.code contains '97027-7').exists() implies entry.select(resource as Observation).where(code.coding.code contains '97027-7').dataAbsentReason.exists() or entry.select(resource as Observation).where(code.coding.code contains '97027-7') .value.select($this as CodeableConcept).coding .where(code='LA33-6' or code='LA32-8').exists() |
ServiceRequest-AuthoredOn | warning | Bundle | Ensure that all Service Requests have a authored on date. : entry.select(resource as ServiceRequest).exists() implies entry.select(resource as ServiceRequest).all(authoredOn.exists()) |
ServiceRequest-CategoryCode | warning | Bundle | Ensure that all Service Requests have a category code. : entry.select(resource as ServiceRequest).exists() implies entry.select(resource as ServiceRequest).( all(category.exists()) and category.all(coding.exists()) and category.coding.all(code.exists()) ) |
ServiceRequest-OccurrencePeriod | warning | Bundle | Ensure that all Service Requests have an occurrence period start and end, or occurrence datetime. : entry.select(resource as ServiceRequest).exists() implies entry.select(resource as ServiceRequest).count() = ( entry.select(resource as ServiceRequest).where(occurrence is Period).select(occurrence) .where(start and end).count() + entry.select(resource as ServiceRequest).where(occurrence is dateTime).count() ) |
ServiceRequest-Quantity | warning | Bundle | Ensure that all Service Requests have a quantity. : entry.select(resource as ServiceRequest).exists() implies entry.select(resource as ServiceRequest) .all(quantity.value.exists()) |
Task-EndPeriod | warning | Bundle | Ensure that all completed Tasks have an end execution period. : entry.select(resource as Task).where(status = 'completed').exists() implies entry.select(resource as Task).where(status = 'completed').all(executionPeriod.end.exists()) |
Task-Repetitions | warning | Bundle | Ensure that all Tasks have a value for repetitions. : entry.select(resource as Task).exists() implies entry.select(resource as Task).all(restriction.repetitions.exists()) |
Task-StartPeriod | warning | Bundle | Ensure that all Tasks have a starting execution period. : entry.select(resource as Task).exists() implies entry.select(resource as Task).all(executionPeriod.start.exists()) |
Task-StatusReason | error | Bundle | Ensure that all tasks exists, have a statusReason If the Task.status is rejected, cancelled, completed, or failed. : entry.select(resource as Task).where(status = 'rejected' or status = 'cancelled' or status = 'completed' or status = 'failed').exists() implies entry.select(resource as Task).where(status = 'rejected' or status = 'cancelled' or status = 'completed' or status = 'failed') .all(statusReason.text.exists()) |
bdl-1 | error | Bundle | total only when a search or history : total.empty() or (type = 'searchset') or (type = 'history') |
bdl-2 | error | Bundle | entry.search only when a search : entry.search.empty() or (type = 'searchset') |
bdl-3 | error | Bundle | entry.request mandatory for batch/transaction/history, otherwise prohibited : entry.all(request.exists() = (%resource.type = 'batch' or %resource.type = 'transaction' or %resource.type = 'history')) |
bdl-4 | error | Bundle | entry.response mandatory for batch-response/transaction-response/history, otherwise prohibited : entry.all(response.exists() = (%resource.type = 'batch-response' or %resource.type = 'transaction-response' or %resource.type = 'history')) |
bdl-5 | error | Bundle.entry | must be a resource unless there's a request or response : resource.exists() or request.exists() or response.exists() |
bdl-7 | error | Bundle | FullUrl must be unique in a bundle, or else entries with the same fullUrl must have different meta.versionId (except in history bundles) : (type = 'history') or entry.where(fullUrl.exists()).select(fullUrl&resource.meta.versionId).isDistinct() |
bdl-8 | error | Bundle.entry | fullUrl cannot be a version specific reference : fullUrl.contains('/_history/').not() |
bdl-9 | error | Bundle | A document must have an identifier with a system and a value : type = 'document' implies (identifier.system.exists() and identifier.value.exists()) |
bdl-10 | error | Bundle | A document must have a date : type = 'document' implies (timestamp.hasValue()) |
bdl-11 | error | Bundle | A document must have a Composition as the first resource : type = 'document' implies entry.first().resource.is(Composition) |
bdl-12 | error | Bundle | A message must have a MessageHeader as the first resource : type = 'message' implies entry.first().resource.is(MessageHeader) |
ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children : hasValue() or (children().count() > id.count()) |
ext-1 | error | **ALL** extensions | Must have either extensions or value[x], not both : extension.exists() != value.exists() |
shinny-sexual-orientation | warning | Bundle | If there is no component or hasMember element then either a value[x] or a data absent reason must be present : entry.select(resource as Observation).where(meta.profile.contains('shin-ny-observation-sexual-orientation')).exists() implies entry.select(resource as Observation).where(meta.profile.contains('shin-ny-observation-sexual-orientation')) .where(value.exists() or dataAbsentReason.exists()) .count()=1 |

This structure is derived from Bundle

Summary

Mandatory: 2 elements
Must-Support: 2 elements

Structures

This structure refers to these other structures:

- SHINNYMeta (http://test.shinny.org/us/ny/hrsn/StructureDefinition/SHINNYMeta)

​Other representations of profile: CSV, Excel, Schematron