Re: InfoPath XSN Validation errors

classic Classic list List threaded Threaded
6 messages Options
John Bowers John Bowers
Reply | Threaded
Open this post in threaded view
|

Re: InfoPath XSN Validation errors

No. I have done the following: duplicate the Basic Form and call it  
Surgical Form, add pulse observation to it, download the XSN, edit it  
in design mode, upload the modified xsn to OpenMRS, everything works.  
Then I duplicated the Basic Form again (called it mortality form),  
this time I removed the weight observation, added a few other basic  
observations (I think cause of death), downloaded the XSN, edit it in  
design mode, upload the modified xsn to OpenMRS. Now if I go to a  
patient and click on the forms tab and open up the surgical form,  
everything works fine. If I open up the mortality form, I get the  
error I showed you below. It seems that if I delete the weight  
observation on the form, then I get this error, but I need to check  
this.

Also, I opened up both of the infopathxml files (for the working  
surgical form and the not working mortality form) and they both have  
xsi:nil as an attribute on most of the nodes in the observation. In  
fact, I'll paste them below:

This one works (note the presence of the apparently invalid xsi:nil  
attributes):


<?xml version="1.0" encoding="UTF-8"?><?mso-infoPathSolution  
name="Surgical - Theatre" href="http://10.211.55.4:8080/openmrs/moduleServlet/formentry/forms/2-0.1-6.xsn 
" solutionVersion="0.1.0.6" productVersion="11.0.6357"  
PIVersion="1.0.0.0" ?><?mso-application progid="InfoPath.Document"?
 ><form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
xmlns:xd="http://schemas.microsoft.com/office/infopath/2003"  
xmlns:openmrs="http://10.211.55.4:8080/openmrs/moduleServlet/formentry/forms/schema/2-6 
" id="2" name="Surgical - Theatre" version="0.1">
   <header>
     <enterer>1^Super User</enterer>
     <date_entered>2008-11-13T02:19:36+03:00</date_entered>
     <session>83ECACF81AC778BB39591314DE097651</session>
     <uid>oT4TGnh9h33pJAcZUv2Z</uid>
   </header>
   <patient>
     <patient.birthdate openmrs_attribute="birthdate"  
openmrs_table="patient">18980101</patient.birthdate>
     <patient.birthdate_estimated  
openmrs_attribute="birthdate_estimated" openmrs_table="patient"></
patient.birthdate_estimated>
     <patient.family_name openmrs_attribute="family_name"  
openmrs_table="patient_name">Wolfe</patient.family_name>
     <patient.given_name openmrs_attribute="given_name"  
openmrs_table="patient_name">Greg</patient.given_name>
     <patient.medical_record_number openmrs_attribute="identifier"  
openmrs_table="patient_identifier"></patient.medical_record_number>
     <patient.middle_name openmrs_attribute="middle_name"  
openmrs_table="patient_name"></patient.middle_name>
     <patient.patient_id openmrs_attribute="patient_id"  
openmrs_table="patient">9</patient.patient_id>
     <patient.sex openmrs_attribute="gender"  
openmrs_table="patient">M</patient.sex>
     <patient.tribe openmrs_attribute="tribe"  
openmrs_table="patient">1^Unknown</patient.tribe>
     <patient_address.address1 openmrs_attribute="address1"  
openmrs_table="patient_address"></patient_address.address1>
     <patient_address.address2 openmrs_attribute="address2"  
openmrs_table="patient_address"></patient_address.address2>
   </patient>
   <encounter>
     <encounter.encounter_datetime  
openmrs_attribute="encounter_datetime" openmrs_table="encounter"/>
     <encounter.location_id openmrs_attribute="location_id"  
openmrs_table="encounter"/>
     <encounter.provider_id openmrs_attribute="provider_id"  
openmrs_table="encounter"/>
   </encounter>
   <obs openmrs_concept="1238^MEDICAL RECORD OBSERVATIONS^99DCT"  
openmrs_datatype="ZZ">
     <weight_kg openmrs_concept="5089^WEIGHT (KG)^99DCT"  
openmrs_datatype="NM">
         <date xsi:nil="true"/>
         <time xsi:nil="true"/>
         <value xsi:nil="true"/>
     </weight_kg>
     <pulse openmrs_concept="5087^PULSE^99DCT" openmrs_datatype="NM">
         <date xsi:nil="true"/>
         <time xsi:nil="true"/>
         <value xsi:nil="true"/>
     </pulse>
   </obs>
   <problem_list openmrs_concept="1284^PROBLEM LIST^99DCT"  
openmrs_datatype="ZZ">
     <problem_added multiple="0" openmrs_concept="6042^PROBLEM  
ADDED^99DCT" openmrs_datatype="CWE">
         <date xsi:nil="true"/>
         <time xsi:nil="true"/>
         <value xsi:nil="true"/>
     </problem_added>
     <problem_resolved multiple="0" openmrs_concept="6097^PROBLEM  
RESOLVED^99DCT" openmrs_datatype="CWE">
         <date xsi:nil="true"/>
         <time xsi:nil="true"/>
         <value xsi:nil="true"/>
     </problem_resolved>
   </problem_list>
   <other/></form>

This one gives me validation errors in infopath:

<?xml version="1.0" encoding="UTF-8"?><?mso-infoPathSolution  
name="Mortality Form (Richard)" href="http://10.211.55.4:8080/openmrs/moduleServlet/formentry/forms/8-0.1-7.xsn 
" solutionVersion="0.1.0.7" productVersion="11.0.6357"  
PIVersion="1.0.0.0" ?><?mso-application progid="InfoPath.Document"?
 ><form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
xmlns:xd="http://schemas.microsoft.com/office/infopath/2003"  
xmlns:openmrs="http://10.211.55.4:8080/openmrs/moduleServlet/formentry/forms/schema/8-7 
" id="8" name="Mortality Form (Richard)" version="0.1">
   <header>
     <enterer>1^Super User</enterer>
     <date_entered>2008-11-13T02:54:49+03:00</date_entered>
     <session>56C3E0E858B922B3FA6CCEBE04D0F206</session>
     <uid>cXftvZYN0gWr8hgGMen0</uid>
   </header>
   <patient>
     <patient.birthdate openmrs_attribute="birthdate"  
openmrs_table="patient">19750101</patient.birthdate>
     <patient.birthdate_estimated  
openmrs_attribute="birthdate_estimated" openmrs_table="patient"></
patient.birthdate_estimated>
     <patient.family_name openmrs_attribute="family_name"  
openmrs_table="patient_name">Patient</patient.family_name>
     <patient.given_name openmrs_attribute="given_name"  
openmrs_table="patient_name">John</patient.given_name>
     <patient.medical_record_number openmrs_attribute="identifier"  
openmrs_table="patient_identifier">100-8</patient.medical_record_number>
     <patient.middle_name openmrs_attribute="middle_name"  
openmrs_table="patient_name">D</patient.middle_name>
     <patient.patient_id openmrs_attribute="patient_id"  
openmrs_table="patient">3</patient.patient_id>
     <patient.sex openmrs_attribute="gender"  
openmrs_table="patient">M</patient.sex>
     <patient.tribe openmrs_attribute="tribe"  
openmrs_table="patient">1^Unknown</patient.tribe>
     <patient_address.address1 openmrs_attribute="address1"  
openmrs_table="patient_address">555 Johnson Rd.</
patient_address.address1>
     <patient_address.address2 openmrs_attribute="address2"  
openmrs_table="patient_address">Apt. 555</patient_address.address2>
   </patient>
   <encounter>
     <encounter.encounter_datetime  
openmrs_attribute="encounter_datetime" openmrs_table="encounter"/>
     <encounter.location_id openmrs_attribute="location_id"  
openmrs_table="encounter"/>
     <encounter.provider_id openmrs_attribute="provider_id"  
openmrs_table="encounter"/>
   </encounter>
   <obs openmrs_concept="1238^MEDICAL RECORD OBSERVATIONS^99DCT"  
openmrs_datatype="ZZ">
     <time_of_death openmrs_concept="1354^TIME OF DEATH^99DCT"  
openmrs_datatype="TM">
         <date xsi:nil="true"/>
         <time xsi:nil="true"/>
         <value xsi:nil="true"/>
     </time_of_death>
     <length_of_stay openmrs_concept="1353^LENGTH OF STAY^99DCT"  
openmrs_datatype="NM">
         <date xsi:nil="true"/>
         <time xsi:nil="true"/>
         <value xsi:nil="true"/>
     </length_of_stay>
     <resuscitation_status multiple="0"  
openmrs_concept="1355^RESUSCITATION STATUS^99DCT"  
openmrs_datatype="CWE">
         <date xsi:nil="true"/>
         <time xsi:nil="true"/>
         <value xsi:nil="true"/>
     </resuscitation_status>
     <resuscitation_attempted multiple="0"  
openmrs_concept="1359^RESUSCITATION ATTEMPTED^99DCT"  
openmrs_datatype="CWE">
         <date xsi:nil="true"/>
         <time xsi:nil="true"/>
         <value xsi:nil="true"/>
     </resuscitation_attempted>
     <temperature_c openmrs_concept="5088^TEMPERATURE (C)^99DCT"  
openmrs_datatype="NM">
         <date xsi:nil="true"/>
         <time xsi:nil="true"/>
         <value xsi:nil="true"/>
     </temperature_c>
     <pulse openmrs_concept="5087^PULSE^99DCT" openmrs_datatype="NM">
         <date xsi:nil="true"/>
         <time xsi:nil="true"/>
         <value xsi:nil="true"/>
     </pulse>
     <hemoglobin openmrs_concept="21^HEMOGLOBIN^99DCT"  
openmrs_datatype="NM">
         <date xsi:nil="true"/>
         <time xsi:nil="true"/>
         <value xsi:nil="true"/>
     </hemoglobin>
     <where_vitals_taken_in_the_last_24hrs multiple="0"  
openmrs_concept="1360^WHERE VITALS TAKEN IN THE LAST 24HRS^99DCT"  
openmrs_datatype="CWE">
         <date xsi:nil="true"/>
         <time xsi:nil="true"/>
         <value xsi:nil="true"/>
     </where_vitals_taken_in_the_last_24hrs>
     <was_an_investigation_done_in_the_last_24hrs multiple="0"  
openmrs_concept="1361^WAS AN INVESTIGATION DONE IN THE LAST  
24HRS^99DCT" openmrs_datatype="CWE">
         <date xsi:nil="true"/>
         <time xsi:nil="true"/>
         <value xsi:nil="true"/>
     </was_an_investigation_done_in_the_last_24hrs>
     <cause_of_death multiple="0" openmrs_concept="5002^CAUSE OF  
DEATH^99DCT" openmrs_datatype="CWE">
         <date xsi:nil="true"/>
         <time xsi:nil="true"/>
         <value xsi:nil="true"/>
     </cause_of_death>
     <doctor_comments openmrs_concept="1362^DOCTOR COMMENTS^99DCT"  
openmrs_datatype="ST">
         <date xsi:nil="true"/>
         <time xsi:nil="true"/>
         <value xsi:nil="true"/>
     </doctor_comments>
     <nursing_comments openmrs_concept="1363^NURSING COMMENTS^99DCT"  
openmrs_datatype="ST">
         <date xsi:nil="true"/>
         <time xsi:nil="true"/>
         <value xsi:nil="true"/>
     </nursing_comments>
     <elective_student_comments openmrs_concept="1364^ELECTIVE STUDENT  
COMMENTS^99DCT" openmrs_datatype="ST">
         <date xsi:nil="true"/>
         <time xsi:nil="true"/>
         <value xsi:nil="true"/>
     </elective_student_comments>
     <case_summary openmrs_concept="1365^CASE SUMMARY^99DCT"  
openmrs_datatype="ST">
         <date xsi:nil="true"/>
         <time xsi:nil="true"/>
         <value xsi:nil="true"/>
     </case_summary>
   </obs>
   <problem_list openmrs_concept="1284^PROBLEM LIST^99DCT"  
openmrs_datatype="ZZ">
     <problem_added multiple="0" openmrs_concept="6042^PROBLEM  
