1.5.3 - release

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

Resource Profile: SHINNY SDOH Bundle Profile

Official URL: http://shinny.org/us/ny/hrsn/StructureDefinition/SHINNYBundleProfile Version: 1.5.3
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.

Usage:

Formal Views of Profile Content

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

NameFlagsCard.TypeDescription & Constraintsdoco
.. Bundle C 0..* Bundle Contains a collection of resources
bdl-1: total only when a search or history
bdl-2: entry.search only when a search
bdl-3: entry.request mandatory for batch/transaction/history, otherwise prohibited
bdl-4: entry.response mandatory for batch-response/transaction-response/history, otherwise prohibited
bdl-7: FullUrl must be unique in a bundle, or else entries with the same fullUrl must have different meta.versionId (except in history bundles)
bdl-9: A document must have an identifier with a system and a value
bdl-10: A document must have a date
bdl-11: A document must have a Composition as the first resource
bdl-12: A message must have a MessageHeader as the first resource
SHINNY-Patient-MRN: Every bundle should always have only 1 MR (i.e MRN) Object within patient.identifier, system.contains('facility') and value (MRN) is provided
SHINNY-Patient-MA: 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'
SHINNY-Patient-SSN: Every bundle should always have only 1 SSN (i.e SS) Object within patient.identifier
SHINNY-Patient-Address: All elements of address should be present
SHINNY-Patient-DOB: birthDate should be a valid date
SHINNY-Patient-Gender: Gender should be present
SHINNY-Patient-GenderId: Gender Id should be present
SHINNY-Patient-Race-Ethnicity: Race & Ethnicity should be present
SHINNY-Patient-Communication: Communication should exist
SHINNY-Patient-MiddleName: MiddleName should be present
SHINNY-Patient-Pronouns: Pronouns should be present
shinny-sexual-orientation: If there is no component or hasMember element then either a value[x] or a data absent reason must be present
SHINNY-Bundle-Obs-hasMember-RI: Checks for RI between Observation & child Observations
SHINNY-Encounter-Class: Ensure that the Encounter resource has a class code; Ensure that the Encounter resource has a class code system
SHINNY-Encounter-Type: Ensure that the Encounter resource has a status code
Encounter-PeriodStart: Ensure that all Encounters include a value for period.start.
Encounter-PeriodEnd: Ensure that all finished Encounters include a value for period.end.
SHINNY-Obs-Encounter: SDOH Observations should have an Encounter
SHINNY-Obs-Patient: SDOH Observations should have a Patient
SHINNY-Obs-Code: Ensure that all Observation resources have screening code; Ensure that all Observation resources have screening code system
SHINNY-Obs-Category: Ensure that all Observation categories have an SDOH code
SHINNY-Screening-Patient: SDOH Screening Observations should have an Patient
ObservationScreenRes-Langauge: Ensure that all Observation Screening Responses have a language.
ObservationScreenRes-CategoryDisplay: Ensure that all Observation Screening Responses have a category display.
ObservationScreenRes-CodeCode: Ensure that all Observation Screening Responses have a code code.
ObservationScreenRes-CodeDisplay: Ensure that all Observation Screening Responses have a code dispay.
ObservationScreenRes-Interpretation: Ensure that specific Observation Screening Responses have an interpretation.
SHINNY-Screening-Consent: All screening bundles must include a consent
Assessment-ConditionID: Ensure that all final assessments have a Condition identifier.
Assessment-ConditionSNOMED: Ensure that all final assessments have a Condition category SNOMED term.
Assessment-ConditionICD10: Ensure that all final assessments have a Condition ICD-10 term.
Assessment-ApprovalQuestionnaire: Ensure that all Assessment Questionnaire bundles have a response to PatientAssessmentApproval.
Assessment-OutreachQuestionnaire: Ensure that all Assessment Questionnaire bundles with patient approval contain a Patient Assessment Outreach Date and a Patient Assessment Status.
Assessment-AdminQuestionnaire: Ensure that all Assessment Questionnaire bundles have a response to the service duplication indicators.
Assessment-ServiceDupQuestionnaire: Ensure that all Assessment Questionnaire bundles have a response to the service duplication indicators.
SHINNY-Assessment-Encounter: Assessment-Encounter should exist
SHINNY-Assessment-Patient: Assessment-Subject should exist
ServiceRequest-Quantity: Ensure that all Service Requests have a quantity.
ServiceRequest-CategoryCode: Ensure that all Service Requests have a category code.
ServiceRequest-OccurrencePeriod: Ensure that all Service Requests have an occurrence period start and end, or occurrence datetime.
ServiceRequest-AuthoredOn: Ensure that all Service Requests have a authored on date.
SHINNYServiceRequestSDOHCategory: Ensure that all Service Request categories have an SDOH code
Task-StatusReason: Ensure that all tasks exists, have a statusReason If the Task.status is rejected, cancelled, completed, or failed.
Task-Repetitions: Ensure that all Tasks have a value for repetitions.
Task-EndPeriod: Ensure that all completed Tasks have an end execution period.
Task-StartPeriod: Ensure that all Tasks have a starting execution period.
Referral-ApprovalQuestionnaire: Ensure that all Referral Questionnaire bundles have a response to PatientReferralApproval.
Referral-HRSNOutreachQuestionnaire: Ensure that all approved Referral Questionnaire bundles have a response to HRSNServiceProviderReferralOutreachDate.
Referral-SCNOutreachQuestionnaire: Ensure that all approved Referral Questionnaire bundles have a response to SCNReferralOutreachDate.
SHINNY-Bundle-Required-Resources: Every bundle should always have one and only one 'Patient' & 'Encounter' and atleast one Org
SHINNY-Bundle-Required: Every submitted resource should be part of a bundle.
SHINNY-Bundle-Patient-Org-RI: Checks for RI between Patient & Assigning Org
SHINNY-Bundle-Patient-Encounter-RI: Checks for RI between Patient & Encounter
SHINNY-Bundle-Obs-derivedFrom-RI: Checks for RI between Observation & child Observation
SHINNY-Bundle-Obs-Patient-RI: Checks for RI between Obs & Patient
SHINNY-Bundle-Obs-Encounter-RI: Checks for RI between Screening Obs & Encounter
Screening-Crosswalk-44250-9: 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
Screening-Crosswalk-44255-8: 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
Screening-Crosswalk-68516-4: 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
Screening-Crosswalk-68517-2: 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
Screening-Crosswalk-68524-8: 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
Screening-Crosswalk-69858-9: If the ObservationScreeningResponse LOINC question code is 69858-9 then answer codes must be one of the following: LA33-6 LA32-8
Screening-Crosswalk-69861-3: If the ObservationScreeningResponse LOINC question code is 69861-3 then answer codes must be one of the following: LA33-6 LA32-8
Screening-Crosswalk-71802-3: If the ObservationScreeningResponse LOINC question code is 71802-3 then answer codes must be one of the following: LA31993-1, LA31994-9, LA31995-6
Screening-Crosswalk-76513-1: If the ObservationScreeningResponse LOINC question code is 76513-1 then answer codes must be one of the following: LA15832-1 LA22683-9 LA31980-8
Screening-Crosswalk-88122-7: If the ObservationScreeningResponse LOINC question code is 88122-7 then answer codes must be one of the following: LA28397-0 LA6729-3 LA28398-8
Screening-Crosswalk-88123-5: If the ObservationScreeningResponse LOINC question code is 88123-5 then answer codes must be one of the following: LA28397-0 LA6729-3 LA28398-8
Screening-Crosswalk-89555-7: 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
Screening-Crosswalk-93030-5: If the ObservationScreeningResponse LOINC question code is 93030-5 then answer codes must be one of the following: LA33-6 LA32-8
Screening-Crosswalk-93038-8: 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
Screening-Crosswalk-93159-2: 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
Screening-Crosswalk-95530-2: 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
Screening-Crosswalk-95615-1: 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
Screening-Crosswalk-95616-9: 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
Screening-Crosswalk-95617-7: 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
Screening-Crosswalk-95618-5: 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
Screening-Crosswalk-96778-6: 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
Screening-Crosswalk-96779-4: If the ObservationScreeningResponse LOINC question code is 96779-4 then answer codes must be one of the following: LA33-6 LA32-8 LA32002-0
Screening-Crosswalk-96780-2: If the ObservationScreeningResponse LOINC question code is 96780-2 then answer codes must be one of the following: LA31981-6 LA31982-4 LA31983-2
Screening-Crosswalk-96781-0: 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
Screening-Crosswalk-96782-8: If the ObservationScreeningResponse LOINC question code is 96782-8 then answer codes must be one of the following: LA33-6 LA32-8
Screening-Crosswalk-96842-0: 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
Screening-Crosswalk-97027-7: If the ObservationScreeningResponse LOINC question code is 97027-7 then answer codes must be one of the following: LA33-6 LA32-8
SHINNY-Consent-Category: Patient Consent category code is 59284-0
Consent-ProvisionType: Ensure that all Consents include a value for provision type.
SHINNY-Bundle-screening-consent: Ensures all bundles with a screening included also includes the consent profile.
Goal-StatusDate: Ensure that all Goals include a value for statusDate.
Goal-AchievementStatus: Ensure that all Goals include a value for achivementStatus.
Location-Address: Ensure that all Location resources include all address elements.
Location-Type: Ensure that all Location resources include a value for type.
Organization-Address: Ensure that all Organization resources include all address elements.
Organization-ID: Ensure that all Organization resources include a value for one of the following id types: NPI, TAX, or MA.
Organization-Type: Ensure that all Organization resources include a value for type.
SHINNY-Resources-Profile-Check: SHINNY-Resources-Profile-Check
... id SΣ 1..1 id Logical id of this artifact
... meta SΣ 1..1 SHINNYMeta Metadata about the resource
ele-1: All FHIR elements must have a @value or children
... implicitRules ?!Σ 0..1 uri A set of rules under which this content was created
ele-1: All FHIR elements must have a @value or children

doco Documentation for this format

Terminology Bindings

PathConformanceValueSetURI
Bundle.typerequiredBundleType
http://hl7.org/fhir/ValueSet/bundle-type|4.0.1
from the FHIR Standard

Constraints

