@enteral/fhir-schema
Version:
FHIR Schema for enteral.io
28 lines (27 loc) • 665 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const graphql_1 = require("graphql");
const _1 = require(".");
if (!process.env.SMART_FHIR_URL) {
throw new Error("SMART_FHIR_URL envvar needed, did you source .env?");
}
async function main() {
const schema = _1.default({
smartFhirApiBase: process.env.SMART_FHIR_URL,
});
const result = await graphql_1.graphql(schema, `
query {
allPatients {
nodes {
id
resourceType
}
}
}
`);
console.dir(result, { depth: 8 });
}
main().catch((e) => {
console.error(e);
process.exit(1);
});