R6 Ballot (1st Draft)

This page is part of the FHIR Specification v6.0.0-ballot1: Release 6 Ballot (1st Draft) (see Ballot Notes). The current version is 5.0.0. For a full list of available versions, see the Directory of published versions

Condition.shex

Patient Care Work GroupMaturity Level: N/AStandards Status: InformativeCompartments: Encounter, Patient, Practitioner, RelatedPerson

Raw ShEx

ShEx statement for condition

PREFIX fhir: <http://hl7.org/fhir/> 
PREFIX fhirvs: <http://hl7.org/fhir/ValueSet/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> 
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> 

IMPORT <Age.shex>
IMPORT <Group.shex>
IMPORT <Range.shex>
IMPORT <Period.shex>
IMPORT <string.shex>
IMPORT <Device.shex>
IMPORT <Patient.shex>
IMPORT <dateTime.shex>
IMPORT <CareTeam.shex>
IMPORT <Reference.shex>
IMPORT <Encounter.shex>
IMPORT <Identifier.shex>
IMPORT <Annotation.shex>
IMPORT <Observation.shex>
IMPORT <Organization.shex>
IMPORT <Practitioner.shex>
IMPORT <BodyStructure.shex>
IMPORT <RelatedPerson.shex>
IMPORT <DomainResource.shex>
IMPORT <CodeableConcept.shex>
IMPORT <BackboneElement.shex>
IMPORT <PractitionerRole.shex>
IMPORT <DiagnosticReport.shex>
IMPORT <CodeableReference.shex>
IMPORT <ClinicalImpression.shex>


start=@<Condition> AND {fhir:nodeRole [fhir:treeRoot]}

# Detailed information about conditions, problems or diagnoses
<Condition> EXTENDS @<DomainResource> CLOSED {   

    a [fhir:Condition]?;
    fhir:nodeRole [fhir:treeRoot]?;

    fhir:identifier @<OneOrMore_Identifier>?;  # External Ids for this condition
    fhir:clinicalStatus @<CodeableConcept>;  # active | recurrence | relapse | 
                                            # inactive | remission | resolved | 
                                            # unknown 
    fhir:verificationStatus @<CodeableConcept>?;  # unconfirmed | provisional | 
                                            # differential | confirmed | refuted 
                                            # | entered-in-error 
    fhir:category @<OneOrMore_CodeableConcept>?;  # problem-list-item | 
                                            # encounter-diagnosis 
    fhir:severity @<CodeableConcept>?;      # Subjective severity of condition
    fhir:code @<CodeableConcept>?;          # Identification of the condition, 
                                            # problem or diagnosis 
    fhir:bodySite @<OneOrMore_CodeableConcept>?;  # Anatomical location, if relevant
    fhir:bodyStructure @<Reference> AND {fhir:link 
    			@<BodyStructure> ? }?;  # Anatomical body structure
    fhir:subject @<Reference> AND {fhir:link 
    			@<Group> OR 
    			@<Patient> ? };  # Who has the condition?
    fhir:encounter @<Reference> AND {fhir:link 
    			@<Encounter> ? }?;  # The Encounter during which this 
                                            # Condition was created 
    fhir:onset @<dateTime>  OR 
    			@<Age>  OR 
    			@<Period>  OR 
    			@<Range>  OR 
    			@<string>  ?;  # Estimated or actual date,  
                                            # date-time, or age 
    fhir:abatement @<dateTime>  OR 
    			@<Age>  OR 
    			@<Period>  OR 
    			@<Range>  OR 
    			@<string>  ?;  # When in resolution/remission
    fhir:recordedDate @<dateTime>?;         # Date condition was first recorded
    fhir:participant @<OneOrMore_Condition.participant>?;  # Who or what participated in the 
                                            # activities related to the 
                                            # condition and how they were 
                                            # involved 
    fhir:stage @<OneOrMore_Condition.stage>?;  # Stage/grade, usually assessed 
                                            # formally 
    fhir:evidence @<OneOrMore_CodeableReference>?;  # Supporting evidence for the 
                                            # condition 
    fhir:note @<OneOrMore_Annotation>?;     # Additional information about the 
                                            # Condition 
}  

# Who or what participated in the activities related to the condition and how they were involved
<Condition.participant> EXTENDS @<BackboneElement> CLOSED {   
    fhir:function @<CodeableConcept>?;      # Type of involvement
    fhir:actor @<Reference> AND {fhir:link 
    			@<CareTeam> OR 
    			@<Device> OR 
    			@<Organization> OR 
    			@<Patient> OR 
    			@<Practitioner> OR 
    			@<PractitionerRole> OR 
    			@<RelatedPerson> ? };  # Who or what participated in the 
                                            # activities related to the 
                                            # condition 
}  

# Stage/grade, usually assessed formally
<Condition.stage> EXTENDS @<BackboneElement> CLOSED {   
    fhir:summary @<CodeableConcept>?;       # Simple summary (disease specific)
    fhir:assessment @<OneOrMore_Reference_ClinicalImpression_OR_DiagnosticReport_OR_Observation>?;  # Formal record of assessment
    fhir:type @<CodeableConcept>?;          # Kind of staging
}  

#---------------------- Cardinality Types (OneOrMore) -------------------

<OneOrMore_Identifier> CLOSED {
    rdf:first @<Identifier>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_Identifier> 
}

<OneOrMore_CodeableConcept> CLOSED {
    rdf:first @<CodeableConcept>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_CodeableConcept> 
}

<OneOrMore_Condition.participant> CLOSED {
    rdf:first @<Condition.participant>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_Condition.participant> 
}

<OneOrMore_Condition.stage> CLOSED {
    rdf:first @<Condition.stage>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_Condition.stage> 
}

<OneOrMore_CodeableReference> CLOSED {
    rdf:first @<CodeableReference>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_CodeableReference> 
}

<OneOrMore_Annotation> CLOSED {
    rdf:first @<Annotation>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_Annotation> 
}

<OneOrMore_Reference_ClinicalImpression_OR_DiagnosticReport_OR_Observation> CLOSED {
    rdf:first @<Reference> AND {fhir:link 
			@<ClinicalImpression> OR 
			@<DiagnosticReport> OR 
			@<Observation> } ;
    rdf:rest [rdf:nil] OR @<OneOrMore_Reference_ClinicalImpression_OR_DiagnosticReport_OR_Observation> 
}


Usage note: every effort has been made to ensure that the ShEx files are correct and useful, but they are not a normative part of the specification.