...
Note |
---|
This page is outdated and no longer receives updates! |
Contents
Table of Contents | ||
---|---|---|
|
InfoPath Resources
Form Entry Use Cases
Complete Form Entry Use Case
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.
panel
Code Block |
---|
<?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"?> |
Select the "Open with InfoPath" option.
InfoPath will look for the XSN form at http://localhost:8080/openmrs/formentry/forms/DemoForm.xsn and attempt to open it. If successful, the form will be displayed. Otherwise, InfoPath will display an error message. See InfoPath_
NotesNotes#Troubleshooting for more information on specific errors.
Enter data into the form. This may require stepping through several pages of a form.
Select Submit button on last page of form.
InfoPath POSTs a request containing your form data to the FormUploadServlet.
FormUploadServlet creates a FormEntryQueue record, sets its XML data field with XML form data from the post, and stores the FormEntryQueue in the database.
Process Form Entry Queue Use Case
Scheduler spawns a ProcessFormEntryQueueTask every X seconds.
ProcessFormEntryQueueTask delegates to FormEntryQueueProcessor.
FormEntryQueueProcessor iterates through the FormEntryQueue.
FormEntryQueueProcessor transforms XML data in FormEntryQueue using an XSLT associated with the given form.
FormEntryQueueProcessor creates and stores the HL7InQueue record.
Process HL7 Queue Use Case
Scheduler spawns a ProcessHL7InQueueTask every X seconds.
ProcessHL7InQueueTask calls HL7InQueueProcessor.
HL7InQueueProcessor iterates through the HL7InQueue
HL7InQueueProcessor processes all HL7InQueue records.
HL7InQueueProcessor creates an Encounter and Observations based on the HL7 messages in the queue.
Troubleshooting
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 |
---|
"C:\Program Files\Microsoft Office\OFFICE11\infopath.exe" /cache ClearAll
|
ClassCastException while trying to Download Schema
Problem
Panel |
---|
DEBUG 03.01 - (HibernateConceptDAO.java:getConceptNumeric:516) Getting CONCEPT_NUMERIC 856 |
...
Change your Internet Security settings:
...
Make sure
...
...
(or your site url) is a "Trusted Site".
(In Infopath menu) Tools
...
-> Options -
...
> Internet Options
Click on the Security tab
Select "Trusted Sites"
Click "Sites" button
Add
...
...
(or your site url) if it is not there
Click Ok
Make sure your "Trusted Sites" can do cross-site scripting
(In Infopath menu) Tools -
...
> Options -
...
> Internet Options
Click on the Security tab
Select "Trusted Sites"
Click "Custom Level"
In Miscellaneous --> Access data sources across domains
Check "Enable"
Click Ok
Login required when searching from taskpane
...
In other words, if you have a fixed IP for the server in the formentry.infopath_server_url property, don't use
Code Block |
---|
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:
|
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; |
When submitting an infopath form the message "form submitted successfully" appears but the data does not go into the database
...
This has something to do with a DTD change for how infopath marks insertion points for repeating tables. After upgrading from 1.4 to 1.6, we had to identify all the infopath forms in our system that contained repeating tables, and download the xsn, resave on the desktop with a new filename, and then re-upload.
...