Skip to content

QueryExport

purpose of this module

To provide exporting feature for the Query templates to corresponding query done by CDS or Automatic Query alert. the templates will provide by clients in various formates like Editable Pdf, docx, text. our responsibility is to fill those templates with data and provide a chance to export into there location.

Sample docx

Sample ODT

Sample PDF

Sample V2.pdf

Static PDF

We are getting templates in pdf's with editable format.

Tool: Adobe Acrobat Professional (Licensed but free version avaliable for 30-45 days)

Disadvantates

  1. We can't make richtext like bold for some data dynamically.
  2. We are unable to increase the text area size dynamically base on the data.

Document

We are getting templates in Word document format.

XDoc Report

Dynamic pdf

we are only responsible to create these pdf's using the following tool

Tool: Adobe livecycle designer (Licensed but free version avaliable for 60 days)

Advantages:

  1. We can insert data into any format.
  2. Dynamically text area size will be increased

Disadvantages:

  • It wasn't automatically open in chrome pdf plugin, we need to disable that using chrome://plugins/

Open Office

We are the responsible to create document in the form of Open Office (ODT).

XDoc Report

Files

Tables

Medcentinela

1
2
* FieldDescription
* ExportedDocuments

MedmineMaster

1
2
3
4
5
6
7
* SepsisRanges
* primedocquerytemplates
* primepdfquerytemplates
* ExportDocumentParameters
* commonqueryname
* allsynonymquerynames
* StandardQueryNames

Stored Procedures

1
2
3
4
5
6
* GetQueryNoteByFields
* GetQueryNoteByFieldsForDoc
* getPrimeUsersInfo
* getQueryFormCheckFieldStatus
* getInfectionQueryFormValuesByAccno
* getVitailsByAccount

JSP / Js

1
2
3
* DrgQueryQueue/mainqueue.jsp
* DrgQueryQueue/jquerycaller.jsp
* Jquery/drgquerycheck.js

Java

1
2
3
4
5
6
* biz.kpai.diagnosiscriteria.service.DiagnosisCriteriaService
* biz.kpai.diagnosiscriteria.dao.DiagnosisCriteriaDao
* biz.kpai.diagnosiscriteria.Servlet.PdfGeneration
* biz.kpai.diagnosiscriteria.Servlet.ExportDoc
* biz.kpai.diagnosiscriteria.Servlet.ExportText
* biz.codeextract.documentsummary.servlet.AuditCheckFields

Phase I: Designing templates

PDF

If it is new template then follow these steps:

Step 1:

  • Insert doc or pdf name into primepdfquerytemplates, primedocquerytemplates table in MedmineMaster.
  • insert into primepdfquerytemplates (PDFID,PDFNAME,CONTENT,LASTACTIONBY)values(max(PDFID)+1,Template Name,null,User Name)
Eg: insert into primepdfquerytemplates (PDFID,PDFNAME,CONTENT,LASTACTIONBY)values(52,'Peritonitis',null,'vinaym')
Eg: insert into primedocquerytemplates (DOCID,DOCNAME,CONTENT,LASTACTIONBY)values(52,'Peritonitis',null,'vinaym')

Step 2: To find the Field Names

Step 2.1 Step 2.1:To find Pdf fields name use the following query

Eg: select distinct pdfParameters from MedmineMaster.dbo.ExportDocumentParameters

Step 2.2: Open pdf with Adobe Acrobat Professional in edit text fields format

Step 2.3:

  • If you find any pdfParameter is suitable for corresponding text filed then rename that text filed with pdfparameter name.
  • If it is new text filed then follow below steps
  • Insert all generalparameters,pdfparameters and docparameters into MedmineMaster.dbo.ExportDocumentParameters
Eg: insert into ExportDocumentParameters(documentId,generalParameters,pdfParameters,docParameters,username,DocPdfName)values (52,'faxno','FaxNo','$faxno','vinaym','Neutropenia')
  • 52--> documentId which is given in primepdfquerytemplates
  • faxno--> generalparameters(This is used in json jobject)
  • FaxNo--> Text field name which is given in pdf template
  • $faxno--> Text field name which is given in word document template
  • username
  • templatename-->new template name

Step 3:

Insert into MedmineMaster.dbo.commonqueryname(All template name with corresponding templateid, it is use full for automatic template selection while exporting) Check weather it is exists or not if not using following insert statement you can insert an entry

Eg: insert into commonqueryname (templateid,templatename)values(52,'Peritonitis')

Step4

Add template synonyms in MedmineMaster.dbo.allsynonymquerynames Check weather it is exists or not if not using following insert statement you can insert an entry

Eg: insert into allsynonymquerynames(templateid,templatesynonym)values(52,'Peritonitis')

Document

If it is new template then follow these steps:

Step 1:

Word document must be in docx format only. If it is not in that format then open the document and click on file >save as> Word document(docx).

Step 2:

Make sure all alignments are proper format or not

step3:

For docx i was used velocity framework (mergefileds concept) so that i was followed some steps to give filed names

step3.1:

Place cursor for which filed you want to give name and press Ctrl+F9 it will give curling braces {}.

step3.2:

Place cursor in between the curling braces and right click > Edit field > Field pop up will be opend.

step 3.3

In Field Names select MergeField (after pop up open just click m in 2 times), automatically right side Field properties will be opend.

step 3.4

In that Field properties section Field Name field give filed name(docParameters in ExportDocumentParameters table) what you wnat with prefix $.

Eg: $faxno

Step 3.5

Press OK, in document it will show like this «$faxno» (This filed is called merge field).

Step 4

Repeat 3 step for all fields to give filed names.

Step 5

To insert barcode we need place sample image and bookmark that image

Step 5.1

In Word document click on insert menu and select picture (Image location).

Step 5.2

Select that image and click on insert menu choose Bookmark, give name as logo and click on add.

Open Office

If it is new template then follow these steps:

Step 1:

Open document with Open Office click on file >save as> Open Office(odt)..

Step 2:

Make sure all alignments are proper format or not

Step 3:

For odt also used velocity framework (mergefileds concept) so that i was followed some steps to give filed names

Step 3.1:

Plase cursor for which filed you want to give name and press Ctrl+F2 it will open a Fields dialog box.

Step 3.2:

Select Functions Input filed click > Insert It will open Input Field dialog box.

Step 3.4:

In second text area give filed name(docParameters in ExportDocumentParameters table) what you want with prefix $.

Eg: $faxno

Step 3.5:

Press OK, next close in document it will show like this $faxno (This filed is called merge field).

Step 4:

Repeat 3 step for all fields to give filed names.

Step 5:

To insert barcode we need to place sample image and bookmark that image.

Step 5.1:

Step 5.1: In odt document click on insert menu and select picture > From file (Image location)

Step 5.2:

Select that image and right click on image > Picture > Options> Name: logo > OK.

Query Template Selection

![alt text][logo]

Static PDF(PDFV1)

Dynamic PDF(PDFV2)

Document & OpenOffice