Skip to content

Commit

Permalink
Merge pull request #1 from IntelliSOFT-Consulting/main
Browse files Browse the repository at this point in the history
Country Registration Form -new person creation. roles(chw->chp)
  • Loading branch information
mathewwahome authored Apr 16, 2024
2 parents 6b05566 + d378cd2 commit 4cec2f2
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 28 deletions.
Binary file modified forms/contact/county-create.xlsx
Binary file not shown.
52 changes: 26 additions & 26 deletions forms/contact/county-create.xml
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@ DOB ISO: <output value=" /data/contact/ephemeral_dob/dob_iso "/></value></text>
<text id="/data/contact/phone_alternate:label">
<value>Alternate Phone Number</value>
</text>
<text id="/data/contact/role/chw:label">
<value>CHW</value>
<text id="/data/contact/role/chp:label">
<value>CHP</value>
</text>
<text id="/data/contact/role/chw_supervisor:label">
<value>CHW Supervisor</value>
<text id="/data/contact/role/chp_supervisor:label">
<value>CHP Supervisor</value>
</text>
<text id="/data/contact/role/manager:label">
<value>Facility Manager</value>
Expand Down Expand Up @@ -298,10 +298,10 @@ DOB ISO: <output value=" /data/contact/ephemeral_dob/dob_iso "/></value></text>
<text id="/data/contact/phone_alternate:label">
<value>Téléphone alternatif</value>
</text>
<text id="/data/contact/role/chw:label">
<text id="/data/contact/role/chp:label">
<value>ASC</value>
</text>
<text id="/data/contact/role/chw_supervisor:label">
<text id="/data/contact/role/chp_supervisor:label">
<value>Superviseur ASC</value>
</text>
<text id="/data/contact/role/manager:label">
Expand Down Expand Up @@ -492,10 +492,10 @@ DOB ISO: <output value=" /data/contact/ephemeral_dob/dob_iso "/></value></text>
<text id="/data/contact/phone_alternate:label">
<value>अन्य फोन नंबर</value>
</text>
<text id="/data/contact/role/chw:label">
<text id="/data/contact/role/chp:label">
<value>सामुदायिक स्वास्थ्य कर्मी</value>
</text>
<text id="/data/contact/role/chw_supervisor:label">
<text id="/data/contact/role/chp_supervisor:label">
<value>सामुदायिक स्वास्थ्य कर्मी के मैनेजर</value>
</text>
<text id="/data/contact/role/manager:label">
Expand Down Expand Up @@ -686,10 +686,10 @@ DOB ISO: <output value=" /data/contact/ephemeral_dob/dob_iso "/></value></text>
<text id="/data/contact/phone_alternate:label">
<value>Nomor Telepon Alternatif</value>
</text>
<text id="/data/contact/role/chw:label">
<text id="/data/contact/role/chp:label">
<value>Kader</value>
</text>
<text id="/data/contact/role/chw_supervisor:label">
<text id="/data/contact/role/chp_supervisor:label">
<value>Kader Pengawas</value>
</text>
<text id="/data/contact/role/manager:label">
Expand Down Expand Up @@ -880,10 +880,10 @@ DOB ISO: <output value=" /data/contact/ephemeral_dob/dob_iso "/></value></text>
<text id="/data/contact/phone_alternate:label">
<value>बैकल्पिक फाेन नम्बर</value>
</text>
<text id="/data/contact/role/chw:label">
<text id="/data/contact/role/chp:label">
<value>महिला स्वास्थ्य स्वयम् सेविका</value>
</text>
<text id="/data/contact/role/chw_supervisor:label">
<text id="/data/contact/role/chp_supervisor:label">
<value>महिला स्वास्थ्य स्वयम् सेविकाको सुपरभाइजर</value>
</text>
<text id="/data/contact/role/manager:label">
Expand Down Expand Up @@ -1074,10 +1074,10 @@ DOB ISO: <output value=" /data/contact/ephemeral_dob/dob_iso "/></value></text>
<text id="/data/contact/phone_alternate:label">
<value>Namba Ya</value>
</text>
<text id="/data/contact/role/chw:label">
<text id="/data/contact/role/chp:label">
<value>Mhudumu wa afya</value>
</text>
<text id="/data/contact/role/chw_supervisor:label">
<text id="/data/contact/role/chp_supervisor:label">
<value>Mkuu wa wahudumu wa afya</value>
</text>
<text id="/data/contact/role/manager:label">
Expand Down Expand Up @@ -1167,7 +1167,7 @@ DOB ISO: <output value=" /data/contact/ephemeral_dob/dob_iso "/></value></text>
</translation>
</itext>
<instance>
<data id="contact:county:create" prefix="J1!contact:county:create!" delimiter="#" version="2024-03-28 14-55">
<data id="contact:county:create" prefix="J1!contact:county:create!" delimiter="#" version="2024-04-16 8-56">
<inputs>
<meta>
<location>
Expand Down Expand Up @@ -1261,7 +1261,7 @@ DOB ISO: <output value=" /data/contact/ephemeral_dob/dob_iso "/></value></text>
<bind nodeset="/data/init/select_person" type="db:person" relevant="selected( /data/init/create_new_person ,'old_person')" required="true()"/>
<bind nodeset="/data/init/name" type="string"/>
<bind nodeset="/data/init/contact_name" type="string" calculate="coalesce(../../contact/name, ../name)"/>
<bind nodeset="/data/init/custom_place_name_label_translator" type="select1" calculate="&quot;name&quot;" relevant="selected( /data/init/create_new_person ,'none') or selected( /data/county/is_name_generated , 'false')"/>
<bind nodeset="/data/init/custom_place_name_label_translator" type="select1" relevant="selected( /data/init/create_new_person ,'none') or selected( /data/county/is_name_generated , 'false')" calculate="&quot;name&quot;"/>
<bind nodeset="/data/init/custom_place_name_label" type="string" calculate="jr:choice-name( /data/init/custom_place_name_label_translator ,' /data/init/custom_place_name_label_translator ')"/>
<bind nodeset="/data/init/custom_place_name" type="string" relevant="selected( /data/init/create_new_person ,'none') or selected( /data/county/is_name_generated , 'false')" required="true()"/>
<bind nodeset="/data/init/place_type" type="select1"/>
Expand All @@ -1272,22 +1272,22 @@ DOB ISO: <output value=" /data/contact/ephemeral_dob/dob_iso "/></value></text>
<bind nodeset="/data/contact/parent" type="string"/>
<bind nodeset="/data/contact/type" type="string"/>
<bind nodeset="/data/contact/name" type="string" required="true()"/>
<bind nodeset="/data/contact/short_name" type="string" constraint="string-length(.) &lt;= 10" jr:constraintMsg="Short name can not be more than 10 characters long." required="false()"/>
<bind nodeset="/data/contact/short_name" type="string" jr:constraintMsg="Short name can not be more than 10 characters long." constraint="string-length(.) &lt;= 10" required="false()"/>
<bind nodeset="/data/contact/date_of_birth" type="string" calculate="../ephemeral_dob/dob_iso" required="true()"/>
<bind nodeset="/data/contact/date_of_birth_method" type="string" calculate="../ephemeral_dob/dob_method"/>
<bind nodeset="/data/contact/ephemeral_dob/dob_calendar" type="date" relevant="not(selected(../dob_method,'approx'))" constraint=". &lt;= now()" jr:constraintMsg="Date must be before today" required="true()"/>
<bind nodeset="/data/contact/ephemeral_dob/dob_calendar" type="date" jr:constraintMsg="Date must be before today" relevant="not(selected(../dob_method,'approx'))" constraint=". &lt;= now()" required="true()"/>
<bind nodeset="/data/contact/ephemeral_dob/age_label" readonly="true()" type="string" relevant="selected(../dob_method,'approx')"/>
<bind nodeset="/data/contact/ephemeral_dob/age_years" type="int" relevant="selected(../dob_method,'approx')" constraint=". &gt;= 0 and . &lt;= 130" jr:constraintMsg="Age must be between 0 and 130" required="true()"/>
<bind nodeset="/data/contact/ephemeral_dob/age_months" type="int" constraint=". &gt;= 0 and . &lt;= 11" jr:constraintMsg="Months must between 0 and 11" relevant="selected(../dob_method,'approx')"/>
<bind nodeset="/data/contact/ephemeral_dob/age_years" type="int" jr:constraintMsg="Age must be between 0 and 130" relevant="selected(../dob_method,'approx')" constraint=". &gt;= 0 and . &lt;= 130" required="true()"/>
<bind nodeset="/data/contact/ephemeral_dob/age_months" type="int" jr:constraintMsg="Months must between 0 and 11" relevant="selected(../dob_method,'approx')" constraint=". &gt;= 0 and . &lt;= 11"/>
<bind nodeset="/data/contact/ephemeral_dob/dob_method" type="select"/>
<bind nodeset="/data/contact/ephemeral_dob/dob_approx" type="string" calculate="add-date(today(), 0- /data/contact/ephemeral_dob/age_years , 0- /data/contact/ephemeral_dob/age_months )"/>
<bind nodeset="/data/contact/ephemeral_dob/dob_raw" type="string" calculate="if(not(selected( ../dob_method,'approx')),
../dob_calendar,
../dob_approx)"/>
<bind nodeset="/data/contact/ephemeral_dob/dob_iso" type="string" calculate="format-date-time(../dob_raw,&quot;%Y-%m-%d&quot;)"/>
<bind nodeset="/data/contact/ephemeral_dob/dob_debug" readonly="true()" type="string" relevant="false()"/>
<bind nodeset="/data/contact/phone" type="tel" constraint="true()" jr:constraintMsg="Please enter a valid local number, or use the standard international format, which includes a plus sign (+) and country code. For example: +254712345678" relevant="selected( /data/init/create_new_person ,'new_person')"/>
<bind nodeset="/data/contact/phone_alternate" type="tel" constraint="true()" jr:constraintMsg="Please enter a valid local number, or use the standard international format, which includes a plus sign (+) and country code. For example: +254712345678" relevant="selected( /data/init/create_new_person ,'new_person')"/>
<bind nodeset="/data/contact/phone" type="tel" jr:constraintMsg="Please enter a valid local number, or use the standard international format, which includes a plus sign (+) and country code. For example: +254712345678" relevant="selected( /data/init/create_new_person ,'new_person')" constraint="true()"/>
<bind nodeset="/data/contact/phone_alternate" type="tel" jr:constraintMsg="Please enter a valid local number, or use the standard international format, which includes a plus sign (+) and country code. For example: +254712345678" relevant="selected( /data/init/create_new_person ,'new_person')" constraint="true()"/>
<bind nodeset="/data/contact/sex" type="select1" relevant="selected( /data/init/create_new_person ,'new_person')" required="true()"/>
<bind nodeset="/data/contact/role" type="select1" relevant="selected( /data/init/create_new_person ,'new_person')"/>
<bind nodeset="/data/contact/role_other" type="string" relevant="selected( /data/contact/role ,'other')" required="true()"/>
Expand Down Expand Up @@ -1442,12 +1442,12 @@ DOB ISO: <output value=" /data/contact/ephemeral_dob/dob_iso "/></value></text>
<select1 ref="/data/contact/role">
<label ref="jr:itext('/data/contact/role:label')"/>
<item>
<label ref="jr:itext('/data/contact/role/chw:label')"/>
<value>chw</value>
<label ref="jr:itext('/data/contact/role/chp:label')"/>
<value>chp</value>
</item>
<item>
<label ref="jr:itext('/data/contact/role/chw_supervisor:label')"/>
<value>chw_supervisor</value>
<label ref="jr:itext('/data/contact/role/chp_supervisor:label')"/>
<value>chp_supervisor</value>
</item>
<item>
<label ref="jr:itext('/data/contact/role/nurse:label')"/>
Expand Down
4 changes: 2 additions & 2 deletions forms/contact/county-edit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -329,9 +329,9 @@
<bind nodeset="/data/county/contact/name" type="string"/>
<bind nodeset="/data/county/contact/contact_name" type="string" calculate="../name"/>
<bind nodeset="/data/county/contact/_id" type="db:person"/>
<bind nodeset="/data/county/is_name_generated" type="select1" calculate="if( /data/county/generated_name = ../name, 'true', 'false')" readonly="boolean( /data/county/contact/_id )" relevant="not( /data/county/contact/_id ) or selected( . , 'true') or boolean( /data/county/contact/_id )" required="true()"/>
<bind nodeset="/data/county/is_name_generated" type="select1" readonly="boolean( /data/county/contact/_id )" required="true()" relevant="not( /data/county/contact/_id ) or selected( . , 'true') or boolean( /data/county/contact/_id )" calculate="if( /data/county/generated_name = ../name, 'true', 'false')"/>
<bind nodeset="/data/county/generated_name" type="string" calculate=" /data/init/generated_name_translation "/>
<bind nodeset="/data/county/name" type="string" calculate="if( ( selected( /data/county/is_name_generated , 'true') or selected( /data/county/is_name_generated , 'yes') ), /data/county/generated_name , .)" relevant="boolean( /data/county/contact/_id ) or not( /data/county/contact/_id ) or not(selected( /data/county/is_name_generated , 'true')) or not(selected( /data/county/is_name_generated , 'yes'))" required="true()"/>
<bind nodeset="/data/county/name" type="string" required="true()" relevant="boolean( /data/county/contact/_id ) or not( /data/county/contact/_id ) or not(selected( /data/county/is_name_generated , 'true')) or not(selected( /data/county/is_name_generated , 'yes'))" calculate="if( ( selected( /data/county/is_name_generated , 'true') or selected( /data/county/is_name_generated , 'yes') ), /data/county/generated_name , .)"/>
<bind nodeset="/data/county/external_id" type="string"/>
<bind nodeset="/data/county/notes" type="string"/>
<bind nodeset="/data/county/geolocation" type="string" calculate="concat(../../inputs/meta/location/lat, concat(' ', ../../inputs/meta/location/long))"/>
Expand Down

0 comments on commit 4cec2f2

Please sign in to comment.