Updated cql docs (#3175)

This commit is contained in:
JP 2021-11-19 07:02:23 -07:00 committed by GitHub
parent 175958de5e
commit e3a5aaf298
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 1114 additions and 6 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

View File

@ -0,0 +1,528 @@
<svg host="65bd71144e" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="1562px" height="1162px" viewBox="-0.5 -0.5 1562 1162" content="&lt;mxfile scale=&quot;2&quot; border=&quot;0&quot;&gt;&lt;diagram id=&quot;To3equ_uzXX-298yew6h&quot; name=&quot;Page-1&quot;&gt;5Vttc5s4EP41nul9uA4gwPhjYidNbtxpLs5Nrx9lkG1NBGKE7Nj99SeBwIDk2m0gdi/pTINWL8Czy+6j1WYAxvH2E4Pp6jONEBk4VrQdgMnAcWzHAuKXlOwKiWu7hWDJcKQG7QUz/B0poaWkaxyhrDGQU0o4TpvCkCYJCnlDBhmjL81hC0qad03hEmmCWQiJLv2KI74qpIFn7eV3CC9X5Z1tS/XMYfi8ZHSdqPsNHHCb/xTdMSzXUuOzFYzoS00EbgZgzCjlxVW8HSMisS1hK+bdHuitnpuhhJ8yYVhM2ECyVq8+oeEzYkI2pgmHOJHX+ZPyXYlO/n5IrmANwPXLCnM0S2Eoe1+EPQjZisdEtGxxSeAckQeaYY5pImSheDKxJrjeIMaxgHzaGsCpXAESvJQtgha8NvhKieeUcxqLjgUmZEwJZfmjgYUn/wl5xhl9RrUeP/+RM8R71eTFj5Dr0Ck05b3RtiZSUH5CNEac7cQQ1RsorSqrt4eq/bK3Ic9VslXNftyREkJlt8tq6b3uxIVSn1mVwNV0+RnBbM3QQBrBrVTp39NcsXFKE/GWmaZZ8Z68qb4mjomY1wJdiUp9aeotNRbjKJK3MdpL06KkhmbqoeyyXfgI2+tGU7bfVFVg0JRl0JTThaJ8TVF3ou0TCf1cfG7+Ul59eEQZXbNQqu8Jzonwh85Yqg+Gq73sD02HwqWk8jLcESxAZeD4Nzov4J/OK0Hlxr6suVim1ETWrRYc4DW0UH0cL3Wnq2uhcrevUkOgqeGJxiHkQjZDbPNax7eiDH+XPpSo8V2YrdU0W8fSAQMmsw26AGykATZLGU6WQvYVzcX/V2mqAof0I5eHHjgjeqVp19C7hhmSlkbQJYLlnxMsWwPrS4oYzCmCYz0wuhEEkQmPaH0YOC6S4yBHf8ZFwNOd4k/B2QV6o+PoubYBPq8L9BwNvSLy3xQ40Vd6tj7w8XR8bJN5uV3gAzR8bu/uH4WkFnInkGY/DMrtrvHjP5OcaV3nAQQyEaYN4fmtkQatkAFGBqQ9A9J+F0jrnHS2yziKC4AN+D4xmGQwlB/6BYDXNlMjeKbPuBPwPA28J8RinAjmvdwploJNpvjhDgtnKQxQEvA8IkeoZpQFj7zZpgJqgfP5YXa9M9qop8ea6VpsY0y4Svwr+O8FRtvfmn+7rRj/pvzb033DXw9XMqLf4TliiYjn57fMtgNwDXHKGMdBFwjpG0UNEJREVzLhJQ2OwCzDYRMDtMX8XwnXR0+1vtV6JluFZN7YlY1EPGhtkmx+q/ftp+WtxrwHxLB4U5kD+DEVVXG0YQscsiUqmZAah6JGrk5XVWPPrmuilDFEBH/cNDN8JvWoOzxQnPC9JXjOAR9VLlG8j5rl1FJu7YWGrYXalKYAQVtIqBnuasNSOSA7/MBg1NpcW9aPn6tM2prHi4viCfamW+ngNGvWc43vyJrLpM+FWDPwWsbR9lenWnPl/MqFhpdhzc4w6NWafZ01qD1WspTx+tyBq02pjBssk4F1scHyD21Ac3ZPLmIHCpwTAOprB+rrvjDnPm3CWeP7Zc7j7MC5rVMOAAzAOQbguiDrvp60NQJ3u8LsUSyO0cbA4y8Hy/bm3IBl0BeUejp3iudi27jLE7jSmV4sbsA+jtuoJ9zKAFc/vrl6uNfRupl+NmSJitObM+Pn+Mfx62u/PdT3fRoeNR5INzKrfZwEVrzvAAmMbjE5mh6vszj3svYffvvwwm7p4lTG1mZSdvtM8wBj+wWSZDs6S3q8mT0JSf7FtLUukM6rAZr6Pv1omaEMf5fHokrPilSKxb3rgTepNK99KFUliZo8qA5660ZSWO7Bj8r66DaRdTpRfGsCXSwy9FrFDHXfb/ZhMo5OZA7xzA5LS8QaHNawJ4cV6McFGh5V0m/NyO6awfBZbvyOAbNHMS9zIDi96w4y/4TEv4lbdFGLEug+vrAvawI5lJ9/GKJMHt9N4c7AJ15fh3KgbugnqlC6UEGLKruOp6nASJW7KDMJ9OOD39Js35ASB4bKnMJsi+3rvQxAC5ifD97HKUGxeM/8ULqPUqqLNGFgOCKoSgW63iYHJ6QMuzZhdcRSkMse7Nk50Q13gp++W+4dvwgzFKpSzoQy+Yp9VD65hoo9046vCxjLdeun2OYCscuon+wA7uBAevgtAtfoUGq1cr/vxtuanIXdl7cY6Tx3TBmqol9MozV5R9ibEsLG6u0usD8hKfIbkDUTZr2Z6/+D35oqA02QdVEYONL5lCp8q1dXvlNm61iGzVlf37tdGuvPBLlfSLoYMl0aaCcnXUzRyFj88gsIieb+r56KjNb+T8vAzX8=&lt;/diagram&gt;&lt;/mxfile&gt;" style="background-color: rgb(255, 255, 255);">
<defs/>
<g>
<rect x="0" y="180" width="1080" height="980" fill="#f5f5f5" stroke="#666666" stroke-width="2" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)scale(2)">
<switch>
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-end; justify-content: unsafe flex-start; width: 538px; height: 1px; padding-top: 87px; margin-left: 2px;">
<div style="box-sizing: border-box; font-size: 0; text-align: left; ">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #333333; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
Docker Container
</div>
</div>
</div>
</foreignObject>
<text x="2" y="87" fill="#333333" font-family="Helvetica" font-size="12px">
Docker Container
</text>
</switch>
</g>
<rect x="160" y="0" width="1000" height="40" fill="none" stroke="none" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)scale(2)">
<switch>
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 498px; height: 1px; padding-top: 10px; margin-left: 81px;">
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
<div style="display: inline-block; font-size: 15px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; font-weight: bold; white-space: normal; word-wrap: normal; ">
Measure / CQL Components
</div>
</div>
</div>
</foreignObject>
<text x="330" y="15" fill="#000000" font-family="Helvetica" font-size="15px" text-anchor="middle" font-weight="bold">
Measure / CQL Components
</text>
</switch>
</g>
<path d="M 310 950 C 310 933.43 348.06 920 395 920 C 417.54 920 439.16 923.16 455.1 928.79 C 471.04 934.41 480 942.04 480 950 L 480 1090 C 480 1106.57 441.94 1120 395 1120 C 348.06 1120 310 1106.57 310 1090 Z" fill="#ffffff" stroke="#000000" stroke-width="2" stroke-miterlimit="10" pointer-events="all"/>
<path d="M 480 950 C 480 966.57 441.94 980 395 980 C 348.06 980 310 966.57 310 950" fill="none" stroke="#000000" stroke-width="2" stroke-miterlimit="10" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)scale(2)">
<switch>
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 83px; height: 1px; padding-top: 523px; margin-left: 156px;">
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
H2
<br/>
(Resource Tables, Cache Tables)
</div>
</div>
</div>
</foreignObject>
<text x="198" y="526" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">
H2...
</text>
</switch>
</g>
<rect x="40" y="240" width="60" height="560" fill="#ffffff" stroke="#000000" stroke-width="2" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)scale(2)rotate(-90 35 260)">
<switch>
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 278px; height: 1px; padding-top: 260px; margin-left: -104px;">
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
Tomcat Server
</div>
</div>
</div>
</foreignObject>
<text x="35" y="264" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">
Tomcat Server
</text>
</switch>
</g>
<rect x="100" y="240" width="60" height="560" fill="#ffffff" stroke="#000000" stroke-width="2" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)scale(2)rotate(-90 65 260)">
<switch>
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 278px; height: 1px; padding-top: 260px; margin-left: -74px;">
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
Spring Web App Context
</div>
</div>
</div>
</foreignObject>
<text x="65" y="264" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">
Spring Web App Context
</text>
</switch>
</g>
<rect x="160" y="240" width="60" height="560" fill="#ffffff" stroke="#000000" stroke-width="2" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)scale(2)rotate(-90 95 260)">
<switch>
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 278px; height: 1px; padding-top: 260px; margin-left: -44px;">
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
BaseServlet
</div>
</div>
</div>
</foreignObject>
<text x="95" y="264" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">
BaseServlet
</text>
</switch>
</g>
<rect x="220" y="240" width="820" height="100" fill="#ffffff" stroke="#000000" stroke-width="2" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)scale(2)">
<switch>
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 408px; height: 1px; padding-top: 145px; margin-left: 111px;">
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
Operation Providers ($evaluate-measure)
</div>
</div>
</div>
</foreignObject>
<text x="315" y="149" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">
Operation Providers ($evaluate-measure)
</text>
</switch>
</g>
<rect x="220" y="340" width="260" height="80" fill="#ffffff" stroke="#000000" stroke-width="2" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)scale(2)">
<switch>
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 128px; height: 1px; padding-top: 190px; margin-left: 111px;">
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
CQL Evaluator
</div>
</div>
</div>
</foreignObject>
<text x="175" y="194" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">
CQL Evaluator
</text>
</switch>
</g>
<rect x="440" y="620" width="300" height="120" fill="#ffffff" stroke="#000000" stroke-width="2" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)scale(2)">
<switch>
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 148px; height: 1px; padding-top: 340px; margin-left: 221px;">
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
FHIR Resource Daos
<br/>
(Resource
<br/>
CRUD + Searches)
</div>
</div>
</div>
</foreignObject>
<text x="295" y="344" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">
FHIR Resource Daos...
</text>
</switch>
</g>
<rect x="220" y="620" width="220" height="120" fill="#ffffff" stroke="#000000" stroke-width="2" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)scale(2)">
<switch>
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 108px; height: 1px; padding-top: 340px; margin-left: 111px;">
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
System Dao
<br/>
(Transactions)
</div>
</div>
</div>
</foreignObject>
<text x="165" y="344" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">
System Dao...
</text>
</switch>
</g>
<rect x="740" y="620" width="300" height="120" fill="#ffffff" stroke="#000000" stroke-width="2" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)scale(2)">
<switch>
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 148px; height: 1px; padding-top: 340px; margin-left: 371px;">
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
Terminology Service
<br/>
(Hierarchical Code Searches, Expansion)
</div>
</div>
</div>
</foreignObject>
<text x="445" y="344" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">
Terminology Service...
</text>
</switch>
</g>
<path d="M 760 950 C 760 933.43 798.06 920 845 920 C 867.54 920 889.16 923.16 905.1 928.79 C 921.04 934.41 930 942.04 930 950 L 930 1090 C 930 1106.57 891.94 1120 845 1120 C 798.06 1120 760 1106.57 760 1090 Z" fill="#ffffff" stroke="#000000" stroke-width="2" stroke-miterlimit="10" pointer-events="all"/>
<path d="M 930 950 C 930 966.57 891.94 980 845 980 C 798.06 980 760 966.57 760 950" fill="none" stroke="#000000" stroke-width="2" stroke-miterlimit="10" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)scale(2)">
<switch>
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 83px; height: 1px; padding-top: 523px; margin-left: 381px;">
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
Lucene
<br/>
(Termnology Index)
</div>
</div>
</div>
</foreignObject>
<text x="423" y="526" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">
Lucene...
</text>
</switch>
</g>
<rect x="220" y="740" width="820" height="60" fill="#ffffff" stroke="#000000" stroke-width="2" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)scale(2)">
<switch>
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 408px; height: 1px; padding-top: 385px; margin-left: 111px;">
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
JPA (Hibernate)
</div>
</div>
</div>
</foreignObject>
<text x="315" y="389" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">
JPA (Hibernate)
</text>
</switch>
</g>
<path d="M 630 800 L 630 820 Q 630 840 650 840 L 826 840 Q 846 840 845.75 860 L 845.16 907.26" fill="none" stroke="#000000" stroke-width="2" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 845.03 917.76 L 838.2 903.68 L 845.16 907.26 L 852.2 903.85 Z" fill="#000000" stroke="#000000" stroke-width="2" stroke-miterlimit="10" pointer-events="all"/>
<path d="M 630 800 L 630 820 Q 630 840 610 840 L 416 840 Q 396 840 395.75 860 L 395.16 907.26" fill="none" stroke="#000000" stroke-width="2" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 395.03 917.76 L 388.2 903.68 L 395.16 907.26 L 402.2 903.85 Z" fill="#000000" stroke="#000000" stroke-width="2" stroke-miterlimit="10" pointer-events="all"/>
<rect x="740" y="340" width="300" height="80" fill="#ffffff" stroke="#000000" stroke-width="2" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)scale(2)">
<switch>
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 148px; height: 1px; padding-top: 190px; margin-left: 371px;">
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
CQL Engine
</div>
</div>
</div>
</foreignObject>
<text x="445" y="194" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">
CQL Engine
</text>
</switch>
</g>
<rect x="480" y="340" width="260" height="80" fill="#ffffff" stroke="#000000" stroke-width="2" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)scale(2)">
<switch>
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 128px; height: 1px; padding-top: 190px; margin-left: 241px;">
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
CQL Translator
</div>
</div>
</div>
</foreignObject>
<text x="305" y="194" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">
CQL Translator
</text>
</switch>
</g>
<rect x="800" y="500" width="240" height="120" fill="#ffffff" stroke="#000000" stroke-width="2" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)scale(2)">
<switch>
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 280px; margin-left: 401px;">
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
JPA
<br/>
TerminologyProvider
</div>
</div>
</div>
</foreignObject>
<text x="460" y="284" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">
JPA...
</text>
</switch>
</g>
<rect x="640" y="500" width="160" height="120" fill="#ffffff" stroke="#000000" stroke-width="2" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)scale(2)">
<switch>
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 280px; margin-left: 321px;">
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
JPA
<br/>
FhirRetrieve
<br/>
Provider
</div>
</div>
</div>
</foreignObject>
<text x="360" y="284" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">
JPA...
</text>
</switch>
</g>
<rect x="460" y="500" width="180" height="120" fill="#ffffff" stroke="#000000" stroke-width="2" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)scale(2)">
<switch>
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 88px; height: 1px; padding-top: 280px; margin-left: 231px;">
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
LibraryContent
<br/>
Provider
</div>
</div>
</div>
</foreignObject>
<text x="275" y="284" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">
LibraryContent...
</text>
</switch>
</g>
<rect x="360" y="500" width="100" height="120" fill="#ffffff" stroke="#000000" stroke-width="2" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)scale(2)">
<switch>
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 48px; height: 1px; padding-top: 280px; margin-left: 181px;">
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
HAPI
<br/>
ELM
<br/>
Cache
</div>
</div>
</div>
</foreignObject>
<text x="205" y="284" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">
HAPI...
</text>
</switch>
</g>
<path d="M 630 240 L 630 86" fill="none" stroke="#000000" stroke-width="2" stroke-miterlimit="10" pointer-events="stroke"/>
<ellipse cx="630" cy="80" rx="6" ry="6" fill="none" stroke="#000000" stroke-width="2" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)scale(2)">
<switch>
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 63px; margin-left: 315px;">
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
<div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; background-color: #ffffff; white-space: nowrap; ">
REST API
</div>
</div>
</div>
</foreignObject>
<text x="315" y="66" fill="#000000" font-family="Helvetica" font-size="11px" text-anchor="middle">
REST API
</text>
</switch>
</g>
<rect x="220" y="500" width="140" height="120" fill="#ffffff" stroke="#000000" stroke-width="2" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)scale(2)">
<switch>
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 68px; height: 1px; padding-top: 280px; margin-left: 111px;">
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
HAPI
<br/>
FhirDal
</div>
</div>
</div>
</foreignObject>
<text x="145" y="284" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">
HAPI...
</text>
</switch>
</g>
<path d="M 1200 620 L 1140 620 Q 1120 620 1120 640 L 1120 690 Q 1120 710 1100 710 L 1060 710 Q 1040 710 1060 710 L 1100 710 Q 1120 710 1120 730 L 1120 780 Q 1120 800 1140 800 L 1200 800" fill="none" stroke="#000000" stroke-width="2" stroke-miterlimit="10" transform="translate(1120,0)scale(-1,1)translate(-1120,0)" pointer-events="all"/>
<rect x="1200" y="690" width="240" height="40" fill="none" stroke="none" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)scale(2)">
<switch>
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 118px; height: 1px; padding-top: 355px; margin-left: 602px;">
<div style="box-sizing: border-box; font-size: 0; text-align: left; ">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
HAPI Data Access Layer
</div>
</div>
</div>
</foreignObject>
<text x="602" y="359" fill="#000000" font-family="Helvetica" font-size="12px">
HAPI Data Access Lay...
</text>
</switch>
</g>
<path d="M 1200 500 L 1140 500 Q 1120 500 1120 520 L 1120 540 Q 1120 560 1100 560 L 1060 560 Q 1040 560 1060 560 L 1100 560 Q 1120 560 1120 580 L 1120 600 Q 1120 620 1140 620 L 1200 620" fill="none" stroke="#000000" stroke-width="2" stroke-miterlimit="10" transform="translate(1120,0)scale(-1,1)translate(-1120,0)" pointer-events="all"/>
<rect x="1200" y="520" width="320" height="80" fill="none" stroke="none" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)scale(2)">
<switch>
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 158px; height: 1px; padding-top: 280px; margin-left: 602px;">
<div style="box-sizing: border-box; font-size: 0; text-align: left; ">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
HAPI CQL Interface Implementations
</div>
</div>
</div>
</foreignObject>
<text x="602" y="284" fill="#000000" font-family="Helvetica" font-size="12px">
HAPI CQL Interface Impleme...
</text>
</switch>
</g>
<path d="M 1200 420 L 1140 420 Q 1120 420 1120 440 L 1120 450 Q 1120 460 1100 460 L 1060 460 Q 1040 460 1060 460 L 1100 460 Q 1120 460 1120 480 L 1120 490 Q 1120 500 1140 500 L 1200 500" fill="none" stroke="#000000" stroke-width="2" stroke-miterlimit="10" transform="translate(1120,0)scale(-1,1)translate(-1120,0)" pointer-events="all"/>
<path d="M 170 750 L 150 750 Q 130 750 130 770 L 130 820 Q 130 840 110 840 L 100 840 Q 90 840 110 840 L 120 840 Q 130 840 130 860 L 130 910 Q 130 930 150 930 L 170 930" fill="none" stroke="#000000" stroke-width="2" stroke-miterlimit="10" transform="translate(0,840)scale(1,-1)translate(0,-840)rotate(-270,130,840)" pointer-events="all"/>
<rect x="10" y="900" width="240" height="40" fill="none" stroke="none" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)scale(2)">
<switch>
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 460px; margin-left: 6px;">
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
Server
</div>
</div>
</div>
</foreignObject>
<text x="65" y="464" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">
Server
</text>
</switch>
</g>
<rect x="1200" y="420" width="360" height="80" fill="none" stroke="none" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)scale(2)">
<switch>
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 178px; height: 1px; padding-top: 230px; margin-left: 602px;">
<div style="box-sizing: border-box; font-size: 0; text-align: left; ">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
CQL Interfaces
</div>
</div>
</div>
</foreignObject>
<text x="602" y="234" fill="#000000" font-family="Helvetica" font-size="12px">
CQL Interfaces
</text>
</switch>
</g>
<rect x="1200" y="340" width="280" height="80" fill="none" stroke="none" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)scale(2)">
<switch>
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 138px; height: 1px; padding-top: 190px; margin-left: 602px;">
<div style="box-sizing: border-box; font-size: 0; text-align: left; ">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
Core CQL modules
</div>
</div>
</div>
</foreignObject>
<text x="602" y="194" fill="#000000" font-family="Helvetica" font-size="12px">
Core CQL modules
</text>
</switch>
</g>
<path d="M 1200 340 L 1140 340 Q 1120 340 1120 360 L 1120 370 Q 1120 380 1100 380 L 1060 380 Q 1040 380 1060 380 L 1100 380 Q 1120 380 1120 400 L 1120 410 Q 1120 420 1140 420 L 1200 420" fill="none" stroke="#000000" stroke-width="2" stroke-miterlimit="10" transform="translate(1120,0)scale(-1,1)translate(-1120,0)" pointer-events="all"/>
<path d="M 1200 240 L 1140 240 Q 1120 240 1120 260 L 1120 275 Q 1120 290 1100 290 L 1060 290 Q 1040 290 1060 290 L 1100 290 Q 1120 290 1120 310 L 1120 325 Q 1120 340 1140 340 L 1200 340" fill="none" stroke="#000000" stroke-width="2" stroke-miterlimit="10" transform="translate(1120,0)scale(-1,1)translate(-1120,0)" pointer-events="all"/>
<rect x="1200" y="250" width="280" height="80" fill="none" stroke="none" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)scale(2)">
<switch>
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 138px; height: 1px; padding-top: 145px; margin-left: 602px;">
<div style="box-sizing: border-box; font-size: 0; text-align: left; ">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
FHIR Operation Implementations
</div>
</div>
</div>
</foreignObject>
<text x="602" y="149" fill="#000000" font-family="Helvetica" font-size="12px">
FHIR Operation Implemen...
</text>
</switch>
</g>
<rect x="220" y="420" width="820" height="80" fill="#ffffff" stroke="#000000" stroke-width="2" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)scale(2)">
<switch>
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 408px; height: 1px; padding-top: 230px; margin-left: 111px;">
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
CQL Interfaces
</div>
</div>
</div>
</foreignObject>
<text x="315" y="234" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">
CQL Interfaces
</text>
</switch>
</g>
</g>
<switch>
<g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/>
<a transform="translate(0,-5)" xlink:href="https://www.diagrams.net/doc/faq/svg-export-text-problems" target="_blank">
<text text-anchor="middle" font-size="10px" x="50%" y="100%">
Viewer does not support full SVG 1.1
</text>
</a>
</switch>
</svg>

