# description
This constrained Binary resource can carry any pure binary content., whether this is  text, image, pdf, zip archive, etc...  This resource is generally used as the target of a Document Reference or an Attachment.

# purpose
The Binary resource is need to carry image files.

# snapshot.element[].short
Pure binary content defined by a format other than FHIR

# snapshot.element[].definition
A binary resource can contain any content, whether text, image, pdf, zip archive, etc.

# snapshot.element[].comment
Typically, Binary resources are used for handling content such as:  * CDA Documents (i.e. with XDS) * PDF Documents * Images (the Media resource is preferred for handling images, but not possible when the content is already binary - e.g. XDS).

# snapshot.element[].definition
The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.

# snapshot.element[].comment
The only time that a resource does not have an id is when it is being submitted to the server using a create operation.

# snapshot.element[].constraint[].human
All FHIR elements must have a @value or children

# snapshot.element[].constraint[].expression
hasValue() | (children().count() > id.count())

# snapshot.element[].definition
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.

# snapshot.element[].constraint[].human
All FHIR elements must have a @value or children

# snapshot.element[].constraint[].expression
hasValue() | (children().count() > id.count())

# snapshot.element[].short
A set of rules under which this content was created

# snapshot.element[].definition
A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content.

# snapshot.element[].comment
Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element.   This element is labelled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation.

# snapshot.element[].constraint[].human
All FHIR elements must have a @value or children

# snapshot.element[].constraint[].expression
hasValue() | (children().count() > id.count())

# snapshot.element[].definition
The base language in which the resource is written.

# snapshot.element[].comment
Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies  to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource  Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).

# snapshot.element[].constraint[].human
All FHIR elements must have a @value or children

# snapshot.element[].constraint[].expression
hasValue() | (children().count() > id.count())

# snapshot.element[].definition
MimeType of the binary content represented as a standard MimeType (BCP 13).

# snapshot.element[].comment
Note that FHIR strings may not exceed 1MB in size

# snapshot.element[].constraint[].human
All FHIR elements must have a @value or children

# snapshot.element[].constraint[].expression
hasValue() | (children().count() > id.count())

# snapshot.element[].binding.description
The mime type of an attachment. Any valid mime type is allowed.

# snapshot.element[].definition
Treat this binary as if it was this other resource for access control purposes.

# snapshot.element[].comment
References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository.

# snapshot.element[].constraint[].human
All FHIR elements must have a @value or children

# snapshot.element[].constraint[].expression
hasValue() | (children().count() > id.count())

# snapshot.element[].constraint[].human
SHALL have a contained resource if a local reference is provided

# snapshot.element[].mapping[].map
The target of a resource reference is a RIM entry point (Act, Role, or Entity)

# snapshot.element[].definition
unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.

# snapshot.element[].comment
Note that FHIR strings may not exceed 1MB in size

# snapshot.element[].constraint[].human
All FHIR elements must have a @value or children

# snapshot.element[].constraint[].expression
hasValue() | (children().count() > id.count())

# snapshot.element[].slicing.description
Extensions are always sliced by (at least) url

# snapshot.element[].short
Additional Content defined by implementations

# snapshot.element[].definition
May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.

# snapshot.element[].comment
There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.

# snapshot.element[].constraint[].human
All FHIR elements must have a @value or children

# snapshot.element[].constraint[].expression
hasValue() | (children().count() > id.count())

# snapshot.element[].constraint[].human
Must have either extensions or value[x], not both

# snapshot.element[].short
Literal reference, Relative, internal or absolute URL

# snapshot.element[].definition
A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.

# snapshot.element[].comment
Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries.   Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure "/[type]/[id]" then it should be assumed that the reference is to a FHIR RESTful server.

# snapshot.element[].constraint[].human
All FHIR elements must have a @value or children

# snapshot.element[].constraint[].expression
hasValue() | (children().count() > id.count())

# snapshot.element[].short
Logical reference, when literal reference is not known

# snapshot.element[].definition
An identifier for the other resource. This is used when there is no way to reference the other resource directly, either because the entity is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.

# snapshot.element[].comment
When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy.   When both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference  Applications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it.

# snapshot.element[].constraint[].human
All FHIR elements must have a @value or children

# snapshot.element[].constraint[].expression
hasValue() | (children().count() > id.count())

# snapshot.element[].mapping[].map
CX / EI (occasionally, more often EI maps to a resource id or a URL)

# snapshot.element[].mapping[].map
II - see see identifier pattern at http://wiki.hl7.org/index.php?title=Common_Design_Patterns#Identifier_Pattern for relevant discussion. The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs.  Also maps to Role[classCode=IDENT]

# snapshot.element[].definition
Plain text narrative that identifies the resource in addition to the resource reference.

# snapshot.element[].comment
This is generally not the same as the Resource.text of the referenced resource.  The purpose is to identify what's being referenced, not to fully describe it.

# snapshot.element[].constraint[].human
All FHIR elements must have a @value or children

# snapshot.element[].constraint[].expression
hasValue() | (children().count() > id.count())

# snapshot.element[].comment
If the content type is itself base64 encoding, then this will be base64 encoded twice - what is created by un-base64ing the content must be the specified content type.

# snapshot.element[].constraint[].human
All FHIR elements must have a @value or children

# snapshot.element[].constraint[].expression
hasValue() | (children().count() > id.count())