You can't work directly in HSLIB, you have to create your own namespace to work with.
In a terminal :
If you are not familiar with Namespace, HSLIB, Ensemble first check for training here :
- Log in to post comments
You can't work directly in HSLIB, you have to create your own namespace to work with.
In a terminal :
If you are not familiar with Namespace, HSLIB, Ensemble first check for training here :
Hi Xiong,
To convert FHIR R4 to SDA you have to use this helper class :
HS.FHIR.DTL.Util.HC.FHIR.SDA3.Process
This class take in input a message of this kind : HS.FHIRServer.Interop.Request or HS.Message.FHIR.Request.So if you want to convert an json FHIR file to SDA, you have to read the file from a business service cast you file to one of this message and send it to the helper class.
Here is and Business service example of reading fhir json files :
Class BS.FHIRFileService Extends Ens.BusinessService
{
Parameter ADAPTER = "EnsLib.File.InboundAdapter";
Property TargetConfigNames As %String(MAXLEN = 1000) [ InitialExpression = "BusinessProcess" ];
Parameter SETTINGS = "TargetConfigNames:Basic:selector?multiSelect=1&context={Ens.ContextSearch/ProductionItems?targets=1&productionName=@productionId}";
Method OnProcessInput(pDocIn As %RegisteredObject, Output pDocOut As %RegisteredObject) As %Status
{
set status = $$$OK
try {
set pInput = ##class(HS.FHIRServer.Interop.Request).%New()
set tQuickStream = ##class(HS.SDA3.QuickStream).%New()
do tQuickStream.CopyFrom(pDocIn)
set pInput.QuickStreamId= tQuickStream.Id
for iTarget=1:1:$L(..TargetConfigNames, ",") {
set tOneTarget=$ZStrip($P(..TargetConfigNames,",",iTarget),"<>W") Continue:""=tOneTarget
$$$ThrowOnError(..SendRequestSync(tOneTarget,pInput,.pDocOut))
}
} catch ex {
set status = ex.AsStatus()
}
Quit status
}
}
You can find more information from this documentation :
https://docs.intersystems.com/irisforhealthlatest/csp/docbook/Doc.View.cls?KEY=HXFHIR_transforms#HXFHIR_transforms_bp_fhirsda
Hi Lucas,
A simple solution to you question can be this :
Property numDossiersMER As list Of %Integer(SQLPROJECTION = "table/column", STORAGEDEFAULT = "array");
Index numDossiersMERIdx On numDossiersMER(ELEMENTS);
With those parameters you can achieve :
select numDossierMER, numDossiersMER from User_TestList_Data.Titre
where
for some %element(numDossiersMER) (%Value in (345))
Thanks you all !
I am glad to see that this little module is used and useful :)
Hi Cindy,
To deploy your services, routes and plugins to another environment you can use CI/CD with postman (newman)
Some examples here :
Another possibility is to use deck (decK helps manage Kong’s configuration in a declarative fashion) from kong
I haven't tried this one, I can't give you feedback on it.
Nice, the support of ZPM in the json config file is a major improvement.
Now we can use this module as a total replacement of the manifest installer !
Great work !
I tried your module as a replacement for the Manifest installer, see this example:
https://github.com/grongierisc/intersystems-iris-dev-template
However, I'm stuck for the part with ZPM.
The problem is, with your module, I can create a database, its rights, etc., but how to tell ZPM to load the classes in the freshly installed NameSpace?
What are the possible solutions?
We have today many options to load configuration IRIS, are they in competition?
How to federate these modules who are all complementary?
What a nice feature.
If I understand correctly, this module can be considered as a replacement for the Manifest installer?
If so, then this module has the benefit of exposing the configuration as JSON and API rather than a compiled class.
If I understand correctly, you want to replace an HTTP Header basic auth with a bearer token. If the bearer token is static, you can implement a solution like this:
If it is dynamic, I think you will have to develop your own plug-in:
A good base to start working on could be this plugin:
Super benchmark, it's very interesting.
Personally, I prefer the squash method because it is easy to implement (no change in the dockefile).
Yes your code is correct.
Id1 still exist and it's sync with id.
When you index a new primary key, id will have that value. In your case Id1 is call as is because you name a column Id.
I think, you can't get rid off ID (Id1 in your case). Should ask an expert on that.
Hi Michael,
No plan for that yet, but the solution is quiet similar, fetch the internal data of step count, transform it to FHIR, send them to the registry.
But, as soon as I change my iPhone to an Android, I will reconsider to do it for Android ;)
Hi Yeung,
First how-to auto increment an integer, you can use this property :
Then, why you have ID1 in your table, because by default any persistent class have an column called ID who is an auto increment and indexed as a primary key.
You can overload this primary key by your own with this index :
Hi,
What you can do is a snapshot of this ResultSet.
Then use the global of this snapshot for another Operation :
Get snapshot global :
Method OnGetSnapshot(pRequest As Ens.Request, Output pResponse As Ens.StringResponse) As %Status
{
set tStatus = $$$OK
try{
set pResponse = ##class(Ens.StringResponse).%New()
set tQuery = "SELECT * FROM [sqlserver].[dbo].[whatever] "
//$$$TRACE(tQuery)
Set pSnap = ##class(EnsLib.SQL.Snapshot).%New()
//size of snapshot
// -1 = Max
set pSnap.MaxRowsToGet = -1
$$$ThrowOnError(..Adapter.ExecuteQueryBatch(pSnap,tQuery,1000))
$$$ThrowOnError(pSnap.%Save())
set pResponse.StringValue = pSnap.%GblRef
}
catch exp
{
Set tStatus = exp.AsStatus()
}
Quit tStatus
}
Use snapshot global :
Method UseSnapshot(pRequest As Ens.StringRequest, Output pResponse As Ens.Response) As %Status
{
set status = $$$OK
try {
set pResponse = ##class(Ens.Response).%New()
set nRow = 0
set tSequence = 0
//Get SnapShot
Set tSnap = ##class(EnsLib.SQL.Snapshot).%New()
set tSnap.%GblRef = pRequest.StringValue // use of global SnapShot
set tSnap.%CurrentRow = 0
set tSnap.FirstRow = 1
set tSnap.MaxRowsToGet = -1
$$$TRACE("MaxRowsToGet : "_tSnap.RowCountGet())
while tSnap.Next() {
try {
set nRow = nRow + 1
set tSequence = tSequence + 1
set i = 0
set i = i + 1
set tParam(i) = tSnap.Get("Col1")
set i = i + 1
set tParam(i) = tSnap.Get("Col2")
set i = i + 1
set tParam(i) = tSnap.Get("Col3")
set i = i + 1
set tParam(i) = tSnap.Get("ColX")
set tParam = i
set tQuery = "UPDATE Whatever "_
"SET "_
"Col1 = ? "_
",Col2 = ? "_
",Col3 = ? "_
" WHERE ColX = ? "
$$$ThrowOnError(..Adapter.ExecuteUpdateParmArray(.tResult,tQuery,.tParam))
} catch exSnap {
// Update exeption
}
}
} catch ex {
set status = ex.AsStatus()
}
return status
}
Furthermore, If you have big table to query/insert in JDBC consider this ZPM module : https://github.com/grongierisc/BatchSqlOutboundAdapter
Hi Alexender, I'll send you the WSDL in PM.
But I guess I found a workaround :
I created a new method that parse the XML with %XML.Reader and correlate the payload with my destination class :
set reader = ##class(%XML.Reader).%New()
// pRequest.GetPatientsByClinicResult.any.GetAt(1) <-- Header
// pRequest.GetPatientsByClinicResult.any.GetAt(2) <-- Payload
do reader.OpenString(pRequest.GetPatientsByClinicResult.any.GetAt(2))
do reader.Correlate("Patients","FME.Object.Patient")
while reader.Next(.object,.status) {
do pResponse.Patients.Insert(object)
}
Where FME.Object.Patient is :
Class FME.Object.Patient Extends (%SerialObject, %XML.Adaptor)
{
Property LastName As %String;
Property FirstName As %String;
Property Datex0020ofx0020Birth As %String(XMLNAME = "Date_x0020_of_x0020_Birth");
Property Gender As %String;
Property Code As %String;
Property Insurance As %String;
Property GUID As %String;
Property CLINICGUID As %String;
}
Hi Yuri,
Not now but it's plan to be in the future, may be next year.
If you have license key for heathshare (no community version of healthshare is available), the installers and familiar with docker, check this git :
https://github.com/grongierisc/healthshare-docker
It's an unofficial version of HealthShare on docker, very useful to do test and build edge on the fly.
If you need an how-to de develop an interoperability production check this git.
https://github.com/grongierisc/formation-template
It's in french but you will have a lot of gif to get throw the tuto and build a CSV parser and drop the file in the database with transformations.
Great app, I'll will definitely take a look, this can be very useful.
Thanks, and good luck for the contest.
Hi Mike, To retrive multi-part from %resquest you have do to this in the %CSP.REST class :
// Get properties
set body = %request.Get("body")
if '$d(body) {
$$$ThrowOnError($$$ERROR(9200,"no parameters"))
}
set dynaBody = {}.%FromJSON(body)
// Get stream
set stream = %request.GetMimeData("file")
if ('$IsObject(stream) {
$$$ThrowOnError($$$ERROR(9200,"no file"))
}
To get property you have to use Get and for stream GetMimeData In my example my body is a json.
Hi Yuri, Have a look at this : https://github.com/grongierisc/iris-csvgen-ui/blob/master/src/CSVGEN/API/Dispatch.cls Here you will find and example of a multi-part upload on a %CSP.REST class.
To get the stream from the multi part you have to do this ligne 39 to 43 :
// Get stream
set stream = %request.GetMimeData("id")
if ('$IsObject(stream) {
$$$ThrowOnError($$$ERROR(9200,"no file"))
}
Where id is the name of you multi-part
To send the stream to a business service :
$$$ThrowOnError(##class(Ens.Director).CreateBusinessService(BsName,.tService))
$$$ThrowOnError(tService.ProcessInput(stream,.output))
Where BsName is the name of your business service in the active production of your namespace. And stream you stream.
Hi Paul,
HS.Hub.Standalone.HL7.DTL.SubTransform.PD1ToSDA3
HS.Hub.Standalone.HL7.DTL.SubTransform.PIDToSDA3
and co ?
And you can have a look at this code to convert any HL7 and all his segment into SDA :
https://github.com/grongierisc/FHIR-HL7v2-SQL-Demo/blob/master/src/FHIR…
What a great idea :)
Here is my contribution :
{
"Request Class": {
"prefix": "ClassRequest",
"body": [
"Class ${0:ClassName} Extends Ens.Request",
"{",
"\t$1",
"}"
],
"description": "Message helper"
},
"Response Class": {
"prefix": "ClassResponse",
"body": [
"Class ${0:ClassName} Extends Ens.Response",
"{",
"\t$1",
"}"
],
"description": "Message helper"
},
"Operation Class": {
"prefix": "ClassOperation",
"body": [
"Class ${0:ClassName} Extends Ens.BusinessOperation",
"{",
"\tParameter ADAPTER = \"${1:Adapter}\";",
"\tProperty Adapter As ${1:Adapter};",
"\tParameter INVOCATION = \"Queue\";",
"\n",
"Method ${2:Methode}(pRequest As ${3:Request}, Output pResponse As ${4:Response}) As %Status",
"{",
"\tset tStatus = $$$$OK",
"\tset pResponse = ##class(${4:Response}).%New()",
"",
"\ttry{",
"\t\t\n",
"\t}",
"\tcatch exp",
"\t{",
"\t\tset tStatus = exp.AsStatus()",
"\t}",
"\tQuit tStatus",
"}",
"XData MessageMap",
"{",
"<MapItems>",
"\t<MapItem MessageType=\"${3:Request}\">",
"\t\t<Method>${2:Methode}</Method>",
"\t</MapItem>",
"</MapItems>",
"}",
"}",
],
"description": "Operation helper"
},
"Service Class": {
"prefix": "ClassService",
"body": [
"Class ${0:ClassName} Extends Ens.BusinessService",
"{",
"Parameter ADAPTER = \"${1:Adapter}\";",
"Property TargetConfigNames As %String(MAXLEN = 1000) [ InitialExpression = \"${2:BusinessProcess}\" ];",
"Parameter SETTINGS = \"TargetConfigNames:Basic:selector?multiSelect=1&context={Ens.ContextSearch/ProductionItems?targets=1&productionName=@productionId}\";",
"Method OnProcessInput(pDocIn As %RegisteredObject, Output pDocOut As %RegisteredObject) As %Status",
"{",
"\tset status = $$$$OK",
"",
"\ttry {",
"",
"\t\tfor iTarget=1:1:$L(..TargetConfigNames, \",\") {",
"\t\t\tset tOneTarget=$ZStrip($P(..TargetConfigNames,\",\",iTarget),\"<>W\") Continue:\"\"=tOneTarget",
"\t\t\t$$$$ThrowOnError(..SendRequestSync(tOneTarget,pDocIn,.pDocOut))",
"\t\t}",
"\t} catch ex {",
"\t\tset status = ex.AsStatus()",
"\t}",
"",
"\tQuit status",
"}",
"",
"}",
],
"description": "Operation helper"
},
}
Are you looking for thoses classes :
HS.Hub.Standalone.HL7.DTL.SubTransform.PD1ToSDA3
HS.Hub.Standalone.HL7.DTL.SubTransform.PIDToSDA3
and co ?
And you can have a look at this code to convert any HL7 and all his segment into SDA :
https://github.com/grongierisc/FHIR-HL7v2-SQL-Demo/blob/master/src/FHIR…
Hi Yakov,
Have you tried to extend you target message by %SerialObject rather than %RegistredObject.
In fact, %RegistredObject are in memory object and can't be transmitted in Messages.
More details in this documentation : https://docs.intersystems.com/irisforhealthlatest/csp/docbook/DocBook.U…
Hi
https://openexchange.intersystems.com/package/FHIR-HL7v2-SQL-Demo
For JSON/XML to FHIR, you can have a look here : https://github.com/grongierisc/HL7ToJson
For HL7 SIU, the same can be achieved with the first link.
For CDA/FHIR you have example here : https://github.com/grongierisc/FHIRaaS/blob/master/src/Interop/BP/CCDAT…
If you need more help, let me know.
I agree with you in most cases.
The most important announcement for me would be Embedded Python.
This will bring to the community the power of python libraries, it's a giant step forward.
Hi, you have to use irisinstall with elevated privileges.
cf: https://docs.intersystems.com/irisforhealthlatest/csp/docbook/Doc.View…
Thanks @Henrique Dias
It is the principle of a community, between helping and sharing.
BTW, I really liked the last video with the other members of the community about your NPM project.
https://community.intersystems.com/post/promo-video-screencast-no-proje…
Hi,
SuperServer port since 2020.3 is 1972 :
docker run --rm --name my-iris -d --publish 9091:1972 --publish 9092:52773 intersystemsdc/iris-community:2020.3.0.221.0-zpm docker run --rm --name my-iris -d --publish 9091:1972 --publish 9092:52773 intersystemsdc/iris-community:2020.4.0.521.0-zpm docker run --rm --name my-iris -d --publish 9091:1972 --publish 9092:52773 intersystemsdc/irishealth-community:2020.3.0.221.0-zpm docker run --rm --name my-iris -d --publish 9091:1972 --publish 9092:52773 intersystemsdc/irishealth-community:2020.4.0.521.0-zpm