@prefix fhir: <http://hl7.org/fhir/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

# - resource -------------------------------------------------------------------

[] a fhir:StructureDefinition ;
  fhir:id [ fhir:v "USRealmPersonNamePNUSFIELDED"] ;
  fhir:text [
     fhir:status [ fhir:v "extensions" ]
  ] ;
  fhir:extension ( [
     fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/logical-target" ] ;
     fhir:value [
       fhir:v "" ;
       fhir:extension ( [
         fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/data-absent-reason" ] ;
         fhir:value [ fhir:v "not-applicable" ]
       ] )
     ]
  ] [
     fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-namespace" ] ;
     fhir:value [ fhir:v "urn:hl7-org:v3" ]
  ] [
     fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-xml-no-order" ] ;
     fhir:value [ fhir:v "true" ]
  ] ) ;
  fhir:url [ fhir:v "http://hl7.org/cda/us/ccda/StructureDefinition/USRealmPersonNamePNUSFIELDED"], [ fhir:v "http://hl7.org/cda/us/ccda/StructureDefinition/USRealmPersonNamePNUSFIELDED"] ;
  fhir:identifier ( [
     fhir:value [ fhir:v "urn:oid:2.16.840.1.113883.10.20.22.5.1.1" ]
  ] [
     fhir:value [ fhir:v "urn:oid:2.16.840.1.113883.10.20.22.5.1.1" ]
  ] ) ;
  fhir:version [ fhir:v "2.1"], [ fhir:v "2.1"] ;
  fhir:name [ fhir:v "USRealmPersonNamePNUSFIELDED"], [ fhir:v "USRealmPersonNamePNUSFIELDED"] ;
  fhir:title [ fhir:v "US Realm Person Name (PN.US.FIELDED)"], [ fhir:v "US Realm Person Name (PN.US.FIELDED)"] ;
  fhir:status [ fhir:v "draft"], [ fhir:v "draft"] ;
  fhir:date [ fhir:v "2023-09-29T16:20:44+00:00"], [ fhir:v "2023-09-29T16:20:44+00:00"] ;
  fhir:publisher [ fhir:v "Health Level Seven"], [ fhir:v "Health Level Seven"] ;
  fhir:contact ( [
     fhir:name [ fhir:v "HL7 International - Structured Documents" ] ;
     fhir:telecom ( [
       fhir:system [ fhir:v "url" ] ;
       fhir:value [ fhir:v "http://www.hl7.org/Special/committees/structure" ]
     ] )
  ] [
     fhir:name [ fhir:v "HL7 International - Structured Documents" ] ;
     fhir:telecom ( [
       fhir:system [ fhir:v "url" ] ;
       fhir:value [ fhir:v "http://www.hl7.org/Special/committees/structure" ]
     ] )
  ] ) ;
  fhir:description [ fhir:v "The US Realm Clinical Document Person Name datatype flavor is a set of reusable constraints that can be used for Persons."], [ fhir:v "The US Realm Clinical Document Person Name datatype flavor is a set of reusable constraints that can be used for Persons."] ;
  fhir:jurisdiction ( [
     fhir:coding ( [
       fhir:system [ fhir:v "urn:iso:std:iso:3166" ] ;
       fhir:code [ fhir:v "US" ]
     ] )
  ] [
     fhir:coding ( [
       fhir:system [ fhir:v "urn:iso:std:iso:3166" ] ;
       fhir:code [ fhir:v "US" ]
     ] )
  ] ) ;
  fhir:fhirVersion [ fhir:v "5.0.0"] ;
  fhir:mapping ( [
     fhir:identity [ fhir:v "rim" ] ;
     fhir:uri [ fhir:v "http://hl7.org/v3" ] ;
     fhir:name [ fhir:v "RIM Mapping" ]
  ] ) ;
  fhir:kind [ fhir:v "logical"] ;
  fhir:abstract [ fhir:v "false"] ;
  fhir:type [ fhir:v "http://hl7.org/cda/stds/core/StructureDefinition/PN"] ;
  fhir:baseDefinition [ fhir:v "http://hl7.org/cda/stds/core/StructureDefinition/PN"] ;
  fhir:derivation [ fhir:v "constraint"] ;
  fhir:snapshot [
     fhir:element ( [
       fhir:id [ fhir:v "PN" ] ;
       fhir:path [ fhir:v "PN" ] ;
       fhir:short [ fhir:v "Base for all types and resources" ] ;
       fhir:definition [ fhir:v "A name for a person. A sequence of name parts, such as given name or family name, prefix, suffix, etc. Examples for person name values are \"Jim Bob Walton, Jr.\", \"Adam Everyman\", etc. A person name may be as simple as a character string or may consist of several person name parts, such as, \"Jim\", \"Bob\", \"Walton\", and \"Jr.\". PN differs from EN because the qualifier type cannot include LS (Legal Status)." ] ;
       fhir:min [ fhir:v "1" ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "Base" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:type ( [ ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] [
         fhir:key [ fhir:v "pn-no-ls" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "No PN name part may have a qualifier of LS." ] ;
         fhir:expression [ fhir:v "(delimiter | family | given | prefix | suffix).where(qualifier = 'LS').empty()" ] ;
         fhir:source [ fhir:v "http://hl7.org/cda/stds/core/StructureDefinition/PN" ]
       ] [
         fhir:key [ fhir:v "81-9371" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "The content of name **SHALL** be either a conformant Patient Name (PTN.US.FIELDED), or a string (CONF:81-9371)." ] ;
         fhir:source [ fhir:v "http://hl7.org/cda/us/ccda/StructureDefinition/USRealmPersonNamePNUSFIELDED" ]
       ] [
         fhir:key [ fhir:v "81-9372" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "The string **SHALL NOT** contain name parts (CONF:81-9372)." ] ;
         fhir:source [ fhir:v "http://hl7.org/cda/us/ccda/StructureDefinition/USRealmPersonNamePNUSFIELDED" ]
       ] ) ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "n/a" ]
       ] )
     ] [
       fhir:id [ fhir:v "PN.nullFlavor" ] ;
       fhir:path [ fhir:v "PN.nullFlavor" ] ;
       fhir:representation ( [ fhir:v "xmlAttr" ] ) ;
       fhir:label [ fhir:v "Exceptional Value Detail" ] ;
       fhir:definition [ fhir:v "If a value is an exceptional value (NULL-value), this specifies in what way and why proper information is missing." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "ANY.nullFlavor" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "code" ] ;
         fhir:profile ( [ fhir:v "http://hl7.org/cda/stds/core/StructureDefinition/cs-simple" ] )
       ] ) ;
       fhir:binding [
         fhir:strength [ fhir:v "required" ] ;
         fhir:valueSet [ fhir:v "http://terminology.hl7.org/ValueSet/v3-NullFlavor" ]
       ]
     ] [
       fhir:id [ fhir:v "PN.use" ] ;
       fhir:path [ fhir:v "PN.use" ] ;
       fhir:representation ( [ fhir:v "xmlAttr" ] ) ;
       fhir:label [ fhir:v "Use Code" ] ;
       fhir:definition [ fhir:v "A set of codes advising a system or user which name in a set of like names to select for a given purpose. A name without specific use code might be a default name useful for any purpose, but a name with a specific use code would be preferred for that respective purpose" ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "EN.use" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "code" ] ;
         fhir:profile ( [ fhir:v "http://hl7.org/cda/stds/core/StructureDefinition/cs-simple" ] )
       ] ) ;
       fhir:binding [
         fhir:strength [ fhir:v "required" ] ;
         fhir:valueSet [ fhir:v "http://terminology.hl7.org/ValueSet/v3-EntityNameUse" ]
       ]
     ] [
       fhir:id [ fhir:v "PN.delimiter" ] ;
       fhir:path [ fhir:v "PN.delimiter" ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "EN.delimiter" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "http://hl7.org/cda/stds/core/StructureDefinition/ENXP" ]
       ] )
     ] [
       fhir:id [ fhir:v "PN.family" ] ;
       fhir:path [ fhir:v "PN.family" ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "EN.family" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "http://hl7.org/cda/stds/core/StructureDefinition/ENXP" ]
       ] )
     ] [
       fhir:id [ fhir:v "PN.given" ] ;
       fhir:path [ fhir:v "PN.given" ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "EN.given" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "http://hl7.org/cda/stds/core/StructureDefinition/ENXP" ]
       ] )
     ] [
       fhir:id [ fhir:v "PN.prefix" ] ;
       fhir:path [ fhir:v "PN.prefix" ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "EN.prefix" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "http://hl7.org/cda/stds/core/StructureDefinition/ENXP" ]
       ] )
     ] [
       fhir:id [ fhir:v "PN.suffix" ] ;
       fhir:path [ fhir:v "PN.suffix" ] ;
       fhir:definition [ fhir:v "Element EN.family" ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "EN.suffix" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "http://hl7.org/cda/stds/core/StructureDefinition/ENXP" ]
       ] )
     ] [
       fhir:id [ fhir:v "PN.other" ] ;
       fhir:path [ fhir:v "PN.other" ] ;
       fhir:representation ( [ fhir:v "xmlText" ] ) ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "EN.other" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "string" ] ;
         fhir:profile ( [ fhir:v "http://hl7.org/cda/stds/core/StructureDefinition/st-simple" ] )
       ] )
     ] [
       fhir:id [ fhir:v "PN.validTime" ] ;
       fhir:path [ fhir:v "PN.validTime" ] ;
       fhir:label [ fhir:v "Valid Time" ] ;
       fhir:definition [ fhir:v "An interval of time specifying the time during which the name is or was used for the entity. This accomodates the fact that people change names for people, places and things." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "EN.validTime" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "http://hl7.org/cda/stds/core/StructureDefinition/IVL-TS" ]
       ] )
     ] )
  ] ;
  fhir:differential [
     fhir:element ( [
       fhir:id [ fhir:v "PN" ] ;
       fhir:path [ fhir:v "PN" ] ;
       fhir:constraint ( [
         fhir:key [ fhir:v "81-9371" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "The content of name **SHALL** be either a conformant Patient Name (PTN.US.FIELDED), or a string (CONF:81-9371)." ] ;
         fhir:source [ fhir:v "http://hl7.org/cda/us/ccda/StructureDefinition/USRealmPersonNamePNUSFIELDED" ]
       ] [
         fhir:key [ fhir:v "81-9372" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "The string **SHALL NOT** contain name parts (CONF:81-9372)." ] ;
         fhir:source [ fhir:v "http://hl7.org/cda/us/ccda/StructureDefinition/USRealmPersonNamePNUSFIELDED" ]
       ] )
     ] )
  ] .

# -------------------------------------------------------------------------------------

