Artifacts to help define Medigy schemas and other information governance structures.
The mgctl-sandbox.env file contains convenience aliases and environment variables that are useful for development and testing. mgctl-sandbox.env is designed to be sourced into the current shell and assumes that the normal Netspective Medigy workspaces are setup in the standard directory structure.
mgctl-sandbox.env will automatically figure out which directory it's being run from and locate local source files in the relative ancestor path(s). If you change directories you must run the source command again because the location of mgctl is computed relative to the current directory where it was run.
cd <location of *.lhc-form.json>
source <(curl -Ls https://raw.githubusercontent.com/medigy/governance/master/mgctl-sandbox.env)
mgctl --help
mgctl --versionThe mgctl-production.env file contains convenience aliases and environment variables that are useful for production / publishing.
mgctl-production.env is designed to be sourced into the current shell (or script) and assumes that you want to run the latest versions of mgctl.ts and related CLI apps directly from URLs.
mgctl-production.env automatically figures out the latest versions using GitHub semver tags.
cd <location of *.lhc-form.json>
source <(curl -Ls https://raw.githubusercontent.com/medigy/governance/master/mgctl-production.env)
mgctl --help
mgctl --versionStart the server:
cd $HOME/workspaces/github.com/medigy/governance
deno-run mgctl.ts server --verboseIn a separate window, try the service:
cd $HOME/workspaces/gl.infra.medigy.com/institutions/innovators/netspective-communications/unblock-health
curl -H "Content-Type: application/json" --data @offering-profile.lhc-form.json http://localhost:8159/offering-profile/inspect/lformUse the following instructions to take an LHC Form JSON file and "type" it as a Medigy Offering Profile. Once "typed" an LHC Form may be validated by the TypeScript compiler a a normal TypeScript file or transpiled to JavaScript.
source <(curl -Ls https://raw.githubusercontent.com/medigy/governance/master/mgctl-sandbox.env)
mgctl offering-profile type lform "offering-profile.lhc-form.json" --mg-mod-ref=$MGMOD --gd-mod-ref=$GDMOD --overwrite --verbose && deno fmt
deno run -A --unstable ./offering-profile.lhc-form.auto.ts inspect
deno run -A --unstable ./offering-profile.lhc-form.auto.ts json emitsource <(curl -Ls https://raw.githubusercontent.com/medigy/governance/master/mgctl-production.env)
mgctl offering-profile type lform "offering-profile.lhc-form.json" --mg-mod-ref=$MGMOD --gd-mod-ref=$GDMOD --overwrite --verbose && deno fmt
deno run -A --unstable ./offering-profile.lhc-form.auto.ts inspect
deno run -A --unstable ./offering-profile.lhc-form.auto.ts json emit