ADDED^99DCT" openmrs_datatype="CWE">
         <date xsi:nil="true"/>
         <time xsi:nil="true"/>
         <value xsi:nil="true"/>
     </problem_added>
     <problem_resolved multiple="0" openmrs_concept="6097^PROBLEM  
RESOLVED^99DCT" openmrs_datatype="CWE">
         <date xsi:nil="true"/>
         <time xsi:nil="true"/>
         <value xsi:nil="true"/>
     </problem_resolved>
   </problem_list>
   <other/></form>


Thanks,
John

On Nov 13, 2008, at 4:50 PM, Yeung, Ada K. wrote:

> Are you trying to programmatically set a value on this node?  If so,  
> it means the element is present with no value/no content  is  
> associated with it.  Please check the datatype for this concept.
>
> Thanks!
>
> --Ada
> ________________________________________
> From: [hidden email] [[hidden email]] On Behalf  
> Of John Bowers [[hidden email]]
> Sent: Wednesday, November 12, 2008 1:46 PM
> To: [hidden email]
> Subject: [OPENMRS-IMPLEMENTERS] InfoPath XSN Validation errors
>
> I have got the installation working and am testing out the form
> module. I downloaded one form in design mode, edited it, updated it,
> and everything works fine. Loaded a patient and grabbed the form,
> filled it out, submitted it and then it showed up as an encounter.
> Then I decided to start a mortality form. I have added a single
> concept: cause of death to the form. The design part works fine, but
> when I try to fill it out for an actual patient I get the message:
>
> InfoPath cannot open the following file:
> Mortality_Form_3(7-0.1-4).infopathxml
> The form contains schema validation errors.
>
> The details are:
>
> xsi:nil attribute on element 'value' is invalid.
>
>
> What am I doing wrong?
>
> Thanks,
> John
>
> _________________________________________
>
> To unsubscribe from OpenMRS Implementers' mailing list, send an e-
> mail to [hidden email] with "SIGNOFF openmrs-implement-
> l" in the  body (not the subject) of your e-mail.
>
> [mailto:[hidden email]?body=SIGNOFF%20openmrs-implement-
> l]
> _________________________________________
>
> To unsubscribe from OpenMRS Implementers' mailing list, send an e-
> mail to [hidden email] with "SIGNOFF openmrs-implement-
> l" in the  body (not the subject) of your e-mail.
>
> [mailto:[hidden email]?body=SIGNOFF%20openmrs-implement-
> l]

_________________________________________

To unsubscribe from OpenMRS Implementers' mailing list, send an e-mail to [hidden email] with "SIGNOFF openmrs-implement-l" in the  body (not the subject) of your e-mail.

[mailto:[hidden email]?body=SIGNOFF%20openmrs-implement-l]
Ben Wolfe Ben Wolfe
Reply | Threaded
Open this post in threaded view
|

Re: InfoPath XSN Validation errors

After you remove the "weight" from the schema in the openmrs webapp, do
you also remove it from the page in the infopath design process?  I
can't remember if its in there by default, but if the page in infopath
is still referring to weight, it might be a problem.

I think the xsi:nil is supposed to be there for those other attributes.
  It gets removed when the user fills in a value.

Ben

John Bowers wrote:

> No. I have done the following: duplicate the Basic Form and call it
> Surgical Form, add pulse observation to it, download the XSN, edit it in
> design mode, upload the modified xsn to OpenMRS, everything works. Then
> I duplicated the Basic Form again (called it mortality form), this time
> I removed the weight observation, added a few other basic observations
> (I think cause of death), downloaded the XSN, edit it in design mode,
> upload the modified xsn to OpenMRS. Now if I go to a patient and click
> on the forms tab and open up the surgical form, everything works fine.
> If I open up the mortality form, I get the error I showed you below. It
> seems that if I delete the weight observation on the form, then I get
> this error, but I need to check this.
>
> Also, I opened up both of the infopathxml files (for the working
> surgical form and the not working mortality form) and they both have
> xsi:nil as an attribute on most of the nodes in the observation. In
> fact, I'll paste them below:
>
> This one works (note the presence of the apparently invalid xsi:nil
> attributes):
>
>
> <?xml version="1.0" encoding="UTF-8"?><?mso-infoPathSolution
> name="Surgical - Theatre"
> href="http://10.211.55.4:8080/openmrs/moduleServlet/formentry/forms/2-0.1-6.xsn"
> solutionVersion="0.1.0.6" productVersion="11.0.6357" PIVersion="1.0.0.0"
> ?><?mso-application progid="InfoPath.Document"?><form
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xd="http://schemas.microsoft.com/office/infopath/2003"
> xmlns:openmrs="http://10.211.55.4:8080/openmrs/moduleServlet/formentry/forms/schema/2-6"
> id="2" name="Surgical - Theatre" version="0.1">
>   <header>
>     <enterer>1^Super User</enterer>
>     <date_entered>2008-11-13T02:19:36+03:00</date_entered>
>     <session>83ECACF81AC778BB39591314DE097651</session>
>     <uid>oT4TGnh9h33pJAcZUv2Z</uid>
>   </header>
>   <patient>
>     <patient.birthdate openmrs_attribute="birthdate"
> openmrs_table="patient">18980101</patient.birthdate>
>     <patient.birthdate_estimated openmrs_attribute="birthdate_estimated"
> openmrs_table="patient"></patient.birthdate_estimated>
>     <patient.family_name openmrs_attribute="family_name"
> openmrs_table="patient_name">Wolfe</patient.family_name>
>     <patient.given_name openmrs_attribute="given_name"
> openmrs_table="patient_name">Greg</patient.given_name>
>     <patient.medical_record_number openmrs_attribute="identifier"
> openmrs_table="patient_identifier"></patient.medical_record_number>
>     <patient.middle_name openmrs_attribute="middle_name"
> openmrs_table="patient_name"></patient.middle_name>
>     <patient.patient_id openmrs_attribute="patient_id"
> openmrs_table="patient">9</patient.patient_id>
>     <patient.sex openmrs_attribute="gender"
> openmrs_table="patient">M</patient.sex>
>     <patient.tribe openmrs_attribute="tribe"
> openmrs_table="patient">1^Unknown</patient.tribe>
>     <patient_address.address1 openmrs_attribute="address1"
> openmrs_table="patient_address"></patient_address.address1>
>     <patient_address.address2 openmrs_attribute="address2"
> openmrs_table="patient_address"></patient_address.address2>
>   </patient>
>   <encounter>
>     <encounter.encounter_datetime openmrs_attribute="encounter_datetime"
> openmrs_table="encounter"/>
>     <encounter.location_id openmrs_attribute="location_id"
> openmrs_table="encounter"/>
>     <encounter.provider_id openmrs_attribute="provider_id"
> openmrs_table="encounter"/>
>   </encounter>
>   <obs openmrs_concept="1238^MEDICAL RECORD OBSERVATIONS^99DCT"
> openmrs_datatype="ZZ">
>     <weight_kg openmrs_concept="5089^WEIGHT (KG)^99DCT"
> openmrs_datatype="NM">
>         <date xsi:nil="true"/>
>         <time xsi:nil="true"/>
>         <value xsi:nil="true"/>
>     </weight_kg>
>     <pulse openmrs_concept="5087^PULSE^99DCT" openmrs_datatype="NM">
>         <date xsi:nil="true"/>
>         <time xsi:nil="true"/>
>         <value xsi:nil="true"/>
>     </pulse>
>   </obs>
>   <problem_list openmrs_concept="1284^PROBLEM LIST^99DCT"
> openmrs_datatype="ZZ">
>     <problem_added multiple="0" openmrs_concept="6042^PROBLEM
> ADDED^99DCT" openmrs_datatype="CWE">
>         <date xsi:nil="true"/>
>         <time xsi:nil="true"/>
>         <value xsi:nil="true"/>
>     </problem_added>
>     <problem_resolved multiple="0" openmrs_concept="6097^PROBLEM
> RESOLVED^99DCT" openmrs_datatype="CWE">
>         <date xsi:nil="true"/>
>         <time xsi:nil="true"/>
>         <value xsi:nil="true"/>
>     </problem_resolved>
>   </problem_list>
>   <other/></form>
>
> This one gives me validation errors in infopath:
>
> <?xml version="1.0" encoding="UTF-8"?><?mso-infoPathSolution
> name="Mortality Form (Richard)"
> href="http://10.211.55.4:8080/openmrs/moduleServlet/formentry/forms/8-0.1-7.xsn"
> solutionVersion="0.1.0.7" productVersion="11.0.6357" PIVersion="1.0.0.0"
> ?><?mso-application progid="InfoPath.Document"?><form
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xd="http://schemas.microsoft.com/office/infopath/2003"
> xmlns:openmrs="http://10.211.55.4:8080/openmrs/moduleServlet/formentry/forms/schema/8-7"
> id="8" name="Mortality Form (Richard)" version="0.1">
>   <header>
>     <enterer>1^Super User</enterer>
>     <date_entered>2008-11-13T02:54:49+03:00</date_entered>
>     <session>56C3E0E858B922B3FA6CCEBE04D0F206</session>
>     <uid>cXftvZYN0gWr8hgGMen0</uid>
>   </header>
>   <patient>
>     <patient.birthdate openmrs_attribute="birthdate"
> openmrs_table="patient">19750101</patient.birthdate>
>     <patient.birthdate_estimated openmrs_attribute="birthdate_estimated"
> openmrs_table="patient"></patient.birthdate_estimated>
>     <patient.family_name openmrs_attribute="family_name"
> openmrs_table="patient_name">Patient</patient.family_name>
>     <patient.given_name openmrs_attribute="given_name"
> openmrs_table="patient_name">John</patient.given_name>
>     <patient.medical_record_number openmrs_attribute="identifier"
> openmrs_table="patient_identifier">100-8</patient.medical_record_number>
>     <patient.middle_name openmrs_attribute="middle_name"
> openmrs_table="patient_name">D</patient.middle_name>
>     <patient.patient_id openmrs_attribute="patient_id"
> openmrs_table="patient">3</patient.patient_id>
>     <patient.sex openmrs_attribute="gender"
> openmrs_table="patient">M</patient.sex>
>     <patient.tribe openmrs_attribute="tribe"
> openmrs_table="patient">1^Unknown</patient.tribe>
>     <patient_address.address1 openmrs_attribute="address1"
> openmrs_table="patient_address">555 Johnson Rd.</patient_address.address1>
>     <patient_address.address2 openmrs_attribute="address2"
> openmrs_table="patient_address">Apt. 555</patient_address.address2>
>   </patient>
>   <encounter>
>     <encounter.encounter_datetime openmrs_attribute="encounter_datetime"
> openmrs_table="encounter"/>
>     <encounter.location_id openmrs_attribute="location_id"
> openmrs_table="encounter"/>
>     <encounter.provider_id openmrs_attribute="provider_id"
> openmrs_table="encounter"/>
>   </encounter>
>   <obs openmrs_concept="1238^MEDICAL RECORD OBSERVATIONS^99DCT"
> openmrs_datatype="ZZ">
>     <time_of_death openmrs_concept="1354^TIME OF DEATH^99DCT"
> openmrs_datatype="TM">
>         <date xsi:nil="true"/>
>         <time xsi:nil="true"/>
>         <value xsi:nil="true"/>
>     </time_of_death>
>     <length_of_stay openmrs_concept="1353^LENGTH OF STAY^99DCT"
> openmrs_datatype="NM">
>         <date xsi:nil="true"/>
>         <time xsi:nil="true"/>
>         <value xsi:nil="true"/>
>     </length_of_stay>
>     <resuscitation_status multiple="0"
> openmrs_concept="1355^RESUSCITATION STATUS^99DCT" openmrs_datatype="CWE">
>         <date xsi:nil="true"/>
>         <time xsi:nil="true"/>
>         <value xsi:nil="true"/>
>     </resuscitation_status>
>     <resuscitation_attempted multiple="0"
> openmrs_concept="1359^RESUSCITATION ATTEMPTED^99DCT"
> openmrs_datatype="CWE">
>         <date xsi:nil="true"/>
>         <time xsi:nil="true"/>
>         <value xsi:nil="true"/>
>     </resuscitation_attempted>
>     <temperature_c openmrs_concept="5088^TEMPERATURE (C)^99DCT"
> openmrs_datatype="NM">
>         <date xsi:nil="true"/>
>         <time xsi:nil="true"/>
>         <value xsi:nil="true"/>
>     </temperature_c>
>     <pulse openmrs_concept="5087^PULSE^99DCT" openmrs_datatype="NM">
>         <date xsi:nil="true"/>
>         <time xsi:nil="true"/>
>         <value xsi:nil="true"/>
>     </pulse>
>     <hemoglobin openmrs_concept="21^HEMOGLOBIN^99DCT"
> openmrs_datatype="NM">
>         <date xsi:nil="true"/>
>         <time xsi:nil="true"/>
>         <value xsi:nil="true"/>
>     </hemoglobin>
>     <where_vitals_taken_in_the_last_24hrs multiple="0"
> openmrs_concept="1360^WHERE VITALS TAKEN IN THE LAST 24HRS^99DCT"
> openmrs_datatype="CWE">
>         <date xsi:nil="true"/>
>         <time xsi:nil="true"/>
>         <value xsi:nil="true"/>
>     </where_vitals_taken_in_the_last_24hrs>
>     <was_an_investigation_done_in_the_last_24hrs multiple="0"
> openmrs_concept="1361^WAS AN INVESTIGATION DONE IN THE LAST 24HRS^99DCT"
> openmrs_datatype="CWE">
>         <date xsi:nil="true"/>
>         <time xsi:nil="true"/>
>         <value xsi:nil="true"/>
>     </was_an_investigation_done_in_the_last_24hrs>
>     <cause_of_death multiple="0" openmrs_concept="5002^CAUSE OF
> DEATH^99DCT" openmrs_datatype="CWE">
>         <date xsi:nil="true"/>
>         <time xsi:nil="true"/>
>         <value xsi:nil="true"/>
>     </cause_of_death>
>     <doctor_comments openmrs_concept="1362^DOCTOR COMMENTS^99DCT"
> openmrs_datatype="ST">
>         <date xsi:nil="true"/>
>         <time xsi:nil="true"/>
>         <value xsi:nil="true"/>
>     </doctor_comments>
>     <nursing_comments openmrs_concept="1363^NURSING COMMENTS^99DCT"
> openmrs_datatype="ST">
>         <date xsi:nil="true"/>
>         <time xsi:nil="true"/>
>         <value xsi:nil="true"/>
>     </nursing_comments>
>     <elective_student_comments openmrs_concept="1364^ELECTIVE STUDENT
> COMMENTS^99DCT" openmrs_datatype="ST">
>         <date xsi:nil="true"/>
>         <time xsi:nil="true"/>
>         <value xsi:nil="true"/>
>     </elective_student_comments>
>     <case_summary openmrs_concept="1365^CASE SUMMARY^99DCT"
> openmrs_datatype="ST">
>         <date xsi:nil="true"/>
>         <time xsi:nil="true"/>
>         <value xsi:nil="true"/>
>     </case_summary>
>   </obs>
>   <problem_list openmrs_concept="1284^PROBLEM LIST^99DCT"
> openmrs_datatype="ZZ">
>     <problem_added multiple="0" openmrs_concept="6042^PROBLEM
> ADDED^99DCT" openmrs_datatype="CWE">
>         <date xsi:nil="true"/>
>         <time xsi:nil="true"/>
>         <value xsi:nil="true"/>
>     </problem_added>
>     <problem_resolved multiple="0" openmrs_concept="6097^PROBLEM
> RESOLVED^99DCT" openmrs_datatype="CWE">
>         <date xsi:nil="true"/>
>         <time xsi:nil="true"/>
>         <value xsi:nil="true"/>
>     </problem_resolved>
>   </problem_list>
>   <other/></form>
>
>
> Thanks,
> John
>
> On Nov 13, 2008, at 4:50 PM, Yeung, Ada K. wrote:
>
>> Are you trying to programmatically set a value on this node?  If so,
>> it means the element is present with no value/no content  is
>> associated with it.  Please check the datatype for this concept.
>>
>> Thanks!
>>
>> --Ada
>> ________________________________________
>> From: [hidden email] [[hidden email]] On Behalf Of
>> John Bowers [[hidden email]]
>> Sent: Wednesday, November 12, 2008 1:46 PM
>> To: [hidden email]
>> Subject: [OPENMRS-IMPLEMENTERS] InfoPath XSN Validation errors
>>
>> I have got the installation working and am testing out the form
>> module. I downloaded one form in design mode, edited it, updated it,
>> and everything works fine. Loaded a patient and grabbed the form,
>> filled it out, submitted it and then it showed up as an encounter.
>> Then I decided to start a mortality form. I have added a single
>> concept: cause of death to the form. The design part works fine, but
>> when I try to fill it out for an actual patient I get the message:
>>
>> InfoPath cannot open the following file:
>> Mortality_Form_3(7-0.1-4).infopathxml
>> The form contains schema validation errors.
>>
>> The details are:
>>
>> xsi:nil attribute on element 'value' is invalid.
>>
>>
>> What am I doing wrong?
>>
>> Thanks,
>> John
>>
>> _________________________________________
>>
>> To unsubscribe from OpenMRS Implementers' mailing list, send an e-mail
>> to [hidden email] with "SIGNOFF openmrs-implement-l" in
>> the  body (not the subject) of your e-mail.
>>
>> [mailto:[hidden email]?body=SIGNOFF%20openmrs-implement-l]
>> _________________________________________
>>
>> To unsubscribe from OpenMRS Implementers' mailing list, send an e-mail
>> to [hidden email] with "SIGNOFF openmrs-implement-l" in
>> the  body (not the subject) of your e-mail.
>>
>> [mailto:[hidden email]?body=SIGNOFF%20openmrs-implement-l]
>
> _________________________________________
>
> To unsubscribe from OpenMRS Implementers' mailing list, send an e-mail
> to [hidden email] with "SIGNOFF openmrs-implement-l" in
> the  body (not the subject) of your e-mail.
>
> [mailto:[hidden email]?body=SIGNOFF%20openmrs-implement-l]

