Skip to content

InterqualVersionImplementation

Interaqual Version Implentation

Download PDF's and XML files from ChangeHealthCare site by follwing credentials

1
2
3
4
URL : https://prod.cue4.com/caas/review/index.html#!/logout

UserName : Sageer.Pasha@crmc.health
Password : Winter@2022

To download PDF files first log in through above credentials Then select Subset 'LOC:ACUTE ADULT' or 'LOC:ACUTE Pediatric' Then click on 'Find Subsets' ,there we can see the subsetNames with versions Then Check All subsets for New versions,If new version found then we can select version . Then click on 'Full subset' and download PDF and name it as SubsetName.

TO download XML files , select Subset 'LOC:ACUTE ADULT' or 'LOC:ACUTE Pediatric' Then click on 'Find Subsets' ,there we can see the subsetNames with versions Then Check All subsets for New versions,If new version found then we can select version . Then click on 'Begin Medical Review', Then select day (any one) Then click on 'Mediacal Review Completed' , Then select 'Copy as', Then select 'XML', Then Click on 'Copy to Clipboard' Then Paste the copied data in Notepad and save as SubesetName.xml filename, and save as type 'All files' and encoding as 'UTF-8'.

Process XML files to get Interqual Criteria Text

make sure to remove below tag from xml file, if it is there

1
<!DOCTYPE pdf2xml SYSTEM "pdf2xml.dtd">

use kpai-data-parser Application to process xml files.

When we are processing 'LOC:ACUTE Adult' related files we have to mention in the programme productName is 'LOC:ACUTE Adult' in properies and DataAnalysis ..

When we are processing 'LOC:ACUTE Pediatric' related files we have to mention in the programme productName is 'LOC:ACUTE Pediatric'

