@precisa-saude/fhir 0.31.5 → 0.32.0

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.
Files changed (38) hide show
  1. package/dist/biomarkers.cjs +2 -2
  2. package/dist/biomarkers.js +1 -1
  3. package/dist/{chunk-SDKLR3DT.cjs → chunk-44QMNDOI.cjs} +9 -9
  4. package/dist/{chunk-SDKLR3DT.cjs.map → chunk-44QMNDOI.cjs.map} +1 -1
  5. package/dist/{chunk-RM7KJAVA.js → chunk-4Y43MQQK.js} +5 -5
  6. package/dist/chunk-5FMR2U7P.cjs +342 -0
  7. package/dist/chunk-5FMR2U7P.cjs.map +1 -0
  8. package/dist/chunk-HQ26GOLI.js +342 -0
  9. package/dist/chunk-HQ26GOLI.js.map +1 -0
  10. package/dist/{chunk-QOXTLPQ2.cjs → chunk-MKH4Q735.cjs} +25 -4
  11. package/dist/chunk-MKH4Q735.cjs.map +1 -0
  12. package/dist/{chunk-6OG25HIE.js → chunk-MNUQ57JR.js} +2 -2
  13. package/dist/{chunk-EXOKBY6D.cjs → chunk-OTVCOSCK.cjs} +3 -3
  14. package/dist/{chunk-EXOKBY6D.cjs.map → chunk-OTVCOSCK.cjs.map} +1 -1
  15. package/dist/{chunk-PK5DQMPC.js → chunk-WDDW2WCY.js} +25 -4
  16. package/dist/chunk-WDDW2WCY.js.map +1 -0
  17. package/dist/cli.js +445 -20
  18. package/dist/converter.cjs +3 -3
  19. package/dist/converter.js +2 -2
  20. package/dist/importer.cjs +4 -4
  21. package/dist/importer.js +3 -3
  22. package/dist/index.cjs +16 -10
  23. package/dist/index.cjs.map +1 -1
  24. package/dist/index.d.cts +1 -0
  25. package/dist/index.d.ts +1 -0
  26. package/dist/index.js +14 -8
  27. package/dist/index.js.map +1 -1
  28. package/dist/sources.cjs +9 -0
  29. package/dist/sources.cjs.map +1 -0
  30. package/dist/sources.d.cts +41 -0
  31. package/dist/sources.d.ts +41 -0
  32. package/dist/sources.js +9 -0
  33. package/dist/sources.js.map +1 -0
  34. package/package.json +11 -1
  35. package/dist/chunk-PK5DQMPC.js.map +0 -1
  36. package/dist/chunk-QOXTLPQ2.cjs.map +0 -1
  37. /package/dist/{chunk-RM7KJAVA.js.map → chunk-4Y43MQQK.js.map} +0 -0
  38. /package/dist/{chunk-6OG25HIE.js.map → chunk-MNUQ57JR.js.map} +0 -0
package/dist/cli.js CHANGED
@@ -1,8 +1,5 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- // src/cli/index.ts
4
- import { parseArgs as parseArgs3 } from "util";
5
-
6
3
  // src/cli-utils.ts
