RE: [EXTERNAL] [mdws] Calls to EmrService methods getAllMeds, getVitals return error

Hi Igor, Are you calling select() with the patient DFN before calling getVitals()? getVitals() doesn't accept a patient ID as an argument up at the MDWS EmrSvc level. The reason for that is MDWS establishes the DFN in the context so that VistA can do its thing with the patient DFN set there as necessary. Let me know if that helps, van. From: Apache [mailto:apache@groups.osehra.org] On Behalf Of igor.b Sent: Sunday, March 09, 2014 9:50 AM To: MDWS Subject: [EXTERNAL] [mdws] Calls to EmrService methods getAllMeds, getVitals return error I am new to MDWS, and this may be a trivial issue, still I can't resolve it on my own so far. When I am calling EmrService method getVitals, I get this error (below). Calls to getAllMeds, getCytopathologyReports, getSurgeryReports and others return similar error. Tried to call this method with a Patient ID as an argument - same result. What am I doing wrong? Thanks!! object(stdClass)#5 (3) { ["fault"]=> object(stdClass)#6 (4) { ["type"]=> string(61) "gov.va.medora.mdo.exceptions.InvalidlyFormedRecordIdException" ["message"]=> string(663) "*** Begin Exception String *** Exception Type: InvalidlyFormedRecordIdException Error Code: ARGUMENT_INVALID Error Code Value: ARGUMENT_INVALID Help Message: Message: Invalidly formed record ID: Source: mdo Stack Trace: at gov.va.medora.mdo.dao.vista.VistaUtils.CheckRpcParams(String ien, String fromDate, String toDate) at gov.va.medora.mdo.dao.vista.VistaVitalsDao.buildGetVitalSignsRdvRequest(String dfn) at gov.va.medora.mdo.dao.vista.VistaVitalsDao.getVitalSigns(String dfn) at gov.va.medora.mdo.dao.vista.VistaVitalsDao.getVitalSigns() Target Site: Void CheckRpcParams(System.String, System.String, System.String) *** End Exception String *** " ["stackTrace"]=> string(333) " at gov.va.medora.mdo.dao.vista.VistaUtils.CheckRpcParams(String ien, String fromDate, String toDate) at gov.va.medora.mdo.dao.vista.VistaVitalsDao.buildGetVitalSignsRdvRequest(String dfn) at gov.va.medora.mdo.dao.vista.VistaVitalsDao.getVitalSigns(String dfn) at gov.va.medora.mdo.dao.vista.VistaVitalsDao.getVitalSigns()" ["suggestion"]=> string(0) "" } ["count"]=> int(0) ["tag"]=> string(3) "500" } Promote content Group sticky: Not Sticky Featured content: Not Featured Email this post to members of all groups: No -- Full post: http://www.osehra.org/content/calls-emrservice-methods-getallmeds-getvit... Manage my subscriptions: http://www.osehra.org/og_mailinglist/subscriptions Stop emails for this post: http://www.osehra.org/og_mailinglist/unsubscribe/3709
like0

Comments

RE: [EXTERNAL] [mdws] Calls to EmrService methods getAllMeds, ge

Igor Brailovsky's picture

Hello, Van.

Now I get it. I did NOT call select() immediately before getVitals()  - did not know about the MDWS context.
I have few questions, but hopefully all of them require simple, binary answers. Appreciate your help!

1. Is it a common practice to call select() immediately before calling details method (such as getAllMeds())? 

2. Will patient ID stay in the MDWS context until someone calls select() method again, passing another patientID?
3. Just curious, was there ever a problem with concurrent calls trying to get info about different patients at the same time?
4. Do we need to set PatientID in MDWS context before updating MDWS records, too?
5. Are there any other attributes of the MDWS context that may need to be set, and which methods set them?

Thank you for the tip, and for your time!
Sincerely,
Igor Brailovsky

>________________________________
> From: "Curtis, Van" <Van.Curtis@va.gov>
>To: mdws@groups.osehra.org
>Sent: Monday, March 10, 2014 1:28 PM
>Subject: [mdws] RE: [EXTERNAL] [mdws] Calls to EmrService methods getAllMeds, getVitals return error
>
>
>
>Hi Igor,

>Are you calling select() with the patient DFN before calling getVitals()? getVitals() doesn't accept a patient ID as an argument up at the MDWS EmrSvc level. The reason for that is MDWS establishes the DFN in the context so that VistA can do its thing with the patient DFN set there as necessary.

>Let me know if that helps,
>van.

