Release 5

Publish-box (todo)

Availability.shex

Modeling and Methodology Work GroupMaturity Level: N/AStandards Status: Informative

Raw ShEx

ShEx statement for Availability

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 <code.shex>
IMPORT <time.shex>
IMPORT <string.shex>
IMPORT <Period.shex>
IMPORT <Element.shex>
IMPORT <boolean.shex>
IMPORT <DataType.shex>

# Availability data for an {item}
<Availability> EXTENDS @<DataType> CLOSED {   

    a [fhir:Availability]?;

    fhir:availableTime @<OneOrMore_Element>?;  # Times the {item} is available
    fhir:notAvailableTime @<OneOrMore_Element>?;  # Not available during this time due 
                                            # to provided reason 
}  

# Not available during this time due to provided reason
<Availability.notAvailableTime> EXTENDS @<Element> CLOSED {   
    fhir:description @<string>?;            # Reason presented to the user 
                                            # explaining why time not available 
    fhir:during @<Period>?;                 # Service not available during this 
                                            # period 
}  

# Times the {item} is available
<Availability.availableTime> EXTENDS @<Element> CLOSED {   
    fhir:daysOfWeek @<OneOrMore_code> AND
    	{fhir:v @fhirvs:days-of-week}?;  # mon | tue | wed | thu | fri | sat 
                                            # | sun 
    fhir:allDay @<boolean>?;                # Always available? i.e. 24 hour 
                                            # service 
    fhir:availableStartTime @<time>?;       # Opening time of day (ignored if 
                                            # allDay = true) 
    fhir:availableEndTime @<time>?;         # Closing time of day (ignored if 
                                            # allDay = true) 
}  

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

<OneOrMore_Element> CLOSED {
    rdf:first @<Element>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_Element> 
}

<OneOrMore_code> CLOSED {
    rdf:first @<code>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_code> 
}

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

# The days of the week.
fhirvs:days-of-week ["mon" "tue" "wed" "thu" "fri" "sat" "sun"]


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.