7
4
  async function readStdin() {
8
5
  if (process.stdin.isTTY) return "";
@@ -52,6 +49,23 @@ function exitWithError(message, code = 1) {
52
49
  process.exit(code);
53
50
  }
54
51
 
52
+ // src/cli/argv.ts
53
+ function dividirArgv(argv) {
54
+ let command;
55
+ let help = false;
56
+ let json = false;
57
+ let version = false;
58
+ const resto = [];
59
+ for (const token of argv) {
60
+ if (token === "--json") json = true;
61
+ else if (token === "--help" || token === "-h") help = true;
62
+ else if (token === "--version" || token === "-v") version = true;
63
+ else if (command === void 0 && !token.startsWith("-")) command = token;
64
+ else resto.push(token);
65
+ }
66
+ return { command, help, json, resto, version };
67
+ }
68
+
55
69
  // src/biomarkers.ts
56
70
  var BIOMARKER_DEFINITIONS = [
57
71
  // ============================================================================
@@ -2144,7 +2158,14 @@ var BIOMARKER_DEFINITIONS = [
2144
2158
  "Fat Percentage",
2145
2159
  "Percent Body Fat",
2146
2160
  "% Body Fat",
2147
- "Total Body % Fat"
2161
+ "Total Body % Fat",
2162
+ // A Live Lean imprime "Total Fat %" na tabela regional da página 1 (a
2163
+ // linha "Total" é o percentual do corpo inteiro) e "Total Fat (%)" na
2164
+ // tabela de tendência. Os dois são o "Total Body Fat %" da mesma data.
2165
+ // Sem eles, o "Total Fat" da massa de gordura, logo abaixo, ancorava
2166
+ // `FatMass` na citação do percentual.
2167
+ "Total Fat %",
2168
+ "Total Fat (%)"
2148
2169
  ],
2149
2170
  pt: [
2150
2171
  "Percentual de Gordura Corporal",
@@ -2162,7 +2183,10 @@ var BIOMARKER_DEFINITIONS = [
2162
2183
  code: "FatMass",
2163
2184
  loinc: "73708-0",
2164
2185
  names: {
2165
- en: ["Fat Mass", "Total Fat Mass", "Body Fat Mass", "Fat Tissue Mass"],
2186
+ // "Total Fat" é a coluna "Total Fat (lbs)" da tabela de tendência da
2187
+ // densitometria Live Lean, e traz o mesmo número do "Fat Mass" da página
2188
+ // 1 em todas as datas que as duas tabelas imprimem.
2189
+ en: ["Fat Mass", "Total Fat Mass", "Body Fat Mass", "Fat Tissue Mass", "Total Fat"],
2166
2190
  pt: ["Massa de Gordura", "Massa Gorda", "Massa de Gordura Total", "Tecido Adiposo"]
2167
2191
  },
2168
2192
  unit: "kg"
@@ -2182,7 +2206,18 @@ var BIOMARKER_DEFINITIONS = [
2182
2206
  category: "composicao-corporal",
2183
2207
  code: "LeanMass",
2184
2208
  names: {
2185
- en: ["Lean Mass", "Lean Body Mass", "Lean Tissue Mass", "Total Lean Mass", "LBM"],
2209
+ // "Total Lean" é a coluna "Total Lean (lbs)" da mesma tabela de
2210
+ // tendência: tecido magro, igual ao "Lean Mass" da página 1, e não a
2211
+ // massa livre de gordura, que soma o mineral ósseo e fica em
2212
+ // `FatFreeMass`.
2213
+ en: [
2214
+ "Lean Mass",
2215
+ "Lean Body Mass",
2216
+ "Lean Tissue Mass",
2217
+ "Total Lean Mass",
2218
+ "LBM",
2219
+ "Total Lean"
2220
+ ],
2186
2221
  pt: ["Massa Magra", "Massa Corporal Magra", "Tecido Magro", "Massa Magra Total"]
2187
2222
  },
2188
2223
  unit: "kg"
@@ -6744,6 +6779,403 @@ async function range(args, json) {
6744
6779
  );
6745
6780
  }
6746
6781
 
6782
+ // src/cli/commands/source.ts
6783
+ import { parseArgs as parseArgs3 } from "util";
6784
+
6785
+ // src/sources.ts
6786
+ var SOURCE_REGISTRY = {
6787
+ // ---------------------------------------------------------------------------
6788
+ // Fontes internacionais — Cardiovascular
6789
+ // ---------------------------------------------------------------------------
6790
+ "agatston-1990": {
6791
+ abnt: "AGATSTON, A. S. et al. Quantification of coronary artery calcium using ultrafast computed tomography. Journal of the American College of Cardiology, v. 15, n. 4, p. 827-832, 1990.",
6792
+ doi: "10.1016/0735-1097(90)90282-T",
6793
+ key: "agatston-1990",
6794
+ url: "https://pubmed.ncbi.nlm.nih.gov/2407762/"
6795
+ },
6796
+ "browning-ashwell-2010": {
6797
+ abnt: "BROWNING, L. M.; HSIEH, S. D.; ASHWELL, M. A systematic review of waist-to-height ratio as a screening tool for the prediction of cardiovascular disease and diabetes: 0,5 could be a suitable global boundary value. Nutrition Research Reviews, v. 23, n. 2, p. 247-269, 2010.",
6798
+ doi: "10.1017/S0954422410000144",
6799
+ key: "browning-ashwell-2010",
6800
+ url: "https://pubmed.ncbi.nlm.nih.gov/20819243/"
6801
+ },
6802
+ "castelli-ratio-1992": {
6803
+ abnt: "CASTELLI, W. P. et al. Lipids and risk of coronary heart disease: the Framingham Study. Annals of Epidemiology, v. 2, n. 1-2, p. 23-28, 1992.",
6804
+ doi: "10.1016/1047-2797(92)90033-M",
6805
+ key: "castelli-ratio-1992",
6806
+ url: "https://pubmed.ncbi.nlm.nih.gov/1342260/"
6807
+ },
6808
+ "caulfield-ionmobility-2008": {
6809
+ abnt: "CAULFIELD, M. P. et al. Direct determination of lipoprotein particle sizes and concentrations by ion mobility analysis. Clinical Chemistry, v. 54, n. 8, p. 1307-1316, 2008.",
6810
+ doi: "10.1373/clinchem.2007.100586",
6811
+ key: "caulfield-ionmobility-2008",
6812
+ url: "https://pubmed.ncbi.nlm.nih.gov/18515257/"
6813
+ },
6814
+ "contois-apoa1-1996": {
6815
+ abnt: "CONTOIS, J. H. et al. Reference intervals for plasma apolipoprotein A-1 determined with a standardized commercial immunoturbidimetric assay: results from the Framingham Offspring Study. Clinical Chemistry, v. 42, n. 4, p. 507-514, 1996.",
6816
+ doi: "10.1093/clinchem/42.4.507",
6817
+ key: "contois-apoa1-1996",
6818
+ url: "https://pubmed.ncbi.nlm.nih.gov/8605666/"
6819
+ },
6820
+ "ewgsop2-2019": {
6821
+ abnt: "CRUZ-JENTOFT, A. J. et al. Sarcopenia: revised European consensus on definition and diagnosis. Age and Ageing, v. 48, n. 1, p. 16-31, 2019.",
6822
+ doi: "10.1093/ageing/afy169",
6823
+ key: "ewgsop2-2019",
6824
+ url: "https://pubmed.ncbi.nlm.nih.gov/30312372/"
6825
+ },
6826
+ "ferreira-vitd-2017": {
6827
+ abnt: "FERREIRA, C. E. S. et al. Posicionamento oficial da Sociedade Brasileira de Patologia Cl\xEDnica/Medicina Laboratorial e da Sociedade Brasileira de Endocrinologia e Metabologia sobre intervalos de refer\xEAncia da vitamina D [25(OH)D]. Archives of Endocrinology and Metabolism, v. 61, n. 6, p. 527-542, 2017.",
6828
+ doi: "10.1590/2359-3997000000310",
6829
+ key: "ferreira-vitd-2017",
6830
+ url: "https://pubmed.ncbi.nlm.nih.gov/29412389/"
6831
+ },
6832
+ "friedewald-1972": {
6833
+ abnt: "FRIEDEWALD, W. T.; LEVY, R. I.; FREDRICKSON, D. S. Estimation of the concentration of low-density lipoprotein cholesterol in plasma, without use of the preparative ultracentrifuge. Clinical Chemistry, v. 18, n. 6, p. 499-502, 1972.",
6834
+ doi: "10.1093/clinchem/18.6.499",
6835
+ key: "friedewald-1972",
6836
+ url: "https://pubmed.ncbi.nlm.nih.gov/4337382/"
6837
+ },
6838
+ "gallagher-bodyfat-2000": {
6839
+ abnt: "GALLAGHER, D. et al. Healthy percentage body fat ranges: an approach for developing guidelines based on body mass index. American Journal of Clinical Nutrition, v. 72, n. 3, p. 694-701, 2000.",
6840
+ key: "gallagher-bodyfat-2000",
6841
+ url: "https://pubmed.ncbi.nlm.nih.gov/10966886/"
6842
+ },
6843
+ "ge-corescan": {
6844
+ abnt: "GE HEALTHCARE. enCORE Software CoreScan: Visceral Adipose Tissue (VAT) assessment. Madison: GE Medical Systems Lunar, [s. d.]. (Documenta\xE7\xE3o do fabricante do DEXA Lunar Prodigy; classifica\xE7\xE3o Healthy 0\u201352 in\xB3, Increased Risk 52,15\u2013112,10 in\xB3, At Risk 112,10+ in\xB3, equivalente a 0\u2013852 cm\xB3, 854\u20131.837 cm\xB3, 1.837+ cm\xB3.)",
6845
+ key: "ge-corescan",
6846
+ url: "https://www.gehealthcare.com/products/bone-and-metabolic-health/encore"
6847
+ },
6848
+ "geloneze-brams-2009": {
6849
+ abnt: "GELONEZE, B. et al. HOMA1-IR and HOMA2-IR indexes in identifying insulin resistance and metabolic syndrome \u2014 Brazilian Metabolic Syndrome Study (BRAMS). Arquivos Brasileiros de Endocrinologia & Metabologia, v. 53, n. 2, p. 281-287, 2009.",
6850
+ doi: "10.1590/S0004-27302009000200020",
6851
+ key: "geloneze-brams-2009",
6852
+ url: "https://pubmed.ncbi.nlm.nih.gov/19466221/"
6853
+ },
6854
+ "george-ck-2016": {
6855
+ abnt: "GEORGE, M. D.; MCGILL, N. K.; BAKER, J. F. Creatine kinase in the U.S. population: impact of demographics, comorbidities, and body composition on the normal range. Medicine, v. 95, n. 33, e4344, 2016.",
6856
+ doi: "10.1097/MD.0000000000004344",
6857
+ key: "george-ck-2016",
6858
+ url: "https://pubmed.ncbi.nlm.nih.gov/27537560/"
6859
+ },
6860
+ "giannitsis-hstnt-2010": {
6861
+ abnt: "GIANNITSIS, E. et al. Analytical validation of a high-sensitivity cardiac troponin T assay. Clinical Chemistry, v. 56, n. 2, p. 254-261, 2010.",
6862
+ doi: "10.1373/clinchem.2009.132654",
6863
+ key: "giannitsis-hstnt-2010",
6864
+ url: "https://pubmed.ncbi.nlm.nih.gov/19959623/"
6865
+ },
6866
+ "glis-2024": {
6867
+ abnt: "KIRK, B. et al. The conceptual definition of sarcopenia: Delphi consensus from the Global Leadership Initiative in Sarcopenia (GLIS). Age and Ageing, v. 53, n. 3, afae052, 2024.",
6868
+ doi: "10.1093/ageing/afae052",
6869
+ key: "glis-2024",
6870
+ url: "https://pubmed.ncbi.nlm.nih.gov/38520141/"
6871
+ },
6872
+ // ---------------------------------------------------------------------------
6873
+ // Fontes internacionais — Ácidos graxos ômega
6874
+ // ---------------------------------------------------------------------------
6875
+ "harris-omega3-2004": {
6876
+ abnt: "HARRIS, W. S.; VON SCHACKY, C. The Omega-3 Index: a new risk factor for death from coronary heart disease? Preventive Medicine, v. 39, n. 1, p. 212-220, 2004.",
6877
+ doi: "10.1016/j.ypmed.2004.02.030",
6878
+ key: "harris-omega3-2004",
6879
+ url: "https://pubmed.ncbi.nlm.nih.gov/15208005/"
6880
+ },
6881
+ // ---------------------------------------------------------------------------
6882
+ // Referência laboratorial geral
6883
+ // ---------------------------------------------------------------------------
6884
+ "kalaria-ck-ri-2026": {
6885
+ abnt: "KALARIA, T. et al. Age, sex and ethnicity changes in creatine kinase and sex- and ethnicity-specific reference intervals of creatine kinase. Clinical Medicine, v. 26, n. 4, p. 100596, 2026.",
6886
+ doi: "10.1016/j.clinme.2026.100596",
6887
+ key: "kalaria-ck-ri-2026",
6888
+ url: "https://pubmed.ncbi.nlm.nih.gov/42142664/"
6889
+ },
6890
+ // ---------------------------------------------------------------------------
6891
+ // Fontes internacionais — Nefrologia
6892
+ // ---------------------------------------------------------------------------
6893
+ "kdigo-ckd-2024": {
6894
+ abnt: "KIDNEY DISEASE: IMPROVING GLOBAL OUTCOMES (KDIGO) CKD Work Group. KDIGO 2024 Clinical Practice Guideline for the Evaluation and Management of Chronic Kidney Disease. Kidney International, v. 105, n. 4S, p. S117-S314, 2024.",
6895
+ doi: "10.1016/j.kint.2023.10.018",
6896
+ key: "kdigo-ckd-2024",
6897
+ url: "https://pubmed.ncbi.nlm.nih.gov/38490803/"
6898
+ },
6899
+ "keller-tni-2013": {
6900
+ abnt: "KELLER, T. et al. Defining a reference population to determine the 99th percentile of a contemporary sensitive cardiac troponin I assay. International Journal of Cardiology, v. 167, n. 4, p. 1423-1429, 2013.",
6901
+ doi: "10.1016/j.ijcard.2012.04.063",
6902
+ key: "keller-tni-2013",
6903
+ url: "https://pubmed.ncbi.nlm.nih.gov/22560907/"
6904
+ },
6905
+ "kelly-dxa-2009": {
6906
+ abnt: "KELLY, T. L. et al. Dual energy X-ray absorptiometry body composition reference values from NHANES. PLoS One, v. 4, n. 9, e7038, 2009.",
6907
+ doi: "10.1371/journal.pone.0007038",
6908
+ key: "kelly-dxa-2009",
6909
+ url: "https://pubmed.ncbi.nlm.nih.gov/19753111/"
6910
+ },
6911
+ "khetarpal-apociii-2016": {
6912
+ abnt: "KHETARPAL, S. A. et al. Why is apolipoprotein CIII emerging as a novel therapeutic target to reduce the burden of cardiovascular disease? Current Atherosclerosis Reports, v. 18, n. 10, p. 59, 2016.",
6913
+ key: "khetarpal-apociii-2016",
6914
+ url: "https://pmc.ncbi.nlm.nih.gov/articles/PMC5018018/"
6915
+ },
6916
+ "klee-bhb-2020": {
6917
+ abnt: "KLEE, P. et al. Test validation, method comparison and reference range for the measurement of \u03B2-hydroxybutyrate in peripheral blood samples. Practical Laboratory Medicine, v. 18, e00146, 2020.",
6918
+ doi: "10.1016/j.plabm.2019.e00146",
6919
+ key: "klee-bhb-2020",
6920
+ url: "https://pmc.ncbi.nlm.nih.gov/articles/PMC6999181/"
6921
+ },
6922
+ "maisel-bnp-2002": {
6923
+ abnt: "MAISEL, A. S. et al. Rapid measurement of B-type natriuretic peptide in the emergency diagnosis of heart failure. New England Journal of Medicine, v. 347, n. 3, p. 161-167, 2002.",
6924
+ doi: "10.1056/NEJMoa020233",
6925
+ key: "maisel-bnp-2002",
6926
+ url: "https://pubmed.ncbi.nlm.nih.gov/12124404/"
6927
+ },
6928
+ "meuwese-mpo-2007": {
6929
+ abnt: "MEUWESE, M. C. et al. Serum myeloperoxidase levels are associated with the future risk of coronary artery disease in apparently healthy individuals: the EPIC-Norfolk Prospective Population Study. Journal of the American College of Cardiology, v. 50, n. 2, p. 159-165, 2007.",
6930
+ doi: "10.1016/j.jacc.2007.03.033",
6931
+ key: "meuwese-mpo-2007",
6932
+ url: "https://pubmed.ncbi.nlm.nih.gov/17616301/"
6933
+ },
6934
+ // ---------------------------------------------------------------------------
6935
+ // Fontes internacionais — Marcadores metabólicos e inflamatórios
6936
+ // ---------------------------------------------------------------------------
6937
+ "nemeth-adma-2017": {
6938
+ abnt: "NEMETH, B. et al. The issue of plasma asymmetric dimethylarginine reference range: a systematic review and meta-analysis. PLoS One, v. 12, n. 5, e0177493, 2017.",
6939
+ doi: "10.1371/journal.pone.0177493",
6940
+ key: "nemeth-adma-2017",
6941
+ url: "https://pubmed.ncbi.nlm.nih.gov/28494019/"
6942
+ },
6943
+ // ---------------------------------------------------------------------------
6944
+ // Fontes brasileiras — Metais pesados (NR-7)
6945
+ // ---------------------------------------------------------------------------
6946
+ "nr7-pcmso-2020": {
6947
+ abnt: "BRASIL. Minist\xE9rio do Trabalho e Emprego. NR-7 \u2014 PCMSO, Quadro 1: Indicadores biol\xF3gicos. Portaria n. 6.734, de 9 de mar\xE7o de 2020. Di\xE1rio Oficial da Uni\xE3o, Bras\xEDlia, 13 mar. 2020.",
6948
+ key: "nr7-pcmso-2020",
6949
+ url: "https://www.gov.br/trabalho-e-emprego/pt-br/assuntos/inspecao-do-trabalho/seguranca-e-saude-no-trabalho/sst-portarias/2022/portaria-no-567-de-10-de-marco-de-2022-alteracoes-na-nr-7.pdf"
6950
+ },
6951
+ "ofenheimer-vat-2020": {
6952
+ abnt: "OFENHEIMER, A. et al. Reference values of body composition parameters and visceral adipose tissue (VAT) by DXA in adults aged 18-81 years: results from the LEAD cohort. European Journal of Clinical Nutrition, v. 74, p. 1181-1191, 2020.",
6953
+ doi: "10.1038/s41430-020-0596-5",
6954
+ key: "ofenheimer-vat-2020",
6955
+ url: "https://pubmed.ncbi.nlm.nih.gov/32123345/"
6956
+ },
6957
+ "pns-bioquimica-2019": {
6958
+ abnt: "SZWARCWALD, C. L. et al. Valores de refer\xEAncia para exames laboratoriais de colesterol, hemoglobina glicosilada e creatinina da popula\xE7\xE3o adulta brasileira. Revista Brasileira de Epidemiologia, v. 22, supl. 2, e190002.supl.2, 2019.",
6959
+ doi: "10.1590/1980-549720190002.supl.2",
6960
+ key: "pns-bioquimica-2019",
6961
+ url: "https://pubmed.ncbi.nlm.nih.gov/31596373/"
6962
+ },
6963
+ // ---------------------------------------------------------------------------
6964
+ // Pesquisa Nacional de Saúde (PNS) — Intervalos de referência brasileiros
6965
+ // ---------------------------------------------------------------------------
6966
+ "pns-hemograma-2019": {
6967
+ abnt: "ROSENFELD, L. G. et al. Valores de refer\xEAncia para exames laboratoriais de hemograma da popula\xE7\xE3o adulta brasileira: Pesquisa Nacional de Sa\xFAde. Revista Brasileira de Epidemiologia, v. 22, supl. 2, e190003.supl.2, 2019.",
6968
+ doi: "10.1590/1980-549720190003.supl.2",
6969
+ key: "pns-hemograma-2019",
6970
+ url: "https://pubmed.ncbi.nlm.nih.gov/31596374/"
6971
+ },
6972
+ "pns-renal-2019": {
6973
+ abnt: "MALTA, D. C. et al. Evaluation of renal function in the Brazilian adult population, according to laboratory criteria from the National Health Survey. Revista Brasileira de Epidemiologia, v. 22, supl. 2, e190010.supl.2, 2019.",
6974
+ doi: "10.1590/1980-549720190010.supl.2",
6975
+ key: "pns-renal-2019",
6976
+ url: "https://pubmed.ncbi.nlm.nih.gov/31596381/"
6977
+ },
6978
+ "rumberger-cac-1999": {
6979
+ abnt: "RUMBERGER, J. A. et al. Electron beam computed tomographic coronary calcium scanning: a review and guidelines for use in asymptomatic persons. Mayo Clinic Proceedings, v. 74, n. 3, p. 243-252, 1999.",
6980
+ doi: "10.4065/74.3.243",
6981
+ key: "rumberger-cac-1999",
6982
+ url: "https://pubmed.ncbi.nlm.nih.gov/10089993/"
6983
+ },
6984
+ "sbc-ic-2018": {
6985
+ abnt: "ROHDE, L. E. P. et al. Diretriz Brasileira de Insufici\xEAncia Card\xEDaca Cr\xF4nica e Aguda. Arquivos Brasileiros de Cardiologia, S\xE3o Paulo, v. 111, n. 3, p. 436-539, set. 2018.",
6986
+ doi: "10.5935/abc.20180190",
6987
+ key: "sbc-ic-2018",
6988
+ url: "https://pubmed.ncbi.nlm.nih.gov/30379264/"
6989
+ },
6990
+ // ---------------------------------------------------------------------------
6991
+ // Sociedade Brasileira de Cardiologia
6992
+ // ---------------------------------------------------------------------------
6993
+ "sbc-lipids-2017": {
6994
+ abnt: "FALUDI, A. A. et al. Atualiza\xE7\xE3o da Diretriz Brasileira de Dislipidemias e Preven\xE7\xE3o da Aterosclerose \u2013 2017. Arquivos Brasileiros de Cardiologia, S\xE3o Paulo, v. 109, n. 2, supl. 1, p. 1-76, ago. 2017.",
6995
+ doi: "10.5935/abc.20170121",
6996
+ key: "sbc-lipids-2017",
6997
+ url: "https://www.scielo.br/j/abc/a/whBsCyzTDzGYJcsBY7YVkWn/?lang=pt"
6998
+ },
6999
+ "sbc-lipids-2025": {
7000
+ abnt: "RACHED, F. H. et al. Diretriz Brasileira de Dislipidemias e Preven\xE7\xE3o da Aterosclerose \u2013 2025. Arquivos Brasileiros de Cardiologia, S\xE3o Paulo, v. 122, n. 9, e20250640, out. 2025.",
7001
+ doi: "10.36660/abc.20250640",
7002
+ key: "sbc-lipids-2025",
7003
+ url: "https://pmc.ncbi.nlm.nih.gov/articles/PMC12674852/"
7004
+ },
7005
+ // ---------------------------------------------------------------------------
7006
+ // Sociedade Brasileira de Diabetes
7007
+ // ---------------------------------------------------------------------------
7008
+ "sbd-diabetes-2024": {
7009
+ // Chave mantida como 'sbd-diabetes-2024' para compatibilidade com
7010
+ // consumidores publicados; a diretriz correspondente é o documento vivo
7011
+ // de diretriz.diabetes.org.br, cuja edição citada quando este registro foi
7012
+ // atualizado é "Edição 2025". Semelhante ao caso de sbpc-ml-2021 abaixo.
7013
+ abnt: "SOCIEDADE BRASILEIRA DE DIABETES (SBD). Diretriz da Sociedade Brasileira de Diabetes \u2014 Edi\xE7\xE3o 2025. S\xE3o Paulo: SBD, 2025.",
7014
+ doi: "10.29327/5660187",
7015
+ isbn: "978-65-272-1932-3",
7016
+ key: "sbd-diabetes-2024",
7017
+ url: "https://diretriz.diabetes.org.br"
7018
+ },
7019
+ // ---------------------------------------------------------------------------
7020
+ // Sociedade Brasileira de Endocrinologia e Metabologia
7021
+ // ---------------------------------------------------------------------------
7022
+ "sbem-thyroid-2013": {
7023
+ abnt: "SGARBI, J. A. et al. Consenso brasileiro para a abordagem cl\xEDnica e tratamento do hipotireoidismo subcl\xEDnico em adultos. Arquivos Brasileiros de Endocrinologia & Metabologia, v. 57, n. 3, p. 166-183, 2013.",
7024
+ doi: "10.1590/S0004-27302013000300003",
7025
+ key: "sbem-thyroid-2013",
7026
+ url: "https://pubmed.ncbi.nlm.nih.gov/23681263/"
7027
+ },
7028
+ "sbem-vitamind-2014": {
7029
+ abnt: "MAEDA, S. S. et al. Recomenda\xE7\xF5es da Sociedade Brasileira de Endocrinologia e Metabologia (SBEM) para o diagn\xF3stico e tratamento da hipovitaminose D. Arquivos Brasileiros de Endocrinologia & Metabologia, v. 58, n. 5, p. 411-433, 2014.",
7030
+ doi: "10.1590/0004-2730000003388",
7031
+ key: "sbem-vitamind-2014",
7032
+ url: "https://pubmed.ncbi.nlm.nih.gov/25166032/"
7033
+ },
7034
+ // ---------------------------------------------------------------------------
7035
+ // Sociedade Brasileira de Patologia Clínica / Medicina Laboratorial
7036
+ // ---------------------------------------------------------------------------
7037
+ "sbpc-ml-2021": {
7038
+ // Chave mantida como 'sbpc-ml-2021' para compatibilidade com consumidores;
7039
+ // a edição autoritativa é de 2020 (verificada na Biblioteca Digital SBPC/ML
7040
+ // em 2026-04-18). Ano na citação ABNT reflete a edição real.
7041
+ abnt: "SOCIEDADE BRASILEIRA DE PATOLOGIA CL\xCDNICA/MEDICINA LABORATORIAL (SBPC/ML). Recomenda\xE7\xF5es da Sociedade Brasileira de Patologia Cl\xEDnica/Medicina Laboratorial (SBPC/ML): Boas Pr\xE1ticas em Laborat\xF3rio Cl\xEDnico. S\xE3o Paulo: SBPC/ML, 2020.",
7042
+ key: "sbpc-ml-2021",
7043
+ url: "https://bibliotecasbpc.org.br/index.php?P=4&C=0.2.443"
7044
+ },
7045
+ "schumann-ifcc-ldh-2002": {
7046
+ abnt: "SCHUMANN, G.; KLAUKE, R. New IFCC reference procedures for the determination of catalytic activity concentrations of five enzymes in serum: preliminary upper reference limits obtained in hospitalized subjects. Clinica Chimica Acta, v. 327, n. 1-2, p. 69-79, 2003.",
7047
+ doi: "10.1016/S0009-8981(02)00341-8",
7048
+ key: "schumann-ifcc-ldh-2002",
7049
+ url: "https://pubmed.ncbi.nlm.nih.gov/12482620/"
7050
+ },
7051
+ "schwedhelm-sdma-2011": {
7052
+ abnt: "SCHWEDHELM, E. et al. Plasma symmetric dimethylarginine reference limits from the Framingham Offspring Cohort. Clinical Chemistry and Laboratory Medicine, v. 49, n. 11, p. 1907-1910, 2011.",
7053
+ doi: "10.1515/CCLM.2011.679",
7054
+ key: "schwedhelm-sdma-2011",
7055
+ url: "https://pubmed.ncbi.nlm.nih.gov/21864208/"
7056
+ },
7057
+ "selhub-homocysteine-1999": {
7058
+ abnt: "SELHUB, J. et al. Serum total homocysteine concentrations in the third National Health and Nutrition Examination Survey (1991-1994): population reference ranges and contribution of vitamin status to high serum concentrations. Annals of Internal Medicine, v. 131, n. 5, p. 331-339, 1999.",
7059
+ doi: "10.7326/0003-4819-131-5-199909070-00003",
7060
+ key: "selhub-homocysteine-1999",
7061
+ url: "https://pubmed.ncbi.nlm.nih.gov/10475885/"
7062
+ },
7063
+ "simopoulos-omega-ratio-2002": {
7064
+ abnt: "SIMOPOULOS, A. P. The importance of the ratio of omega-6/omega-3 essential fatty acids. Biomedicine & Pharmacotherapy, v. 56, n. 8, p. 365-379, 2002.",
7065
+ doi: "10.1016/S0753-3322(02)00253-6",
7066
+ key: "simopoulos-omega-ratio-2002",
7067
+ url: "https://pubmed.ncbi.nlm.nih.gov/12442909/"
7068
+ },
7069
+ // ---------------------------------------------------------------------------
7070
+ // Fontes internacionais — Marcadores tumorais
7071
+ // ---------------------------------------------------------------------------
7072
+ "sturgeon-nacb-2008": {
7073
+ abnt: "STURGEON, C. M. et al. National Academy of Clinical Biochemistry Laboratory Medicine Practice Guidelines for use of tumor markers in testicular, prostate, colorectal, breast, and ovarian cancers. Clinical Chemistry, v. 54, n. 12, p. e11-e79, 2008.",
7074
+ doi: "10.1373/clinchem.2008.105601",
7075
+ key: "sturgeon-nacb-2008",
7076
+ url: "https://pubmed.ncbi.nlm.nih.gov/19042984/"
7077
+ },
7078
+ "tietz-7ed-2015": {
7079
+ abnt: "BURTIS, C. A.; BRUNS, D. E. Tietz Fundamentals of Clinical Chemistry and Molecular Diagnostics. 7. ed. St. Louis: Elsevier Saunders, 2015.",
7080
+ isbn: "978-1-4557-4165-6",
7081
+ key: "tietz-7ed-2015"
7082
+ },
7083
+ "torrissen-omega3-dbs-2025": {
7084
+ abnt: "TORRISSEN, M. et al. Global variations in omega-3 fatty acid status and omega-6:omega-3 ratios: insights from > 500,000 whole-blood dried blood spot samples. Lipids in Health and Disease, v. 24, n. 1, p. 260, 2025.",
7085
+ doi: "10.1186/s12944-025-02676-6",
7086
+ key: "torrissen-omega3-dbs-2025",
7087
+ url: "https://pubmed.ncbi.nlm.nih.gov/40783537/"
7088
+ },
7089
+ // ---------------------------------------------------------------------------
7090
+ // Fontes internacionais — Coagulação
7091
+ // ---------------------------------------------------------------------------
7092
+ "wells-ddimer-2003": {
7093
+ abnt: "WELLS, P. S. et al. Evaluation of D-dimer in the diagnosis of suspected deep-vein thrombosis. New England Journal of Medicine, v. 349, p. 1227-1235, 2003.",
7094
+ doi: "10.1056/NEJMoa023153",
7095
+ key: "wells-ddimer-2003",
7096
+ url: "https://pubmed.ncbi.nlm.nih.gov/14507948/"
7097
+ },
7098
+ // ---------------------------------------------------------------------------
7099
+ // Fontes internacionais — OMS
7100
+ // ---------------------------------------------------------------------------
7101
+ "who-iron-2020": {
7102
+ abnt: "WORLD HEALTH ORGANIZATION. WHO guideline on use of ferritin concentrations to assess iron status in individuals and populations. Geneva: WHO, 2020.",
7103
+ isbn: "978-92-4-000012-4",
7104
+ key: "who-iron-2020",
7105
+ url: "https://www.who.int/publications/i/item/9789240000124"
7106
+ },
7107
+ "who-obesity-2000": {
7108
+ abnt: "WORLD HEALTH ORGANIZATION. Obesity: preventing and managing the global epidemic. WHO Technical Report Series, n. 894. Geneva: WHO, 2000.",
7109
+ isbn: "92-4-120894-5",
7110
+ key: "who-obesity-2000"
7111
+ },
7112
+ "who-osteoporosis-1994": {
7113
+ abnt: "WHO STUDY GROUP. Assessment of fracture risk and its application to screening for postmenopausal osteoporosis. WHO Technical Report Series, n. 843. Geneva: WHO, 1994.",
7114
+ key: "who-osteoporosis-1994",
7115
+ url: "https://pubmed.ncbi.nlm.nih.gov/7941614/"
7116
+ }
7117
+ };
7118
+ function extractSourceKey(source2) {
7119
+ return source2.split(":")[0] ?? source2;
7120
+ }
7121
+
7122
+ // src/cli/commands/source.ts
7123
+ function render(ref) {
7124
+ const linhas = [`Fonte: ${ref.key}`, "", ref.abnt];
7125
+ if (ref.doi) linhas.push("", `DOI: ${ref.doi}`);
7126
+ if (ref.isbn) linhas.push(`ISBN: ${ref.isbn}`);
7127
+ if (ref.url) linhas.push(`URL: ${ref.url}`);
7128
+ return linhas.join("\n");
7129
+ }
7130
+ async function source(args, json) {
7131
+ const { positionals, values } = parseArgs3({
7132
+ allowPositionals: true,
7133
+ args,
7134
+ options: { biomarker: { short: "b", type: "string" } },
7135
+ strict: false
7136
+ });
7137
+ if (values.biomarker) {
7138
+ const code = values.biomarker;
7139
+ if (!getDefinitionByCode(code)) exitWithError(`Biomarcador n\xE3o encontrado: ${code}`);
7140
+ const def = biomarkerRangeDefinitions[code];
7141
+ if (!def?.source) exitWithError(`Sem faixa de refer\xEAncia com fonte para: ${code}`);
7142
+ const chave2 = extractSourceKey(def.source);
7143
+ const ref2 = SOURCE_REGISTRY[chave2];
7144
+ if (!ref2) exitWithError(`Fonte n\xE3o encontrada no registro: ${chave2}`);
7145
+ if (json) outputJson(ref2);
7146
+ else outputText(render(ref2));
7147
+ return;
7148
+ }
7149
+ const chave = positionals[0];
7150
+ if (!chave) {
7151
+ const todas = Object.values(SOURCE_REGISTRY).sort((a, b) => a.key.localeCompare(b.key));
7152
+ if (json) {
7153
+ outputJson(todas);
7154
+ return;
7155
+ }
7156
+ outputText(
7157
+ [
7158
+ `Fontes no registro: ${todas.length}`,
7159
+ "",
7160
+ ...todas.map((r) => ` ${r.key.padEnd(28)} ${r.abnt.slice(0, 60)}\u2026`),
7161
+ "",
7162
+ "Detalhe de uma: fhir-bio source <chave>",
7163
+ "A partir do exame: fhir-bio source --biomarker TSH"
7164
+ ].join("\n")
7165
+ );
7166
+ return;
7167
+ }
7168
+ const limpa = extractSourceKey(chave);
7169
+ const ref = SOURCE_REGISTRY[limpa];
7170
+ if (!ref) {
7171
+ const alvo = limpa === chave ? chave : `${chave} (procurado como ${limpa})`;
7172
+ exitWithError(`Fonte n\xE3o encontrada: ${alvo}
7173
+ Veja a lista com: fhir-bio source`);
7174
+ }
7175
+ if (json) outputJson(ref);
7176
+ else outputText(render(ref));
7177
+ }
7178
+
6747
7179
  // src/cli/commands/units.ts
6748
7180
  async function units(args, json) {
6749
7181
  const code = args[0];
@@ -6803,6 +7235,7 @@ Comandos:
6803
7235
  list Listar todos os biomarcadores
6804
7236
  categories Listar biomarcadores agrupados por categoria
6805
7237
  range <c\xF3digo> Faixa de refer\xEAncia para um biomarcador
7238
+ source [chave] Cita\xE7\xE3o de uma fonte, ou a lista toda
6806
7239
  units <c\xF3digo> Informa\xE7\xF5es de unidade de um biomarcador
6807
7240
  convert <arquivo> Converter dados lab (JSON) para FHIR Bundle
6808
7241
  validate <arquivo> Validar recurso FHIR (Bundle, Observation ou DiagnosticReport)
@@ -6823,26 +7256,18 @@ var COMMANDS = {
6823
7256
  lookup,
6824
7257
  "lookup-loinc": lookupLoinc,
6825
7258
  range,
7259
+ source,
6826
7260
  units,
6827
7261
  validate
6828
7262
  };
6829
7263
  async function main() {
6830
- const { positionals, values } = parseArgs3({
6831
- allowPositionals: true,
6832
- options: {
6833
- help: { default: false, short: "h", type: "boolean" },
6834
- json: { default: false, type: "boolean" },
6835
- version: { default: false, short: "v", type: "boolean" }
6836
- },
6837
- strict: false
6838
- });
6839
- if (values.version) {
6840
- process.stdout.write(`${"0.31.5"}
7264
+ const { command, help, json, resto, version } = dividirArgv(process.argv.slice(2));
7265
+ if (version) {
7266
+ process.stdout.write(`${"0.32.0"}
6841
7267
  `);
6842
7268
  return;
6843
7269
  }
6844
- const [command, ...rest] = positionals;
6845
- if (values.help || !command) {
7270
+ if (help || !command) {
6846
7271
  process.stdout.write(HELP);
6847
7272
  return;
6848
7273
  }
@@ -6851,6 +7276,6 @@ async function main() {
6851
7276
  exitWithError(`Comando desconhecido: ${command}
6852
7277
  Use --help para ver os comandos dispon\xEDveis.`);
6853
7278
  }
6854
- await handler(rest, Boolean(values.json));
7279
+ await handler(resto, json);
6855
7280
  }
6856
7281
  main().catch((err) => exitWithError(err.message));
@@ -3,14 +3,14 @@
3
3
 
4
4
 
5
5
 
6
- var _chunkEXOKBY6Dcjs = require('./chunk-EXOKBY6D.cjs');
6
+ var _chunkOTVCOSCKcjs = require('./chunk-OTVCOSCK.cjs');
7
7
  require('./chunk-OR67NJDZ.cjs');
8
- require('./chunk-QOXTLPQ2.cjs');
8
+ require('./chunk-MKH4Q735.cjs');
9
9
  require('./chunk-AZTZYOAV.cjs');
10
10
 
11
11
 
12
12
 
13
13
 
14
14
 
15
- exports.labObservationToFHIR = _chunkEXOKBY6Dcjs.labObservationToFHIR; exports.labReportToFHIR = _chunkEXOKBY6Dcjs.labReportToFHIR; exports.labResultToFHIRBundle = _chunkEXOKBY6Dcjs.labResultToFHIRBundle; exports.userProfileToFHIR = _chunkEXOKBY6Dcjs.userProfileToFHIR;
15
+ exports.labObservationToFHIR = _chunkOTVCOSCKcjs.labObservationToFHIR; exports.labReportToFHIR = _chunkOTVCOSCKcjs.labReportToFHIR; exports.labResultToFHIRBundle = _chunkOTVCOSCKcjs.labResultToFHIRBundle; exports.userProfileToFHIR = _chunkOTVCOSCKcjs.userProfileToFHIR;
16
16
  //# sourceMappingURL=converter.cjs.map
package/dist/converter.js CHANGED
@@ -3,9 +3,9 @@ import {
3
3
  labReportToFHIR,
4
4
  labResultToFHIRBundle,
5
5
  userProfileToFHIR
6
- } from "./chunk-6OG25HIE.js";
6
+ } from "./chunk-MNUQ57JR.js";
7
7
  import "./chunk-A6HR4XDK.js";
8
- import "./chunk-PK5DQMPC.js";
8
+ import "./chunk-WDDW2WCY.js";
9
9
  import "./chunk-3XIMPALK.js";
10
10
  export {
11
11
  labObservationToFHIR,
package/dist/importer.cjs CHANGED
@@ -4,15 +4,15 @@
4
4
 
5
5
 
6
6
 
7
- var _chunkSDKLR3DTcjs = require('./chunk-SDKLR3DT.cjs');
8
- require('./chunk-OR67NJDZ.cjs');
9
- require('./chunk-QOXTLPQ2.cjs');
7
+ var _chunk44QMNDOIcjs = require('./chunk-44QMNDOI.cjs');
10
8
  require('./chunk-3ILBFLVQ.cjs');
9
+ require('./chunk-OR67NJDZ.cjs');
10
+ require('./chunk-MKH4Q735.cjs');
11
11
 
12
12
 
13
13
 
14
14
 
15
15
 
16
16
 
17
- exports.MAX_FILE_SIZE = _chunkSDKLR3DTcjs.MAX_FILE_SIZE; exports.MAX_OBSERVATIONS = _chunkSDKLR3DTcjs.MAX_OBSERVATIONS; exports.extractObservationsFromBundle = _chunkSDKLR3DTcjs.extractObservationsFromBundle; exports.mapFHIRObservationToInternal = _chunkSDKLR3DTcjs.mapFHIRObservationToInternal; exports.processImportBundle = _chunkSDKLR3DTcjs.processImportBundle;
17
+ exports.MAX_FILE_SIZE = _chunk44QMNDOIcjs.MAX_FILE_SIZE; exports.MAX_OBSERVATIONS = _chunk44QMNDOIcjs.MAX_OBSERVATIONS; exports.extractObservationsFromBundle = _chunk44QMNDOIcjs.extractObservationsFromBundle; exports.mapFHIRObservationToInternal = _chunk44QMNDOIcjs.mapFHIRObservationToInternal; exports.processImportBundle = _chunk44QMNDOIcjs.processImportBundle;
18
18
  //# sourceMappingURL=importer.cjs.map
package/dist/importer.js CHANGED
@@ -4,10 +4,10 @@ import {
4
4
  extractObservationsFromBundle,
5
5
  mapFHIRObservationToInternal,
6
6
  processImportBundle
7
- } from "./chunk-RM7KJAVA.js";
8
- import "./chunk-A6HR4XDK.js";
9
- import "./chunk-PK5DQMPC.js";
7
+ } from "./chunk-4Y43MQQK.js";
10
8
  import "./chunk-N3ZCOLG2.js";
9
+ import "./chunk-A6HR4XDK.js";
10
+ import "./chunk-WDDW2WCY.js";
11
11
  export {
12
12
  MAX_FILE_SIZE,
13
13
  MAX_OBSERVATIONS,