go to post Scott Roth · Jan 5 I was able to figure it out, and get it to work.. Class osuwmc.DataLookup.REST.TableLookup Extends osuwmc.DataLookup.REST.Base { Parameter Version = "1.0.0"; Parameter HandleCorsRequests = 0; XData UrlMap [ XMLNamespace = "http://www.intersystems.com/urlmap" ] { <Routes> <!-- Server Info --> <Route Url="/" Method="GET" Call="GetInfo" /> <Route Url="/EpicDepartment" Method="GET" Call="GetAllEpicDepartments" /> <Route Url="/EpicDepartment/:departmentID" Method="GET" Call="GetEpicDepartment"/> </Routes> } ClassMethod GetInfo() As %Status { SET version = ..#Version SET info = { "version": (version) } RETURN ..%ProcessResult($$$OK, info) } ClassMethod GetAllEpicDepartments() As %Status { SET tSC = $$$OK set %response.ContentType = ..#CONTENTTYPEJSON set rset = ##class(osuwmc.Epic.Clarity.DepartmentMaster).ExtentFunc() write "[" if rset.%Next(){ set department = ##class(osuwmc.Epic.Clarity.DepartmentMaster).%OpenId(rset.ID1) do department.%JSONExport() } while rset.%Next(){ write "," set department = ##class(osuwmc.Epic.Clarity.DepartmentMaster).%OpenId(rset.ID1) do department.%JSONExport() } write "]" quit tSC } ClassMethod GetEpicDepartment(departmentID As %String) As %Status { #dim tSC as %Status = $$$OK #dim e As %Exception.AbstractException #dim id as %Integer set %response.ContentType = ..#CONTENTTYPEJSON &sql(SELECT ID1 INTO :id FROM osuwmc_Epic_Clarity.DepartmentMaster WHERE ID = :departmentID) IF SQLCODE<0 {WRITE "SQLCODE error ",SQLCODE," ",%msg QUIT} ELSEIF SQLCODE=100 {WRITE "Query returns no results" QUIT} set department = ##class(osuwmc.Epic.Clarity.DepartmentMaster).%OpenId(id) Do department.%JSONExport() QUIT tSC } ClassMethod SwaggerSpec() As %Status { Set tSC = ##class(%REST.API).GetWebRESTApplication($NAMESPACE, %request.Application, .swagger) Do swagger.info.%Remove("x-ISC_Namespace") Set swagger.basePath = "/api/mgmnt/v1/TESTCLIN/spec/TableLookup" Set swagger.info.title = "REST API to Access and Query OSUWMC Cache Tables" Set swagger.info.version = "0.1" Set swagger.host = "intengtest" Return ..%ProcessResult($$$OK, swagger) } }
go to post Scott Roth · Jan 5 That helped. I was able to get my first two Method's called; however, I am struggling now with passing a value into the message. <Routes> <!-- Server Info --> <Route Url="/" Method="GET" Call="GetInfo" /> <Route Url="/GetAllEpicDepartments" Method="GET" Call="GetAllEpicDepartments" /> <Route Url="/GetEpicDepartment" Method="GET" Call="GetEpicDepartment" /> </Routes> ClassMethod GetEpicDepartment(ID As %String) As %Status { SET tSC = $$$OK set sql = "SELECT ID as DepartmentID, Abbr, Name, ExternalName, PhoneNumber, ApptPhone, FaxNumber, Address1, Address2, City, Zip, Specialty, RevLocID, RevLocName, BuildingCategoryID, BuildingName, DepCategoryTypeID, DepType, Center, EAFParent, CostCenter FROM osuwmc_Epic_Clarity.DepartmentMaster WHERE ID = ?" do ##class(%ZEN.Auxiliary.jsonSQLProvider).%WriteJSONFromSQL(,,sql,ID) return tSC } When I try to pass... https://intengtest/api/mgmnt/v1/TESTCLIN/spec/TableLookup/GetEpicDepartment/{ID} into postman I get the following... { "errors": [ { "code": 5002, "domain": "%ObjectErrors", "error": "ERROR #5002: ObjectScript error: <REGULAR EXPRESSION>PatternSet+4^%Regex.Matcher.1", "id": "ObjectScriptError", "params": [ "<REGULAR EXPRESSION>PatternSet+4^%Regex.Matcher.1" ] } ], "summary": "ERROR #5002: ObjectScript error: <REGULAR EXPRESSION>PatternSet+4^%Regex.Matcher.1" }
go to post Scott Roth · Dec 30, 2025 I ended up taking the QuickStream response, and creating a dynamic object from the JSON in the quick stream to parse it apart.
go to post Scott Roth · Dec 30, 2025 Using a variable, I created a bunch of IF Statements to either append to the end of the variable or add value to the variable. Once I went through all the necessary fields, I set target.Request.QueryString = the variable.
go to post Scott Roth · Dec 30, 2025 This has been resolved. Working with another Hospital System we combined our efforts and came up with Code to take the Encoded HL7 Response, decode, and parse it apart to handle the ACK/NCK.,
go to post Scott Roth · Dec 30, 2025 Worked with WRC and Product on how we could capture this and send the Data Mapping issues within Provider Directory to a Worklist Task.
go to post Scott Roth · Dec 30, 2025 I worked with WRC and found out how to create a Template for the ncessary fields.
go to post Scott Roth · Sep 9, 2025 Stay Connected is set at 60, messages are sent to the BO in batches depending on when we receive the HL7 message that it requires a lookup. Because this is going through a Java Gateway Business Service it seems like there is a disconnect on when the BO loses connection and pipe that it uses through the Java Gateway Business Service. The BO loses the connection, but the Java Gateway Business Service still thinks it is connected to the Database. I have tried adding Connection Attributes to the BO, but it has not help. Business Operation Settings <Item Name="PatientBillingDBPoll" Category="PatientBilling,SQL,PROD,CC,VANW,PatFeeder" ClassName="osuwmc.PatientBilling.PatientBillingDBPollOperation" PoolSize="1" Enabled="true" Foreground="false" Comment="Is used to lookup items against clarity tables" LogTraceEvents="true" Schedule=""> <Setting Target="Adapter" Name="Credentials"></Setting> <Setting Target="Adapter" Name="DSN">MS-PatientBilling</Setting> <Setting Target="Adapter" Name="JGService">PatientBilling.JavaGateway</Setting> <Setting Target="Host" Name="FailureTimeout">20</Setting> <Setting Target="Host" Name="ReplyCodeActions">E=R</Setting> <Setting Target="Host" Name="AlertOnError">0</Setting> <Setting Target="Adapter" Name="StayConnected">60</Setting> <Setting Target="Adapter" Name="ConnectionAttributes">"queryTimeout = 30";"socketTimeout = 60";"cancelQueryTimeout = 45";"connectRetryCount = 100";"connectRetryInterval = 5"</Setting> <Setting Target="Host" Name="ArchiveIO">1</Setting> </Item> Java Gateway Settings <Item Name="PatientBilling.JavaGateway" Category="PROD" ClassName="EnsLib.JavaGateway.Service" PoolSize="1" Enabled="true" Foreground="false" Comment="" LogTraceEvents="true" Schedule=""> <Setting Target="Host" Name="Port">55558</Setting> <Setting Target="Host" Name="JavaHome">/usr</Setting> <Setting Target="Host" Name="Logfile"></Setting> <Setting Target="Host" Name="ClassPath">/nfs/data/drivers/java/*</Setting> <Setting Target="Host" Name="JVMArgs">-d64 -Xss512k -Xmx1024m -XX:+DisableExplicitGC -XX:+AggressiveOpts -XX:+ExplicitGCInvokesConcurrent -XX:+UseStringDeduplication -XX:MaxHeapFreeRatio=10 -XX:MinHeapFreeRatio=5</Setting> </Item>
go to post Scott Roth · Jun 18, 2025 This is how i solved the issue Set tSC = pRequest.NewResponse(.tResponse) Quit:$$$ISERR(tSC) tSC Set tResponse.encodedMessage = $get(encodedMessage) set dMsg = $SYSTEM.Encryption.Base64Decode(tResponse.encodedMessage) set pResponse = ##class(EnsLib.HL7.Message).%New() set pResponse = ##class(EnsLib.HL7.Message).ImportFromString($Get(dMsg)) set pResponse.DocType = ##class(EnsLib.HL7.Schema).ResolveSchemaTypeToDocType(pResponse.TypeVersion,pResponse.Name)
go to post Scott Roth · Jun 18, 2025 This is how I solved the issue... Set tSC = pRequest.NewResponse(.tResponse) Quit:$$$ISERR(tSC) tSC Set tResponse.encodedMessage = $get(encodedMessage) set dMsg = $SYSTEM.Encryption.Base64Decode(tResponse.encodedMessage) set pResponse = ##class(EnsLib.HL7.Message).%New() set pResponse = ##class(EnsLib.HL7.Message).ImportFromString($Get(dMsg)) set pResponse.DocType = ##class(EnsLib.HL7.Schema).ResolveSchemaTypeToDocType(pResponse.TypeVersion,pResponse.Name)
go to post Scott Roth · Jun 11, 2025 [HealthConnect:3.5.0-1.m1] it was a group permission issue with the directory. However, once I created the DB, added it to the mirror on the Primary, I cannot get it to Sync with the others in the mirror. I removed it from the mirror for now till I have time to look at it again.
go to post Scott Roth · Apr 22, 2025 I was able to get it to work. I found that in Cache I need to call %Get("<column>") name vs what I am doing in a BPL. s Loc = "" s tStatement = ##class(%SQL.Statement).%New() s execall= "CALL osuwmc_Utils_EnterpriseDirDb.InterfaceCheckConnectMedCtrID(?)" s qStatus = tStatement.%Prepare(execall) if $$$ISERR(qStatus) {write "%Prepare failed:" do $SYSTEM.Status.DisplayError(qStatus) quit} set rset = tStatement.%Execute(pInput) while rset.%Next() { set Loc = rset.%Get("OSUguestRoleDTL") } if $Length(Loc) = 0 { set Loc = "OSUWMC" }
go to post Scott Roth · Apr 3, 2025 The rule was just routing the message through a DTL and sending it to two places in the same line. The message size was 12661. My team member just ended up splitting up the send line into multiple send lines instead of a single send line with two destinations.
go to post Scott Roth · Mar 13, 2025 The issue was with the query I was using. Those that wrote the query were renaming columns with ' ' but putting spaces in the new names. SELECT A AS 'ABC CDE' FROM TableName I think there was the Typo in my service code, because I never use spaces and assumed that the column names did not have spaces.
go to post Scott Roth · Feb 4, 2025 Within our DTC... <assign value='source.GetFieldStreamRaw(.tStream,"ORCgrp(1).OBRgrp(1).OBXgrp(1).OBX:ObservationValue(1).AlternateText",.tRemainder)' property='tSC' action='set' /> <assign value='##class(osuwmc.Utils.Functions).DecodeBase64HL7ToFileFaxing(tStream,source.{MSH:SendingApplication.NamespaceID},source.{PID:PatientIdentifierList(1).IDNumber}_context.TextIDTemp_".PDF")' property='a' action='set' />
go to post Scott Roth · Feb 3, 2025 With some help from the Developer community, below is a Function I wrote for our needs to take a Base64 and write it out to a PDF. ClassMethod DecodeBase64HL7ToFileFaxing(base64 As %Stream.GlobalBinary, Ancillary As %String, FileName As %String) As %String { set ArchDir = <directory> set ArchAncDir = ArchDir_Ancillary_"/" set FaxDateDir = ArchAncDir_$PIECE($ZDATE($HOROLOG,7)," ",1)_"-"_$PIECE($ZDATE($HOROLOG,7)," ",2)_"-1/" if '##class(%Library.File).DirectoryExists(ArchDir) { do ##class(%Library.File).CreateDirectory(ArchDir) } if '##class(%Library.File).DirectoryExists(ArchAncDir) { do ##class(%Library.File).CreateDirectory(ArchAncDir) } if '##class(%Library.File).DirectoryExists(FaxDateDir) { do ##class(%Library.File).CreateDirectory(FaxDateDir) } set Oref = ##class(%Stream.FileBinary).%New() $$$LOGINFO(FaxDateDir_FileName) set Oref.Filename = FaxDateDir_FileName Do base64.Rewind() While 'base64.AtEnd { set ln = base64.ReadLine() set lnDecoded = $system.Encryption.Base64Decode(ln) do Oref.Write(lnDecoded) } Do Oref.%Save() do ##class(%File).SetAttributes(Oref,33261,.return) set Oref = "" // Close file set PDFFilePath = "/Fax/PDFFiles/"_Ancillary_"/"_$PIECE($ZDATE($HOROLOG,7)," ",1)_"-"_$PIECE($ZDATE($HOROLOG,7)," ",2)_"-1/"_FileName return PDFFilePath }
go to post Scott Roth · Jan 14, 2025 I am still working with WRC and Microsoft to determine where the issue is.
go to post Scott Roth · Dec 27, 2024 I ended up writing a function with some help from the Developer community to do this. The function basically iterates through the the HL7 message and check it against a Data Lookup Table. I am in the office in two week and will share it once I am back in the office.
go to post Scott Roth · Dec 18, 2024 I have seen this before on SQL Outbound Operations when we have had to force stop the BO when it was trying to call/execute a Stored Procedure. The only way we have seen to get rid of the empty PIDs is to stop/start the namespace.
go to post Scott Roth · Jul 16, 2024 In this post https://community.intersystems.com/node/539431 from Apr 6, 2023, @Mark O'Reilly mentions building a custom function to Purge Custom Messages using a Data Lookup table. However, it does delete by message count and not by days, which is something I am not fond of, and I haven't been able to get it to work for our needs either.