Page 1 of 1

Is this the right place to ask?

Posted: Mon Jul 25, 2011 12:47 pm
by bdtrauma
I've developed an .asp page that extracts data from our hospital AS400 tables and displays them in a web page (not pretty) on my iphone.

Is there a way to run the javascript commands within the toolkit iOS and parse out the data using the nice controls in the Livecode developer?... or am I left to use the web controls only to display the data?

Thanks,

Bert

Re: Is this the right place to ask?

Posted: Mon Jul 25, 2011 2:04 pm
by Jellicle
Can't you just grab the data from the web page and process it in LiveCode? Why do you need javascript?

g

Re: Is this the right place to ask?

Posted: Wed Jul 27, 2011 10:09 pm
by bdtrauma
This is the code in my .asp page. I want to take the items I retrieve and put them into fields on my mobile app

With Response
Dim cnt, prncnt, rm(50), bed(50), ptname(50), mdr(50), pntnum(50)
cnt = 0
While Not objRS.EOF
rm(cnt) = objRS("CBROOM")
bed(cnt) = objRS("CBBED#")
ptname(cnt) = objRS("PPNAME")
mdr(cnt) = objRS("PPMDR#")
pntnum(cnt) = objRS("CBPAT#")
cnt = cnt + 1
objRS.MoveNext
Wend
objRS.Close
Set objRS = Nothing

objConn.Close
Set objConn = Nothing

End With

Set objConn = Server.CreateObject ("ADODB.Connection")
Set objRS = Server.CreateObject("ADODB.Recordset")
Set objCmd = Server.CreateObject("ADODB.Command")

strGroupNum = "10"

Set objConn = GetDataConnection

strSQL = "CADVMOD.GETEDBDSMX"

Set objCmd.ActiveConnection = objConn

With objCmd
.CommandText = strSQL
.CommandType = adCmdStoredProc


Set objParm = Server.CreateObject("ADODB.Parameter")

Set objParm = .CreateParameter("I_DHGRP", adChar, adParamInput, 2)
objParm.Value = strGroupNum
.Parameters.Append objParm

Set objRS = .Execute

End With

With Response
Dim drwho, i, fptname, chkptnum, bkptnum
While Not objRS.EOF
if objRS("CCATNR") = "" then
drwho = objRS("CDABBV")
else
if objRS("CCATNR") = " 01249" Then drwho = "TH" end if
if objRS("CCATNR") = " 01315" Then drwho = "WH" end if
if objRS("CCATNR") = " 01566" Then drwho = "TR" end if
if objRS("CCATNR") = " 01670" Then drwho = "AG" end if
if objRS("CCATNR") = " 01676" Then drwho = "RZ" end if
if objRS("CCATNR") = " 01681" Then drwho = "JZ" end if
if objRS("CCATNR") = " 01725" Then drwho = "JS" end if
if objRS("CCATNR") = " 01876" Then drwho = "MZ" end if
if objRS("CCATNR") = " 01988" Then drwho = "CT" end if
if objRS("CCATNR") = " 02072" Then drwho = "LT" end if
if objRS("CCATNR") = " 02146" Then drwho = "RME" end if
if objRS("CCATNR") = " 02165" Then drwho = "JM" end if
if objRS("CCATNR") = " 02200" Then drwho = "SN" end if
if objRS("CCATNR") = " 02201" Then drwho = "TP" end if
if objRS("CCATNR") = " 02205" Then drwho = "FH" end if
if objRS("CCATNR") = " 02206" Then drwho = "MS" end if
if objRS("CCATNR") = " 02383" Then drwho = "RM" end if
end if
//match pat# to get patient name
for i = 0 to cnt-1
chkptnum = CLng(objRS("CCPAT#"))
bkptnum = CLng(pntnum(i))
if chkptnum = bkptnum then
fptname = ptname(i)
end if
Next
if objRS("CBROOM") = "C" Then
.Write("<li class=""ebeds"">")
else
.Write("<li>")
end if
.Write (objRS("CBROOM") & objRS("CCBED#") & " " & Left(fptname,14) & "<a href=""javascript:sendorders(" & objRS("CCMDR#") & "," & objRS("CCPAT#") & ",'" & fptname & "')"" class=""but4"">ORD</a><a href=""javascript:selectbed(" & objRS("CCPAT#") & ",'" & fptname & "')"" class=""but1"">Lab</a>")
.Write("<a href=""javascript:selecttrans(" & objRS("CCMDR#") & ")"" class=""but2"">TRX</a>")
.Write("</li>")
objRS.MoveNext
Wend
objRS.Close
Set objRS = Nothing

objConn.Close
Set objConn = Nothing

Re: Is this the right place to ask?

Posted: Thu Jul 28, 2011 1:26 am
by Jellicle
I'm not sure that posting the code will help - I doubt many of us speak .asp. Show us what the date returned from this code looks like instead.

Re: Is this the right place to ask?

Posted: Sun Jul 31, 2011 11:39 pm
by CALL-151
I can't answer your question, but if you're in the US please be aware that the current implementation of LC for iOS (4.6.3) does not support encryption standards required by HIPAA.

Re: Is this the right place to ask?

Posted: Mon Aug 01, 2011 7:15 pm
by bdtrauma
thanks... i'm trying to take my web app and clean it up to work well on the ipad within my emergency dept. It will run within our network which is 'compliant' per our security team. I'll let them know about this and see if it is a concern (ie. the information is within our secure network so if they hack into that they will have access to much more than just my data flowing).