R6 Ballot (2nd Draft)

Publish-box (todo)

Organizationaffiliation.shex

Patient Administration Work GroupMaturity Level: N/AStandards Status: InformativeCompartments: No defined compartments

Raw ShEx

ShEx statement for organizationaffiliation

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 <Period.shex>
IMPORT <boolean.shex>
IMPORT <Location.shex>
IMPORT <Endpoint.shex>
IMPORT <Reference.shex>
IMPORT <Identifier.shex>
IMPORT <Organization.shex>
IMPORT <DomainResource.shex>
IMPORT <CodeableConcept.shex>
IMPORT <HealthcareService.shex>
IMPORT <ExtendedContactDetail.shex>


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

# Defines an affiliation/association/relationship between 2 distinct organizations, that is not a part-of relationship/sub-division relationship
<OrganizationAffiliation> EXTENDS @<DomainResource> CLOSED {   

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

    fhir:identifier @<OneOrMore_Identifier>?;  # Business identifiers that are 
                                            # specific to this role 
    fhir:active @<boolean>?;                # Whether this organization 
                                            # affiliation record is in active 
                                            # use 
    fhir:period @<Period>?;                 # The period during which the 
                                            # participatingOrganization is 
                                            # affiliated with the primary 
                                            # organization 
    fhir:organization @<Reference> AND {fhir:link 
    			@<Organization> ? }?;  # Organization where the role is 
                                            # available 
    fhir:participatingOrganization @<Reference> AND {fhir:link 
    			@<Organization> ? }?;  # Organization that 
                                            # provides/performs the role (e.g. 
                                            # providing services or is a member 
                                            # of) 
    fhir:network @<OneOrMore_Reference_Organization>?;  # The network in which the 
                                            # participatingOrganization provides 
                                            # the role's services (if defined) 
                                            # at the indicated locations (if 
                                            # defined) 
    fhir:code @<OneOrMore_CodeableConcept>?;  # Definition of the role the 
                                            # participatingOrganization plays 
    fhir:specialty @<OneOrMore_CodeableConcept>?;  # Specific specialty of the 
                                            # participatingOrganization in the 
                                            # context of the role 
    fhir:location @<OneOrMore_Reference_Location>?;  # The location(s) at which the role 
                                            # occurs 
    fhir:healthcareService @<OneOrMore_Reference_HealthcareService>?;  # Healthcare services provided 
                                            # through the role 
    fhir:contact @<OneOrMore_ExtendedContactDetail>?;  # Official contact details at the 
                                            # participatingOrganization relevant 
                                            # to this Affiliation 
    fhir:endpoint @<OneOrMore_Reference_Endpoint>?;  # Technical endpoints providing 
                                            # access to services operated for 
                                            # this role 
}  

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

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

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

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

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

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

<OneOrMore_ExtendedContactDetail> CLOSED {
    rdf:first @<ExtendedContactDetail>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_ExtendedContactDetail> 
}

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


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.