After

Width:  |  Height:  |  Size: 43 KiB

View File

@ -0,0 +1,43 @@
@startuml measure_evaluation_sequence
!include styling.puml
title Measure $evaluate-measure
actor User as User
participant OperationProvider as "HAPI Measure Operation Provider"
participant CQLEngine as "CQL Engine"
participant HAPI as "HAPI CQL Adapters"
participant JPA as "HAPI JPA / Terminology Providers"
User -> OperationProvider: invoke $evaluate-measure
OperationProvider -> JPA: read Measure
JPA --> OperationProvider: return Measure
OperationProvider -> JPA: read Libraries
JPA --> OperationProvider: return Libraries
OperationProvider -> OperationProvider: convert FHIR Libraries to ELM libraries
OperationProvider-> CQLEngine **: create with ELM Libraries
OperationProvider -> JPA: get Subjects
JPA --> OperationProvider: return Subjects
loop each Subject
OperationProvider -> CQLEngine: set current Subject context
loop each SDE/Population
OperationProvider -> CQLEngine: evaluate SDE/Population criteria
CQLEngine -> CQLEngine: evaluate Definition
alt terminology required
CQLEngine -> HAPI: retrieve terminology
HAPI -> JPA: request terminology
JPA --> HAPI: return terminology
HAPI --> CQLEngine: return terminology
end
CQLEngine -> HAPI: retrieve data
HAPI -> JPA: request data
JPA --> HAPI: return data
HAPI --> CQLEngine: return data
CQLEngine --> OperationProvider: return SDE/Population criteria result
end
end
OperationProvider -> CQLEngine !!: destroy
OperationProvider -> OperationProvider: build MeasureReport
OperationProvider -> OperationProvider: score MeasureReport
OperationProvider -> User: return MeasureReport
@enduml

