Question
Warren Oyco · Jul 27, 2021

How To Pass Custom Class

I've created a custom class that extends to the standard HS.Message.PatientSearchRequest. Inside the custom class i just want to pass the data as input only.

But i am getting ERROR #6277: Type attribute, s01:AcoPatientSearchRequest, does not specify valid type for XML input tag: pRequest (ending at line 5 character 171)
</error>

I tried adding Parameter XMLIGNOREINVALIDTAG = 1; and

Parameter XMLSEQUENCE = 0;

but does not seem to work. 

 

Class MC.ACO.Message.AcoPatientSearchRequest Extends HS.Message.PatientSearchRequest [ ClassType = persistent, Inheritance = right, ProcedureBlock ]
{

Parameter XMLIGNOREINVALIDTAG = 1;


Property RosterEffDate As %String;

Property RosterTermDate As %String; Storage Default
{
<Data name="AcoPatientSearchRequestDefaultData">
<Subscript>"AcoPatientSearchRequest"</Subscript>
<Value name="1">
<Value>RosterEffDate</Value>
</Value>
<Value name="2">
<Value>RosterTermDate</Value>
</Value>
</Data>
<DefaultData>AcoPatientSearchRequestDefaultData</DefaultData>
<Type>%Library.CacheStorage</Type>
} }
 

Any advice would be appreciated. 

Thanks!

Warren

Product version: HealthShare 2019.1
$ZV: Cache for Windows (x86-64) 2018.1.2 (Build 309_5_19491U) Tue Dec 10 2019 17:30:27 EST
00
2 0 8 189
Log in or sign up to continue

Hi Warren,

Extending HealthShare classes can be tricky. Can you describe a bit more at what processing step your error occurs? Is it when you try to send a message in an Ensemble workflow? Any info would be helpful.

Hi Vataly, just to give a quick overview of the workflow. we receive a patient roster file in a pipe delimited text format. The file is consumed by an inbound file service, put into dedicated folder, read file using a dedicated custom record map designed base on the roster's file layout then parses the file. Once the input file is parsed it is then transformed into a standard HS Patient Search Request message (HS.Message.PatientSearchRequest). 
the standard patient search request is sent to custom HSPI MPI Operations that extends to HS.MPI.AbstractOperations to do the patient search. Depending on the result of patient search a standard (HS.Message.Patient SearchResponse)
will be sent back.

The standard HS.Message.PatientSearchRequest class is where i extended the custom class to add the Roster Effective and Term Date. The error is happening when patient search request message
is submitted to the custom HSPI MPI Operations for patient matching.

Hi Warren,

I looked at the class that you extended. I happen to think that the issue is not with the Request message but with the Business Operation that you are using.

All Ensemble Business Operations rely on Web Service calls. Under the hood, they all instantiate a WebClient object that is calling one of the exposed methods on a Web Service (which typically sits on another machine). In this case, your Business Operation is calling a PatientSearch method on HSPI.Server.APIWebService.

The issue seems to be this: InterSystems relies on SOAP almost exclusively for its internal Web Service calls. There is a lot of stuff that needs to be set correctly for a SOAP Web call to complete successfully. ISC uses Adapters for all kinds of message protocols; and in this case, you need either HS.Util.SOAPClient.OutboundAdapter or its parent, EnsLib.SOAP.OutboundAdapter (likely, you need the child here). 

The good news is, ISC had already extended HS.MPI.AbstractOperations with HS.MPI.HSPI.Operations and implemented PatientSearch in this class. HS.MPI.HSPI.Operations already has an ADAPTER set. I would advise you to extend HS.MPI.HSPI.Operations and override the PatientSearch method in your descendand class. 

Given that the ADAPTER sets 90% of needed Parameters and Properties, you might be OK. The HSPI.Server.APIWebService class has XMLIGNOREINVALIDTAG set to 1 so it should already be taking care of invalid tags.

Please write back if these changes do not help

Hi Vitaly, 

If I'm understanding your suggestion correctly. All i need to do is to extend my custom HSPI.MPI.Operation to HS.MPI.HSPI.Operations. 

Class MC.ACO.HSPI.Operation Extends (HS.MPI.HSPI.Operations, HS.Util.Trace.Helper)

I did tested this, unfortunately i got the same error 

 

ERROR #6248: SOAP response is a SOAP fault: faultcode=Client
faultstring=Badly formed SOAP Message
faultactor=
detail=
<error xmlns="http://www.intersystems.com/HSPI">
<text>ERROR #6277: Type attribute, s01:AcoPatientSearchRequest, does not specify valid type for XML input tag: pRequest (ending at line 5 character 171).</text>
</error>

OK, try to put the following in your custom Business Operation:

Parameter OUTPUTTYPEATTRIBUTE = 0;

Your parent business operation is using a WebClient "HS.MPI.HSPI.APIWebServicesClient" (line 56); and that class has this parameter set to 1. Since your error is about Type Attribute, this might help.

Also, to troubleshoot this, login to your HSPI Server from command line, go to Cache prompt and activate SOAP logging:

NAMESPACE>Set ^ISCSOAP("LogFile")="/tmp/SOAP.log" (or ="C:\tmp\SOAP.log" if Windows)

NAMESPACE>Set ^ISCSOAP("Log") = "ios"

The 2nd line activates the logging. Then run your test you you can examine the contents of your log file. 

To turn off SOAP log, type:

NAMESPACE>Set ^ISCSOAP("Log") = ""

You can email me the SOAP Log or attach it here...

Sorry I am not able to follow that link...if you cannot attach files to this site please email me to vfurman@j2interactive.com. Please zip it so that the mail server does not complain...

I may need more time to figure out the exact issue but I am now convinced it is a Web Service connectivity problem.

Hi Warren,

We would need to see your XML to help.