_________________________________________

To unsubscribe from OpenMRS Implementers' mailing list, send an e-mail to [hidden email] with "SIGNOFF openmrs-implement-l" in the  body (not the subject) of your e-mail.

[mailto:[hidden email]?body=SIGNOFF%20openmrs-implement-l]
John Bowers John Bowers
Reply | Threaded
Open this post in threaded view
|

Re: InfoPath XSN Validation errors

It doesn't appear on the infopath form.


On Nov 14, 2008, at 7:05 PM, Ben Wolfe wrote:

> After you remove the "weight" from the schema in the openmrs webapp,  
> do you also remove it from the page in the infopath design process?  
> I can't remember if its in there by default, but if the page in  
> infopath is still referring to weight, it might be a problem.
>
> I think the xsi:nil is supposed to be there for those other  
> attributes.  It gets removed when the user fills in a value.
>
> Ben
>
> John Bowers wrote:
>> No. I have done the following: duplicate the Basic Form and call it  
>> Surgical Form, add pulse observation to it, download the XSN, edit  
>> it in design mode, upload the modified xsn to OpenMRS, everything  
>> works. Then I duplicated the Basic Form again (called it mortality  
>> form), this time I removed the weight observation, added a few  
>> other basic observations (I think cause of death), downloaded the  
>> XSN, edit it in design mode, upload the modified xsn to OpenMRS.  
>> Now if I go to a patient and click on the forms tab and open up the  
>> surgical form, everything works fine. If I open up the mortality  
>> form, I get the error I showed you below. It seems that if I delete  
>> the weight observation on the form, then I get this error, but I  
>> need to check this.
>> Also, I opened up both of the infopathxml files (for the working  
>> surgical form and the not working mortality form) and they both  
>> have xsi:nil as an attribute on most of the nodes in the  
>> observation. In fact, I'll paste them below:
>> This one works (note the presence of the apparently invalid xsi:nil  
>> attributes):
>> <?xml version="1.0" encoding="UTF-8"?><?mso-infoPathSolution  
>> name="Surgical - Theatre" href="http://10.211.55.4:8080/openmrs/moduleServlet/formentry/forms/2-0.1-6.xsn 
>> " solutionVersion="0.1.0.6" productVersion="11.0.6357"  
>> PIVersion="1.0.0.0" ?><?mso-application progid="InfoPath.Document"?
>> ><form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
>> xmlns:xd="http://schemas.microsoft.com/office/infopath/2003"  
>> xmlns:openmrs="http://10.211.55.4:8080/openmrs/moduleServlet/formentry/forms/schema/2-6 
>> " id="2" name="Surgical - Theatre" version="0.1">
>>  <header>
>>    <enterer>1^Super User</enterer>
>>    <date_entered>2008-11-13T02:19:36+03:00</date_entered>
>>    <session>83ECACF81AC778BB39591314DE097651</session>
>>    <uid>oT4TGnh9h33pJAcZUv2Z</uid>
>>  </header>
>>  <patient>
>>    <patient.birthdate openmrs_attribute="birthdate"  
>> openmrs_table="patient">18980101</patient.birthdate>
>>    <patient.birthdate_estimated  
>> openmrs_attribute="birthdate_estimated" openmrs_table="patient"></
>> patient.birthdate_estimated>
>>    <patient.family_name openmrs_attribute="family_name"  
>> openmrs_table="patient_name">Wolfe</patient.family_name>
>>    <patient.given_name openmrs_attribute="given_name"  
>> openmrs_table="patient_name">Greg</patient.given_name>
>>    <patient.medical_record_number openmrs_attribute="identifier"  
>> openmrs_table="patient_identifier"></patient.medical_record_number>
>>    <patient.middle_name openmrs_attribute="middle_name"  
>> openmrs_table="patient_name"></patient.middle_name>
>>    <patient.patient_id openmrs_attribute="patient_id"  
>> openmrs_table="patient">9</patient.patient_id>
>>    <patient.sex openmrs_attribute="gender"  
>> openmrs_table="patient">M</patient.sex>
>>    <patient.tribe openmrs_attribute="tribe"  
>> openmrs_table="patient">1^Unknown</patient.tribe>
>>    <patient_address.address1 openmrs_attribute="address1"  
>> openmrs_table="patient_address"></patient_address.address1>
>>    <patient_address.address2 openmrs_attribute="address2"  
>> openmrs_table="patient_address"></patient_address.address2>
>>  </patient>
>>  <encounter>
>>    <encounter.encounter_datetime  
>> openmrs_attribute="encounter_datetime" openmrs_table="encounter"/>
>>    <encounter.location_id openmrs_attribute="location_id"  
>> openmrs_table="encounter"/>
>>    <encounter.provider_id openmrs_attribute="provider_id"  
>> openmrs_table="encounter"/>
>>  </encounter>
>>  <obs openmrs_concept="1238^MEDICAL RECORD OBSERVATIONS^99DCT"  
>> openmrs_datatype="ZZ">
>>    <weight_kg openmrs_concept="5089^WEIGHT (KG)^99DCT"  
>> openmrs_datatype="NM">
>>        <date xsi:nil="true"/>
>>        <time xsi:nil="true"/>
>>        <value xsi:nil="true"/>
>>    </weight_kg>
>>    <pulse openmrs_concept="5087^PULSE^99DCT" openmrs_datatype="NM">
>>        <date xsi:nil="true"/>
>>        <time xsi:nil="true"/>
>>        <value xsi:nil="true"/>
>>    </pulse>
>>  </obs>
>>  <problem_list openmrs_concept="1284^PROBLEM LIST^99DCT"  
>> openmrs_datatype="ZZ">
>>    <problem_added multiple="0" openmrs_concept="6042^PROBLEM  
>> ADDED^99DCT" openmrs_datatype="CWE">
>>        <date xsi:nil="true"/>
>>        <time xsi:nil="true"/>
>>        <value xsi:nil="true"/>
>>    </problem_added>
>>    <problem_resolved multiple="0" openmrs_concept="6097^PROBLEM  
>> RESOLVED^99DCT" openmrs_datatype="CWE">
>>        <date xsi:nil="true"/>
>>        <time xsi:nil="true"/>
>>        <value xsi:nil="true"/>
>>    </problem_resolved>
>>  </problem_list>
>>  <other/></form>
>> This one gives me validation errors in infopath:
>> <?xml version="1.0" encoding="UTF-8"?><?mso-infoPathSolution  
>> name="Mortality Form (Richard)" href="http://10.211.55.4:8080/openmrs/moduleServlet/formentry/forms/8-0.1-7.xsn 
>> " solutionVersion="0.1.0.7" productVersion="11.0.6357"  
>> PIVersion="1.0.0.0" ?><?mso-application progid="InfoPath.Document"?
>> ><form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
>> xmlns:xd="http://schemas.microsoft.com/office/infopath/2003"  
>> xmlns:openmrs="http://10.211.55.4:8080/openmrs/moduleServlet/formentry/forms/schema/8-7 
>> " id="8" name="Mortality Form (Richard)" version="0.1">
>>  <header>
>>    <enterer>1^Super User</enterer>
>>    <date_entered>2008-11-13T02:54:49+03:00</date_entered>
>>    <session>56C3E0E858B922B3FA6CCEBE04D0F206</session>
>>    <uid>cXftvZYN0gWr8hgGMen0</uid>
>>  </header>
>>  <patient>
>>    <patient.birthdate openmrs_attribute="birthdate"  
>> openmrs_table="patient">19750101</patient.birthdate>
>>    <patient.birthdate_estimated  
>> openmrs_attribute="birthdate_estimated" openmrs_table="patient"></
>> patient.birthdate_estimated>
>>    <patient.family_name openmrs_attribute="family_name"  
>> openmrs_table="patient_name">Patient</patient.family_name>
>>    <patient.given_name openmrs_attribute="given_name"  
>> openmrs_table="patient_name">John</patient.given_name>
>>    <patient.medical_record_number openmrs_attribute="identifier"  
>> openmrs_table="patient_identifier">100-8</
>> patient.medical_record_number>
>>    <patient.middle_name openmrs_attribute="middle_name"  
>> openmrs_table="patient_name">D</patient.middle_name>
>>    <patient.patient_id openmrs_attribute="patient_id"  
>> openmrs_table="patient">3</patient.patient_id>
>>    <patient.sex openmrs_attribute="gender"  
>> openmrs_table="patient">M</patient.sex>
>>    <patient.tribe openmrs_attribute="tribe"  
>> openmrs_table="patient">1^Unknown</patient.tribe>
>>    <patient_address.address1 openmrs_attribute="address1"  
>> openmrs_table="patient_address">555 Johnson Rd.</
>> patient_address.address1>
>>    <patient_address.address2 openmrs_attribute="address2"  
>> openmrs_table="patient_address">Apt. 555</patient_address.address2>
>>  </patient>
>>  <encounter>
>>    <encounter.encounter_datetime  
>> openmrs_attribute="encounter_datetime" openmrs_table="encounter"/>
>>    <encounter.location_id openmrs_attribute="location_id"  
>> openmrs_table="encounter"/>
>>    <encounter.provider_id openmrs_attribute="provider_id"  
>> openmrs_table="encounter"/>
>>  </encounter>
>>  <obs openmrs_concept="1238^MEDICAL RECORD OBSERVATIONS^99DCT"  
>> openmrs_datatype="ZZ">
>>    <time_of_death openmrs_concept="1354^TIME OF DEATH^99DCT"  
>> openmrs_datatype="TM">
>>        <date xsi:nil="true"/>
>>        <time xsi:nil="true"/>
>>        <value xsi:nil="true"/>
>>    </time_of_death>
>>    <length_of_stay openmrs_concept="1353^LENGTH OF STAY^99DCT"  
>> openmrs_datatype="NM">
>>        <date xsi:nil="true"/>
>>        <time xsi:nil="true"/>
>>        <value xsi:nil="true"/>
>>    </length_of_stay>
>>    <resuscitation_status multiple="0"  
>> openmrs_concept="1355^RESUSCITATION STATUS^99DCT"  
>> openmrs_datatype="CWE">
>>        <date xsi:nil="true"/>
>>        <time xsi:nil="true"/>
>>        <value xsi:nil="true"/>
>>    </resuscitation_status>
>>    <resuscitation_attempted multiple="0"  
>> openmrs_concept="1359^RESUSCITATION ATTEMPTED^99DCT"  
>> openmrs_datatype="CWE">
>>        <date xsi:nil="true"/>
>>        <time xsi:nil="true"/>
>>        <value xsi:nil="true"/>
>>    </resuscitation_attempted>
>>    <temperature_c openmrs_concept="5088^TEMPERATURE (C)^99DCT"  
>> openmrs_datatype="NM">
>>        <date xsi:nil="true"/>
>>        <time xsi:nil="true"/>
>>        <value xsi:nil="true"/>
>>    </temperature_c>
>>    <pulse openmrs_concept="5087^PULSE^99DCT" openmrs_datatype="NM">
>>        <date xsi:nil="true"/>
>>        <time xsi:nil="true"/>
>>        <value xsi:nil="true"/>
>>    </pulse>
>>    <hemoglobin openmrs_concept="21^HEMOGLOBIN^99DCT"  
>> openmrs_datatype="NM">
>>        <date xsi:nil="true"/>
>>        <time xsi:nil="true"/>
>>        <value xsi:nil="true"/>
>>    </hemoglobin>
>>    <where_vitals_taken_in_the_last_24hrs multiple="0"  
>> openmrs_concept="1360^WHERE VITALS TAKEN IN THE LAST 24HRS^99DCT"  
>> openmrs_datatype="CWE">
>>        <date xsi:nil="true"/>
>>        <time xsi:nil="true"/>
>>        <value xsi:nil="true"/>
>>    </where_vitals_taken_in_the_last_24hrs>
>>    <was_an_investigation_done_in_the_last_24hrs multiple="0"  
>> openmrs_concept="1361^WAS AN INVESTIGATION DONE IN THE LAST  
>> 24HRS^99DCT" openmrs_datatype="CWE">
>>        <date xsi:nil="true"/>
>>        <time xsi:nil="true"/>
>>        <value xsi:nil="true"/>
>>    </was_an_investigation_done_in_the_last_24hrs>
>>    <cause_of_death multiple="0" openmrs_concept="5002^CAUSE OF  
>> DEATH^99DCT" openmrs_datatype="CWE">
>>        <date xsi:nil="true"/>
>>        <time xsi:nil="true"/>
>>        <value xsi:nil="true"/>
>>    </cause_of_death>
>>    <doctor_comments openmrs_concept="1362^DOCTOR COMMENTS^99DCT"  
>> openmrs_datatype="ST">
>>        <date xsi:nil="true"/>
>>        <time xsi:nil="true"/>
>>        <value xsi:nil="true"/>
>>    </doctor_comments>
>>    <nursing_comments openmrs_concept="1363^NURSING COMMENTS^99DCT"  
>> openmrs_datatype="ST">
>>        <date xsi:nil="true"/>
>>        <time xsi:nil="true"/>
>>        <value xsi:nil="true"/>
>>    </nursing_comments>
>>    <elective_student_comments openmrs_concept="1364^ELECTIVE  
>> STUDENT COMMENTS^99DCT" openmrs_datatype="ST">
>>        <date xsi:nil="true"/>
>>        <time xsi:nil="true"/>
>>        <value xsi:nil="true"/>
>>    </elective_student_comments>
>>    <case_summary openmrs_concept="1365^CASE SUMMARY^99DCT"  
>> openmrs_datatype="ST">
>>        <date xsi:nil="true"/>
>>        <time xsi:nil="true"/>
>>        <value xsi:nil="true"/>
>>    </case_summary>
>>  </obs>
>>  <problem_list openmrs_concept="1284^PROBLEM LIST^99DCT"  
>> openmrs_datatype="ZZ">
>>    <problem_added multiple="0" openmrs_concept="6042^PROBLEM  
>> ADDED^99DCT" openmrs_datatype="CWE">
>>        <date xsi:nil="true"/>
>>        <time xsi:nil="true"/>
>>        <value xsi:nil="true"/>
>>    </problem_added>
>>    <problem_resolved multiple="0" openmrs_concept="6097^PROBLEM  
>> RESOLVED^99DCT" openmrs_datatype="CWE">
>>        <date xsi:nil="true"/>
>>        <time xsi:nil="true"/>
>>        <value xsi:nil="true"/>
>>    </problem_resolved>
>>  </problem_list>
>>  <other/></form>
>> Thanks,
>> John
>> On Nov 13, 2008, at 4:50 PM, Yeung, Ada K. wrote:
>>> Are you trying to programmatically set a value on this node?  If  
>>> so, it means the element is present with no value/no content  is  
>>> associated with it.  Please check the datatype for this concept.
>>>
>>> Thanks!
>>>
>>> --Ada
>>> ________________________________________
>>> From: [hidden email] [[hidden email]] On  
>>> Behalf Of John Bowers [[hidden email]]
>>> Sent: Wednesday, November 12, 2008 1:46 PM
>>> To: [hidden email]
>>> Subject: [OPENMRS-IMPLEMENTERS] InfoPath XSN Validation errors
>>>
>>> I have got the installation working and am testing out the form
>>> module. I downloaded one form in design mode, edited it, updated it,
>>> and everything works fine. Loaded a patient and grabbed the form,
>>> filled it out, submitted it and then it showed up as an encounter.
>>> Then I decided to start a mortality form. I have added a single
>>> concept: cause of death to the form. The design part works fine, but
>>> when I try to fill it out for an actual patient I get the message:
>>>
>>> InfoPath cannot open the following file:
>>> Mortality_Form_3(7-0.1-4).infopathxml
>>> The form contains schema validation errors.
>>>
>>> The details are:
>>>
>>> xsi:nil attribute on element 'value' is invalid.
>>>
>>>
>>> What am I doing wrong?
>>>
>>> Thanks,
>>> John
>>>
>>> _________________________________________
>>>
>>> To unsubscribe from OpenMRS Implementers' mailing list, send an e-
>>> mail to [hidden email] with "SIGNOFF openmrs-
>>> implement-l" in the  body (not the subject) of your e-mail.
>>>
>>> [mailto:[hidden email]?body=SIGNOFF%20openmrs-implement-l
>>> ]
>>> _________________________________________
>>>
>>> To unsubscribe from OpenMRS Implementers' mailing list, send an e-
>>> mail to [hidden email] with "SIGNOFF openmrs-
>>> implement-l" in the  body (not the subject) of your e-mail.
>>>
>>> [mailto:[hidden email]?body=SIGNOFF%20openmrs-implement-l
>>> ]
>> _________________________________________
>> To unsubscribe from OpenMRS Implementers' mailing list, send an e-
>> mail to [hidden email] with "SIGNOFF openmrs-implement-
>> l" in the  body (not the subject) of your e-mail.
>> [mailto:[hidden email]?body=SIGNOFF%20openmrs-implement-l
>> ]
>
> _________________________________________
>
> To unsubscribe from OpenMRS Implementers' mailing list, send an e-
> mail to [hidden email] with "SIGNOFF openmrs-implement-
> l" in the  body (not the subject) of your e-mail.
>
> [mailto:[hidden email]?body=SIGNOFF%20openmrs-implement-
> l]

