Skip to content

Instantly share code, notes, and snippets.

@MartijnR
Last active January 24, 2020 20:57
Show Gist options
  • Save MartijnR/97637326088f766df8fae22fdb93b499 to your computer and use it in GitHub Desktop.
Save MartijnR/97637326088f766df8fae22fdb93b499 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="UTF-8" standalone="no"?><h:html xmlns="http://www.w3.org/2002/xforms" xmlns:OpenClinica="http://openclinica.com/odm" xmlns:enk="http://enketo.org/xforms" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:oc="http://openclinica.org/xforms" xmlns:orx="http://openrosa.org/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<h:head>
<h:title>Vital Signs - Optimized</h:title>
<h:crossform_references>current_event</h:crossform_references>
<model>
<instance>
<demo-vitals-grid-v27b-RG_only id="vitals-1_2(3)" version="27b">
<page2>
<bp_yn/>
<bp_rg jr:template="">
<bp_sys/>
<bp_dia/>
<bp_ratio/>
<bp_dt_prec/>
<bp_sys_comment oc:queryParent="bp_sys"/><bp_dia_comment oc:queryParent="bp_dia"/><bp_ratio_comment oc:queryParent="bp_ratio"/><bp_dt_prec_comment oc:queryParent="bp_dt_prec"/></bp_rg>
<bp_yn_comment oc:queryParent="bp_yn"/></page2>
<meta>
<instanceID/>
<instanceID_comment oc:queryParent="instanceID"/></meta>
</demo-vitals-grid-v27b-RG_only>
</instance>
<bind nodeset="/demo-vitals-grid-v27b-RG_only/page2/bp_yn" oc:itemgroup="Group1" required="true() and comment-status(/demo-vitals-grid-v27b-RG_only/page2/bp_yn_comment)!='new' and comment-status(/demo-vitals-grid-v27b-RG_only/page2/bp_yn_comment)!='updated' and comment-status(/demo-vitals-grid-v27b-RG_only/page2/bp_yn_comment)!='closed'" type="select1"/>
<bind nodeset="/demo-vitals-grid-v27b-RG_only/page2/bp_rg" relevant=" /demo-vitals-grid-v27b-RG_only/page2/bp_yn = 1"/>
<bind constraint=". &gt; /demo-vitals-grid-v27b-RG_only/page2/bp_rg/bp_dia or . = '' or /demo-vitals-grid-v27b-RG_only/page2/bp_rg/bp_dia = ''" jr:constraintMsg="Systolic Pressure must be greater than Diastolic Pressure." nodeset="/demo-vitals-grid-v27b-RG_only/page2/bp_rg/bp_sys" oc:constraint-type="strict" oc:itemgroup="Group2" type="int"/>
<bind constraint=". &lt; /demo-vitals-grid-v27b-RG_only/page2/bp_rg/bp_sys or . = '' or /demo-vitals-grid-v27b-RG_only/page2/bp_rg/bp_sys = '' or comment-status(/demo-vitals-grid-v27b-RG_only/page2/bp_rg/bp_dia_comment)='new' or comment-status(/demo-vitals-grid-v27b-RG_only/page2/bp_rg/bp_dia_comment)='updated' or comment-status(/demo-vitals-grid-v27b-RG_only/page2/bp_rg/bp_dia_comment)='closed'" jr:constraintMsg="Diastolic Pressure must be less than Systolic Pressure." nodeset="/demo-vitals-grid-v27b-RG_only/page2/bp_rg/bp_dia" oc:itemgroup="Group2" type="int"/>
<bind calculate="if( /demo-vitals-grid-v27b-RG_only/page2/bp_rg/bp_dia != '' and /demo-vitals-grid-v27b-RG_only/page2/bp_rg/bp_sys != '' and /demo-vitals-grid-v27b-RG_only/page2/bp_rg/bp_dia != 0, round( /demo-vitals-grid-v27b-RG_only/page2/bp_rg/bp_sys div /demo-vitals-grid-v27b-RG_only/page2/bp_rg/bp_dia ,1), 0)" nodeset="/demo-vitals-grid-v27b-RG_only/page2/bp_rg/bp_ratio" oc:itemgroup="Group2" readonly="true()" type="decimal"/>
<bind nodeset="/demo-vitals-grid-v27b-RG_only/page2/bp_rg/bp_dt_prec" oc:itemgroup="Group2" type="select1"/>
<bind calculate="concat('uuid:', uuid())" nodeset="/demo-vitals-grid-v27b-RG_only/meta/instanceID" readonly="true()" type="string"/>
<bind enk:for="/demo-vitals-grid-v27b-RG_only/page2/bp_yn" nodeset="/demo-vitals-grid-v27b-RG_only/page2/bp_yn_comment" type="string"/><bind enk:for="/demo-vitals-grid-v27b-RG_only/page2/bp_rg" nodeset="/demo-vitals-grid-v27b-RG_only/page2/bp_rg_comment" type="string"/><bind enk:for="/demo-vitals-grid-v27b-RG_only/page2/bp_rg/bp_sys" nodeset="/demo-vitals-grid-v27b-RG_only/page2/bp_rg/bp_sys_comment" type="string"/><bind enk:for="/demo-vitals-grid-v27b-RG_only/page2/bp_rg/bp_dia" nodeset="/demo-vitals-grid-v27b-RG_only/page2/bp_rg/bp_dia_comment" type="string"/><bind enk:for="/demo-vitals-grid-v27b-RG_only/page2/bp_rg/bp_ratio" nodeset="/demo-vitals-grid-v27b-RG_only/page2/bp_rg/bp_ratio_comment" type="string"/><bind enk:for="/demo-vitals-grid-v27b-RG_only/page2/bp_rg/bp_dt_prec" nodeset="/demo-vitals-grid-v27b-RG_only/page2/bp_rg/bp_dt_prec_comment" type="string"/>
<!--<instance id="_users" src="jr://file-csv/users.xml"/>-->
</model>
</h:head>
<h:body class="pages theme-grid no-text-transform">
<group appearance="w5 field-list no-collapse" ref="/demo-vitals-grid-v27b-RG_only/page2">
<select1 appearance="w5" ref="/demo-vitals-grid-v27b-RG_only/page2/bp_yn">
<label>Was blood pressure measured?</label>
<item>
<label>Yes</label>
<value>1</value>
</item>
<item>
<label>No</label>
<value>2</value>
</item>
</select1>
<group appearance="no-collapse" ref="/demo-vitals-grid-v27b-RG_only/page2/bp_rg">
<label/>
<repeat nodeset="/demo-vitals-grid-v27b-RG_only/page2/bp_rg">
<input appearance="w1" ref="/demo-vitals-grid-v27b-RG_only/page2/bp_rg/bp_sys">
<label>Systolic Pressure:</label>
<hint>mmHg</hint>
</input>
<input appearance="w1" ref="/demo-vitals-grid-v27b-RG_only/page2/bp_rg/bp_dia">
<label>Diastolic Pressure:</label>
<hint>mmHg</hint>
</input>
<input appearance="w1" ref="/demo-vitals-grid-v27b-RG_only/page2/bp_rg/bp_ratio">
<label>Ratio</label>
</input>
<select1 appearance="w1 minimal" ref="/demo-vitals-grid-v27b-RG_only/page2/bp_rg/bp_dt_prec">
<label>Measurement Date Precision:</label>
<item>
<label>yyyy-mm-dd</label>
<value>1</value>
</item>
<item>
<label>yyyy-mm</label>
<value>2</value>
</item>
<item>
<label>yyyy</label>
<value>3</value>
</item>
<item>
<label>N/A</label>
<value>4</value>
</item>
</select1>
<input appearance="dn w1" ref="/demo-vitals-grid-v27b-RG_only/page2/bp_rg/bp_sys_comment"><label>Comment:</label></input><input appearance="dn w1" ref="/demo-vitals-grid-v27b-RG_only/page2/bp_rg/bp_dia_comment"><label>Comment:</label></input><input appearance="dn w1" ref="/demo-vitals-grid-v27b-RG_only/page2/bp_rg/bp_ratio_comment"><label>Comment:</label></input><input appearance="dn w1" ref="/demo-vitals-grid-v27b-RG_only/page2/bp_rg/bp_dt_prec_comment"><label>Comment:</label></input></repeat>
</group>
<input appearance="dn w1" ref="/demo-vitals-grid-v27b-RG_only/page2/bp_yn_comment"><label>Comment:</label></input></group>
</h:body>
</h:html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment