profile-MolecularSequence-for-Sequence
type: StructureDefinition
node role: treeRoot
id:
  v: profile-MolecularSequence-for-Sequence
text:
  status:
    v: extensions
  div:
    v: Generated Narrative: StructureDefinition profile-MolecularSequence-for-Sequence Name Flags Card. Type Description & Constraints<img src="[binary]" alt="doco" style="background-color: inherit"/> Sequence 0..* Sequence Information about a biological sequence #xD; Slices for extension 0..* Extension Extension Slice: Unordered, Open by value:url #xD; extension:structureVariant 0..* (Complex) R4: Structural variant (new) URL: http://hl7.org/fhir/4.0/StructureDefinition/extension-MolecularSequence.structureVariant #xD; type #xD; Slices for extension 0..* Extension Extension Slice: Unordered, Open by value:url #xD; extension:type 0..1 code R4: type URL: http://hl7.org/fhir/4.0/StructureDefinition/extension-MolecularSequence.type Binding: sequenceType (required): Type if a sequence -- DNA, RNA, or amino acid sequence. #xD; referenceSeq #xD; Slices for extension 0..* Extension Extension Slice: Unordered, Open by value:url #xD; extension:orientation 0..1 code R4: sense | antisense (new) URL: http://hl7.org/fhir/4.0/StructureDefinition/extension-MolecularSequence.referenceSeq.orientation Binding: R4OrientationTypeForR3 (0.1.0) (required): Type for orientation. #xD; strand #xD; Slices for extension 0..* Extension Extension Slice: Unordered, Open by value:url #xD; extension:strand 0..1 code R4: watson | crick additional types URL: http://hl7.org/fhir/4.0/StructureDefinition/extension-MolecularSequence.referenceSeq.strand Binding: R4StrandTypeForR3 (0.1.0) (required): Type for strand. #xD; quality #xD; Slices for extension 0..* Extension Extension Slice: Unordered, Open by value:url #xD; extension:roc 0..1 (Complex) R4: Receiver Operator Characteristic (ROC) Curve (new) URL: http://hl7.org/fhir/4.0/StructureDefinition/extension-MolecularSequence.quality.roc #xD; <img src="[binary]" alt="doco" style="background-color: inherit"/> Documentation for this format
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/structuredefinition-wg
    l: structuredefinition-wg
  value: Code
    v: fhir
extension:
  extension:
    url:
      v: packageId
      l: packageId
    value: Id
      v: hl7.fhir.uv.xver-r4.r3
  extension:
    url:
      v: version
      l: version
    value: String
      v: 0.1.0
  url:
    v: http://hl7.org/fhir/StructureDefinition/package-source
    l: package-source
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm
    l: structuredefinition-fmm
  value: Integer
    v: 0
    extension:
      url:
        v: http://hl7.org/fhir/StructureDefinition/structuredefinition-conformance-derivedFrom
        l: structuredefinition-conformance-derivedFrom
      value: Uri
        v: http://hl7.org/fhir/uv/xver/ImplementationGuide/hl7.fhir.uv.xver-r4.r3
        l: hl7.fhir.uv.xver-r4.r3
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status
    l: structuredefinition-standards-status
  value: Code
    v: trial-use
    extension:
      url:
        v: http://hl7.org/fhir/StructureDefinition/structuredefinition-conformance-derivedFrom
        l: structuredefinition-conformance-derivedFrom
      value: Uri
        v: http://hl7.org/fhir/uv/xver/ImplementationGuide/hl7.fhir.uv.xver-r4.r3
        l: hl7.fhir.uv.xver-r4.r3
url:
  v: http://hl7.org/fhir/4.0/StructureDefinition/profile-MolecularSequence-for-Sequence
  l: profile-MolecularSequence-for-Sequence
version:
  v: 0.1.0
name:
  v: Profile_R4_MolecularSequence_R3_Sequence
title:
  v: Cross-version Profile for R4.MolecularSequence for use in FHIR STU3
status:
  v: active
experimental:
  v: false
date:
  v: 2026-03-17T16:03:29.779891-05:00
publisher:
  v: FHIR Infrastructure
contact:
  name:
    v: FHIR Infrastructure
  telecom:
    system:
      v: url
    value:
      v: http://www.hl7.org/Special/committees/fiwg
description:
  v: This cross-version profile allows R4 MolecularSequence content to be represented via FHIR STU3 Sequence resources.
jurisdiction:
  coding:
    system:
      v: http://unstats.un.org/unsd/methods/m49/m49.htm
      l: m49.htm
    code:
      v: 001
    display:
      v: World
fhir version:
  v: 3.0.2
mapping:
  identity:
    v: w5
  uri:
    v: http://hl7.org/fhir/w5
    l: w5
  name:
    v: W5 Mapping
mapping:
  identity:
    v: rim
  uri:
    v: http://hl7.org/v3
    l: v3
  name:
    v: RIM Mapping
kind:
  v: resource
abstract:
  v: false
type:
  v: Sequence
base definition:
  v: http://hl7.org/fhir/StructureDefinition/Sequence
  l: Sequence
derivation:
  v: constraint