(a) here first format the Xml file by removing unwanted tags and replacing tags like ("≥",>=")

1
2
3
4
5
String replacedtext = oldtext.replaceAll("≥", "&gt;=").replaceAll("≤", "&lt;=")
                    .replaceAll("109/L", "10^9/L").replaceAll("106/L", "10^6/L").replaceAll("</CP>", "")
                    .replaceAll("\">", "\"/>");
            // .replaceAll("xml:space=\"preserve\"","");
            String newOne = replace(replacedtext, "<Review", "<ReviewSummaryXML>", "<Review>\n <ReviewSummaryXML>");

(b) read Node like "CP" and Attributes like "ID" and "Txt" for CriteriaId and CriteriaText based on CriteriaId length, levels are assigned.

Check length of CriteriaId's if length is 10 then it takes subLevel.length() == 10 and length is 12 it takes subLevel.length() == 12 and so on.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
 if (nodeName2.equals("CP")) {

   subLevel = ((Element) letterChild).getAttribute("ID");                                                    

if (subLevel.length() == 10) {
                             String epiDay;
                             letter1 = ((Element) letterChild).getAttribute("Txt");
                             letter1 = letter1.trim();
                             epiDay = letter1;
                             if (epiDay.contains(",")) {
                                 String letter[] = epiDay.split(",");
                                 epiDay = letter[0];
                             }

episodeDay = "Select Level of Care";
                             currentId=subLevel;
                             level12=currentId;
                             previousId=level12;
                             level=1;
                             levelOfCare="Root";                            
                         }
                         if (subLevel.length() == 12) {
                             letter1 = ((Element) letterChild).getAttribute("Txt");
                             letter1 = letter1.trim();
                             String lCare[] = letter1.split(",");
                             levelOfCare = lCare[0];
                             currentId=subLevel;
                             level14=currentId;
                             previousId=level12;
                             level=2;                           
                         }
          } 

Check FolderName and Database and serverName

Required database databasename: "testdb"

Required parser interqual: "yes" qualityindicator: "no"

required filename foldername: D:\AcuteAdult

Data Source properties

master: datasource: jdbc-url: jdbc:sqlserver://192.168.20.241:1433;databaseName=KPAIMaster username: medsa password: Lahari01 driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver

testdb: datasource: jdbc-url: jdbc:sqlserver://192.168.20.241:1433;databaseName=TestDB username: medsa password: Lahari01 driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver

In the programme we are calling a procedure 'IQ_UpdateCriteriaMetCount' to update CriteriaMetCount.

Set the product name ='LOC:Acute Adult' when we are processing 'Acute Adult' Xml files in 'IQ_UpdateCriteriaMetCount' procedure.

Set the product name ='LOC:Acute Pediatric' when we are processing 'Acute Pediatric' Xml files in 'IQ_UpdateCriteriaMetCount' procedure.

Insert the data into AdimtCriteria_temp table for Required columns like ProductName,SubsetName,SubsetVersion,EpisodeDay,LevelOfCare,CriteriaID, CriteriaText,TreeLevel,ParentCriteriaID,CriteriaMetCount,CriteriaCheck,ParentStatus in TestDB database.

Insert Product,SubsetName,SubsetVersion into KpaiMaster.dbo.MST_Iqsubset from TestDB.dbo.AdimtCriteria_temp

Query :

1
2
3
Insert into KpaiMaster.dbo.MST_Iqsubset(Product,SubsetName,SubsetVersion)
select distinct productname,SubsetName,SubsetVersion from TestDB.dbo.AdimtCriteria_temp
where productName='LOC: ACUTE ADULT' and SubsetName='General Medical-july2021' and SubsetVersion=2021

Insert the data into KPAIMaster.dbo.MST_IQSubsetCriteria for columns like IQSubSetId,EpisodeDay,LevelOfCare,CriteriaID,CriteriaText,ParentCriteriaID,CriteriaMetCount,TreeLevel,NoteID,CriteriaCheck,ParentStatus,CriteriaMetCountClause

Query:

1
2
3
4
5
6
7
8
9
insert into KPAIMaster.dbo.MST_IQSubsetCriteria(IQSubSetId,EpisodeDay,LevelOfCare,CriteriaID,CriteriaText,ParentCriteriaID,CriteriaMetCount,
TreeLevel,NoteID,CriteriaCheck,ParentStatus,CriteriaMetCountClause)
select distinct a2.IQSubSetId,a1.EpisodeDay,a1.LevelOfCare,a1.CriteriaID,a1.CriteriaText,a1.ParentCriteriaID,a1.CriteriaMetCount,
a1.TreeLevel,a1.NoteID,a1.CriteriaCheck,a1.ParentStatus,a1.CriteriaMetCountClause
from TestDB.dbo.AdmitCriteria_Temp a1
inner join KPAIMaster.dbo.MST_IQSubSet a2 on a1.ProductName=a2.Product and a1.SubsetName=a2.SubsetName 
and a1.SubsetVersion=a2.SubsetVersion
where a2.IqsubsetId=260 and a1.subsetName='General Medial-july2021' and a.product='LOC: ACUTE ADULT'
order by a2.IQSubSetId

Process PDF files to get Note Ids and Note Description.

first need to convert Pdf files to Xml files by using following command in terminal

pdftohtml -xml 2020ExtendedStay.pdf 2020ExtendedStay.xml

make sure no spaces and brackets in pdf file name while using this command.

make sure to remove below tag from xml file, if it is there

1
<!DOCTYPE pdf2xml SYSTEM "pdf2xml.dtd">

Remove the tags After the ' line to the before the line of Jape starting line.

In the Jape file the line started with one of the below three lines, remaining two lines should be enable. 1.({Token.string=="Select"}{Token.string=="Day"}{Token.string==","}{Token.string=="One"}{Token.string==":"})
2.{Token.string=="Select"}{Token.string=="Review"}{Token.string=="Type"}{Token.string==","}{Token.string=="One"}{Token.string==":"})
3.({Token.string=="Select"}{Token.string=="Level"}{Token.string=="of"}{Token.string=="Care"}{Token.string==","}{Token.string=="One"}{Token.string==":"})

