go to post Marc Mundt · Mar 29, 2022 calling Method from ClassMethod This is the problem. A Method needs to be called in the context of an instantiated object. A ClassMethod by definition isn't associated with an instantiated object. If it's necessary to do it this way, your ClassMethod could use %New() to instantiate an object and then call the Method on that object: set myObj = ##class(My.Object.Class).%New() set tSC=myObj.myMethod() But, it looks like you're working with a Business Service class. For that, it isn't enough to simply use %New(). You need to use Ens.Director::CreateBusinessService to instantiate the object before calling the Method. https://docs.intersystems.com/irisforhealth20212/csp/docbook/DocBook.UI....
go to post Marc Mundt · Mar 14, 2022 How about polling the global looking for updates? It would be lightweight to just check if the value of ^FSLOG has incremented since the last check: set lastFSEntry = ^FSLOG or use $order: set lastFSEntry = $order(^FSLOG(""),-1) As for timestamps, in my test environment all of the ^FSLOG entries seem to end with timestamps already: ^FSLOG(41)="DispatchRequest^HS.FHIRServer.Service^11062|Msg| [1] -> DO 0|03/14/2022 01:57:19.398158PM"
go to post Marc Mundt · Feb 11, 2022 One more way: s myObj = ##class(%Persistent).%Open($lb(id,className))
go to post Marc Mundt · Jan 11, 2022 Request.AdditionalInfo is defined as an array of AdditionalInfoItem, so the methods for working with that array are documented under ArrayOfObjects. For an array, GetAt expects a key rather than a numeric index. For example GetAt("ClientAddr") should work.
go to post Marc Mundt · Nov 16, 2021 If you already have a Zen report, you can change it to output as an Excel spreadsheet. This will work if the report is called from a web browser just as it does for PDFs. If you don't have an existing Zen report, then I don't recommend creating a new Zen report. Use one of the approaches others are suggesting.
go to post Marc Mundt · Oct 27, 2021 Vivek, The method for transforming HL7 to SDA can be found here. Note that this doc covers transforming HL7>SDA>C-CDA, so you'll only be interested in the first half of that:https://docs.intersystems.com/irisforhealth20191/csp/docbook/DocBook.UI.... And the methods for transforming SDA to FHIR can be found here:https://docs.intersystems.com/irisforhealth20191/csp/docbook/DocBook.UI.... -Marc
go to post Marc Mundt · Oct 21, 2021 Yes, all lookup table entries are stored in Ens_Util.LookupTable.
go to post Marc Mundt · Oct 12, 2021 You can log %msg to get more information about the error: set ^ztest($now(),"%msg") = $G(%msg)
go to post Marc Mundt · Oct 12, 2021 I created a simple inbound adapter and a simple business service that uses it, and the &sql() call succeeds for me. It would be good to check the event log and see if any additional error information got logged. Class Example.InboundAdapter Extends Ens.InboundAdapter [ ProcedureBlock ] { Method OnTask() As %Status { set suspendedCount=-1 &sql(SELECT count(ID) into :suspendedCount FROM Ens.MessageHeader where TargetQueueName not like '_S%' and TargetQueueName not like 'ENS%' and Status='5') // log what we got back set ^ztest($now(),"SQLCODE") = SQLCODE set ^ztest($now(),"suspendedCount") = suspendedCount quit 1 } } Class Example.Service Extends Ens.BusinessService { /// The type of adapter used to communicate with external systems Parameter ADAPTER = "Example.InboundAdapter"; }
go to post Marc Mundt · Oct 8, 2021 It's a bit clunky, but you could use %SYSTEM.OBJ::ExportToStream in the source namespace followed by %SYSTEM.OBJ::LoadStream in the target namespace.
go to post Marc Mundt · Oct 1, 2021 If this code is being run in FileXmlTransLaboIn, you can get the name of the config item from %Ensemble("ConfigName") and then query based on that. set configName=%Ensemble("ConfigName") &sql(SELECT Category INTO :itemCat FROM Ens_Config.Item WHERE Name=:configName)
go to post Marc Mundt · Sep 30, 2021 Your code looks good and works for me. Are you having troubles with it or what are you looking to add next?
go to post Marc Mundt · Sep 29, 2021 Yep, RawContent is potentially truncated and isn't meant for accessing the full message. You can use the OutputTo* methods to get the whole message. OutputToLibraryStream is going to be the best option because a stream object can be of unlimited size. OutputToString will work, but only for messages that are smaller than the maximum string size (around 3 megabytes, assuming you have long strings enabled in the Caché config. If not, then 32k).
go to post Marc Mundt · Sep 23, 2021 This query will list changes to layouts: SELECT UserDR->SSUSR_Initials,AuditDate, AuditTime, ReferencedClass FROM websys.log WHERE sourcetype='LAYOUT' AND type='Update' This works in HealthShare 2021.1 -- it may also work in older versions but I haven't tested.
go to post Marc Mundt · Aug 31, 2021 You can view the source for %syPidtab.inc in the System Management Portal using System Explorer >> Routines or by opening it in Studio.
go to post Marc Mundt · Aug 31, 2021 You can use the %Dictionary classes to get details of the class and methods: USER>do $System.SQL.Shell() SQL Command Line Shell ---------------------------------------------------- The command prefix is currently set to: <<nothing>>. Enter <command>, 'q' to quit, '?' for help. [SQL]USER>>SELECT FormalSpec FROM %Dictionary.MethodDefinition WHERE parent='My.Test.Class' AND Name='TestMethod' 1. SELECT FormalSpec FROM %Dictionary.MethodDefinition WHERE parent='My.Test.Class' AND Name='TestMethod' FormalSpec param1:%String,param2:%Numeric 1 Rows(s) Affected statement prepare time(s)/globals/cmds/disk: 0.0033s/321/1482/0ms execute time(s)/globals/cmds/disk: 0.0006s/3/385/0ms cached query class: %sqlcq.USER.cls14 --------------------------------------------------------------------------- [SQL]USER>>
go to post Marc Mundt · Aug 22, 2021 Create a BS that sends messages to BO every X seconds - it makes production more complex and also queues might not guarantee that the method is executed on schedule. You could try submitting the message to the head of the queue to be sure it gets processed right away.
go to post Marc Mundt · Jul 29, 2021 I'll be interested to see others' thoughts on this as well, but one approach is: Create a new empty database for the globals Use GBLOCKCOPY or MERGE to copy each of the globals from the current DB to the new globals DB. I believe GBLOCKCOPY is faster than MERGE. After they are copied/merged to the new DB kill the globals in the currrent DB. This then becomes your routines DB. Or you can do the opposite and export all of your routines from the current DB, import them into a new routines DB, then delete them from the current DB which becomes your globals DB. This would be faster than the first approach unless your globals are really small.
go to post Marc Mundt · Jul 28, 2021 %System.OBJ.Load() imports and compiles classes and can be run from another routine or class.