_________________________________________

To unsubscribe from OpenMRS Implementers' mailing list, send an e-mail to [hidden email] with "SIGNOFF openmrs-implement-l" in the  body (not the subject) of your e-mail.

[mailto:[hidden email]?body=SIGNOFF%20openmrs-implement-l]
Maros Cunderlik Maros Cunderlik
Reply | Threaded
Open this post in threaded view
|

Re: InfoPath XSN Validation errors

Can you send me XSN and/or the .infopath file? I'll be happy to look.  If you have stomach for it :), you can download the XSN  then expand it (just rename .XSN to .zip and unzip it); then poke around the .xsd and look for validation error..

Maros


On Wed, Nov 19, 2008 at 12:40 AM, John Bowers <[hidden email]> wrote:
It doesn't appear on the infopath form.



On Nov 14, 2008, at 7:05 PM, Ben Wolfe wrote:

After you remove the "weight" from the schema in the openmrs webapp, do you also remove it from the page in the infopath design process?  I can't remember if its in there by default, but if the page in infopath is still referring to weight, it might be a problem.

I think the xsi:nil is supposed to be there for those other attributes.  It gets removed when the user fills in a value.

Ben

John Bowers wrote:
No. I have done the following: duplicate the Basic Form and call it Surgical Form, add pulse observation to it, download the XSN, edit it in design mode, upload the modified xsn to OpenMRS, everything works. Then I duplicated the Basic Form again (called it mortality form), this time I removed the weight observation, added a few other basic observations (I think cause of death), downloaded the XSN, edit it in design mode, upload the modified xsn to OpenMRS. Now if I go to a patient and click on the forms tab and open up the surgical form, everything works fine. If I open up the mortality form, I get the error I showed you below. It seems that if I delete the weight observation on the form, then I get this error, but I need to check this.
Also, I opened up both of the infopathxml files (for the working surgical form and the not working mortality form) and they both have xsi:nil as an attribute on most of the nodes in the observation. In fact, I'll paste them below:
This one works (note the presence of the apparently invalid xsi:nil attributes):
<?xml version="1.0" encoding="UTF-8"?><?mso-infoPathSolution name="Surgical - Theatre" href="http://10.211.55.4:8080/openmrs/moduleServlet/formentry/forms/2-0.1-6.xsn" solutionVersion="0.1.0.6" productVersion="11.0.6357" PIVersion="1.0.0.0" ?><?mso-application progid="InfoPath.Document"?><form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xd="http://schemas.microsoft.com/office/infopath/2003" xmlns:openmrs="http://10.211.55.4:8080/openmrs/moduleServlet/formentry/forms/schema/2-6" id="2" name="Surgical - Theatre" version="0.1">
 <header>
  <enterer>1^Super User</enterer>
  <date_entered>2008-11-13T02:19:36+03:00</date_entered>
  <session>83ECACF81AC778BB39591314DE097651</session>
  <uid>oT4TGnh9h33pJAcZUv2Z</uid>
 </header>
 <patient>
  <patient.birthdate openmrs_attribute="birthdate" openmrs_table="patient">18980101</patient.birthdate>
  <patient.birthdate_estimated openmrs_attribute="birthdate_estimated" openmrs_table="patient"></patient.birthdate_estimated>
  <patient.family_name openmrs_attribute="family_name" openmrs_table="patient_name">Wolfe</patient.family_name>
  <patient.given_name openmrs_attribute="given_name" openmrs_table="patient_name">Greg</patient.given_name>
  <patient.medical_record_number openmrs_attribute="identifier" openmrs_table="patient_identifier"></patient.medical_record_number>
  <patient.middle_name openmrs_attribute="middle_name" openmrs_table="patient_name"></patient.middle_name>
  <patient.patient_id openmrs_attribute="patient_id" openmrs_table="patient">9</patient.patient_id>
  <patient.sex openmrs_attribute="gender" openmrs_table="patient">M</patient.sex>
  <patient.tribe openmrs_attribute="tribe" openmrs_table="patient">1^Unknown</patient.tribe>
  <patient_address.address1 openmrs_attribute="address1" openmrs_table="patient_address"></patient_address.address1>
  <patient_address.address2 openmrs_attribute="address2" openmrs_table="patient_address"></patient_address.address2>
 </patient>
 <encounter>
  <encounter.encounter_datetime openmrs_attribute="encounter_datetime" openmrs_table="encounter"/>
  <encounter.location_id openmrs_attribute="location_id" openmrs_table="encounter"/>
  <encounter.provider_id openmrs_attribute="provider_id" openmrs_table="encounter"/>
 </encounter>
 <obs openmrs_concept="1238^MEDICAL RECORD OBSERVATIONS^99DCT" openmrs_datatype="ZZ">
  <weight_kg openmrs_concept="5089^WEIGHT (KG)^99DCT" openmrs_datatype="NM">
      <date xsi:nil="true"/>
      <time xsi:nil="true"/>
      <value xsi:nil="true"/>
  </weight_kg>
  <pulse openmrs_concept="5087^PULSE^99DCT" openmrs_datatype="NM">
      <date xsi:nil="true"/>
      <time xsi:nil="true"/>
      <value xsi:nil="true"/>
  </pulse>
 </obs>
 <problem_list openmrs_concept="1284^PROBLEM LIST^99DCT" openmrs_datatype="ZZ">
  <problem_added multiple="0" openmrs_concept="6042^PROBLEM ADDED^99DCT" openmrs_datatype="CWE">
      <date xsi:nil="true"/>
      <time xsi:nil="true"/>
      <value xsi:nil="true"/>
  </problem_added>
  <problem_resolved multiple="0" openmrs_concept="6097^PROBLEM RESOLVED^99DCT" openmrs_datatype="CWE">
      <date xsi:nil="true"/>
      <time xsi:nil="true"/>
      <value xsi:nil="true"/>
  </problem_resolved>
 </problem_list>
 <other/></form>
