@precisa-saude/fhir 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +7 -8
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -5142,7 +5142,7 @@ async function range(args, json) {
|
|
|
5142
5142
|
if (!ref) exitWithError(`Faixa de refer\xEAncia n\xE3o encontrada para: ${code}`);
|
|
5143
5143
|
const direction = getRangeDirection(code);
|
|
5144
5144
|
if (json) {
|
|
5145
|
-
outputJson({
|
|
5145
|
+
outputJson({ ...def, context: ctx, direction, referenceRange: ref });
|
|
5146
5146
|
return;
|
|
5147
5147
|
}
|
|
5148
5148
|
const sexLabel = ctx.biologicalSex === "M" ? "Homem" : ctx.biologicalSex === "F" ? "Mulher" : "Geral";
|
|
@@ -5170,22 +5170,21 @@ async function units(args, json) {
|
|
|
5170
5170
|
const defaultUnit = getDefaultUnit(code) || def.unit || "";
|
|
5171
5171
|
const canonical = getCanonicalUnit(code);
|
|
5172
5172
|
const ucum = defaultUnit ? unitToUCUM(defaultUnit) : "";
|
|
5173
|
-
const
|
|
5173
|
+
const unitDetails = {
|
|
5174
5174
|
canonicalUnit: canonical ?? "\u2014",
|
|
5175
|
-
code,
|
|
5176
5175
|
defaultUnit,
|
|
5177
5176
|
ucum: ucum || "\u2014"
|
|
5178
5177
|
};
|
|
5179
5178
|
if (json) {
|
|
5180
|
-
outputJson(
|
|
5179
|
+
outputJson({ ...def, ...unitDetails });
|
|
5181
5180
|
return;
|
|
5182
5181
|
}
|
|
5183
5182
|
outputText(
|
|
5184
5183
|
[
|
|
5185
5184
|
`Unidades: ${code}`,
|
|
5186
|
-
` Padr\xE3o: ${
|
|
5187
|
-
` Can\xF4nica: ${
|
|
5188
|
-
` UCUM: ${
|
|
5185
|
+
` Padr\xE3o: ${unitDetails.defaultUnit || "\u2014"}`,
|
|
5186
|
+
` Can\xF4nica: ${unitDetails.canonicalUnit}`,
|
|
5187
|
+
` UCUM: ${unitDetails.ucum}`
|
|
5189
5188
|
].join("\n")
|
|
5190
5189
|
);
|
|
5191
5190
|
}
|
|
@@ -5255,7 +5254,7 @@ async function main() {
|
|
|
5255
5254
|
strict: false
|
|
5256
5255
|
});
|
|
5257
5256
|
if (values.version) {
|
|
5258
|
-
process.stdout.write(`${"0.5.
|
|
5257
|
+
process.stdout.write(`${"0.5.1"}
|
|
5259
5258
|
`);
|
|
5260
5259
|
return;
|
|
5261
5260
|
}
|
package/package.json
CHANGED