{
  "resourceType": "StructureDefinition",
  "id": "logiclibrary",
  "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm",
      "valueInteger": 3
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
      "valueCode": "cds"
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
      "valueCode": "trial-use"
    }
  ],
  "url": "http://hl7.org/fhir/StructureDefinition/logiclibrary",
  "version": "4.6.0",
  "name": "LogicLibrary",
  "title": "Logic Library",
  "status": "draft",
  "experimental": false,
  "date": "2019-06-06",
  "publisher": "Health Level Seven, Inc. - CDS WG",
  "contact": [
    {
      "telecom": [
        {
          "system": "url",
          "value": "http://hl7.org/special/committees/DSS"
        }
      ]
    }
  ],
  "description": "The logic library profile sets the minimum expectations for computable and/or executable libraries, including support for terminology and dependency declaration, parameters, and data requirements",
  "jurisdiction": [
    {
      "coding": [
        {
          "system": "http://unstats.un.org/unsd/methods/m49/m49.htm",
          "code": "001",
          "display": "World"
        }
      ]
    }
  ],
  "fhirVersion": "4.6.0",
  "mapping": [
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    },
    {
      "identity": "workflow",
      "uri": "http://hl7.org/fhir/workflow",
      "name": "Workflow Pattern"
    },
    {
      "identity": "w5",
      "uri": "http://hl7.org/fhir/fivews",
      "name": "FiveWs Pattern Mapping"
    },
    {
      "identity": "objimpl",
      "uri": "http://hl7.org/fhir/object-implementation",
      "name": "Object Implementation Information"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "Library",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/shareablelibrary",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Library",
        "path": "Library",
        "mustSupport": false
      },
      {
        "id": "Library.extension:directReferenceCode",
        "path": "Library.extension",
        "sliceName": "directReferenceCode",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Library.type",
        "path": "Library.type",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "patternCodeableConcept": {
          "coding": [
            {
              "system": "http://terminology.hl7.org/CodeSystem/library-type",
              "code": "module-definition"
            }
          ]
        }
      },
      {
        "id": "Library.subject[x]",
        "path": "Library.subject[x]",
        "mustSupport": true
      },
      {
        "id": "Library.relatedArtifact",
        "path": "Library.relatedArtifact",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "type"
            }
          ],
          "rules": "open"
        },
        "mustSupport": true
      },
      {
        "id": "Library.relatedArtifact:dependency",
        "path": "Library.relatedArtifact",
        "sliceName": "dependency",
        "min": 0,
        "max": "*",
        "mustSupport": true
      },
      {
        "id": "Library.relatedArtifact:dependency.type",
        "path": "Library.relatedArtifact.type",
        "type": [
          {
            "code": "code"
          }
        ],
        "fixedCode": "depends-on",
        "mustSupport": true
      },
      {
        "id": "Library.relatedArtifact:dependency.resource",
        "path": "Library.relatedArtifact.resource",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "canonical",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/CodeSystem",
              "http://hl7.org/fhir/StructureDefinition/ValueSet",
              "http://hl7.org/fhir/StructureDefinition/Library"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Library.parameter",
        "path": "Library.parameter",
        "mustSupport": true
      },
      {
        "id": "Library.dataRequirement",
        "path": "Library.dataRequirement",
        "mustSupport": true
      },
      {
        "id": "Library.content",
        "path": "Library.content",
        "mustSupport": true
      },
      {
        "id": "Library.content.contentType",
        "path": "Library.content.contentType",
        "mustSupport": true
      },
      {
        "id": "Library.content.data",
        "path": "Library.content.data",
        "mustSupport": true
      }
    ]
  }
}