This one gives me validation errors in infopath:
<?xml version="1.0" encoding="UTF-8"?><?mso-infoPathSolution name="Mortality Form (Richard)" href="http://10.211.55.4:8080/openmrs/moduleServlet/formentry/forms/8-0.1-7.xsn" solutionVersion="0.1.0.7" productVersion="11.0.6357" PIVersion="1.0.0.0" ?><?mso-application progid="InfoPath.Document"?><form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xd="http://schemas.microsoft.com/office/infopath/2003" xmlns:openmrs="http://10.211.55.4:8080/openmrs/moduleServlet/formentry/forms/schema/8-7" id="8" name="Mortality Form (Richard)" version="0.1">
 <header>
  <enterer>1^Super User</enterer>
  <date_entered>2008-11-13T02:54:49+03:00</date_entered>
  <session>56C3E0E858B922B3FA6CCEBE04D0F206</session>
  <uid>cXftvZYN0gWr8hgGMen0</uid>
 </header>
 <patient>
  <patient.birthdate openmrs_attribute="birthdate" openmrs_table="patient">19750101</patient.birthdate>
  <patient.birthdate_estimated openmrs_attribute="birthdate_estimated" openmrs_table="patient"></patient.birthdate_estimated>
  <patient.family_name openmrs_attribute="family_name" openmrs_table="patient_name">Patient</patient.family_name>
  <patient.given_name openmrs_attribute="given_name" openmrs_table="patient_name">John</patient.given_name>
  <patient.medical_record_number openmrs_attribute="identifier" openmrs_table="patient_identifier">100-8</patient.medical_record_number>
  <patient.middle_name openmrs_attribute="middle_name" openmrs_table="patient_name">D</patient.middle_name>
  <patient.patient_id openmrs_attribute="patient_id" openmrs_table="patient">3</patient.patient_id>
  <patient.sex openmrs_attribute="gender" openmrs_table="patient">M</patient.sex>
  <patient.tribe openmrs_attribute="tribe" openmrs_table="patient">1^Unknown</patient.tribe>
  <patient_address.address1 openmrs_attribute="address1" openmrs_table="patient_address">555 Johnson Rd.</patient_address.address1>
  <patient_address.address2 openmrs_attribute="address2" openmrs_table="patient_address">Apt. 555</patient_address.address2>
 </patient>
 <encounter>
  <encounter.encounter_datetime openmrs_attribute="encounter_datetime" openmrs_table="encounter"/>
  <encounter.location_id openmrs_attribute="location_id" openmrs_table="encounter"/>
  <encounter.provider_id openmrs_attribute="provider_id" openmrs_table="encounter"/>
 </encounter>
 <obs openmrs_concept="1238^MEDICAL RECORD OBSERVATIONS^99DCT" openmrs_datatype="ZZ">
  <time_of_death openmrs_concept="1354^TIME OF DEATH^99DCT" openmrs_datatype="TM">
      <date xsi:nil="true"/>
      <time xsi:nil="true"/>
      <value xsi:nil="true"/>
  </time_of_death>
  <length_of_stay openmrs_concept="1353^LENGTH OF STAY^99DCT" openmrs_datatype="NM">
      <date xsi:nil="true"/>
      <time xsi:nil="true"/>
      <value xsi:nil="true"/>
  </length_of_stay>
  <resuscitation_status multiple="0" openmrs_concept="1355^RESUSCITATION STATUS^99DCT" openmrs_datatype="CWE">
      <date xsi:nil="true"/>
      <time xsi:nil="true"/>
      <value xsi:nil="true"/>
  </resuscitation_status>
  <resuscitation_attempted multiple="0" openmrs_concept="1359^RESUSCITATION ATTEMPTED^99DCT" openmrs_datatype="CWE">
      <date xsi:nil="true"/>
      <time xsi:nil="true"/>
      <value xsi:nil="true"/>
  </resuscitation_attempted>
  <temperature_c openmrs_concept="5088^TEMPERATURE (C)^99DCT" openmrs_datatype="NM">
      <date xsi:nil="true"/>
      <time xsi:nil="true"/>
      <value xsi:nil="true"/>
  </temperature_c>
  <pulse openmrs_concept="5087^PULSE^99DCT" openmrs_datatype="NM">
      <date xsi:nil="true"/>
      <time xsi:nil="true"/>
      <value xsi:nil="true"/>
  </pulse>
  <hemoglobin openmrs_concept="21^HEMOGLOBIN^99DCT" openmrs_datatype="NM">
      <date xsi:nil="true"/>
      <time xsi:nil="true"/>
      <value xsi:nil="true"/>
  </hemoglobin>
  <where_vitals_taken_in_the_last_24hrs multiple="0" openmrs_concept="1360^WHERE VITALS TAKEN IN THE LAST 24HRS^99DCT" openmrs_datatype="CWE">
      <date xsi:nil="true"/>
      <time xsi:nil="true"/>
      <value xsi:nil="true"/>
  </where_vitals_taken_in_the_last_24hrs>
  <was_an_investigation_done_in_the_last_24hrs multiple="0" openmrs_concept="1361^WAS AN INVESTIGATION DONE IN THE LAST 24HRS^99DCT" openmrs_datatype="CWE">
      <date xsi:nil="true"/>
      <time xsi:nil="true"/>
      <value xsi:nil="true"/>
  </was_an_investigation_done_in_the_last_24hrs>
  <cause_of_death multiple="0" openmrs_concept="5002^CAUSE OF DEATH^99DCT" openmrs_datatype="CWE">
      <date xsi:nil="true"/>
      <time xsi:nil="true"/>
      <value xsi:nil="true"/>
  </cause_of_death>
  <doctor_comments openmrs_concept="1362^DOCTOR COMMENTS^99DCT" openmrs_datatype="ST">
      <date xsi:nil="true"/>
      <time xsi:nil="true"/>
      <value xsi:nil="true"/>
  </doctor_comments>
  <nursing_comments openmrs_concept="1363^NURSING COMMENTS^99DCT" openmrs_datatype="ST">
      <date xsi:nil="true"/>
      <time xsi:nil="true"/>
      <value xsi:nil="true"/>
  </nursing_comments>
  <elective_student_comments openmrs_concept="1364^ELECTIVE STUDENT COMMENTS^99DCT" openmrs_datatype="ST">
      <date xsi:nil="true"/>
      <time xsi:nil="true"/>
      <value xsi:nil="true"/>
  </elective_student_comments>
  <case_summary openmrs_concept="1365^CASE SUMMARY^99DCT" openmrs_datatype="ST">
      <date xsi:nil="true"/>
      <time xsi:nil="true"/>
      <value xsi:nil="true"/>
  </case_summary>
 </obs>
 <problem_list openmrs_concept="1284^PROBLEM LIST^99DCT" openmrs_datatype="ZZ">
  <problem_added multiple="0" openmrs_concept="6042^PROBLEM ADDED^99DCT" openmrs_datatype="CWE">
      <date xsi:nil="true"/>
      <time xsi:nil="true"/>
      <value xsi:nil="true"/>
  </problem_added>
  <problem_resolved multiple="0" openmrs_concept="6097^PROBLEM RESOLVED^99DCT" openmrs_datatype="CWE">
      <date xsi:nil="true"/>
      <time xsi:nil="true"/>
      <value xsi:nil="true"/>
  </problem_resolved>
 </problem_list>
 <other/></form>
Thanks,
John
On Nov 13, 2008, at 4:50 PM, Yeung, Ada K. wrote:
Are you trying to programmatically set a value on this node?  If so, it means the element is present with no value/no content  is associated with it.  Please check the datatype for this concept.

