{
  "resourceType": "StructureDefinition",
  "url": "http://esante.gouv.fr/ci-sis/fhir/StructureDefinition/CDS_BundleTransactionMAJ",
  "version": "1.0",
  "name": "CDS_BundleTransactionMAJ",
  "status": "active",
  "date": "2022-11-15",
  "publisher": "ANS",
  "description": "Profil défini dans le volet de Gestion du Cercle de Soins (flux 1c) pour mettre à jour un cercle de soins selon l’option Transaction.\r\nIl s'agit d'un bundle de type \"transaction\" permettant d'organiser le contenu du flux de création d'un cercle de soins.",
  "fhirVersion": "4.0.1",
  "mapping": [
    {
      "identity": "v2",
      "uri": "http://hl7.org/v2",
      "name": "HL7 v2 Mapping"
    },
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    },
    {
      "identity": "cda",
      "uri": "http://hl7.org/v3/cda",
      "name": "CDA (R2)"
    },
    {
      "identity": "w5",
      "uri": "http://hl7.org/fhir/fivews",
      "name": "FiveWs Pattern Mapping"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "Bundle",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Bundle",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Bundle.type",
        "path": "Bundle.type",
        "fixedCode": "transaction"
      },
      {
        "id": "Bundle.entry",
        "path": "Bundle.entry",
        "slicing": {
          "discriminator": [
            {
              "type": "profile",
              "path": "resource"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Bundle.entry:careTeam",
        "path": "Bundle.entry",
        "sliceName": "careTeam",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Bundle.entry:careTeam.resource",
        "path": "Bundle.entry.resource",
        "min": 1,
        "type": [
          {
            "code": "Resource",
            "profile": [
              "http://esante.gouv.fr/ci-sis/fhir/StructureDefinition/CDS_IHECareTeam"
            ]
          }
        ]
      },
      {
        "id": "Bundle.entry:careTeam.request.method",
        "path": "Bundle.entry.request.method",
        "fixedCode": "PUT"
      },
      {
        "id": "Bundle.entry:careTeam.response",
        "path": "Bundle.entry.response",
        "max": "0"
      },
      {
        "id": "Bundle.entry:patient",
        "path": "Bundle.entry",
        "sliceName": "patient"
      },
      {
        "id": "Bundle.entry:patient.resource",
        "path": "Bundle.entry.resource",
        "min": 1,
        "type": [
          {
            "code": "Resource",
            "profile": [
              "http://interopsante.org/fhir/StructureDefinition/FrPatient"
            ]
          }
        ]
      },
      {
        "id": "Bundle.entry:patient.request.method",
        "path": "Bundle.entry.request.method",
        "constraint": [
          {
            "key": "req-met-2",
            "severity": "error",
            "human": "POST si il s’agit d’un nouvel élément ou PUT si il s’agit d’un élément qui existe déjà",
            "expression": "value='POST' or value='PUT'",
            "source": "Bundle"
          }
        ]
      },
      {
        "id": "Bundle.entry:patient.response",
        "path": "Bundle.entry.response",
        "max": "0"
      },
      {
        "id": "Bundle.entry:relatedPerson",
        "path": "Bundle.entry",
        "sliceName": "relatedPerson"
      },
      {
        "id": "Bundle.entry:relatedPerson.resource",
        "path": "Bundle.entry.resource",
        "min": 1,
        "type": [
          {
            "code": "Resource",
            "profile": [
              "http://esante.gouv.fr/ci-sis/fhir/StructureDefinition/CDS_FrRelatedPerson"
            ]
          }
        ]
      },
      {
        "id": "Bundle.entry:relatedPerson.request.method",
        "path": "Bundle.entry.request.method",
        "constraint": [
          {
            "key": "req-met-3",
            "severity": "error",
            "human": "POST si il s’agit d’un nouvel élément ou PUT si il s’agit d’un élément qui existe déjà",
            "expression": "value='POST' or value='PUT'",
            "source": "Bundle"
          }
        ]
      },
      {
        "id": "Bundle.entry:relatedPerson.response",
        "path": "Bundle.entry.response",
        "max": "0"
      },
      {
        "id": "Bundle.entry:organization",
        "path": "Bundle.entry",
        "sliceName": "organization"
      },
      {
        "id": "Bundle.entry:organization.resource",
        "path": "Bundle.entry.resource",
        "min": 1,
        "type": [
          {
            "code": "Resource",
            "profile": [
              "http://interopsante.org/fhir/StructureDefinition/FrOrganization"
            ]
          }
        ]
      },
      {
        "id": "Bundle.entry:organization.request.method",
        "path": "Bundle.entry.request.method",
        "constraint": [
          {
            "key": "req-met-4",
            "severity": "error",
            "human": "POST si il s’agit d’un nouvel élément ou PUT si il s’agit d’un élément qui existe déjà",
            "expression": "value='POST' or value='PUT'",
            "source": "Bundle"
          }
        ]
      },
      {
        "id": "Bundle.entry:organization.response",
        "path": "Bundle.entry.response",
        "max": "0"
      },
      {
        "id": "Bundle.entry:organizationInterne",
        "path": "Bundle.entry",
        "sliceName": "organizationInterne"
      },
      {
        "id": "Bundle.entry:organizationInterne.resource",
        "path": "Bundle.entry.resource",
        "min": 1,
        "type": [
          {
            "code": "Resource",
            "profile": [
              "http://esante.gouv.fr/ci-sis/fhir/StructureDefinition/CDS_Organization-OrgaInt"
            ]
          }
        ]
      },
      {
        "id": "Bundle.entry:organizationInterne.request.method",
        "path": "Bundle.entry.request.method",
        "constraint": [
          {
            "key": "req-met-7",
            "severity": "error",
            "human": "POST si il s’agit d’un nouvel élément ou PUT si il s’agit d’un élément qui existe déjà",
            "expression": "value='POST' or value='PUT'",
            "source": "http://esante.gouv.fr/ci-sis/fhir/StructureDefinition/CDS_BundleTransactionCreationMAJ"
          }
        ]
      },
      {
        "id": "Bundle.entry:organizationInterne.response",
        "path": "Bundle.entry.response",
        "max": "0"
      },
      {
        "id": "Bundle.entry:practitionerRoleOrg",
        "path": "Bundle.entry",
        "sliceName": "practitionerRoleOrg"
      },
      {
        "id": "Bundle.entry:practitionerRoleOrg.resource",
        "path": "Bundle.entry.resource",
        "min": 1,
        "type": [
          {
            "code": "Resource",
            "profile": [
              "https://apifhir.annuaire.sante.fr/ws-sync/exposed/structuredefinition/practitionerRole-organizationalRole-rass"
            ]
          }
        ]
      },
      {
        "id": "Bundle.entry:practitionerRoleOrg.request.method",
        "path": "Bundle.entry.request.method",
        "constraint": [
          {
            "key": "req-met-8",
            "severity": "error",
            "human": "POST si il s’agit d’un nouvel élément ou PUT si il s’agit d’un élément qui existe déjà",
            "expression": "value='POST' or value='PUT'",
            "source": "http://esante.gouv.fr/ci-sis/fhir/StructureDefinition/CDS_BundleTransactionCreationMAJ"
          }
        ]
      },
      {
        "id": "Bundle.entry:practitionerRoleOrg.response",
        "path": "Bundle.entry.response",
        "max": "0"
      },
      {
        "id": "Bundle.entry:practitionerRolePro",
        "path": "Bundle.entry",
        "sliceName": "practitionerRolePro"
      },
      {
        "id": "Bundle.entry:practitionerRolePro.resource",
        "path": "Bundle.entry.resource",
        "min": 1,
        "type": [
          {
            "code": "Resource",
            "profile": [
              "https://apifhir.annuaire.sante.fr/ws-sync/exposed/structuredefinition/practitionerRole-professionalRole-rass"
            ]
          }
        ]
      },
      {
        "id": "Bundle.entry:practitionerRolePro.request.method",
        "path": "Bundle.entry.request.method",
        "constraint": [
          {
            "key": "req-met-5",
            "severity": "error",
            "human": "POST si il s’agit d’un nouvel élément ou PUT si il s’agit d’un élément qui existe déjà",
            "expression": "value='POST' or value='PUT'",
            "source": "Bundle"
          }
        ]
      },
      {
        "id": "Bundle.entry:practitionerRolePro.response",
        "path": "Bundle.entry.response",
        "max": "0"
      },
      {
        "id": "Bundle.entry:practitioner",
        "path": "Bundle.entry",
        "sliceName": "practitioner"
      },
      {
        "id": "Bundle.entry:practitioner.resource",
        "path": "Bundle.entry.resource",
        "min": 1,
        "type": [
          {
            "code": "Resource",
            "profile": [
              "http://interopsante.org/fhir/StructureDefinition/FrPractitioner"
            ]
          }
        ]
      },
      {
        "id": "Bundle.entry:practitioner.request.method",
        "path": "Bundle.entry.request.method",
        "constraint": [
          {
            "key": "req-met-6",
            "severity": "error",
            "human": "POST si il s’agit d’un nouvel élément ou PUT si il s’agit d’un élément qui existe déjà",
            "expression": "value='POST' or value='PUT'",
            "source": "Bundle"
          }
        ]
      },
      {
        "id": "Bundle.entry:practitioner.response",
        "path": "Bundle.entry.response",
        "max": "0"
      }
    ]
  }
}