iCPRS

40 views
Skip to first unread message

rtweed

unread,
Feb 5, 2012, 4:35:22 AM2/5/12
to Hardhats
Not sure who the author is:

http://yammyapps.com/iphone/apps/498891800

I don't believe it's an EWD app, but now we have dEWDrop as a
development platform, it would be nice to see EWD/Sencha Touch being
used to create more of this kind of thing

Rob

Michael Cham

unread,
Feb 9, 2012, 2:02:00 PM2/9/12
to Hardhats
Hi Rob,
That's me. Some more info here -->http://blenderhouse.blogspot.com/
2012/02/icprs-vista-for-iphoneipad.html

A question. With EWD, you can call the RPCs that CPRS uses?

Mike

kdt...@gmail.com

unread,
Feb 9, 2012, 6:20:06 PM2/9/12
to Hardhats
Michael,

This is very interesting. Could you briefly discuss your RPC broker
connection?

The latest version of Delphi will cross compile apps for iOS. I had
thought it would be interesting to port Apps to iOS, but I didn't want
to have to reengineer the network connection. How did you do it?

Thanks,
Kevin

rtweed

unread,
Feb 12, 2012, 10:01:15 AM2/12/12
to Hardhats
Yes you can - Zach Gonzales is probably the best expert on RPC
integration with EWD. I covered it briefly in the EWD for VistA
training course by the way.

Rob

Thurber, Joe

unread,
Feb 12, 2012, 10:48:36 AM2/12/12
to <hardhats@googlegroups.com>, Hardhats
Zach can correct me of I'm wrong - the way it actually works is not using the RPC broker. What we do with EWD is call the same routines that the broker calls. In essence, you should be able to call any routine this way even if it is not listed in the remote procedure file. If you want to imitate or rewrite CPRS, you can look up each RPC it calls in the Remote Procedure File and call the same routine and tag with the correct arguments from EWD. Very powerful!

> --
> http://groups.google.com/group/Hardhats
> To unsubscribe, send email to Hardhats+u...@googlegroups.com

________________________________

Email correspondence to and from this address is subject to the North Carolina Public Records Law and may be disclosed to third parties by an authorized State official. Unauthorized disclosure of juvenile, health, legally privileged, or otherwise confidential information, including confidential information relating to an ongoing State procurement effort, is prohibited by law. If you have received this e-mail in error, please notify the sender immediately and delete all records of this e-mail.

Michael Cham

unread,
Feb 12, 2012, 3:17:52 PM2/12/12
to Hardhats
That make sense. Would it respect the AVAILABILITY? Restricted,
Agreement, Public, Subscription, etc...

My current use case is FOIA only, but sounds like fun to play with.
Is there a public demo server that interested developers can try?

On Feb 12, 10:48 am, "Thurber, Joe" <joe.thur...@dhhs.nc.gov> wrote:
> Zach can correct me of I'm wrong - the way it actually works is not using the RPC broker.  What we do with EWD is call the same routines that the broker calls.  In essence, you should be able to call any routine this way even if it is not listed in the remote procedure file.  If you want to imitate or rewrite CPRS, you can look up each RPC it calls in the Remote Procedure File and call the same routine and tag with the correct arguments from EWD.  Very powerful!
>

Michael Cham

unread,
Feb 12, 2012, 3:31:43 PM2/12/12
to Hardhats
My iOS version is basically a straight port of the original code. iOS
has a TCP stream socket interface that allows for async comm. Under
the hood they have a BSD-style socket interface, but I believe using
it requires you to do a lot of work to make it work nice with the rest
of the iOS frameworks.
My current implementation simulates blocking reads and writes using
the async api so the RPC Broker code is pretty similar to the Windows
implementation. The downside is that it doesn't respect the event-
driven UI model that UIKit iPhone apps subscribe to.
There are basically two primary alternatives so that the app respects
the primary event loop, spin up a separate thread in the app that
handles RPC Broker communication or convert the RPC broker code to be
async(non-blocking).
I have the async version mostly done, the error recovery stuff is the
hard part(of course).

Mike

Zach Gonzales

unread,
Feb 12, 2012, 3:32:06 PM2/12/12
to Hardhats
Very powerful indeed!! IMHO reusing the existing RPCs is the way to
go. The beauty of this approach is we get to stand on the shoulders of
giants. These calls have been in production for how long? Used across
how many VAs, to care for how many people? See my point? The hard work
is done(for the most part).

Here is that approach(all you need is a DFN and "U" defined in the
session array).

getAllergies(sessid);
N U S U=$$getSessionValue^%zewdAPI("vista_U",sessid)
N DFN S DFN=$$getSessionValue^%zewdAPI("vista_DFN",sessid); patient
DFN
D LIST^ORQQAL(.ALGL,DFN) ;RPC: fetches allergies for cover sheet
N ALGRS,ALDESC
N ALCNT S ALCNT=""
F S ALCNT=$O(ALGL(ALCNT)) q:ALCNT="" D
. S ALDESC=$P(ALGL(ALCNT),U,2) ;allergy description
. S ALGRS(ALCNT)=ALDESC
D mergeArrayToSession^%zewdAPI(.ALGRS,"vista_Allergies",sessid);
Q ""

...And the session array it creates to populate any number of display
options on the client end.

^%zewdSession("session",0,"vista_Allergies",1)="CODEINE"
^%zewdSession("session",0,"vista_Allergies",2)="AMPICILLIN"
^%zewdSession("session",0,"vista_Allergies",3)="SULFONAMIDE/RELATED
ANTIMICROBIALS"
^%zewdSession("session",0,"vista_Allergies",4)="IBUPROFEN"


Michael I hope this answers your question, "With EWD, you can call the
RPCs that CPRS uses?"

I would be most happy to discuss this further. There is already a
project underway to build and share a library of EWD wrappers around
VISTA RPCs. I am fairly confident that the first batch of these will
be announced real soon, stay tuned!!

Anyone interested in helping out, this is totally volunteer and being
done without any sponsorship. If it sounds like something you would be
interested in, you can contact me off list and I can fill you in
more.

Exciting stuff!!

Zach
Reply all
Reply to author
Forward
0 new messages