Thanks!

--Ada
________________________________________
From: [hidden email] [[hidden email]] On Behalf Of John Bowers [[hidden email]]
Sent: Wednesday, November 12, 2008 1:46 PM
To: [hidden email]
Subject: [OPENMRS-IMPLEMENTERS] InfoPath XSN Validation errors

I have got the installation working and am testing out the form
module. I downloaded one form in design mode, edited it, updated it,
and everything works fine. Loaded a patient and grabbed the form,
filled it out, submitted it and then it showed up as an encounter.
Then I decided to start a mortality form. I have added a single
concept: cause of death to the form. The design part works fine, but
when I try to fill it out for an actual patient I get the message:

InfoPath cannot open the following file:
Mortality_Form_3(7-0.1-4).infopathxml
The form contains schema validation errors.

The details are:

xsi:nil attribute on element 'value' is invalid.


What am I doing wrong?

Thanks,
John

_________________________________________

To unsubscribe from OpenMRS Implementers' mailing list, send an e-mail to [hidden email] with "SIGNOFF openmrs-implement-l" in the  body (not the subject) of your e-mail.

[mailto:[hidden email]?body=SIGNOFF%20openmrs-implement-l]
_________________________________________

To unsubscribe from OpenMRS Implementers' mailing list, send an e-mail to [hidden email] with "SIGNOFF openmrs-implement-l" in the  body (not the subject) of your e-mail.

[mailto:[hidden email]?body=SIGNOFF%20openmrs-implement-l]
_________________________________________
To unsubscribe from OpenMRS Implementers' mailing list, send an e-mail to [hidden email] with "SIGNOFF openmrs-implement-l" in the  body (not the subject) of your e-mail.
[mailto:[hidden email]?body=SIGNOFF%20openmrs-implement-l]

_________________________________________

To unsubscribe from OpenMRS Implementers' mailing list, send an e-mail to [hidden email] with "SIGNOFF openmrs-implement-l" in the  body (not the subject) of your e-mail.

[mailto:[hidden email]?body=SIGNOFF%20openmrs-implement-l]

_________________________________________

To unsubscribe from OpenMRS Implementers' mailing list, send an e-mail to [hidden email] with "SIGNOFF openmrs-implement-l" in the  body (not the subject) of your e-mail.

[mailto:[hidden email]?body=SIGNOFF%20openmrs-implement-l]


[hidden email] from OpenMRS Implementers' mailing list
John Bowers John Bowers
Reply | Threaded
Open this post in threaded view
|

Re: InfoPath XSN Validation errors

In reply to this post by Ben Wolfe
Okay, I was wrong about the weight. The problem occurs when I add a  
concept that I created rather than one of the ones supplied with the  
default test database.

I made a concept called Time Of death of Class Question with Datatype  
Time. I then copied the basic form, deleted the weight obs, and added  
Cause of death which is a default concept. I rebuilt XSN, downloaded  
the form, added the cause of death drop down in infopath and then  
uploaded xsn. Next I marked the form as published, and found a  
patient. The form worked perfectly. So I went back to forms admin and  
marked the form as unpublished, added my new time of death observation  
to the schema, rebuilt the xsn, dowloaded it, added the time of death  
drop down in infopath below the cause of death dropdown, and then  
uploaded the xsn. Next I marked the form as published again and found  
a patient. This time the form gives me the xil:nil problem described  
below.

So now I'm thinking that I don't understand how to make concepts  
correctly. Hope this helps us get to the root of the problem. Thank  
you all for your patience. I am still v. excited about implementing  
OpenMRS here and think it is going to enable us to do a lot of good  
things at the hospital.

Thanks,
John

On Nov 14, 2008, at 7:05 PM, Ben Wolfe wrote:

> After you remove the "weight" from the schema in the openmrs webapp,  
> do you also remove it from the page in the infopath design process?  
> I can't remember if its in there by default, but if the page in  
> infopath is still referring to weight, it might be a problem.
>
> I think the xsi:nil is supposed to be there for those other  
> attributes.  It gets removed when the user fills in a value.
>
> Ben
>
> John Bowers wrote:
>> No. I have done the following: duplicate the Basic Form and call it  
>> Surgical Form, add pulse observation to it, download the XSN, edit  
>> it in design mode, upload the modified xsn to OpenMRS, everything  
>> works. Then I duplicated the Basic Form again (called it mortality  
>> form), this time I removed the weight observation, added a few  
>> other basic observations (I think cause of death), downloaded the  
>> XSN, edit it in design mode, upload the modified xsn to OpenMRS.  
>> Now if I go to a patient and click on the forms tab and open up the  
>> surgical form, everything works fine. If I open up the mortality  
>> form, I get the error I showed you below. It seems that if I delete  
>> the weight observation on the form, then I get this error, but I  
>> need to check this.
>> Also, I opened up both of the infopathxml files (for the working  
>> surgical form and the not working mortality form) and they both  
>> have xsi:nil as an attribute on most of the nodes in the  
>> observation. In fact, I'll paste them below:
>> This one works (note the presence of the apparently invalid xsi:nil  
>> attributes):
>> <?xml version="1.0" encoding="UTF-8"?><?mso-infoPathSolution  
>> name="Surgical - Theatre" href="http://10.211.55.4:8080/openmrs/moduleServlet/formentry/forms/2-0.1-6.xsn 
>> " solutionVersion="0.1.0.6" productVersion="11.0.6357"  
>> PIVersion="1.0.0.0" ?><?mso-application progid="InfoPath.Document"?
>> ><form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
>> xmlns:xd="http://schemas.microsoft.com/office/infopath/2003"  
>> xmlns:openmrs="http://10.211.55.4:8080/openmrs/moduleServlet/formentry/forms/schema/2-6 
>> " id="2" name="Surgical - Theatre" version="0.1">
>>  <header>
>>    <enterer>1^Super User</enterer>
>>    <date_entered>2008-11-13T02:19:36+03:00</date_entered>
>>    <session>83ECACF81AC778BB39591314DE097651</session>
>>    <uid>oT4TGnh9h33pJAcZUv2Z</uid>
>>  </header>
>>  <patient>
>>    <patient.birthdate openmrs_attribute="birthdate"  
>> openmrs_table="patient">18980101</patient.birthdate>
>>    <patient.birthdate_estimated  
>> openmrs_attribute="birthdate_estimated" openmrs_table="patient"></
>> patient.birthdate_estimated>
>>    <patient.family_name openmrs_attribute="family_name"  
>> openmrs_table="patient_name">Wolfe</patient.family_name>
>>    <patient.given_name openmrs_attribute="given_name"  
>> openmrs_table="patient_name">Greg</patient.given_name>
>>    <patient.medical_record_number openmrs_attribute="identifier"  
>> openmrs_table="patient_identifier"></patient.medical_record_number>
>>    <patient.middle_name openmrs_attribute="middle_name"  
>> openmrs_table="patient_name"></patient.middle_name>
>>    <patient.patient_id openmrs_attribute="patient_id"  
>> openmrs_table="patient">9</patient.patient_id>
>>    <patient.sex openmrs_attribute="gender"  
>> openmrs_table="patient">M</patient.sex>
>>    <patient.tribe openmrs_attribute="tribe"  
>> openmrs_table="patient">1^Unknown</patient.tribe>
>>    <patient_address.address1 openmrs_attribute="address1"  
>> openmrs_table="patient_address"></patient_address.address1>
>>    <patient_address.address2 openmrs_attribute="address2"  
>> openmrs_table="patient_address"></patient_address.address2>
>>  </patient>
>>  <encounter>
>>    <encounter.encounter_datetime  
>> openmrs_attribute="encounter_datetime" openmrs_table="encounter"/>
>>    <encounter.location_id openmrs_attribute="location_id"  
>> openmrs_table="encounter"/>
>>    <encounter.provider_id openmrs_attribute="provider_id"  
>> openmrs_table="encounter"/>
>>  </encounter>
>>  <obs openmrs_concept="1238^MEDICAL RECORD OBSERVATIONS^99DCT"  
>> openmrs_datatype="ZZ">
>>    <weight_kg openmrs_concept="5089^WEIGHT (KG)^99DCT"  
>> openmrs_datatype="NM">
>>        <date xsi:nil="true"/>
>>        <time xsi:nil="true"/>
>>        <value xsi:nil="true"/>
>>    </weight_kg>
>>    <pulse openmrs_concept="5087^PULSE^99DCT" openmrs_datatype="NM">
>>        <date xsi:nil="true"/>
>>        <time xsi:nil="true"/>
>>        <value xsi:nil="true"/>
>>    </pulse>
>>  </obs>
>>  <problem_list openmrs_concept="1284^PROBLEM LIST^99DCT"  
>> openmrs_datatype="ZZ">
>>    <problem_added multiple="0" openmrs_concept="6042^PROBLEM  
>> ADDED^99DCT" openmrs_datatype="CWE">
>>        <date xsi:nil="true"/>
>>        <time xsi:nil="true"/>
>>        <value xsi:nil="true"/>
>>    </problem_added>
>>    <problem_resolved multiple="0" openmrs_concept="6097^PROBLEM  
>> RESOLVED^99DCT" openmrs_datatype="CWE">
>>        <date xsi:nil="true"/>
>>        <time xsi:nil="true"/>
>>        <value xsi:nil="true"/>
>>    </problem_resolved>
>>  </problem_list>
>>  <other/></form>
>> This one gives me validation errors in infopath:
>> <?xml version="1.0" encoding="UTF-8"?><?mso-infoPathSolution  
>> name="Mortality Form (Richard)" href="http://10.211.55.4:8080/openmrs/moduleServlet/formentry/forms/8-0.1-7.xsn 
>> " solutionVersion="0.1.0.7" productVersion="11.0.6357"  
>> PIVersion="1.0.0.0" ?><?mso-application progid="InfoPath.Document"?
>> ><form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
>> xmlns:xd="http://schemas.microsoft.com/office/infopath/2003"  
>> xmlns:openmrs="http://10.211.55.4:8080/openmrs/moduleServlet/formentry/forms/schema/8-7 
>> " id="8" name="Mortality Form (Richard)" version="0.1">
>>  <header>
>>    <enterer>1^Super User</enterer>
>>    <date_entered>2008-11-13T02:54:49+03:00</date_entered>
>>    <session>56C3E0E858B922B3FA6CCEBE04D0F206</session>
>>    <uid>cXftvZYN0gWr8hgGMen0</uid>
>>  </header>
>>  <patient>
>>    <patient.birthdate openmrs_attribute="birthdate"  
>> openmrs_table="patient">19750101</patient.birthdate>
>>    <patient.birthdate_estimated  
>> openmrs_attribute="birthdate_estimated" openmrs_table="patient"></
>> patient.birthdate_estimated>
>>    <patient.family_name openmrs_attribute="family_name"  
>> openmrs_table="patient_name">Patient</patient.family_name>
>>    <patient.given_name openmrs_attribute="given_name"  
>> openmrs_table="patient_name">John</patient.given_name>
>>    <patient.medical_record_number openmrs_attribute="identifier"  
>> openmrs_table="patient_identifier">100-8</
>> patient.medical_record_number>
>>    <patient.middle_name openmrs_attribute="middle_name"  
>> openmrs_table="patient_name">D</patient.middle_name>
>>    <patient.patient_id openmrs_attribute="patient_id"  
>> openmrs_table="patient">3</patient.patient_id>
>>    <patient.sex openmrs_attribute="gender"  
>> openmrs_table="patient">M</patient.sex>
>>    <patient.tribe openmrs_attribute="tribe"  
>> openmrs_table="patient">1^Unknown</patient.tribe>
>>    <patient_address.address1 openmrs_attribute="address1"  
>> openmrs_table="patient_address">555 Johnson Rd.</
>> patient_address.address1>
>>    <patient_address.address2 openmrs_attribute="address2"  
>> openmrs_table="patient_address">Apt. 555</patient_address.address2>
>>  </patient>
>>  <encounter>
>>    <encounter.encounter_datetime  
>> openmrs_attribute="encounter_datetime" openmrs_table="encounter"/>
>>    <encounter.location_id openmrs_attribute="location_id"  
>> openmrs_table="encounter"/>
>>    <encounter.provider_id openmrs_attribute="provider_id"  
>> openmrs_table="encounter"/>
>>  </encounter>
>>  <obs openmrs_concept="1238^MEDICAL RECORD OBSERVATIONS^99DCT"  
>> openmrs_datatype="ZZ">
>>    <time_of_death openmrs_concept="1354^TIME OF DEATH^99DCT"  
>> openmrs_datatype="TM">
>>        <date xsi:nil="true"/>
>>        <time xsi:nil="true"/>
>>        <value xsi:nil="true"/>
>>    </time_of_death>
>>    <length_of_stay openmrs_concept="1353^LENGTH OF STAY^99DCT"  
>> openmrs_datatype="NM">
>>        <date xsi:nil="true"/>
>>        <time xsi:nil="true"/>
>>        <value xsi:nil="true"/>
>>    </length_of_stay>
>>    <resuscitation_status multiple="0"  
>> openmrs_concept="1355^RESUSCITATION STATUS^99DCT"  
>> openmrs_datatype="CWE">
>>        <date xsi:nil="true"/>
>>        <time xsi:nil="true"/>
>>        <value xsi:nil="true"/>
>>    </resuscitation_status>
>>    <resuscitation_attempted multiple="0"  
>> openmrs_concept="1359^RESUSCITATION ATTEMPTED^99DCT"  
>> openmrs_datatype="CWE">
>>        <date xsi:nil="true"/>
>>        <time xsi:nil="true"/>
>>        <value xsi:nil="true"/>
>>    </resuscitation_attempted>
>>    <temperature_c openmrs_concept="5088^TEMPERATURE (C)^99DCT"  
>> openmrs_datatype="NM">
>>        <date xsi:nil="true"/>
>>        <time xsi:nil="true"/>
>>        <value xsi:nil="true"/>
>>    </temperature_c>
>>    <pulse openmrs_concept="5087^PULSE^99DCT" openmrs_datatype="NM">
>>        <date xsi:nil="true"/>
>>        <time xsi:nil="true"/>
>>        <value xsi:nil="true"/>
>>    </pulse>
>>    <hemoglobin openmrs_concept="21^HEMOGLOBIN^99DCT"  
>> openmrs_datatype="NM">
>>        <date xsi:nil="true"/>
>>        <time xsi:nil="true"/>
>>        <value xsi:nil="true"/>
>>    </hemoglobin>
>>    <where_vitals_taken_in_the_last_24hrs multiple="0"  
>> openmrs_concept="1360^WHERE VITALS TAKEN IN THE LAST 24HRS^99DCT"  
>> openmrs_datatype="CWE">
>>        <date xsi:nil="true"/>
>>        <time xsi:nil="true"/>
>>        <value xsi:nil="true"/>
>>    </where_vitals_taken_in_the_last_24hrs>
>>    <was_an_investigation_done_in_the_last_24hrs multiple="0"  
>> openmrs_concept="1361^WAS AN INVESTIGATION DONE IN THE LAST  
>> 24HRS^99DCT" openmrs_datatype="CWE">
>>        <date xsi:nil="true"/>
>>        <time xsi:nil="true"/>
>>        <value xsi:nil="true"/>
>>    </was_an_investigation_done_in_the_last_24hrs>
>>    <cause_of_death multiple="0" openmrs_concept="5002^CAUSE OF  
>> DEATH^99DCT" openmrs_datatype="CWE">
>>        <date xsi:nil="true"/>
>>        <time xsi:nil="true"/>
>>        <value xsi:nil="true"/>
>>    </cause_of_death>
>>    <doctor_comments openmrs_concept="1362^DOCTOR COMMENTS^99DCT"  
>> openmrs_datatype="ST">
>>        <date xsi:nil="true"/>
>>        <time xsi:nil="true"/>
>>        <value xsi:nil="true"/>
>>    </doctor_comments>
>>    <nursing_comments openmrs_concept="1363^NURSING COMMENTS^99DCT"  
>> openmrs_datatype="ST">
>>        <date xsi:nil="true"/>
>>        <time xsi:nil="true"/>
>>        <value xsi:nil="true"/>
>>    </nursing_comments>
>>    <elective_student_comments openmrs_concept="1364^ELECTIVE  
>> STUDENT COMMENTS^99DCT" openmrs_datatype="ST">
>>        <date xsi:nil="true"/>
>>        <time xsi:nil="true"/>
>>        <value xsi:nil="true"/>
>>    </elective_student_comments>
>>    <case_summary openmrs_concept="1365^CASE SUMMARY^99DCT"  
>> openmrs_datatype="ST">
>>        <date xsi:nil="true"/>
>>        <time xsi:nil="true"/>
>>        <value xsi:nil="true"/>
>>    </case_summary>
>>  </obs>
>>  <problem_list openmrs_concept="1284^PROBLEM LIST^99DCT"  
>> openmrs_datatype="ZZ">
>>    <problem_added multiple="0" openmrs_concept="6042^PROBLEM  
>> ADDED^99DCT" openmrs_datatype="CWE">
>>        <date xsi:nil="true"/>
>>        <time xsi:nil="true"/>
>>        <value xsi:nil="true"/>
>>    </problem_added>
>>    <problem_resolved multiple="0" openmrs_concept="6097^PROBLEM  
>> RESOLVED^99DCT" openmrs_datatype="CWE">
>>        <date xsi:nil="true"/>
>>        <time xsi:nil="true"/>
>>        <value xsi:nil="true"/>
>>    </problem_resolved>
>>  </problem_list>
>>  <other/></form>
>> Thanks,
>> John
>> On Nov 13, 2008, at 4:50 PM, Yeung, Ada K. wrote:
>>> Are you trying to programmatically set a value on this node?  If  
>>> so, it means the element is present with no value/no content  is  
>>> associated with it.  Please check the datatype for this concept.
>>>
>>> Thanks!
>>>
>>> --Ada
>>> ________________________________________
>>> From: [hidden email] [[hidden email]] On  
>>> Behalf Of John Bowers [[hidden email]]
>>> Sent: Wednesday, November 12, 2008 1:46 PM
>>> To: [hidden email]
>>> Subject: [OPENMRS-IMPLEMENTERS] InfoPath XSN Validation errors
>>>
>>> I have got the installation working and am testing out the form
>>> module. I downloaded one form in design mode, edited it, updated it,
>>> and everything works fine. Loaded a patient and grabbed the form,
>>> filled it out, submitted it and then it showed up as an encounter.
>>> Then I decided to start a mortality form. I have added a single
>>> concept: cause of death to the form. The design part works fine, but
>>> when I try to fill it out for an actual patient I get the message:
>>>
>>> InfoPath cannot open the following file:
>>> Mortality_Form_3(7-0.1-4).infopathxml
>>> The form contains schema validation errors.
>>>
>>> The details are:
>>>
>>> xsi:nil attribute on element 'value' is invalid.
>>>
>>>
>>> What am I doing wrong?
>>>
>>> Thanks,
>>> John
>>>
>>> _________________________________________
>>>
>>> To unsubscribe from OpenMRS Implementers' mailing list, send an e-
>>> mail to [hidden email] with "SIGNOFF openmrs-
>>> implement-l" in the  body (not the subject) of your e-mail.
>>>
>>> [mailto:[hidden email]?body=SIGNOFF%20openmrs-implement-l
>>> ]
>>> _________________________________________
>>>
>>> To unsubscribe from OpenMRS Implementers' mailing list, send an e-
>>> mail to [hidden email] with "SIGNOFF openmrs-
>>> implement-l" in the  body (not the subject) of your e-mail.
>>>
>>> [mailto:[hidden email]?body=SIGNOFF%20openmrs-implement-l
>>> ]
>> _________________________________________
>> To unsubscribe from OpenMRS Implementers' mailing list, send an e-
>> mail to [hidden email] with "SIGNOFF openmrs-implement-
>> l" in the  body (not the subject) of your e-mail.
>> [mailto:[hidden email]?body=SIGNOFF%20openmrs-implement-l
>> ]
>
> _________________________________________
>
> To unsubscribe from OpenMRS Implementers' mailing list, send an e-
> mail to [hidden email] with "SIGNOFF openmrs-implement-
> l" in the  body (not the subject) of your e-mail.
>
> [mailto:[hidden email]?body=SIGNOFF%20openmrs-implement-
> l]

