### ----------------------------------------------------
### -- FHIR
### -- Licenses: Artistic-2.0
### -- Authors: Hugh Simpson
### -- File: t/resources/structureDefinition/CareTeam.json
### ----------------------------------------------------
### -- Chunk 5 of 5
 elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
      "comment" : "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "requirements" : "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension).",
      "alias" : ["extensions",
      "user content",
      "modifiers"],
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "BackboneElement.modifierExtension",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "Extension"
      }],
      "isModifier" : true,
      "isModifierReason" : "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them",
      "isSummary" : true,
      "mapping" : [{
        "identity" : "rim",
        "map" : "N/A"
      }]
    },
    {
      "id" : "CareTeam.participant.role",
      "path" : "CareTeam.participant.role",
      "short" : "Type of involvement",
      "definition" : "Indicates specific responsibility of an individual within the care team, such as \"Primary care physician\", \"Trained social worker counselor\", \"Caregiver\", etc.",
      "comment" : "Roles may sometimes be inferred by type of Practitioner.  These are relationships that hold only within the context of the care team.  General relationships should be handled as properties of the Patient resource directly.",
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "CareTeam.participant.role",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "CodeableConcept"
      }],
      "isModifier" : false,
      "isSummary" : true,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "CareTeamParticipantRole"
        }],
        "strength" : "example",
        "description" : "Indicates specific responsibility of an individual within the care team, such as \"Primary physician\", \"Team coordinator\", \"Caregiver\", etc.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/participant-role"
      },
      "mapping" : [{
        "identity" : "v2",
        "map" : "REL.2 (or PRT-4?)"
      },
      {
        "identity" : "rim",
        "map" : ".functionCode"
      }]
    },
    {
      "id" : "CareTeam.participant.member",
      "path" : "CareTeam.participant.member",
      "short" : "Who is involved",
      "definition" : "The specific person or organization who is participating/expected to participate in the care team.",
      "comment" : "Patient only needs to be listed if they have a role other than \"subject of care\".\n\nMember is optional because some participants may be known only by their role, particularly in draft plans.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "CareTeam.participant.member",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/Practitioner",
        "http://hl7.org/fhir/StructureDefinition/PractitionerRole",
        "http://hl7.org/fhir/StructureDefinition/RelatedPerson",
        "http://hl7.org/fhir/StructureDefinition/Patient",
        "http://hl7.org/fhir/StructureDefinition/Organization",
        "http://hl7.org/fhir/StructureDefinition/CareTeam"]
      }],
      "isModifier" : false,
      "isSummary" : true,
      "mapping" : [{
        "identity" : "w5",
        "map" : "FiveWs.actor"
      },
      {
        "identity" : "v2",
        "map" : "REL.5 (or PRT-5 : ( PRV-4 {provider participations} ) / PRT-5 : ( PRV-4  {non-provider person participations} ) / PRT-5 : ( PRV-4 = (patient non-subject of care) ) / PRT-8?)"
      },
      {
        "identity" : "rim",
        "map" : ".role"
      }]
    },
    {
      "id" : "CareTeam.participant.onBehalfOf",
      "path" : "CareTeam.participant.onBehalfOf",
      "short" : "Organization of the practitioner",
      "definition" : "The organization of the practitioner.",
      "requirements" : "Practitioners can be associated with multiple organizations.  This element indicates which organization they were acting on behalf of.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "CareTeam.participant.onBehalfOf",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/Organization"]
      }],
      "isModifier" : false,
      "isSummary" : true
    },
    {
      "id" : "CareTeam.participant.period",
      "path" : "CareTeam.participant.period",
      "short" : "Time period of participant",
      "definition" : "Indicates when the specific member or organization did (or is intended to) come into effect and end.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "CareTeam.participant.period",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "Period"
      }],
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "CareTeam.reasonCode",
      "path" : "CareTeam.reasonCode",
      "short" : "Why the care team exists",
      "definition" : "Describes why the care team exists.",
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "CareTeam.reasonCode",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "CodeableConcept"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "CareTeamReason"
        }],
        "strength" : "example",
        "description" : "Indicates the reason for the care team.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/clinical-findings"
      },
      "mapping" : [{
        "identity" : "w5",
        "map" : "FiveWs.why[x]"
      }]
    },
    {
      "id" : "CareTeam.reasonReference",
      "path" : "CareTeam.reasonReference",
      "short" : "Why the care team exists",
      "definition" : "Condition(s) that this care team addresses.",
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "CareTeam.reasonReference",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/Condition"]
      }],
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "w5",
        "map" : "FiveWs.why[x]"
      }]
    },
    {
      "id" : "CareTeam.managingOrganization",
      "path" : "CareTeam.managingOrganization",
      "short" : "Organization responsible for the care team",
      "definition" : "The organization responsible for the care team.",
      "requirements" : "Allows for multiple organizations to collaboratively manage cross-organizational, longitudinal care plan.",
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "CareTeam.managingOrganization",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/Organization"]
      }],
      "isModifier" : false,
      "isSummary" : true
    },
    {
      "id" : "CareTeam.telecom",
      "path" : "CareTeam.telecom",
      "short" : "A contact detail for the care team (that applies to all members)",
      "definition" : "A central contact detail for the care team (that applies to all members).",
      "comment" : "The ContactPoint.use code of home is not appropriate to use. These contacts are not the contact details of individual care team members.",
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "CareTeam.telecom",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "ContactPoint"
      }],
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "CareTeam.note",
      "path" : "CareTeam.note",
      "short" : "Comments made about the CareTeam",
      "definition" : "Comments made about the CareTeam.",
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "CareTeam.note",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "Annotation"
      }],
      "isModifier" : false,
      "isSummary" : false
    }]
  },
  "differential" : {
    "element" : [{
      "id" : "CareTeam",
      "path" : "CareTeam",
      "short" : "Planned participants in the coordination and delivery of care for a patient or group",
      "definition" : "The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care for a patient.",
      "min" : 0,
      "max" : "*"
    },
    {
      "id" : "CareTeam.identifier",
      "path" : "CareTeam.identifier",
      "short" : "External Ids for this team",
      "definition" : "Business identifiers assigned to this care team by the performer or other systems which remain constant as the resource is updated and propagates from server to server.",
      "comment" : "This is a business identifier, not a resource identifier (see [discussion](resource.html#identifiers)).  It is best practice for the identifier to only appear on a single resource instance, however business practices may occasionally dictate that multiple resource instances with the same identifier can exist - possibly even with different resource types.  For example, multiple Patient and a Person resource instance might share the same social insurance number.",
      "requirements" : "Allows identification of the care team as it is known by various participating systems and in a way that remains consistent across servers.",
      "min" : 0,
      "max" : "*",
      "type" : [{
        "code" : "Identifier"
      }],
      "isSummary" : true,
      "mapping" : [{
        "identity" : "w5",
        "map" : "FiveWs.identifier"
      }]
    },
    {
      "id" : "CareTeam.status",
      "path" : "CareTeam.status",
      "short" : "proposed | active | suspended | inactive | entered-in-error",
      "definition" : "Indicates the current state of the care team.",
      "comment" : "This element is labeled as a modifier because the status contains the code entered-in-error that marks the care team as not currently valid.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "code"
      }],
      "isModifier" : true,
      "isModifierReason" : "This element is labelled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid",
      "isSummary" : true,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "CareTeamStatus"
        }],
        "strength" : "required",
        "description" : "Indicates the status of the care team.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/care-team-status|4.0.0"
      },
      "mapping" : [{
        "identity" : "w5",
        "map" : "FiveWs.status"
      }]
    },
    {
      "id" : "CareTeam.category",
      "path" : "CareTeam.category",
      "short" : "Type of team",
      "definition" : "Identifies what kind of team.  This is to support differentiation between multiple co-existing teams, such as care plan team, episode of care team, longitudinal care team.",
      "comment" : "There may be multiple axis of categorization and one team may serve multiple purposes.",
      "requirements" : "Used for filtering what teams(s) are retrieved and displayed to different types of users.",
      "min" : 0,
      "max" : "*",
      "type" : [{
        "code" : "CodeableConcept"
      }],
      "isSummary" : true,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "CareTeamCategory"
        }],
        "strength" : "example",
        "description" : "Indicates the type of care team.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/care-team-category"
      },
      "mapping" : [{
        "identity" : "w5",
        "map" : "FiveWs.class"
      }]
    },
    {
      "id" : "CareTeam.name",
      "path" : "CareTeam.name",
      "short" : "Name of the team, such as crisis assessment team",
      "definition" : "A label for human use intended to distinguish like teams.  E.g. the \"red\" vs. \"green\" trauma teams.",
      "comment" : "The meaning/purpose of the team is conveyed in CareTeam.category.  This element may also convey semantics of the team (e.g. \"Red trauma team\"), but its primary purpose is to distinguish between identical teams in a human-friendly way.  (\"Team 18735\" isn't as friendly.).",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "string"
      }],
      "isSummary" : true
    },
    {
      "id" : "CareTeam.subject",
      "path" : "CareTeam.subject",
      "short" : "Who care team is for",
      "definition" : "Identifies the patient or group whose intended care is handled by the team.",
      "requirements" : "Allows the team to care for a group (e.g. marriage) therapy. \nAllows for an organization to designate a team such as the PICC line team.",
      "alias" : ["patient"],
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/Patient",
        "http://hl7.org/fhir/StructureDefinition/Group"]
      }],
      "isSummary" : true,
      "mapping" : [{
        "identity" : "w5",
        "map" : "FiveWs.subject[x]"
      },
      {
        "identity" : "w5",
        "map" : "FiveWs.subject"
      }]
    },
    {
      "id" : "CareTeam.encounter",
      "path" : "CareTeam.encounter",
      "short" : "Encounter created as part of",
      "definition" : "The Encounter during which this CareTeam was created or to which the creation of this record is tightly associated.",
      "comment" : "This will typically be the encounter the event occurred within, but some activities may be initiated prior to or after the official completion of an encounter but still be tied to the context of the encounter.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/Encounter"]
      }],
      "isSummary" : true,
      "mapping" : [{
        "identity" : "w5",
        "map" : "FiveWs.context"
      }]
    },
    {
      "id" : "CareTeam.period",
      "path" : "CareTeam.period",
      "short" : "Time period team covers",
      "definition" : "Indicates when the team did (or is intended to) come into effect and end.",
      "requirements" : "Allows tracking what team(s) are in effect at a particular time.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "Period"
      }],
      "isSummary" : true,
      "mapping" : [{
        "identity" : "w5",
        "map" : "FiveWs.init"
      }]
    },
    {
      "id" : "CareTeam.participant",
      "path" : "CareTeam.participant",
      "short" : "Members of the team",
      "definition" : "Identifies all people and organizations who are expected to be involved in the care team.",
      "min" : 0,
      "max" : "*",
      "type" : [{
        "code" : "BackboneElement"
      }],
      "condition" : ["ctm-1"],
      "constraint" : [{
        "key" : "ctm-1",
        "severity" : "error",
        "human" : "CareTeam.participant.onBehalfOf can only be populated when CareTeam.participant.member is a Practitioner",
        "expression" : "onBehalfOf.exists() implies (member.resolve() is Practitioner)",
        "xpath" : "starts-with(f:member/f:reference/@value, 'Practitioner/') or contains(f:member/f:reference/@value, '/Practitioner/') or exists(ancestor::*/f:contains/f:Practitioner/f:id[@value=substring-after(current()/f:member/f:reference/@value, '#')]) or not(exists(f:onBehalfOf))"
      }],
      "mapping" : [{
        "identity" : "v2",
        "map" : "REL (REL.4 is always the Patient) ( or PRT?)"
      },
      {
        "identity" : "rim",
        "map" : ".participation[typeCode=PRF]"
      }]
    },
    {
      "id" : "CareTeam.participant.role",
      "path" : "CareTeam.participant.role",
      "short" : "Type of involvement",
      "definition" : "Indicates specific responsibility of an individual within the care team, such as \"Primary care physician\", \"Trained social worker counselor\", \"Caregiver\", etc.",
      "comment" : "Roles may sometimes be inferred by type of Practitioner.  These are relationships that hold only within the context of the care team.  General relationships should be handled as properties of the Patient resource directly.",
      "min" : 0,
      "max" : "*",
      "type" : [{
        "code" : "CodeableConcept"
      }],
      "isSummary" : true,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "CareTeamParticipantRole"
        }],
        "strength" : "example",
        "description" : "Indicates specific responsibility of an individual within the care team, such as \"Primary physician\", \"Team coordinator\", \"Caregiver\", etc.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/participant-role"
      },
      "mapping" : [{
        "identity" : "v2",
        "map" : "REL.2 (or PRT-4?)"
      },
      {
        "identity" : "rim",
        "map" : ".functionCode"
      }]
    },
    {
      "id" : "CareTeam.participant.member",
      "path" : "CareTeam.participant.member",
      "short" : "Who is involved",
      "definition" : "The specific person or organization who is participating/expected to participate in the care team.",
      "comment" : "Patient only needs to be listed if they have a role other than \"subject of care\".\n\nMember is optional because some participants may be known only by their role, particularly in draft plans.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/Practitioner",
        "http://hl7.org/fhir/StructureDefinition/PractitionerRole",
        "http://hl7.org/fhir/StructureDefinition/RelatedPerson",
        "http://hl7.org/fhir/StructureDefinition/Patient",
        "http://hl7.org/fhir/StructureDefinition/Organization",
        "http://hl7.org/fhir/StructureDefinition/CareTeam"]
      }],
      "isSummary" : true,
      "mapping" : [{
        "identity" : "w5",
        "map" : "FiveWs.actor"
      },
      {
        "identity" : "v2",
        "map" : "REL.5 (or PRT-5 : ( PRV-4 {provider participations} ) / PRT-5 : ( PRV-4  {non-provider person participations} ) / PRT-5 : ( PRV-4 = (patient non-subject of care) ) / PRT-8?)"
      },
      {
        "identity" : "rim",
        "map" : ".role"
      }]
    },
    {
      "id" : "CareTeam.participant.onBehalfOf",
      "path" : "CareTeam.participant.onBehalfOf",
      "short" : "Organization of the practitioner",
      "definition" : "The organization of the practitioner.",
      "requirements" : "Practitioners can be associated with multiple organizations.  This element indicates which organization they were acting on behalf of.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/Organization"]
      }],
      "isSummary" : true
    },
    {
      "id" : "CareTeam.participant.period",
      "path" : "CareTeam.participant.period",
      "short" : "Time period of participant",
      "definition" : "Indicates when the specific member or organization did (or is intended to) come into effect and end.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "Period"
      }]
    },
    {
      "id" : "CareTeam.reasonCode",
      "path" : "CareTeam.reasonCode",
      "short" : "Why the care team exists",
      "definition" : "Describes why the care team exists.",
      "min" : 0,
      "max" : "*",
      "type" : [{
        "code" : "CodeableConcept"
      }],
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "CareTeamReason"
        }],
        "strength" : "example",
        "description" : "Indicates the reason for the care team.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/clinical-findings"
      },
      "mapping" : [{
        "identity" : "w5",
        "map" : "FiveWs.why[x]"
      }]
    },
    {
      "id" : "CareTeam.reasonReference",
      "path" : "CareTeam.reasonReference",
      "short" : "Why the care team exists",
      "definition" : "Condition(s) that this care team addresses.",
      "min" : 0,
      "max" : "*",
      "type" : [{
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/Condition"]
      }],
      "mapping" : [{
        "identity" : "w5",
        "map" : "FiveWs.why[x]"
      }]
    },
    {
      "id" : "CareTeam.managingOrganization",
      "path" : "CareTeam.managingOrganization",
      "short" : "Organization responsible for the care team",
      "definition" : "The organization responsible for the care team.",
      "requirements" : "Allows for multiple organizations to collaboratively manage cross-organizational, longitudinal care plan.",
      "min" : 0,
      "max" : "*",
      "type" : [{
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/Organization"]
      }],
      "isSummary" : true
    },
    {
      "id" : "CareTeam.telecom",
      "path" : "CareTeam.telecom",
      "short" : "A contact detail for the care team (that applies to all members)",
      "definition" : "A central contact detail for the care team (that applies to all members).",
      "comment" : "The ContactPoint.use code of home is not appropriate to use. These contacts are not the contact details of individual care team members.",
      "min" : 0,
      "max" : "*",
      "type" : [{
        "code" : "ContactPoint"
      }]
    },
    {
      "id" : "CareTeam.note",
      "path" : "CareTeam.note",
      "short" : "Comments made about the CareTeam",
      "definition" : "Comments made about the CareTeam.",
      "min" : 0,
      "max" : "*",
      "type" : [{
        "code" : "Annotation"
      }]
    }]
  }
}