>From:Apache [mailto:apache@groups.osehra.org] On Behalf Of igor.b
>Sent: Sunday, March 09, 2014 9:50 AM
>To: MDWS
>Subject: [EXTERNAL] [mdws] Calls to EmrService methods getAllMeds, getVitals return error

>I am new to MDWS, and this may be a trivial issue, still I can't resolve it on my own so far.
>When I am calling EmrService method getVitals, I get this error (below). 
>Calls to getAllMeds, getCytopathologyReports, getSurgeryReports and others return similar error.
>Tried to call this method with a Patient ID as an argument - same result.
>What am I doing wrong? Thanks!!
>object(stdClass)#5 (3) {
>  ["fault"]=>
>  object(stdClass)#6 (4) {
>    ["type"]=>
>    string(61) "gov.va.medora.mdo.exceptions.InvalidlyFormedRecordIdException"
>    ["message"]=>
>    string(663) "*** Begin Exception String ***
>Exception Type: InvalidlyFormedRecordIdException
>Error Code: ARGUMENT_INVALID
>Error Code Value: ARGUMENT_INVALID
>Help Message: 
>Message: Invalidly formed record ID: 
>Source: mdo
>Stack Trace:    at gov.va.medora.mdo.dao.vista.VistaUtils.CheckRpcParams(String ien, String fromDate, String toDate)
>   at gov.va.medora.mdo.dao.vista.VistaVitalsDao.buildGetVitalSignsRdvRequest(String dfn)
>   at gov.va.medora.mdo.dao.vista.VistaVitalsDao.getVitalSigns(String dfn)
>   at gov.va.medora.mdo.dao.vista.VistaVitalsDao.getVitalSigns()
>Target Site: Void CheckRpcParams(System.String, System.String, System.String)
>*** End Exception String ***
>"
>    ["stackTrace"]=>
>    string(333) "   at gov.va.medora.mdo.dao.vista.VistaUtils.CheckRpcParams(String ien, String fromDate, String toDate)
>   at gov.va.medora.mdo.dao.vista.VistaVitalsDao.buildGetVitalSignsRdvRequest(String dfn)
>   at gov.va.medora.mdo.dao.vista.VistaVitalsDao.getVitalSigns(String dfn)
>   at gov.va.medora.mdo.dao.vista.VistaVitalsDao.getVitalSigns()"
>    ["suggestion"]=>
>    string(0) ""
>  }
>  ["count"]=>
>  int(0)
>  ["tag"]=>
>  string(3) "500"
>}


>Promote content
>Group sticky: 
>Not Sticky
>Featured content: 
>Not Featured
>Email this post to members of all groups: 
>No
>--
>Full post: http://www.osehra.org/content/calls-emrservice-methods-getallmeds-getvit...
>Manage my subscriptions: http://www.osehra.org/og_mailinglist/subscriptions
>Stop emails for this post: http://www.osehra.org/og_mailinglist/unsubscribe/3709
>--
>Full post: http://www.osehra.org/content/re-external-mdws-calls-emrservice-methods-...
>Manage my subscriptions: http://www.osehra.org/og_mailinglist/subscriptions
>Stop emails for this post: http://www.osehra.org/og_mailinglist/unsubscribe/3713
>
>
>

like0

RE: [EXTERNAL] [mdws] Calls to EmrService methods getAllMeds, ge

Van Curtis's picture

Glad I could help.

2. (Answer this first so #1 answer makes sense): Yes the patient stays
in the context until calling select() again -- at least IIRC. This is
for patient centric calls.

1. Call select() before working with a single patient *once*. You don't
need to do select(dfn1), getVitals(), select(dfn1), getAllMeds().

3. Not that I know of because MDWS works synchronously with a single
VistA. If your application were to do something like spin up multiple
threads to query the same VistA for two different patients, MDWS would
open two connections. This has to do with us historically choosing to
follow the CPRS model rather than trying to reinvent the wheel on top of
it. As VistA reveals new APIs for talking to it and policy allows for
fast user switching, etc., MDWS will probably take advantage of those.

4. See #1. Depending on the arguments of the call in the MDWS API, you
may or may not have to include it. If a call requires a patient DFN then
you should use it and not hope that MDWS will just infer it. The
opposite of the problem you were having originally ;-)

5. You usually should not have to worry about those -- the patient DFN
w/ select is really the big one. Things like the user DUZ are set when
you connect, of course, and MDWS may do some context switching
underneath the hood, but the general intent is that MDWS clients
shouldn't have to know about all that magic.

OK?

From: Apache [mailto:apache@groups.osehra.org] On Behalf Of Igor
Brailovsky
Sent: Monday, March 10, 2014 10:47 AM
To: mdws@groups.osehra.org
Subject: Re: [mdws] RE: [EXTERNAL] [mdws] Calls to EmrService methods
getAllMeds, getVitals return error

