Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Contents 

Table of Contents
maxLevel2

InfoPath Resources

...

  • Complete Login use case.
  • Select Form Entry use case.
  • Enter patient name in search box.
    • System will retrieve all patients matching the entered search term.
  • Select appropriate form.
    • A request for /openmrs/formDownloadServlet is sent to server. FormDownloadServlet handles request and generates an XML response that contains the form schema (xsd) along with information that will tell the browser to open InfoPath to display the form. Unless previously instructed, the browser will prompt you to Open or Save the document. The XML below helps the browser figure out what it needs to do with the response.
Code Block
xml
xml

<?xml version="1.0"?>
<?mso-infoPathSolution name="Demo Form" href="http://localhost:8080/openmrs/formentry/forms/DemoForm.xsn" solutionVersion="" productVersion="11.0.6357" PIVersion="1.0.0.0" ?>
<?mso-application progid="InfoPath.Document"?>

...

If InfoPath is not behaving as expected (changes aren't being reflected, etc), the problem can often be solved by clearing the cache. You can run the following on the Windows command line or create a batch file.

Code Block
none
none

"C:\Program Files\Microsoft Office\OFFICE11\infopath.exe" /cache ClearAll

...

In other words, if you have a fixed IP for the server in the formentry.infopath_server_url property, don't use

No Format
nopaneltrue
http://localhost:8080/openmrs

to browse/view/open the web application, use the fixed IP you placed in the global property.

...

When opening an InfoPath document, it reports an error of this kind.

Code Block

FormEntry.xsd#/schema/complexType[121][@name = 'sample_concept_question_here_type']/sequence[1]/element[9][@name = 'unknown']
In the same scope elements with the same name, 'unknown', have to be the same type.

...

Panel

You get this error in InfoPath when multiple elements in scope with the same name. This is likely due having duplicates in your concept answers. The solution is to remove all tuples with the same concept_id, answer_concept, and answer_concept drug from concept_answer table in database. You can see the concepts in question by running this code:

Code Block
sql
sql
select concept_id, answer_concept, answer_drug, count(*) as cnt from concept_answer group by concept_id, answer_concept, answer_drug having cnt > 1;

Back up your database and run the following SQL script.

Code Block

# did you remember to backup the database?

# go into openmrs db
use openmrs;

# delete all tuples with the same concept_id and answer_concept by adding temp index
alter ignore table concept_answer add unique index tmp_uniq_idx (concept_id,answer_concept,answer_drug);

# remove the temp index
drop index tmp_uniq_idx on concept_answer;

...