Skip to content

Instantly share code, notes, and snippets.

View shabiel's full-sized avatar

Sam Habiel shabiel

View GitHub Profile
@shabiel
shabiel / gd.strace
Created December 30, 2018 23:15
strace for WSL issue Error with database control semctl IPC_STAT1
execve("/usr/local/lib/yottadb/r122/mumps", ["/usr/local/lib/yottadb/r122/mump"..., "-r", "^%GD"], 0x7fffda032ff0 /* 21 vars */) = 0
brk(NULL) = 0x1cc4000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=22606, ...}) = 0
mmap(NULL, 22606, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f6ee1a4d000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
{
"name": "ewd-vista-panorama",
"version": "0.0.1",
"description": "Panorama Wrapper",
"main": "qewd.js",
"author": "Sam Habiel",
"license": "Apache-2.0",
"dependencies": {
"babelify": "",
"browserify": "",
curl -s https://en.wikipedia.org/wiki/List_of_compositions_by_Johann_Sebastian_Bach > bwv.html
< bwv.html scrape -b -e 'table#TOP > tr:not(:first-child)' > table.html
xml2json < table.html > table.json
< table.json jq '.html.body.tr[] | {BWV: .td[0]["$t"], Date: .td[2], Title: .td[3], Key: .td[4], Scoring: .td[5][]}' > bwv.json

EWD 3 on GT.M/Linux

Documentation in Public Domain. No copyright claimed.

Before you start

GT.M is installed and you have all environment variables set-up. I (unfortunately) already had that done from ewd.js. So I can't show it. See nodem repo for instructions on setting up $GTM_CI and setting the map file that goes with it.

NB: My ~ folder has database, which contains my VISTA, in which I am doing all of this. That's why I am using relative paths, and not ~ offset paths.

@shabiel
shabiel / ewd3_cache.md
Last active December 9, 2016 18:36
Getting Started with EWD 3

EWD 3 on Cache/Windows

Documentation in Public Domain. No copyright claimed.

I am doing this on Cache/Windows with MinGW.

Everytime I say "test", you need to do a full sanity test. It will be obvious when things don't work.

First need to install Cache and Node.js. Make sure your Cachexxxx.node version and your node.js version are the same.

EWD Xpress Install

Reference: https://groups.google.com/d/msg/enterprise-web-developer-community/Wth-hLoAOpI/j8XyXog-BAAJ

PROBADD(DFN,CODE,TEXT,STARTDT) ; Add a problem to a patient's record.
; Input
; DFN - you know what that is
; CODE - SNOMED code; not used alas; for the future.
; TEXT - SNOMED Text
; STARTDT - Internal Date of when the problem was first noted.
;
; Output:
; NONE
; Crash expected if code fails to add a problem.
wget http://sourceforge.net/projects/fis-gtm/files/GT.M%20Installer/v0.13/gtminstall && chmod +x ./gtminstall && sudo ./gtminstall
EN ; [Public] Main Entry Point
W "Pending Orders Display",!!
;
N DIR,DIRUT,DIROUT,DTOUT,DUOUT,X,Y,DA
S DIR(0)="S^N:No Filter;D:Division;W:Ward;G:Ward Group"
S DIR("A")="Filter by"
S DIR("?",1)="If you wish to filter your results to a specific group of patients,"
S DIR("?",2)="you can do that here."
S DIR("?",3)=" "
S DIR("?",4)="You can filter by Division, Ward, or Ward Group"
PSZDDATE ; PATIENTS RECEIVING A DRUG BETWEEN TWO DATES
;
CTRL ;
W @IOF,$$CJ^XLFSTR("Patients On Specific Drug Search",IOM)
W !,$$REPEAT^XLFSTR("=",IOM)
W !,"This utility searches through all Prescription file fills for a user-specified"
W !,"date range to find the prescriptions for a specific drug. Select the drug"
W !,"now. Then, enter the date range...",!
;
S DIC="^PSDRUG(",DIC(0)="QEAM" D ^DIC K DIC G:Y<0 OUT S DRUG=+Y
printDrugFileBarcodes ; VEN/SMH - Print C128 barcodes for NDCs for all active drugs in Drug File;6/24/2015
;;1.1;NONE;
;
; output looks like this: (barcode)
; QUETIAPINE FUMARATE 50MG TAB 360505313211 60505313201
; QUETIAPINE FUMARATE 50MG TAB UD 0100303100278394 00310027839
; QUETIAPINE FUMARATE 200MG SA TAB UD 303100282391 00310028239
; QUETIAPINE FUMARATE 300MG SA TAB UD 303100283398 00310028339
; QUETIAPINE FUMARATE 400MG SA TAB UD 00303100284395 00310028439
; QUETIAPINE FUMARATE 50MG SA TAB UD 00303100280397 00310028039