@ecrvs/opencrvs-toolkit 1.8.1-rc.a7ee8fb → 1.8.1-rc.fb8610c

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.
@@ -2491,6 +2491,934 @@ var isNonInteractiveFieldType = (field3) => {
2491
2491
  return field3.type === FieldType.DIVIDER || field3.type === FieldType.PAGE_HEADER || field3.type === FieldType.PARAGRAPH || field3.type === FieldType.BULLET_LIST || field3.type === FieldType.DATA || field3.type === FieldType.HTTP || field3.type === FieldType.LINK_BUTTON;
2492
2492
  };
2493
2493
 
2494
+ // ../commons/src/conditionals/abbreviation.ts
2495
+ var medicalAbbreviations = [
2496
+ {
2497
+ code: "AAA",
2498
+ label: "Abdominal Aortic Aneurysm"
2499
+ },
2500
+ {
2501
+ code: "ABLA",
2502
+ label: "Acute Blood Loss Anemia"
2503
+ },
2504
+ {
2505
+ code: "ACS",
2506
+ label: "Acute Coronary Syndrome"
2507
+ },
2508
+ {
2509
+ code: "ADD",
2510
+ label: "Acute Demyelinating Disease"
2511
+ },
2512
+ {
2513
+ code: "ADF",
2514
+ label: "Aorto Duodenal Fistula"
2515
+ },
2516
+ {
2517
+ code: "ADHD",
2518
+ label: "Attention Deficit Hyperactivity Disorder"
2519
+ },
2520
+ {
2521
+ code: "AE",
2522
+ label: "Acute Exacerbation"
2523
+ },
2524
+ {
2525
+ code: "AF",
2526
+ label: "Atrial Fibrillation"
2527
+ },
2528
+ {
2529
+ code: "A-FIB",
2530
+ label: "Atrial Fibrillation"
2531
+ },
2532
+ {
2533
+ code: "AFL",
2534
+ label: "Atrial Flutter"
2535
+ },
2536
+ {
2537
+ code: "AFL",
2538
+ label: "Alcoholic Fatty Liver"
2539
+ },
2540
+ {
2541
+ code: "AGE",
2542
+ label: "Acute Gastroenteritis"
2543
+ },
2544
+ {
2545
+ code: "AGN",
2546
+ label: "Acute Glomerunephritis"
2547
+ },
2548
+ {
2549
+ code: "AHA",
2550
+ label: "Acquired Haemolytic Anemia"
2551
+ },
2552
+ {
2553
+ code: "AHCVD",
2554
+ label: "Arteriosclerotic Hypertensive Cardiovascular Disease"
2555
+ },
2556
+ {
2557
+ code: "AHD",
2558
+ label: "Atherosclerotic Heart Disease"
2559
+ },
2560
+ {
2561
+ code: "AI",
2562
+ label: "Aortic Insufficiency"
2563
+ },
2564
+ {
2565
+ code: "AIHD",
2566
+ label: "Acute Ischaemic Heart Disease"
2567
+ },
2568
+ {
2569
+ code: "AKA",
2570
+ label: "Above Knee Amputation"
2571
+ },
2572
+ {
2573
+ code: "AKI",
2574
+ label: "Acute Kidney Injury"
2575
+ },
2576
+ {
2577
+ code: "ALD",
2578
+ label: "Alcohol Liver Disease"
2579
+ },
2580
+ {
2581
+ code: "ALL",
2582
+ label: "Acute Lymphocytic Leukemia"
2583
+ },
2584
+ {
2585
+ code: "ALS",
2586
+ label: "Amyotrophic Lateral Sclerosis"
2587
+ },
2588
+ {
2589
+ code: "AMI",
2590
+ label: "Acute Myocardial Infarction"
2591
+ },
2592
+ {
2593
+ code: "AML",
2594
+ label: "Acute Myeloid Leukemia"
2595
+ },
2596
+ {
2597
+ code: "AML",
2598
+ label: "Acute Myelogeneous Leukemia"
2599
+ },
2600
+ {
2601
+ code: "AMML",
2602
+ label: "Acute Myelomonocytic Leukemia"
2603
+ },
2604
+ {
2605
+ code: "APAS",
2606
+ label: "Antiphospolipid Antibody Syndrome"
2607
+ },
2608
+ {
2609
+ code: "APCD",
2610
+ label: "Acquired Prothrombin Complex Deficiency"
2611
+ },
2612
+ {
2613
+ code: "APUD",
2614
+ label: "Acute Peptic Ulcer Disease"
2615
+ },
2616
+ {
2617
+ code: "ARDS",
2618
+ label: "Acute Respiratory Distress Syndrome"
2619
+ },
2620
+ {
2621
+ code: "ARF",
2622
+ label: "Acute Renal Failure"
2623
+ },
2624
+ {
2625
+ code: "ARF",
2626
+ label: "Acute Respiratory Failure"
2627
+ },
2628
+ {
2629
+ code: "AS",
2630
+ label: "Aortic Stenosis"
2631
+ },
2632
+ {
2633
+ code: "ASCVD",
2634
+ label: "Atherosclerotic Cardiovascular Disease"
2635
+ },
2636
+ {
2637
+ code: "ASD",
2638
+ label: "Atrial Septal Defect"
2639
+ },
2640
+ {
2641
+ code: "ASH",
2642
+ label: "Acute Subdural Hematoma"
2643
+ },
2644
+ {
2645
+ code: "ASHD",
2646
+ label: "Arteriosclerotic Heart Disease"
2647
+ },
2648
+ {
2649
+ code: "ASHF",
2650
+ label: "Acute Systolic Heart Failure"
2651
+ },
2652
+ {
2653
+ code: "ATN",
2654
+ label: "Acute Tubular Nephritis"
2655
+ },
2656
+ {
2657
+ code: "AUB",
2658
+ label: "Abnormal Uterine Bleeding"
2659
+ },
2660
+ {
2661
+ code: "AURI",
2662
+ label: "Acute Upper Respiratory Infection"
2663
+ },
2664
+ {
2665
+ code: "AV",
2666
+ label: "Atrioventricular Malformation"
2667
+ },
2668
+ {
2669
+ code: "AV FISTULA",
2670
+ label: "Arteriovenous Fistula"
2671
+ },
2672
+ {
2673
+ code: "AVD",
2674
+ label: "Atrioventricular Dissociation"
2675
+ },
2676
+ {
2677
+ code: "BA",
2678
+ label: "Bronchial Asthma"
2679
+ },
2680
+ {
2681
+ code: "BAIAE",
2682
+ label: "Bronchial Asthma In Acute Exacerbation"
2683
+ },
2684
+ {
2685
+ code: "BBB",
2686
+ label: "Bundle Branch Block"
2687
+ },
2688
+ {
2689
+ code: "BEV",
2690
+ label: "Bleeding Esophageal Varices"
2691
+ },
2692
+ {
2693
+ code: "BFC",
2694
+ label: "Benign Febrile Convulsion"
2695
+ },
2696
+ {
2697
+ code: "BG",
2698
+ label: "Basal Ganglia"
2699
+ },
2700
+ {
2701
+ code: "BKA",
2702
+ label: "Below Knee Amputation"
2703
+ },
2704
+ {
2705
+ code: "BPH",
2706
+ label: "Benign Prostatic Hypertrophy"
2707
+ },
2708
+ {
2709
+ code: "BPN",
2710
+ label: "Bronchopnuemonia"
2711
+ },
2712
+ {
2713
+ code: "BPUD",
2714
+ label: "Bleeding Peptic Ulcer Disease"
2715
+ },
2716
+ {
2717
+ code: "CA",
2718
+ label: "Carcinoma / Cancer"
2719
+ },
2720
+ {
2721
+ code: "CABG",
2722
+ label: "Coronary Artery Bypass Graft"
2723
+ },
2724
+ {
2725
+ code: "CAD",
2726
+ label: "Coronary Artery Disease"
2727
+ },
2728
+ {
2729
+ code: "CAP",
2730
+ label: "Community Acquired Pneumonia"
2731
+ },
2732
+ {
2733
+ code: "CBD STONE",
2734
+ label: "Common Bile Duct"
2735
+ },
2736
+ {
2737
+ code: "CD",
2738
+ label: "Cardiac Dysrhythmia"
2739
+ },
2740
+ {
2741
+ code: "CF",
2742
+ label: "Cystic Fibrosis"
2743
+ },
2744
+ {
2745
+ code: "CGN",
2746
+ label: "Chronic Glomerulonephritis"
2747
+ },
2748
+ {
2749
+ code: "CHD",
2750
+ label: "Congenital Heart Disease"
2751
+ },
2752
+ {
2753
+ code: "CHF",
2754
+ label: "Congestive Heart Failure"
2755
+ },
2756
+ {
2757
+ code: "CHVD",
2758
+ label: "Chronic Hypertensive Vascular Disease"
2759
+ },
2760
+ {
2761
+ code: "CIHD",
2762
+ label: "Chronic Ischaemic Heart Disease"
2763
+ },
2764
+ {
2765
+ code: "CKD",
2766
+ label: "Chronic Kidney Disease"
2767
+ },
2768
+ {
2769
+ code: "CLD",
2770
+ label: "Chronic Liver Disease"
2771
+ },
2772
+ {
2773
+ code: "CLL",
2774
+ label: "Chronic Lymphocytic Leukemia"
2775
+ },
2776
+ {
2777
+ code: "CML",
2778
+ label: "Chronic Myelogenous Leukaemia"
2779
+ },
2780
+ {
2781
+ code: "CNS",
2782
+ label: "Central Nervous System"
2783
+ },
2784
+ {
2785
+ code: "CNS INFECTION",
2786
+ label: "Central Nervous System Infection"
2787
+ },
2788
+ {
2789
+ code: "COPD",
2790
+ label: "Chronic Obstructive Pulmonary Disease"
2791
+ },
2792
+ {
2793
+ code: "CPA",
2794
+ label: "Cardiopulmonary Arrest"
2795
+ },
2796
+ {
2797
+ code: "CPC OF THE LIVER",
2798
+ label: "Chronic Passive Congestion Of The Liver"
2799
+ },
2800
+ {
2801
+ code: "CRA",
2802
+ label: "Cardiorespiratory Arrest"
2803
+ },
2804
+ {
2805
+ code: "CRF",
2806
+ label: "Chronic Renal Failure"
2807
+ },
2808
+ {
2809
+ code: "CRF",
2810
+ label: "Cardiorespiratory Failure"
2811
+ },
2812
+ {
2813
+ code: "CRI",
2814
+ label: "Chronic Renal Insufficiency"
2815
+ },
2816
+ {
2817
+ code: "CS",
2818
+ label: "Cesarean Section"
2819
+ },
2820
+ {
2821
+ code: "CSHF",
2822
+ label: "Chronic Systolic Heart Failure"
2823
+ },
2824
+ {
2825
+ code: "CTS",
2826
+ label: "Carpal Tunnel Syndrome"
2827
+ },
2828
+ {
2829
+ code: "CVA",
2830
+ label: "Cerebrovascular Accident"
2831
+ },
2832
+ {
2833
+ code: "CVD",
2834
+ label: "Cardiovascular Disease"
2835
+ },
2836
+ {
2837
+ code: "CVD",
2838
+ label: "Cerebrovascular Disease"
2839
+ },
2840
+ {
2841
+ code: "CVS",
2842
+ label: "Cardiovascular System"
2843
+ },
2844
+ {
2845
+ code: "DCIS",
2846
+ label: "Ductal Carcinoma In Situ"
2847
+ },
2848
+ {
2849
+ code: "DCM",
2850
+ label: "Dilated Cardiomyopathy"
2851
+ },
2852
+ {
2853
+ code: "DF",
2854
+ label: "Dengue Fever"
2855
+ },
2856
+ {
2857
+ code: "DHF",
2858
+ label: "Dengue Haemorrhagic Fever"
2859
+ },
2860
+ {
2861
+ code: "DHN",
2862
+ label: "Dehydration"
2863
+ },
2864
+ {
2865
+ code: "DIC",
2866
+ label: "Disseminated Intravascular Coagulation"
2867
+ },
2868
+ {
2869
+ code: "DISH",
2870
+ label: "Diffuse Idiopathic Skeletal Hyperostosis"
2871
+ },
2872
+ {
2873
+ code: "DKA",
2874
+ label: "Diabetic Ketoacidosis"
2875
+ },
2876
+ {
2877
+ code: "DKD",
2878
+ label: "Diabetic Kidney Disease"
2879
+ },
2880
+ {
2881
+ code: "DM",
2882
+ label: "Diabetes Mellitus"
2883
+ },
2884
+ {
2885
+ code: "DM 2",
2886
+ label: "Diabetes Mellitus Type II"
2887
+ },
2888
+ {
2889
+ code: "DM1",
2890
+ label: "Diabetes Mellitus Type I"
2891
+ },
2892
+ {
2893
+ code: "DOA",
2894
+ label: "Dead On Arrival"
2895
+ },
2896
+ {
2897
+ code: "DVT",
2898
+ label: "Deep Venous Thrombosis"
2899
+ },
2900
+ {
2901
+ code: "ECV",
2902
+ label: "Extra Cellular Volume"
2903
+ },
2904
+ {
2905
+ code: "EF",
2906
+ label: "Ejection Fraction"
2907
+ },
2908
+ {
2909
+ code: "ESRD",
2910
+ label: "End Stage Renal Disease"
2911
+ },
2912
+ {
2913
+ code: "FTT",
2914
+ label: "Failure To Thrive"
2915
+ },
2916
+ {
2917
+ code: "GDM",
2918
+ label: "Gestational Diabetes Mellitus"
2919
+ },
2920
+ {
2921
+ code: "GERD",
2922
+ label: "Gastroesophageal Reflux Disease"
2923
+ },
2924
+ {
2925
+ code: "GPN",
2926
+ label: "Glomerulonephritis"
2927
+ },
2928
+ {
2929
+ code: "GSW",
2930
+ label: "Gunshot Wound"
2931
+ },
2932
+ {
2933
+ code: "GTC",
2934
+ label: "Generalized Tonic Clonic Seizure"
2935
+ },
2936
+ {
2937
+ code: "GTN",
2938
+ label: "Glyceryl Trinitrate"
2939
+ },
2940
+ {
2941
+ code: "HACVD",
2942
+ label: "Hypertensive Atherosclerotic Cardiovascular Disease"
2943
+ },
2944
+ {
2945
+ code: "HAP",
2946
+ label: "Healthcare Associated Pneumonia"
2947
+ },
2948
+ {
2949
+ code: "HAP",
2950
+ label: "Hospital Acquired Pneumonia"
2951
+ },
2952
+ {
2953
+ code: "HASCVD",
2954
+ label: "Hypertensive Atherosclerotic Cardiovascular Disease"
2955
+ },
2956
+ {
2957
+ code: "HCVD",
2958
+ label: "Hypertensive Cardiovascular Disease"
2959
+ },
2960
+ {
2961
+ code: "HD",
2962
+ label: "Heart Disease"
2963
+ },
2964
+ {
2965
+ code: "HELLP",
2966
+ label: "Hemolysis Elevated Liver Emzymes & Low Platelet Count"
2967
+ },
2968
+ {
2969
+ code: "HGE",
2970
+ label: "Haemorrhage"
2971
+ },
2972
+ {
2973
+ code: "HHD",
2974
+ label: "Hypertensive Heart Disease"
2975
+ },
2976
+ {
2977
+ code: "HHS",
2978
+ label: "Hyperglycaemic Hyperosmolar State"
2979
+ },
2980
+ {
2981
+ code: "HIE",
2982
+ label: "Hypoxic Ischemic Encephalopathy"
2983
+ },
2984
+ {
2985
+ code: "HMD",
2986
+ label: "Hyaline Membrane Disease"
2987
+ },
2988
+ {
2989
+ code: "HPN",
2990
+ label: "Hypertension"
2991
+ },
2992
+ {
2993
+ code: "HPNNS",
2994
+ label: "Hypertensive Nephrosclerosis"
2995
+ },
2996
+ {
2997
+ code: "HPV",
2998
+ label: "Human Papilloma Virus"
2999
+ },
3000
+ {
3001
+ code: "HRAD",
3002
+ label: "Hyperactive Airway Disease"
3003
+ },
3004
+ {
3005
+ code: "HSV",
3006
+ label: "Herpes Simplex Virus"
3007
+ },
3008
+ {
3009
+ code: "HTN",
3010
+ label: "Hypertension"
3011
+ },
3012
+ {
3013
+ code: "IBD",
3014
+ label: "Inflammatory Bowel Disease"
3015
+ },
3016
+ {
3017
+ code: "IBS",
3018
+ label: "Irritable Bowel Syndrome"
3019
+ },
3020
+ {
3021
+ code: "ICH",
3022
+ label: "Intracerebral Hemmorhage"
3023
+ },
3024
+ {
3025
+ code: "ICMP",
3026
+ label: "Ischemic Cardiomyopathy"
3027
+ },
3028
+ {
3029
+ code: "ICP",
3030
+ label: "Idiopathic Thrombocytopenic Purpura"
3031
+ },
3032
+ {
3033
+ code: "IDA",
3034
+ label: "Iron Deficiency Anemia"
3035
+ },
3036
+ {
3037
+ code: "IDCA",
3038
+ label: "Infiltrating Ductal Carcinoma"
3039
+ },
3040
+ {
3041
+ code: "IDDM",
3042
+ label: "Insulin Dependent Diabetic Mellitus"
3043
+ },
3044
+ {
3045
+ code: "IED",
3046
+ label: "Improvise Explosive Device (Undetermined Intent)"
3047
+ },
3048
+ {
3049
+ code: "IHD",
3050
+ label: "Ischemic Heart Disease"
3051
+ },
3052
+ {
3053
+ code: "ITP",
3054
+ label: "Idiopatic Thrombocytopenic Purpura"
3055
+ },
3056
+ {
3057
+ code: "IUFD",
3058
+ label: "Intrauterine Fetal Demise, Death"
3059
+ },
3060
+ {
3061
+ code: "IUGR",
3062
+ label: "Intrauterine Growth Retardation"
3063
+ },
3064
+ {
3065
+ code: "IVH",
3066
+ label: "Intraventricular Hemorrhage"
3067
+ },
3068
+ {
3069
+ code: "LCIS",
3070
+ label: "Lobular Carcinoma In Situ"
3071
+ },
3072
+ {
3073
+ code: "LGIB",
3074
+ label: "Lower Gastrointerstinal Bleeding"
3075
+ },
3076
+ {
3077
+ code: "LVD",
3078
+ label: "Left Ventricular Dysfunction"
3079
+ },
3080
+ {
3081
+ code: "LVH",
3082
+ label: "Left Ventricle Hypertrophy"
3083
+ },
3084
+ {
3085
+ code: "MDF",
3086
+ label: "Multiple Dysfunction Failure"
3087
+ },
3088
+ {
3089
+ code: "MDR TB",
3090
+ label: "Multi Drug Resistant Tuberculosis"
3091
+ },
3092
+ {
3093
+ code: "MI",
3094
+ label: "Myocardial Infarction"
3095
+ },
3096
+ {
3097
+ code: "MOD",
3098
+ label: "Multi Organ Dysfunction"
3099
+ },
3100
+ {
3101
+ code: "MOF",
3102
+ label: "Multiple Organ Failure"
3103
+ },
3104
+ {
3105
+ code: "MPD",
3106
+ label: "Myeloproliferative Disease"
3107
+ },
3108
+ {
3109
+ code: "MPI",
3110
+ label: "Multiple Physical Injury"
3111
+ },
3112
+ {
3113
+ code: "MR",
3114
+ label: "Mitral Regurgitation"
3115
+ },
3116
+ {
3117
+ code: "MRSA",
3118
+ label: "Methicillin Resistant Staphylococcus Aureus"
3119
+ },
3120
+ {
3121
+ code: "MS",
3122
+ label: "Multiple Sclerosis"
3123
+ },
3124
+ {
3125
+ code: "MVA",
3126
+ label: "Motor-Vehicle Accident"
3127
+ },
3128
+ {
3129
+ code: "MVP",
3130
+ label: "Mitral Valve Prolapse"
3131
+ },
3132
+ {
3133
+ code: "MVR",
3134
+ label: "Fast Venticular Response"
3135
+ },
3136
+ {
3137
+ code: "NAFL",
3138
+ label: "Non Alcoholic Fatty Liver"
3139
+ },
3140
+ {
3141
+ code: "NASH",
3142
+ label: "Non Alcoholic Steato Hepatitis"
3143
+ },
3144
+ {
3145
+ code: "NHL",
3146
+ label: "Non-Hodgkins Lymphoma"
3147
+ },
3148
+ {
3149
+ code: "NIDDM",
3150
+ label: "Non Insulin Dependent Diabetes Mellitus"
3151
+ },
3152
+ {
3153
+ code: "NIF",
3154
+ label: "Not In Failure"
3155
+ },
3156
+ {
3157
+ code: "NOS",
3158
+ label: "Not Otherwise Specified"
3159
+ },
3160
+ {
3161
+ code: "NSAID",
3162
+ label: "Non Steroidal Anti-Inflammatory Drugs"
3163
+ },
3164
+ {
3165
+ code: "NSD",
3166
+ label: "Normal Spontaneous Delivery"
3167
+ },
3168
+ {
3169
+ code: "NSTEMI",
3170
+ label: "Non-St Elevation Myocardial Infarction"
3171
+ },
3172
+ {
3173
+ code: "NSTEMI",
3174
+ label: "Non Segment St Elevation Myocardial Infarction"
3175
+ },
3176
+ {
3177
+ code: "OU",
3178
+ label: "Obstructive Uropathy"
3179
+ },
3180
+ {
3181
+ code: "PAOD",
3182
+ label: "Peripheral Artery Occlusive Disease"
3183
+ },
3184
+ {
3185
+ code: "PCA",
3186
+ label: "Pontine Cerebrovascular Accident"
3187
+ },
3188
+ {
3189
+ code: "PCAP",
3190
+ label: "Pediatric Community Acquired Pneumonia"
3191
+ },
3192
+ {
3193
+ code: "PDA",
3194
+ label: "Patent Ductus Arteriosus"
3195
+ },
3196
+ {
3197
+ code: "PDSTB",
3198
+ label: "Presumptive Drug Sensitive Tuberculosis"
3199
+ },
3200
+ {
3201
+ code: "PICAI",
3202
+ label: "Paroxismal Internal Carotid Artery Infarction"
3203
+ },
3204
+ {
3205
+ code: "PID",
3206
+ label: "Pelvic Inflammatory Disease"
3207
+ },
3208
+ {
3209
+ code: "PIH",
3210
+ label: "Pregnancy Induced Hypertension"
3211
+ },
3212
+ {
3213
+ code: "PPH",
3214
+ label: "Primary Pulmonary Hypertension"
3215
+ },
3216
+ {
3217
+ code: "PPHN",
3218
+ label: "Persistent Pulmonary Hypertension Of The Newborn"
3219
+ },
3220
+ {
3221
+ code: "PSGN",
3222
+ label: "Poststreptococcal Glomerulonephritis"
3223
+ },
3224
+ {
3225
+ code: "PTB",
3226
+ label: "Pulmonary Tuberculosis"
3227
+ },
3228
+ {
3229
+ code: "PTE",
3230
+ label: "Pulmonary Thromboembolism"
3231
+ },
3232
+ {
3233
+ code: "PUD",
3234
+ label: "Peptic Ulcer Disease"
3235
+ },
3236
+ {
3237
+ code: "RCMP",
3238
+ label: "Restricted Cardiomyopathy"
3239
+ },
3240
+ {
3241
+ code: "RDS",
3242
+ label: "Respiratory Distress Syndrome"
3243
+ },
3244
+ {
3245
+ code: "RHD",
3246
+ label: "Rheumatic Heart Disease"
3247
+ },
3248
+ {
3249
+ code: "RIA",
3250
+ label: "Ruptured Intracranial Aneurysm"
3251
+ },
3252
+ {
3253
+ code: "RMCA",
3254
+ label: "Right Medial Cerebral Artery"
3255
+ },
3256
+ {
3257
+ code: "RSV",
3258
+ label: "Respiratory Syncytial Virus"
3259
+ },
3260
+ {
3261
+ code: "RTA",
3262
+ label: "Road-Traffic Accident"
3263
+ },
3264
+ {
3265
+ code: "RTC",
3266
+ label: "Road Traffic Crash"
3267
+ },
3268
+ {
3269
+ code: "RTI",
3270
+ label: "Respiratory Tract Infection"
3271
+ },
3272
+ {
3273
+ code: "RVR",
3274
+ label: "Rapid Ventricular Response"
3275
+ },
3276
+ {
3277
+ code: "SAH",
3278
+ label: "Subarachnoid Haemorrhage"
3279
+ },
3280
+ {
3281
+ code: "SARS",
3282
+ label: "Severe Acute Respiratory Syndrome"
3283
+ },
3284
+ {
3285
+ code: "SDC",
3286
+ label: "Sudden Cardiac Death"
3287
+ },
3288
+ {
3289
+ code: "SIDS",
3290
+ label: "Sudden Infant Death Syndrome"
3291
+ },
3292
+ {
3293
+ code: "SIHD",
3294
+ label: "Severe Ischemic Heart Disease"
3295
+ },
3296
+ {
3297
+ code: "SIRS",
3298
+ label: "Systemic Inflammatory Response Syndrome"
3299
+ },
3300
+ {
3301
+ code: "SLE",
3302
+ label: "Systemic Lupus Erythematosus"
3303
+ },
3304
+ {
3305
+ code: "SMI",
3306
+ label: "Silent Mocardial Ischaemia"
3307
+ },
3308
+ {
3309
+ code: "SOL",
3310
+ label: "Space Occupying Lesion"
3311
+ },
3312
+ {
3313
+ code: "SRMI",
3314
+ label: "Stress-Related Mucosal Injury"
3315
+ },
3316
+ {
3317
+ code: "SSPE",
3318
+ label: "Sub Sclerosis Panencephalitis"
3319
+ },
3320
+ {
3321
+ code: "SSS",
3322
+ label: "Sick Sinus Syndrome"
3323
+ },
3324
+ {
3325
+ code: "SSSS",
3326
+ label: "Staphylococcal Scalded Skin Syndrome"
3327
+ },
3328
+ {
3329
+ code: "STD",
3330
+ label: "Sexually Transmitted Disease"
3331
+ },
3332
+ {
3333
+ code: "STEMI",
3334
+ label: "St-Elevation Myocardial Infarction"
3335
+ },
3336
+ {
3337
+ code: "SW",
3338
+ label: "Stab Wound"
3339
+ },
3340
+ {
3341
+ code: "TAHBSO",
3342
+ label: "Total Abdominal Hysterectomy And Bilateral Salpingo-Oophorectomy"
3343
+ },
3344
+ {
3345
+ code: "TB",
3346
+ label: "Tuberculosis"
3347
+ },
3348
+ {
3349
+ code: "TBI",
3350
+ label: "Traumatic Brain Injury"
3351
+ },
3352
+ {
3353
+ code: "TIA",
3354
+ label: "Transient Ischemic Attack"
3355
+ },
3356
+ {
3357
+ code: "TIA",
3358
+ label: "Tuberculosis"
3359
+ },
3360
+ {
3361
+ code: "TOF",
3362
+ label: "Tetralogy Of Fallot"
3363
+ },
3364
+ {
3365
+ code: "TR",
3366
+ label: "Tricuspid Regurgitation"
3367
+ },
3368
+ {
3369
+ code: "TVA",
3370
+ label: "Tricuspid Valve Atresia"
3371
+ },
3372
+ {
3373
+ code: "UGIB",
3374
+ label: "Upper Gastrointestinal Bleeding"
3375
+ },
3376
+ {
3377
+ code: "URTI",
3378
+ label: "Upper Respiratory Tract Infection'"
3379
+ },
3380
+ {
3381
+ code: "URI",
3382
+ label: "Urinary Tract Infection"
3383
+ },
3384
+ {
3385
+ code: "VA",
3386
+ label: "Vehicular Accident"
3387
+ },
3388
+ {
3389
+ code: "VAP",
3390
+ label: "Ventilator Acquired Pnuemonia"
3391
+ },
3392
+ {
3393
+ code: "VC",
3394
+ label: "Vehicular Crush"
3395
+ },
3396
+ {
3397
+ code: "VF",
3398
+ label: "Ventricular Fibrillation"
3399
+ },
3400
+ {
3401
+ code: "V-FIB",
3402
+ label: "Ventricular Fibrillation"
3403
+ },
3404
+ {
3405
+ code: "VHD",
3406
+ label: "Valvular Heart Disease"
3407
+ },
3408
+ {
3409
+ code: "VSD",
3410
+ label: "Ventricular Septal Defect"
3411
+ },
3412
+ {
3413
+ code: "VT",
3414
+ label: "Venous Thromboembolism"
3415
+ },
3416
+ {
3417
+ code: "VTACH",
3418
+ label: "Ventricular Tachycardia"
3419
+ }
3420
+ ];
3421
+
2494
3422
  // ../commons/src/conditionals/validate.ts