IdGradePath(s)DetailsRequirements
Assessment-AdminQuestionnairewarningBundleEnsure 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-ApprovalQuestionnairewarningBundleEnsure 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-ConditionICD10warningBundleEnsure 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-ConditionIDwarningBundleEnsure 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-ConditionSNOMEDwarningBundleEnsure 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-OutreachQuestionnairewarningBundleEnsure 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-ServiceDupQuestionnairewarningBundleEnsure 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-ProvisionTypewarningBundleEnsure that all Consents include a value for provision type.
: entry.select(resource as Consent) .all(provision.type.exists())
Encounter-PeriodEndwarningBundleEnsure that all finished Encounters include a value for period.end.
: entry.select(resource as Encounter) .where(status.contains('finished')) .all(period.end.exists())
Encounter-PeriodStartwarningBundleEnsure that all Encounters include a value for period.start.
: entry.select(resource as Encounter) .all(period.start.exists())
Goal-AchievementStatuswarningBundleEnsure that all Goals include a value for achivementStatus.
: entry.select(resource as Goal).exists() implies entry.select(resource as Goal).all(achievementStatus.exists())
Goal-StatusDatewarningBundleEnsure that all Goals include a value for statusDate.
: entry.select(resource as Goal).exists() implies entry.select(resource as Goal).all(statusDate.exists())
Location-AddresswarningBundleEnsure 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-TypewarningBundleEnsure 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-CategoryDisplaywarningBundleEnsure 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-CodeCodewarningBundleEnsure 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-CodeDisplaywarningBundleEnsure 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-InterpretationwarningBundleEnsure 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-LangaugewarningBundleEnsure 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-AddresswarningBundleEnsure 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-IDerrorBundleEnsure that all Organization resources include a value for one of the following id types: NPI, TAX, or MA.
: entry.select(resource as Organization).exists() implies entry.select(resource as Organization).where(identifier.type.coding.code='NPI' or identifier.type.coding.code='TAX' or identifier.type.coding.code='MA').exists()
Organization-TypewarningBundleEnsure 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-ApprovalQuestionnairewarningBundleEnsure 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-HRSNOutreachQuestionnairewarningBundleEnsure 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-SCNOutreachQuestionnairewarningBundleEnsure 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-EncountererrorBundleAssessment-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-PatienterrorBundleAssessment-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-Obs-Encounter-RIerrorBundleChecks 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-RIerrorBundleChecks 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-RIerrorBundleChecks for RI between Observation & child Observation
: entry.select(resource as Observation) .where(derivedFrom.exists() and (meta.where(profile.lower().contains('shinny-observation')) or meta.where(profile.lower().contains('sdohcc-observation')))) .derivedFrom.select(reference.split('/')[1]) .intersect( entry.select(resource as Observation).where(derivedFrom.empty().not() and (meta.where(profile.lower().contains('shin-ny-observation-screening-response')) or meta.where(profile.lower().contains('sdohcc-observationscreeningresponse')))).id) .count() = entry.select(resource as Observation) .where(derivedFrom.exists() and (meta.where(profile.lower().contains('shin-ny-observation-screening-response')) or $this.meta.where(profile.lower().contains('sdohcc-observationscreeningresponse')))) .derivedFrom.reference .count()
SHINNY-Bundle-Obs-hasMember-RIerrorBundleChecks for RI between Observation & child Observations
: entry.select(resource as Observation) .exists(hasMember.exists() and meta.profile.contains('shinny-observation-screening-response')) implies entry.select(resource as Observation) .where(hasMember.exists() and meta.profile.contains('shinny-observation-screening-response')) .hasMember.select(reference.split('/')[1]) .union( entry.select(resource as Observation) .where(hasMember.exists().not() and meta.profile.contains('shinny-observation-screening-response')).id) .count() = entry.select(resource as Observation) .where(hasMember.exists() and meta.profile.contains('shinny-observation-screening-response')) .hasMember.reference .count()
SHINNY-Bundle-Patient-Encounter-RIerrorBundleChecks for RI between Patient & Encounter
: entry.select(resource as Encounter) .select($this.subject.reference.split('/')[1]) contains entry.select(resource as Patient).id
SHINNY-Bundle-Patient-Org-RIerrorBundleChecks 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-RequirederrorBundleEvery submitted resource should be part of a bundle.
: select($this as Bundle).exists()
SHINNY-Bundle-Required-ResourceserrorBundleEvery 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-consenterrorBundleEnsures all bundles with a screening included also includes the consent profile.
: ( (select($this as Bundle).where(meta.profile.upper() != 'http://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-CategorywarningBundlePatient 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-ClasswarningBundleEnsure 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-TypewarningBundleEnsure that the Encounter resource has a status code
: entry.select(resource as Encounter).type.coding .all(code.exists() and system.exists())
SHINNY-Obs-CategoryerrorBundleEnsure 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-CodewarningBundleEnsure 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-EncounterwarningBundleSDOH Observations should have an Encounter
: entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-screening-response')) .all(encounter.reference.exists())
SHINNY-Obs-PatientwarningBundleSDOH Observations should have a Patient
: entry.select(resource as Observation).where(meta.profile.contains('shinny-observation')) .all(subject.reference.exists())
SHINNY-Patient-AddresswarningBundleAll 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-CommunicationwarningBundleCommunication should exist
: entry.select(resource as Patient).communication.exists()
SHINNY-Patient-DOBerrorBundlebirthDate 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-GendererrorBundleGender should be present
: entry.select(resource as Patient).where(gender.exists() and gender.trim().length()).count() > 0
SHINNY-Patient-GenderIdwarningBundleGender 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-MAerrorBundleEvery 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-MRNerrorBundleEvery 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-MiddleNamewarningBundleMiddleName should be present
: entry.select(resource as Patient).name .extension.where(url.contains('middle-name')) .value.trim().length()>0
SHINNY-Patient-PronounswarningBundlePronouns should be present
: entry.select(resource as Patient).extension.where(url='http://shinny.org/us/ny/hrsn/ValueSet/SHINNYPersonalPronounsVS').exists() implies entry.select(resource as Patient).extension.where(url='http://shinny.org/us/ny/hrsn/ValueSet/SHINNYPersonalPronounsVS' and value.select($this as CodeableConcept).coding.code.exists()).exists()
SHINNY-Patient-Race-EthnicitywarningBundleRace & 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-SSNwarningBundleEvery 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-CheckerrorBundleSHINNY-Resources-Profile-Check
: ( select($this as Bundle).where(meta.profile.upper() != 'http://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://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://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://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://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://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://shinny.org/us/ny/hrsn/StructureDefinition/shinny-Consent'.upper()).count() = 0 ) ).allTrue()
SHINNY-Screening-ConsenterrorBundleAll 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-PatienterrorBundleSDOH 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())
SHINNYServiceRequestSDOHCategoryerrorBundleEnsure 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-8warningBundleIf 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-9warningBundleIf 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-2warningBundleIf 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-4warningBundleIf 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-8warningBundleIf 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-9warningBundleIf 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-3warningBundleIf 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-3warningBundleIf 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-1warningBundleIf 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-5warningBundleIf 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-7warningBundleIf 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-7warningBundleIf 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-5warningBundleIf 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-8warningBundleIf 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-2warningBundleIf 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-2warningBundleIf 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-1warningBundleIf 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-5warningBundleIf 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-7warningBundleIf 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-9warningBundleIf 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-4warningBundleIf 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-6warningBundleIf 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-0warningBundleIf 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-2warningBundleIf 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-8warningBundleIf 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-0warningBundleIf 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-7warningBundleIf 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-AuthoredOnwarningBundleEnsure 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-CategoryCodewarningBundleEnsure 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-OccurrencePeriodwarningBundleEnsure 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-QuantitywarningBundleEnsure that all Service Requests have a quantity.
: entry.select(resource as ServiceRequest).exists() implies entry.select(resource as ServiceRequest) .all(quantity.value.exists())
Task-EndPeriodwarningBundleEnsure 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-RepetitionswarningBundleEnsure 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-StartPeriodwarningBundleEnsure 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-StatusReasonerrorBundleEnsure 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-1errorBundletotal only when a search or history
: total.empty() or (type = 'searchset') or (type = 'history')
bdl-2errorBundleentry.search only when a search
: entry.search.empty() or (type = 'searchset')
bdl-3errorBundleentry.request mandatory for batch/transaction/history, otherwise prohibited
: entry.all(request.exists() = (%resource.type = 'batch' or %resource.type = 'transaction' or %resource.type = 'history'))
bdl-4errorBundleentry.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-7errorBundleFullUrl 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-9errorBundleA document must have an identifier with a system and a value
: type = 'document' implies (identifier.system.exists() and identifier.value.exists())
bdl-10errorBundleA document must have a date
: type = 'document' implies (timestamp.hasValue())
bdl-11errorBundleA document must have a Composition as the first resource
: type = 'document' implies entry.first().resource.is(Composition)
bdl-12errorBundleA message must have a MessageHeader as the first resource
: type = 'message' implies entry.first().resource.is(MessageHeader)
ele-1error**ALL** elementsAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
shinny-sexual-orientationwarningBundleIf 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

NameFlagsCard.TypeDescription & Constraintsdoco
.. Bundle C 0..* Bundle Contains a collection of resources
SHINNY-Patient-MRN: Every bundle should always have only 1 MR (i.e MRN) Object within patient.identifier, system.contains('facility') and value (MRN) is provided
SHINNY-Patient-MA: 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'
SHINNY-Patient-SSN: Every bundle should always have only 1 SSN (i.e SS) Object within patient.identifier
SHINNY-Patient-Address: All elements of address should be present
SHINNY-Patient-DOB: birthDate should be a valid date
SHINNY-Patient-Gender: Gender should be present
SHINNY-Patient-GenderId: Gender Id should be present
SHINNY-Patient-Race-Ethnicity: Race & Ethnicity should be present
SHINNY-Patient-Communication: Communication should exist
SHINNY-Patient-MiddleName: MiddleName should be present
SHINNY-Patient-Pronouns: Pronouns should be present
shinny-sexual-orientation: If there is no component or hasMember element then either a value[x] or a data absent reason must be present
SHINNY-Bundle-Obs-hasMember-RI: Checks for RI between Observation & child Observations
SHINNY-Encounter-Class: Ensure that the Encounter resource has a class code; Ensure that the Encounter resource has a class code system
SHINNY-Encounter-Type: Ensure that the Encounter resource has a status code
Encounter-PeriodStart: Ensure that all Encounters include a value for period.start.
Encounter-PeriodEnd: Ensure that all finished Encounters include a value for period.end.
SHINNY-Obs-Encounter: SDOH Observations should have an Encounter
SHINNY-Obs-Patient: SDOH Observations should have a Patient
SHINNY-Obs-Code: Ensure that all Observation resources have screening code; Ensure that all Observation resources have screening code system
SHINNY-Obs-Category: Ensure that all Observation categories have an SDOH code
SHINNY-Screening-Patient: SDOH Screening Observations should have an Patient
ObservationScreenRes-Langauge: Ensure that all Observation Screening Responses have a language.
ObservationScreenRes-CategoryDisplay: Ensure that all Observation Screening Responses have a category display.
ObservationScreenRes-CodeCode: Ensure that all Observation Screening Responses have a code code.
ObservationScreenRes-CodeDisplay: Ensure that all Observation Screening Responses have a code dispay.
ObservationScreenRes-Interpretation: Ensure that specific Observation Screening Responses have an interpretation.
SHINNY-Screening-Consent: All screening bundles must include a consent
Assessment-ConditionID: Ensure that all final assessments have a Condition identifier.
Assessment-ConditionSNOMED: Ensure that all final assessments have a Condition category SNOMED term.
Assessment-ConditionICD10: Ensure that all final assessments have a Condition ICD-10 term.
Assessment-ApprovalQuestionnaire: Ensure that all Assessment Questionnaire bundles have a response to PatientAssessmentApproval.
Assessment-OutreachQuestionnaire: Ensure that all Assessment Questionnaire bundles with patient approval contain a Patient Assessment Outreach Date and a Patient Assessment Status.
Assessment-AdminQuestionnaire: Ensure that all Assessment Questionnaire bundles have a response to the service duplication indicators.
Assessment-ServiceDupQuestionnaire: Ensure that all Assessment Questionnaire bundles have a response to the service duplication indicators.
SHINNY-Assessment-Encounter: Assessment-Encounter should exist
SHINNY-Assessment-Patient: Assessment-Subject should exist
ServiceRequest-Quantity: Ensure that all Service Requests have a quantity.
ServiceRequest-CategoryCode: Ensure that all Service Requests have a category code.
ServiceRequest-OccurrencePeriod: Ensure that all Service Requests have an occurrence period start and end, or occurrence datetime.
ServiceRequest-AuthoredOn: Ensure that all Service Requests have a authored on date.
SHINNYServiceRequestSDOHCategory: Ensure that all Service Request categories have an SDOH code
Task-StatusReason: Ensure that all tasks exists, have a statusReason If the Task.status is rejected, cancelled, completed, or failed.
Task-Repetitions: Ensure that all Tasks have a value for repetitions.
Task-EndPeriod: Ensure that all completed Tasks have an end execution period.
Task-StartPeriod: Ensure that all Tasks have a starting execution period.
Referral-ApprovalQuestionnaire: Ensure that all Referral Questionnaire bundles have a response to PatientReferralApproval.
Referral-HRSNOutreachQuestionnaire: Ensure that all approved Referral Questionnaire bundles have a response to HRSNServiceProviderReferralOutreachDate.
Referral-SCNOutreachQuestionnaire: Ensure that all approved Referral Questionnaire bundles have a response to SCNReferralOutreachDate.
SHINNY-Bundle-Required-Resources: Every bundle should always have one and only one 'Patient' & 'Encounter' and atleast one Org
SHINNY-Bundle-Required: Every submitted resource should be part of a bundle.
SHINNY-Bundle-Patient-Org-RI: Checks for RI between Patient & Assigning Org
SHINNY-Bundle-Patient-Encounter-RI: Checks for RI between Patient & Encounter
SHINNY-Bundle-Obs-derivedFrom-RI: Checks for RI between Observation & child Observation
SHINNY-Bundle-Obs-Patient-RI: Checks for RI between Obs & Patient
SHINNY-Bundle-Obs-Encounter-RI: Checks for RI between Screening Obs & Encounter
Screening-Crosswalk-44250-9: 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
Screening-Crosswalk-44255-8: 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
Screening-Crosswalk-68516-4: 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
Screening-Crosswalk-68517-2: 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
Screening-Crosswalk-68524-8: 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
Screening-Crosswalk-69858-9: If the ObservationScreeningResponse LOINC question code is 69858-9 then answer codes must be one of the following: LA33-6 LA32-8
Screening-Crosswalk-69861-3: If the ObservationScreeningResponse LOINC question code is 69861-3 then answer codes must be one of the following: LA33-6 LA32-8
Screening-Crosswalk-71802-3: If the ObservationScreeningResponse LOINC question code is 71802-3 then answer codes must be one of the following: LA31993-1, LA31994-9, LA31995-6
Screening-Crosswalk-76513-1: If the ObservationScreeningResponse LOINC question code is 76513-1 then answer codes must be one of the following: LA15832-1 LA22683-9 LA31980-8
Screening-Crosswalk-88122-7: If the ObservationScreeningResponse LOINC question code is 88122-7 then answer codes must be one of the following: LA28397-0 LA6729-3 LA28398-8
Screening-Crosswalk-88123-5: If the ObservationScreeningResponse LOINC question code is 88123-5 then answer codes must be one of the following: LA28397-0 LA6729-3 LA28398-8
Screening-Crosswalk-89555-7: 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
Screening-Crosswalk-93030-5: If the ObservationScreeningResponse LOINC question code is 93030-5 then answer codes must be one of the following: LA33-6 LA32-8
Screening-Crosswalk-93038-8: 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
Screening-Crosswalk-93159-2: 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
Screening-Crosswalk-95530-2: 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
Screening-Crosswalk-95615-1: 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
Screening-Crosswalk-95616-9: 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
Screening-Crosswalk-95617-7: 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
Screening-Crosswalk-95618-5: 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
Screening-Crosswalk-96778-6: 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
Screening-Crosswalk-96779-4: If the ObservationScreeningResponse LOINC question code is 96779-4 then answer codes must be one of the following: LA33-6 LA32-8 LA32002-0
Screening-Crosswalk-96780-2: If the ObservationScreeningResponse LOINC question code is 96780-2 then answer codes must be one of the following: LA31981-6 LA31982-4 LA31983-2
Screening-Crosswalk-96781-0: 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
Screening-Crosswalk-96782-8: If the ObservationScreeningResponse LOINC question code is 96782-8 then answer codes must be one of the following: LA33-6 LA32-8
Screening-Crosswalk-96842-0: 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
Screening-Crosswalk-97027-7: If the ObservationScreeningResponse LOINC question code is 97027-7 then answer codes must be one of the following: LA33-6 LA32-8
SHINNY-Consent-Category: Patient Consent category code is 59284-0
Consent-ProvisionType: Ensure that all Consents include a value for provision type.
SHINNY-Bundle-screening-consent: Ensures all bundles with a screening included also includes the consent profile.
Goal-StatusDate: Ensure that all Goals include a value for statusDate.
Goal-AchievementStatus: Ensure that all Goals include a value for achivementStatus.
Location-Address: Ensure that all Location resources include all address elements.
Location-Type: Ensure that all Location resources include a value for type.
Organization-Address: Ensure that all Organization resources include all address elements.
Organization-ID: Ensure that all Organization resources include a value for one of the following id types: NPI, TAX, or MA.
Organization-Type: Ensure that all Organization resources include a value for type.
SHINNY-Resources-Profile-Check: SHINNY-Resources-Profile-Check
... id S 1..1 id Logical id of this artifact
... meta S 1..1 SHINNYMeta Metadata about the resource

doco Documentation for this format

Constraints

IdGradePath(s)DetailsRequirements
Assessment-AdminQuestionnairewarningBundleEnsure 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-ApprovalQuestionnairewarningBundleEnsure 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-ConditionICD10warningBundleEnsure 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-ConditionIDwarningBundleEnsure 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-ConditionSNOMEDwarningBundleEnsure 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-OutreachQuestionnairewarningBundleEnsure 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-ServiceDupQuestionnairewarningBundleEnsure 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-ProvisionTypewarningBundleEnsure that all Consents include a value for provision type.
: entry.select(resource as Consent) .all(provision.type.exists())
Encounter-PeriodEndwarningBundleEnsure that all finished Encounters include a value for period.end.
: entry.select(resource as Encounter) .where(status.contains('finished')) .all(period.end.exists())
Encounter-PeriodStartwarningBundleEnsure that all Encounters include a value for period.start.
: entry.select(resource as Encounter) .all(period.start.exists())
Goal-AchievementStatuswarningBundleEnsure that all Goals include a value for achivementStatus.
: entry.select(resource as Goal).exists() implies entry.select(resource as Goal).all(achievementStatus.exists())
Goal-StatusDatewarningBundleEnsure that all Goals include a value for statusDate.
: entry.select(resource as Goal).exists() implies entry.select(resource as Goal).all(statusDate.exists())
Location-AddresswarningBundleEnsure 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-TypewarningBundleEnsure 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-CategoryDisplaywarningBundleEnsure 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-CodeCodewarningBundleEnsure 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-CodeDisplaywarningBundleEnsure 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-InterpretationwarningBundleEnsure 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-LangaugewarningBundleEnsure 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-AddresswarningBundleEnsure 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-IDerrorBundleEnsure that all Organization resources include a value for one of the following id types: NPI, TAX, or MA.
: entry.select(resource as Organization).exists() implies entry.select(resource as Organization).where(identifier.type.coding.code='NPI' or identifier.type.coding.code='TAX' or identifier.type.coding.code='MA').exists()
Organization-TypewarningBundleEnsure 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-ApprovalQuestionnairewarningBundleEnsure 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-HRSNOutreachQuestionnairewarningBundleEnsure 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-SCNOutreachQuestionnairewarningBundleEnsure 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-EncountererrorBundleAssessment-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-PatienterrorBundleAssessment-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-Obs-Encounter-RIerrorBundleChecks 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-RIerrorBundleChecks 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-RIerrorBundleChecks for RI between Observation & child Observation
: entry.select(resource as Observation) .where(derivedFrom.exists() and (meta.where(profile.lower().contains('shinny-observation')) or meta.where(profile.lower().contains('sdohcc-observation')))) .derivedFrom.select(reference.split('/')[1]) .intersect( entry.select(resource as Observation).where(derivedFrom.empty().not() and (meta.where(profile.lower().contains('shin-ny-observation-screening-response')) or meta.where(profile.lower().contains('sdohcc-observationscreeningresponse')))).id) .count() = entry.select(resource as Observation) .where(derivedFrom.exists() and (meta.where(profile.lower().contains('shin-ny-observation-screening-response')) or $this.meta.where(profile.lower().contains('sdohcc-observationscreeningresponse')))) .derivedFrom.reference .count()
SHINNY-Bundle-Obs-hasMember-RIerrorBundleChecks for RI between Observation & child Observations
: entry.select(resource as Observation) .exists(hasMember.exists() and meta.profile.contains('shinny-observation-screening-response')) implies entry.select(resource as Observation) .where(hasMember.exists() and meta.profile.contains('shinny-observation-screening-response')) .hasMember.select(reference.split('/')[1]) .union( entry.select(resource as Observation) .where(hasMember.exists().not() and meta.profile.contains('shinny-observation-screening-response')).id) .count() = entry.select(resource as Observation) .where(hasMember.exists() and meta.profile.contains('shinny-observation-screening-response')) .hasMember.reference .count()
SHINNY-Bundle-Patient-Encounter-RIerrorBundleChecks for RI between Patient & Encounter
: entry.select(resource as Encounter) .select($this.subject.reference.split('/')[1]) contains entry.select(resource as Patient).id
SHINNY-Bundle-Patient-Org-RIerrorBundleChecks 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-RequirederrorBundleEvery submitted resource should be part of a bundle.
: select($this as Bundle).exists()
SHINNY-Bundle-Required-ResourceserrorBundleEvery 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-consenterrorBundleEnsures all bundles with a screening included also includes the consent profile.
: ( (select($this as Bundle).where(meta.profile.upper() != 'http://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-CategorywarningBundlePatient 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-ClasswarningBundleEnsure 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-TypewarningBundleEnsure that the Encounter resource has a status code
: entry.select(resource as Encounter).type.coding .all(code.exists() and system.exists())
SHINNY-Obs-CategoryerrorBundleEnsure 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-CodewarningBundleEnsure 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-EncounterwarningBundleSDOH Observations should have an Encounter
: entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-screening-response')) .all(encounter.reference.exists())
SHINNY-Obs-PatientwarningBundleSDOH Observations should have a Patient
: entry.select(resource as Observation).where(meta.profile.contains('shinny-observation')) .all(subject.reference.exists())
SHINNY-Patient-AddresswarningBundleAll 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-CommunicationwarningBundleCommunication should exist
: entry.select(resource as Patient).communication.exists()
SHINNY-Patient-DOBerrorBundlebirthDate 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-GendererrorBundleGender should be present
: entry.select(resource as Patient).where(gender.exists() and gender.trim().length()).count() > 0
SHINNY-Patient-GenderIdwarningBundleGender 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-MAerrorBundleEvery 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-MRNerrorBundleEvery 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-MiddleNamewarningBundleMiddleName should be present
: entry.select(resource as Patient).name .extension.where(url.contains('middle-name')) .value.trim().length()>0
SHINNY-Patient-PronounswarningBundlePronouns should be present
: entry.select(resource as Patient).extension.where(url='http://shinny.org/us/ny/hrsn/ValueSet/SHINNYPersonalPronounsVS').exists() implies entry.select(resource as Patient).extension.where(url='http://shinny.org/us/ny/hrsn/ValueSet/SHINNYPersonalPronounsVS' and value.select($this as CodeableConcept).coding.code.exists()).exists()
SHINNY-Patient-Race-EthnicitywarningBundleRace & 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-SSNwarningBundleEvery 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-CheckerrorBundleSHINNY-Resources-Profile-Check
: ( select($this as Bundle).where(meta.profile.upper() != 'http://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://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://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://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://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://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://shinny.org/us/ny/hrsn/StructureDefinition/shinny-Consent'.upper()).count() = 0 ) ).allTrue()
SHINNY-Screening-ConsenterrorBundleAll 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-PatienterrorBundleSDOH 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())
SHINNYServiceRequestSDOHCategoryerrorBundleEnsure 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-8warningBundleIf 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-9warningBundleIf 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-2warningBundleIf 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-4warningBundleIf 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-8warningBundleIf 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-9warningBundleIf 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-3warningBundleIf 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-3warningBundleIf 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-1warningBundleIf 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-5warningBundleIf 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-7warningBundleIf 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-7warningBundleIf 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-5warningBundleIf 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-8warningBundleIf 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-2warningBundleIf 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-2warningBundleIf 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-1warningBundleIf 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-5warningBundleIf 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-7warningBundleIf 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-9warningBundleIf 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-4warningBundleIf 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-6warningBundleIf 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-0warningBundleIf 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-2warningBundleIf 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-8warningBundleIf 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-0warningBundleIf 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-7warningBundleIf 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-AuthoredOnwarningBundleEnsure 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-CategoryCodewarningBundleEnsure 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-OccurrencePeriodwarningBundleEnsure 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-QuantitywarningBundleEnsure that all Service Requests have a quantity.
: entry.select(resource as ServiceRequest).exists() implies entry.select(resource as ServiceRequest) .all(quantity.value.exists())
Task-EndPeriodwarningBundleEnsure 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-RepetitionswarningBundleEnsure 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-StartPeriodwarningBundleEnsure 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-StatusReasonerrorBundleEnsure 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-orientationwarningBundleIf 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
NameFlagsCard.TypeDescription & Constraintsdoco
.. Bundle C 0..* Bundle Contains a collection of resources
bdl-1: total only when a search or history
bdl-2: entry.search only when a search
bdl-3: entry.request mandatory for batch/transaction/history, otherwise prohibited
bdl-4: entry.response mandatory for batch-response/transaction-response/history, otherwise prohibited
bdl-7: FullUrl must be unique in a bundle, or else entries with the same fullUrl must have different meta.versionId (except in history bundles)
bdl-9: A document must have an identifier with a system and a value
bdl-10: A document must have a date
bdl-11: A document must have a Composition as the first resource
bdl-12: A message must have a MessageHeader as the first resource
SHINNY-Patient-MRN: Every bundle should always have only 1 MR (i.e MRN) Object within patient.identifier, system.contains('facility') and value (MRN) is provided
SHINNY-Patient-MA: 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'
SHINNY-Patient-SSN: Every bundle should always have only 1 SSN (i.e SS) Object within patient.identifier
SHINNY-Patient-Address: All elements of address should be present
SHINNY-Patient-DOB: birthDate should be a valid date
SHINNY-Patient-Gender: Gender should be present
SHINNY-Patient-GenderId: Gender Id should be present
SHINNY-Patient-Race-Ethnicity: Race & Ethnicity should be present
SHINNY-Patient-Communication: Communication should exist
SHINNY-Patient-MiddleName: MiddleName should be present
SHINNY-Patient-Pronouns: Pronouns should be present
shinny-sexual-orientation: If there is no component or hasMember element then either a value[x] or a data absent reason must be present
SHINNY-Bundle-Obs-hasMember-RI: Checks for RI between Observation & child Observations
SHINNY-Encounter-Class: Ensure that the Encounter resource has a class code; Ensure that the Encounter resource has a class code system
SHINNY-Encounter-Type: Ensure that the Encounter resource has a status code
Encounter-PeriodStart: Ensure that all Encounters include a value for period.start.
Encounter-PeriodEnd: Ensure that all finished Encounters include a value for period.end.
SHINNY-Obs-Encounter: SDOH Observations should have an Encounter
SHINNY-Obs-Patient: SDOH Observations should have a Patient
SHINNY-Obs-Code: Ensure that all Observation resources have screening code; Ensure that all Observation resources have screening code system
SHINNY-Obs-Category: Ensure that all Observation categories have an SDOH code
SHINNY-Screening-Patient: SDOH Screening Observations should have an Patient
ObservationScreenRes-Langauge: Ensure that all Observation Screening Responses have a language.
ObservationScreenRes-CategoryDisplay: Ensure that all Observation Screening Responses have a category display.
ObservationScreenRes-CodeCode: Ensure that all Observation Screening Responses have a code code.
ObservationScreenRes-CodeDisplay: Ensure that all Observation Screening Responses have a code dispay.
ObservationScreenRes-Interpretation: Ensure that specific Observation Screening Responses have an interpretation.
SHINNY-Screening-Consent: All screening bundles must include a consent
Assessment-ConditionID: Ensure that all final assessments have a Condition identifier.
Assessment-ConditionSNOMED: Ensure that all final assessments have a Condition category SNOMED term.
Assessment-ConditionICD10: Ensure that all final assessments have a Condition ICD-10 term.
Assessment-ApprovalQuestionnaire: Ensure that all Assessment Questionnaire bundles have a response to PatientAssessmentApproval.
Assessment-OutreachQuestionnaire: Ensure that all Assessment Questionnaire bundles with patient approval contain a Patient Assessment Outreach Date and a Patient Assessment Status.
Assessment-AdminQuestionnaire: Ensure that all Assessment Questionnaire bundles have a response to the service duplication indicators.
Assessment-ServiceDupQuestionnaire: Ensure that all Assessment Questionnaire bundles have a response to the service duplication indicators.
SHINNY-Assessment-Encounter: Assessment-Encounter should exist
SHINNY-Assessment-Patient: Assessment-Subject should exist
ServiceRequest-Quantity: Ensure that all Service Requests have a quantity.
ServiceRequest-CategoryCode: Ensure that all Service Requests have a category code.
ServiceRequest-OccurrencePeriod: Ensure that all Service Requests have an occurrence period start and end, or occurrence datetime.
ServiceRequest-AuthoredOn: Ensure that all Service Requests have a authored on date.
SHINNYServiceRequestSDOHCategory: Ensure that all Service Request categories have an SDOH code
Task-StatusReason: Ensure that all tasks exists, have a statusReason If the Task.status is rejected, cancelled, completed, or failed.
Task-Repetitions: Ensure that all Tasks have a value for repetitions.
Task-EndPeriod: Ensure that all completed Tasks have an end execution period.
Task-StartPeriod: Ensure that all Tasks have a starting execution period.
Referral-ApprovalQuestionnaire: Ensure that all Referral Questionnaire bundles have a response to PatientReferralApproval.
Referral-HRSNOutreachQuestionnaire: Ensure that all approved Referral Questionnaire bundles have a response to HRSNServiceProviderReferralOutreachDate.
Referral-SCNOutreachQuestionnaire: Ensure that all approved Referral Questionnaire bundles have a response to SCNReferralOutreachDate.
SHINNY-Bundle-Required-Resources: Every bundle should always have one and only one 'Patient' & 'Encounter' and atleast one Org
SHINNY-Bundle-Required: Every submitted resource should be part of a bundle.
SHINNY-Bundle-Patient-Org-RI: Checks for RI between Patient & Assigning Org
SHINNY-Bundle-Patient-Encounter-RI: Checks for RI between Patient & Encounter
SHINNY-Bundle-Obs-derivedFrom-RI: Checks for RI between Observation & child Observation
SHINNY-Bundle-Obs-Patient-RI: Checks for RI between Obs & Patient
SHINNY-Bundle-Obs-Encounter-RI: Checks for RI between Screening Obs & Encounter
Screening-Crosswalk-44250-9: 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
Screening-Crosswalk-44255-8: 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
Screening-Crosswalk-68516-4: 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
Screening-Crosswalk-68517-2: 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
Screening-Crosswalk-68524-8: 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
Screening-Crosswalk-69858-9: If the ObservationScreeningResponse LOINC question code is 69858-9 then answer codes must be one of the following: LA33-6 LA32-8
Screening-Crosswalk-69861-3: If the ObservationScreeningResponse LOINC question code is 69861-3 then answer codes must be one of the following: LA33-6 LA32-8
Screening-Crosswalk-71802-3: If the ObservationScreeningResponse LOINC question code is 71802-3 then answer codes must be one of the following: LA31993-1, LA31994-9, LA31995-6
Screening-Crosswalk-76513-1: If the ObservationScreeningResponse LOINC question code is 76513-1 then answer codes must be one of the following: LA15832-1 LA22683-9 LA31980-8
Screening-Crosswalk-88122-7: If the ObservationScreeningResponse LOINC question code is 88122-7 then answer codes must be one of the following: LA28397-0 LA6729-3 LA28398-8
Screening-Crosswalk-88123-5: If the ObservationScreeningResponse LOINC question code is 88123-5 then answer codes must be one of the following: LA28397-0 LA6729-3 LA28398-8
Screening-Crosswalk-89555-7: 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
Screening-Crosswalk-93030-5: If the ObservationScreeningResponse LOINC question code is 93030-5 then answer codes must be one of the following: LA33-6 LA32-8
Screening-Crosswalk-93038-8: 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
Screening-Crosswalk-93159-2: 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
Screening-Crosswalk-95530-2: 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
Screening-Crosswalk-95615-1: 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
Screening-Crosswalk-95616-9: 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
Screening-Crosswalk-95617-7: 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
Screening-Crosswalk-95618-5: 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
Screening-Crosswalk-96778-6: 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
Screening-Crosswalk-96779-4: If the ObservationScreeningResponse LOINC question code is 96779-4 then answer codes must be one of the following: LA33-6 LA32-8 LA32002-0
Screening-Crosswalk-96780-2: If the ObservationScreeningResponse LOINC question code is 96780-2 then answer codes must be one of the following: LA31981-6 LA31982-4 LA31983-2
Screening-Crosswalk-96781-0: 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
Screening-Crosswalk-96782-8: If the ObservationScreeningResponse LOINC question code is 96782-8 then answer codes must be one of the following: LA33-6 LA32-8
Screening-Crosswalk-96842-0: 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
Screening-Crosswalk-97027-7: If the ObservationScreeningResponse LOINC question code is 97027-7 then answer codes must be one of the following: LA33-6 LA32-8
SHINNY-Consent-Category: Patient Consent category code is 59284-0
Consent-ProvisionType: Ensure that all Consents include a value for provision type.
SHINNY-Bundle-screening-consent: Ensures all bundles with a screening included also includes the consent profile.
Goal-StatusDate: Ensure that all Goals include a value for statusDate.
Goal-AchievementStatus: Ensure that all Goals include a value for achivementStatus.
Location-Address: Ensure that all Location resources include all address elements.
Location-Type: Ensure that all Location resources include a value for type.
Organization-Address: Ensure that all Organization resources include all address elements.
Organization-ID: Ensure that all Organization resources include a value for one of the following id types: NPI, TAX, or MA.
Organization-Type: Ensure that all Organization resources include a value for type.
SHINNY-Resources-Profile-Check: 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
... 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
bdl-5: must be a resource unless there's a request or response
bdl-8: fullUrl cannot be a version specific reference
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

doco Documentation for this format

Terminology Bindings

PathConformanceValueSetURI
Bundle.languagepreferredCommonLanguages
http://hl7.org/fhir/ValueSet/languages
from the FHIR Standard
Additional Bindings Purpose
AllLanguages Max Binding
Bundle.typerequiredBundleType
http://hl7.org/fhir/ValueSet/bundle-type|4.0.1
from the FHIR Standard
Bundle.entry.search.moderequiredSearchEntryMode
http://hl7.org/fhir/ValueSet/search-entry-mode|4.0.1
from the FHIR Standard
Bundle.entry.request.methodrequiredHTTPVerb
http://hl7.org/fhir/ValueSet/http-verb|4.0.1
from the FHIR Standard

Constraints

IdGradePath(s)DetailsRequirements
Assessment-AdminQuestionnairewarningBundleEnsure 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-ApprovalQuestionnairewarningBundleEnsure 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-ConditionICD10warningBundleEnsure 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-ConditionIDwarningBundleEnsure 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-ConditionSNOMEDwarningBundleEnsure 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-OutreachQuestionnairewarningBundleEnsure 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-ServiceDupQuestionnairewarningBundleEnsure 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-ProvisionTypewarningBundleEnsure that all Consents include a value for provision type.
: entry.select(resource as Consent) .all(provision.type.exists())
Encounter-PeriodEndwarningBundleEnsure that all finished Encounters include a value for period.end.
: entry.select(resource as Encounter) .where(status.contains('finished')) .all(period.end.exists())
Encounter-PeriodStartwarningBundleEnsure that all Encounters include a value for period.start.
: entry.select(resource as Encounter) .all(period.start.exists())
Goal-AchievementStatuswarningBundleEnsure that all Goals include a value for achivementStatus.
: entry.select(resource as Goal).exists() implies entry.select(resource as Goal).all(achievementStatus.exists())
Goal-StatusDatewarningBundleEnsure that all Goals include a value for statusDate.
: entry.select(resource as Goal).exists() implies entry.select(resource as Goal).all(statusDate.exists())
Location-AddresswarningBundleEnsure 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-TypewarningBundleEnsure 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-CategoryDisplaywarningBundleEnsure 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-CodeCodewarningBundleEnsure 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-CodeDisplaywarningBundleEnsure 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-InterpretationwarningBundleEnsure 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-LangaugewarningBundleEnsure 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-AddresswarningBundleEnsure 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-IDerrorBundleEnsure that all Organization resources include a value for one of the following id types: NPI, TAX, or MA.
: entry.select(resource as Organization).exists() implies entry.select(resource as Organization).where(identifier.type.coding.code='NPI' or identifier.type.coding.code='TAX' or identifier.type.coding.code='MA').exists()
Organization-TypewarningBundleEnsure 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-ApprovalQuestionnairewarningBundleEnsure 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-HRSNOutreachQuestionnairewarningBundleEnsure 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-SCNOutreachQuestionnairewarningBundleEnsure 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-EncountererrorBundleAssessment-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-PatienterrorBundleAssessment-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-Obs-Encounter-RIerrorBundleChecks 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-RIerrorBundleChecks 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-RIerrorBundleChecks for RI between Observation & child Observation
: entry.select(resource as Observation) .where(derivedFrom.exists() and (meta.where(profile.lower().contains('shinny-observation')) or meta.where(profile.lower().contains('sdohcc-observation')))) .derivedFrom.select(reference.split('/')[1]) .intersect( entry.select(resource as Observation).where(derivedFrom.empty().not() and (meta.where(profile.lower().contains('shin-ny-observation-screening-response')) or meta.where(profile.lower().contains('sdohcc-observationscreeningresponse')))).id) .count() = entry.select(resource as Observation) .where(derivedFrom.exists() and (meta.where(profile.lower().contains('shin-ny-observation-screening-response')) or $this.meta.where(profile.lower().contains('sdohcc-observationscreeningresponse')))) .derivedFrom.reference .count()
SHINNY-Bundle-Obs-hasMember-RIerrorBundleChecks for RI between Observation & child Observations
: entry.select(resource as Observation) .exists(hasMember.exists() and meta.profile.contains('shinny-observation-screening-response')) implies entry.select(resource as Observation) .where(hasMember.exists() and meta.profile.contains('shinny-observation-screening-response')) .hasMember.select(reference.split('/')[1]) .union( entry.select(resource as Observation) .where(hasMember.exists().not() and meta.profile.contains('shinny-observation-screening-response')).id) .count() = entry.select(resource as Observation) .where(hasMember.exists() and meta.profile.contains('shinny-observation-screening-response')) .hasMember.reference .count()
SHINNY-Bundle-Patient-Encounter-RIerrorBundleChecks for RI between Patient & Encounter
: entry.select(resource as Encounter) .select($this.subject.reference.split('/')[1]) contains entry.select(resource as Patient).id
SHINNY-Bundle-Patient-Org-RIerrorBundleChecks 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-RequirederrorBundleEvery submitted resource should be part of a bundle.
: select($this as Bundle).exists()
SHINNY-Bundle-Required-ResourceserrorBundleEvery 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-consenterrorBundleEnsures all bundles with a screening included also includes the consent profile.
: ( (select($this as Bundle).where(meta.profile.upper() != 'http://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-CategorywarningBundlePatient 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-ClasswarningBundleEnsure 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-TypewarningBundleEnsure that the Encounter resource has a status code
: entry.select(resource as Encounter).type.coding .all(code.exists() and system.exists())
SHINNY-Obs-CategoryerrorBundleEnsure 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-CodewarningBundleEnsure 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-EncounterwarningBundleSDOH Observations should have an Encounter
: entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-screening-response')) .all(encounter.reference.exists())
SHINNY-Obs-PatientwarningBundleSDOH Observations should have a Patient
: entry.select(resource as Observation).where(meta.profile.contains('shinny-observation')) .all(subject.reference.exists())
SHINNY-Patient-AddresswarningBundleAll 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-CommunicationwarningBundleCommunication should exist
: entry.select(resource as Patient).communication.exists()
SHINNY-Patient-DOBerrorBundlebirthDate 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-GendererrorBundleGender should be present
: entry.select(resource as Patient).where(gender.exists() and gender.trim().length()).count() > 0
SHINNY-Patient-GenderIdwarningBundleGender 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-MAerrorBundleEvery 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-MRNerrorBundleEvery 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-MiddleNamewarningBundleMiddleName should be present
: entry.select(resource as Patient).name .extension.where(url.contains('middle-name')) .value.trim().length()>0
SHINNY-Patient-PronounswarningBundlePronouns should be present
: entry.select(resource as Patient).extension.where(url='http://shinny.org/us/ny/hrsn/ValueSet/SHINNYPersonalPronounsVS').exists() implies entry.select(resource as Patient).extension.where(url='http://shinny.org/us/ny/hrsn/ValueSet/SHINNYPersonalPronounsVS' and value.select($this as CodeableConcept).coding.code.exists()).exists()
SHINNY-Patient-Race-EthnicitywarningBundleRace & 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-SSNwarningBundleEvery 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-CheckerrorBundleSHINNY-Resources-Profile-Check
: ( select($this as Bundle).where(meta.profile.upper() != 'http://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://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://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://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://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://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://shinny.org/us/ny/hrsn/StructureDefinition/shinny-Consent'.upper()).count() = 0 ) ).allTrue()
SHINNY-Screening-ConsenterrorBundleAll 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-PatienterrorBundleSDOH 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())
SHINNYServiceRequestSDOHCategoryerrorBundleEnsure 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-8warningBundleIf 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-9warningBundleIf 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-2warningBundleIf 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-4warningBundleIf 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-8warningBundleIf 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-9warningBundleIf 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-3warningBundleIf 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-3warningBundleIf 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-1warningBundleIf 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-5warningBundleIf 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-7warningBundleIf 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-7warningBundleIf 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-5warningBundleIf 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-8warningBundleIf 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-2warningBundleIf 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-2warningBundleIf 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-1warningBundleIf 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-5warningBundleIf 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-7warningBundleIf 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-9warningBundleIf 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-4warningBundleIf 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-6warningBundleIf 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-0warningBundleIf 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-2warningBundleIf 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-8warningBundleIf 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-0warningBundleIf 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-7warningBundleIf 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-AuthoredOnwarningBundleEnsure 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-CategoryCodewarningBundleEnsure 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-OccurrencePeriodwarningBundleEnsure 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-QuantitywarningBundleEnsure that all Service Requests have a quantity.
: entry.select(resource as ServiceRequest).exists() implies entry.select(resource as ServiceRequest) .all(quantity.value.exists())
Task-EndPeriodwarningBundleEnsure 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-RepetitionswarningBundleEnsure 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-StartPeriodwarningBundleEnsure 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-StatusReasonerrorBundleEnsure 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-1errorBundletotal only when a search or history
: total.empty() or (type = 'searchset') or (type = 'history')
bdl-2errorBundleentry.search only when a search
: entry.search.empty() or (type = 'searchset')
bdl-3errorBundleentry.request mandatory for batch/transaction/history, otherwise prohibited
: entry.all(request.exists() = (%resource.type = 'batch' or %resource.type = 'transaction' or %resource.type = 'history'))
bdl-4errorBundleentry.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-5errorBundle.entrymust be a resource unless there's a request or response
: resource.exists() or request.exists() or response.exists()
bdl-7errorBundleFullUrl 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-8errorBundle.entryfullUrl cannot be a version specific reference
: fullUrl.contains('/_history/').not()
bdl-9errorBundleA document must have an identifier with a system and a value
: type = 'document' implies (identifier.system.exists() and identifier.value.exists())
bdl-10errorBundleA document must have a date
: type = 'document' implies (timestamp.hasValue())
bdl-11errorBundleA document must have a Composition as the first resource
: type = 'document' implies entry.first().resource.is(Composition)
bdl-12errorBundleA message must have a MessageHeader as the first resource
: type = 'message' implies entry.first().resource.is(MessageHeader)
ele-1error**ALL** elementsAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ext-1error**ALL** extensionsMust have either extensions or value[x], not both
: extension.exists() != value.exists()
shinny-sexual-orientationwarningBundleIf 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:

Key Elements View

NameFlagsCard.TypeDescription & Constraintsdoco
.. Bundle C 0..* Bundle Contains a collection of resources
bdl-1: total only when a search or history
bdl-2: entry.search only when a search
bdl-3: entry.request mandatory for batch/transaction/history, otherwise prohibited
bdl-4: entry.response mandatory for batch-response/transaction-response/history, otherwise prohibited
bdl-7: FullUrl must be unique in a bundle, or else entries with the same fullUrl must have different meta.versionId (except in history bundles)
bdl-9: A document must have an identifier with a system and a value
bdl-10: A document must have a date
bdl-11: A document must have a Composition as the first resource
bdl-12: A message must have a MessageHeader as the first resource
SHINNY-Patient-MRN: Every bundle should always have only 1 MR (i.e MRN) Object within patient.identifier, system.contains('facility') and value (MRN) is provided
SHINNY-Patient-MA: 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'
SHINNY-Patient-SSN: Every bundle should always have only 1 SSN (i.e SS) Object within patient.identifier
SHINNY-Patient-Address: All elements of address should be present
SHINNY-Patient-DOB: birthDate should be a valid date
SHINNY-Patient-Gender: Gender should be present
SHINNY-Patient-GenderId: Gender Id should be present
SHINNY-Patient-Race-Ethnicity: Race & Ethnicity should be present
SHINNY-Patient-Communication: Communication should exist
SHINNY-Patient-MiddleName: MiddleName should be present
SHINNY-Patient-Pronouns: Pronouns should be present
shinny-sexual-orientation: If there is no component or hasMember element then either a value[x] or a data absent reason must be present
SHINNY-Bundle-Obs-hasMember-RI: Checks for RI between Observation & child Observations
SHINNY-Encounter-Class: Ensure that the Encounter resource has a class code; Ensure that the Encounter resource has a class code system
SHINNY-Encounter-Type: Ensure that the Encounter resource has a status code
Encounter-PeriodStart: Ensure that all Encounters include a value for period.start.
Encounter-PeriodEnd: Ensure that all finished Encounters include a value for period.end.
SHINNY-Obs-Encounter: SDOH Observations should have an Encounter
SHINNY-Obs-Patient: SDOH Observations should have a Patient
SHINNY-Obs-Code: Ensure that all Observation resources have screening code; Ensure that all Observation resources have screening code system
SHINNY-Obs-Category: Ensure that all Observation categories have an SDOH code
SHINNY-Screening-Patient: SDOH Screening Observations should have an Patient
ObservationScreenRes-Langauge: Ensure that all Observation Screening Responses have a language.
ObservationScreenRes-CategoryDisplay: Ensure that all Observation Screening Responses have a category display.
ObservationScreenRes-CodeCode: Ensure that all Observation Screening Responses have a code code.
ObservationScreenRes-CodeDisplay: Ensure that all Observation Screening Responses have a code dispay.
ObservationScreenRes-Interpretation: Ensure that specific Observation Screening Responses have an interpretation.
SHINNY-Screening-Consent: All screening bundles must include a consent
Assessment-ConditionID: Ensure that all final assessments have a Condition identifier.
Assessment-ConditionSNOMED: Ensure that all final assessments have a Condition category SNOMED term.
Assessment-ConditionICD10: Ensure that all final assessments have a Condition ICD-10 term.
Assessment-ApprovalQuestionnaire: Ensure that all Assessment Questionnaire bundles have a response to PatientAssessmentApproval.
Assessment-OutreachQuestionnaire: Ensure that all Assessment Questionnaire bundles with patient approval contain a Patient Assessment Outreach Date and a Patient Assessment Status.
Assessment-AdminQuestionnaire: Ensure that all Assessment Questionnaire bundles have a response to the service duplication indicators.
Assessment-ServiceDupQuestionnaire: Ensure that all Assessment Questionnaire bundles have a response to the service duplication indicators.
SHINNY-Assessment-Encounter: Assessment-Encounter should exist
SHINNY-Assessment-Patient: Assessment-Subject should exist
ServiceRequest-Quantity: Ensure that all Service Requests have a quantity.
ServiceRequest-CategoryCode: Ensure that all Service Requests have a category code.
ServiceRequest-OccurrencePeriod: Ensure that all Service Requests have an occurrence period start and end, or occurrence datetime.
ServiceRequest-AuthoredOn: Ensure that all Service Requests have a authored on date.
SHINNYServiceRequestSDOHCategory: Ensure that all Service Request categories have an SDOH code
Task-StatusReason: Ensure that all tasks exists, have a statusReason If the Task.status is rejected, cancelled, completed, or failed.
Task-Repetitions: Ensure that all Tasks have a value for repetitions.
Task-EndPeriod: Ensure that all completed Tasks have an end execution period.
Task-StartPeriod: Ensure that all Tasks have a starting execution period.
Referral-ApprovalQuestionnaire: Ensure that all Referral Questionnaire bundles have a response to PatientReferralApproval.
Referral-HRSNOutreachQuestionnaire: Ensure that all approved Referral Questionnaire bundles have a response to HRSNServiceProviderReferralOutreachDate.
Referral-SCNOutreachQuestionnaire: Ensure that all approved Referral Questionnaire bundles have a response to SCNReferralOutreachDate.
SHINNY-Bundle-Required-Resources: Every bundle should always have one and only one 'Patient' & 'Encounter' and atleast one Org
SHINNY-Bundle-Required: Every submitted resource should be part of a bundle.
SHINNY-Bundle-Patient-Org-RI: Checks for RI between Patient & Assigning Org
SHINNY-Bundle-Patient-Encounter-RI: Checks for RI between Patient & Encounter
SHINNY-Bundle-Obs-derivedFrom-RI: Checks for RI between Observation & child Observation
SHINNY-Bundle-Obs-Patient-RI: Checks for RI between Obs & Patient
SHINNY-Bundle-Obs-Encounter-RI: Checks for RI between Screening Obs & Encounter
Screening-Crosswalk-44250-9: 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
Screening-Crosswalk-44255-8: 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
Screening-Crosswalk-68516-4: 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
Screening-Crosswalk-68517-2: 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
Screening-Crosswalk-68524-8: 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
Screening-Crosswalk-69858-9: If the ObservationScreeningResponse LOINC question code is 69858-9 then answer codes must be one of the following: LA33-6 LA32-8
Screening-Crosswalk-69861-3: If the ObservationScreeningResponse LOINC question code is 69861-3 then answer codes must be one of the following: LA33-6 LA32-8
Screening-Crosswalk-71802-3: If the ObservationScreeningResponse LOINC question code is 71802-3 then answer codes must be one of the following: LA31993-1, LA31994-9, LA31995-6
Screening-Crosswalk-76513-1: If the ObservationScreeningResponse LOINC question code is 76513-1 then answer codes must be one of the following: LA15832-1 LA22683-9 LA31980-8
Screening-Crosswalk-88122-7: If the ObservationScreeningResponse LOINC question code is 88122-7 then answer codes must be one of the following: LA28397-0 LA6729-3 LA28398-8
Screening-Crosswalk-88123-5: If the ObservationScreeningResponse LOINC question code is 88123-5 then answer codes must be one of the following: LA28397-0 LA6729-3 LA28398-8
Screening-Crosswalk-89555-7: 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
Screening-Crosswalk-93030-5: If the ObservationScreeningResponse LOINC question code is 93030-5 then answer codes must be one of the following: LA33-6 LA32-8
Screening-Crosswalk-93038-8: 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
Screening-Crosswalk-93159-2: 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
Screening-Crosswalk-95530-2: 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
Screening-Crosswalk-95615-1: 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
Screening-Crosswalk-95616-9: 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
Screening-Crosswalk-95617-7: 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
Screening-Crosswalk-95618-5: 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
Screening-Crosswalk-96778-6: 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
Screening-Crosswalk-96779-4: If the ObservationScreeningResponse LOINC question code is 96779-4 then answer codes must be one of the following: LA33-6 LA32-8 LA32002-0
Screening-Crosswalk-96780-2: If the ObservationScreeningResponse LOINC question code is 96780-2 then answer codes must be one of the following: LA31981-6 LA31982-4 LA31983-2
Screening-Crosswalk-96781-0: 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
Screening-Crosswalk-96782-8: If the ObservationScreeningResponse LOINC question code is 96782-8 then answer codes must be one of the following: LA33-6 LA32-8
Screening-Crosswalk-96842-0: 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
Screening-Crosswalk-97027-7: If the ObservationScreeningResponse LOINC question code is 97027-7 then answer codes must be one of the following: LA33-6 LA32-8
SHINNY-Consent-Category: Patient Consent category code is 59284-0
Consent-ProvisionType: Ensure that all Consents include a value for provision type.
SHINNY-Bundle-screening-consent: Ensures all bundles with a screening included also includes the consent profile.
Goal-StatusDate: Ensure that all Goals include a value for statusDate.
Goal-AchievementStatus: Ensure that all Goals include a value for achivementStatus.
Location-Address: Ensure that all Location resources include all address elements.
Location-Type: Ensure that all Location resources include a value for type.
Organization-Address: Ensure that all Organization resources include all address elements.
Organization-ID: Ensure that all Organization resources include a value for one of the following id types: NPI, TAX, or MA.
Organization-Type: Ensure that all Organization resources include a value for type.
SHINNY-Resources-Profile-Check: SHINNY-Resources-Profile-Check
... id SΣ 1..1 id Logical id of this artifact
... meta SΣ 1..1 SHINNYMeta Metadata about the resource
ele-1: All FHIR elements must have a @value or children
... implicitRules ?!Σ 0..1 uri A set of rules under which this content was created
ele-1: All FHIR elements must have a @value or children

doco Documentation for this format

Terminology Bindings

PathConformanceValueSetURI
Bundle.typerequiredBundleType
http://hl7.org/fhir/ValueSet/bundle-type|4.0.1
from the FHIR Standard

Constraints

IdGradePath(s)DetailsRequirements
Assessment-AdminQuestionnairewarningBundleEnsure 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-ApprovalQuestionnairewarningBundleEnsure 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-ConditionICD10warningBundleEnsure 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-ConditionIDwarningBundleEnsure 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-ConditionSNOMEDwarningBundleEnsure 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-OutreachQuestionnairewarningBundleEnsure 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-ServiceDupQuestionnairewarningBundleEnsure 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-ProvisionTypewarningBundleEnsure that all Consents include a value for provision type.
: entry.select(resource as Consent) .all(provision.type.exists())
Encounter-PeriodEndwarningBundleEnsure that all finished Encounters include a value for period.end.
: entry.select(resource as Encounter) .where(status.contains('finished')) .all(period.end.exists())
Encounter-PeriodStartwarningBundleEnsure that all Encounters include a value for period.start.
: entry.select(resource as Encounter) .all(period.start.exists())
Goal-AchievementStatuswarningBundleEnsure that all Goals include a value for achivementStatus.
: entry.select(resource as Goal).exists() implies entry.select(resource as Goal).all(achievementStatus.exists())
Goal-StatusDatewarningBundleEnsure that all Goals include a value for statusDate.
: entry.select(resource as Goal).exists() implies entry.select(resource as Goal).all(statusDate.exists())
Location-AddresswarningBundleEnsure 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-TypewarningBundleEnsure 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-CategoryDisplaywarningBundleEnsure 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-CodeCodewarningBundleEnsure 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-CodeDisplaywarningBundleEnsure 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-InterpretationwarningBundleEnsure 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-LangaugewarningBundleEnsure 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-AddresswarningBundleEnsure 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-IDerrorBundleEnsure that all Organization resources include a value for one of the following id types: NPI, TAX, or MA.
: entry.select(resource as Organization).exists() implies entry.select(resource as Organization).where(identifier.type.coding.code='NPI' or identifier.type.coding.code='TAX' or identifier.type.coding.code='MA').exists()
Organization-TypewarningBundleEnsure 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-ApprovalQuestionnairewarningBundleEnsure 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-HRSNOutreachQuestionnairewarningBundleEnsure 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-SCNOutreachQuestionnairewarningBundleEnsure 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-EncountererrorBundleAssessment-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-PatienterrorBundleAssessment-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-Obs-Encounter-RIerrorBundleChecks 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-RIerrorBundleChecks 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-RIerrorBundleChecks for RI between Observation & child Observation
: entry.select(resource as Observation) .where(derivedFrom.exists() and (meta.where(profile.lower().contains('shinny-observation')) or meta.where(profile.lower().contains('sdohcc-observation')))) .derivedFrom.select(reference.split('/')[1]) .intersect( entry.select(resource as Observation).where(derivedFrom.empty().not() and (meta.where(profile.lower().contains('shin-ny-observation-screening-response')) or meta.where(profile.lower().contains('sdohcc-observationscreeningresponse')))).id) .count() = entry.select(resource as Observation) .where(derivedFrom.exists() and (meta.where(profile.lower().contains('shin-ny-observation-screening-response')) or $this.meta.where(profile.lower().contains('sdohcc-observationscreeningresponse')))) .derivedFrom.reference .count()
SHINNY-Bundle-Obs-hasMember-RIerrorBundleChecks for RI between Observation & child Observations
: entry.select(resource as Observation) .exists(hasMember.exists() and meta.profile.contains('shinny-observation-screening-response')) implies entry.select(resource as Observation) .where(hasMember.exists() and meta.profile.contains('shinny-observation-screening-response')) .hasMember.select(reference.split('/')[1]) .union( entry.select(resource as Observation) .where(hasMember.exists().not() and meta.profile.contains('shinny-observation-screening-response')).id) .count() = entry.select(resource as Observation) .where(hasMember.exists() and meta.profile.contains('shinny-observation-screening-response')) .hasMember.reference .count()
SHINNY-Bundle-Patient-Encounter-RIerrorBundleChecks for RI between Patient & Encounter
: entry.select(resource as Encounter) .select($this.subject.reference.split('/')[1]) contains entry.select(resource as Patient).id
SHINNY-Bundle-Patient-Org-RIerrorBundleChecks 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-RequirederrorBundleEvery submitted resource should be part of a bundle.
: select($this as Bundle).exists()
SHINNY-Bundle-Required-ResourceserrorBundleEvery 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-consenterrorBundleEnsures all bundles with a screening included also includes the consent profile.
: ( (select($this as Bundle).where(meta.profile.upper() != 'http://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-CategorywarningBundlePatient 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-ClasswarningBundleEnsure 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-TypewarningBundleEnsure that the Encounter resource has a status code
: entry.select(resource as Encounter).type.coding .all(code.exists() and system.exists())
SHINNY-Obs-CategoryerrorBundleEnsure 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-CodewarningBundleEnsure 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-EncounterwarningBundleSDOH Observations should have an Encounter
: entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-screening-response')) .all(encounter.reference.exists())
SHINNY-Obs-PatientwarningBundleSDOH Observations should have a Patient
: entry.select(resource as Observation).where(meta.profile.contains('shinny-observation')) .all(subject.reference.exists())
SHINNY-Patient-AddresswarningBundleAll 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-CommunicationwarningBundleCommunication should exist
: entry.select(resource as Patient).communication.exists()
SHINNY-Patient-DOBerrorBundlebirthDate 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-GendererrorBundleGender should be present
: entry.select(resource as Patient).where(gender.exists() and gender.trim().length()).count() > 0
SHINNY-Patient-GenderIdwarningBundleGender 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-MAerrorBundleEvery 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-MRNerrorBundleEvery 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-MiddleNamewarningBundleMiddleName should be present
: entry.select(resource as Patient).name .extension.where(url.contains('middle-name')) .value.trim().length()>0
SHINNY-Patient-PronounswarningBundlePronouns should be present
: entry.select(resource as Patient).extension.where(url='http://shinny.org/us/ny/hrsn/ValueSet/SHINNYPersonalPronounsVS').exists() implies entry.select(resource as Patient).extension.where(url='http://shinny.org/us/ny/hrsn/ValueSet/SHINNYPersonalPronounsVS' and value.select($this as CodeableConcept).coding.code.exists()).exists()
SHINNY-Patient-Race-EthnicitywarningBundleRace & 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-SSNwarningBundleEvery 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-CheckerrorBundleSHINNY-Resources-Profile-Check
: ( select($this as Bundle).where(meta.profile.upper() != 'http://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://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://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://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://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://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://shinny.org/us/ny/hrsn/StructureDefinition/shinny-Consent'.upper()).count() = 0 ) ).allTrue()
SHINNY-Screening-ConsenterrorBundleAll 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-PatienterrorBundleSDOH 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())
SHINNYServiceRequestSDOHCategoryerrorBundleEnsure 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-8warningBundleIf 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-9warningBundleIf 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-2warningBundleIf 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-4warningBundleIf 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-8warningBundleIf 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-9warningBundleIf 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-3warningBundleIf 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-3warningBundleIf 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-1warningBundleIf 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-5warningBundleIf 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-7warningBundleIf 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-7warningBundleIf 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-5warningBundleIf 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-8warningBundleIf 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-2warningBundleIf 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-2warningBundleIf 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-1warningBundleIf 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-5warningBundleIf 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-7warningBundleIf 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-9warningBundleIf 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-4warningBundleIf 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-6warningBundleIf 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-0warningBundleIf 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-2warningBundleIf 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-8warningBundleIf 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-0warningBundleIf 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-7warningBundleIf 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-AuthoredOnwarningBundleEnsure 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-CategoryCodewarningBundleEnsure 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-OccurrencePeriodwarningBundleEnsure 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-QuantitywarningBundleEnsure that all Service Requests have a quantity.
: entry.select(resource as ServiceRequest).exists() implies entry.select(resource as ServiceRequest) .all(quantity.value.exists())
Task-EndPeriodwarningBundleEnsure 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-RepetitionswarningBundleEnsure 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-StartPeriodwarningBundleEnsure 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-StatusReasonerrorBundleEnsure 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-1errorBundletotal only when a search or history
: total.empty() or (type = 'searchset') or (type = 'history')
bdl-2errorBundleentry.search only when a search
: entry.search.empty() or (type = 'searchset')
bdl-3errorBundleentry.request mandatory for batch/transaction/history, otherwise prohibited
: entry.all(request.exists() = (%resource.type = 'batch' or %resource.type = 'transaction' or %resource.type = 'history'))
bdl-4errorBundleentry.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-7errorBundleFullUrl 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-9errorBundleA document must have an identifier with a system and a value
: type = 'document' implies (identifier.system.exists() and identifier.value.exists())
bdl-10errorBundleA document must have a date
: type = 'document' implies (timestamp.hasValue())
bdl-11errorBundleA document must have a Composition as the first resource
: type = 'document' implies entry.first().resource.is(Composition)
bdl-12errorBundleA message must have a MessageHeader as the first resource
: type = 'message' implies entry.first().resource.is(MessageHeader)
ele-1error**ALL** elementsAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
shinny-sexual-orientationwarningBundleIf 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

NameFlagsCard.TypeDescription & Constraintsdoco
.. Bundle C 0..* Bundle Contains a collection of resources
SHINNY-Patient-MRN: Every bundle should always have only 1 MR (i.e MRN) Object within patient.identifier, system.contains('facility') and value (MRN) is provided
SHINNY-Patient-MA: 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'
SHINNY-Patient-SSN: Every bundle should always have only 1 SSN (i.e SS) Object within patient.identifier
SHINNY-Patient-Address: All elements of address should be present
SHINNY-Patient-DOB: birthDate should be a valid date
SHINNY-Patient-Gender: Gender should be present
SHINNY-Patient-GenderId: Gender Id should be present
SHINNY-Patient-Race-Ethnicity: Race & Ethnicity should be present
SHINNY-Patient-Communication: Communication should exist
SHINNY-Patient-MiddleName: MiddleName should be present
SHINNY-Patient-Pronouns: Pronouns should be present
shinny-sexual-orientation: If there is no component or hasMember element then either a value[x] or a data absent reason must be present
SHINNY-Bundle-Obs-hasMember-RI: Checks for RI between Observation & child Observations
SHINNY-Encounter-Class: Ensure that the Encounter resource has a class code; Ensure that the Encounter resource has a class code system
SHINNY-Encounter-Type: Ensure that the Encounter resource has a status code
Encounter-PeriodStart: Ensure that all Encounters include a value for period.start.
Encounter-PeriodEnd: Ensure that all finished Encounters include a value for period.end.
SHINNY-Obs-Encounter: SDOH Observations should have an Encounter
SHINNY-Obs-Patient: SDOH Observations should have a Patient
SHINNY-Obs-Code: Ensure that all Observation resources have screening code; Ensure that all Observation resources have screening code system
SHINNY-Obs-Category: Ensure that all Observation categories have an SDOH code
SHINNY-Screening-Patient: SDOH Screening Observations should have an Patient
ObservationScreenRes-Langauge: Ensure that all Observation Screening Responses have a language.
ObservationScreenRes-CategoryDisplay: Ensure that all Observation Screening Responses have a category display.
ObservationScreenRes-CodeCode: Ensure that all Observation Screening Responses have a code code.
ObservationScreenRes-CodeDisplay: Ensure that all Observation Screening Responses have a code dispay.
ObservationScreenRes-Interpretation: Ensure that specific Observation Screening Responses have an interpretation.
SHINNY-Screening-Consent: All screening bundles must include a consent
Assessment-ConditionID: Ensure that all final assessments have a Condition identifier.
Assessment-ConditionSNOMED: Ensure that all final assessments have a Condition category SNOMED term.
Assessment-ConditionICD10: Ensure that all final assessments have a Condition ICD-10 term.
Assessment-ApprovalQuestionnaire: Ensure that all Assessment Questionnaire bundles have a response to PatientAssessmentApproval.
Assessment-OutreachQuestionnaire: Ensure that all Assessment Questionnaire bundles with patient approval contain a Patient Assessment Outreach Date and a Patient Assessment Status.
Assessment-AdminQuestionnaire: Ensure that all Assessment Questionnaire bundles have a response to the service duplication indicators.
Assessment-ServiceDupQuestionnaire: Ensure that all Assessment Questionnaire bundles have a response to the service duplication indicators.
SHINNY-Assessment-Encounter: Assessment-Encounter should exist
SHINNY-Assessment-Patient: Assessment-Subject should exist
ServiceRequest-Quantity: Ensure that all Service Requests have a quantity.
ServiceRequest-CategoryCode: Ensure that all Service Requests have a category code.
ServiceRequest-OccurrencePeriod: Ensure that all Service Requests have an occurrence period start and end, or occurrence datetime.
ServiceRequest-AuthoredOn: Ensure that all Service Requests have a authored on date.
SHINNYServiceRequestSDOHCategory: Ensure that all Service Request categories have an SDOH code
Task-StatusReason: Ensure that all tasks exists, have a statusReason If the Task.status is rejected, cancelled, completed, or failed.
Task-Repetitions: Ensure that all Tasks have a value for repetitions.
Task-EndPeriod: Ensure that all completed Tasks have an end execution period.
Task-StartPeriod: Ensure that all Tasks have a starting execution period.
Referral-ApprovalQuestionnaire: Ensure that all Referral Questionnaire bundles have a response to PatientReferralApproval.
Referral-HRSNOutreachQuestionnaire: Ensure that all approved Referral Questionnaire bundles have a response to HRSNServiceProviderReferralOutreachDate.
Referral-SCNOutreachQuestionnaire: Ensure that all approved Referral Questionnaire bundles have a response to SCNReferralOutreachDate.
SHINNY-Bundle-Required-Resources: Every bundle should always have one and only one 'Patient' & 'Encounter' and atleast one Org
SHINNY-Bundle-Required: Every submitted resource should be part of a bundle.
SHINNY-Bundle-Patient-Org-RI: Checks for RI between Patient & Assigning Org
SHINNY-Bundle-Patient-Encounter-RI: Checks for RI between Patient & Encounter
SHINNY-Bundle-Obs-derivedFrom-RI: Checks for RI between Observation & child Observation
SHINNY-Bundle-Obs-Patient-RI: Checks for RI between Obs & Patient
SHINNY-Bundle-Obs-Encounter-RI: Checks for RI between Screening Obs & Encounter
Screening-Crosswalk-44250-9: 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
Screening-Crosswalk-44255-8: 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
Screening-Crosswalk-68516-4: 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
Screening-Crosswalk-68517-2: 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
Screening-Crosswalk-68524-8: 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
Screening-Crosswalk-69858-9: If the ObservationScreeningResponse LOINC question code is 69858-9 then answer codes must be one of the following: LA33-6 LA32-8
Screening-Crosswalk-69861-3: If the ObservationScreeningResponse LOINC question code is 69861-3 then answer codes must be one of the following: LA33-6 LA32-8
Screening-Crosswalk-71802-3: If the ObservationScreeningResponse LOINC question code is 71802-3 then answer codes must be one of the following: LA31993-1, LA31994-9, LA31995-6
Screening-Crosswalk-76513-1: If the ObservationScreeningResponse LOINC question code is 76513-1 then answer codes must be one of the following: LA15832-1 LA22683-9 LA31980-8
Screening-Crosswalk-88122-7: If the ObservationScreeningResponse LOINC question code is 88122-7 then answer codes must be one of the following: LA28397-0 LA6729-3 LA28398-8
Screening-Crosswalk-88123-5: If the ObservationScreeningResponse LOINC question code is 88123-5 then answer codes must be one of the following: LA28397-0 LA6729-3 LA28398-8
Screening-Crosswalk-89555-7: 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
Screening-Crosswalk-93030-5: If the ObservationScreeningResponse LOINC question code is 93030-5 then answer codes must be one of the following: LA33-6 LA32-8
Screening-Crosswalk-93038-8: 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
Screening-Crosswalk-93159-2: 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
Screening-Crosswalk-95530-2: 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
Screening-Crosswalk-95615-1: 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
Screening-Crosswalk-95616-9: 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
Screening-Crosswalk-95617-7: 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
Screening-Crosswalk-95618-5: 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
Screening-Crosswalk-96778-6: 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
Screening-Crosswalk-96779-4: If the ObservationScreeningResponse LOINC question code is 96779-4 then answer codes must be one of the following: LA33-6 LA32-8 LA32002-0
Screening-Crosswalk-96780-2: If the ObservationScreeningResponse LOINC question code is 96780-2 then answer codes must be one of the following: LA31981-6 LA31982-4 LA31983-2
Screening-Crosswalk-96781-0: 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
Screening-Crosswalk-96782-8: If the ObservationScreeningResponse LOINC question code is 96782-8 then answer codes must be one of the following: LA33-6 LA32-8
Screening-Crosswalk-96842-0: 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
Screening-Crosswalk-97027-7: If the ObservationScreeningResponse LOINC question code is 97027-7 then answer codes must be one of the following: LA33-6 LA32-8
SHINNY-Consent-Category: Patient Consent category code is 59284-0
Consent-ProvisionType: Ensure that all Consents include a value for provision type.
SHINNY-Bundle-screening-consent: Ensures all bundles with a screening included also includes the consent profile.
Goal-StatusDate: Ensure that all Goals include a value for statusDate.
Goal-AchievementStatus: Ensure that all Goals include a value for achivementStatus.
Location-Address: Ensure that all Location resources include all address elements.
Location-Type: Ensure that all Location resources include a value for type.
Organization-Address: Ensure that all Organization resources include all address elements.
Organization-ID: Ensure that all Organization resources include a value for one of the following id types: NPI, TAX, or MA.
Organization-Type: Ensure that all Organization resources include a value for type.
SHINNY-Resources-Profile-Check: SHINNY-Resources-Profile-Check
... id S 1..1 id Logical id of this artifact
... meta S 1..1 SHINNYMeta Metadata about the resource

doco Documentation for this format

Constraints

IdGradePath(s)DetailsRequirements
Assessment-AdminQuestionnairewarningBundleEnsure 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-ApprovalQuestionnairewarningBundleEnsure 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-ConditionICD10warningBundleEnsure 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-ConditionIDwarningBundleEnsure 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-ConditionSNOMEDwarningBundleEnsure 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-OutreachQuestionnairewarningBundleEnsure 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-ServiceDupQuestionnairewarningBundleEnsure 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-ProvisionTypewarningBundleEnsure that all Consents include a value for provision type.
: entry.select(resource as Consent) .all(provision.type.exists())
Encounter-PeriodEndwarningBundleEnsure that all finished Encounters include a value for period.end.
: entry.select(resource as Encounter) .where(status.contains('finished')) .all(period.end.exists())
Encounter-PeriodStartwarningBundleEnsure that all Encounters include a value for period.start.
: entry.select(resource as Encounter) .all(period.start.exists())
Goal-AchievementStatuswarningBundleEnsure that all Goals include a value for achivementStatus.
: entry.select(resource as Goal).exists() implies entry.select(resource as Goal).all(achievementStatus.exists())
Goal-StatusDatewarningBundleEnsure that all Goals include a value for statusDate.
: entry.select(resource as Goal).exists() implies entry.select(resource as Goal).all(statusDate.exists())
Location-AddresswarningBundleEnsure 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-TypewarningBundleEnsure 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-CategoryDisplaywarningBundleEnsure 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-CodeCodewarningBundleEnsure 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-CodeDisplaywarningBundleEnsure 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-InterpretationwarningBundleEnsure 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-LangaugewarningBundleEnsure 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-AddresswarningBundleEnsure 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-IDerrorBundleEnsure that all Organization resources include a value for one of the following id types: NPI, TAX, or MA.
: entry.select(resource as Organization).exists() implies entry.select(resource as Organization).where(identifier.type.coding.code='NPI' or identifier.type.coding.code='TAX' or identifier.type.coding.code='MA').exists()
Organization-TypewarningBundleEnsure 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-ApprovalQuestionnairewarningBundleEnsure 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-HRSNOutreachQuestionnairewarningBundleEnsure 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-SCNOutreachQuestionnairewarningBundleEnsure 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-EncountererrorBundleAssessment-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-PatienterrorBundleAssessment-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-Obs-Encounter-RIerrorBundleChecks 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-RIerrorBundleChecks 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-RIerrorBundleChecks for RI between Observation & child Observation
: entry.select(resource as Observation) .where(derivedFrom.exists() and (meta.where(profile.lower().contains('shinny-observation')) or meta.where(profile.lower().contains('sdohcc-observation')))) .derivedFrom.select(reference.split('/')[1]) .intersect( entry.select(resource as Observation).where(derivedFrom.empty().not() and (meta.where(profile.lower().contains('shin-ny-observation-screening-response')) or meta.where(profile.lower().contains('sdohcc-observationscreeningresponse')))).id) .count() = entry.select(resource as Observation) .where(derivedFrom.exists() and (meta.where(profile.lower().contains('shin-ny-observation-screening-response')) or $this.meta.where(profile.lower().contains('sdohcc-observationscreeningresponse')))) .derivedFrom.reference .count()
SHINNY-Bundle-Obs-hasMember-RIerrorBundleChecks for RI between Observation & child Observations
: entry.select(resource as Observation) .exists(hasMember.exists() and meta.profile.contains('shinny-observation-screening-response')) implies entry.select(resource as Observation) .where(hasMember.exists() and meta.profile.contains('shinny-observation-screening-response')) .hasMember.select(reference.split('/')[1]) .union( entry.select(resource as Observation) .where(hasMember.exists().not() and meta.profile.contains('shinny-observation-screening-response')).id) .count() = entry.select(resource as Observation) .where(hasMember.exists() and meta.profile.contains('shinny-observation-screening-response')) .hasMember.reference .count()
SHINNY-Bundle-Patient-Encounter-RIerrorBundleChecks for RI between Patient & Encounter
: entry.select(resource as Encounter) .select($this.subject.reference.split('/')[1]) contains entry.select(resource as Patient).id
SHINNY-Bundle-Patient-Org-RIerrorBundleChecks 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-RequirederrorBundleEvery submitted resource should be part of a bundle.
: select($this as Bundle).exists()
SHINNY-Bundle-Required-ResourceserrorBundleEvery 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-consenterrorBundleEnsures all bundles with a screening included also includes the consent profile.
: ( (select($this as Bundle).where(meta.profile.upper() != 'http://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-CategorywarningBundlePatient 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-ClasswarningBundleEnsure 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-TypewarningBundleEnsure that the Encounter resource has a status code
: entry.select(resource as Encounter).type.coding .all(code.exists() and system.exists())
SHINNY-Obs-CategoryerrorBundleEnsure 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-CodewarningBundleEnsure 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-EncounterwarningBundleSDOH Observations should have an Encounter
: entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-screening-response')) .all(encounter.reference.exists())
SHINNY-Obs-PatientwarningBundleSDOH Observations should have a Patient
: entry.select(resource as Observation).where(meta.profile.contains('shinny-observation')) .all(subject.reference.exists())
SHINNY-Patient-AddresswarningBundleAll 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-CommunicationwarningBundleCommunication should exist
: entry.select(resource as Patient).communication.exists()
SHINNY-Patient-DOBerrorBundlebirthDate 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-GendererrorBundleGender should be present
: entry.select(resource as Patient).where(gender.exists() and gender.trim().length()).count() > 0
SHINNY-Patient-GenderIdwarningBundleGender 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-MAerrorBundleEvery 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-MRNerrorBundleEvery 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-MiddleNamewarningBundleMiddleName should be present
: entry.select(resource as Patient).name .extension.where(url.contains('middle-name')) .value.trim().length()>0
SHINNY-Patient-PronounswarningBundlePronouns should be present
: entry.select(resource as Patient).extension.where(url='http://shinny.org/us/ny/hrsn/ValueSet/SHINNYPersonalPronounsVS').exists() implies entry.select(resource as Patient).extension.where(url='http://shinny.org/us/ny/hrsn/ValueSet/SHINNYPersonalPronounsVS' and value.select($this as CodeableConcept).coding.code.exists()).exists()
SHINNY-Patient-Race-EthnicitywarningBundleRace & 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-SSNwarningBundleEvery 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-CheckerrorBundleSHINNY-Resources-Profile-Check
: ( select($this as Bundle).where(meta.profile.upper() != 'http://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://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://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://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://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://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://shinny.org/us/ny/hrsn/StructureDefinition/shinny-Consent'.upper()).count() = 0 ) ).allTrue()
SHINNY-Screening-ConsenterrorBundleAll 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-PatienterrorBundleSDOH 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())
SHINNYServiceRequestSDOHCategoryerrorBundleEnsure 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-8warningBundleIf 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-9warningBundleIf 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-2warningBundleIf 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-4warningBundleIf 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-8warningBundleIf 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-9warningBundleIf 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-3warningBundleIf 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-3warningBundleIf 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-1warningBundleIf 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-5warningBundleIf 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-7warningBundleIf 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-7warningBundleIf 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-5warningBundleIf 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-8warningBundleIf 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-2warningBundleIf 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-2warningBundleIf 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-1warningBundleIf 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-5warningBundleIf 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-7warningBundleIf 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-9warningBundleIf 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-4warningBundleIf 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-6warningBundleIf 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-0warningBundleIf 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-2warningBundleIf 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-8warningBundleIf 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-0warningBundleIf 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-7warningBundleIf 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-AuthoredOnwarningBundleEnsure 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-CategoryCodewarningBundleEnsure 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-OccurrencePeriodwarningBundleEnsure 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-QuantitywarningBundleEnsure that all Service Requests have a quantity.
: entry.select(resource as ServiceRequest).exists() implies entry.select(resource as ServiceRequest) .all(quantity.value.exists())
Task-EndPeriodwarningBundleEnsure 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-RepetitionswarningBundleEnsure 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-StartPeriodwarningBundleEnsure 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-StatusReasonerrorBundleEnsure 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-orientationwarningBundleIf 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

NameFlagsCard.TypeDescription & Constraintsdoco
.. Bundle C 0..* Bundle Contains a collection of resources
bdl-1: total only when a search or history
bdl-2: entry.search only when a search
bdl-3: entry.request mandatory for batch/transaction/history, otherwise prohibited
bdl-4: entry.response mandatory for batch-response/transaction-response/history, otherwise prohibited
bdl-7: FullUrl must be unique in a bundle, or else entries with the same fullUrl must have different meta.versionId (except in history bundles)
bdl-9: A document must have an identifier with a system and a value
bdl-10: A document must have a date
bdl-11: A document must have a Composition as the first resource
bdl-12: A message must have a MessageHeader as the first resource
SHINNY-Patient-MRN: Every bundle should always have only 1 MR (i.e MRN) Object within patient.identifier, system.contains('facility') and value (MRN) is provided
SHINNY-Patient-MA: 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'
SHINNY-Patient-SSN: Every bundle should always have only 1 SSN (i.e SS) Object within patient.identifier
SHINNY-Patient-Address: All elements of address should be present
SHINNY-Patient-DOB: birthDate should be a valid date
SHINNY-Patient-Gender: Gender should be present
SHINNY-Patient-GenderId: Gender Id should be present
SHINNY-Patient-Race-Ethnicity: Race & Ethnicity should be present
SHINNY-Patient-Communication: Communication should exist
SHINNY-Patient-MiddleName: MiddleName should be present
SHINNY-Patient-Pronouns: Pronouns should be present
shinny-sexual-orientation: If there is no component or hasMember element then either a value[x] or a data absent reason must be present
SHINNY-Bundle-Obs-hasMember-RI: Checks for RI between Observation & child Observations
SHINNY-Encounter-Class: Ensure that the Encounter resource has a class code; Ensure that the Encounter resource has a class code system
SHINNY-Encounter-Type: Ensure that the Encounter resource has a status code
Encounter-PeriodStart: Ensure that all Encounters include a value for period.start.
Encounter-PeriodEnd: Ensure that all finished Encounters include a value for period.end.
SHINNY-Obs-Encounter: SDOH Observations should have an Encounter
SHINNY-Obs-Patient: SDOH Observations should have a Patient
SHINNY-Obs-Code: Ensure that all Observation resources have screening code; Ensure that all Observation resources have screening code system
SHINNY-Obs-Category: Ensure that all Observation categories have an SDOH code
SHINNY-Screening-Patient: SDOH Screening Observations should have an Patient
ObservationScreenRes-Langauge: Ensure that all Observation Screening Responses have a language.
ObservationScreenRes-CategoryDisplay: Ensure that all Observation Screening Responses have a category display.
ObservationScreenRes-CodeCode: Ensure that all Observation Screening Responses have a code code.
ObservationScreenRes-CodeDisplay: Ensure that all Observation Screening Responses have a code dispay.
ObservationScreenRes-Interpretation: Ensure that specific Observation Screening Responses have an interpretation.
SHINNY-Screening-Consent: All screening bundles must include a consent
Assessment-ConditionID: Ensure that all final assessments have a Condition identifier.
Assessment-ConditionSNOMED: Ensure that all final assessments have a Condition category SNOMED term.
Assessment-ConditionICD10: Ensure that all final assessments have a Condition ICD-10 term.
Assessment-ApprovalQuestionnaire: Ensure that all Assessment Questionnaire bundles have a response to PatientAssessmentApproval.
Assessment-OutreachQuestionnaire: Ensure that all Assessment Questionnaire bundles with patient approval contain a Patient Assessment Outreach Date and a Patient Assessment Status.
Assessment-AdminQuestionnaire: Ensure that all Assessment Questionnaire bundles have a response to the service duplication indicators.
Assessment-ServiceDupQuestionnaire: Ensure that all Assessment Questionnaire bundles have a response to the service duplication indicators.
SHINNY-Assessment-Encounter: Assessment-Encounter should exist
SHINNY-Assessment-Patient: Assessment-Subject should exist
ServiceRequest-Quantity: Ensure that all Service Requests have a quantity.
ServiceRequest-CategoryCode: Ensure that all Service Requests have a category code.
ServiceRequest-OccurrencePeriod: Ensure that all Service Requests have an occurrence period start and end, or occurrence datetime.
ServiceRequest-AuthoredOn: Ensure that all Service Requests have a authored on date.
SHINNYServiceRequestSDOHCategory: Ensure that all Service Request categories have an SDOH code
Task-StatusReason: Ensure that all tasks exists, have a statusReason If the Task.status is rejected, cancelled, completed, or failed.
Task-Repetitions: Ensure that all Tasks have a value for repetitions.
Task-EndPeriod: Ensure that all completed Tasks have an end execution period.
Task-StartPeriod: Ensure that all Tasks have a starting execution period.
Referral-ApprovalQuestionnaire: Ensure that all Referral Questionnaire bundles have a response to PatientReferralApproval.
Referral-HRSNOutreachQuestionnaire: Ensure that all approved Referral Questionnaire bundles have a response to HRSNServiceProviderReferralOutreachDate.
Referral-SCNOutreachQuestionnaire: Ensure that all approved Referral Questionnaire bundles have a response to SCNReferralOutreachDate.
SHINNY-Bundle-Required-Resources: Every bundle should always have one and only one 'Patient' & 'Encounter' and atleast one Org
SHINNY-Bundle-Required: Every submitted resource should be part of a bundle.
SHINNY-Bundle-Patient-Org-RI: Checks for RI between Patient & Assigning Org
SHINNY-Bundle-Patient-Encounter-RI: Checks for RI between Patient & Encounter
SHINNY-Bundle-Obs-derivedFrom-RI: Checks for RI between Observation & child Observation
SHINNY-Bundle-Obs-Patient-RI: Checks for RI between Obs & Patient
SHINNY-Bundle-Obs-Encounter-RI: Checks for RI between Screening Obs & Encounter
Screening-Crosswalk-44250-9: 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
Screening-Crosswalk-44255-8: 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
Screening-Crosswalk-68516-4: 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
Screening-Crosswalk-68517-2: 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
Screening-Crosswalk-68524-8: 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
Screening-Crosswalk-69858-9: If the ObservationScreeningResponse LOINC question code is 69858-9 then answer codes must be one of the following: LA33-6 LA32-8
Screening-Crosswalk-69861-3: If the ObservationScreeningResponse LOINC question code is 69861-3 then answer codes must be one of the following: LA33-6 LA32-8
Screening-Crosswalk-71802-3: If the ObservationScreeningResponse LOINC question code is 71802-3 then answer codes must be one of the following: LA31993-1, LA31994-9, LA31995-6
Screening-Crosswalk-76513-1: If the ObservationScreeningResponse LOINC question code is 76513-1 then answer codes must be one of the following: LA15832-1 LA22683-9 LA31980-8
Screening-Crosswalk-88122-7: If the ObservationScreeningResponse LOINC question code is 88122-7 then answer codes must be one of the following: LA28397-0 LA6729-3 LA28398-8
Screening-Crosswalk-88123-5: If the ObservationScreeningResponse LOINC question code is 88123-5 then answer codes must be one of the following: LA28397-0 LA6729-3 LA28398-8
Screening-Crosswalk-89555-7: 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
Screening-Crosswalk-93030-5: If the ObservationScreeningResponse LOINC question code is 93030-5 then answer codes must be one of the following: LA33-6 LA32-8
Screening-Crosswalk-93038-8: 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
Screening-Crosswalk-93159-2: 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
Screening-Crosswalk-95530-2: 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
Screening-Crosswalk-95615-1: 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
Screening-Crosswalk-95616-9: 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
Screening-Crosswalk-95617-7: 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
Screening-Crosswalk-95618-5: 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
Screening-Crosswalk-96778-6: 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
Screening-Crosswalk-96779-4: If the ObservationScreeningResponse LOINC question code is 96779-4 then answer codes must be one of the following: LA33-6 LA32-8 LA32002-0
Screening-Crosswalk-96780-2: If the ObservationScreeningResponse LOINC question code is 96780-2 then answer codes must be one of the following: LA31981-6 LA31982-4 LA31983-2
Screening-Crosswalk-96781-0: 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
Screening-Crosswalk-96782-8: If the ObservationScreeningResponse LOINC question code is 96782-8 then answer codes must be one of the following: LA33-6 LA32-8
Screening-Crosswalk-96842-0: 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
Screening-Crosswalk-97027-7: If the ObservationScreeningResponse LOINC question code is 97027-7 then answer codes must be one of the following: LA33-6 LA32-8
SHINNY-Consent-Category: Patient Consent category code is 59284-0
Consent-ProvisionType: Ensure that all Consents include a value for provision type.
SHINNY-Bundle-screening-consent: Ensures all bundles with a screening included also includes the consent profile.
Goal-StatusDate: Ensure that all Goals include a value for statusDate.
Goal-AchievementStatus: Ensure that all Goals include a value for achivementStatus.
Location-Address: Ensure that all Location resources include all address elements.
Location-Type: Ensure that all Location resources include a value for type.
Organization-Address: Ensure that all Organization resources include all address elements.
Organization-ID: Ensure that all Organization resources include a value for one of the following id types: NPI, TAX, or MA.
Organization-Type: Ensure that all Organization resources include a value for type.
SHINNY-Resources-Profile-Check: 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
... 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
bdl-5: must be a resource unless there's a request or response
bdl-8: fullUrl cannot be a version specific reference
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

doco Documentation for this format

Terminology Bindings

PathConformanceValueSetURI
Bundle.languagepreferredCommonLanguages
http://hl7.org/fhir/ValueSet/languages
from the FHIR Standard
Additional Bindings Purpose
AllLanguages Max Binding
Bundle.typerequiredBundleType
http://hl7.org/fhir/ValueSet/bundle-type|4.0.1
from the FHIR Standard
Bundle.entry.search.moderequiredSearchEntryMode
http://hl7.org/fhir/ValueSet/search-entry-mode|4.0.1
from the FHIR Standard
Bundle.entry.request.methodrequiredHTTPVerb
http://hl7.org/fhir/ValueSet/http-verb|4.0.1
from the FHIR Standard

Constraints

IdGradePath(s)DetailsRequirements
Assessment-AdminQuestionnairewarningBundleEnsure 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-ApprovalQuestionnairewarningBundleEnsure 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-ConditionICD10warningBundleEnsure 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-ConditionIDwarningBundleEnsure 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-ConditionSNOMEDwarningBundleEnsure 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-OutreachQuestionnairewarningBundleEnsure 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-ServiceDupQuestionnairewarningBundleEnsure 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-ProvisionTypewarningBundleEnsure that all Consents include a value for provision type.
: entry.select(resource as Consent) .all(provision.type.exists())
Encounter-PeriodEndwarningBundleEnsure that all finished Encounters include a value for period.end.
: entry.select(resource as Encounter) .where(status.contains('finished')) .all(period.end.exists())
Encounter-PeriodStartwarningBundleEnsure that all Encounters include a value for period.start.
: entry.select(resource as Encounter) .all(period.start.exists())
Goal-AchievementStatuswarningBundleEnsure that all Goals include a value for achivementStatus.
: entry.select(resource as Goal).exists() implies entry.select(resource as Goal).all(achievementStatus.exists())
Goal-StatusDatewarningBundleEnsure that all Goals include a value for statusDate.
: entry.select(resource as Goal).exists() implies entry.select(resource as Goal).all(statusDate.exists())
Location-AddresswarningBundleEnsure 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-TypewarningBundleEnsure 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-CategoryDisplaywarningBundleEnsure 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-CodeCodewarningBundleEnsure 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-CodeDisplaywarningBundleEnsure 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-InterpretationwarningBundleEnsure 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-LangaugewarningBundleEnsure 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-AddresswarningBundleEnsure 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-IDerrorBundleEnsure that all Organization resources include a value for one of the following id types: NPI, TAX, or MA.
: entry.select(resource as Organization).exists() implies entry.select(resource as Organization).where(identifier.type.coding.code='NPI' or identifier.type.coding.code='TAX' or identifier.type.coding.code='MA').exists()
Organization-TypewarningBundleEnsure 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-ApprovalQuestionnairewarningBundleEnsure 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-HRSNOutreachQuestionnairewarningBundleEnsure 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-SCNOutreachQuestionnairewarningBundleEnsure 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-EncountererrorBundleAssessment-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-PatienterrorBundleAssessment-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-Obs-Encounter-RIerrorBundleChecks 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-RIerrorBundleChecks 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-RIerrorBundleChecks for RI between Observation & child Observation
: entry.select(resource as Observation) .where(derivedFrom.exists() and (meta.where(profile.lower().contains('shinny-observation')) or meta.where(profile.lower().contains('sdohcc-observation')))) .derivedFrom.select(reference.split('/')[1]) .intersect( entry.select(resource as Observation).where(derivedFrom.empty().not() and (meta.where(profile.lower().contains('shin-ny-observation-screening-response')) or meta.where(profile.lower().contains('sdohcc-observationscreeningresponse')))).id) .count() = entry.select(resource as Observation) .where(derivedFrom.exists() and (meta.where(profile.lower().contains('shin-ny-observation-screening-response')) or $this.meta.where(profile.lower().contains('sdohcc-observationscreeningresponse')))) .derivedFrom.reference .count()
SHINNY-Bundle-Obs-hasMember-RIerrorBundleChecks for RI between Observation & child Observations
: entry.select(resource as Observation) .exists(hasMember.exists() and meta.profile.contains('shinny-observation-screening-response')) implies entry.select(resource as Observation) .where(hasMember.exists() and meta.profile.contains('shinny-observation-screening-response')) .hasMember.select(reference.split('/')[1]) .union( entry.select(resource as Observation) .where(hasMember.exists().not() and meta.profile.contains('shinny-observation-screening-response')).id) .count() = entry.select(resource as Observation) .where(hasMember.exists() and meta.profile.contains('shinny-observation-screening-response')) .hasMember.reference .count()
SHINNY-Bundle-Patient-Encounter-RIerrorBundleChecks for RI between Patient & Encounter
: entry.select(resource as Encounter) .select($this.subject.reference.split('/')[1]) contains entry.select(resource as Patient).id
SHINNY-Bundle-Patient-Org-RIerrorBundleChecks 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-RequirederrorBundleEvery submitted resource should be part of a bundle.
: select($this as Bundle).exists()
SHINNY-Bundle-Required-ResourceserrorBundleEvery 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-consenterrorBundleEnsures all bundles with a screening included also includes the consent profile.
: ( (select($this as Bundle).where(meta.profile.upper() != 'http://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-CategorywarningBundlePatient 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-ClasswarningBundleEnsure 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-TypewarningBundleEnsure that the Encounter resource has a status code
: entry.select(resource as Encounter).type.coding .all(code.exists() and system.exists())
SHINNY-Obs-CategoryerrorBundleEnsure 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-CodewarningBundleEnsure 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-EncounterwarningBundleSDOH Observations should have an Encounter
: entry.select(resource as Observation).where(meta.profile.contains('shinny-observation-screening-response')) .all(encounter.reference.exists())
SHINNY-Obs-PatientwarningBundleSDOH Observations should have a Patient
: entry.select(resource as Observation).where(meta.profile.contains('shinny-observation')) .all(subject.reference.exists())
SHINNY-Patient-AddresswarningBundleAll 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-CommunicationwarningBundleCommunication should exist
: entry.select(resource as Patient).communication.exists()
SHINNY-Patient-DOBerrorBundlebirthDate 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-GendererrorBundleGender should be present
: entry.select(resource as Patient).where(gender.exists() and gender.trim().length()).count() > 0
SHINNY-Patient-GenderIdwarningBundleGender 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-MAerrorBundleEvery 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-MRNerrorBundleEvery 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-MiddleNamewarningBundleMiddleName should be present
: entry.select(resource as Patient).name .extension.where(url.contains('middle-name')) .value.trim().length()>0
SHINNY-Patient-PronounswarningBundlePronouns should be present
: entry.select(resource as Patient).extension.where(url='http://shinny.org/us/ny/hrsn/ValueSet/SHINNYPersonalPronounsVS').exists() implies entry.select(resource as Patient).extension.where(url='http://shinny.org/us/ny/hrsn/ValueSet/SHINNYPersonalPronounsVS' and value.select($this as CodeableConcept).coding.code.exists()).exists()
SHINNY-Patient-Race-EthnicitywarningBundleRace & 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-SSNwarningBundleEvery 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-CheckerrorBundleSHINNY-Resources-Profile-Check
: ( select($this as Bundle).where(meta.profile.upper() != 'http://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://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://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://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://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://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://shinny.org/us/ny/hrsn/StructureDefinition/shinny-Consent'.upper()).count() = 0 ) ).allTrue()
SHINNY-Screening-ConsenterrorBundleAll 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-PatienterrorBundleSDOH 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())
SHINNYServiceRequestSDOHCategoryerrorBundleEnsure 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-8warningBundleIf 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-9warningBundleIf 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-2warningBundleIf 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-4warningBundleIf 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-8warningBundleIf 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-9warningBundleIf 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-3warningBundleIf 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-3warningBundleIf 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-1warningBundleIf 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-5warningBundleIf 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-7warningBundleIf 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-7warningBundleIf 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-5warningBundleIf 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-8warningBundleIf 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-2warningBundleIf 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-2warningBundleIf 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-1warningBundleIf 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-5warningBundleIf 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-7warningBundleIf 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-9warningBundleIf 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-4warningBundleIf 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-6warningBundleIf 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-0warningBundleIf 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-2warningBundleIf 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-8warningBundleIf 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-0warningBundleIf 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-7warningBundleIf 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-AuthoredOnwarningBundleEnsure 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-CategoryCodewarningBundleEnsure 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-OccurrencePeriodwarningBundleEnsure 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-QuantitywarningBundleEnsure that all Service Requests have a quantity.
: entry.select(resource as ServiceRequest).exists() implies entry.select(resource as ServiceRequest) .all(quantity.value.exists())
Task-EndPeriodwarningBundleEnsure 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-RepetitionswarningBundleEnsure 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-StartPeriodwarningBundleEnsure 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-StatusReasonerrorBundleEnsure 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-1errorBundletotal only when a search or history
: total.empty() or (type = 'searchset') or (type = 'history')
bdl-2errorBundleentry.search only when a search
: entry.search.empty() or (type = 'searchset')
bdl-3errorBundleentry.request mandatory for batch/transaction/history, otherwise prohibited
: entry.all(request.exists() = (%resource.type = 'batch' or %resource.type = 'transaction' or %resource.type = 'history'))
bdl-4errorBundleentry.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-5errorBundle.entrymust be a resource unless there's a request or response
: resource.exists() or request.exists() or response.exists()
bdl-7errorBundleFullUrl 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-8errorBundle.entryfullUrl cannot be a version specific reference
: fullUrl.contains('/_history/').not()
bdl-9errorBundleA document must have an identifier with a system and a value
: type = 'document' implies (identifier.system.exists() and identifier.value.exists())
bdl-10errorBundleA document must have a date
: type = 'document' implies (timestamp.hasValue())
bdl-11errorBundleA document must have a Composition as the first resource
: type = 'document' implies entry.first().resource.is(Composition)
bdl-12errorBundleA message must have a MessageHeader as the first resource
: type = 'message' implies entry.first().resource.is(MessageHeader)
ele-1error**ALL** elementsAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ext-1error**ALL** extensionsMust have either extensions or value[x], not both
: extension.exists() != value.exists()
shinny-sexual-orientationwarningBundleIf 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:

 

Other representations of profile: CSV, Excel, Schematron