@precisa-saude/fhir 0.10.0 → 0.10.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.
@@ -4,9 +4,6 @@ import {
4
4
 
5
5
  // src/reference-ranges.ts
6
6
  var biomarkerRangeDefinitions = {
7
- // =============================================================================
8
- // LIPIDS
9
- // =============================================================================
10
7
  Albumin_Creatinine_Ratio: {
11
8
  default: { max: 30, min: 0, optimalMax: 20, optimalMin: 0, unit: "mg/g" },
12
9
  source: "tietz-7ed-2015"
@@ -135,9 +132,6 @@ var biomarkerRangeDefinitions = {
135
132
  ApoCIII_ApoA1_Ratio: {
136
133
  default: { max: 0.15, min: 0, optimalMax: 0.1, optimalMin: 0, unit: "" }
137
134
  },
138
- // =============================================================================
139
- // THYROID
140
- // =============================================================================
141
135
  Omega6_AA: {
142
136
  default: { max: 15, min: 5, optimalMax: 12, optimalMin: 7, unit: "%" },
143
137
  source: "simopoulos-omega-ratio-2002"
@@ -175,9 +169,6 @@ var biomarkerRangeDefinitions = {
175
169
  default: { max: 0.1, min: 0, optimalMax: 0.05, optimalMin: 0, unit: "K/uL" },
176
170
  source: "pns-hemograma-2019"
177
171
  },
178
- // =============================================================================
179
- // HEMATOLOGY - CBC
180
- // =============================================================================
181
172
  Bicarbonate: {
182
173
  default: { max: 29, min: 23, optimalMax: 28, optimalMin: 24, unit: "mEq/L" },
183
174
  source: "tietz-7ed-2015"
@@ -312,13 +303,28 @@ var biomarkerRangeDefinitions = {
312
303
  source: "tietz-7ed-2015"
313
304
  },
314
305
  CPeptide: {
315
- default: { max: 3.9, min: 0.8, optimalMax: 3, optimalMin: 1, unit: "ng/mL" },
306
+ default: {
307
+ fastingRequired: "strict",
308
+ max: 3.9,
309
+ min: 0.8,
310
+ optimalMax: 3,
311
+ optimalMin: 1,
312
+ unit: "ng/mL"
313
+ },
316
314
  source: "tietz-7ed-2015"
317
315
  },
318
316
  Creatinine: {
319
317
  default: { max: 1.2, min: 0.6, optimalMax: 1, optimalMin: 0.7, unit: "mg/dL" },
320
318
  source: "pns-bioquimica-2019",
321
319
  variants: [
320
+ // Gestação: hiperfiltração glomerular (↑ 40–50% GFR) reduz a creatinina
321
+ // sérica. Valores "normais" de não-gestante podem sinalizar disfunção
322
+ // renal em gestante. Limites tipicamente citados: 0.4–0.8 mg/dL.
323
+ {
324
+ pregnant: true,
325
+ range: { max: 0.8, min: 0.4, optimalMax: 0.7, optimalMin: 0.5, unit: "mg/dL" },
326
+ sex: "F"
327
+ },
322
328
  {
323
329
  ageMin: 18,
324
330
  range: { max: 1.3, min: 0.7, optimalMax: 1.1, optimalMin: 0.8, unit: "mg/dL" },
@@ -345,9 +351,6 @@ var biomarkerRangeDefinitions = {
345
351
  default: { max: 500, min: 0, optimalMax: 250, optimalMin: 0, unit: "ng/mL" },
346
352
  source: "wells-ddimer-2003"
347
353
  },
348
- // =============================================================================
349
- // METABOLIC PANEL
350
- // =============================================================================
351
354
  Omega3_DHA: {
352
355
  default: { max: 8, min: 2, optimalMax: 6.5, optimalMin: 3.5, unit: "%" },
353
356
  source: "harris-omega3-2004"
@@ -454,10 +457,24 @@ var biomarkerRangeDefinitions = {
454
457
  default: { max: 86, min: 0, optimalMax: 60, optimalMin: 0, unit: "pg/mL" },
455
458
  source: "tietz-7ed-2015"
456
459
  },
460
+ // Ferritina — WHO 2020 é o documento de referência específico para avaliação
461
+ // do status de ferro via ferritina. Importante: inflamação aguda eleva
462
+ // ferritina (proteína de fase aguda); WHO 2020 recomenda dosagem concomitante
463
+ // de PCR para interpretação em contexto inflamatório (fora do escopo deste
464
+ // tipo de faixa, mas documentado aqui para consumidores).
457
465
  Ferritin: {
458
466
  default: { max: 150, min: 12, optimalMax: 120, optimalMin: 30, unit: "ng/mL" },
459
- source: "tietz-7ed-2015",
467
+ source: "who-iron-2020",
460
468
  variants: [
469
+ // Gestação: ferritina cai fisiologicamente no 2º/3º trimestre pela expansão
470
+ // do volume plasmático e maior demanda fetal. WHO 2020: <15 ng/mL sugere
471
+ // depleção; muitas diretrizes nacionais usam <30 como gatilho mais sensível
472
+ // na gestação dada a alta prevalência de deficiência subclínica.
473
+ {
474
+ pregnant: true,
475
+ range: { max: 120, min: 15, optimalMax: 80, optimalMin: 30, unit: "ng/mL" },
476
+ sex: "F"
477
+ },
461
478
  {
462
479
  ageMin: 18,
463
480
  range: { max: 250, min: 20, optimalMax: 200, optimalMin: 40, unit: "ng/mL" },
@@ -485,9 +502,6 @@ var biomarkerRangeDefinitions = {
485
502
  default: { max: 20, min: 3, optimalMax: 15, optimalMin: 5, unit: "ng/mL" },
486
503
  source: "tietz-7ed-2015"
487
504
  },
488
- // =============================================================================
489
- // LIVER FUNCTION
490
- // =============================================================================
491
505
  FSH: {
492
506
  default: { max: 12.4, min: 1.5, optimalMax: 10, optimalMin: 3, unit: "mIU/mL" },
493
507
  source: "tietz-7ed-2015",
@@ -535,9 +549,38 @@ var biomarkerRangeDefinitions = {
535
549
  default: { max: 3.5, min: 2, optimalMax: 3.2, optimalMin: 2.3, unit: "g/dL" },
536
550
  source: "tietz-7ed-2015"
537
551
  },
552
+ // Glicemia de jejum — 70–99 mg/dL é a faixa de normalidade (SBD 2024, ADA);
553
+ // hipoglicemia clinicamente acionável em não-diabético é <54 mg/dL (Level 2
554
+ // ADA/SBD), não 70. O corte 70 era Level 1 (alerta em diabético em tratamento)
555
+ // e gerava falsos "abaixo do normal" em indivíduos saudáveis cuja glicemia
556
+ // em jejum está fisiologicamente entre 54–70. optimalMin preserva o alvo.
538
557
  Glucose: {
539
- default: { max: 100, min: 70, optimalMax: 90, optimalMin: 70, unit: "mg/dL" },
540
- source: "sbd-diabetes-2024"
558
+ default: {
559
+ fastingRequired: "strict",
560
+ max: 100,
561
+ min: 54,
562
+ optimalMax: 90,
563
+ optimalMin: 70,
564
+ unit: "mg/dL"
565
+ },
566
+ source: "sbd-diabetes-2024",
567
+ variants: [
568
+ // Gestação: DMG (IADPSG/SBD 2024) usa cortes mais restritivos na glicemia
569
+ // de jejum — ≥92 mg/dL já indica diabetes mellitus gestacional. Portanto
570
+ // a faixa "normal" em gestante vai até 91 mg/dL no jejum.
571
+ {
572
+ pregnant: true,
573
+ range: {
574
+ fastingRequired: "strict",
575
+ max: 91,
576
+ min: 54,
577
+ optimalMax: 85,
578
+ optimalMin: 70,
579
+ unit: "mg/dL"
580
+ },
581
+ sex: "F"
582
+ }
583
+ ]
541
584
  },
542
585
  GlycoMark: {
543
586
  default: { max: 40, min: 10, optimalMax: 35, optimalMin: 15, unit: "mcg/mL" },
@@ -547,8 +590,14 @@ var biomarkerRangeDefinitions = {
547
590
  default: { max: 5, min: 0, optimalMax: 3, optimalMin: 0, unit: "ng/mL" },
548
591
  source: "tietz-7ed-2015"
549
592
  },
593
+ // HbA1c — SBD 2024 não estabelece piso de referência clinicamente acionável.
594
+ // Valores <4.0% podem refletir anemia hemolítica, perda sanguínea recente ou
595
+ // hemoglobinopatia, não patologia do metabolismo glicêmico. Usamos min=2 como
596
+ // piso de sanidade (HbA1c <2% é quase sempre erro instrumental/entrada) sem
597
+ // criar flag clínico em valores fisiologicamente baixos. optimalMin preserva
598
+ // o alvo fisiológico da fração glicada.
550
599
  HbA1c: {
551
- default: { max: 5.7, min: 4, optimalMax: 5.3, optimalMin: 4.5, unit: "%" },
600
+ default: { max: 5.7, min: 2, optimalMax: 5.3, optimalMin: 4.5, unit: "%" },
552
601
  source: "sbd-diabetes-2024"
553
602
  },
554
603
  Hct: {
@@ -591,13 +640,37 @@ var biomarkerRangeDefinitions = {
591
640
  direction: "higher-better",
592
641
  source: "caulfield-ionmobility-2008"
593
642
  },
594
- // =============================================================================
595
- // INFLAMMATION
596
- // =============================================================================
597
643
  Hgb: {
598
644
  default: { max: 17.5, min: 12, optimalMax: 16, optimalMin: 13.5, unit: "g/dL" },
599
645
  source: "pns-hemograma-2019",
600
646
  variants: [
647
+ // Gestação: hemodiluição fisiológica reduz o piso aceitável.
648
+ // OMS e CDC: anemia gestacional quando Hgb <11 g/dL (1º e 3º tri) ou
649
+ // <10.5 g/dL (2º tri, dilucional mais acentuada). Catch-all adota a
650
+ // faixa mais conservadora (2º tri) quando trimestre é desconhecido.
651
+ {
652
+ pregnant: true,
653
+ pregnancyTrimester: 1,
654
+ range: { max: 14, min: 11, optimalMax: 13, optimalMin: 11.5, unit: "g/dL" },
655
+ sex: "F"
656
+ },
657
+ {
658
+ pregnant: true,
659
+ pregnancyTrimester: 2,
660
+ range: { max: 14, min: 10.5, optimalMax: 13, optimalMin: 11, unit: "g/dL" },
661
+ sex: "F"
662
+ },
663
+ {
664
+ pregnant: true,
665
+ pregnancyTrimester: 3,
666
+ range: { max: 14, min: 11, optimalMax: 13, optimalMin: 11.5, unit: "g/dL" },
667
+ sex: "F"
668
+ },
669
+ {
670
+ pregnant: true,
671
+ range: { max: 14, min: 10.5, optimalMax: 13, optimalMin: 11, unit: "g/dL" },
672
+ sex: "F"
673
+ },
601
674
  {
602
675
  ageMin: 18,
603
676
  range: { max: 17.5, min: 13.5, optimalMax: 16.5, optimalMin: 14, unit: "g/dL" },
@@ -610,10 +683,20 @@ var biomarkerRangeDefinitions = {
610
683
  }
611
684
  ]
612
685
  },
686
+ // HOMA-IR — corte 2.71 do estudo BRAMS (Geloneze et al., 2009) validado em
687
+ // população urbana brasileira; Tietz 7ª ed. não publica corte próprio de
688
+ // HOMA-IR, então a fonte anterior era citação inadequada.
613
689
  HOMA_IR: {
614
- default: { max: 2.5, min: 0, optimalMax: 1.5, optimalMin: 0, unit: "" },
690
+ default: {
691
+ fastingRequired: "strict",
692
+ max: 2.71,
693
+ min: 0,
694
+ optimalMax: 1.5,
695
+ optimalMin: 0,
696
+ unit: ""
697
+ },
615
698
  direction: "lower-better",
616
- source: "tietz-7ed-2015"
699
+ source: "geloneze-brams-2009"
617
700
  },
618
701
  Homocysteine: {
619
702
  default: { max: 15, min: 4, optimalMax: 10, optimalMin: 5, unit: "umol/L" },
@@ -624,15 +707,19 @@ var biomarkerRangeDefinitions = {
624
707
  default: { max: 350, min: 100, optimalMax: 300, optimalMin: 150, unit: "ng/mL" },
625
708
  source: "tietz-7ed-2015"
626
709
  },
627
- // =============================================================================
628
- // METABOLIC
629
- // =============================================================================
630
710
  ImmatureGranulocytes: {
631
711
  default: { max: 1, min: 0, optimalMax: 0.5, optimalMin: 0, unit: "%" },
632
712
  source: "tietz-7ed-2015"
633
713
  },
634
714
  Insulin: {
635
- default: { max: 25, min: 2, optimalMax: 8, optimalMin: 3, unit: "\xB5IU/mL" },
715
+ default: {
716
+ fastingRequired: "strict",
717
+ max: 25,
718
+ min: 2,
719
+ optimalMax: 8,
720
+ optimalMin: 3,
721
+ unit: "\xB5IU/mL"
722
+ },
636
723
  source: "tietz-7ed-2015"
637
724
  },
638
725
  Iron: {
@@ -681,9 +768,6 @@ var biomarkerRangeDefinitions = {
681
768
  direction: "higher-better",
682
769
  source: "caulfield-ionmobility-2008"
683
770
  },
684
- // =============================================================================
685
- // IRON STUDIES
686
- // =============================================================================
687
771
  LDL_Small: {
688
772
  // LDL Small (LDL Pequena): lower is better (small dense LDL is most atherogenic)
689
773
  // Quest Ion Mobility reference: Male 123-441, Female 126-382 nmol/L, optimal <142
@@ -738,9 +822,6 @@ var biomarkerRangeDefinitions = {
738
822
  default: { max: 35, min: 15, optimalMax: 28, optimalMin: 18, unit: "%" },
739
823
  source: "simopoulos-omega-ratio-2002"
740
824
  },
741
- // =============================================================================
742
- // VITAMINS
743
- // =============================================================================
744
825
  Lipoprotein_a: {
745
826
  default: { max: 75, min: 0, optimalMax: 30, optimalMin: 0, unit: "nmol/L" },
746
827
  direction: "lower-better",
@@ -782,9 +863,6 @@ var biomarkerRangeDefinitions = {
782
863
  default: { max: 30, min: 0, optimalMax: 20, optimalMin: 0, unit: "mg/L" },
783
864
  source: "kdigo-ckd-2024"
784
865
  },
785
- // =============================================================================
786
- // HORMONES
787
- // =============================================================================
788
866
  MMA: {
789
867
  default: { max: 378, min: 0, optimalMax: 270, optimalMin: 0, unit: "nmol/L" },
790
868
  source: "tietz-7ed-2015"
@@ -850,9 +928,6 @@ var biomarkerRangeDefinitions = {
850
928
  direction: "lower-better",
851
929
  source: "simopoulos-omega-ratio-2002"
852
930
  },
853
- // =============================================================================
854
- // TUMOR MARKERS
855
- // =============================================================================
856
931
  OmegaCheck: {
857
932
  default: { max: 8, min: 4, optimalMax: 8, optimalMin: 5.5, unit: "%" },
858
933
  source: "harris-omega3-2004"
@@ -873,9 +948,6 @@ var biomarkerRangeDefinitions = {
873
948
  default: { max: 5, min: 3.5, optimalMax: 4.6, optimalMin: 3.8, unit: "mEq/L" },
874
949
  source: "tietz-7ed-2015"
875
950
  },
876
- // =============================================================================
877
- // CARDIAC MARKERS
878
- // =============================================================================
879
951
  Prealbumin: {
880
952
  default: { max: 38, min: 18, optimalMax: 35, optimalMin: 20, unit: "mg/dL" },
881
953
  source: "tietz-7ed-2015"
@@ -945,9 +1017,6 @@ var biomarkerRangeDefinitions = {
945
1017
  }
946
1018
  ]
947
1019
  },
948
- // =============================================================================
949
- // URINALYSIS
950
- // =============================================================================
951
1020
  RDW: {
952
1021
  default: { max: 14.5, min: 11.5, optimalMax: 14, optimalMin: 12, unit: "%" },
953
1022
  source: "pns-hemograma-2019"
@@ -984,9 +1053,6 @@ var biomarkerRangeDefinitions = {
984
1053
  default: { max: 145, min: 136, optimalMax: 143, optimalMin: 138, unit: "mEq/L" },
985
1054
  source: "tietz-7ed-2015"
986
1055
  },
987
- // =============================================================================
988
- // KIDNEY FUNCTION
989
- // =============================================================================
990
1056
  SpecificGravity_Urine: {
991
1057
  default: { max: 1.03, min: 1.005, optimalMax: 1.025, optimalMin: 1.01, unit: "SG" },
992
1058
  source: "tietz-7ed-2015"
@@ -999,9 +1065,6 @@ var biomarkerRangeDefinitions = {
999
1065
  default: { max: 4.2, min: 2.3, optimalMax: 3.8, optimalMin: 2.8, unit: "pg/mL" },
1000
1066
  source: "tietz-7ed-2015"
1001
1067
  },
1002
- // =============================================================================
1003
- // OMEGA FATTY ACIDS
1004
- // =============================================================================
1005
1068
  T3Reverse: {
1006
1069
  default: { max: 24, min: 10, optimalMax: 20, optimalMin: 12, unit: "ng/dL" },
1007
1070
  source: "tietz-7ed-2015"
@@ -1096,8 +1159,18 @@ var biomarkerRangeDefinitions = {
1096
1159
  }
1097
1160
  ]
1098
1161
  },
1162
+ // Triglicérides — SBC 2017/2025 permite dosagem não-jejum com corte distinto
1163
+ // (<175 mg/dL pós-prandial). Marcamos `preferred` para indicar que a faixa
1164
+ // padrão é de jejum, mas não bloqueamos interpretação em não-jejum.
1099
1165
  Triglycerides: {
1100
- default: { max: 150, min: 0, optimalMax: 100, optimalMin: 0, unit: "mg/dL" },
1166
+ default: {
1167
+ fastingRequired: "preferred",
1168
+ max: 150,
1169
+ min: 0,
1170
+ optimalMax: 100,
1171
+ optimalMin: 0,
1172
+ unit: "mg/dL"
1173
+ },
1101
1174
  direction: "lower-better",
1102
1175
  source: "sbc-lipids-2025"
1103
1176
  },
@@ -1111,10 +1184,47 @@ var biomarkerRangeDefinitions = {
1111
1184
  default: { max: 14, min: 0, optimalMax: 10, optimalMin: 0, unit: "ng/L" },
1112
1185
  source: "giannitsis-hstnt-2010"
1113
1186
  },
1187
+ // TSH — 0.4–4.0 é a faixa de referência adulta geral. O alvo 2.5 µIU/mL é
1188
+ // específico do 1º trimestre gestacional (ATA 2017) e não se aplica a
1189
+ // não-gestantes; optimalMax=3.0 reflete o limite superior do tercil "ótimo"
1190
+ // sem invadir a faixa subclínica. Variante ageMin=65 mantém limite superior
1191
+ // expandido (tolerância fisiológica do eixo em idosos, SBEM 2013).
1114
1192
  TSH: {
1115
- default: { max: 4, min: 0.4, optimalMax: 2.5, optimalMin: 1, unit: "\xB5IU/mL" },
1193
+ default: { max: 4, min: 0.4, optimalMax: 3, optimalMin: 1, unit: "\xB5IU/mL" },
1116
1194
  source: "sbem-thyroid-2013",
1117
1195
  variants: [
1196
+ // Variantes gestacionais (ATA 2017 / SBEM): supressão fisiológica por hCG
1197
+ // no 1º trimestre, recuperação progressiva no 2º/3º. Trimestre-específicas
1198
+ // precedem a catch-all; catch-all cobre contexto gestante sem trimestre
1199
+ // conhecido.
1200
+ // optimalMin/optimalMax definem subfaixa "alvo" mais estreita que o
1201
+ // intervalo de referência — ex.: 1º tri aceita 0.1–2.5, mas o alvo
1202
+ // terapêutico é 0.5–2.5.
1203
+ {
1204
+ pregnant: true,
1205
+ pregnancyTrimester: 1,
1206
+ range: { max: 2.5, min: 0.1, optimalMax: 2, optimalMin: 0.5, unit: "\xB5IU/mL" },
1207
+ sex: "F"
1208
+ },
1209
+ {
1210
+ pregnant: true,
1211
+ pregnancyTrimester: 2,
1212
+ range: { max: 3, min: 0.2, optimalMax: 2.5, optimalMin: 0.5, unit: "\xB5IU/mL" },
1213
+ sex: "F"
1214
+ },
1215
+ {
1216
+ pregnant: true,
1217
+ pregnancyTrimester: 3,
1218
+ range: { max: 3, min: 0.3, optimalMax: 2.5, optimalMin: 0.5, unit: "\xB5IU/mL" },
1219
+ sex: "F"
1220
+ },
1221
+ // Catch-all gestacional — usada quando o trimestre não é informado.
1222
+ // Adota a faixa mais conservadora (2º/3º trimestre: 0.2–3.0).
1223
+ {
1224
+ pregnant: true,
1225
+ range: { max: 3, min: 0.2, optimalMax: 2.5, optimalMin: 0.5, unit: "\xB5IU/mL" },
1226
+ sex: "F"
1227
+ },
1118
1228
  {
1119
1229
  ageMin: 65,
1120
1230
  range: { max: 6, min: 0.4, optimalMax: 4, optimalMin: 1, unit: "\xB5IU/mL" },
@@ -1146,9 +1256,6 @@ var biomarkerRangeDefinitions = {
1146
1256
  default: { max: 1, min: 0.1, optimalMax: 1, optimalMin: 0.1, unit: "mg/dL" },
1147
1257
  source: "tietz-7ed-2015"
1148
1258
  },
1149
- // =============================================================================
1150
- // ADVANCED CARDIOVASCULAR
1151
- // =============================================================================
1152
1259
  pH_Urine: {
1153
1260
  default: { max: 8, min: 4.5, optimalMax: 7, optimalMin: 5.5, unit: "pH" },
1154
1261
  source: "tietz-7ed-2015"
@@ -1177,9 +1284,6 @@ var biomarkerRangeDefinitions = {
1177
1284
  default: { max: 100, min: 20, optimalMax: 80, optimalMin: 30, unit: "mcg/dL" },
1178
1285
  source: "tietz-7ed-2015"
1179
1286
  },
1180
- // =============================================================================
1181
- // MINERALS
1182
- // =============================================================================
1183
1287
  VitaminB1: {
1184
1288
  default: { max: 180, min: 70, optimalMax: 150, optimalMin: 80, unit: "nmol/L" },
1185
1289
  source: "tietz-7ed-2015"
@@ -1196,12 +1300,28 @@ var biomarkerRangeDefinitions = {
1196
1300
  default: { max: 2, min: 0.4, optimalMax: 1.5, optimalMin: 0.6, unit: "mg/dL" },
1197
1301
  source: "tietz-7ed-2015"
1198
1302
  },
1199
- // =============================================================================
1200
- // HEAVY METALS
1201
- // =============================================================================
1303
+ // Vitamina D — posicionamento conjunto SBEM/SBPC-ML 2017:
1304
+ // ≥20 ng/mL é desejável para população saudável <60 anos
1305
+ // ≥30 ng/mL é recomendado para grupos de risco (idosos, gestantes, DRC,
1306
+ // osteoporose, hiperparatireoidismo secundário).
1307
+ // A variante ageMin=60 cobre idosos. Gestação, doença renal crônica,
1308
+ // osteoporose e hiperparatireoidismo secundário também exigem min=30;
1309
+ // o tipo `BiomarkerReferenceRange` atual não expressa esses contextos
1310
+ // clínicos além de gestação e idade, portanto consumidores devem aplicar
1311
+ // o limiar ≥30 nessas populações quando souberem a comorbidade. Gestação
1312
+ // será modelada quando `pregnant: true` — aceita-se TODO até lá.
1313
+ // TODO(PR-vitd-pregnancy): adicionar variante `pregnant: true` com min=30
1314
+ // quando a modelagem de comorbidades chegar ao schema.
1202
1315
  VitaminD: {
1203
- default: { max: 100, min: 30, optimalMax: 70, optimalMin: 40, unit: "ng/mL" },
1204
- source: "sbem-vitamind-2014"
1316
+ default: { max: 100, min: 20, optimalMax: 70, optimalMin: 40, unit: "ng/mL" },
1317
+ source: "ferreira-vitd-2017",
1318
+ variants: [
1319
+ {
1320
+ ageMin: 60,
1321
+ range: { max: 100, min: 30, optimalMax: 70, optimalMin: 40, unit: "ng/mL" },
1322
+ sex: "all"
1323
+ }
1324
+ ]
1205
1325
  },
1206
1326
  VitaminD_1_25: {
1207
1327
  default: { max: 72, min: 18, optimalMax: 60, optimalMin: 25, unit: "pg/mL" },
@@ -1211,14 +1331,15 @@ var biomarkerRangeDefinitions = {
1211
1331
  default: { max: 17, min: 5.5, optimalMax: 14, optimalMin: 7, unit: "mg/L" },
1212
1332
  source: "tietz-7ed-2015"
1213
1333
  },
1214
- // VLDL: estimado via fórmula de Friedewald (TG/5)
1334
+ // VLDL estimado clinicamente via TG/5 (método Friedewald). O corte de
1335
+ // referência deriva de triglicérides <150 mg/dL (SBC 2025, dislipidemias),
1336
+ // portanto VLDL <30. Friedewald-1972 permanece registrada como fonte do
1337
+ // método de cálculo, mas a faixa de referência tem respaldo na diretriz
1338
+ // SBC 2025.
1215
1339
  VLDL: {
1216
1340
  default: { max: 30, min: 2, optimalMax: 20, optimalMin: 5, unit: "mg/dL" },
1217
- source: "friedewald-1972"
1341
+ source: "sbc-lipids-2025"
1218
1342
  },
1219
- // =============================================================================
1220
- // OTHER
1221
- // =============================================================================
1222
1343
  WBC: {
1223
1344
  default: { max: 11, min: 4, optimalMax: 8, optimalMin: 5, unit: "K/uL" },
1224
1345
  source: "pns-hemograma-2019"
@@ -1227,9 +1348,6 @@ var biomarkerRangeDefinitions = {
1227
1348
  default: { max: 120, min: 60, optimalMax: 100, optimalMin: 70, unit: "mcg/dL" },
1228
1349
  source: "tietz-7ed-2015"
1229
1350
  },
1230
- // =============================================================================
1231
- // BODY COMPOSITION (DXA)
1232
- // =============================================================================
1233
1351
  AndroidFatPct: {
1234
1352
  default: { max: 35, min: 10, optimalMax: 25, optimalMin: 15, unit: "%" },
1235
1353
  direction: "lower-better",
@@ -1468,9 +1586,6 @@ var biomarkerRangeDefinitions = {
1468
1586
  }
1469
1587
  ]
1470
1588
  },
1471
- // =============================================================================
1472
- // BONE DENSITOMETRY (DXA)
1473
- // =============================================================================
1474
1589
  BMD_Total: {
1475
1590
  default: { max: 1.4, min: 0.9, optimalMax: 1.3, optimalMin: 1, unit: "g/cm\xB2" },
1476
1591
  direction: "higher-better",
@@ -1486,9 +1601,6 @@ var biomarkerRangeDefinitions = {
1486
1601
  direction: "higher-better",
1487
1602
  source: "who-osteoporosis-1994"
1488
1603
  },
1489
- // =============================================================================
1490
- // MISSING LAB RANGES
1491
- // =============================================================================
1492
1604
  Amylase: {
1493
1605
  default: { max: 100, min: 28, optimalMax: 90, optimalMin: 35, unit: "U/L" },
1494
1606
  source: "tietz-7ed-2015"
@@ -1599,8 +1711,17 @@ function getReferenceRange(testCode, context) {
1599
1711
  if (!context || !definition.variants || definition.variants.length === 0) {
1600
1712
  return definition.default;
1601
1713
  }
1602
- const { age, biologicalSex } = context;
1714
+ const { age, biologicalSex, pregnancyTrimester, pregnant } = context;
1715
+ const hasPregnancyVariant = definition.variants.some((v) => v.pregnant === true);
1603
1716
  for (const variant of definition.variants) {
1717
+ if (variant.pregnant === true) {
1718
+ if (!pregnant) continue;
1719
+ if (variant.pregnancyTrimester !== void 0 && variant.pregnancyTrimester !== pregnancyTrimester) {
1720
+ continue;
1721
+ }
1722
+ } else if (pregnant && hasPregnancyVariant) {
1723
+ continue;
1724
+ }
1604
1725
  if (variant.sex !== "all" && variant.sex !== biologicalSex) {
1605
1726
  continue;
1606
1727
  }
@@ -1661,4 +1782,4 @@ export {
1661
1782
  getFallbackReferenceRange,
1662
1783
  applyFallbackReferenceRanges
1663
1784
  };
1664
- //# sourceMappingURL=chunk-GTKRPCZB.js.map
1785
+ //# sourceMappingURL=chunk-WTAXN4BF.js.map