_________________________________________

To unsubscribe from OpenMRS Implementers' mailing list, send an e-mail to [hidden email] with "SIGNOFF openmrs-implement-l" in the  body (not the subject) of your e-mail.

[mailto:[hidden email]?body=SIGNOFF%20openmrs-implement-l]
John Bowers John Bowers
Reply | Threaded
Open this post in threaded view
|

Re: InfoPath XSN Validation errors

In reply to this post by Maros Cunderlik
Problematic infopath and xsn attached.


[hidden email] from OpenMRS Implementers' mailing list


[hidden email] from OpenMRS Implementers' mailing list


On Nov 19, 2008, at 9:51 AM, Maros Cunderlik wrote:

Can you send me XSN and/or the .infopath file? I'll be happy to look.  If you have stomach for it :), you can download the XSN  then expand it (just rename .XSN to .zip and unzip it); then poke around the .xsd and look for validation error..

Maros


On Wed, Nov 19, 2008 at 12:40 AM, John Bowers <[hidden email]> wrote:
It doesn't appear on the infopath form.



On Nov 14, 2008, at 7:05 PM, Ben Wolfe wrote:

After you remove the "weight" from the schema in the openmrs webapp, do you also remove it from the page in the infopath design process?  I can't remember if its in there by default, but if the page in infopath is still referring to weight, it might be a problem.

I think the xsi:nil is supposed to be there for those other attributes.  It gets removed when the user fills in a value.

Ben

John Bowers wrote:
No. I have done the following: duplicate the Basic Form and call it Surgical Form, add pulse observation to it, download the XSN, edit it in design mode, upload the modified xsn to OpenMRS, everything works. Then I duplicated the Basic Form again (called it mortality form), this time I removed the weight observation, added a few other basic observations (I think cause of death), downloaded the XSN, edit it in design mode, upload the modified xsn to OpenMRS. Now if I go to a patient and click on the forms tab and open up the surgical form, everything works fine. If I open up the mortality form, I get the error I showed you below. It seems that if I delete the weight observation on the form, then I get this error, but I need to check this.
Also, I opened up both of the infopathxml files (for the working surgical form and the not working mortality form) and they both have xsi:nil as an attribute on most of the nodes in the observation. In fact, I'll paste them below:
This one works (note the presence of the apparently invalid xsi:nil attributes):
<?xml version="1.0" encoding="UTF-8"?><?mso-infoPathSolution name="Surgical - Theatre" href="http://10.211.55.4:8080/openmrs/moduleServlet/formentry/forms/2-0.1-6.xsn" solutionVersion="0.1.0.6" productVersion="11.0.6357" PIVersion="1.0.0.0" ?><?mso-application progid="InfoPath.Document"?><form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xd="http://schemas.microsoft.com/office/infopath/2003" xmlns:openmrs="http://10.211.55.4:8080/openmrs/moduleServlet/formentry/forms/schema/2-6" id="2" name="Surgical - Theatre" version="0.1">
 <header>
  <enterer>1^Super User</enterer>
  <date_entered>2008-11-13T02:19:36+03:00</date_entered>
  <session>83ECACF81AC778BB39591314DE097651</session>
  <uid>oT4TGnh9h33pJAcZUv2Z</uid>
 </header>
 <patient>
  <patient.birthdate openmrs_attribute="birthdate" openmrs_table="patient">18980101</patient.birthdate>
  <patient.birthdate_estimated openmrs_attribute="birthdate_estimated" openmrs_table="patient"></patient.birthdate_estimated>
  <patient.family_name openmrs_attribute="family_name" openmrs_table="patient_name">Wolfe</patient.family_name>
  <patient.given_name openmrs_attribute="given_name" openmrs_table="patient_name">Greg</patient.given_name>
  <patient.medical_record_number openmrs_attribute="identifier" openmrs_table="patient_identifier"></patient.medical_record_number>
  <patient.middle_name openmrs_attribute="middle_name" openmrs_table="patient_name"></patient.middle_name>
  <patient.patient_id openmrs_attribute="patient_id" openmrs_table="patient">9</patient.patient_id>
  <patient.sex openmrs_attribute="gender" openmrs_table="patient">M</patient.sex>
  <patient.tribe openmrs_attribute="tribe" openmrs_table="patient">1^Unknown</patient.tribe>
  <patient_address.address1 openmrs_attribute="address1" openmrs_table="patient_address"></patient_address.address1>
  <patient_address.address2 openmrs_attribute="address2" openmrs_table="patient_address"></patient_address.address2>
 </patient>
 <encounter>
  <encounter.encounter_datetime openmrs_attribute="encounter_datetime" openmrs_table="encounter"/>
  <encounter.location_id openmrs_attribute="location_id" openmrs_table="encounter"/>
  <encounter.provider_id openmrs_attribute="provider_id" openmrs_table="encounter"/>
 </encounter>
 <obs openmrs_concept="1238^MEDICAL RECORD OBSERVATIONS^99DCT" openmrs_datatype="ZZ">
  <weight_kg openmrs_concept="5089^WEIGHT (KG)^99DCT" openmrs_datatype="NM">
      <date xsi:nil="true"/>
      <time xsi:nil="true"/>
      <value xsi:nil="true"/>
  </weight_kg>
  <pulse openmrs_concept="5087^PULSE^99DCT" openmrs_datatype="NM">
      <date xsi:nil="true"/>
      <time xsi:nil="true"/>
      <value xsi:nil="true"/>
  </pulse>
 </obs>
 <problem_list openmrs_concept="1284^PROBLEM LIST^99DCT" openmrs_datatype="ZZ">
  <problem_added multiple="0" openmrs_concept="6042^PROBLEM ADDED^99DCT" openmrs_datatype="CWE">
      <date xsi:nil="true"/>
      <time xsi:nil="true"/>
      <value xsi:nil="true"/>
  </problem_added>
  <problem_resolved multiple="0" openmrs_concept="6097^PROBLEM RESOLVED^99DCT" openmrs_datatype="CWE">
      <date xsi:nil="true"/>
      <time xsi:nil="true"/>
      <value xsi:nil="true"/>
  </problem_resolved>
 </problem_list>
 <other/></form>
