R6 Ballot (2nd Draft)

Publish-box (todo)

Researchsubject.shex

Biomedical Research and Regulation Work GroupMaturity Level: N/AStandards Status: InformativeCompartments: Device, Patient

Raw ShEx

ShEx statement for researchsubject

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 <id.shex>
IMPORT <code.shex>
IMPORT <Group.shex>
IMPORT <Period.shex>
IMPORT <Device.shex>
IMPORT <Patient.shex>
IMPORT <Consent.shex>
IMPORT <Specimen.shex>
IMPORT <dateTime.shex>
IMPORT <Reference.shex>
IMPORT <Substance.shex>
IMPORT <Identifier.shex>
IMPORT <Medication.shex>
IMPORT <ResearchStudy.shex>
IMPORT <DomainResource.shex>
IMPORT <BackboneElement.shex>
IMPORT <CodeableConcept.shex>
IMPORT <BiologicallyDerivedProduct.shex>


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

# Participant or object which is the recipient of investigative activities in a study
<ResearchSubject> EXTENDS @<DomainResource> CLOSED {   

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

    fhir:identifier @<OneOrMore_Identifier>?;  # Business Identifier for research 
                                            # subject in a study 
    fhir:status @<code> AND
    	{fhir:v @fhirvs:publication-status};  # draft | active | retired | unknown
    fhir:period @<Period>?;                 # Start and end of participation
    fhir:study @<Reference> AND {fhir:link 
    			@<ResearchStudy> ? };  # Study subject is part of
    fhir:subject @<Reference> AND {fhir:link 
    			@<BiologicallyDerivedProduct> OR 
    			@<Device> OR 
    			@<Group> OR 
    			@<Medication> OR 
    			@<Patient> OR 
    			@<Specimen> OR 
    			@<Substance> ? };  # Who or what is part of study
    fhir:subjectState @<OneOrMore_ResearchSubject.subjectState>?;  # A duration in the lifecycle of the 
                                            # ResearchSubject within a 
                                            # ResearchStudy 
    fhir:subjectMilestone @<OneOrMore_ResearchSubject.subjectMilestone>?;  # A significant event in the 
                                            # progress of a ResearchSubject 
    fhir:assignedComparisonGroup @<id>?;    # What path should be followed
    fhir:actualComparisonGroup @<id>?;      # What path was followed
    fhir:consent @<OneOrMore_Reference_Consent>?;  # Agreement to participate in study
}  

# A significant event in the progress of a ResearchSubject
<ResearchSubject.subjectMilestone> EXTENDS @<BackboneElement> CLOSED {   
    fhir:milestone @<OneOrMore_CodeableConcept>;  # SignedUp | Screened | Randomized
    fhir:date @<dateTime>?;                 # The date/time when this milestone 
                                            # event was completed 
    fhir:reason @<CodeableConcept>?; 
}  

# A duration in the lifecycle of the ResearchSubject within a ResearchStudy
<ResearchSubject.subjectState> EXTENDS @<BackboneElement> CLOSED {   
    fhir:code @<CodeableConcept>;           # candidate | in-prescreening | 
                                            # in-screening | eligible | 
                                            # ineligible | on-study | 
                                            # on-study-intervention | 
                                            # in-follow-up | off-study 
    fhir:startDate @<dateTime>;             # The date a research subject 
                                            # entered the given state 
    fhir:endDate @<dateTime>?;              # The date a research subject exited 
                                            # or left the given state 
    fhir:reason @<CodeableConcept>?;        # State change reason
}  

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

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

<OneOrMore_ResearchSubject.subjectState> CLOSED {
    rdf:first @<ResearchSubject.subjectState>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_ResearchSubject.subjectState> 
}

<OneOrMore_ResearchSubject.subjectMilestone> CLOSED {
    rdf:first @<ResearchSubject.subjectMilestone>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_ResearchSubject.subjectMilestone> 
}

<OneOrMore_Reference_Consent> CLOSED {
    rdf:first @<Reference> AND {fhir:link 
			@<Consent> } ;
    rdf:rest [rdf:nil] OR @<OneOrMore_Reference_Consent> 
}

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

#---------------------- Value Sets ------------------------

# The lifecycle status of an artifact.
fhirvs:publication-status ["draft" "active" "retired" "unknown"]


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.