This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| try { | |
| set tNPI = pRecord.NPI.NPI | |
| set tSource=pContext.Data("Source") | |
| // stop checking if DataSource is not available or coming from UI | |
| If $E(pRecord.SourceID,1,4)="EID:" || (tSource="") Return $$$OK | |
| ; | |
| set tSQL = "Select NPI from Local_PD_Linkage_Data.Individual WHERE SourceID=? AND Source=?" | |
| set tRS = ##class(%SQL.Statement).%ExecDirect(,tSQL,pRecord.SourceID,tSource) | |
| if tRS.%Next() { | |
| if (tRS.NPI '=tNPI) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import com.itextpdf.*; | |
| import com.itextpdf.text.DocumentException; | |
| import com.itextpdf.text.pdf.PdfReader; | |
| import com.itextpdf.text.pdf.PdfStamper; | |
| import com.itextpdf.text.pdf.PdfWriter; | |
| import java.io.*; | |
| public class MakeSmaller { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| A couple ways to do this: | |
| 1. If your global is simply being incremented at the top level (something like set x=$increment(^FOO)), then you can do: | |
| f { s st=$zh,prev=$g(^FOO) h 2 s next=$g(^FOO),now=$zh,time=(now-st),rate=(next-prev)/time w !,"Rate as of ",$zdt($h),": ",$fn(rate,",",2)," per sec; last value: ",next s prev=next} | |
| It should show something like: | |
| Rate as of 03/01/2015 11:15:41: 1.00 per sec; last value: 431 | |
| Rate as of 03/01/2015 11:15:43: 1.00 per sec; last value: 433 | |
| Rate as of 03/01/2015 11:15:45: 1.00 per sec; last value: 435 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Set ..Request=$classmethod("HS.Message.Registry.Provider."_pRequestClass,"%New") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ClassMethod Import() | |
| { | |
| // Create an instance of %XML.Reader | |
| Set reader = ##class(%XML.Reader).%New() | |
| // Begin processing of the file | |
| Do reader.OpenFile("test.xml") | |
| // Associate a class name with the XML element name | |
| Do reader.Correlate("Person","MyApp.MyPerson") | |
| // Read objects from xml file | |
| While (reader.Next(.object,.sc)) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| // Args to this bad boy are DATAMAP Name, mysql Table Name | |
| // Hackity Hack, Dont Talk Back! | |
| import ( | |
| _ "github.com/Go-SQL-Driver/MySQL" | |
| "database/sql" | |
| "fmt" | |
| "time" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set data = %page.%GetComponentById("myDataCombo") | |
| set tsc = ##Class(%SYS.Namespace).ListAll(.arrayNS) | |
| set data.valueList = arrayNS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Settings | |
| set sc = ##class(Ens.Config.DefaultSettings).%Export("/hs/float/minion2controller/prodsettings.xml", "HIE.HIEMINION") | |
| ClassMethod CreateExportXML(FileName As %String, excludedata As %Boolean = 1) | |
| { | |
| if $g(FileName)="" set FileName="C:\temp\ABCExport.xml" | |
| //loop through various groups of items in the ABC application |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// This method is called when Ensemble Portal is drawing the production diagram | |
| /// pArray contains the config names the scanner found. | |
| /// Users can remove or add new names | |
| ClassMethod OnGetConnections(Output pArray As %String, item As Ens.Config.Item) | |
| { | |
| Set $ZTrap = "OnGetConnectionsET" | |
| Set (tValue,tIndex)="" For { Set tIndex = item.Settings.Next(tIndex) Quit:tIndex="" | |
| Set tSetting = item.Settings.GetAt(tIndex) | |
| If tSetting.Name="TargetConfigNames" Set tValue=tValue_","_tSetting.Value | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set foo=bar^&ping -n -i google.com | |
| echo %foo% | |