use gate-interaqual Application to process Xml files.

use IqNotes.jape to create Annotations for

1.Note ids corresponding Criteriatext 2.Note Descriptions

Check Datasource serverName,folderName in programme .

foldername: D:/Projects_Data/Interqual/Documents/Adult.

gateapplication: path: file:D:/Projects_Data/Interqual/Xgapp/application.xgapp

gate.docXmlBasePath: path: D:/Projects_Data/Interqual/datastore

Required database : databasename: "testdb" masterdatabasename: "KPAImaster"

Data Source properties :

master: datasource: jdbc-url: jdbc:sqlserver://192.168.20.241:1433;databaseName=KPAIMaster username: medsa password: Lahari01 driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver

testdb: datasource: jdbc-url: jdbc:sqlserver://192.168.20.241:1433;databaseName=TestDB username: medsa password: Lahari01 driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver

crmc: datasource: jdbc-url: jdbc:sqlserver://192.168.20.241:1433;databaseName=CRMC username: medsa password: Lahari01 driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver

Here we are getting IQSubsetID using SubsetName in KPAIMaster.dbo.MST_IQSubset, then we are getting CriteriaID's using SubsetID in KPAIMaster.dbo.MST_IQSubset, After Gate Applicattion Run, the size of Annotations List and the size of CriteriaID's list matched then Inserting the data into target tables like 'IQSubsetCriteria_temp' and 'IQSubsetNote_temp'

If size of CriteriaId's in KPAIMaster.dbo.MST_IQSubsetcriteria and IqSubsetCriteria_Temp then we will check the XML file to check CriteriaiD'S of both tables. same for NoteId's also..

Fill the table IQSubsetCriteria_temp with IQSubsetID,CriteriaID,CriteriaText,NoteID by using "finalCriteriaNote" Annotation

Fill the table IQSubsetNote_temp with IQSubsetID,SubsetName,NoteID,Notedescription by using "Notedescfinal" Annotation

Insert the data into KPAIMaster.dbo.MST_IQSubSetNote for columns like IqSubsetId,SubsetName,NoteId,NoteDescription from select IqSubsetId,SubsetName,NoteId,NoteDescription from TestDB.dbo.IQSubsetNote_Temp where IqsubsetId=260

Query:

1
2
3
Insert into KPAIMaster.dbo.MST_IQSubSetNote (IqSubsetId,SubsetName,NoteId,NoteDescription)
select distinct IqSubsetId,SubsetName,NoteId,NoteDescription from TestDB.dbo.IQSubsetNote_Temp
where Iqsubset=260

update NoteId in KPAIMaster.dbo.MST_IQSubsetCriteria with NoteId in TestDB.dbo.IQSubsetCriteria_temp

Query:

1
2
3
update KPAIMaster.dbo.MST_IQSubsetCriteria set NoteID=it.NoteID from KPAIMaster.dbo.MST_IQSubsetCriteria ic
inner join TestDB.dbo.IQSubsetCriteria_temp it on it.IQSubsetID=ic.IQSubsetId and it.CriteriaID=ic.CriteriaID
where IQSubsetId=260

Update ParentCriteriaID in KPAIMaster.dbo.MST_IQSubsetCriteria to 'ROOT' where LevelOfCare='ROOT'

Query:

1
update KPAIMaster.dbo.MST_IQSubsetCriteria set ParentCriteriaID='ROOT' where  LevelOfCare='ROOT' and IqsubsetId=260

Update Noteid from 'None' values to null in KPAIMaster.dbo.MST_IQSubsetCriteria

Query :

1
update KPAIMaster.dbo.MST_IQSubsetCriteria set NoteID=null where  NoteID='None' and IqsubsetId=260