medic / cht-core

The CHT Core Framework makes it faster to build responsive, offline-first digital health apps that equip health workers to provide better care in their communities. It is a central resource of the Community Health Toolkit.
https://communityhealthtoolkit.org
GNU Affero General Public License v3.0
465 stars 218 forks source link

Order of fields in XML model can break contact creation #1494

Open abbyad opened 9 years ago

abbyad commented 9 years ago

If the <clinic> field is after the <contact> in the contact creation XForm then it gets the following error: GET https://lg.dev.medicmobile.org/medic/PARENT?_nonce=1446151485472 404 (Not Found)

eg this works

        <data id="NFAM" version="2015-10-01">
          <clinic>
            <contact>NEW</contact>
            ...
          </clinic>
          <contact>
            ...
            <parent>PARENT</parent>
          </contact>

and this gets the error

        <data id="NFAM" version="2015-10-01">
          <contact>
            ...
            <parent>PARENT</parent>
          </contact>
          <clinic>
            <contact>NEW</contact>
            ...
          </clinic>
abbyad commented 8 years ago

This is specific our custom work using Enketo, but labeling as Enketo and Documentation for future reference/searches.