|
Variable let |
Name |
ap |
|
|
Value |
doc('include/cs-2.16.756.5.30.1.127.77.6.5.1-DYNAMIC.xml') |
|
|
Variable let |
Name |
apunits |
|
|
Value |
$ap//concept[property/code[@value='unit']] |
|
|
Variable let |
Name |
apDataTypes |
|
|
Value |
$ap//concept[property/code[@value='dataType']] |
|
|
Variable let |
Name |
apObservationValuePresent |
|
|
Value |
$ap//concept[property/code[@value='observationValuePresent']] |
|
|
Variable let |
Name |
apInterpretationCodePOSNEGIND |
|
|
Value |
$ap//concept[property/code[@value='interpretationCodePOSNEGIND']] |
|
|
Variable let |
Name |
apsection |
|
|
Value |
$ap//concept[property/code[@value='specialtySection']] |
|
|
Variable let |
Name |
oc |
|
|
Value |
hl7:code/@code |
|
|
Variable let |
Name |
ovu |
|
|
Value |
hl7:value/@unit |
|
|
Variable let |
Name |
dc |
|
|
Value |
$apunits[code/@value=$oc]/property[code/@value='unit']/valueCode/@value |
|
|
Schematron assert |
role |
error
|
|
|
test |
string-length($ovu)=0 or count($apunits[code/@value=$oc])=0 or count($dc)=0 or $ovu=$dc |
|
|
Message |
Observations with code <value-of select="$oc"/> shall have unit(s) <value-of select="$dc"/>. |
|
|
Variable let |
Name |
osectioncode |
|
|
Value |
ancestor::hl7:section/hl7:code/@code |
|
|
Variable let |
Name |
dc |
|
|
Value |
$apsection[code/@value=$oc]/property[code/@value='specialtySection']/valueCode/@value |
|
|
Variable let |
Name |
dn |
|
|
Value |
$apsection[code/@value=$oc]/property[code/@value='specialtySectionName']/valueString/@value |
|
|
Schematron assert |
role |
error
|
|
|
test |
string-length($osectioncode)=0 or string-length($dc)=0 or $osectioncode = $dc |
|
|
Message |
Observations with code <value-of select="$oc"/> shall appear within a section with code <value-of select="$dc"/>
<value-of select="$dn"/>, found <value-of select="$osectioncode"/>. |
|
|
Variable let |
Name |
apDataTypes |
|
|
Value |
$ap//concept[property/code[@value='dataType']] |
|
|
Variable let |
Name |
dtr |
|
|
Value |
$apDataTypes[code/@value=$oc]/property[code/@value='dataType']/valueCode/@value |
|
|
Schematron assert |
role |
error
|
|
|
test |
string-length($dtr)=0 or hl7:value[@xsi:type=$dtr] |
|
|
Message |
Datatype of the value element (xsi:type) shall be <value-of select="$dtr"/>
|
|
|
Variable let |
Name |
apObservationValuePresent |
|
|
Value |
$ap//concept[property/code[@value='observationValuePresent']] |
|
|
Variable let |
Name |
vpre |
|
|
Value |
$apObservationValuePresent[code/@value=$oc]/property[code/@value='observationValuePresent']/valueBoolean/@value |
|
|
Schematron assert |
role |
error
|
|
|
test |
string-length($vpre)=0 or $vpre='false' or hl7:value |
|
|
Message |
Observations with code <value-of select="$oc"/> shall have a value element. |
|
|
Schematron assert |
role |
error
|
|
|
test |
string-length($vpre)=0 or $vpre='true' or not(hl7:value) |
|
|
Message |
Observations with code <value-of select="$oc"/> shall not have a value element. |
|
|
Variable let |
Name |
apInterpretationCodePOSNEGIND |
|
|
Value |
$ap//concept[property/code[@value='interpretationCodePOSNEGIND']] |
|
|
Variable let |
Name |
icd |
|
|
Value |
$apInterpretationCodePOSNEGIND[code/@value=$oc]/property[code/@value='interpretationCodePOSNEGIND']/valueBoolean/@value |
|
|
Schematron assert |
role |
error
|
|
|
test |
string-length($icd)=0 or $icd='false' or hl7:interpretationCode/@nullFlavor or hl7:interpretationCode/@code=('POS','NEG','IND') |
|
|
Message |
Observations with code <value-of select="$oc"/> shall have a interpretationCode element that shall be valued with POS','NEG' or 'IND'. |
|