go to post Scott Roth · Jan 10, 2019 I didn't originally write the code but it works. My guess is my teammate who wrote it was trying to compensate for partial values, as in decimals.
go to post Scott Roth · Jan 10, 2019 Here is a method we built for our use.ClassMethod IsNumeric(value As %String) As %Boolean{//Load value into local var tNumberset tNumber = value//Use $extract to get the FULL VALUE into an internal format for $isvalidnumset tFullValue = $EXTRACT(tNumber,1,$length(tNumber))//Use $isvalidnum to check if the full value is numeric (ex: 123456789 = true, 123456789x = false)set tNumberIsValid = $ISVALIDNUM(tFullValue)//At this point, we simply return tNumberIsValid (it will either be 1, true or 0, false)quit tNumberIsValid}
go to post Scott Roth · Jan 4, 2019 It seems Node .js is not going to be a viable option. My systems folks said it was compliled with a different GCC than what we have loaded on our AIX Server. If we were to load Node.js it would mess up the rest of the scripting (PERL, Shell) we do on the server.Javascript was just one idea, I bet there are many other types of code that can be used to adjust an image resolution. Is there anything that can be called from Atelier without having to install a bunch of software on the server?
go to post Scott Roth · Dec 20, 2018 Here is the same code but from the Studio (class view)<assign value='##class(%Stream.GlobalCharacter).%New()' property='tStream' action='set' /><assign value='source.GetFieldStreamRaw(.tStream,"ORCgrp(1).OBRgrp(1).OBXgrp(1).OBX:ObservationValue(1).AlternateText",.tRemainder)' property='tSC' action='set' /><if condition='..Length($get(tSC))>0' ><true><assign value='"1"' property='target.{ORCgrp(1).OBRgrp(1).OBXgrp(1).OBX:SetIDOBX}' action='set' /><assign value='"ED"' property='target.{ORCgrp(1).OBRgrp(1).OBXgrp(1).OBX:ValueType}' action='set' /><assign value='"7"' property='target.{ORCgrp(1).OBRgrp(1).OBXgrp(1).OBX:ObservationIdentifier.Identifier}' action='set' /><assign value='"URL"' property='target.{ORCgrp(1).OBRgrp(1).OBXgrp(1).OBX:ObservationIdentifier.Text}' action='set' /><assign value='"EXTLRR"' property='target.{ORCgrp(1).OBRgrp(1).OBXgrp(1).OBX:ObservationIdentifier.NameofCodingSystem}' action='set' /><assign value='"1"' property='target.{ORCgrp(1).OBRgrp(1).OBXgrp(1).OBX:ObservationSubID}' action='set' /><assign value='"PDF"' property='target.{ORCgrp(1).OBRgrp(1).OBXgrp(1).OBX:ObservationValue(1).Identifier}' action='set' /><assign value='"TMSAUDIO"' property='target.{ORCgrp(1).OBRgrp(1).OBXgrp(1).OBX:ObservationValue(1).Text}' action='set' /><assign value='"PDF"' property='target.{ORCgrp(1).OBRgrp(1).OBXgrp(1).OBX:ObservationValue(1).NameofCodingSystem}' action='set' /><assign value='"Base64"' property='target.{ORCgrp(1).OBRgrp(1).OBXgrp(1).OBX:ObservationValue(1).AlternateIdentifier}' action='set' /><assign value='target.StoreFieldStreamRaw(tStream,"ORCgrp(1).OBRgrp(1).OBXgrp(1).OBX:ObservationValue(1).AlternateText", tRemainder)' property='tSC' action='set' /><assign value='""' property='$P(tRemainder,"|",11)' action='set' /></true></if>
go to post Scott Roth · Dec 19, 2018 With the help from WRC we converted the OBX stream to a GlobalCharacter Stream. See below as an example.
go to post Scott Roth · Nov 19, 2018 Yes I would think the easiest way would be to create a record mapper structure, then use the DTL to map your HL7 fields to where they need to be, then send it to a EnsLib.RecordMap.Operation.FileOperation.Record MapperDTL
go to post Scott Roth · Sep 24, 2018 In a lot of places I use...ConvertDateTime (val,in,out,file)Reads the input string val as a time stamp in in format, and returns the same value converted to a time stamp in out format. See “Time Stamp Specifications for Filenames” in Configuring Ensemble Productions.The default for in and out is %Q. Any %f elements in the out argument are replaced with the file string. If val does not match the in format, out is ignored and val is returned unchanged. ..ConvertDateTime(source.{Z01(1):DateOfBirth},"%Y%m%d","%q(1)")%q(1) is the format.We had a consultant write this for us as well... ClassMethod FormatStringToSQLDate(InDate As %String) As %String [ Final ]{If InDate=""{set OutDate="1900-01-01 00:00:00"}else{set DateLength=..Length(InDate)if (DateLength > 7) && (DateLength < 15){set YYYY=..SubString(InDate,1,4)set mm=..SubString(InDate,5,6)set dd=..SubString(InDate,7,8)set OutDate=YYYY_"-"_mm_"-"_ddif DateLength=8{set OutDate=OutDate_" 00:00:00"}if DateLength=10{set HH=..SubString(InDate,9,10)set OutDate=OutDate_" "_HH_":00:00"}if DateLength=12{set HH=..SubString(InDate,9,10)set MM=..SubString(InDate,11,12)set OutDate=OutDate_" "_HH_":"_MM_":00"}if DateLength=14{set HH=..SubString(InDate,9,10)set MM=..SubString(InDate,11,12)set SS=..SubString(InDate,13,14)set OutDate=OutDate_" "_HH_":"_MM_":"_SS}}else{set OutDate="1900-01-01 00:00:00"}}Quit OutDate}}
go to post Scott Roth · Sep 18, 2018 We've have done something similar but wrote a function to do the looping... This example loops through a given segment and field and looks that value up against a lookup table. This could be modified for your use. This is the only way I know to do the looping within the BusinessRule. ClassMethod GroupIDExists(pHL7Msg As EnsLib.HL7.Message, pSegment As %String, pField As %String, pLookupTable As %String) As %Boolean{ #dim tSeg as EnsLib.HL7.Segment set tSegCount = pHL7Msg.SegCountGet() set i = 1 Set tFound = 0 //get new values set tval="" while ((i <= tSegCount) && (tval="")) { set tSeg = pHL7Msg.GetSegmentAt(i) if (tSeg.Name = pSegment) { set tID = tSeg.GetValueAt(pField) set tval= ..Lookup(pLookupTable, tID) } set i = i + 1 } if (tval '= "") { Q 1 } quit 0}
go to post Scott Roth · Sep 13, 2018 Are you connecting from a Windows Client to a Windows LDAP server? Or is it an Unix Client to a Windows LDAP server? Its a matter of using Binds vs SimpleBinds. I am wondering if that is causing your error. I use Delegated Authentication through LDAP using a TLS certificate so my setup maybe more complicated than yours.
go to post Scott Roth · May 29, 2018 After many TRACE statements found I was missing (1) after the FT1 in my syntax. So it should be... request.GetValueAt("FT1(1):16.4.2")
go to post Scott Roth · Mar 15, 2018 I have always called it the other way around with the outbound before the I in the Execute Procedure Parm Array.Method InsertProviderDivisionSp(pRequest As osuwmc.CPD.DataStructures.InsertProviderDivision, Output pResponse As Ens.Response) As %Status{set SPQuery = "{ ?= call usp_Interfaces_Insert_ProviderDivision_Ens(?,?,?,?) }"set par = 4set par(1) = pRequest.DoctorNumberset par(2) = pRequest.Divisionset par(3) = pRequest.UpdatedByset par(4) = pRequest.OrderByset tSC = ..Adapter.ExecuteProcedureParmArray(.InsertDivision,.outputs,SPQuery,"oiiii",.par)if 'tSC write " failed ",tSC quit tSC} or you can call it like...Method InsertProviderPreference(pRequest As osuwmc.CPD.DataStructures.InsertPreferences, Output pResponse As Ens.Response) As %Status{set SPQuery = "{ ?= call usp_Interfaces_Insert_ProviderPreference(?,?,?,?,?) }"set parm = 6set parm(1,"SqlType")=$$$SQLVARCHARset parm(1,"IOTypes")=$$$SQLPARAMOUTPUT set parm(2) = pRequest.DoctorNumberset parm(2,"SqlType")=$$$SQLVARCHARset parm(2,"IOTypes")=$$$SQLPARAMINPUTset parm(3) = pRequest.Preferenceset parm(3,"SqlType")=$$$SQLNUMERICset parm(3,"IOTypes")=$$$SQLPARAMINPUTset parm(4) = pRequest.PreferenceValueset parm(4,"SqlType")=$$$SQLNUMERICset parm(4,"IOTypes")=$$$SQLPARAMINPUTset parm(5) = pRequest.PreferenceDescset parm(5,"SqlType")=$$$SQLVARCHARset parm(5,"IOTypes")=$$$SQLPARAMINPUTset parm(6) = pRequest.UpdatedByset parm(6,"SqlType")=$$$SQLVARCHARset parm(6,"IOTypes")=$$$SQLPARAMINPUT set tSC = ..Adapter.ExecuteProcedureParmArray(.InsertPreference,.outputs,SPQuery,"oiiiii",.parm)if 'tSC write "Failed",tSCquit tSC}
go to post Scott Roth · Mar 12, 2018 What does your... ##class(SamsReq).%New() look like? Here is what my Request and code look like as a whole. I have used this many times across many services in different fashions. I am using JDBC vs ODBC which maybe a difference, not sure.Class osuwmc.CPD.DataStructures.StartJobRequest Extends (%Library.Persistent, %XML.Adaptor) [ Not ProcedureBlock, SqlRowIdPrivate ]{Property StartJobStatus As %Integer;Storage Default{<Data name="StartJobRequestDefaultData"><Value name="1"><Value>%%CLASSNAME</Value></Value><Value name="2"><Value>StartJobStatus</Value></Value></Data><DataLocation>^osuwmc.CPD59D.StartJobReqE986D</DataLocation><DefaultData>StartJobRequestDefaultData</DefaultData><IdLocation>^osuwmc.CPD59D.StartJobReqE986D</IdLocation><IndexLocation>^osuwmc.CPD59D.StartJobReqE986I</IndexLocation><StreamLocation>^osuwmc.CPD59D.StartJobReqE986S</StreamLocation><Type>%Library.CacheStorage</Type>}}Class osuwmc.CPD.UpdateClarityAddressesFromCPDService Extends Ens.BusinessService [ ClassType = "", ProcedureBlock ]{Parameter ADAPTER = "EnsLib.SQL.InboundAdapter";Parameter REQUESTCLASSES As %String = "EnsLib.SQL.Snapshot";Property InitDSN As %String;Method OnInit() As %Status{Set ..InitDSN = ..Adapter.DSN//Set ..Adapter.ConnectAttrs = "QueryTimeout:45" ; try this too just in case...Quit $$$OK}Method OnProcessInput(pInput As EnsLib.SQL.Snapshot, pOutput As %RegisteredObject) As %Status{set req=##class(osuwmc.CPD.DataStructures.StartJobRequest).%New()set req.StartJobStatus = pInput.Get("1")set sc = ..SendRequestSync("CPDClarityAddressUpdateBPL",req,.pOutput) Quit sc}}
go to post Scott Roth · Mar 12, 2018 I have used this in the past...Under my Data Settings I use the following as my Query to act like a status kick off for my job...SELECT 1Then my service does...Method OnProcessInput(pInput As EnsLib.SQL.Snapshot, pOutput As %RegisteredObject) As %Status{ set req=##class(osuwmc.CPD.DataStructures.StartJobRequest).%New() set req.StartJobStatus = pInput.Get("1") set sc = ..SendRequestSync("CPDClarityAddressUpdateBPL",req,.pOutput) Quit sc}It appears you are not setting your request variable so there is nothing to send to your DQTT.
go to post Scott Roth · Feb 19, 2018 You can use a Data Lookup table to specify the Subject based on the Error you are looking for.
go to post Scott Roth · Feb 15, 2018 You can try the following... https://community.spiceworks.com/topic/255740-powershell-script-to-show-all-groups-in-ad
go to post Scott Roth · Feb 7, 2018 The application is sending us the following back... Of course it does not match up to any structure but like you said they probably have omitted the backslash from the ACK causing the error. MSH|^~\&|GCRC|RDM|INTENG||20180207084732||SIU^S12|70577207|P|2.3| MSA|AA|Successful| I went ahead and made copies of 4 different EnsLib.HL7 classes, and modified the Parser to not throw the warning message. So for it is working like it should.
go to post Scott Roth · Feb 5, 2018 I have found that the text of "Discarding Received non HL7 data" lives in the EnsLib.HL7.Parser.cls. Has anyone tired to copy and make their own HL7.Parser that would not throw this warning message? It seems pretty simple but I am having issues trying to call my updated Parser.cls. All I want to do it comment this error out so it is not thrown and taking up database space. ThanksScott
go to post Scott Roth · Oct 17, 2017 We found the Ensemble Scheduler single threaded, so If you had schedules that would overlap some instances would not be started correctly. One of my colleagues created two simple command line scripts to start and stop interfaces. We are using those scripts along with the cron scheduler on AIX.
go to post Scott Roth · Jun 29, 2017 Have you attempted to use LENGTH?Say LENGTH(HL7.{MRG. PriorPatientIdentifierList }) > 0We have never been successful in using the field numbers within our routing rules. Normally we just use the name of the field, or that's at least how we were taught.I would also think you want to check the message type before you check the MRG.1. So it would be if Message Type is A18 and LENGTH(HL7.{MRG. PriorPatientIdentifierList }) > 0 then return
go to post Scott Roth · Apr 29, 2016 I just worked with WRC on this same issue. I was able to make copies of %ZEN.Dialog.finderDialog and EnsPortal.LookupSettings. By using these copies I was able to modify some of the methods to limit down the number of tables a end user would have access too by using a filter on the Naming convention. Class osuwmc.DataLookup.testFinderDialog Extends %ZEN.Dialog.finderDialog{Method GetFinderArray(ByRef pParameters, Output pMetaData, Output pData) As %Status{Kill tParms// assemble search parametersSet tParms("sort") = ..currSortModeSet tParms("search") = ..searchKeySet tParms("abstract") = ..includeAbstractif (..mode = "labLookup"){s tSC = ##class(%ZEN.FinderUtils).%GetArrayForQuery("Ens.Util.LookupTable","Enumerate",$LB("{Name}","{Name}_"".lut""","lut",""),".",,.pMetaData,.tData)s k=""for {s k=$order(tData(k))q:k=""s tableName = $li(tData(k),1)if (tableName [ "LABS") {s pData($i(pData)) = tData(k)}}q tSC} else {Quit ##class(%ZEN.FinderUtils).%GetClassListArray(.tParms,.pMetaData,.pData) }}Class osuwmc.DataLookup.testLookupSettings Extends EnsPortal.LookupSettings{/// Handle various dialogs.ClientMethod onPopupAction(popupName, action, value) [ Language = javascript ]{try {if (action != "ok") {return false;}popupName = this.removePopupSuffix(popupName);switch(popupName) {case 'NewLookup':if (value.substring(value.length-4).toUpperCase() != '.LUT') value += '.lut';// note that we fall through to open the page for both NewLookup and LookupOpencase 'LookupOpen':var link = zenLink('osuwmc.DataLookup.testLookupSettings.zen');link += (link.indexOf('?') > -1 ? '&' : '?') + 'LookupTable=' + encodeURIComponent(value); this.setModified(false);this.gotoPage(link);break; case 'switchNamespace':zenPage.changeURLNamespace(value);break;case 'LookupSaveAs':if (value.substring(value.length-4).toUpperCase() == '.LUT') value = value.substring(0,value.length-4);zenPage.checkName(value);break;}} catch (ex) {alert("Error: " + ex); }}/// If the new name is already in use, confirm that the user wishes to overwrite the old table of that name.ClientMethod checkName(newName) [ Language = javascript ]{var duplicateName = zenPage.NameCheck(newName);if (duplicateName !="") {if (!confirm($$$FormatText($$$Text("Lookup table name '%1' is already in use! Are you sure you want to overwrite this table?"),duplicateName))) {return;}zenPage.RemoveTable(duplicateName);}zenPage.renameSave(newName);var link = zenLink('osuwmc.DataLookup.testLookupSettings.zen');link += (link.indexOf('?') > -1 ? '&' : '?') + 'LookupTable=' + encodeURIComponent(newName+".lut");this.setModified(false);this.gotoPage(link);}ClientMethod openTable() [ Language = javascript ]{if (this.pageModified) {var doOpen = confirm($$$Text('The current lookup table has been modified. Do you wish to discard these changes and open a different lookup table?'));if (!doOpen) return;}var parms = { MODE: "labLookup"};zenLaunchPopupWindow(zenLink('osuwmc.DataLookup.testFinderDialog.cls'),this.addPopupSuffix('LookupOpen'),'status,scrollbars,resizable=yes,width=800,height=600',parms);}Method OnGetRibbonInfo(Output pDisplay As %Boolean, Output pViewIcons As %List, Output pSortOptions As %List, Output pSearchBox As %Boolean, Output pRibbonTitle As %String, Output pCommands As %List) As %Status{Set pDisplay = 1Set pRibbonTitle = $$$Text("Lookup Table Viewer")Set pCommands(1) = $LB("btnOpen",$$$Text("Open"),$$$Text("Open an existing lookup table"),"zenPage.openTable();")Set pCommands(2) = $LB("btnSave",$$$Text("Save"),$$$Text("Save the current lookup table"),"zenPage.saveTable();")Set pCommands(3) = $LB("btnSaveAs",$$$Text("Save As"),$$$Text("Save the current lookup table with a different name"),"zenPage.saveTableAs();")Quit $$$OK}}