View File

@ -0,0 +1,126 @@
@startuml styling
'These are Alphora colors, they need
' to be updated to reflect the HAPI style guide
!$white = "#fff"
!$greylt000 = "#F4F6F5"
!$greylt100 = "#DDE3E0"
!$greylt200 = "#C7D1CC"
!$greylt300 = "#B0BFB8"
!$grey = $greylt000
!$greydk000 = "#404F47"
!$greydk100 = "#2E3833"
!$greydk200 = "#1C221F"
!$greydk250 = "#121614"
!$greydk300 = "#090B0A"
!$black = $greydk300
!$blue000 = "#4B7DD2"
!$blue100 = "#3064BF"
!$blue200 = "#2956A3"
!$blue300 = "#214583"
!$blue = $blue100
!$purple000 = "#645FAB"
!$purple100 = "#524D93"
!$purple200 = "#433F78"
!$purple300 = "#34315E"
!$purple = $purple100
!$green000 = "#568A67"
!$green100 = "#477154"
!$green200 = "#375841"
!$green300 = "#273F2F"
!$green = $green100
!$yellow000 = "#FBB337"
!$yellow100 = "#FAA40F"
!$yellow200 = "#DC8D04"
!$yellow300 = "#B47304"
!$yellow = $yellow100
!$red000 = "#FF6633"
!$red100 = "#FF4000"
!$red200 = "#E03800"
!$red300 = "#B82E00"
!$red = $red100
skinparam {
defaultFontName Source Sans Pro
TitleFontStyle bold
BackgroundColor $white
Shadowing false
ArrowColor $greydk000
ArrowFontColor $black
ArrowFontSize 12
ArrowFont Open Sans
DelayFontColor $black
DelayFontSize 12
ActorBorderColor $black
ActorBackgroundColor $white
ActorFontColor $black
ActorFontSize 14
ActorFontStyle bold
ParticipantBorderColor $black
ParticipantBackgroundColor $yellow
ParticipantFontColor $black
ParticipantFontSize 14
ParticipantFontStyle bold
DatabaseBorderColor $black
DatabaseBackgroundColor $yellow
DatabaseFontColor $black
DatabaseFontSize 14
DatabaseFontStyle bold
}
skinparam Sequence {
MessageAlign center
LifeLineBorderColor $black
' loop, alt, ref
GroupBodyBackgroundColor $white
GroupBackgroundColor $blue
GroupHeaderFontColor $white
GroupHeaderFontSize 12
GroupFontSize 12
BoxBackgroundColor $greylt000
BoxBorderColor $black
BoxFontColor $black
BoxFontSize 12
ReferenceBorderColor $black
ReferenceFontColor $black
ReferenceFontSize 12
ReferenceHeaderBackgroundColor $blue
DividerBackgroundColor $blue
DividerBorderColor $black
DividerFontColor $white
DividerFontSize 12
}
skinparam Note {
BackgroundColor $green
BorderColor $black
FontColor $white
FontStyle bold
FontSize 12
Font Open Sans
}
hide footbox
@enduml

