PrescribeIT® Specification and Guide Version 5.0

 

The official URL for this profile is:

http://prescribeit.ca/fhir/StructureDefinition/interaction-bundle-101

The 101 integration bundle will contain any of the applicable directed tasks including e110, e120, e140 and e16x. The 101 bundles will be directed to a specific pharmacy and placed directly in the pharmacy inbox for retrieval. This applies to jurisdictions that allow direct retrieval from the pharmacy. Refer to the functional specification documents to understand which jurisdictions this is applicable for.

Download Excel representation

Description of Profiles, Differentials, Snapshots and how the different presentations work.

>

This structure is derived from PrescribeIT® Message Bundle for Tasks

NameCard.TypeConstraints and Usage
.  Bundle 0..*PrescribeIT® Message Bundle for Tasksbdl-2: entry.search only when a search
bdl-1: total only when a search or history
bdl-7: FullUrl must be unique in a bundle, or else entries with the same fullUrl must have different meta.versionId
bdl-3: entry.request only for some types of bundles
bdl-4: entry.response only for some types of bundles
max1patient: Cannot have no more than 1 patient in one message
headerExists: First entry must be a MessageHeader
groupIdsSame: GroupIdentifier values must all be the same within a message
patientin1: Second entry must be a Patient
max50tasks: Cannot have more than 50 tasks in one message
sameGroup: All "groupIdentifier" extensions in the bundle must have the same value
messageis101: First entry must be a MessageHeader with the messageheader-101 profile
onlyOneSAML: Only one practitioner in the bundle may have a SAML token. The SAML Practitioner must be listed first in the Bundle.
Definition:
A container for a collection of resources.

..  id 0..1idDefinition:
The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.


Comments:
Usage Note: This value is assigned by the PrescribeIT® system upon receipt of a bundle and returned synchronously in the response to that bundle. This ID should not be confused with the traceID that is also returned in the response and is generally used when diagnosing message failures within the PrescribeIT® system logs. The Bundle.id is also used by receiving systems to remove the bundle from their inbox after they have successfully retrieved the bundle.

..  meta 1..1MetaDefinition:
The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource.

...  profile 2..*uriSlice: Unordered, Open by value:value
Definition:
A list of profiles [[[StructureDefinition]]]s that this resource claims to conform to. The URL is a reference to [[[StructureDefinition.url]]].


Comments:
It is up to the server and/or other infrastructure of policy to determine whether/how these claims are verified and/or updated over time. The list of profile URLs is a set.

...  profile
       (baseProfile)
1..1uriFixed Value: http://sharedhealth.exchange/fhir/StructureDefinition/profile-bundle-message
Definition:
A list of profiles [[[StructureDefinition]]]s that this resource claims to conform to. The URL is a reference to [[[StructureDefinition.url]]].


Comments:
Fixed value: http://sharedhealth.exchange/fhir/StructureDefinition/profile-bundle-message

...  profile
       (messageProfile)
1..1uriFixed Value: http://prescribeit.ca/fhir/StructureDefinition/interaction-bundle-101
Definition:
A list of profiles [[[StructureDefinition]]]s that this resource claims to conform to. The URL is a reference to [[[StructureDefinition.url]]].


Comments:
Fixed value: http://prescribeit.ca/fhir/StructureDefinition/interaction-bundle-101

...  tag 1..*CodingSlice: Unordered, Open by value:system
Binding: (unbound) (example): Codes that represent various types of tags, commonly workflow-related; e.g. "Needs review by Dr. Jones"


Definition:
Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.


Comments:
The tags can be updated without changing the stated version of the resource. The list of tags is a set. Uniqueness is based the system/code, and version and display are ignored.

...  tag
       (version)
1..1CodingBinding: SharedSpecificationVersion (20210501) (required)
Definition:
Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.


Comments:
Usage Note: This the version of the specification the Bundle claims to be conformant with.



Usage Note: Only these 2 situations are not enforced by FHIR Validator:



  1. Non-routed EMR/PMS Inbox messages and Clear Queue Request that is sent only to Central Switch; and

  2. Synchronous messages generated by Central Switch (Errors with only OperationOutcome profile and Clear Queue Response)



....  system 1..1uriFixed Value: https://fhir.infoway-inforoute.ca/CodeSystem/sharedspecificationversion
Definition:
The identification of the code system that defines the meaning of the symbol in the code.


Comments:
Fixed value: https://fhir.infoway-inforoute.ca/CodeSystem/sharedspecificationversion