2495
3423
  var ajv = new import__.default({
2496
3424
  $data: true,
@@ -2540,6 +3468,43 @@ ajv.addKeyword({
2540
3468
  return locations.some((location) => location.id === locationIdInput);
2541
3469
  }
2542
3470
  });
3471
+ ajv.addKeyword({
3472
+ keyword: "sumOf",
3473
+ type: "object",
3474
+ schemaType: "object",
3475
+ errors: true,
3476
+ validate(schema, data) {
3477
+ const { sum, field1, field2: field22 } = schema;
3478
+ const total = data?.[sum];
3479
+ const num1 = data?.[field1];
3480
+ const num2 = data?.[field22];
3481
+ if (typeof total !== "number" || typeof num1 !== "number" || typeof num2 !== "number") {
3482
+ return true;
3483
+ }
3484
+ const valid = total === num1 + num2;
3485
+ return valid;
3486
+ }
3487
+ });
3488
+ ajv.addKeyword({
3489
+ keyword: "isAbbreviation",
3490
+ type: "string",
3491
+ schemaType: "boolean",
3492
+ errors: true,
3493
+ validate(schema, value) {
3494
+ if (!schema) return true;
3495
+ if (typeof value !== "string") {
3496
+ return true;
3497
+ }
3498
+ const items = value.split(",").map((item) => item.replace(/\./g, "").trim().toUpperCase());
3499
+ const foundAbbreviation = items.filter(
3500
+ (item) => medicalAbbreviations.some((abbr) => abbr.code.toUpperCase() === item)
3501
+ );
3502
+ if (foundAbbreviation.length && foundAbbreviation.length > 0) {
3503
+ return false;
3504
+ }
3505
+ return true;
3506
+ }
3507
+ });
2543
3508
  function validate(schema, data) {
2544
3509
  const validator = ajv.getSchema(schema.$id) || ajv.compile(schema);
2545
3510
  const result = validator(data);
@@ -3516,6 +4481,33 @@ function createFieldConditionals(fieldId) {
3516
4481
  required: [fieldId]
3517
4482
  });
3518
4483
  },
4484
+ isEqualToSumOf(val1, val2) {
4485
+ const field1Id = val1.$$field;
4486
+ const field2Id = val2.$$field;
4487
+ return defineFormConditional({
4488
+ type: "object",
4489
+ properties: {
4490
+ [fieldId]: { type: "number" },
4491
+ [field1Id]: { type: "number" },
4492
+ [field2Id]: { type: "number" }
4493
+ },
4494
+ required: [fieldId, field1Id, field2Id],
4495
+ sumOf: {
4496
+ sum: fieldId,
4497
+ field1: field1Id,
4498
+ field2: field2Id
4499
+ }
4500
+ });
4501
+ },
4502
+ isAbbreviation() {
4503
+ return defineFormConditional({
4504
+ type: "object",
4505
+ properties: {
4506
+ [fieldId]: { type: "string", isAbbreviation: true }
4507
+ },
4508
+ required: [fieldId]
4509
+ });
4510
+ },
3519
4511
  /**
3520
4512
  * Use case: Some fields are rendered when selection is not made, or boolean false is explicitly selected.
3521
4513
  * @example field('recommender.none').isFalsy() vs not(field('recommender.none').isEqualTo(true))