Hello, Van.

Now I get it. I did NOT call select() immediately before getVitals() -
did not know about the MDWS context.

I have few questions, but hopefully all of them require simple, binary
answers. Appreciate your help!

1. Is it a common practice to call select() immediately before calling
details method (such as getAllMeds())?

2. Will patient ID stay in the MDWS context until someone calls select()
method again, passing another patientID?

3. Just curious, was there ever a problem with concurrent calls trying
to get info about different patients at the same time?

4. Do we need to set PatientID in MDWS context before updating MDWS
records, too?

5. Are there any other attributes of the MDWS context that may need to
be set, and which methods set them?

Thank you for the tip, and for your time!

Sincerely,

Igor Brailovsky

________________________________

From: "Curtis, Van" <Van.Curtis@va.gov>
To: mdws@groups.osehra.org
Sent: Monday, March 10, 2014 1:28 PM
Subject: [mdws] RE: [EXTERNAL] [mdws] Calls to EmrService
methods getAllMeds, getVitals return error

Hi Igor,

Are you calling select() with the patient DFN before calling
getVitals()? getVitals() doesn't accept a patient ID as an argument up
at the MDWS EmrSvc level. The reason for that is MDWS establishes the
DFN in the context so that VistA can do its thing with the patient DFN
set there as necessary.

Let me know if that helps,

van.

From: Apache [mailto:apache@groups.osehra.org] On Behalf Of
igor.b
Sent: Sunday, March 09, 2014 9:50 AM
To: MDWS
Subject: [EXTERNAL] [mdws] Calls to EmrService methods
getAllMeds, getVitals return error

I am new to MDWS, and this may be a trivial issue, still I can't
resolve it on my own so far.

When I am calling EmrService method getVitals, I get this error
(below).

Calls to getAllMeds, getCytopathologyReports, getSurgeryReports
and others return similar error.

Tried to call this method with a Patient ID as an argument -
same result.

What am I doing wrong? Thanks!!

object(stdClass)#5 (3) {

["fault"]=>

object(stdClass)#6 (4) {

["type"]=>

string(61)
"gov.va.medora.mdo.exceptions.InvalidlyFormedRecordIdException"

["message"]=>

string(663) "*** Begin Exception String ***

Exception Type: InvalidlyFormedRecordIdException

Error Code: ARGUMENT_INVALID

Error Code Value: ARGUMENT_INVALID

Help Message:

Message: Invalidly formed record ID:

Source: mdo

Stack Trace: at
gov.va.medora.mdo.dao.vista.VistaUtils.CheckRpcParams(String ien, String
fromDate, String toDate)

at
gov.va.medora.mdo.dao.vista.VistaVitalsDao.buildGetVitalSignsRdvRequest(
String dfn)

at
gov.va.medora.mdo.dao.vista.VistaVitalsDao.getVitalSigns(String dfn)

at gov.va.medora.mdo.dao.vista.VistaVitalsDao.getVitalSigns()

Target Site: Void CheckRpcParams(System.String, System.String,
System.String)

*** End Exception String ***

"

["stackTrace"]=>

string(333) " at
gov.va.medora.mdo.dao.vista.VistaUtils.CheckRpcParams(String ien, String
fromDate, String toDate)

at
gov.va.medora.mdo.dao.vista.VistaVitalsDao.buildGetVitalSignsRdvRequest(
String dfn)

at
gov.va.medora.mdo.dao.vista.VistaVitalsDao.getVitalSigns(String dfn)

at
gov.va.medora.mdo.dao.vista.VistaVitalsDao.getVitalSigns()"

["suggestion"]=>

string(0) ""

}

["count"]=>

int(0)

["tag"]=>

string(3) "500"

}

Promote content

Group sticky:

Not Sticky

Featured content:

Not Featured

Email this post to members of all groups:

No

--
Full post:
http://www.osehra.org/content/calls-emrservice-methods-getallmeds-getvit
...
<http://www.osehra.org/content/calls-emrservice-methods-getallmeds-getvi
tals-return-error-0>
Manage my subscriptions:
http://www.osehra.org/og_mailinglist/subscriptions
Stop emails for this post:
http://www.osehra.org/og_mailinglist/unsubscribe/3709

--
Full post:
http://www.osehra.org/content/re-external-mdws-calls-emrservice-methods-
getallmeds-getvitals-return-error
Manage my subscriptions:
http://www.osehra.org/og_mailinglist/subscriptions
Stop emails for this post:
http://www.osehra.org/og_mailinglist/unsubscribe/3713

like0