CDC National Healthcare Safety Network (NHSN) Digital Quality Measures (dQM) Content Package IG
1.0.0 - Release 1

CDC National Healthcare Safety Network (NHSN) Digital Quality Measures (dQM) Content Package IG - Downloaded Version 1.0.0 See the Directory of published versions

## : NHSN Helpers - TTL Representation

Page standards status: Trial-use | Maturity Level: 1

Raw ttl | Download

    @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 -------------------------------------------------------------------

     a fhir:Library ;
      fhir:nodeRole fhir:treeRoot ;
      fhir:id [ fhir:v "NHSNHelpers"] ; #
      fhir:text [
    fhir:status [ fhir:v "extensions" ] ;
    fhir:div "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n<div>\n    <table class=\"grid dict\">\n        \n        \n\n        \n        \n        <tr>\n            <th scope=\"row\"><b>Id: </b></th>\n            <td style=\"padding-left: 4px;\">NHSNHelpers</td>\n        </tr>\n        \n\n        \n        \n        <tr>\n            <th scope=\"row\"><b>Version: </b></th>\n            <td style=\"padding-left: 4px;\">1.0.0</td>\n        </tr>\n        \n\n        \n        <tr>\n            <th scope=\"row\"><b>Url: </b></th>\n            <td style=\"padding-left: 4px;\"><a href=\"Library-NHSNHelpers.html\">NHSNHelpers</a></td>\n        </tr>\n        \n\n        \n\n        \n\n        \n        <tr>\n            <th scope=\"row\"><b>Status: </b></th>\n            <td style=\"padding-left: 4px;\">draft</td>\n        </tr>\n        \n\n        \n\n        \n        <tr>\n            <th scope=\"row\"><b>Type: </b></th>\n            <td style=\"padding-left: 4px;\">\n                \n                    \n                        \n                        <p style=\"margin-bottom: 5px;\">\n                            <b>system: </b> <span><a href=\"http://terminology.hl7.org/6.5.0/CodeSystem-library-type.html\">http://terminology.hl7.org/CodeSystem/library-type</a></span>\n                        </p>\n                        \n                        \n                        <p style=\"margin-bottom: 5px;\">\n                            <b>code: </b> <span>logic-library</span>\n                        </p>\n                        \n                        \n                    \n                \n                \n            </td>\n        </tr>\n        \n\n        \n\n        \n        <tr>\n            <th scope=\"row\"><b>Date: </b></th>\n            <td style=\"padding-left: 4px;\">2025-09-15 12:53:39-0400</td>\n        </tr>\n        \n\n        \n        <tr>\n            <th scope=\"row\"><b>Publisher: </b></th>\n            <td style=\"padding-left: 4px;\">CDC National Healthcare Safety Network (NHSN)</td>\n        </tr>\n        \n\n        \n\n        \n\n        \n\n        \n\n        \n        <tr>\n            <th scope=\"row\"><b>Jurisdiction: </b></th>\n            <td style=\"padding-left: 4px;\">US</td>\n        </tr>\n        \n\n        \n\n        \n\n        \n\n        \n\n        \n\n        \n\n        \n        <tr>\n            <th scope=\"row\"><b>Related Artifacts: </b></th>\n            <td style=\"padding-left: 4px;\">\n                \n                \n                \n                <p><b>Dependencies</b></p>\n                <ul>\n                  \n                    <li><a href=\"http://fhir.org/guides/cqf/common/4.0.1/4.0.1/Library-FHIR-ModelInfo.html\">http://fhir.org/guides/cqf/common/Library/FHIR-ModelInfo|4.0.1</a></li>\n                  \n                    <li><code>http://www.cdc.gov/nhsn/fhirportal/dqm/ig/Library/FHIRHelpers|4.0.2</code></li>\n                  \n                </ul>\n                \n                \n                \n                \n                \n            </td>\n        </tr>\n        \n\n        \n        <tr>\n          <th scope=\"row\"><b>Parameters: </b></th>\n          <td style=\"padding-left: 4px;\">\n            <table class=\"grid-dict\">\n              <tr><th><b>Name</b></th><th><b>Type</b></th><th><b>Min</b></th><th><b>Max</b></th><th><b>In/Out</b></th></tr>\n              \n                <tr><th>Patient</th><th>Patient</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n            </table>\n          </td>\n        </tr>\n        \n\n        \n        <tr>\n          <th scope=\"row\"><b>Data Requirements:</b></th>\n          <td style=\"padding-left: 4px;\">\n            <table class=\"grid-dict\">\n              <tr><th><b>Type</b></th><th><b>Profile</b></th><th><b>MS</b></th><th><b>Code Filter</b></th></tr>\n              \n                <tr>\n                  <th>Patient</th>\n                  <th>http://hl7.org/fhir/StructureDefinition/Patient</th>\n                  <th/>\n                  <th>\n                    \n                  </th>\n                </tr>\n              \n                <tr>\n                  <th>Location</th>\n                  <th>http://hl7.org/fhir/StructureDefinition/Location</th>\n                  <th>;</th>\n                  <th>\n                    \n                  </th>\n                </tr>\n              \n            </table>\n          </td>\n        </tr>\n        \n\n        \n        \n        <tr>\n          <td colspan=\"2\">\n            <table>\n              <tr><th><a id=\"cql-content\"><b>Content: </b></a> text/cql</th></tr>\n              <tr><td><pre><code class=\"language-cql\">library NHSNHelpers version '0.0.002'#xD;\n#xD;\nusing FHIR version '4.0.1'#xD;\n#xD;\ninclude FHIRHelpers version '4.0.2'#xD;\n#xD;\ncontext Patient#xD;\n#xD;\ndefine function \"Normalize Interval\"(choice Choice&lt;FHIR.dateTime, FHIR.Period, FHIR.Timing, FHIR.instant, FHIR.string, FHIR.Age, FHIR.Range&gt;):#xD;\n  case#xD;\n	  when choice is FHIR.dateTime then#xD;\n    	Interval[FHIRHelpers.ToDateTime(choice as FHIR.dateTime), FHIRHelpers.ToDateTime(choice as FHIR.dateTime)]#xD;\n		when choice is FHIR.Period then#xD;\n  		FHIRHelpers.ToInterval(choice as FHIR.Period)#xD;\n		when choice is FHIR.instant then#xD;\n			Interval[FHIRHelpers.ToDateTime(choice as FHIR.instant), FHIRHelpers.ToDateTime(choice as FHIR.instant)]#xD;\n		when choice is FHIR.Age then#xD;\n		  Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(choice as FHIR.Age),#xD;\n			  FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(choice as FHIR.Age) + 1 year)#xD;\n		when choice is FHIR.Range then#xD;\n		  Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((choice as FHIR.Range).low),#xD;\n			  FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((choice as FHIR.Range).high) + 1 year)#xD;\n		when choice is FHIR.Timing then#xD;\n		  Message(null as Interval&lt;DateTime&gt;, true, '1', 'Error', 'Cannot compute a single interval from a Timing type')#xD;\n    when choice is FHIR.string then#xD;\n      Message(null as Interval&lt;DateTime&gt;, true, '1', 'Error', 'Cannot compute an interval from a String value')#xD;\n		else#xD;\n			null as Interval&lt;DateTime&gt;#xD;\n	end#xD;\n#xD;\ndefine function \"ToDateInterval\"(period FHIR.Period):#xD;\n  Interval[date from period.start, date from period.end]#xD;\n#xD;\ndefine function \"GetLocation\"(reference Reference ):#xD;\n  singleton from (#xD;\n	[Location] Locations#xD;\n		where Locations.id = GetId(reference.reference)#xD;\n  )#xD;\n#xD;\ndefine function \"GetId\"(uri String ):#xD;\n  Last(Split(uri, '/'))</code></pre></td></tr>\n            </table>\n          </td>\n        </tr>\n        \n        \n        \n    </table>\n</div>\n</div>"^^rdf:XMLLiteral
      ] ; #
      fhir:contained ( [
    a fhir:Parameters ;
    fhir:id [ fhir:v "options" ] ;
        ( fhir:parameter [
    fhir:name [ fhir:v "translatorVersion" ] ;
    fhir:value [
    a fhir:string ;
    fhir:v "3.25.0"       ]     ] [
    fhir:name [ fhir:v "option" ] ;
    fhir:value [
    a fhir:string ;
    fhir:v "EnableDateRangeOptimization"       ]     ] [
    fhir:name [ fhir:v "option" ] ;
    fhir:value [
    a fhir:string ;
    fhir:v "EnableAnnotations"       ]     ] [
    fhir:name [ fhir:v "option" ] ;
    fhir:value [
    a fhir:string ;
    fhir:v "EnableLocators"       ]     ] [
    fhir:name [ fhir:v "option" ] ;
    fhir:value [
    a fhir:string ;
    fhir:v "DisableListDemotion"       ]     ] [
    fhir:name [ fhir:v "option" ] ;
    fhir:value [
    a fhir:string ;
    fhir:v "DisableListPromotion"       ]     ] [
    fhir:name [ fhir:v "analyzeDataRequirements" ] ;
    fhir:value [
    a fhir:boolean ;
    fhir:v false       ]     ] [
    fhir:name [ fhir:v "collapseDataRequirements" ] ;
    fhir:value [
    a fhir:boolean ;
    fhir:v true       ]     ] [
    fhir:name [ fhir:v "compatibilityLevel" ] ;
    fhir:value [
    a fhir:string ;
    fhir:v "1.5"       ]     ] [
    fhir:name [ fhir:v "enableCqlOnly" ] ;
    fhir:value [
    a fhir:boolean ;
    fhir:v false       ]     ] [
    fhir:name [ fhir:v "errorLevel" ] ;
    fhir:value [
    a fhir:string ;
    fhir:v "Info"       ]     ] [
    fhir:name [ fhir:v "signatureLevel" ] ;
    fhir:value [
    a fhir:string ;
    fhir:v "Overloads"       ]     ] [
    fhir:name [ fhir:v "validateUnits" ] ;
    fhir:value [
    a fhir:boolean ;
    fhir:v true       ]     ] [
    fhir:name [ fhir:v "verifyOnly" ] ;
    fhir:value [
    a fhir:boolean ;
    fhir:v false       ]     ] )
      ] ) ; #
      fhir:extension ( [
    fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-cqlOptions"^^xsd:anyURI ] ;
    fhir:value [
    a fhir:Reference ;
    fhir:reference [ fhir:v "#options" ]     ]
      ] ) ; #
      fhir:url [ fhir:v "http://www.cdc.gov/nhsn/fhirportal/dqm/ig/Library/NHSNHelpers"^^xsd:anyURI] ; #
      fhir:version [ fhir:v "1.0.0"] ; #
      fhir:name [ fhir:v "NHSNHelpers"] ; #
      fhir:status [ fhir:v "draft"] ; #
      fhir:type [
        ( fhir:coding [
    fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/library-type"^^xsd:anyURI ] ;
    fhir:code [ fhir:v "logic-library" ]     ] )
      ] ; #
      fhir:date [ fhir:v "2025-09-15T12:53:39-04:00"^^xsd:dateTime] ; #
      fhir:publisher [ fhir:v "CDC National Healthcare Safety Network (NHSN)"] ; #
      fhir:contact ( [
    fhir:name [ fhir:v "CDC National Healthcare Safety Network (NHSN)" ] ;
        ( fhir:telecom [
    fhir:system [ fhir:v "url" ] ;
    fhir:value [ fhir:v "http://www.cdc.gov/nhsn" ]     ] [
    fhir:system [ fhir:v "email" ] ;
    fhir:value [ fhir:v "nhsn@cdc.gov" ]     ] )
      ] ) ; #
      fhir:jurisdiction ( [
        ( fhir:coding [
    fhir:system [ fhir:v "urn:iso:std:iso:3166"^^xsd:anyURI ] ;
    fhir:code [ fhir:v "US" ]     ] )
      ] ) ; #
      fhir:relatedArtifact ( [
    fhir:type [ fhir:v "depends-on" ] ;
    fhir:display [ fhir:v "FHIR model information" ] ;
    fhir:resource [
    fhir:v "http://fhir.org/guides/cqf/common/Library/FHIR-ModelInfo|4.0.1"^^xsd:anyURI ;
    fhir:link <http://fhir.org/guides/cqf/common/Library/FHIR-ModelInfo|4.0.1>     ]
      ] [
    fhir:type [ fhir:v "depends-on" ] ;
    fhir:display [ fhir:v "Library FHIRHelpers" ] ;
    fhir:resource [
    fhir:v "http://www.cdc.gov/nhsn/fhirportal/dqm/ig/Library/FHIRHelpers|4.0.2"^^xsd:anyURI ;
    fhir:link <http://www.cdc.gov/nhsn/fhirportal/dqm/ig/Library/FHIRHelpers|4.0.2>     ]
      ] ) ; #
      fhir:parameter ( [
    fhir:name [ fhir:v "Patient" ] ;
    fhir:use [ fhir:v "out" ] ;
    fhir:min [ fhir:v 0 ] ;
    fhir:max [ fhir:v "1" ] ;
    fhir:type [ fhir:v "Patient" ]
      ] ) ; #
      fhir:dataRequirement ( [
    fhir:type [ fhir:v "Patient" ] ;
        ( fhir:profile [
    fhir:v "http://hl7.org/fhir/StructureDefinition/Patient"^^xsd:anyURI ;
    fhir:link <http://hl7.org/fhir/StructureDefinition/Patient>     ] )
      ] [
    fhir:type [ fhir:v "Location" ] ;
        ( fhir:profile [
    fhir:v "http://hl7.org/fhir/StructureDefinition/Location"^^xsd:anyURI ;
    fhir:link <http://hl7.org/fhir/StructureDefinition/Location>     ] ) ;
        ( fhir:mustSupport [ fhir:v "id" ] )
      ] ) ; #
      fhir:content ( [
    fhir:contentType [ fhir:v "text/cql" ] ;
    fhir:data [ fhir:v " "^^xsd:base64Binary ]
      ] ) . #