View File

@ -25,14 +25,19 @@ There are two Spring beans available that add CQL processing to HAPI. You can en
* `ca.uhn.fhir.cql.config.CqlDstu3Config`
* `ca.uhn.fhir.cql.config.CqlR4Config`
## Operations
## Clinical Reasoning Operations
HAPI provides implementations for some Measure operations for DSTU3 and R4
HAPI provides implementations for some operations in DSTU3 and R4:
### $evaluate-measure
[Measure Operations](cql_measure)
The [$evaluate-measure](http://hl7.org/fhir/measure-operation-evaluate-measure.html) operation allows the evaluation of a clinical quality measure. This operation is invoked on an instance of a Measure resource:
## Roadmap
`http://base/Measure/measureId/$evaluate-measure?subject=124&periodStart=2014-01&periodend=2014-03`
Further development of the CQL capabilities in HAPI is planned:
The Measure will be evaluated, including any CQL that is referenced. The CQL evaluation requires that all the supporting knowledge artifacts for a given Measure be loaded on the HAPI server, including `Libaries` and `ValueSets`.
* Additional features and performance enhancements for Measure evaluation
* Additional FHIR Clinical Reasoning Module operations:
* Library $evaluate
* PlanDefinition $apply
* Support for the CPG IG Operations
* $cql

View File

@ -0,0 +1,406 @@
# Measures
## Introduction
The FHIR Clinical Reasoning Module defines the [Measure resource](https://www.hl7.org/fhir/measure.html) and several [associated operations](https://www.hl7.org/fhir/measure-operations.html). The Measure Resource represents a structured, computable definition of a health-related measure such as a clinical quality measure, public health indicator, or population analytics measure. These Measures can then be used for reporting, analytics, and data-exchange purposes.
Electronic Clinical Quality Measures (eCQMs) in FHIR are represented as a FHIR Measure resource containing metadata and terminology, a population criteria section, and at least one FHIR Library resource containing a data criteria section as well as the logic used to define the population criteria. The population criteria section typically contains initial population criteria, denominator criteria, and numerator criteria sub-components, among others. This is elaborated upon in greater detail in the [CQF Measures IG](http://hl7.org/fhir/us/cqfmeasures). An example of an eCQM as defined in FHIR looks like:
```json
{
"resourceType" : "Measure",
"library" : [
"http://hl7.org/fhir/us/cqfmeasures/Library/EXMLogic"
],
"group" : [
{
"population" : [
{
"code" : {
"coding" : [
{
"code" : "initial-population"
}
]
},
"criteria" : {
"language" : "text/cql.identifier",
"expression" : "Initial Population"
}
},
{
"code" : {
"coding" : [
{
"code" : "numerator"
}
]
},
"criteria" : {
"language" : "text/cql.identifier",
"expression" : "Numerator"
}
},
{
"code" : {
"coding" : [
{
"code" : "denominator"
}
]
},
"criteria" : {
"language" : "text/cql.identifier",
"expression" : "Denominator"
}
}
]
}
]
}
```
Measures are then scored according the whether a subjects (or subjects) are members of the various populations.
For example, a Measure for Breast Cancer screening might define an Initial Population (via CQL expressions) of "all women", a Denominator of "women over 35", and a Numerator of "women over 35 who have had breast cancer screenings in the past year". If the Measure is evaluated against a population of 100 women, 50 are over 35, and of those 25 have had breast cancer screenings in the past year, the final score would be 50%<sup>1</sup> (total number in numerator / total number in the denominator).
1. There are several methods for scoring Measures, this is meant only as an example.
## Operations
HAPI implements the [$evaluate-measure](https://www.hl7.org/fhir/operation-measure-evaluate-measure.html) operation. Support for additional operations is planned.
## Evaluate Measure
The `$evaluate-measure` operation is used to execute a Measure as specified by the relevant FHIR Resources against a subject or set of subjects. This implementation currently focuses primarily on supporting the narrower evaluation requirements defined by the [CQF Measures IG](http://hl7.org/fhir/us/cqfmeasures). Some support for extensions defined by other IGs is included as well, and the implementation aims to support a wider range of functionality in the future.
### Example Measure
Several example Measures are available in the [ecqm-content-r4](https://github.com/cqframework/ecqm-content-r4) IG. Full Bundles with all the required supporting resources are available [here](https://github.com/cqframework/ecqm-content-r4/tree/master/bundles/measure). You can download a Bundle and load it on your server as a transaction:
```bash
POST http://your-server-base/fhir BreastCancerScreeningFHIR-bundle.json
```
These Bundles also include example Patient clinical data so once posted Measure evaluation can be invoked with:
```bash
GET http://your-server-base/fhir/Measure/BreastCancerScreeningFHIR/$evaluate-measure?periodStart=2019-01-01&periodEnd=2019-12-31&subject=numerator&reportType=subject
```
### Measure Features
The FHIR Measure specification defines several different types of Measures and various parameters for controlling the Measure evaluation. This section describes the features supported by HAPI.
#### Reporting Period
The `periodStart` and `periodEnd` parameters are used to control the Reporting Period for which a report is generated. This corresponds to `Measurement Period` defined in the CQL logic, as defined by the conformance requirements in the CQF Measures IG. Both `periodStart` and `periodEnd` must be used or neither must be used.
If neither are used the default reporting period specified in the CQL logic is used, as shown here
```cql
parameter "Measurement Period" Interval<DateTime>
default Interval[@2019-01-01T00:00:00.0, @2020-01-01T00:00:00.0)
```
If neither are used and there is no default reporting period in the CQL logic an error is thrown.
A request using `periodStart` and `periodEnd` looks like:
```bash
GET fhir/Measure/<MeasureId>/$evaluate-measure?periodStart=2019-01-01&periodEnd=2019-12-31
```
`periodStart` and `periodEnd` support Dates (YYYY, YYYY-MM, or YYYY-MM-DD) and DateTimes (YYYY-MM-DDThh:mm:ss+zz:zz)
#### Report Types
Measure report types determine what data is returned from the evaluation. This is controlled with the `reportType` parameter on the $evaluate-measure Operation
| Report Type | Supported | Description |
| ------------ | :----------------: | -------------------------------------------------------------------------------------------------------------- |
| subject | :white_check_mark: | Measure report for a single subject (e.g. one patient). Includes additional detail, such as evaluatedResources |
| subject-list | :white_check_mark: | Measure report including the list of subjects in each population (e.g. all the patients in the "numerator") |
| population | :white_check_mark: | Summary measure report for a population |
NOTE: There's an open issue on the FHIR specification to align these names to the MeasureReportType value set.
A request using `reportType` looks like:
```bash
GET fhir/Measure/<MeasureId>/$evaluate-measure?reportType=subject-list
```
#### Subject Types
The subject of a measure evaluation is controlled with the `subject` (R4+) and `patient` (DSTU3) operation parameters. Currently the only subject type supported by HAPI is Patient. This means that all Measure evaluation and reporting happens with respect to a Patient or set of Patient resources.
| Subject Type | Supported | Description |
| ----------------- | :------------------: | ----------------- |
| Patient | :white_check_mark: | A Patient |
| Practitioner | :white_large_square: | A Practitioner |
| Organization | :white_large_square: | An Organization |
| Location | :white_large_square: | A Location |
| Device | :white_large_square: | A Device |
| Group<sup>1</sup> | :white_large_square: | A set of subjects |
1. See next section
A request using `subject` looks like:
```bash
GET fhir/Measure/<MeasureId>/$evaluate-measure?subject=Patient/123
```
##### Selecting a set of Patients
The set of Patients used for Measure evaluation is controlled with the `subject` (R4+) or `patient` (DSTU3), and `practitioner` parameters. The two parameters are mutually exclusive.
| Parameter | Supported | Description |
| ----------------------------------------------------- | :------------------: | ----------------------------------------------------------------------- |
| Not specified | :white_check_mark: | All Patients on the server |
| `subject=XXX` or `subject=Patient/XXX` | :white_check_mark: | A single Patient |
| `practitioner=XXX` or `practitioner=Practitioner/XXX` | :white_check_mark: | All Patients whose `generalPractitioner` is the referenced Practitioner |
| `subject=Group/XXX`<sup>1</sup> | :white_large_square: | A Group containing subjects |
| `subject=XXX` AND `practitioner=XXX` | :x: | Not a valid combination |
1. Referencing a Group of Patients as the subject is defined in the ATR IG and is on the roadmap. This will allow much more control over which Patients are included in the evaluated set.
A request using `practitioner` looks like:
```bash
GET fhir/Measure/<MeasureId>/$evaluate-measure?practitioner=Practitioner/XYZ
```
#### ReportType, Subject, Practitioner Matrix
The following table shows the combinations of the `subject` (or `patient`), `practitioner` and `reportType` parameters that are valid
| | subject reportType | subject-list reportType | population reportType |
| ---------------- | :----------------: | :-------------------------------: | :-------------------------------: |
| subject parameter | :white_check_mark: | :white_check_mark: <sup>1,2</sup> | :white_check_mark: <sup>1,2</sup> |
| practitioner parameter | :x:<sup>3</sup> | :white_check_mark: | :white_check_mark: |
1. Including the subject parameter restricts the Measure evaluation to a single Patient. Omit the `subject` (or `patient`) parameter to get report for multiple Patients. The subject-list and population report types have less detail than a subject report.
2. A Group `subject` with a subject-list or population `reportType` will be a valid combination once Group support is implemented.
3. A practitioner have may zero, one, or many patients so a practitioner report always assumes a set.
#### Scoring Methods
The Measure scoring method determines how a Measure score is calculated. It is set with the [scoring](https://www.hl7.org/fhir/measure-definitions.html#Measure.scoring) element on the Measure resource.
The HAPI implementation conforms to the requirements defined by the CQF Measures IG. A more detailed description of each scoring method is linked in the table below.
| Scoring Method | Supported | Description |
| ------------------- | :------------------: | ---------------------------------------------------------------------------------------------------------------------- |
| proportion | :white_check_mark: | [Proportion Measures](https://build.fhir.org/ig/HL7/cqf-measures/measure-conformance.html#proportion-measures) |
| ratio | :white_check_mark: | [Ratio Measures](https://build.fhir.org/ig/HL7/cqf-measures/measure-conformance.html#ratio-measures) |
| continuous-variable | :white_check_mark: | [Continuous Variable](https://build.fhir.org/ig/HL7/cqf-measures/measure-conformance.html#continuous-variable-measure) |
| cohort | :white_check_mark:* | [Cohort](https://build.fhir.org/ig/HL7/cqf-measures/measure-conformance.html#cohort-definitions) |
| composite | :white_large_square: | See below |
* The cohort Measure scoring support is partial. The HAPI implementation does not yet return the required Measure observations
An example Measure resource with `scoring` defined looks like:
```json
{
"resourceType": "Measure",
"scoring": {
"coding": [ {
"system": "http://terminology.hl7.org/CodeSystem/measure-scoring",
"code": "proportion",
"display": "Proportion"
} ]
}
}
```
##### Composite Scoring
A composite Measure is scored by combining and/or aggregating the results of other Measures. The [compositeScoring](https://www.hl7.org/fhir/measure-definitions.html#Measure.compositeScoring) element is used to control how composite Measures are scored. HAPI does not currently support any composite scoring method.
| Composite Scoring Method | Supported | Description |
| ------------------------ | :------------------: | ---------------------------------------------------------------------------------------------- |
| opportunity | :white_large_square: | Combines Numerators and Denominators for each component Measure |
| all-or-nothing | :white_large_square: | Includes individuals that are in the numerator for all component Measures |
| linear | :white_large_square: | Gives an individual score based on the number of numerators in which they appear |
| weighted | :white_large_square: | Gives an individual a cored based on a weighted factor for each numerator in which they appear |
#### Populations
The HAPI implementation uses the populations defined by the CQF Measures IG for each scoring type. A matrix of the supported populations is shown in the [Criteria Names](https://build.fhir.org/ig/HL7/cqf-measures/measure-conformance.html#criteria-names) section of the CQF Measures IG.
#### Population Criteria
The logical criteria used for determining each Measure population is defined by the [Measure.group.population.criteria element](). The Measure specification allows population criteria to be defined using FHIR Path, CQL, or other languages as appropriate. The HAPI implementation currently only supports using CQL. The relationship between a Measure Population and CQL is illustrated in the [Population Criteria](https://build.fhir.org/ig/HL7/cqf-measures/measure-conformance.html#population-criteria) section of the CQF Measures IG.
An example Measure resource with a population criteria referencing a CQL identifier looks like:
```json
{
"resourceType": "Measure",
"group": [ {
"population": [ {
"code": {
"coding": [ {
"system": "http://terminology.hl7.org/CodeSystem/measure-population",
"code": "initial-population",
"display": "Initial Population"
} ]
},
"criteria": {
"language": "text/cql.identifier",
"expression": "Initial Population"
}
}]
}]
}
```
##### Criteria Expression Type
| Expression Type | Supported |
| --------------- | :------------------: |
| CQL | :white_check_mark: |
| FHIR Path | :white_large_square: |
#### Supplemental Data Elements
Supplemental Data Elements are used to report additional information about the subjects that may not be included in the in the Population criteria definitions. For example, it may be of interest to report the gender of all subjects for informational purposes. Supplemental data elements are defined by the [Measure.supplementalData](http://www.hl7.org/fhir/measure-definitions.html#Measure.supplementalData) element, and are reported as Observations in the evaluatedResources of the MeasureReport.
Supplemental Data Elements can be specified as either CQL definitions or FHIR Path expressions.
| Expression Type | Supported |
| --------------- | :------------------: |
| CQL | :white_check_mark: |
| FHIR Path | :white_large_square: |
An example Measure resource with some supplemental data elements set looks like:
```json
{
"resourceType": "Measure",
"supplementalData": [ {
"code": {
"text": "sde-ethnicity"
},
"criteria": {
"language": "text/cql.identifier",
"expression": "SDE Ethnicity"
}
}]
}
```
#### Stratifiers
Stratifiers are used divide Measure populations into segments of interest. For example, it may be of interest to compare the Measure score between different age groups or genders. Each stratum within a stratification is scored the same way as the overall population. Stratifiers are defined using the [Measure.group.stratifier](http://hl7.org/fhir/R4/measure-definitions.html#Measure.group.stratifier) element.
HAPI does not implement stratifier support but it's on the roadmap.
An example Measure resource with a stratifier set looks like:
```json
{
"resourceType": "Measure",
"group": [ {
"stratifier": [ {
"code": {
"text": "Stratum 1"
},
"criteria": {
"language": "text/cql.identifier",
"expression": "Stratification 1"
}
}]
}]
}
```
##### Stratifier Expression Support
As with Populations and Supplemental Data Elements the criteria used for Stratification may be defined with CQL or FHIR Path.
| Expression Type | Supported |
| --------------- | :------------------: |
| CQL | :white_large_square: |
| FHIR Path | :white_large_square: |
##### Stratifier Component Support
The Measure specification also supports multi-dimensional stratification, for cases where more than one data element is needed.
| Stratifier Type | Supported |
| ---------------- | :------------------: |
| Single Component | :white_large_square: |
| Multi Component | :white_large_square: |
#### Evaluated Resources
A FHIR MeasureReport permits referencing the Resources used when evaluating in the [MeasureReport.evaluatedResource](https://www.hl7.org/fhir/measurereport-definitions.html#MeasureReport.evaluatedResource) element. HAPI includes these resources when generating `subject` reports for a single Patient. Evaluated resources for `population` or `subject-list` reports are not included. For large populations this could quickly become an extremely large number of resources.
The evaluated resources will not include every resource on the HAPI server for a given subject. Rather, it includes only the resources that were retrieved from the server by the CQL logic that was evaluated. This corresponds to the data-requirements for a given Measure. As an example, consider the following CQL:
```cql
valueset "Example Value Set" : 'http://fhir.org/example-value-set'
define "Example Observations":
[Observation : "Example Value Set"]
```
That CQL will only select Observation Resources that have a code in the "Example Value Set". Those Observations will be reported in the Evaluated Resources while any others will not.
#### Last Received On
The `lastReceivedOn` parameter is the date the Measure was evaluated and reported. It is used to limit the number of resources reported in the Measure report for individual reports. It is currently not supported by HAPI.
#### Extensions
A number of extensions to Measure evaluation defined by various IGs are supported. They are described briefly in the table below.
| Extension | Description |
| --------- | ----------- |
| http://hl7.org/fhir/us/cqframework/cqfmeasures/StructureDefinition/cqfm-productLine | Used to evaluate different product lines (e.g. Medicare, Private, etc.) |
| http://hl7.org/fhir/StructureDefinition/cqf-measureInfo | Used to demark a Measure Observation |
| http://hl7.org/fhir/us/davinci-deqm/StructureDefinition/extension-populationReference | Used to specify the population that triggered a particular `evaluatedResource`|
There's not currently a way to configure which extensions are enabled. All supported extensions are always enabled.
## Architecture
Below are a few diagrams that show the overall architecture of Measure evaluation and how it fits into the HAPI FHIR Server.
### Component Diagram
This is a simplified component diagram of the Measure evaluation architecture
![Measure Evaluation Architecture](images/../../images/ref.measure.architecture.drawio.svg)
### Sequence Chart
This sequence chart approximates the Measure evaluation logic implemented by HAPI.
![Measure Evaluation Sequence Chart](images/../../images/measure_evaluation_sequence.png)
## FAQs
Q: I get an error saying HAPI can't locate my library, and I've verified it's on the server.
A: HAPI follows the [Library conformance requirements](https://build.fhir.org/ig/HL7/cqf-measures/measure-conformance.html#conformance-requirement-3-1) defined by the CQF Measures IG, meaning the Library must have a `logic-library` type, the name and versions of the FHIR Library and CQL Library must match, and the url of the Library must end in the name of the Library.
FHIR Libraries generated from CQL via the IG Publisher follow these requirements automatically.
Q: Does HAPI support partitions for evaluation?
A: Yes, though the Measure and associated Resources must be in the same partition as the clinical data being used.
## Roadmap
* Complete cohort implementation
* Support for stratifiers
* Support for Group subjects
* Support for FHIRPath expressions in Stratifiers, Supplemental Data Elements, and Population Criteria
* $data-requirements, $collect-data, $submit-data, and $care-gaps operations
* Support for more extensions defined in the CQF Measures, CPG, and ATR IGs