I am finding that when I compile class files that Extends Common.JDBC.MakeRequestClass at least in 2025.1 it is not generating the necessary Message Class correctly. Have you experienced that?
- Log in to post comments
I am finding that when I compile class files that Extends Common.JDBC.MakeRequestClass at least in 2025.1 it is not generating the necessary Message Class correctly. Have you experienced that?
And I had thought I had set a record with the number of lines I had in a process....
Updated all the Child Data Structures to be %SerialObjects instead of %RegisteredObjects, but that did not make a difference. I am still not seeing anything within the Trace Viewer when the Response is sent back to the Process.
Does this only pertain to those that use IRIS as a FHIR Repository?
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 = $$$OKset%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%Integerset%response.ContentType = ..#CONTENTTYPEJSON
&sql(SELECT ID1 INTO :idFROM osuwmc_Epic_Clarity.DepartmentMaster WHEREID = :departmentID)
IF SQLCODE<0 {WRITE"SQLCODE error ",SQLCODE," ",%msgQUIT}
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)
}
}
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 --><RouteUrl="/"Method="GET"Call="GetInfo" /><RouteUrl="/GetAllEpicDepartments"Method="GET"Call="GetAllEpicDepartments" /><RouteUrl="/GetEpicDepartment"Method="GET"Call="GetEpicDepartment" /></Routes>ClassMethod GetEpicDepartment(ID As%String) As%Status
{
SET tSC = $$$OKset 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"
}Creating a REST Service within InterSystems is rather a new concept for me since I am used to the Interoperability (HL7, JDBC, etc..) world. I found some examples out on Open Exchange and other posts that I am trying to figure out how I can mold it into something appropriate for this Use Case.
The Enterprise Application Developers (Web Team) that develop our External Patient facing Applications are not used to trying to connect to something other than Microsoft SQL from .Net. So, trying to find a way to expose this via a REST application would be helpful and less time consuming then trying to figure out the InterSystems Drivers to connect via ODBC/JDBC from .Net.
That is why this was concerning; I didn't want to grant %Development to this new user I was going to create for this purpose. Any suggestions on what else I could do?
I ended up taking the QuickStream response, and creating a dynamic object from the JSON in the quick stream to parse it apart.
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.
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.,
Worked with WRC and Product on how we could capture this and send the Data Mapping issues within Provider Directory to a Worklist Task.
I worked with WRC and found out how to create a Template for the ncessary fields.
Yeah, I see your point. Thanks for your input.
I have updated the structures so both Request and Response have different %Persistent classes, but I am still running into the same issue.
"
|
|
Warning on Message body 18@osuwmc.Epic.FHIR.DataStructures.PatientSearch.Request' |
Great tip, for connections that go through our Firewall to outside of our network using a VPN we typically use a setting of 3600 to ensure we are getting a fresh connection after a period of inactivity. I have found especially with some of our applications that use AWS, that they are not respecting the Disconnect, so we have to ensure our settings match theirs.
May everyone have a safe and wonderful holiday season.
When you say pNewTarget, does that mean the Object that the message should be sent to?
Congrats to all of DC, it has been an honor not only contribute but to learn from everyone as well.
Thanks everyone for contributing so much to make this Developer Community so successful.
@Timothy Leavitt, I had to create a custom business process to ingest the data from JSON into a Record Map I built for the request to FHIR. The JSON FHIR structures don't really work within the Data Transformation tool.
Our use case is the following: An EMS squad brings in a Trauma Case into our Emergency Room. The Trauma Case is Registered within Epic as Trauma. Until registration or Medical Records updates the Patient record within our EMR, the name will remain Trauma.
However, the EMS folks send a Result for the Medical Record which is Trauma... in our EMR, but they might send an updated name and demographics. Which causes the Result to fail based on Patient Validation errors in the EMR.
So, the design I came up, was to send a Patient Search FHIR query to the EMR to get the demographics that are currently assigned to that Medical Record, use that information to update the Result from the EMS vendor, and send the Result to the EMR to have it post in a timelier manner instead of waiting for a user in the EMR to work the error to post the result to the Patient's Chart.
We have not fully tested the workflow as of yet, but just getting the Request to be sent via FHIR to the EMR, and interpreting the result was the difficult part.
I updated the Record Map to the following...
.png)
Now that I included PATTERN and got it to compile how do I get the BS FTP Record Map Object enforce the Patterns. For example, this morning the system still sent blank First Name, and Last Name after I made them required and added the Pattern.
Since the first line contains the column headers, I am using that to key off of.
Epic is moving to using JKU and not individual JWT, has there been any discussion about how to incorporate a JKU (JSON Web Key URL) within Intersystems IRIS?
@John Murray
When will it be available to 64 bit VS Code? I am getting the following warning...
The 'gj :: configExplorer' extension is not available in Visual Studio Code for the Windows 64 bit.
I have selected the results in the past and pasted them into Excel but then you have to update the formatting.
Might want to look at https://openexchange.intersystems.com/package/IRIS-WHIZ---HL7v2-Browser-Extension-1
it allows to download the Search Results into a CSV. I have been using this to provide information to applications that have had me search for messages.
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
<ItemName="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=""><SettingTarget="Adapter"Name="Credentials"></Setting><SettingTarget="Adapter"Name="DSN">MS-PatientBilling</Setting><SettingTarget="Adapter"Name="JGService">PatientBilling.JavaGateway</Setting><SettingTarget="Host"Name="FailureTimeout">20</Setting><SettingTarget="Host"Name="ReplyCodeActions">E=R</Setting><SettingTarget="Host"Name="AlertOnError">0</Setting><SettingTarget="Adapter"Name="StayConnected">60</Setting><SettingTarget="Adapter"Name="ConnectionAttributes">"queryTimeout = 30";"socketTimeout = 60";"cancelQueryTimeout = 45";"connectRetryCount = 100";"connectRetryInterval = 5"</Setting><SettingTarget="Host"Name="ArchiveIO">1</Setting></Item>Java Gateway Settings
<ItemName="PatientBilling.JavaGateway"Category="PROD"ClassName="EnsLib.JavaGateway.Service"PoolSize="1"Enabled="true"Foreground="false"Comment=""LogTraceEvents="true"Schedule=""><SettingTarget="Host"Name="Port">55558</Setting><SettingTarget="Host"Name="JavaHome">/usr</Setting><SettingTarget="Host"Name="Logfile"></Setting><SettingTarget="Host"Name="ClassPath">/nfs/data/drivers/java/*</Setting><SettingTarget="Host"Name="JVMArgs">-d64 -Xss512k -Xmx1024m -XX:+DisableExplicitGC -XX:+AggressiveOpts -XX:+ExplicitGCInvokesConcurrent -XX:+UseStringDeduplication -XX:MaxHeapFreeRatio=10 -XX:MinHeapFreeRatio=5</Setting></Item>Yes it was.