....  code 1..1codeFixed Value: PrescribeIT5.0
Definition:
A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).


Comments:
Fixed value: PrescribeIT5.0

..  type 1..1codeBinding: BundleType (required): Indicates the purpose of a bundle - how it was intended to be used.


Fixed Value: message
Definition:
Indicates the purpose of this bundle- how it was intended to be used.


Comments:
Fixed value: message

..  entry 5..*BackboneElementbdl-5: must be a resource unless there's a request or response
bdl-6: The fullUrl element must be present when a resource is present, and not present otherwise
tbdl-1: Full URL must end with resource id when present
Definition:
An entry in a bundle resource - will either contain a resource, or information about a resource (transactions and history only).


Comments:
Conformance Rule: A bundle may include various tasks (e.g. Denial, Approved, Approved with Changes, a New RX Order, or a Discontinue or any other physician response to the pharmacy that is for the same patient with the exception of cancel request messages. A bundle that contains one or more cancel request messages (e140) may not include any other task type.



Conformance Rule: When Task.creator is a SAML Practitioner, the SAML Practitioner resource must be the first Practitioner in the message instance (after MessageHeader and Patient profiles). In the case where no SAML is required (e.g. MOA) this does not apply.

...  fullUrl 1..1uriDefinition:
The Absolute URL for the resource. The fullUrl SHALL not disagree with the id in the resource. The fullUrl is a version independent reference to the resource. The fullUrl element SHALL have a value except that: * fullUrl can be empty on a POST (although it does not need to when specifying a temporary id for reference in the bundle) * Results from operations might involve resources that are not identified.


Comments:
fullUrl may not be unique in the context of a resource. Note that since FHIR resources do not need to be served through the FHIR API, the absolute URL may not end with the logical id of the resource (Resource.id), but if the fullUrl does look like a RESTful server URL (e.g. meets the regex, then it SHALL end with the Resource.id.

...  resource 1..1ResourceDefinition:
The Resources for the entry.

..  signature 0..1SignatureDefinition:
Digital Signature - base64 encoded. XML DigSIg or a JWT.


Comments:
Conformance Rule: The signature will be created by PrescribeIT®. This is not created by the EMR. Requirements around inclusion of a signature, verification of signatures and treatment of signed/non-signed bundles is implementation-environment specific. Further information is found in PMS Requirements document.

This structure is derived from PrescribeIT® Message Bundle for Tasks

Summary

Mandatory: 3 elements
Must-Support: 7 elements
Fixed Value: 2 elements

Slices

This structure defines the following Slices:

  • The element Bundle.meta.profile is sliced based on the value of value:value

This structure is derived from PrescribeIT® Message Bundle for Tasks

NameFlagsCard.TypeDescription & Constraintsdoco
.. Bundle SI0..*PrescribeIT® Message Bundle for TasksContains a collection of resources
messageis101: First entry must be a MessageHeader with the messageheader-101 profile
onlyOneSAML: Only one practitioner in the bundle may have a SAML token. The SAML Practitioner must be listed first in the Bundle.
... meta S1..1MetaMetadata about the resource
.... profile S2..*(Slice Definition)Profiles this resource claims to conform to
Slice: Unordered, Open by value:value
..... profile:messageProfile S1..1uriProfiles this resource claims to conform to
Fixed Value: http://prescribeit.ca/fhir/StructureDefinition/interaction-bundle-101
..... tag:version S1..1CodingTags applied to this resource
...... code S1..1codeSymbol in syntax defined by the system
Fixed Value: PrescribeIT5.0
... entry S5..*BackboneElementEntry in the bundle - will have a resource, or information
... signature S0..1SignatureDigital Signature

doco Documentation for this format
NameFlagsCard.TypeDescription & Constraintsdoco
.. Bundle SΣI0..*PrescribeIT® Message Bundle for TasksContains a collection of resources
messageis101: First entry must be a MessageHeader with the messageheader-101 profile
onlyOneSAML: Only one practitioner in the bundle may have a SAML token. The SAML Practitioner must be listed first in the Bundle.
... id SΣ0..1idLogical id of this artifact
... meta SΣ1..1MetaMetadata about the resource
.... id 0..1idxml:id (or equivalent in JSON)
.... extension 0..*ExtensionAdditional Content defined by implementations
.... versionId Σ0..1idVersion specific identifier
.... lastUpdated Σ0..1instantWhen the resource version last changed
.... profile SΣ2..*(Slice Definition)Profiles this resource claims to conform to
Slice: Unordered, Open by value:value
..... profile:baseProfile SΣ1..1uriProfiles this resource claims to conform to

Fixed Value: http://sharedhealth.exchange/fhir/StructureDefinition/profile-bundle-message
..... profile:messageProfile SΣ1..1uriProfiles this resource claims to conform to

Fixed Value: http://prescribeit.ca/fhir/StructureDefinition/interaction-bundle-101
.... security Σ0..*CodingSecurity Labels applied to this resource
Binding: All Security Labels (extensible): Security Labels from the Healthcare Privacy and Security Classification System.


.... tag SΣ1..*(Slice Definition)Tags applied to this resource
Slice: Unordered, Open by value:system
Binding: (unbound) (example): Codes that represent various types of tags, commonly workflow-related; e.g. "Needs review by Dr. Jones"


..... tag:version SΣ1..1CodingTags applied to this resource
Binding: SharedSpecificationVersion (20210501) (required)
...... id 0..1idxml:id (or equivalent in JSON)
...... extension 0..*ExtensionAdditional Content defined by implementations
...... system SΣ1..1uriIdentity of the terminology system
Fixed Value: https://fhir.infoway-inforoute.ca/CodeSystem/sharedspecificationversion
...... version Σ0..1stringVersion of the system - if relevant
...... code SΣ1..1codeSymbol in syntax defined by the system
Fixed Value: PrescribeIT5.0
...... display Σ0..1stringRepresentation defined by the system
...... userSelected Σ0..1booleanIf this coding was chosen directly by the user
... implicitRules ?!Σ0..1uriA set of rules under which this content was created
... language 0..1codeLanguage of the resource content
Binding: http://tools.ietf.org/html/bcp47 (required): A human language.


... type SΣ1..1codedocument | message | transaction | transaction-response | batch | batch-response | history | searchset | collection
Binding: BundleType (required): Indicates the purpose of a bundle - how it was intended to be used.


Fixed Value: message
... total ΣI0..1unsignedIntIf search, the total number of matches
... link Σ0..*BackboneElementLinks related to this Bundle
.... id 0..1idxml:id (or equivalent in JSON)
.... extension 0..*ExtensionAdditional Content defined by implementations
.... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored
.... relation Σ1..1stringhttp://www.iana.org/assignments/link-relations/link-relations.xhtml
.... url Σ1..1uriReference details for the link
... entry SΣI5..*BackboneElementEntry in the bundle - will have a resource, or information
.... id 0..1idxml:id (or equivalent in JSON)
.... extension 0..*ExtensionAdditional Content defined by implementations
.... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored
.... fullUrl SΣ1..1uriAbsolute URL for resource (server address, or UUID/OID)
.... resource SΣ1..1ResourceA resource in the bundle
... signature SΣ0..1SignatureDigital Signature

doco Documentation for this format

Grid View

This structure is derived from PrescribeIT® Message Bundle for Tasks

NameCard.TypeConstraints and Usage
.  Bundle 0..*PrescribeIT® Message Bundle for Tasksbdl-2: entry.search only when a search
bdl-1: total only when a search or history
bdl-7: FullUrl must be unique in a bundle, or else entries with the same fullUrl must have different meta.versionId
bdl-3: entry.request only for some types of bundles
bdl-4: entry.response only for some types of bundles
max1patient: Cannot have no more than 1 patient in one message
headerExists: First entry must be a MessageHeader
groupIdsSame: GroupIdentifier values must all be the same within a message
patientin1: Second entry must be a Patient
max50tasks: Cannot have more than 50 tasks in one message
sameGroup: All "groupIdentifier" extensions in the bundle must have the same value
messageis101: First entry must be a MessageHeader with the messageheader-101 profile
onlyOneSAML: Only one practitioner in the bundle may have a SAML token. The SAML Practitioner must be listed first in the Bundle.
Definition:
A container for a collection of resources.

..  id 0..1idDefinition:
The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.


Comments:
Usage Note: This value is assigned by the PrescribeIT® system upon receipt of a bundle and returned synchronously in the response to that bundle. This ID should not be confused with the traceID that is also returned in the response and is generally used when diagnosing message failures within the PrescribeIT® system logs. The Bundle.id is also used by receiving systems to remove the bundle from their inbox after they have successfully retrieved the bundle.

..  meta 1..1MetaDefinition:
The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource.

...  profile 2..*uriSlice: Unordered, Open by value:value
Definition:
A list of profiles [[[StructureDefinition]]]s that this resource claims to conform to. The URL is a reference to [[[StructureDefinition.url]]].


Comments:
It is up to the server and/or other infrastructure of policy to determine whether/how these claims are verified and/or updated over time. The list of profile URLs is a set.

...  profile
       (baseProfile)
1..1uriFixed Value: http://sharedhealth.exchange/fhir/StructureDefinition/profile-bundle-message
Definition:
A list of profiles [[[StructureDefinition]]]s that this resource claims to conform to. The URL is a reference to [[[StructureDefinition.url]]].


Comments:
Fixed value: http://sharedhealth.exchange/fhir/StructureDefinition/profile-bundle-message

...  profile
       (messageProfile)
1..1uriFixed Value: http://prescribeit.ca/fhir/StructureDefinition/interaction-bundle-101
Definition:
A list of profiles [[[StructureDefinition]]]s that this resource claims to conform to. The URL is a reference to [[[StructureDefinition.url]]].


Comments:
Fixed value: http://prescribeit.ca/fhir/StructureDefinition/interaction-bundle-101

...  tag 1..*CodingSlice: Unordered, Open by value:system
Binding: (unbound) (example): Codes that represent various types of tags, commonly workflow-related; e.g. "Needs review by Dr. Jones"


Definition:
Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.


Comments:
The tags can be updated without changing the stated version of the resource. The list of tags is a set. Uniqueness is based the system/code, and version and display are ignored.

...  tag
       (version)
1..1CodingBinding: SharedSpecificationVersion (20210501) (required)
Definition:
Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.


Comments:
Usage Note: This the version of the specification the Bundle claims to be conformant with.



Usage Note: Only these 2 situations are not enforced by FHIR Validator:



  1. Non-routed EMR/PMS Inbox messages and Clear Queue Request that is sent only to Central Switch; and

  2. Synchronous messages generated by Central Switch (Errors with only OperationOutcome profile and Clear Queue Response)



....  system 1..1uriFixed Value: https://fhir.infoway-inforoute.ca/CodeSystem/sharedspecificationversion
Definition:
The identification of the code system that defines the meaning of the symbol in the code.


Comments:
Fixed value: https://fhir.infoway-inforoute.ca/CodeSystem/sharedspecificationversion

....  code 1..1codeFixed Value: PrescribeIT5.0
Definition:
A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).


Comments:
Fixed value: PrescribeIT5.0

..  type 1..1codeBinding: BundleType (required): Indicates the purpose of a bundle - how it was intended to be used.


Fixed Value: message
Definition:
Indicates the purpose of this bundle- how it was intended to be used.


Comments:
Fixed value: message

..  entry 5..*BackboneElementbdl-5: must be a resource unless there's a request or response
bdl-6: The fullUrl element must be present when a resource is present, and not present otherwise
tbdl-1: Full URL must end with resource id when present
Definition:
An entry in a bundle resource - will either contain a resource, or information about a resource (transactions and history only).


Comments:
Conformance Rule: A bundle may include various tasks (e.g. Denial, Approved, Approved with Changes, a New RX Order, or a Discontinue or any other physician response to the pharmacy that is for the same patient with the exception of cancel request messages. A bundle that contains one or more cancel request messages (e140) may not include any other task type.



Conformance Rule: When Task.creator is a SAML Practitioner, the SAML Practitioner resource must be the first Practitioner in the message instance (after MessageHeader and Patient profiles). In the case where no SAML is required (e.g. MOA) this does not apply.

...  fullUrl 1..1uriDefinition:
The Absolute URL for the resource. The fullUrl SHALL not disagree with the id in the resource. The fullUrl is a version independent reference to the resource. The fullUrl element SHALL have a value except that: * fullUrl can be empty on a POST (although it does not need to when specifying a temporary id for reference in the bundle) * Results from operations might involve resources that are not identified.


Comments:
fullUrl may not be unique in the context of a resource. Note that since FHIR resources do not need to be served through the FHIR API, the absolute URL may not end with the logical id of the resource (Resource.id), but if the fullUrl does look like a RESTful server URL (e.g. meets the regex, then it SHALL end with the Resource.id.

...  resource 1..1ResourceDefinition:
The Resources for the entry.

..  signature 0..1SignatureDefinition:
Digital Signature - base64 encoded. XML DigSIg or a JWT.


Comments:
Conformance Rule: The signature will be created by PrescribeIT®. This is not created by the EMR. Requirements around inclusion of a signature, verification of signatures and treatment of signed/non-signed bundles is implementation-environment specific. Further information is found in PMS Requirements document.

This structure is derived from PrescribeIT® Message Bundle for Tasks

Summary

Mandatory: 3 elements
Must-Support: 7 elements
Fixed Value: 2 elements

Slices

This structure defines the following Slices:

  • The element Bundle.meta.profile is sliced based on the value of value:value

Differential View

This structure is derived from PrescribeIT® Message Bundle for Tasks

NameFlagsCard.TypeDescription & Constraintsdoco
.. Bundle SI0..*PrescribeIT® Message Bundle for TasksContains a collection of resources
messageis101: First entry must be a MessageHeader with the messageheader-101 profile
onlyOneSAML: Only one practitioner in the bundle may have a SAML token. The SAML Practitioner must be listed first in the Bundle.
... meta S1..1MetaMetadata about the resource
.... profile S2..*(Slice Definition)Profiles this resource claims to conform to
Slice: Unordered, Open by value:value
..... profile:messageProfile S1..1uriProfiles this resource claims to conform to
Fixed Value: http://prescribeit.ca/fhir/StructureDefinition/interaction-bundle-101
..... tag:version S1..1CodingTags applied to this resource
...... code S1..1codeSymbol in syntax defined by the system
Fixed Value: PrescribeIT5.0
... entry S5..*BackboneElementEntry in the bundle - will have a resource, or information
... signature S0..1SignatureDigital Signature

doco Documentation for this format

Snapshot View

NameFlagsCard.TypeDescription & Constraintsdoco
.. Bundle SΣI0..*PrescribeIT® Message Bundle for TasksContains a collection of resources
messageis101: First entry must be a MessageHeader with the messageheader-101 profile
onlyOneSAML: Only one practitioner in the bundle may have a SAML token. The SAML Practitioner must be listed first in the Bundle.
... id SΣ0..1idLogical id of this artifact
... meta SΣ1..1MetaMetadata about the resource
.... id 0..1idxml:id (or equivalent in JSON)
.... extension 0..*ExtensionAdditional Content defined by implementations
.... versionId Σ0..1idVersion specific identifier
.... lastUpdated Σ0..1instantWhen the resource version last changed
.... profile SΣ2..*(Slice Definition)Profiles this resource claims to conform to
Slice: Unordered, Open by value:value
..... profile:baseProfile SΣ1..1uriProfiles this resource claims to conform to

Fixed Value: http://sharedhealth.exchange/fhir/StructureDefinition/profile-bundle-message
..... profile:messageProfile SΣ1..1uriProfiles this resource claims to conform to

Fixed Value: http://prescribeit.ca/fhir/StructureDefinition/interaction-bundle-101
.... security Σ0..*CodingSecurity Labels applied to this resource
Binding: All Security Labels (extensible): Security Labels from the Healthcare Privacy and Security Classification System.


.... tag SΣ1..*(Slice Definition)Tags applied to this resource
Slice: Unordered, Open by value:system
Binding: (unbound) (example): Codes that represent various types of tags, commonly workflow-related; e.g. "Needs review by Dr. Jones"


..... tag:version SΣ1..1CodingTags applied to this resource
Binding: SharedSpecificationVersion (20210501) (required)
...... id 0..1idxml:id (or equivalent in JSON)
...... extension 0..*ExtensionAdditional Content defined by implementations
...... system SΣ1..1uriIdentity of the terminology system
Fixed Value: https://fhir.infoway-inforoute.ca/CodeSystem/sharedspecificationversion
...... version Σ0..1stringVersion of the system - if relevant
...... code SΣ1..1codeSymbol in syntax defined by the system
Fixed Value: PrescribeIT5.0
...... display Σ0..1stringRepresentation defined by the system
...... userSelected Σ0..1booleanIf this coding was chosen directly by the user
... implicitRules ?!Σ0..1uriA set of rules under which this content was created
... language 0..1codeLanguage of the resource content
Binding: http://tools.ietf.org/html/bcp47 (required): A human language.


... type SΣ1..1codedocument | message | transaction | transaction-response | batch | batch-response | history | searchset | collection
Binding: BundleType (required): Indicates the purpose of a bundle - how it was intended to be used.


Fixed Value: message
... total ΣI0..1unsignedIntIf search, the total number of matches
... link Σ0..*BackboneElementLinks related to this Bundle
.... id 0..1idxml:id (or equivalent in JSON)
.... extension 0..*ExtensionAdditional Content defined by implementations
.... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored
.... relation Σ1..1stringhttp://www.iana.org/assignments/link-relations/link-relations.xhtml
.... url Σ1..1uriReference details for the link
... entry SΣI5..*BackboneElementEntry in the bundle - will have a resource, or information
.... id 0..1idxml:id (or equivalent in JSON)
.... extension 0..*ExtensionAdditional Content defined by implementations
.... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored
.... fullUrl SΣ1..1uriAbsolute URL for resource (server address, or UUID/OID)
.... resource SΣ1..1ResourceA resource in the bundle
... signature SΣ0..1SignatureDigital Signature

doco Documentation for this format

 

Other representations of profile: Schematron

Terminology Bindings

PathConformanceValueSet / Code
Bundle.meta.securityextensibleAll Security Labels
Bundle.meta.tagexample
Bundle.meta.tag:versionrequiredFixed Value: PrescribeIT5.0
Bundle.languagerequiredhttp://tools.ietf.org/html/bcp47
Bundle.typerequiredFixed Value: message
Bundle.entry.search.moderequiredSearchEntryMode
Bundle.entry.request.methodrequiredHTTPVerb

Constraints

IdPathDetailsRequirements
bdl-2Bundleentry.search only when a search
: entry.search.empty() or (type = 'searchset')
bdl-1Bundletotal only when a search or history
: total.empty() or (type = 'searchset') or (type = 'history')
bdl-7BundleFullUrl must be unique in a bundle, or else entries with the same fullUrl must have different meta.versionId
: entry.where(fullUrl.exists()).select(fullUrl&resource.meta.versionId).isDistinct()
bdl-3Bundleentry.request only for some types of bundles
: entry.request.empty() or type = 'batch' or type = 'transaction' or type = 'history'
bdl-4Bundleentry.response only for some types of bundles
: entry.response.empty() or type = 'batch-response' or type = 'transaction-response'
max1patientBundleCannot have no more than 1 patient in one message
: entry.select(resource as Patient).count()<=1
headerExistsBundleFirst entry must be a MessageHeader
: entry[0].resource.is(MessageHeader)
groupIdsSameBundleGroupIdentifier values must all be the same within a message
: entry.resource.extension('http://hl7.org/fhir/StructureDefinition/extension-Task.groupIdentifier').value.value.distinct().count()<=1
patientin1BundleSecond entry must be a Patient
: entry[1].resource.is(Patient)
max50tasksBundleCannot have more than 50 tasks in one message
: entry.select(resource as Task).count()<=50
sameGroupBundleAll "groupIdentifier" extensions in the bundle must have the same value
: (entry.resource.as(Task).extension.where($this.url='http://hl7.org/fhir/StructureDefinition/extension-Task.groupIdentifier').valueIdentifier.system).distinct().count() <= 1 and (entry.resource.as(Task).extension.where($this.url='http://hl7.org/fhir/StructureDefinition/extension-Task.groupIdentifier').valueIdentifier.value).distinct().count() <= 1 and ((entry.resource.as(Task).extension.where($this.url='http://hl7.org/fhir/StructureDefinition/extension-Task.groupIdentifier').valueIdentifier.system).count() = 0 or (entry.resource.as(Task).extension.where($this.url='http://hl7.org/fhir/StructureDefinition/extension-Task.groupIdentifier').valueIdentifier.system).count() = (entry.resource.as(Task).extension.where($this.url='http://hl7.org/fhir/StructureDefinition/extension-Task.groupIdentifier')).count())
messageis101BundleFirst entry must be a MessageHeader with the messageheader-101 profile
: entry[0].resource.meta.where(profile='http://prescribeit.ca/fhir/StructureDefinition/interaction-messageheader-101').exists()
onlyOneSAMLBundleOnly one practitioner in the bundle may have a SAML token. The SAML Practitioner must be listed first in the Bundle.
: entry.resource.as(Practitioner).extension.where(url='http://sharedhealth.exchange/fhir/StructureDefinition/ext-practitioner-saml').count() <=1
bdl-5Bundle.entrymust be a resource unless there's a request or response
: resource.exists() or request.exists() or response.exists()
bdl-6Bundle.entryThe fullUrl element must be present when a resource is present, and not present otherwise
: fullUrl.empty() xor resource.exists()
tbdl-1Bundle.entryFull URL must end with resource id when present
: fullUrl.exists().not() or resource.id.exists().not() or fullUrl.endsWith($this.resource.id)