This one gives me validation errors in infopath:
<?xml version="1.0" encoding="UTF-8"?><?mso-infoPathSolution name="Mortality Form (Richard)" href="http://10.211.55.4:8080/openmrs/moduleServlet/formentry/forms/8-0.1-7.xsn" solutionVersion="0.1.0.7" productVersion="11.0.6357" PIVersion="1.0.0.0" ?><?mso-application progid="InfoPath.Document"?><form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xd="http://schemas.microsoft.com/office/infopath/2003" xmlns:openmrs="http://10.211.55.4:8080/openmrs/moduleServlet/formentry/forms/schema/8-7" id="8" name="Mortality Form (Richard)" version="0.1">
 <header>
  <enterer>1^Super User</enterer>
  <date_entered>2008-11-13T02:54:49+03:00</date_entered>
  <session>56C3E0E858B922B3FA6CCEBE04D0F206</session>
  <uid>cXftvZYN0gWr8hgGMen0</uid>
 </header>
 <patient>
  <patient.birthdate openmrs_attribute="birthdate" openmrs_table="patient">19750101</patient.birthdate>
  <patient.birthdate_estimated openmrs_attribute="birthdate_estimated" openmrs_table="patient"></patient.birthdate_estimated>
  <patient.family_name openmrs_attribute="family_name" openmrs_table="patient_name">Patient</patient.family_name>
  <patient.given_name openmrs_attribute="given_name" openmrs_table="patient_name">John</patient.given_name>
  <patient.medical_record_number openmrs_attribute="identifier" openmrs_table="patient_identifier">100-8</patient.medical_record_number>
  <patient.middle_name openmrs_attribute="middle_name" openmrs_table="patient_name">D</patient.middle_name>
  <patient.patient_id openmrs_attribute="patient_id" openmrs_table="patient">3</patient.patient_id>
  <patient.sex openmrs_attribute="gender" openmrs_table="patient">M</patient.sex>
  <patient.tribe openmrs_attribute="tribe" openmrs_table="patient">1^Unknown</patient.tribe>
  <patient_address.address1 openmrs_attribute="address1" openmrs_table="patient_address">555 Johnson Rd.</patient_address.address1>
  <patient_address.address2 openmrs_attribute="address2" openmrs_table="patient_address">Apt. 555</patient_address.address2>
 </patient>
 <encounter>
  <encounter.encounter_datetime openmrs_attribute="encounter_datetime" openmrs_table="encounter"/>
  <encounter.location_id openmrs_attribute="location_id" openmrs_table="encounter"/>
  <encounter.provider_id openmrs_attribute="provider_id" openmrs_table="encounter"/>
 </encounter>
 <obs openmrs_concept="1238^MEDICAL RECORD OBSERVATIONS^99DCT" openmrs_datatype="ZZ">
  <time_of_death openmrs_concept="1354^TIME OF DEATH^99DCT" openmrs_datatype="TM">
      <date xsi:nil="true"/>
      <time xsi:nil="true"/>
      <value xsi:nil="true"/>
  </time_of_death>
  <length_of_stay openmrs_concept="1353^LENGTH OF STAY^99DCT" openmrs_datatype="NM">
      <date xsi:nil="true"/>
      <time xsi:nil="true"/>
      <value xsi:nil="true"/>
  </length_of_stay>
  <resuscitation_status multiple="0" openmrs_concept="1355^RESUSCITATION STATUS^99DCT" openmrs_datatype="CWE">
      <date xsi:nil="true"/>
      <time xsi:nil="true"/>
      <value xsi:nil="true"/>
  </resuscitation_status>
  <resuscitation_attempted multiple="0" openmrs_concept="1359^RESUSCITATION ATTEMPTED^99DCT" openmrs_datatype="CWE">
      <date xsi:nil="true"/>
      <time xsi:nil="true"/>
      <value xsi:nil="true"/>
  </resuscitation_attempted>
  <temperature_c openmrs_concept="5088^TEMPERATURE (C)^99DCT" openmrs_datatype="NM">
      <date xsi:nil="true"/>
      <time xsi:nil="true"/>
      <value xsi:nil="true"/>
  </temperature_c>
  <pulse openmrs_concept="5087^PULSE^99DCT" openmrs_datatype="NM">
      <date xsi:nil="true"/>
      <time xsi:nil="true"/>
      <value xsi:nil="true"/>
  </pulse>
  <hemoglobin openmrs_concept="21^HEMOGLOBIN^99DCT" openmrs_datatype="NM">
      <date xsi:nil="true"/>
      <time xsi:nil="true"/>
      <value xsi:nil="true"/>
  </hemoglobin>
  <where_vitals_taken_in_the_last_24hrs multiple="0" openmrs_concept="1360^WHERE VITALS TAKEN IN THE LAST 24HRS^99DCT" openmrs_datatype="CWE">
      <date xsi:nil="true"/>
      <time xsi:nil="true"/>
      <value xsi:nil="true"/>
  </where_vitals_taken_in_the_last_24hrs>
  <was_an_investigation_done_in_the_last_24hrs multiple="0" openmrs_concept="1361^WAS AN INVESTIGATION DONE IN THE LAST 24HRS^99DCT" openmrs_datatype="CWE">
      <date xsi:nil="true"/>
      <time xsi:nil="true"/>
      <value xsi:nil="true"/>
  </was_an_investigation_done_in_the_last_24hrs>
  <cause_of_death multiple="0" openmrs_concept="5002^CAUSE OF DEATH^99DCT" openmrs_datatype="CWE">
      <date xsi:nil="true"/>
      <time xsi:nil="true"/>
      <value xsi:nil="true"/>
  </cause_of_death>
  <doctor_comments openmrs_concept="1362^DOCTOR COMMENTS^99DCT" openmrs_datatype="ST">
      <date xsi:nil="true"/>
      <time xsi:nil="true"/>
      <value xsi:nil="true"/>
  </doctor_comments>
  <nursing_comments openmrs_concept="1363^NURSING COMMENTS^99DCT" openmrs_datatype="ST">
      <date xsi:nil="true"/>
      <time xsi:nil="true"/>
      <value xsi:nil="true"/>
  </nursing_comments>
  <elective_student_comments openmrs_concept="1364^ELECTIVE STUDENT COMMENTS^99DCT" openmrs_datatype="ST">
      <date xsi:nil="true"/>
      <time xsi:nil="true"/>
      <value xsi:nil="true"/>
  </elective_student_comments>
  <case_summary openmrs_concept="1365^CASE SUMMARY^99DCT" openmrs_datatype="ST">
      <date xsi:nil="true"/>
      <time xsi:nil="true"/>
      <value xsi:nil="true"/>
  </case_summary>
 </obs>
 <problem_list openmrs_concept="1284^PROBLEM LIST^99DCT" openmrs_datatype="ZZ">
  <problem_added multiple="0" openmrs_concept="6042^PROBLEM ADDED^99DCT" openmrs_datatype="CWE">
      <date xsi:nil="true"/>
      <time xsi:nil="true"/>
      <value xsi:nil="true"/>
  </problem_added>
  <problem_resolved multiple="0" openmrs_concept="6097^PROBLEM RESOLVED^99DCT" openmrs_datatype="CWE">
      <date xsi:nil="true"/>
      <time xsi:nil="true"/>
      <value xsi:nil="true"/>
  </problem_resolved>
 </problem_list>
 <other/></form>
Thanks,
John
On Nov 13, 2008, at 4:50 PM, Yeung, Ada K. wrote:
Are you trying to programmatically set a value on this node?  If so, it means the element is present with no value/no content  is associated with it.  Please check the datatype for this concept.

Thanks!

--Ada
________________________________________
From: [hidden email] [[hidden email]] On Behalf Of John Bowers [[hidden email]]
Sent: Wednesday, November 12, 2008 1:46 PM
To: [hidden email]
Subject: [OPENMRS-IMPLEMENTERS] InfoPath XSN Validation errors

I have got the installation working and am testing out the form
module. I downloaded one form in design mode, edited it, updated it,
and everything works fine. Loaded a patient and grabbed the form,
filled it out, submitted it and then it showed up as an encounter.
Then I decided to start a mortality form. I have added a single
concept: cause of death to the form. The design part works fine, but
when I try to fill it out for an actual patient I get the message:

InfoPath cannot open the following file:
Mortality_Form_3(7-0.1-4).infopathxml
The form contains schema validation errors.

The details are:

xsi:nil attribute on element 'value' is invalid.


What am I doing wrong?

Thanks,
John

_________________________________________

To unsubscribe from OpenMRS Implementers' mailing list, send an e-mail to [hidden email] with "SIGNOFF openmrs-implement-l" in the  body (not the subject) of your e-mail.

[mailto:[hidden email]?body=SIGNOFF%20openmrs-implement-l]
_________________________________________

To unsubscribe from OpenMRS Implementers' mailing list, send an e-mail to [hidden email] with "SIGNOFF openmrs-implement-l" in the  body (not the subject) of your e-mail.

[mailto:[hidden email]?body=SIGNOFF%20openmrs-implement-l]
_________________________________________
To unsubscribe from OpenMRS Implementers' mailing list, send an e-mail to [hidden email] with "SIGNOFF openmrs-implement-l" in the  body (not the subject) of your e-mail.
[mailto:[hidden email]?body=SIGNOFF%20openmrs-implement-l]

_________________________________________

To unsubscribe from OpenMRS Implementers' mailing list, send an e-mail to [hidden email] with "SIGNOFF openmrs-implement-l" in the  body (not the subject) of your e-mail.

[mailto:[hidden email]?body=SIGNOFF%20openmrs-implement-l]

_________________________________________

To unsubscribe from OpenMRS Implementers' mailing list, send an e-mail to [hidden email] with "SIGNOFF openmrs-implement-l" in the  body (not the subject) of your e-mail.

[mailto:[hidden email]?body=SIGNOFF%20openmrs-implement-l]


[hidden email] from OpenMRS Implementers' mailing list


[hidden email] from OpenMRS Implementers' mailing list

Basic_Form_3(11-0.1-8).infopathxml (3K) Download Attachment
new_starter.xsn (14K) Download Attachment