Question Rick Prichett · Sep 1, 2021

I am trying to add a custom z-segment to a message.  The Below code does not error out but I also do not get the segment added.  Any assistance would be greatly appreciated.  

Class CDSM.AddFedExID.AddFedExIDProcess Extends Ens.BusinessProcess [ ClassType = persistent, Language = objectscript ]
{

/// Add "Business Process" or "Business Operation" for the target
Property TargetConfigName As %String; Parameter SETTINGS As %String = "TargetConfigName:Additional";

Method OnRequest(pRequest As EnsLib.HL7.Message, Output pResponse As Ens.Response) As %Status
{
#dim newrequest = pRequest.

2
0 357
Question Rick Prichett · Aug 6, 2021

I am trying to delete a field based on a value in one of the subfields.  I would like to remove the below Field with the Field value "Field8". I know how to find the number of fields and iterate.  If I just use "" I still get a tilde at the end.

Ex  .

|Field^Field1^Field3~Field4^Field5^Field6~Field7^Field8^Field8

3
0 385
Question Rick Prichett · May 3, 2021

Needing to know how to define a property that can either be sent in my response as 

"members": null,

or 

"members": [
                {
                    "dob": "1905-05-01",
                    "firstName": "BOB",
                    "middleName": "T",
                    "nameSuffix": "",
                    "genderCode": "M",
                    "lastName": "COLLINS",
                    "memberId": "123421741",
                    "relationship": "Subscriber"
                }
            ],

Not sure if this is possible.  Currently defined as 

Property members As %VarString;

6
0 409
Question Rick Prichett · Apr 14, 2021

Getting the error "ERROR #9406: Unexpected format for value of field, alternateId, using class base mapping" in the trace. I have it defined as:

Class CDSM.MemberAPI.Response2 Extends (%Persistent, %XML.Adaptor, %JSON.Adaptor) [ Language = objectscript ]
{ Property alternateId As %String;

  Property benefitPlanId As %String;

and the reply is sending:

[
    {
        "alternateId": "",
        "benefitPlanId": "FLSN4444",

Is there a way to handle the empty fields in the reply that is sent back?

2
0 430
Question Rick Prichett · Apr 11, 2021

In this case I am trying to just send a simple error to the log in the event the try is not successful.  Have tried a few ideas I have found on the forum but none have worked as of yet.  

 

   try {
          // Write facility Details to cloned message
      set newPV139 = (FacilityNPI1 _"^" _FacilityName _"^" _ServFacility _"^" _FacilityTIN _"^" _FacilityAddressLine1 _"^" _FacilityCity _"^" _FacilityState _"^" _FacilityZip _"^" _CountyName _"^" _FacilityPhone)
      set newPV139insert = newrequest.SetValueAt(newPV139, "PV1:39(1)")
            } 
                 catch exception {

            }

1
0 211
Question Rick Prichett · Feb 10, 2021

Hi everyone, I am trying to return a cloned version of my ADT that I have made changes to in a Business Process.  So far I have the following in my process.  

&sql(Select MemberId INTO :pMemberIDval from CDSM_MemberAPI.MemberInfo where MemDOB = :ptDOB and MemLname = :ptLname and MemFname = :ptFname)

set newrequest = pRequest.%ConstructClone()

set MemberIDPID4 = newrequest.SetValueAt(pMemberIDval, "PID:4.1")

The following does return the value I am populating the clone with to the log

  set newrequestPID4 = newrequest.GetValueAt("PID:4.

3
0 388
Question Rick Prichett · Jan 28, 2021

I have a business process that I call a class that returns a JSON message.  I was hoping to be able to reference the tag or iterate through the response until I find my value.

// Build the request parameter
set tRequest = ##class(CDSM.MemberAPI.Request).%New()
set tRequest.DateOfBirth = ptDOB 
set tRequest.FirstName = ptFname
set tRequest.LastName = ptLname // Business operation needs to be parameterized
set tSC = ..SendRequestSync("boEISLMemberAPI, tRequest")

Just pasting the value I am interested since the response is 300 values long.

<memberId>12345678</memberId>

9
0 842