### ----------------------------------------------------
### -- FHIR
### -- Licenses: Artistic-2.0
### -- Authors: Hugh Simpson
### -- File: t/resources/structureDefinition/MessageDefinition.json
### ----------------------------------------------------
### -- Chunk 8 of 8
 "valueString" : "PublicationStatus"
        },
        {
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
          "valueBoolean" : true
        }],
        "strength" : "required",
        "description" : "The lifecycle status of an artifact.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/publication-status|4.0.0"
      },
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Definition.status"
      },
      {
        "identity" : "w5",
        "map" : "FiveWs.status"
      }]
    },
    {
      "id" : "MessageDefinition.experimental",
      "path" : "MessageDefinition.experimental",
      "short" : "For testing purposes, not real usage",
      "definition" : "A Boolean value to indicate that this message definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.",
      "comment" : "Allows filtering of message definitions that are appropriate for use versus not.",
      "requirements" : "Enables experimental content to be developed following the same lifecycle that would be used for a production-level message definition.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "boolean"
      }],
      "isSummary" : true,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Definition.experimental"
      },
      {
        "identity" : "w5",
        "map" : "FiveWs.class"
      }]
    },
    {
      "id" : "MessageDefinition.date",
      "path" : "MessageDefinition.date",
      "short" : "Date last changed",
      "definition" : "The date  (and optionally time) when the message definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the message definition changes.",
      "comment" : "Note that this is not the same as the resource last-modified-date, since the resource may be a secondary representation of the message definition. Additional specific dates may be added as extensions or be found by consulting Provenances associated with past versions of the resource.",
      "alias" : ["Revision Date"],
      "min" : 1,
      "max" : "1",
      "type" : [{
        "code" : "dateTime"
      }],
      "isSummary" : true,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Definition.date"
      },
      {
        "identity" : "w5",
        "map" : "FiveWs.recorded"
      }]
    },
    {
      "id" : "MessageDefinition.publisher",
      "path" : "MessageDefinition.publisher",
      "short" : "Name of the publisher (organization or individual)",
      "definition" : "The name of the organization or individual that published the message definition.",
      "comment" : "Usually an organization but may be an individual. The publisher (or steward) of the message definition is the organization or individual primarily responsible for the maintenance and upkeep of the message definition. This is not necessarily the same individual or organization that developed and initially authored the content. The publisher is the primary point of contact for questions or issues with the message definition. This item SHOULD be populated unless the information is available from context.",
      "requirements" : "Helps establish the \"authority/credibility\" of the message definition.  May also allow for contact.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "string"
      }],
      "isSummary" : true,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Definition.publisher"
      },
      {
        "identity" : "w5",
        "map" : "FiveWs.witness"
      }]
    },
    {
      "id" : "MessageDefinition.contact",
      "path" : "MessageDefinition.contact",
      "short" : "Contact details for the publisher",
      "definition" : "Contact details to assist a user in finding and communicating with the publisher.",
      "comment" : "May be a web site, an email address, a telephone number, etc.",
      "min" : 0,
      "max" : "*",
      "type" : [{
        "code" : "ContactDetail"
      }],
      "isSummary" : true,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Definition.contact"
      }]
    },
    {
      "id" : "MessageDefinition.description",
      "path" : "MessageDefinition.description",
      "short" : "Natural language description of the message definition",
      "definition" : "A free text natural language description of the message definition from a consumer's perspective.",
      "comment" : "This description can be used to capture details such as why the message definition was built, comments about misuse, instructions for clinical use and interpretation, literature references, examples from the paper world, etc. It is not a rendering of the message definition as conveyed in the 'text' field of the resource itself. This item SHOULD be populated unless the information is available from context (e.g. the language of the message definition is presumed to be the predominant language in the place the message definition was created).",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "markdown"
      }],
      "isSummary" : true,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Definition.description"
      }]
    },
    {
      "id" : "MessageDefinition.useContext",
      "path" : "MessageDefinition.useContext",
      "short" : "The context that the content is intended to support",
      "definition" : "The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate message definition instances.",
      "comment" : "When multiple useContexts are specified, there is no expectation that all or any of the contexts apply.",
      "requirements" : "Assist in searching for appropriate content.",
      "min" : 0,
      "max" : "*",
      "type" : [{
        "code" : "UsageContext"
      }],
      "isSummary" : true,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Definition.useContext"
      }]
    },
    {
      "id" : "MessageDefinition.jurisdiction",
      "path" : "MessageDefinition.jurisdiction",
      "short" : "Intended jurisdiction for message definition (if applicable)",
      "definition" : "A legal or geographic region in which the message definition is intended to be used.",
      "comment" : "It may be possible for the message definition to be used in jurisdictions other than those for which it was originally designed or intended.",
      "min" : 0,
      "max" : "*",
      "type" : [{
        "code" : "CodeableConcept"
      }],
      "isSummary" : true,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "Jurisdiction"
        },
        {
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
          "valueBoolean" : true
        }],
        "strength" : "extensible",
        "description" : "Countries and regions within which this artifact is targeted for use.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/jurisdiction"
      },
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Definition.jurisdiction"
      }]
    },
    {
      "id" : "MessageDefinition.purpose",
      "path" : "MessageDefinition.purpose",
      "short" : "Why this message definition is defined",
      "definition" : "Explanation of why this message definition is needed and why it has been designed as it has.",
      "comment" : "This element does not describe the usage of the message definition. Instead, it provides traceability of ''why'' the resource is either needed or ''why'' it is defined as it is.  This may be used to point to source materials or specifications that drove the structure of this message definition.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "markdown"
      }],
      "isSummary" : true,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Definition.purpose"
      },
      {
        "identity" : "w5",
        "map" : "FiveWs.why[x]"
      },
      {
        "identity" : "objimpl",
        "map" : "no-gen-base"
      }]
    },
    {
      "id" : "MessageDefinition.copyright",
      "path" : "MessageDefinition.copyright",
      "short" : "Use and/or publishing restrictions",
      "definition" : "A copyright statement relating to the message definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the message definition.",
      "requirements" : "Consumers must be able to determine any legal restrictions on the use of the message definition and/or its content.",
      "alias" : ["License",
      "Restrictions"],
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "markdown"
      }],
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Definition.copyright"
      },
      {
        "identity" : "objimpl",
        "map" : "no-gen-base"
      }]
    },
    {
      "id" : "MessageDefinition.base",
      "path" : "MessageDefinition.base",
      "short" : "Definition this one is based on",
      "definition" : "The MessageDefinition that is the basis for the contents of this resource.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "canonical",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/MessageDefinition"]
      }],
      "isSummary" : true
    },
    {
      "id" : "MessageDefinition.parent",
      "path" : "MessageDefinition.parent",
      "short" : "Protocol/workflow this is part of",
      "definition" : "Identifies a protocol or workflow that this MessageDefinition represents a step in.",
      "comment" : "It should be possible to use MessageDefinition to describe a message to be used by certain steps in a particular protocol as part of a PlanDefinition or ActivityDefinition.",
      "min" : 0,
      "max" : "*",
      "type" : [{
        "code" : "canonical",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/ActivityDefinition",
        "http://hl7.org/fhir/StructureDefinition/PlanDefinition"]
      }],
      "isSummary" : true
    },
    {
      "id" : "MessageDefinition.event[x]",
      "path" : "MessageDefinition.event[x]",
      "short" : "Event code  or link to the EventDefinition",
      "definition" : "Event code or link to the EventDefinition.",
      "min" : 1,
      "max" : "1",
      "type" : [{
        "code" : "Coding"
      },
      {
        "code" : "uri"
      }],
      "isSummary" : true,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "MessageEvent"
        },
        {
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
          "valueBoolean" : true
        }],
        "strength" : "example",
        "description" : "One of the message events defined as part of this version of FHIR.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/message-events"
      }
    },
    {
      "id" : "MessageDefinition.category",
      "path" : "MessageDefinition.category",
      "short" : "consequence | currency | notification",
      "definition" : "The impact of the content of the message.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "code"
      }],
      "isSummary" : true,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "MessageSignificanceCategory"
        }],
        "strength" : "required",
        "description" : "The impact of the content of a message.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/message-significance-category|4.0.0"
      }
    },
    {
      "id" : "MessageDefinition.focus",
      "path" : "MessageDefinition.focus",
      "short" : "Resource(s) that are the subject of the event",
      "definition" : "Identifies the resource (or resources) that are being addressed by the event.  For example, the Encounter for an admit message or two Account records for a merge.",
      "min" : 0,
      "max" : "*",
      "type" : [{
        "code" : "BackboneElement"
      }],
      "constraint" : [{
        "key" : "md-1",
        "severity" : "error",
        "human" : "Max must be postive int or *",
        "expression" : "max='*' or (max.toInteger() > 0)",
        "xpath" : "f:max/@value='*' or number(f:max/@value) > 0"
      }],
      "isSummary" : true
    },
    {
      "id" : "MessageDefinition.focus.code",
      "path" : "MessageDefinition.focus.code",
      "short" : "Type of resource",
      "definition" : "The kind of resource that must be the focus for this message.",
      "comment" : "Multiple focuses addressing different resources may occasionally occur.  E.g. to link or unlink a resource from a particular account or encounter, etc.",
      "min" : 1,
      "max" : "1",
      "type" : [{
        "code" : "code"
      }],
      "isSummary" : true,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "ResourceType"
        },
        {
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
          "valueBoolean" : true
        }],
        "strength" : "required",
        "description" : "One of the resource types defined as part of this version of FHIR.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/resource-types|4.0.0"
      }
    },
    {
      "id" : "MessageDefinition.focus.profile",
      "path" : "MessageDefinition.focus.profile",
      "short" : "Profile that must be adhered to by focus",
      "definition" : "A profile that reflects constraints for the focal resource (and potentially for related resources).",
      "comment" : "This should be present for most message definitions.  However, if the message focus is only a single resource and there is no need to include referenced resources or otherwise enforce the presence of particular elements, it can be omitted.",
      "requirements" : "This profile allows setting boundaries for what content must appear within the message bundle vs. outside based on the declared aggregation constraints on referenced resources on this and related profiles.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "canonical",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/StructureDefinition"]
      }]
    },
    {
      "id" : "MessageDefinition.focus.min",
      "path" : "MessageDefinition.focus.min",
      "short" : "Minimum number of focuses of this type",
      "definition" : "Identifies the minimum number of resources of this type that must be pointed to by a message in order for it to be valid against this MessageDefinition.",
      "min" : 1,
      "max" : "1",
      "type" : [{
        "code" : "unsignedInt"
      }],
      "isSummary" : true
    },
    {
      "id" : "MessageDefinition.focus.max",
      "path" : "MessageDefinition.focus.max",
      "short" : "Maximum number of focuses of this type",
      "definition" : "Identifies the maximum number of resources of this type that must be pointed to by a message in order for it to be valid against this MessageDefinition.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "string"
      }],
      "condition" : ["md-1"]
    },
    {
      "id" : "MessageDefinition.responseRequired",
      "path" : "MessageDefinition.responseRequired",
      "short" : "always | on-error | never | on-success",
      "definition" : "Declare at a message definition level whether a response is required or only upon error or success, or never.",
      "comment" : "This enables the capability currently available through MSH-16 (Application Level acknowledgement) in HL7 Version 2 to declare at a message instance level whether a response is required or only upon error or success, or never.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "code"
      }],
      "example" : [{
        "label" : "General",
        "valueCode" : "always"
      }],
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "messageheader-response-request"
        }],
        "strength" : "required",
        "description" : "HL7-defined table of codes which identify conditions under which acknowledgments are required to be returned in response to a message.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/messageheader-response-request|4.0.0"
      },
      "mapping" : [{
        "identity" : "v2",
        "map" : "MSH-16"
      }]
    },
    {
      "id" : "MessageDefinition.allowedResponse",
      "path" : "MessageDefinition.allowedResponse",
      "short" : "Responses to this message",
      "definition" : "Indicates what types of messages may be sent as an application-level response to this message.",
      "comment" : "This indicates an application level response to \"close\" a transaction implicit in a particular request message.  To define a complete workflow scenario, look to the [[PlanDefinition]] resource which allows the definition of complex orchestrations, conditionality, etc.",
      "min" : 0,
      "max" : "*",
      "type" : [{
        "code" : "BackboneElement"
      }]
    },
    {
      "id" : "MessageDefinition.allowedResponse.message",
      "path" : "MessageDefinition.allowedResponse.message",
      "short" : "Reference to allowed message definition response",
      "definition" : "A reference to the message definition that must be adhered to by this supported response.",
      "min" : 1,
      "max" : "1",
      "type" : [{
        "code" : "canonical",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/MessageDefinition"]
      }]
    },
    {
      "id" : "MessageDefinition.allowedResponse.situation",
      "path" : "MessageDefinition.allowedResponse.situation",
      "short" : "When should this response be used",
      "definition" : "Provides a description of the circumstances in which this response should be used (as opposed to one of the alternative responses).",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "markdown"
      }]
    },
    {
      "id" : "MessageDefinition.graph",
      "path" : "MessageDefinition.graph",
      "short" : "Canonical reference to a GraphDefinition",
      "definition" : "Canonical reference to a GraphDefinition. If a URL is provided, it is the canonical reference to a [GraphDefinition](graphdefinition.html) that it controls what resources are to be added to the bundle when building the document. The GraphDefinition can also specify profiles that apply to the various resources.",
      "min" : 0,
      "max" : "*",
      "type" : [{
        "code" : "canonical",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/GraphDefinition"]
      }]
    }]
  }
}


