Skip to content

Instantly share code, notes, and snippets.

View sween's full-sized avatar
💭
Mostly Good Intentions

Ron Sweeney sween

💭
Mostly Good Intentions
View GitHub Profile
top -c -p $(pgrep -d',' -f cache)
@sween
sween / command
Created January 18, 2017 14:26
error
09:25:00:hspdperf2:PATCHTEST:HSPD>Do $system.OBJ.Load("/tmp/riqi-2575plus.xml","fckdv")
Load started on 01/18/2017 09:25:03
Loading file /tmp/riqi-2575plus.xml as xml
Imported class: %MPRL.UI.AuditLog
Imported class: %MPRL.UI.CompositeView
Imported class: %MPRL.UI.Graph
Imported class: %MPRL.UI.OfferOverride
Imported class: %MPRL.UI.WholeRecord
Imported class: %MPRL.UI.Worklist
<?xml version="1.0" encoding="UTF-8"?><!--This example message is provided for illustrative purposes only. It has had no clinical validation. Whilst every effort has been taken to ensure that the examples are consistent with the message specification contained within the MiM, where there are conflicts with the written message specification or schema, the specification or schema shall be considered to take precedence-->
<ClinicalDocument xmlns="urn:hl7-org:v3" xmlns:npfitlc="NPFIT:HL7:Localisation" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:hl7-org:v3 ../../schemas/POCD_MT000002UK01.xsd" classCode="DOCCLIN" moodCode="EVN">
<typeId root="2.16.840.1.113883.1.3" extension="POCD_HD000040"/>
<npfitlc:messageType root="2.16.840.1.113883.2.1.3.2.4.18.17" extension="POCD_MT010011GB02"/>
<id root="A709A442-3CF4-476E-8377-376500E829C9"/>
<code code="229059009" codeSystem="2.16.840.1.113883.2.1.3.2.4.15"/>
<title>Report</title>
<effectiveTime value="201105192000+01"/>
<confidenti
@sween
sween / gist:3e2bdd6658fe3ac472661c2bfb59e92d
Created December 29, 2016 13:20
Export Package for source control
Do $SYSTEM.OBJ.ExportAllClassesIndividual("/tmp/SOURCE/","/recursive",.err,,"Local.Custom",0) zw err
s ^%oddENV("callererrorinfo")=1 ; record caller location
s ^%oddENV("callererrorinfo")=2 ; record caller stack
s ^%oddENV("callererrorinfo")=3 ; record caller ^%ETN
Do $SYSTEM.OBJ.DisplayError()
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
@sween
sween / PS.mac
Created November 10, 2016 13:14
Exports a class, modifies a line in it, then puts it back hack yeah.
PS ;
K ^TClassHub
N exportStatus,F,C,STR
S F="/tmp/test.txt"
C F
set exportStatus = $System.OBJ.Export("HSPD.Production.MDMHub.CLS", F)
do ##class(%SYSTEM.Process).SetZEOF(1)
O F:"R"
S C=1
F U F R STR Q:$zeof D

Keybase proof

I hereby claim:

  • I am sween on github.
  • I am ronsween (https://keybase.io/ronsween) on keybase.
  • I have a public key whose fingerprint is 07AD D764 4768 C8FA 872D E105 73F7 DDBC E3EA 39A3

To claim this, I am signing this object:

// Create an list
Set data = ##class(%Library.ListOfDataTypes).%New()
// Insert numbers from 0 to size
Set key = $Order(^Ens.Metrics("QueueMetric",1,"QueueLength",""))
While (key '= "") {
// Write out contents
do data.Insert(^Ens.Metrics("QueueMetric",1,"QueueLength",key))
// Find next node
ClassMethod Go()
{
Set tFamily = "HSPD"
Set tCodeTable = "IndType"
Set tSystem = "NPPES"
Set tCode = "385H00000X"
Set tMasterCode = ##class(HS.Terminology.Utils).%MapCode(tFamily_"."_tCodeTable_"."_tSystem,tFamily_"."_tCodeTable_"."_$$$HSPDMasterMap,tCode,.tMapped)
w tMasterCode,!
w tMapped,!