R6 Ballot (2nd Draft)

Publish-box (todo)

Guidanceresponse.shex

Clinical Decision Support Work GroupMaturity Level: N/AStandards Status: InformativeCompartments: Patient

Raw ShEx

ShEx statement for guidanceresponse

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 <uri.shex>
IMPORT <code.shex>
IMPORT <Task.shex>
IMPORT <Group.shex>
IMPORT <Claim.shex>
IMPORT <Device.shex>
IMPORT <Patient.shex>
IMPORT <dateTime.shex>
IMPORT <CarePlan.shex>
IMPORT <Contract.shex>
IMPORT <canonical.shex>
IMPORT <Reference.shex>
IMPORT <Encounter.shex>
IMPORT <Identifier.shex>
IMPORT <Annotation.shex>
IMPORT <Parameters.shex>
IMPORT <Appointment.shex>
IMPORT <DeviceRequest.shex>
IMPORT <SupplyRequest.shex>
IMPORT <DomainResource.shex>
IMPORT <NutritionOrder.shex>
IMPORT <ServiceRequest.shex>
IMPORT <CodeableConcept.shex>
IMPORT <DataRequirement.shex>
IMPORT <OperationOutcome.shex>
IMPORT <CodeableReference.shex>
IMPORT <EnrollmentRequest.shex>
IMPORT <MedicationRequest.shex>
IMPORT <VisionPrescription.shex>
IMPORT <AppointmentResponse.shex>
IMPORT <CommunicationRequest.shex>
IMPORT <RequestOrchestration.shex>
IMPORT <CoverageEligibilityRequest.shex>
IMPORT <ImmunizationRecommendation.shex>


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

# The formal response to a guidance request
<GuidanceResponse> EXTENDS @<DomainResource> CLOSED {   

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

    fhir:requestIdentifier @<Identifier>?;  # The identifier of the request 
                                            # associated with this response, if 
                                            # any 
    fhir:identifier @<OneOrMore_Identifier>?;  # Business identifier
    fhir:module @<uri>  OR 
    			@<canonical>  OR 
    			@<CodeableConcept>  ;  # What guidance was requested
    fhir:status @<code> AND
    	{fhir:v @fhirvs:guidance-response-status};  # success | data-requested | 
                                            # data-required | in-progress | 
                                            # failure | entered-in-error 
    fhir:subject @<Reference> AND {fhir:link 
    			@<Group> OR 
    			@<Patient> ? }?;  # Patient the request was performed 
                                            # for 
    fhir:encounter @<Reference> AND {fhir:link 
    			@<Encounter> ? }?;  # Encounter during which the 
                                            # response was returned 
    fhir:occurrenceDateTime @<dateTime>?;   # When the guidance response was 
                                            # processed 
    fhir:performer @<Reference> AND {fhir:link 
    			@<Device> ? }?;  # Device returning the guidance
    fhir:reason @<OneOrMore_CodeableReference>?;  # Why guidance is needed
    fhir:note @<OneOrMore_Annotation>?;     # Additional notes about the response
    fhir:evaluationMessage @<Reference> AND {fhir:link 
    			@<OperationOutcome> ? }?;  # Messages resulting from the 
                                            # evaluation of the artifact or 
                                            # artifacts 
    fhir:outputParameters @<Reference> AND {fhir:link 
    			@<Parameters> ? }?;  # The output parameters of the 
                                            # evaluation, if any 
    fhir:result @<OneOrMore_Reference_Appointment_OR_AppointmentResponse_OR_CarePlan_OR_Claim_OR_CommunicationRequest_OR_Contract_OR_CoverageEligibilityRequest_OR_DeviceRequest_OR_EnrollmentRequest_OR_ImmunizationRecommendation_OR_MedicationRequest_OR_NutritionOrder_OR_RequestOrchestration_OR_ServiceRequest_OR_SupplyRequest_OR_Task_OR_VisionPrescription>?;  # Proposed actions, if any
    fhir:dataRequirement @<OneOrMore_DataRequirement>?;  # Additional required data
}  

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

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

<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_Appointment_OR_AppointmentResponse_OR_CarePlan_OR_Claim_OR_CommunicationRequest_OR_Contract_OR_CoverageEligibilityRequest_OR_DeviceRequest_OR_EnrollmentRequest_OR_ImmunizationRecommendation_OR_MedicationRequest_OR_NutritionOrder_OR_RequestOrchestration_OR_ServiceRequest_OR_SupplyRequest_OR_Task_OR_VisionPrescription> CLOSED {
    rdf:first @<Reference> AND {fhir:link 
			@<Appointment> OR 
			@<AppointmentResponse> OR 
			@<CarePlan> OR 
			@<Claim> OR 
			@<CommunicationRequest> OR 
			@<Contract> OR 
			@<CoverageEligibilityRequest> OR 
			@<DeviceRequest> OR 
			@<EnrollmentRequest> OR 
			@<ImmunizationRecommendation> OR 
			@<MedicationRequest> OR 
			@<NutritionOrder> OR 
			@<RequestOrchestration> OR 
			@<ServiceRequest> OR 
			@<SupplyRequest> OR 
			@<Task> OR 
			@<VisionPrescription> } ;
    rdf:rest [rdf:nil] OR @<OneOrMore_Reference_Appointment_OR_AppointmentResponse_OR_CarePlan_OR_Claim_OR_CommunicationRequest_OR_Contract_OR_CoverageEligibilityRequest_OR_DeviceRequest_OR_EnrollmentRequest_OR_ImmunizationRecommendation_OR_MedicationRequest_OR_NutritionOrder_OR_RequestOrchestration_OR_ServiceRequest_OR_SupplyRequest_OR_Task_OR_VisionPrescription> 
}

<OneOrMore_DataRequirement> CLOSED {
    rdf:first @<DataRequirement>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_DataRequirement> 
}

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

# The status of a guidance response.
fhirvs:guidance-response-status ["success" "data-requested" "data-required" "in-progress" "failure" "entered-in-error"]


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.