@prefix fhir: <http://hl7.org/fhir/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

# - resource -------------------------------------------------------------------

<http://hl7.org/ehrs/uv/cmhaffr2/Requirements/CMHAFFR2-AIG.6> a fhir:Requirements ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:id [ fhir:v "CMHAFFR2-AIG.6"] ; # 
  fhir:meta [
     fhir:profile ( [
       fhir:v "http://hl7.org/ehrs/uv/cmhaffr2/StructureDefinition/FMFunction"^^xsd:anyURI ;
       fhir:link <http://hl7.org/ehrs/uv/cmhaffr2/StructureDefinition/FMFunction>
     ] )
  ] ; # 
  fhir:language [ fhir:v "en"] ; # 
  fhir:text [
     fhir:status [ fhir:v "extensions" ] ;
     fhir:div [ fhir:v "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n    \n    \n    \n    \n    <div id=\"requirements\"><b>Criteria <a href=\"https://hl7.org/fhir/versions.html#std-process\" title=\"Normative Content\" class=\"normative-flag\">N</a>:</b></div>\n    <table id=\"statements\" class=\"grid dict\">\n        \n        <tr>\n            <td style=\"padding-left: 4px;\">\n            AIG.6#01\n            </td>\n            <td style=\"padding-left: 4px;\">\n            SHALL\n            \n            \n            <span style=\"border-radius: 999px;margin: 2px 2px;font-size: 10px;display: inline-block;padding: 3px 5px;letter-spacing: 0.5px;line-height: 1;white-space: nowrap;background-color: #f3e5ff;color: #7b1fa2;border: 1px solid #d1a3ff;\">conditional</span>\n            \n            \n            </td>\n            <td style=\"padding-left: 4px;\" class=\"requirement\">\n                <p>IF the system uses generative AI THEN the system SHALL implement controls proportionate to the intended use to reduce generation of unsafe, misleading, fabricated, discriminatory, or privacy-violating content and SHALL define the actions taken when such content is detected.</p>\n\n                \n            </td>\n        </tr>\n        \n        <tr>\n            <td style=\"padding-left: 4px;\">\n            AIG.6#02\n            </td>\n            <td style=\"padding-left: 4px;\">\n            SHALL\n            \n            \n            <span style=\"border-radius: 999px;margin: 2px 2px;font-size: 10px;display: inline-block;padding: 3px 5px;letter-spacing: 0.5px;line-height: 1;white-space: nowrap;background-color: #f3e5ff;color: #7b1fa2;border: 1px solid #d1a3ff;\">conditional</span>\n            \n            \n            </td>\n            <td style=\"padding-left: 4px;\" class=\"requirement\">\n                <p>IF generative AI is used to provide health-related factual content or recommendations THEN the system SHALL ground the output in curated, version-controlled, and appropriately sourced content or another documented evidence process suitable to the intended use, and SHALL identify when the system cannot verify the requested information.</p>\n\n                \n            </td>\n        </tr>\n        \n        <tr>\n            <td style=\"padding-left: 4px;\">\n            AIG.6#03\n            </td>\n            <td style=\"padding-left: 4px;\">\n            SHALL\n            \n            \n            <span style=\"border-radius: 999px;margin: 2px 2px;font-size: 10px;display: inline-block;padding: 3px 5px;letter-spacing: 0.5px;line-height: 1;white-space: nowrap;background-color: #f3e5ff;color: #7b1fa2;border: 1px solid #d1a3ff;\">conditional</span>\n            \n            \n            </td>\n            <td style=\"padding-left: 4px;\" class=\"requirement\">\n                <p>IF an AI agent can execute external actions, write to a record, transmit data, purchase a service, or otherwise act on behalf of a user THEN the system SHALL limit the agent's authorized actions, present the action and material consequences to the user before execution when appropriate, and maintain an auditable record of the action request, authorization, execution, and result.</p>\n\n                \n            </td>\n        </tr>\n        \n        <tr>\n            <td style=\"padding-left: 4px;\">\n            AIG.6#04\n            </td>\n            <td style=\"padding-left: 4px;\">\n            SHOULD\n            \n            \n            <span style=\"border-radius: 999px;margin: 2px 2px;font-size: 10px;display: inline-block;padding: 3px 5px;letter-spacing: 0.5px;line-height: 1;white-space: nowrap;background-color: #f3e5ff;color: #7b1fa2;border: 1px solid #d1a3ff;\">conditional</span>\n            \n            \n            </td>\n            <td style=\"padding-left: 4px;\" class=\"requirement\">\n                <p>IF the system uses generative AI or an AI agent THEN the system SHOULD conduct scenario-based testing for prompt injection, jailbreaks, unsafe advice, disallowed actions, privacy leakage, and escalation to safe human or non-AI resources.</p>\n\n                \n            </td>\n        </tr>\n        \n        <tr>\n            <td style=\"padding-left: 4px;\">\n            AIG.6#05\n            </td>\n            <td style=\"padding-left: 4px;\">\n            MAY\n            \n            \n            <span style=\"border-radius: 999px;margin: 2px 2px;font-size: 10px;display: inline-block;padding: 3px 5px;letter-spacing: 0.5px;line-height: 1;white-space: nowrap;background-color: #f3e5ff;color: #7b1fa2;border: 1px solid #d1a3ff;\">conditional</span>\n            \n            \n            </td>\n            <td style=\"padding-left: 4px;\" class=\"requirement\">\n                <p>IF the system uses generative AI THEN the system MAY use retrieval-augmented generation or other grounding methods when they improve evidence traceability, provided the system validates source quality, freshness, and access controls.</p>\n\n                \n            </td>\n        </tr>\n        \n    </table>\n    \n</div>"^^rdf:XMLLiteral ]
  ] ; # 
  fhir:extension ( [
     fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"^^xsd:anyURI ] ;
     fhir:value [
       a fhir:code ;
       fhir:v "mobile"
     ]
  ] ) ; # 
  fhir:url [ fhir:v "http://hl7.org/ehrs/uv/cmhaffr2/Requirements/CMHAFFR2-AIG.6"^^xsd:anyURI] ; # 
  fhir:version [ fhir:v "2.0.1"] ; # 
  fhir:name [ fhir:v "AIG_6_Generative_AI_and_AI_Agent_Safety"] ; # 
  fhir:title [ fhir:v "AIG.6 Generative AI and AI Agent Safety (Function)"] ; # 
  fhir:status [ fhir:v "active"] ; # 
  fhir:date [ fhir:v "2026-11-18T11:24:54+00:00"^^xsd:dateTime] ; # 
  fhir:publisher [ fhir:v "HL7 International / Mobile Health"] ; # 
  fhir:contact ( [
     fhir:telecom ( [
       fhir:system [ fhir:v "url" ] ;
       fhir:value [ fhir:v "http://www.hl7.org/Special/committees/mobile" ]
     ] )
  ] ) ; # 
  fhir:description [ fhir:v "This category applies only where the application generates content or acts on a user's behalf. Generative and agentic functions introduce content, prompt-injection, and action risks that deterministic application logic does not."] ; # 
  fhir:jurisdiction ( [
     fhir:coding ( [
       fhir:system [ fhir:v "http://unstats.un.org/unsd/methods/m49/m49.htm"^^xsd:anyURI ] ;
       fhir:code [ fhir:v "001" ] ;
       fhir:display [ fhir:v "World" ]
     ] )
  ] ) ; # 
  fhir:statement ( [
     fhir:extension ( [
       fhir:url [ fhir:v "http://hl7.org/ehrs/uv/cmhaffr2/StructureDefinition/requirements-dependent"^^xsd:anyURI ] ;
       fhir:value [
         a fhir:boolean ;
         fhir:v false
       ]
     ] ) ;
     fhir:key [ fhir:v "CMHAFFR2-AIG.6-01" ] ;
     fhir:label [ fhir:v "AIG.6#01" ] ;
     fhir:conformance ( [ fhir:v "SHALL" ] ) ;
     fhir:conditionality [ fhir:v true ] ;
     fhir:requirement [ fhir:v "IF the system uses generative AI THEN the system SHALL implement controls proportionate to the intended use to reduce generation of unsafe, misleading, fabricated, discriminatory, or privacy-violating content and SHALL define the actions taken when such content is detected." ]
  ] [
     fhir:extension ( [
       fhir:url [ fhir:v "http://hl7.org/ehrs/uv/cmhaffr2/StructureDefinition/requirements-dependent"^^xsd:anyURI ] ;
       fhir:value [
         a fhir:boolean ;
         fhir:v false
       ]
     ] ) ;
     fhir:key [ fhir:v "CMHAFFR2-AIG.6-02" ] ;
     fhir:label [ fhir:v "AIG.6#02" ] ;
     fhir:conformance ( [ fhir:v "SHALL" ] ) ;
     fhir:conditionality [ fhir:v true ] ;
     fhir:requirement [ fhir:v "IF generative AI is used to provide health-related factual content or recommendations THEN the system SHALL ground the output in curated, version-controlled, and appropriately sourced content or another documented evidence process suitable to the intended use, and SHALL identify when the system cannot verify the requested information." ]
  ] [
     fhir:extension ( [
       fhir:url [ fhir:v "http://hl7.org/ehrs/uv/cmhaffr2/StructureDefinition/requirements-dependent"^^xsd:anyURI ] ;
       fhir:value [
         a fhir:boolean ;
         fhir:v false
       ]
     ] ) ;
     fhir:key [ fhir:v "CMHAFFR2-AIG.6-03" ] ;
     fhir:label [ fhir:v "AIG.6#03" ] ;
     fhir:conformance ( [ fhir:v "SHALL" ] ) ;
     fhir:conditionality [ fhir:v true ] ;
     fhir:requirement [ fhir:v "IF an AI agent can execute external actions, write to a record, transmit data, purchase a service, or otherwise act on behalf of a user THEN the system SHALL limit the agent's authorized actions, present the action and material consequences to the user before execution when appropriate, and maintain an auditable record of the action request, authorization, execution, and result." ]
  ] [
     fhir:extension ( [
       fhir:url [ fhir:v "http://hl7.org/ehrs/uv/cmhaffr2/StructureDefinition/requirements-dependent"^^xsd:anyURI ] ;
       fhir:value [
         a fhir:boolean ;
         fhir:v false
       ]
     ] ) ;
     fhir:key [ fhir:v "CMHAFFR2-AIG.6-04" ] ;
     fhir:label [ fhir:v "AIG.6#04" ] ;
     fhir:conformance ( [ fhir:v "SHOULD" ] ) ;
     fhir:conditionality [ fhir:v true ] ;
     fhir:requirement [ fhir:v "IF the system uses generative AI or an AI agent THEN the system SHOULD conduct scenario-based testing for prompt injection, jailbreaks, unsafe advice, disallowed actions, privacy leakage, and escalation to safe human or non-AI resources." ]
  ] [
     fhir:extension ( [
       fhir:url [ fhir:v "http://hl7.org/ehrs/uv/cmhaffr2/StructureDefinition/requirements-dependent"^^xsd:anyURI ] ;
       fhir:value [
         a fhir:boolean ;
         fhir:v false
       ]
     ] ) ;
     fhir:key [ fhir:v "CMHAFFR2-AIG.6-05" ] ;
     fhir:label [ fhir:v "AIG.6#05" ] ;
     fhir:conformance ( [ fhir:v "MAY" ] ) ;
     fhir:conditionality [ fhir:v true ] ;
     fhir:requirement [ fhir:v "IF the system uses generative AI THEN the system MAY use retrieval-augmented generation or other grounding methods when they improve evidence traceability, provided the system validates source quality, freshness, and access controls." ]
  ] ) . # 

# -------------------------------------------------------------------------------------