snapshot:
  element:
    id:
      v: Sequence
    path:
      v: Sequence
    short:
      v: Information about a biological sequence
    definition:
      v: Raw data describing a biological sequence.
    min:
      v: 0
    max:
      v: *
    base:
      path:
        v: Sequence
      min:
        v: 0
      max:
        v: *
    constraint:
      key:
        v: dom-2
      severity:
        v: error
      human:
        v: If the resource is contained in another resource, it SHALL NOT contain nested Resources
      expression:
        v: contained.contained.empty()
      xpath:
        v: not(parent::f:contained and f:contained)
      source:
        v: http://hl7.org/fhir/StructureDefinition/DomainResource
        l: DomainResource
    constraint:
      key:
        v: dom-1
      severity:
        v: error
      human:
        v: If the resource is contained in another resource, it SHALL NOT contain any narrative
      expression:
        v: contained.text.empty()
      xpath:
        v: not(parent::f:contained and f:text)
      source:
        v: http://hl7.org/fhir/StructureDefinition/DomainResource
        l: DomainResource
    constraint:
      key:
        v: dom-4
      severity:
        v: error
      human:
        v: If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated
      expression:
        v: contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()
      xpath:
        v: not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))
      source:
        v: http://hl7.org/fhir/StructureDefinition/DomainResource
        l: DomainResource
    constraint:
      key:
        v: dom-3
      severity:
        v: error
      human:
        v: If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource
      expression:
        v: contained.where(('#'+id in %resource.descendants().reference).not()).empty()
      xpath:
        v: not(exists(for $id in f:contained/*/@id return $id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat('#', $id))]))
      source:
        v: http://hl7.org/fhir/StructureDefinition/DomainResource
        l: DomainResource
    constraint:
      key:
        v: seq-3
      severity:
        v: error

v: Only 0 and 1 are valid for coordinateSystem

v: coordinateSystem = 1 or coordinateSystem = 0

v: count(f:coordinateSystem[@value=0 and @value=1]) = 1

identity:
  v: rim
map:
  v: Entity. Role, or Act

identity:
  v: w5
map:
  v: clinical.diagnostics

id:
  v: Sequence.id
path:
  v: Sequence.id
short:
  v: Logical id of this artifact
definition:
  v: The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.
comment:
  v: The only time that a resource does not have an id is when it is being submitted to the server using a create operation.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Resource.id
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: id
    l: id
is summary:
  v: true

id:
  v: Sequence.meta
path:
  v: Sequence.meta
short:
  v: Metadata about the resource
definition:
  v: 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.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Resource.meta
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Meta
    l: Meta
is summary:
  v: true

id:
  v: Sequence.implicitRules
path:
  v: Sequence.implicitRules
short:
  v: A set of rules under which this content was created
definition:
  v: A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content.
comment:
  v: 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.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Resource.implicitRules
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: uri
    l: uri
is modifier:
  v: true
is summary:
  v: true

id:
  v: Sequence.language
path:
  v: Sequence.language
short:
  v: Language of the resource content
definition:
  v: The base language in which the resource is written.
comment:
  v: 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).
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Resource.language
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
    l: code
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet
      l: elementdefinition-maxValueSet
    value: Reference
      l: 3.0
      l: .2
      reference:
        v: http://hl7.org/fhir/ValueSet/all-languages|3.0.2
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: Language
  strength:
    v: extensible
  description:
    v: A human language.
  value set: Reference
    l: 3.0
    l: .2
    reference:
      v: http://hl7.org/fhir/ValueSet/languages|3.0.2

id:
  v: Sequence.text
path:
  v: Sequence.text
short:
  v: Text summary of the resource, for human interpretation
definition:
  v: A human-readable narrative that contains a summary of the resource, and may be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.
comment:
  v: Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied). This may be necessary for data from legacy systems where information is captured as a "text blob" or where text is additionally entered raw or narrated and encoded in formation is added later.
alias:
  v: narrative
alias:
  v: html
alias:
  v: xhtml
alias:
  v: display
min:
  v: 0
max:
  v: 1
base:
  path:
    v: DomainResource.text
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Narrative
    l: Narrative
condition:
  v: dom-1
mapping:
  identity:
    v: rim
  map:
    v: Act.text?

id:
  v: Sequence.contained
path:
  v: Sequence.contained
short:
  v: Contained, inline Resources
definition:
  v: These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope.
comment:
  v: This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again.
alias:
  v: inline resources
alias:
  v: anonymous resources
alias:
  v: contained resources
min:
  v: 0
max:
  v: *
base:
  path:
    v: DomainResource.contained
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Resource
    l: Resource
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: Sequence.extension
path:
  v: Sequence.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  ordered:
    v: false
  rules:
    v: open
short:
  v: Extension
definition:
  v: An Extension
min:
  v: 0
max:
  v: *
base:
  path:
    v: DomainResource.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension

id:
  v: Sequence.extension:structureVariant
path:
  v: Sequence.extension
slice name:
  v: structureVariant
short:
  v: R4: Structural variant (new)
definition:
  v: R4: `MolecularSequence.structureVariant` (new:BackboneElement)
comment:
  v: Element `MolecularSequence.structureVariant` has a context of Sequence based on following the parent source element upwards and mapping to `Sequence`. Element `MolecularSequence.structureVariant` has no mapping targets in FHIR STU3. Typically, this is because the element has been added (is a new element).
min:
  v: 0
max:
  v: *
base:
  path:
    v: DomainResource.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://hl7.org/fhir/4.0/StructureDefinition/extension-MolecularSequence.structureVariant|0.1.0
    l: http://hl7.org/fhir/4.0/StructureDefinition/extension-MolecularSequence.structureVariant
condition:
  v: ele-1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() | (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: false

id:
  v: Sequence.modifierExtension
path:
  v: Sequence.modifierExtension
short:
  v: Extensions that cannot be ignored
definition:
  v: May be used to represent additional information that is not part of the basic definition of the resource, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. 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. Applications processing a resource are required to check for modifier extensions.
comment:
  v: 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.
alias:
  v: extensions
alias:
  v: user content
min:
  v: 0
max:
  v: *
base:
  path:
    v: DomainResource.modifierExtension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
is modifier:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: Sequence.identifier
path:
  v: Sequence.identifier
short:
  v: Unique ID for this particular sequence. This is a FHIR-defined id
definition:
  v: A unique identifier for this particular sequence instance. This is a FHIR-defined id.
requirements:
  v: Allows sequences to be distinguished and referenced.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Sequence.identifier
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Identifier
    l: Identifier
is summary:
  v: true
mapping:
  identity:
    v: w5
  map:
    v: id

id:
  v: Sequence.type
path:
  v: Sequence.type
short:
  v: aa | dna | rna
definition:
  v: Amino Acid Sequence/ DNA Sequence / RNA Sequence.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Sequence.type
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
    l: code
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: sequenceType
  strength:
    v: example
  description:
    v: Type if a sequence -- DNA, RNA, or amino acid sequence
  value set: Reference
    l: 3.0
    l: .2
    reference:
      v: http://hl7.org/fhir/ValueSet/sequence-type|3.0.2

id:
  v: Sequence.type.id
path:
  v: Sequence.type.id
representation:
  v: xmlAttr
short:
  v: xml:id (or equivalent in JSON)
definition:
  v: unique id for the element within a resource (for internal references)
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.id
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string

id:
  v: Sequence.type.extension
path:
  v: Sequence.type.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  ordered:
    v: false
  rules:
    v: open
short:
  v: Extension
definition:
  v: An Extension
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension

id:
  v: Sequence.type.extension:type
path:
  v: Sequence.type.extension
slice name:
  v: type
short:
  v: R4: type
definition:
  v: R4: `MolecularSequence.type`
comment:
  v: Element `MolecularSequence.type` is mapped to FHIR STU3 element `Sequence.type` as `Equivalent`.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://hl7.org/fhir/4.0/StructureDefinition/extension-MolecularSequence.type|0.1.0
    l: http://hl7.org/fhir/4.0/StructureDefinition/extension-MolecularSequence.type
condition:
  v: ele-1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() | (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: false

id:
  v: Sequence.type.value
path:
  v: Sequence.type.value
representation:
  v: xmlAttr
short:
  v: Primitive value for code
definition:
  v: Primitive value for code
min:
  v: 0
max:
  v: 1
base:
  path:
    v: string.value
  min:
    v: 0
  max:
    v: 1
type:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/structuredefinition-regex
      l: structuredefinition-regex
    value: String
      v: [^\s]+([\s]?[^\s]+)*
  code:
    extension:
      url:
        v: http://hl7.org/fhir/StructureDefinition/structuredefinition-json-type
        l: structuredefinition-json-type
      value: String
        v: string
    extension:
      url:
        v: http://hl7.org/fhir/StructureDefinition/structuredefinition-xml-type
        l: structuredefinition-xml-type
      value: String
        v: xsd:token
    extension:
      url:
        v: http://hl7.org/fhir/StructureDefinition/structuredefinition-rdf-type
        l: structuredefinition-rdf-type
      value: String
        v: xsd:token

id:
  v: Sequence.coordinateSystem
path:
  v: Sequence.coordinateSystem
short:
  v: Base number of coordinate system (0 for 0-based numbering or coordinates, inclusive start, exclusive end, 1 for 1-based numbering, inclusive start, inclusive end)
definition:
  v: Whether the sequence is numbered starting at 0 (0-based numbering or coordinates, inclusive start, exclusive end) or starting at 1 (1-based numbering, inclusive start and inclusive end).
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Sequence.coordinateSystem
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: integer
    l: integer
is summary:
  v: true

id:
  v: Sequence.patient
path:
  v: Sequence.patient
short:
  v: Who and/or what this is about
definition:
  v: The patient whose sequencing results are described by this resource.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Sequence.patient
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Patient
    l: Patient
is summary:
  v: true

id:
  v: Sequence.specimen
path:
  v: Sequence.specimen
short:
  v: Specimen used for sequencing
definition:
  v: Specimen used for sequencing.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Sequence.specimen
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Specimen
    l: Specimen
is summary:
  v: true

id:
  v: Sequence.device
path:
  v: Sequence.device
short:
  v: The method for sequencing
definition:
  v: The method for sequencing, for example, chip information.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Sequence.device
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Device
    l: Device
is summary:
  v: true

id:
  v: Sequence.performer
path:
  v: Sequence.performer
short:
  v: Who should be responsible for test result
definition:
  v: The organization or lab that should be responsible for this result.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Sequence.performer
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Organization
    l: Organization
is summary:
  v: true

id:
  v: Sequence.quantity
path:
  v: Sequence.quantity
short:
  v: The number of copies of the seqeunce of interest. (RNASeq)
definition:
  v: The number of copies of the seqeunce of interest. (RNASeq).
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Sequence.quantity
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Quantity
    l: Quantity
is summary:
  v: true

id:
  v: Sequence.referenceSeq
path:
  v: Sequence.referenceSeq
short:
  v: A sequence used as reference
definition:
  v: A sequence that is used as a reference to describe variants that are present in a sequence analyzed.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Sequence.referenceSeq
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: BackboneElement
    l: BackboneElement
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() | (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: seq-4
  severity:
    v: error
  human:
    v: Only +1 and -1 are valid for strand
  expression:
    v: strand.empty() or strand = 1 or strand = -1
  xpath:
    v: not(exists(f:strand)) or count(f:strand[@value=-1 and @value=1]) = 1
  source:
    v: http://hl7.org/fhir/StructureDefinition/Sequence
    l: Sequence
constraint:
  key:
    v: seq-5
  severity:
    v: error
  human:
    v: GenomeBuild and chromosome must be both contained if either one of them is contained
  expression:
    v: (chromosome.empty() and genomeBuild.empty()) or (chromosome.exists() and genomeBuild.exists())
  xpath:
    v: (exists(f:chromosome) and exists(f:genomeBuild)) or (not(exists(f:chromosome)) and not(exists(f:genomeBuild)))
  source:
    v: http://hl7.org/fhir/StructureDefinition/Sequence
    l: Sequence
constraint:
  key:
    v: seq-6
  severity:
    v: error
  human:
    v: Have and only have one of the following elements in referenceSeq : 1. genomeBuild ; 2 referenceSeqId; 3. referenceSeqPointer; 4. referenceSeqString;
  expression:
    v: (genomeBuild.count()+referenceSeqId.count()+ referenceSeqPointer.count()+ referenceSeqString.count()) = 1
  xpath:
    v: count(f:genomeBuild)+count(f:referenceSeqId)+count(f:referenceSeqPointer)+count(f:referenceSeqString)=1
  source:
    v: http://hl7.org/fhir/StructureDefinition/Sequence
    l: Sequence
is summary:
  v: true

id:
  v: Sequence.referenceSeq.id
path:
  v: Sequence.referenceSeq.id
representation:
  v: xmlAttr
short:
  v: xml:id (or equivalent in JSON)
definition:
  v: unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.id
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Sequence.referenceSeq.extension
path:
  v: Sequence.referenceSeq.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  ordered:
    v: false
  rules:
    v: open
short:
  v: Extension
definition:
  v: An Extension
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension

id:
  v: Sequence.referenceSeq.extension:orientation
path:
  v: Sequence.referenceSeq.extension
slice name:
  v: orientation
short:
  v: R4: sense | antisense (new)
definition:
  v: R4: `MolecularSequence.referenceSeq.orientation` (new:code)
comment:
  v: Element `MolecularSequence.referenceSeq.orientation` has a context of Sequence.referenceSeq based on following the parent source element upwards and mapping to `Sequence`. Element `MolecularSequence.referenceSeq.orientation` has no mapping targets in FHIR STU3. Typically, this is because the element has been added (is a new element).
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://hl7.org/fhir/4.0/StructureDefinition/extension-MolecularSequence.referenceSeq.orientation|0.1.0
    l: http://hl7.org/fhir/4.0/StructureDefinition/extension-MolecularSequence.referenceSeq.orientation
condition:
  v: ele-1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() | (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: false

id:
  v: Sequence.referenceSeq.modifierExtension
path:
  v: Sequence.referenceSeq.modifierExtension
short:
  v: Extensions that cannot be ignored
definition:
  v: May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. 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. Applications processing a resource are required to check for modifier extensions.
comment:
  v: 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.
alias:
  v: extensions
alias:
  v: user content
alias:
  v: modifiers
min:
  v: 0
max:
  v: *
base:
  path:
    v: BackboneElement.modifierExtension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
is modifier:
  v: true
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: Sequence.referenceSeq.chromosome
path:
  v: Sequence.referenceSeq.chromosome
short:
  v: Chromosome containing genetic finding
definition:
  v: Structural unit composed of a nucleic acid molecule which controls its own replication through the interaction of specific proteins at one or more origins of replication ([SO:0000340](http://www.sequenceontology.org/browser/current_svn/term/SO:0000340)).
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Sequence.referenceSeq.chromosome
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: CodeableConcept
    l: CodeableConcept
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: chromosome-human
  strength:
    v: example
  description:
    v: Chromosome number for human
  value set: Reference
    l: 3.0
    l: .2
    reference:
      v: http://hl7.org/fhir/ValueSet/chromosome-human|3.0.2

id:
  v: Sequence.referenceSeq.genomeBuild
path:
  v: Sequence.referenceSeq.genomeBuild
short:
  v: The Genome Build used for reference, following GRCh build versions e.g. 'GRCh 37'
definition:
  v: The Genome Build used for reference, following GRCh build versions e.g. 'GRCh 37'. Version number must be included if a versioned release of a primary build was used.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Sequence.referenceSeq.genomeBuild
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
is summary:
  v: true

id:
  v: Sequence.referenceSeq.referenceSeqId
path:
  v: Sequence.referenceSeq.referenceSeqId
short:
  v: Reference identifier
definition:
  v: Reference identifier of reference sequence submitted to NCBI. It must match the type in the Sequence.type field. For example, the prefix, “NG_” identifies reference sequence for genes, “NM_” for messenger RNA transcripts, and “NP_” for amino acid sequences.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Sequence.referenceSeq.referenceSeqId
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: CodeableConcept
    l: CodeableConcept
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: sequenceReference
  strength:
    v: example
  description:
    v: Reference identifier
  value set: Reference
    l: 3.0
    l: .2
    reference:
      v: http://hl7.org/fhir/ValueSet/sequence-referenceSeq|3.0.2

id:
  v: Sequence.referenceSeq.referenceSeqPointer
path:
  v: Sequence.referenceSeq.referenceSeqPointer
short:
  v: A Pointer to another Sequence entity as reference sequence
definition:
  v: A Pointer to another Sequence entity as reference sequence.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Sequence.referenceSeq.referenceSeqPointer
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Sequence
    l: Sequence
is summary:
  v: true

id:
  v: Sequence.referenceSeq.referenceSeqString
path:
  v: Sequence.referenceSeq.referenceSeqString
short:
  v: A string to represent reference sequence
definition:
  v: A string like "ACGT".
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Sequence.referenceSeq.referenceSeqString
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
is summary:
  v: true

id:
  v: Sequence.referenceSeq.strand
path:
  v: Sequence.referenceSeq.strand
short:
  v: Directionality of DNA ( +1/-1)
definition:
  v: Directionality of DNA sequence. Available values are "1" for the plus strand (5' to 3')/Watson/Sense/positive and "-1" for the minus strand(3' to 5')/Crick/Antisense/negative.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Sequence.referenceSeq.strand
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: integer
    l: integer
is summary:
  v: true

id:
  v: Sequence.referenceSeq.strand.id
path:
  v: Sequence.referenceSeq.strand.id
representation:
  v: xmlAttr
short:
  v: xml:id (or equivalent in JSON)
definition:
  v: unique id for the element within a resource (for internal references)
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.id
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string

id:
  v: Sequence.referenceSeq.strand.extension
path:
  v: Sequence.referenceSeq.strand.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  ordered:
    v: false
  rules:
    v: open
short:
  v: Extension
definition:
  v: An Extension
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension

id:
  v: Sequence.referenceSeq.strand.extension:strand
path:
  v: Sequence.referenceSeq.strand.extension
slice name:
  v: strand
short:
  v: R4: watson | crick additional types
definition:
  v: R4: `MolecularSequence.referenceSeq.strand` additional types (code) additional types from child elements (value)
comment:
  v: Element `MolecularSequence.referenceSeq.strand` is mapped to FHIR STU3 element `Sequence.referenceSeq.strand` as `SourceIsBroaderThanTarget`. The mappings for `MolecularSequence.referenceSeq.strand` do not cover the following types: code. The mappings for `MolecularSequence.referenceSeq.strand` do not cover the following types based on type expansion: value.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://hl7.org/fhir/4.0/StructureDefinition/extension-MolecularSequence.referenceSeq.strand|0.1.0
    l: http://hl7.org/fhir/4.0/StructureDefinition/extension-MolecularSequence.referenceSeq.strand
condition:
  v: ele-1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() | (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: false

id:
  v: Sequence.referenceSeq.strand.value
path:
  v: Sequence.referenceSeq.strand.value
representation:
  v: xmlAttr
short:
  v: Primitive value for integer
definition:
  v: The actual value
min:
  v: 0
max:
  v: 1
base:
  path:
    v: integer.value
  min:
    v: 0
  max:
    v: 1
type:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/structuredefinition-regex
      l: structuredefinition-regex
    value: String
      v: -?([0]|([1-9][0-9]*))
  code:
    extension:
      url:
        v: http://hl7.org/fhir/StructureDefinition/structuredefinition-json-type
        l: structuredefinition-json-type
      value: String
        v: number
    extension:
      url:
        v: http://hl7.org/fhir/StructureDefinition/structuredefinition-xml-type
        l: structuredefinition-xml-type
      value: String
        v: xsd:int
    extension:
      url:
        v: http://hl7.org/fhir/StructureDefinition/structuredefinition-rdf-type
        l: structuredefinition-rdf-type
      value: String
        v: xsd:int
min value: Integer
  v: -2147483648
max value: Integer
  v: 2147483647

id:
  v: Sequence.referenceSeq.windowStart
path:
  v: Sequence.referenceSeq.windowStart
short:
  v: Start position of the window on the reference sequence
definition:
  v: Start position of the window on the reference sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Sequence.referenceSeq.windowStart
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: integer
    l: integer
is summary:
  v: true

id:
  v: Sequence.referenceSeq.windowEnd
path:
  v: Sequence.referenceSeq.windowEnd
short:
  v: End position of the window on the reference sequence
definition:
  v: End position of the window on the reference sequence. If the coordinate system is 0-based then end is is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Sequence.referenceSeq.windowEnd
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: integer
    l: integer
is summary:
  v: true

id:
  v: Sequence.variant
path:
  v: Sequence.variant
short:
  v: Variant in sequence
definition:
  v: The definition of variant here originates from Sequence ontology ([variant_of](http://www.sequenceontology.org/browser/current_svn/term/variant_of)). This element can represent amino acid or nucleic sequence change(including insertion,deletion,SNP,etc.) It can represent some complex mutation or segment variation with the assist of CIGAR string.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Sequence.variant
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: BackboneElement
    l: BackboneElement
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() | (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is summary:
  v: true

id:
  v: Sequence.variant.id
path:
  v: Sequence.variant.id
representation:
  v: xmlAttr
short:
  v: xml:id (or equivalent in JSON)
definition:
  v: unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.id
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Sequence.variant.extension
path:
  v: Sequence.variant.extension
short:
  v: Additional Content defined by implementations
definition:
  v: 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.
comment:
  v: 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.
alias:
  v: extensions
alias:
  v: user content
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Sequence.variant.modifierExtension
path:
  v: Sequence.variant.modifierExtension
short:
  v: Extensions that cannot be ignored
definition:
  v: May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. 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. Applications processing a resource are required to check for modifier extensions.
comment:
  v: 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.
alias:
  v: extensions
alias:
  v: user content
alias:
  v: modifiers
min:
  v: 0
max:
  v: *
base:
  path:
    v: BackboneElement.modifierExtension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
is modifier:
  v: true
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: Sequence.variant.start
path:
  v: Sequence.variant.start
short:
  v: Start position of the variant on the reference sequence
definition:
  v: Start position of the variant on the reference sequence.If the coordinate system is either 0-based or 1-based, then start position is inclusive.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Sequence.variant.start
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: integer
    l: integer
is summary:
  v: true

id:
  v: Sequence.variant.end
path:
  v: Sequence.variant.end
short:
  v: End position of the variant on the reference sequence
definition:
  v: End position of the variant on the reference sequence.If the coordinate system is 0-based then end is is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Sequence.variant.end
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: integer
    l: integer
is summary:
  v: true

id:
  v: Sequence.variant.observedAllele
path:
  v: Sequence.variant.observedAllele
short:
  v: Allele that was observed
definition:
  v: An allele is one of a set of coexisting sequence variants of a gene ([SO:0001023](http://www.sequenceontology.org/browser/current_svn/term/SO:0001023)). Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the observed sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand. This will lay in the range between variant.start and variant.end.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Sequence.variant.observedAllele
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
is summary:
  v: true

id:
  v: Sequence.variant.referenceAllele
path:
  v: Sequence.variant.referenceAllele
short:
  v: Allele in the reference sequence
definition:
  v: An allele is one of a set of coexisting sequence variants of a gene ([SO:0001023](http://www.sequenceontology.org/browser/current_svn/term/SO:0001023)). Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the reference sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand. This will lay in the range between variant.start and variant.end.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Sequence.variant.referenceAllele
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
is summary:
  v: true

id:
  v: Sequence.variant.cigar
path:
  v: Sequence.variant.cigar
short:
  v: Extended CIGAR string for aligning the sequence with reference bases
definition:
  v: Extended CIGAR string for aligning the sequence with reference bases. See detailed documentation [here](http://support.illumina.com/help/SequencingAnalysisWorkflow/Content/Vault/Informatics/Sequencing_Analysis/CASAVA/swSEQ_mCA_ExtendedCIGARFormat.htm).
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Sequence.variant.cigar
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
is summary:
  v: true

id:
  v: Sequence.variant.variantPointer
path:
  v: Sequence.variant.variantPointer
short:
  v: Pointer to observed variant information
definition:
  v: A pointer to an Observation containing variant information.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Sequence.variant.variantPointer
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Observation
    l: Observation
is summary:
  v: true

id:
  v: Sequence.observedSeq
path:
  v: Sequence.observedSeq
short:
  v: Sequence that was observed
definition:
  v: Sequence that was observed. It is the result marked by referenceSeq along with variant records on referenceSeq. This shall starts from referenceSeq.windowStart and end by referenceSeq.windowEnd.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Sequence.observedSeq
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
is summary:
  v: true

id:
  v: Sequence.quality
path:
  v: Sequence.quality
short:
  v: An set of value as quality of sequence
definition:
  v: An experimental feature attribute that defines the quality of the feature in a quantitative way, such as a phred quality score ([SO:0001686](http://www.sequenceontology.org/browser/current_svn/term/SO:0001686)).
min:
  v: 0
max:
  v: *
base:
  path:
    v: Sequence.quality
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: BackboneElement
    l: BackboneElement
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() | (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is summary:
  v: true

id:
  v: Sequence.quality.id
path:
  v: Sequence.quality.id
representation:
  v: xmlAttr
short:
  v: xml:id (or equivalent in JSON)
definition:
  v: unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.id
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Sequence.quality.extension
path:
  v: Sequence.quality.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  ordered:
    v: false
  rules:
    v: open
short:
  v: Extension
definition:
  v: An Extension
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension

id:
  v: Sequence.quality.extension:roc
path:
  v: Sequence.quality.extension
slice name:
  v: roc
short:
  v: R4: Receiver Operator Characteristic (ROC) Curve (new)
definition:
  v: R4: `MolecularSequence.quality.roc` (new:BackboneElement)
comment:
  v: Element `MolecularSequence.quality.roc` has a context of Sequence.quality based on following the parent source element upwards and mapping to `Sequence`. Element `MolecularSequence.quality.roc` has no mapping targets in FHIR STU3. Typically, this is because the element has been added (is a new element).
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://hl7.org/fhir/4.0/StructureDefinition/extension-MolecularSequence.quality.roc|0.1.0
    l: http://hl7.org/fhir/4.0/StructureDefinition/extension-MolecularSequence.quality.roc
condition:
  v: ele-1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() | (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: false

id:
  v: Sequence.quality.modifierExtension
path:
  v: Sequence.quality.modifierExtension
short:
  v: Extensions that cannot be ignored
definition:
  v: May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. 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. Applications processing a resource are required to check for modifier extensions.
comment:
  v: 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.
alias:
  v: extensions
alias:
  v: user content
alias:
  v: modifiers
min:
  v: 0
max:
  v: *
base:
  path:
    v: BackboneElement.modifierExtension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
is modifier:
  v: true
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: Sequence.quality.type
path:
  v: Sequence.quality.type
short:
  v: indel | snp | unknown
definition:
  v: INDEL / SNP / Undefined variant.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Sequence.quality.type
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: code
    l: code
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: qualityType
  strength:
    v: required
  description:
    v: Type for quality report
  value set: Reference
    l: 3.0
    l: .2
    reference:
      v: http://hl7.org/fhir/ValueSet/quality-type|3.0.2

id:
  v: Sequence.quality.standardSequence
path:
  v: Sequence.quality.standardSequence
short:
  v: Standard sequence for comparison
definition:
  v: Gold standard sequence used for comparing against.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Sequence.quality.standardSequence
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: CodeableConcept
    l: CodeableConcept
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: qualityStandardSequence
  strength:
    v: example
  description:
    v: Reference identifier of the sequence that used to mark the quality of tested samples.
  value set: Reference
    l: 3.0
    l: .2
    reference:
      v: http://hl7.org/fhir/ValueSet/sequence-quality-standardSequence|3.0.2

id:
  v: Sequence.quality.start
path:
  v: Sequence.quality.start
short:
  v: Start position of the sequence
definition:
  v: Start position of the sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Sequence.quality.start
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: integer
    l: integer
is summary:
  v: true

id:
  v: Sequence.quality.end
path:
  v: Sequence.quality.end
short:
  v: End position of the sequence
definition:
  v: End position of the sequence.If the coordinate system is 0-based then end is is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Sequence.quality.end
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: integer
    l: integer
is summary:
  v: true

id:
  v: Sequence.quality.score
path:
  v: Sequence.quality.score
short:
  v: Quality score for the comparison
definition:
  v: The score of an experimentally derived feature such as a p-value ([SO:0001685](http://www.sequenceontology.org/browser/current_svn/term/SO:0001685)).
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Sequence.quality.score
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Quantity
    l: Quantity
is summary:
  v: true

id:
  v: Sequence.quality.method
path:
  v: Sequence.quality.method
short:
  v: Method to get quality
definition:
  v: Which method is used to get sequence quality.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Sequence.quality.method
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: CodeableConcept
    l: CodeableConcept
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: qualityMethod
  strength:
    v: example
  description:
    v: The method used to evaluate the numerical quality of the observed sequence.
  value set: Reference
    l: 3.0
    l: .2
    reference:
      v: http://hl7.org/fhir/ValueSet/sequence-quality-method|3.0.2

id:
  v: Sequence.quality.truthTP
path:
  v: Sequence.quality.truthTP
short:
  v: True positives from the perspective of the truth data
definition:
  v: True positives, from the perspective of the truth data, i.e. the number of sites in the Truth Call Set for which there are paths through the Query Call Set that are consistent with all of the alleles at this site, and for which there is an accurate genotype call for the event.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Sequence.quality.truthTP
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: decimal
    l: decimal
is summary:
  v: true

id:
  v: Sequence.quality.queryTP
path:
  v: Sequence.quality.queryTP
short:
  v: True positives from the perspective of the query data
definition:
  v: True positives, from the perspective of the query data, i.e. the number of sites in the Query Call Set for which there are paths through the Truth Call Set that are consistent with all of the alleles at this site, and for which there is an accurate genotype call for the event.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Sequence.quality.queryTP
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: decimal
    l: decimal
is summary:
  v: true

id:
  v: Sequence.quality.truthFN
path:
  v: Sequence.quality.truthFN
short:
  v: False negatives
definition:
  v: False negatives, i.e. the number of sites in the Truth Call Set for which there is no path through the Query Call Set that is consistent with all of the alleles at this site, or sites for which there is an inaccurate genotype call for the event. Sites with correct variant but incorrect genotype are counted here.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Sequence.quality.truthFN
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: decimal
    l: decimal
is summary:
  v: true

id:
  v: Sequence.quality.queryFP
path:
  v: Sequence.quality.queryFP
short:
  v: False positives
definition:
  v: False positives, i.e. the number of sites in the Query Call Set for which there is no path through the Truth Call Set that is consistent with this site. Sites with correct variant but incorrect genotype are counted here.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Sequence.quality.queryFP
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: decimal
    l: decimal
is summary:
  v: true

id:
  v: Sequence.quality.gtFP
path:
  v: Sequence.quality.gtFP
short:
  v: False positives where the non-REF alleles in the Truth and Query Call Sets match
definition:
  v: The number of false positives where the non-REF alleles in the Truth and Query Call Sets match (i.e. cases where the truth is 1/1 and the query is 0/1 or similar).
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Sequence.quality.gtFP
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: decimal
    l: decimal
is summary:
  v: true

id:
  v: Sequence.quality.precision
path:
  v: Sequence.quality.precision
short:
  v: Precision of comparison
definition:
  v: QUERY.TP / (QUERY.TP + QUERY.FP).
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Sequence.quality.precision
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: decimal
    l: decimal
is summary:
  v: true

id:
  v: Sequence.quality.recall
path:
  v: Sequence.quality.recall
short:
  v: Recall of comparison
definition:
  v: TRUTH.TP / (TRUTH.TP + TRUTH.FN).
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Sequence.quality.recall
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: decimal
    l: decimal
is summary:
  v: true

id:
  v: Sequence.quality.fScore
path:
  v: Sequence.quality.fScore
short:
  v: F-score
definition:
  v: Harmonic mean of Recall and Precision, computed as: 2 * precision * recall / (precision + recall).
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Sequence.quality.fScore
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: decimal
    l: decimal
is summary:
  v: true

id:
  v: Sequence.readCoverage
path:
  v: Sequence.readCoverage
short:
  v: Average number of reads representing a given nucleotide in the reconstructed sequence
definition:
  v: Coverage (read depth or depth) is the average number of reads representing a given nucleotide in the reconstructed sequence.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Sequence.readCoverage
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: integer
    l: integer
is summary:
  v: true

id:
  v: Sequence.repository
path:
  v: Sequence.repository
short:
  v: External repository which contains detailed report related with observedSeq in this resource
definition:
  v: Configurations of the external repository. The repository shall store target's observedSeq or records related with target's observedSeq.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Sequence.repository
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: BackboneElement
    l: BackboneElement
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() | (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is summary:
  v: true

id:
  v: Sequence.repository.id
path:
  v: Sequence.repository.id
representation:
  v: xmlAttr
short:
  v: xml:id (or equivalent in JSON)
definition:
  v: unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.id
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Sequence.repository.extension
path:
  v: Sequence.repository.extension
short:
  v: Additional Content defined by implementations
definition:
  v: 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.
comment:
  v: 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.
alias:
  v: extensions
alias:
  v: user content
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Sequence.repository.modifierExtension
path:
  v: Sequence.repository.modifierExtension
short:
  v: Extensions that cannot be ignored
definition:
  v: May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. 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. Applications processing a resource are required to check for modifier extensions.
comment:
  v: 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.
alias:
  v: extensions
alias:
  v: user content
alias:
  v: modifiers
min:
  v: 0
max:
  v: *
base:
  path:
    v: BackboneElement.modifierExtension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
is modifier:
  v: true
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: Sequence.repository.type
path:
  v: Sequence.repository.type
short:
  v: directlink | openapi | login | oauth | other
definition:
  v: Click and see / RESTful API / Need login to see / RESTful API with authentication / Other ways to see resource.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Sequence.repository.type
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: code
    l: code
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: repositoryType
  strength:
    v: required
  description:
    v: Type for access of external URI
  value set: Reference
    l: 3.0
    l: .2
    reference:
      v: http://hl7.org/fhir/ValueSet/repository-type|3.0.2

id:
  v: Sequence.repository.url
path:
  v: Sequence.repository.url
short:
  v: URI of the repository
definition:
  v: URI of an external repository which contains further details about the genetics data.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Sequence.repository.url
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: uri
    l: uri
is summary:
  v: true

id:
  v: Sequence.repository.name
path:
  v: Sequence.repository.name
short:
  v: Repository's name
definition:
  v: URI of an external repository which contains further details about the genetics data.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Sequence.repository.name
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
is summary:
  v: true

id:
  v: Sequence.repository.datasetId
path:
  v: Sequence.repository.datasetId
short:
  v: Id of the dataset that used to call for dataset in repository
definition:
  v: Id of the variant in this external repository. The server will understand how to use this id to call for more info about datasets in external repository.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Sequence.repository.datasetId
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
is summary:
  v: true

id:
  v: Sequence.repository.variantsetId
path:
  v: Sequence.repository.variantsetId
short:
  v: Id of the variantset that used to call for variantset in repository
definition:
  v: Id of the variantset in this external repository. The server will understand how to use this id to call for more info about variantsets in external repository.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Sequence.repository.variantsetId
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
is summary:
  v: true

id:
  v: Sequence.repository.readsetId
path:
  v: Sequence.repository.readsetId
short:
  v: Id of the read
definition:
  v: Id of the read in this external repository.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Sequence.repository.readsetId
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
is summary:
  v: true

id:
  v: Sequence.pointer
path:
  v: Sequence.pointer
short:
  v: Pointer to next atomic sequence
definition:
  v: Pointer to next atomic sequence which at most contains one variant.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Sequence.pointer
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Sequence
    l: Sequence
is summary:
  v: true

element:
  id:
    v: Sequence
  path:
    v: Sequence
element:
  id:
    v: Sequence.extension
  path:
    v: Sequence.extension
  slicing:
    discriminator:
      type:
        v: value
      path:
        v: url
    ordered:
      v: false
    rules:
      v: open
  min:
    v: 0
  max:
    v: *
element:
  id:
    v: Sequence.extension:structureVariant
  path:
    v: Sequence.extension
  slice name:
    v: structureVariant
  short:
    v: R4: Structural variant (new)
  definition:
    v: R4: `MolecularSequence.structureVariant` (new:BackboneElement)
  comment:
    v: Element `MolecularSequence.structureVariant` has a context of Sequence based on following the parent source element upwards and mapping to `Sequence`. Element `MolecularSequence.structureVariant` has no mapping targets in FHIR STU3. Typically, this is because the element has been added (is a new element).
  min:
    v: 0
  max:
    v: *
  base:
    path:
      v: DomainResource.extension
    min:
      v: 0
    max:
      v: *
  type:
    code:
      v: Extension
      l: Extension
    profile:
      v: http://hl7.org/fhir/4.0/StructureDefinition/extension-MolecularSequence.structureVariant|0.1.0
      l: http://hl7.org/fhir/4.0/StructureDefinition/extension-MolecularSequence.structureVariant
element:
  id:
    v: Sequence.type.extension
  path:
    v: Sequence.type.extension
  slicing:
    discriminator:
      type:
        v: value
      path:
        v: url
    ordered:
      v: false
    rules:
      v: open
  min:
    v: 0
  max:
    v: *
element:
  id:
    v: Sequence.type.extension:type
  path:
    v: Sequence.type.extension
  slice name:
    v: type
  short:
    v: R4: type
  definition:
    v: R4: `MolecularSequence.type`
  comment:
    v: Element `MolecularSequence.type` is mapped to FHIR STU3 element `Sequence.type` as `Equivalent`.
  min:
    v: 0
  max:
    v: 1
  base:
    path:
      v: DomainResource.extension
    min:
      v: 0
    max:
      v: *
  type:
    code:
      v: Extension
      l: Extension
    profile:
      v: http://hl7.org/fhir/4.0/StructureDefinition/extension-MolecularSequence.type|0.1.0
      l: http://hl7.org/fhir/4.0/StructureDefinition/extension-MolecularSequence.type
element:
  id:
    v: Sequence.referenceSeq.extension
  path:
    v: Sequence.referenceSeq.extension
  slicing:
    discriminator:
      type:
        v: value
      path:
        v: url
    ordered:
      v: false
    rules:
      v: open
  min:
    v: 0
  max:
    v: *
element:
  id:
    v: Sequence.referenceSeq.extension:orientation
  path:
    v: Sequence.referenceSeq.extension
  slice name:
    v: orientation
  short:
    v: R4: sense | antisense (new)
  definition:
    v: R4: `MolecularSequence.referenceSeq.orientation` (new:code)
  comment:
    v: Element `MolecularSequence.referenceSeq.orientation` has a context of Sequence.referenceSeq based on following the parent source element upwards and mapping to `Sequence`. Element `MolecularSequence.referenceSeq.orientation` has no mapping targets in FHIR STU3. Typically, this is because the element has been added (is a new element).
  min:
    v: 0
  max:
    v: 1
  base:
    path:
      v: DomainResource.extension
    min:
      v: 0
    max:
      v: *
  type:
    code:
      v: Extension
      l: Extension
    profile:
      v: http://hl7.org/fhir/4.0/StructureDefinition/extension-MolecularSequence.referenceSeq.orientation|0.1.0
      l: http://hl7.org/fhir/4.0/StructureDefinition/extension-MolecularSequence.referenceSeq.orientation
element:
  id:
    v: Sequence.referenceSeq.strand.extension
  path:
    v: Sequence.referenceSeq.strand.extension
  slicing:
    discriminator:
      type:
        v: value
      path:
        v: url
    ordered:
      v: false
    rules:
      v: open
  min:
    v: 0
  max:
    v: *
element:
  id:
    v: Sequence.referenceSeq.strand.extension:strand
  path:
    v: Sequence.referenceSeq.strand.extension
  slice name:
    v: strand
  short:
    v: R4: watson | crick additional types
  definition:
    v: R4: `MolecularSequence.referenceSeq.strand` additional types (code) additional types from child elements (value)
  comment:
    v: Element `MolecularSequence.referenceSeq.strand` is mapped to FHIR STU3 element `Sequence.referenceSeq.strand` as `SourceIsBroaderThanTarget`. The mappings for `MolecularSequence.referenceSeq.strand` do not cover the following types: code. The mappings for `MolecularSequence.referenceSeq.strand` do not cover the following types based on type expansion: value.
  min:
    v: 0
  max:
    v: 1
  base:
    path:
      v: DomainResource.extension
    min:
      v: 0
    max:
      v: *
  type:
    code:
      v: Extension
      l: Extension

id:
  v: Sequence.quality.extension
path:
  v: Sequence.quality.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  ordered:
    v: false
  rules:
    v: open
min:
  v: 0
max:
  v: *

id:
  v: Sequence.quality.extension:roc
path:
  v: Sequence.quality.extension
slice name:
  v: roc
short:
  v: R4: Receiver Operator Characteristic (ROC) Curve (new)
definition:
  v: R4: `MolecularSequence.quality.roc` (new:BackboneElement)
comment:
  v: Element `MolecularSequence.quality.roc` has a context of Sequence.quality based on following the parent source element upwards and mapping to `Sequence`. Element `MolecularSequence.quality.roc` has no mapping targets in FHIR STU3. Typically, this is because the element has been added (is a new element).
min:
  v: 0
max:
  v: 1
base:
  path:
    v: DomainResource.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://hl7.org/fhir/4.0/StructureDefinition/extension-MolecularSequence.quality.roc|0.1.0
    l: http://hl7.org/fhir/4.0/StructureDefinition/extension-MolecularSequence.quality.roc