{"service":"magent","tools":[{"scheme":"exact","status":"smoke","path":"/v1/tools/ping","description":"Payment smoke-test endpoint","parameters":[{"in":"query","name":"probe","type":"string","description":"Ignored. Payment smoke test takes no input.","required":false,"example":"ok"}],"errors":[{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":null,"amount":"1000","method":"GET","response_fields":[{"name":"ok","type":"boolean","description":"Always true after a successful settle"},{"name":"service","type":"string","description":"Product name"}],"bulk":null,"example_url":"https://api.magentlab.com/v1/tools/ping","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.001","network":"eip155:8453","docs_url":"https://magentlab.com/docs/tools/ping","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/codes/search","description":"Maps a natural-language phrase to a current RxNorm, ICD-10-CM, or LOINC code.","parameters":[{"in":"query","name":"query","type":"string","description":"Natural-language drug, diagnosis, or lab description. Max 512 characters. Do not send patient names.","required":true,"example":"Tylenol 500mg"},{"in":"query","name":"system","type":"string","enum":["rxnorm","icd10","loinc"],"description":"Restrict to rxnorm, icd10 (ICD-10-CM), or loinc. Omit to search all.","required":false,"example":"rxnorm"},{"in":"query","name":"tty","type":"string","enum":["SCD","SBD","IN","PIN","MIN","BN","GPCK","BPCK","DF","SCDC","SBDC","SCDF","SBDF","CM","LN"],"description":"Restrict term type. Pharmacy orders typically want SCD. ICD-10-CM is CM; LOINC is LN.","required":false,"example":"SCD"},{"default":5,"in":"query","name":"limit","type":"integer","description":"Number of ranked matches to return (1-25). Default 5.","required":false,"example":"5"},{"default":35,"in":"query","name":"min_score","type":"integer","description":"Minimum rank score 0-100. Default 35.","required":false,"example":"35"},{"default":false,"in":"query","name":"include_obsolete","type":"boolean","description":"Include deprecated/obsolete codes. Default false.","required":false,"example":"false"},{"default":true,"in":"query","name":"billable_only","type":"boolean","description":"ICD-10-CM: return only HIPAA billable codes, not headers. Default true.","required":false,"example":"true"}],"errors":[{"code":"invalid_query","message":"query is required and must be 1-512 characters Returned before settlement; you are not charged.","status":400},{"code":"invalid_system","message":"system must be rxnorm, icd10, or loinc Returned before settlement; you are not charged.","status":400},{"code":"invalid_tty","message":"tty must be a known RxNorm, ICD-10-CM, or LOINC term type Returned before settlement; you are not charged.","status":400},{"code":"invalid_limit","message":"limit must be an integer from 1 to 25 Returned before settlement; you are not charged.","status":400},{"code":"invalid_min_score","message":"min_score must be an integer from 0 to 100 Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/code-search","citation":{"authors":"NLM, CMS, Regenstrief Institute","doi":null,"id":"magent-code-catalog","source":"Local catalog. Production coverage is Current Prescribable RxNorm + ICD-10-CM + LOINC after gold gate. Not complete UMLS.","title":"Current Prescribable RxNorm, CMS ICD-10-CM, and LOINC","url":"https://www.nlm.nih.gov/research/umls/rxnorm/index.html"},"formula_expression":"Rank local catalog matches by token/prefix score; return current RxNorm, ICD-10-CM, or LOINC. Empty matches is a valid paid 200.","purpose":"Rank a natural-language drug, diagnosis, or lab phrase to current RxNorm, ICD-10-CM, or LOINC codes from the local catalog.","markdown_url":"https://magentlab.com/docs/code-search.md"},"amount":"5000","method":"GET","response_fields":[{"name":"query","type":"string","description":"Echo of the submitted query"},{"name":"system","type":"string","description":"rxnorm, icd10, loinc, or all"},{"name":"match_count","type":"integer","description":"Number of ranked matches returned"},{"name":"match_quality","type":"string","description":"none, low, or high"},{"name":"matches","type":"array","description":"Ranked codes. First row is the best deterministic hit."},{"name":"catalog","type":"object","description":"Seed vs ingested vs full coverage metadata"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"query":"Tylenol 500mg","system":"rxnorm"},{"query":"Tylenol 500mg","system":"rxnorm"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/code-search","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/codes/search?query=Tylenol%20500mg&system=rxnorm","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/code-search","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/codes/lookup","description":"Looks up a current RxNorm, ICD-10-CM, or LOINC preferred term by exact code.","parameters":[{"in":"query","name":"system","type":"string","enum":["rxnorm","icd10","loinc"],"description":"rxnorm, icd10 (ICD-10-CM), or loinc.","required":true,"example":"rxnorm"},{"in":"query","name":"code","type":"string","description":"Exact published identifier. ICD-10-CM accepts dotted or compact form (E11.9 or E119). Max 32 characters.","required":true,"example":"198440"}],"errors":[{"code":"invalid_system","message":"system must be rxnorm, icd10, or loinc Returned before settlement; you are not charged.","status":400},{"code":"invalid_code","message":"code is required and must be 1-32 characters Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/code-lookup","citation":{"authors":"NLM, CMS, Regenstrief Institute","doi":null,"id":"magent-code-catalog","source":"Local catalog. Production coverage is Current Prescribable RxNorm + ICD-10-CM + LOINC after gold gate.","title":"Current Prescribable RxNorm, CMS ICD-10-CM, and LOINC","url":"https://www.nlm.nih.gov/research/umls/rxnorm/index.html"},"formula_expression":"Exact system+code lookup in the local catalog (ICD-10-CM dotted or compact). found=false is a valid paid 200.","purpose":"Look up a current RxNorm, ICD-10-CM, or LOINC preferred term from an exact published code.","markdown_url":"https://magentlab.com/docs/code-lookup.md"},"amount":"5000","method":"GET","response_fields":[{"name":"found","type":"boolean","description":"true when the code exists in the catalog"},{"name":"system","type":"string","description":"rxnorm, icd10, or loinc"},{"name":"code","type":"string","description":"Canonical catalog code when found"},{"name":"display","type":"string","description":"Preferred term, or null when not found"},{"name":"tty","type":"string","description":"Term type, or null when not found"},{"name":"status","type":"string","description":"current or equivalent catalog status"},{"name":"billable","type":"boolean","description":"ICD-10-CM billable flag; null otherwise"},{"name":"obsolete","type":"boolean","description":"true when the catalog marks the code obsolete"},{"name":"synonyms","type":"array","description":"Known synonyms; empty when not found"},{"name":"catalog","type":"object","description":"Seed vs ingested vs full coverage metadata"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"code":"198440","system":"rxnorm"},{"code":"198440","system":"rxnorm"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/code-lookup","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/codes/lookup?system=rxnorm&code=198440","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/code-lookup","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/bmi","description":"Body-mass index from height and weight (Keys/Quetelet). Use for GLP-1 and bariatric prior-auth arithmetic. Deterministic published index with citation; not a diagnosis.","parameters":[{"in":"query","name":"height_cm","type":"number","description":"Height in centimeters. Provide height_cm or height_in.","required":false,"example":"170"},{"in":"query","name":"weight_kg","type":"number","description":"Weight in kilograms. Provide weight_kg or weight_lb.","required":false,"example":"70"},{"in":"query","name":"height_in","type":"number","description":"Height in inches. Converted as cm = in * 2.54.","required":false,"example":"67"},{"in":"query","name":"weight_lb","type":"number","description":"Weight in pounds. Converted as kg = lb * 0.45359237.","required":false,"example":"154"}],"errors":[{"code":"invalid_height","message":"height_cm (50-250) or height_in (20-98) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_weight","message":"weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/bmi","citation":{"authors":"Keys A, Fidanza F, Karvonen MJ, Kimura N, Taylor HL","doi":"10.1016/0021-9681(72)90027-6","id":"keys-1972","source":"J Chronic Dis. 1972;25(6):329-343","title":"Indices of relative weight and obesity","url":"https://doi.org/10.1016/0021-9681(72)90027-6"},"formula_expression":"BMI = weight_kg / (height_m ^ 2)","purpose":"Compute Keys/Quetelet body-mass index from height and weight, plus a WHO adult band.","markdown_url":"https://magentlab.com/docs/bmi.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"bmi"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"height_cm","type":"number","description":"Normalized height in cm"},{"name":"weight_kg","type":"number","description":"Normalized weight in kg"},{"name":"bmi","type":"number","description":"kg/m^2, 1 decimal place"},{"name":"who_adult_category","type":"string","description":"WHO adult cut-point label: underweight (<18.5), normal (18.5-24.9), overweight (25-29.9), obesity (>=30). Not a diagnosis."},{"name":"citation","type":"object","description":"Keys 1972 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"height_cm":"170","weight_kg":"70"},{"height_cm":"170","weight_kg":"70"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/bmi","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/bmi?height_cm=170&weight_kg=70","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/bmi","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/bsa","description":"Returns body surface area (m²) from height and weight (Mosteller).","parameters":[{"in":"query","name":"height_cm","type":"number","description":"Height in centimeters. Provide height_cm or height_in.","required":false,"example":"170"},{"in":"query","name":"weight_kg","type":"number","description":"Weight in kilograms. Provide weight_kg or weight_lb.","required":false,"example":"70"},{"in":"query","name":"height_in","type":"number","description":"Height in inches. Converted as cm = in * 2.54.","required":false,"example":"67"},{"in":"query","name":"weight_lb","type":"number","description":"Weight in pounds. Converted as kg = lb * 0.45359237.","required":false,"example":"154"}],"errors":[{"code":"invalid_height","message":"height_cm (50-250) or height_in (20-98) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_weight","message":"weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/bsa","citation":{"authors":"Mosteller RD","doi":"10.1056/NEJM198710223171717","id":"mosteller-1987","source":"N Engl J Med. 1987;317(17):1098","title":"Simplified calculation of body-surface area","url":"https://doi.org/10.1056/NEJM198710223171717"},"formula_expression":"BSA_m2 = sqrt((height_cm * weight_kg) / 3600)","purpose":"Returns body surface area (m²) computed with the Mosteller equation from height and weight; cites Mosteller, NEJM 1987.","markdown_url":"https://magentlab.com/docs/bsa.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"mosteller"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"height_cm","type":"number","description":"Normalized height in cm"},{"name":"weight_kg","type":"number","description":"Normalized weight in kg"},{"name":"bsa_m2","type":"number","description":"Body surface area in m^2, 4 decimal places"},{"name":"citation","type":"object","description":"Peer-reviewed formula citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"height_cm":"170","weight_kg":"70"},{"height_cm":"170","weight_kg":"70"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/bsa","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/bsa?height_cm=170&weight_kg=70","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/bsa","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/ibw","description":"Devine ideal body weight and 0.4 adjusted body weight from height, sex, and actual weight. Deterministic published formula with citation; not a dosing recommendation.","parameters":[{"in":"query","name":"height_cm","type":"number","description":"Height in centimeters. Provide height_cm or height_in.","required":false,"example":"177.8"},{"in":"query","name":"height_in","type":"number","description":"Height in inches. Devine uses inches: IBW adds 2.3 kg per inch over 60.","required":false,"example":"70"},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"Sex used by Devine (50 kg male, 45.5 kg female base).","required":true,"example":"male"},{"in":"query","name":"weight_kg","type":"number","description":"Actual total body weight in kilograms. Provide weight_kg or weight_lb.","required":false,"example":"90"},{"in":"query","name":"weight_lb","type":"number","description":"Actual total body weight in pounds.","required":false,"example":"198"}],"errors":[{"code":"invalid_height","message":"height_cm (50-250) or height_in (20-98) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_weight","message":"weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/ibw","citation":{"authors":"Devine BJ","doi":null,"id":"devine-1974","source":"Drug Intell Clin Pharm. 1974;8:650-655","title":"Gentamicin therapy","url":"https://journals.sagepub.com/doi/10.1177/106002807400801104"},"formula_expression":"IBW_kg = 50 (male) or 45.5 (female) + 2.3 * (height_in - 60); AdjBW_kg = IBW_kg + 0.4 * (TBW_kg - IBW_kg) when TBW > IBW, else TBW_kg","purpose":"Compute Devine ideal body weight and 0.4 adjusted body weight from height, sex, and actual weight.","markdown_url":"https://magentlab.com/docs/ibw.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"devine_ibw_adjbw"},{"name":"formula_expression","type":"string","description":"Exact expressions used"},{"name":"sex","type":"string","description":"female or male"},{"name":"height_cm","type":"number","description":"Normalized height in cm"},{"name":"height_in","type":"number","description":"Height in inches used by Devine"},{"name":"actual_weight_kg","type":"number","description":"Total body weight in kg"},{"name":"ibw_kg","type":"number","description":"Devine ideal body weight, 1 decimal"},{"name":"adjbw_kg","type":"number","description":"Adjusted body weight with 0.4 factor when TBW > IBW, else TBW"},{"name":"adjbw_factor","type":"number","description":"Always 0.4"},{"name":"citation","type":"object","description":"Devine 1974 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"height_in":"70","sex":"male","weight_kg":"90"},{"height_in":"70","sex":"male","weight_kg":"90"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/ibw","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/ibw?height_in=70&sex=male&weight_kg=90","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/ibw","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/bee","description":"Harris–Benedict 1919 basal energy expenditure (kcal/day) from height, weight, age, and sex. Deterministic published formula with citation; not a nutrition prescription.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120).","required":true,"example":"25"},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"Sex used by Harris–Benedict 1919 (separate male and female equations).","required":true,"example":"male"},{"in":"query","name":"height_cm","type":"number","description":"Height in centimeters. Provide height_cm or height_in.","required":false,"example":"175"},{"in":"query","name":"height_in","type":"number","description":"Height in inches. Converted as cm = in * 2.54.","required":false,"example":"70"},{"in":"query","name":"weight_kg","type":"number","description":"Weight in kilograms. Provide weight_kg or weight_lb.","required":false,"example":"70"},{"in":"query","name":"weight_lb","type":"number","description":"Weight in pounds. Converted as kg = lb * 0.45359237.","required":false,"example":"154"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_height","message":"height_cm (50-250) or height_in (20-98) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_weight","message":"weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/bee","citation":{"authors":"Harris JA, Benedict FG","doi":null,"id":"harris-benedict-1919","source":"Carnegie Institution of Washington Publication No. 279; 1919","title":"A Biometric Study of Basal Metabolism in Man","url":"https://archive.org/details/biometricstudyof00harruoft"},"formula_expression":"BEE_kcal_day = 66.4730 + 13.7516*kg + 5.0033*cm - 6.7550*age (male); BEE_kcal_day = 655.0955 + 9.5634*kg + 1.8496*cm - 4.6756*age (female)","purpose":"Compute Harris–Benedict 1919 basal energy expenditure in kcal/day from height, weight, age, and sex.","markdown_url":"https://magentlab.com/docs/bee.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"harris_benedict_1919"},{"name":"formula_expression","type":"string","description":"Exact expressions used"},{"name":"age_years","type":"integer","description":"Age in years used"},{"name":"sex","type":"string","description":"female or male"},{"name":"height_cm","type":"number","description":"Normalized height in cm"},{"name":"weight_kg","type":"number","description":"Normalized weight in kg"},{"name":"bee_kcal_day","type":"number","description":"Basal energy expenditure in kcal/24h, 1 decimal place"},{"name":"units","type":"string","description":"kcal/day"},{"name":"citation","type":"object","description":"Harris–Benedict 1919 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"25","height_cm":"175","sex":"male","weight_kg":"70"},{"age":"25","height_cm":"175","sex":"male","weight_kg":"70"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/bee","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/bee?age=25&sex=male&height_cm=175&weight_kg=70","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/bee","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/nadler","description":"Nadler 1962 predicted blood volume in liters from height, weight, and sex (separate male and female equations). Deterministic published arithmetic with citation. For adults as published; this tool does not take age. Not a transfusion order, Lemmens–Bernstein–Brodsky estimate, or 70 mL/kg rule of thumb.","parameters":[{"in":"query","name":"height_cm","type":"number","description":"Height in centimeters. Provide height_cm or height_in.","required":false,"example":"170"},{"in":"query","name":"height_in","type":"number","description":"Height in inches. Converted as cm = in * 2.54.","required":false,"example":"66.92913385826772"},{"in":"query","name":"weight_kg","type":"number","description":"Weight in kilograms. Provide weight_kg or weight_lb.","required":false,"example":"70"},{"in":"query","name":"weight_lb","type":"number","description":"Weight in pounds. Converted as kg = lb * 0.45359237.","required":false,"example":"154.3236"},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"Sex used by Nadler 1962 (separate male and female equations).","required":true,"example":"male"}],"errors":[{"code":"invalid_height","message":"height_cm (50-250) or height_in (20-98) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_weight","message":"weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/nadler","citation":{"authors":"Nadler SB, Hidalgo JH, Bloch T","id":"nadler-1962","pmid":"21936146","source":"Surgery. 1962;51(2):224-232","title":"Prediction of blood volume in normal human adults","url":"https://pubmed.ncbi.nlm.nih.gov/21936146"},"formula_expression":"BV_L = 0.3669 * H^3 + 0.03219 * W + 0.6041 (male); BV_L = 0.3561 * H^3 + 0.03308 * W + 0.1833 (female); H meters, W kg","purpose":"Compute Nadler 1962 predicted blood volume in liters and milliliters from height, weight, and sex.","markdown_url":"https://magentlab.com/docs/nadler.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"nadler"},{"name":"formula_expression","type":"string","description":"Exact male and female expressions"},{"name":"sex","type":"string","description":"female or male"},{"name":"height_cm","type":"number","description":"Normalized height in cm"},{"name":"weight_kg","type":"number","description":"Normalized weight in kg"},{"name":"blood_volume_l","type":"number","description":"Predicted blood volume in liters, 3 decimals"},{"name":"blood_volume_ml","type":"integer","description":"Predicted blood volume in milliliters, integer"},{"name":"citation","type":"object","description":"Nadler Surgery 1962 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"height_cm":"170","sex":"male","weight_kg":"70"},{"height_cm":"170","sex":"male","weight_kg":"70"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/nadler","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/nadler?height_cm=170&weight_kg=70&sex=male","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/nadler","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rfm","description":"Relative fat mass (RFM) from height, waist, and sex (Woolcott 2018). Height and waist in meters in the paper; magent accepts height_cm or height_in and waist_cm. Deterministic published arithmetic with citation. Not a medical device, not a body-fat diagnosis, and not later obesity cutoffs. magent does not measure the patient.","parameters":[{"in":"query","name":"height_cm","type":"number","description":"Height in centimeters. Provide height_cm or height_in.","required":false,"example":"180"},{"in":"query","name":"height_in","type":"number","description":"Height in inches. Converted as cm = in * 2.54.","required":false,"example":"70"},{"in":"query","name":"waist_cm","type":"number","description":"Waist circumference in centimeters (40-200). Converted to meters for RFM.","required":true,"example":"90"},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"Sex used by Woolcott 2018 (0 male, 1 female in the RFM equation).","required":true,"example":"male"}],"errors":[{"code":"invalid_height","message":"height_cm (50-250) or height_in (20-98) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_waist_range","message":"waist_cm must be a number from 40 to 200. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rfm","citation":{"authors":"Woolcott OO, Bergman RN","doi":"10.1038/s41598-018-29362-1","id":"woolcott-2018","pmid":"30030479","source":"Sci Rep. 2018;8:10980","title":"Relative fat mass (RFM) as a new estimator of whole-body fat percentage ─ A cross-sectional study in American adult individuals","url":"https://doi.org/10.1038/s41598-018-29362-1"},"formula_expression":"RFM = 64 - (20 * (height_m / waist_m)) + (12 * sex); sex = 0 male, 1 female","purpose":"Compute Woolcott 2018 relative fat mass (RFM) from height, waist circumference, and sex as an estimator of whole-body fat percentage.","markdown_url":"https://magentlab.com/docs/rfm.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rfm"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"sex","type":"string","description":"female or male"},{"name":"height_cm","type":"number","description":"Normalized height in cm"},{"name":"waist_cm","type":"number","description":"Waist circumference in cm"},{"name":"rfm","type":"number","description":"Relative fat mass, 1 decimal. Not a body-fat diagnosis."},{"name":"citation","type":"object","description":"Woolcott 2018 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"height_cm":"180","sex":"male","waist_cm":"90"},{"height_cm":"180","sex":"male","waist_cm":"90"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rfm","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rfm?height_cm=180&waist_cm=90&sex=male","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rfm","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/bri","description":"Body roundness index from height and waist (Thomas 2013). Models the body as an ellipse: e = sqrt(1 - (waist/(pi*height))^2), BRI = 364.2 - 365.5*e. Deterministic published formula with citation. Not a medical device, VAT measurement, or body-fat diagnosis; magent does not measure the patient.","parameters":[{"in":"query","name":"height_cm","type":"number","description":"Height in centimeters. Provide height_cm or height_in.","required":false,"example":"170"},{"in":"query","name":"waist_cm","type":"number","description":"Waist circumference in centimeters (40-200). Compared to height in cm after normalize.","required":true,"example":"80"},{"in":"query","name":"height_in","type":"number","description":"Height in inches. Converted as cm = in * 2.54.","required":false,"example":"67"}],"errors":[{"code":"invalid_height","message":"height_cm (50-250) or height_in (20-98) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_waist_range","message":"waist_cm must be a number from 40 to 200. Returned before settlement; you are not charged.","status":400},{"code":"invalid_bri_geometry","message":"waist and height must satisfy waist/(pi*height) < 1 so eccentricity is defined (Thomas 2013 BRI). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/bri","citation":{"authors":"Thomas DM, Bredlau C, Bosy-Westphal A, Mueller MJ, Shen W, Gallagher D, McDougall A, Peterson CM, Ravussin E, Heymsfield SB","doi":"10.1002/oby.20408","id":"thomas-2013","pmid":"23519954","source":"Obesity (Silver Spring). 2013;21(11):2264-2271","title":"Relationships between body roundness with body fat and visceral adipose tissue emerging from a new geometrical model","url":"https://doi.org/10.1002/oby.20408"},"formula_expression":"BRI = 364.2 - 365.5 * sqrt(1 - (waist_cm / (pi * height_cm))^2)","purpose":"Compute Thomas 2013 body roundness index from height and waist by modeling the body as an ellipse.","markdown_url":"https://magentlab.com/docs/bri.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"bri"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"height_cm","type":"number","description":"Normalized height in cm"},{"name":"waist_cm","type":"number","description":"Waist circumference in cm"},{"name":"bri","type":"number","description":"Thomas 2013 body roundness index, 2 decimals"},{"name":"citation","type":"object","description":"Thomas 2013 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"height_cm":"170","waist_cm":"80"},{"height_cm":"170","waist_cm":"80"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/bri","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/bri?height_cm=170&waist_cm=80","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/bri","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/whr","description":"Waist–hip ratio from waist and hip circumference (WHO 2011 expert consultation). WHR = waist_cm / hip_cm after the same unit normalize; optional inches convert as cm = in * 2.54. Deterministic published arithmetic with citation. Not a medical device, body-fat diagnosis, or cardiovascular diagnosis; magent does not apply obesity or sex-specific cutoffs and does not measure the patient.","parameters":[{"in":"query","name":"waist_cm","type":"number","description":"Waist circumference in centimeters (40-200). Provide waist_cm or waist_in.","required":false,"example":"80"},{"in":"query","name":"hip_cm","type":"number","description":"Hip circumference in centimeters (40-200). Provide hip_cm or hip_in.","required":false,"example":"100"},{"in":"query","name":"waist_in","type":"number","description":"Waist circumference in inches. Converted as cm = in * 2.54.","required":false,"example":"32"},{"in":"query","name":"hip_in","type":"number","description":"Hip circumference in inches. Converted as cm = in * 2.54.","required":false,"example":"40"}],"errors":[{"code":"invalid_waist_range","message":"waist_cm must be a number from 40 to 200. Returned before settlement; you are not charged.","status":400},{"code":"invalid_hip_range","message":"hip_cm must be a number from 40 to 200. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/whr","citation":{"authors":"World Health Organization","id":"who-2011","pmid":"22184524","source":"Geneva: World Health Organization; 2011","title":"Waist circumference and waist–hip ratio: report of a WHO expert consultation, Geneva, 8–11 December 2008","url":"https://pubmed.ncbi.nlm.nih.gov/22184524"},"formula_expression":"WHR = waist_cm / hip_cm","purpose":"Compute waist–hip ratio (WHR) as waist circumference divided by hip circumference after the same unit normalize, following the WHO 2011 expert consultation report.","markdown_url":"https://magentlab.com/docs/whr.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"whr"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"waist_cm","type":"number","description":"Normalized waist circumference in cm"},{"name":"hip_cm","type":"number","description":"Normalized hip circumference in cm"},{"name":"whr","type":"number","description":"Waist–hip ratio, 2 decimals. Ratio only; not a cutoff band."},{"name":"citation","type":"object","description":"WHO 2011 expert consultation citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"hip_cm":"100","waist_cm":"80"},{"hip_cm":"100","waist_cm":"80"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/whr","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/whr?waist_cm=80&hip_cm=100","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/whr","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/osta","description":"Koh 2001 Osteoporosis Self-Assessment Tool for Asians (OSTA). Index = trunc(0.2 × (weight_kg − age)) toward zero. Risk low if index > −1, intermediate if −1 through −4, high if index < −4. Age 18–120; weight_kg or weight_lb. Not a medical device, not FRAX, not a DXA order. Derivation was postmenopausal Asian women.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Koh 2001 OSTA uses age as a whole number of years.","required":true,"example":"66"},{"in":"query","name":"weight_kg","type":"number","description":"Weight in kilograms. Provide weight_kg or weight_lb.","required":false,"example":"50"},{"in":"query","name":"weight_lb","type":"number","description":"Weight in pounds. Converted as kg = lb * 0.45359237.","required":false,"example":"110"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_weight","message":"weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/osta","citation":{"authors":"Koh LKH, Sedrine WB, Torralba TP, Kung A, Fujiwara S, Chan SP, Huang QR, Rajatanavin R, Tsai KS, Park HM, Reginster JY, OSTA Research Group","doi":"10.1007/s001980170070","id":"koh-2001","pmid":"11580084","source":"Osteoporos Int. 2001;12(8):699-705","title":"A simple tool to identify Asian women at increased risk of osteoporosis","url":"https://doi.org/10.1007/s001980170070"},"formula_expression":"OSTA = trunc(0.2 * (weight_kg - age)); low if index > -1; intermediate if -1 to -4 inclusive; high if index < -4","purpose":"Compute the Koh 2001 Osteoporosis Self-Assessment Tool for Asians (OSTA) as trunc(0.2 × (weight_kg − age)) toward zero, then the published low, intermediate, or high band.","markdown_url":"https://magentlab.com/docs/osta.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"osta"},{"name":"formula_expression","type":"string","description":"Exact Koh 2001 expression"},{"name":"age","type":"integer","description":"Age in years used in the index"},{"name":"weight_kg","type":"number","description":"Normalized weight in kg"},{"name":"osta_index","type":"integer","description":"Koh 2001 OSTA index: trunc(0.2 * (weight_kg - age)) toward zero. Integer; not FRAX."},{"name":"risk","type":"string","description":"low (index > -1), intermediate (index -1 through -4 inclusive), or high (index < -4). Koh 2001 published band, not a diagnosis or DXA order."},{"name":"citation","type":"object","description":"Koh 2001 Osteoporos Int citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"66","weight_kg":"50"},{"age":"66","weight_kg":"50"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/osta","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/osta?age=66&weight_kg=50","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/osta","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/osiris","description":"Sedrine 2002 Osteoporosis Index of Risk (OSIRIS). Index = (-0.2 × age) + (0.2 × weight_kg) + 2 if current HRT + (-2) if prior low-impact fracture. Risk low if score > +1, high if score < -3, intermediate otherwise including exact +1 and -3. Age 18-120; weight_kg or weight_lb; current_hrt and prior_low_impact_fracture true/false. Not a medical device, not FRAX, not a DXA order. Derivation was postmenopausal Western European women.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Sedrine 2002 OSIRIS uses age as a whole number of years.","required":true,"example":"55"},{"in":"query","name":"weight_kg","type":"number","description":"Weight in kilograms. Provide weight_kg or weight_lb.","required":false,"example":"70"},{"in":"query","name":"weight_lb","type":"number","description":"Weight in pounds. Converted as kg = lb * 0.45359237.","required":false,"example":"154.3236"},{"in":"query","name":"current_hrt","type":"boolean","description":"Current HRT/estrogen use (Sedrine 2002). true adds +2; false adds 0. true or false.","required":true,"example":"true"},{"in":"query","name":"prior_low_impact_fracture","type":"boolean","description":"Prior low-impact fracture (Sedrine 2002). true adds -2; false adds 0. true or false.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_weight","message":"weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/osiris","citation":{"authors":"Sedrine WB, Chevallier T, Zegels B, Kvasz A, Micheletti MC, Gelas B, Reginster JY","doi":"10.1080/gye.16.3.245.250","id":"sedrine-2002","pmid":"12192897","source":"Gynecol Endocrinol. 2002;16(3):245-250","title":"Development and assessment of the Osteoporosis Index of Risk (OSIRIS) to facilitate selection of women for bone densitometry","url":"https://doi.org/10.1080/gye.16.3.245.250"},"formula_expression":"OSIRIS = (-0.2 * age) + (0.2 * weight_kg) + (2 if current_hrt) + (-2 if prior_low_impact_fracture); low if score > +1; high if score < -3; intermediate otherwise (including exact +1 and exact -3)","purpose":"Compute the Sedrine 2002 Osteoporosis Index of Risk (OSIRIS) as (-0.2 × age) + (0.2 × weight_kg) + 2 if current HRT/estrogen use + (-2) if prior low-impact fracture, rounded to 1 decimal, then the published low, intermediate, or high band.","markdown_url":"https://magentlab.com/docs/osiris.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"osiris"},{"name":"formula_expression","type":"string","description":"Exact Sedrine 2002 expression"},{"name":"age","type":"integer","description":"Age in years used in the index"},{"name":"weight_kg","type":"number","description":"Normalized weight in kg"},{"name":"current_hrt","type":"boolean","description":"Current HRT/estrogen use used in the index"},{"name":"prior_low_impact_fracture","type":"boolean","description":"Prior low-impact fracture used in the index"},{"name":"osiris_index","type":"number","description":"Sedrine 2002 OSIRIS index, 1 decimal. Not truncated like OSTA. Not FRAX."},{"name":"risk","type":"string","description":"low (score > +1), high (score < -3), or intermediate otherwise including exact +1 and exact -3. Sedrine 2002 published band, not a diagnosis or DXA order."},{"name":"citation","type":"object","description":"Sedrine 2002 Gynecol Endocrinol citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"55","current_hrt":"true","prior_low_impact_fracture":"false","weight_kg":"70"},{"age":"55","current_hrt":"true","prior_low_impact_fracture":"false","weight_kg":"70"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/osiris","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/osiris?age=55&weight_kg=70&current_hrt=true&prior_low_impact_fracture=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/osiris","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/orai","description":"Cadarette 2000 Osteoporosis Risk Assessment Instrument (ORAI). Additive Table 4 score: age ≥75 → 15, 65–74 → 9, 55–64 → 5, 45–54 → 0; weight <60 kg → 9, 60–69 kg → 3, ≥70 kg → 0; current estrogen no → 2, yes → 0. Max 26. Score ≥9 would be selected for bone densitometry. Age 45–120; weight_kg or weight_lb. Not a medical device, not OSTA, not FRAX, not a DXA order.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (integer 45-120). Cadarette 2000 ORAI Table 4: 45-54 scores 0; 55-64 scores 5; 65-74 scores 9; >=75 scores 15. Derivation starts at 45; not the adult 18-120 clamp.","required":true,"example":"70"},{"in":"query","name":"weight_kg","type":"number","description":"Body weight in kilograms (1-500). Provide weight_kg or weight_lb. Cadarette 2000 Table 4: <60 kg scores 9; 60-69 kg scores 3; >=70 kg scores 0. 60.0 and 69.0 score 3; 70.0 scores 0. magent does not weigh the patient.","required":false,"example":"65"},{"in":"query","name":"weight_lb","type":"number","description":"Body weight in pounds (2-1100). Converted as kg = lb × 0.45359237, then Cadarette 2000 Table 4 kg bands apply. Provide weight_kg or weight_lb.","required":false,"example":"143"},{"in":"query","name":"current_estrogen","type":"boolean","description":"Current estrogen use (Cadarette 2000 Table 4). true scores 0; false scores 2. true or false.","required":true,"example":"true"}],"errors":[{"code":"invalid_orai_age","message":"age must be an integer from 45 through 120 (Cadarette 2000 ORAI Table 4; derivation starts at 45). Returned before settlement; you are not charged.","status":400},{"code":"invalid_weight","message":"weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/orai","citation":{"authors":"Cadarette SM, Jaglal SB, Kreiger N, McIsaac WJ, Darlington GA, Tu JV","id":"cadarette-2000","pmid":"10813010","source":"CMAJ. 2000;162(9):1289-1294","title":"Development and validation of the Osteoporosis Risk Assessment Instrument to facilitate selection of women for bone densitometry","url":"https://pubmed.ncbi.nlm.nih.gov/10813010"},"formula_expression":"ORAI = age_score + weight_score + estrogen_score; age >=75 -> 15, 65-74 -> 9, 55-64 -> 5, 45-54 -> 0; weight <60 kg -> 9, 60-69 kg -> 3, >=70 kg -> 0; current_estrogen false -> 2, true -> 0; max 26; select_for_dxa iff score>=9","purpose":"Sum Cadarette 2000 ORAI (age, weight, and current estrogen use) and return the Table 4 point total with select_for_dxa (score ≥9) or do_not_select.","markdown_url":"https://magentlab.com/docs/orai.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"orai"},{"name":"formula_expression","type":"string","description":"Exact Cadarette 2000 Table 4 ORAI expression"},{"name":"score","type":"integer","description":"ORAI points; published range 0-26"},{"name":"max_score","type":"integer","description":"26 (15 + 9 + 2)"},{"name":"orai_band","type":"string","description":"select_for_dxa if score ≥9, do_not_select if score <9. Cadarette 2000 selection for bone densitometry, not a DXA order."},{"name":"age","type":"integer","description":"Caller-supplied age in years used for the age band"},{"name":"weight_kg","type":"number","description":"Normalized weight in kg used for the weight band"},{"name":"current_estrogen","type":"boolean","description":"Caller-supplied current estrogen use; true scores 0, false scores 2"},{"name":"age_score","type":"integer","description":"Age band points: 0 (45-54), 5 (55-64), 9 (65-74), or 15 (≥75)"},{"name":"weight_score","type":"integer","description":"Weight band points: 9 (<60 kg), 3 (60-69 kg), or 0 (≥70 kg)"},{"name":"estrogen_score","type":"integer","description":"2 if current estrogen is false, else 0"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Cadarette 2000 CMAJ citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"70","current_estrogen":"true","weight_kg":"65"},{"age":"70","current_estrogen":"true","weight_kg":"65"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/orai","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/orai?age=70&weight_kg=65&current_estrogen=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/orai","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/eoss","description":"Sharma 2009 Edmonton Obesity Staging System (EOSS). Caller-assigned stage 0-4 with the published clinical-picture wording. magent does not assign stage from BMI or from separate medical, functional, or psychological domain scores. Not WHO BMI class. Not a diagnosis. Not a surgical-eligibility gate. magent does not examine the patient. Not a medical device.","parameters":[{"in":"query","name":"eoss_stage","type":"integer","description":"Sharma 2009 Edmonton Obesity Staging System stage 0-4 as assigned by the caller (0 no apparent obesity-related risk factors, no physical symptoms, no psychopathology, no functional limitations and/or impairment of well being; 1 obesity-related subclinical risk factor(s) OR mild physical symptoms OR mild psychopathology / mild functional limitations / mild impairment of well being; 2 established obesity-related chronic disease(s) OR moderate limitations in activities of daily living and/or well being; 3 established end-organ damage OR significant psychopathology OR significant functional limitation(s) and/or impairment of well being; 4 severe (potentially end-stage) disability/ies from obesity-related chronic diseases, severe disabling psychopathology, severe functional limitation(s) and/or severe impairment of well being). Integer 0-4 only; reject 5, -1, and non-integers. magent does not assign stage from BMI or from separate medical/functional/psychological domain scores. Not WHO BMI class. magent does not examine the patient.","required":true,"example":"0"}],"errors":[{"code":"invalid_eoss","message":"eoss_stage must be 0, 1, 2, 3, or 4 (Sharma 2009 Edmonton Obesity Staging System). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/eoss","citation":{"authors":"Sharma AM, Kushner RF","doi":"10.1038/ijo.2009.2","id":"sharma-2009","pmid":"19188927","source":"Int J Obes (Lond). 2009;33(3):289-295","title":"A proposed clinical staging system for obesity","url":"https://doi.org/10.1038/ijo.2009.2"},"formula_expression":"eoss_stage in {0, 1, 2, 3, 4} as assigned by the caller (Sharma 2009 Edmonton Obesity Staging System five stages). magent does not assign stage from BMI or from separate medical/functional/psychological domain scores. Not WHO BMI class. Not a surgical-eligibility gate. magent does not examine the patient.","purpose":"Echo the caller-assigned Sharma 2009 Edmonton Obesity Staging System stage (0-4) with the published clinical-picture description. magent does not assign stage from BMI or from domain scores. magent does not examine the patient.","markdown_url":"https://magentlab.com/docs/eoss.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"eoss"},{"name":"formula_expression","type":"string","description":"Published Sharma 2009 EOSS five-stage rule"},{"name":"eoss_stage","type":"integer","description":"Caller-assigned Sharma 2009 EOSS stage 0-4"},{"name":"description","type":"string","description":"Sharma 2009 clinical-picture wording for that stage"},{"name":"components","type":"array","description":"Per-stage Tree rows stage_0, stage_1, stage_2, stage_3, stage_4 with factor and met; exactly one is met"},{"name":"citation","type":"object","description":"Sharma 2009 Int J Obes citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"eoss_stage":"0"},{"eoss_stage":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/eoss","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/eoss?eoss_stage=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/eoss","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/ffm","description":"Boer 1984 estimated lean body mass from sex, height_cm, and weight_kg (male 0.407W+0.267H-19.2; female 0.252W+0.473H-48.3). Reports lbm_kg (paper term) with ffm_kg as the same alias. Height 100-220 cm and weight 20-300 kg are magent clamps, not Boer bands. Not a dosing weight, James/Hume formula, or measured body composition. magent does not measure the patient.","parameters":[{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"Sex used by Boer 1984 (separate male and female estimated lean-body-mass equations).","required":true,"example":"female"},{"in":"query","name":"weight_kg","type":"number","description":"Weight in kilograms (20-300, magent clamp; Boer 1984 does not publish an input band).","required":true,"example":"60"},{"in":"query","name":"height_cm","type":"number","description":"Height in centimeters (100-220, magent clamp; Boer 1984 does not publish an input band).","required":true,"example":"163"}],"errors":[{"code":"invalid_ffm","message":"Fat-free mass needs sex, weight_kg, and height_cm as used in Boer 1984. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/ffm","citation":{"authors":"Boer P","doi":"10.1152/ajprenal.1984.247.4.F632","id":"boer-1984","pmid":"6496691","source":"Am J Physiol. 1984;247(4 Pt 2):F632-F636","title":"Estimated lean body mass as an index for normalization of body fluid volumes in humans","url":"https://doi.org/10.1152/ajprenal.1984.247.4.F632"},"formula_expression":"male: LBM_kg = 0.407 × weight_kg + 0.267 × height_cm − 19.2; female: LBM_kg = 0.252 × weight_kg + 0.473 × height_cm − 48.3","purpose":"Compute Boer 1984 sex-specific estimated lean body mass from height, weight, and sex.","markdown_url":"https://magentlab.com/docs/ffm.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"boer_lbm"},{"name":"formula_expression","type":"string","description":"Exact Boer 1984 expressions used"},{"name":"sex","type":"string","description":"female or male"},{"name":"weight_kg","type":"number","description":"Weight in kg used"},{"name":"height_cm","type":"number","description":"Height in cm used"},{"name":"lbm_kg","type":"number","description":"Boer 1984 estimated lean body mass in kg, 1 decimal (paper term)"},{"name":"ffm_kg","type":"number","description":"Alias of lbm_kg; same Boer 1984 estimate, not a measured fat-free mass"},{"name":"citation","type":"object","description":"Boer 1984 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"height_cm":"163","sex":"female","weight_kg":"60"},{"height_cm":"163","sex":"female","weight_kg":"60"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/ffm","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/ffm?sex=female&weight_kg=60&height_cm=163","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/ffm","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/caroc","description":"CAROC 2010 10-year MOF category from age, sex, femoral-neck T-score, and fragility or glucocorticoid flags. Basal low/moderate/high from printed T-score bands; hip or spine fragility or multiple fractures is high; fracture after 40 plus steroids is high; either flag alone bumps one class. Labels <10%, 10-20%, >20%. Not FRAX or a drug order. Not a medical device.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years. CAROC 2010 accepts 50-89 (integer). Ages 50-85 map to the printed 5-year row; 86-89 use the 85-year row. Ages under 50 or over 89 are rejected. magent does not take a date of birth.","required":true,"example":50},{"in":"query","name":"sex","type":"string","description":"Sex used by the printed table: female or male.","required":true,"example":"female"},{"in":"query","name":"femoral_neck_t_score","type":"number","description":"Caller-assigned femoral-neck BMD T-score (-6.0 to 4.0). The NHANES III Caucasian-women reference is a densitometry convention for how that T-score was computed; this tool does not take a race input. magent does not perform DXA.","required":true,"example":-1.0},{"in":"query","name":"fragility_fracture_after_40","type":"boolean","description":"Fragility fracture after age 40 as assigned by the caller (Papaioannou 2010). true or false. Alone, bumps one class; with prolonged_glucocorticoids, risk_level is high. magent does not take a fracture history.","required":true,"example":false},{"in":"query","name":"prolonged_glucocorticoids","type":"boolean","description":"Prolonged glucocorticoids as assigned by the caller: at least 3 months in the prior year at prednisone-equivalent 7.5 mg/day or more (Papaioannou 2010). true or false. Alone, bumps one class; with fragility_fracture_after_40, risk_level is high. magent does not compute a steroid dose.","required":true,"example":false},{"in":"query","name":"hip_or_spine_fragility","type":"boolean","description":"Hip or clinical spine fragility fracture as assigned by the caller (Papaioannou 2010). true or false. When true, risk_level is high regardless of BMD. magent does not read imaging.","required":true,"example":false},{"in":"query","name":"multiple_fragility_fractures","type":"boolean","description":"Multiple fragility fractures as assigned by the caller (Papaioannou 2010). true or false. When true, risk_level is high regardless of BMD. magent does not take a fracture history.","required":true,"example":false}],"errors":[{"code":"invalid_caroc","message":"CAROC 2010 inputs must match that system's age 50-85, sex, femoral-neck T-score, and yes/no fragility-fracture and glucocorticoid flags. Returned before settlement; you are not charged.","status":400},{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/caroc","citation":{"authors":"Papaioannou A, Morin S, Cheung AM, Atkinson S, Brown JP, Feldman S, et al.","doi":"10.1503/cmaj.100771","id":"papaioannou-2010","pmid":"20940232","source":"CMAJ. 2010;182(17):1864-1873","title":"2010 clinical practice guidelines for the diagnosis and management of osteoporosis in Canada: summary","url":"https://doi.org/10.1503/cmaj.100771"},"formula_expression":"CAROC 2010 10-year MOF category from age, sex, and caller-assigned femoral-neck T-score, then clinical bumps. row_age = min(85, max(50, 5 * floor(age / 5))) for age 50-89. Basal low if T-score is strictly above the printed moderate floor; high if strictly below the moderate ceiling; moderate inclusive between. Women 50/55: low > -2.5, moderate -2.5 to -3.8, high < -3.8; 60: > -2.3 / -2.3 to -3.7 / < -3.7; 65: > -1.9 / -1.9 to -3.5 / < -3.5; 70: > -1.7 / -1.7 to -3.2 / < -3.2; 75: > -1.2 / -1.2 to -2.9 / < -2.9; 80: > -0.5 / -0.5 to -2.6 / < -2.6; 85: > +0.1 / +0.1 to -2.2 / < -2.2. Men 50/55: low > -2.5, moderate -2.5 to -3.9, high < -3.9; 60: > -2.5 / -2.5 to -3.7 / < -3.7; 65: > -2.4 / -2.4 to -3.7 / < -3.7; 70: > -2.3 / -2.3 to -3.7 / < -3.7; 75: > -2.3 / -2.3 to -3.8 / < -3.8; 80: > -2.1 / -2.1 to -3.8 / < -3.8; 85: > -2.0 / -2.0 to -3.8 / < -3.8. hip_or_spine_fragility or multiple_fragility_fractures → high; else fragility_fracture_after_40 and prolonged_glucocorticoids → high; else either of those two flags bumps one class (low→moderate, moderate→high). Labels: low <10%, moderate 10-20%, high >20% 10-year MOF. Papaioannou 2010 / Lentle table. Not FRAX.","purpose":"Apply the CAROC 2010 10-year major osteoporotic fracture category from caller-assigned age, sex, femoral-neck T-score, and yes/no fragility and glucocorticoid flags. Returns basal_risk_level from the printed T-score table and risk_level after Papaioannou 2010 clinical bumps.","markdown_url":"https://magentlab.com/docs/caroc.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"caroc"},{"name":"formula_expression","type":"string","description":"Published CAROC 2010 basal T-score bands and Papaioannou 2010 clinical bumps"},{"name":"age","type":"integer","description":"Age in years used (50-89)"},{"name":"sex","type":"string","description":"female or male"},{"name":"femoral_neck_t_score","type":"number","description":"Caller-assigned femoral-neck T-score used for the basal class"},{"name":"row_age","type":"integer","description":"Printed 5-year table row (50, 55, 60, 65, 70, 75, 80, or 85)"},{"name":"fragility_fracture_after_40","type":"boolean","description":"Echo of the fragility-fracture-after-40 flag"},{"name":"prolonged_glucocorticoids","type":"boolean","description":"Echo of the prolonged-glucocorticoid flag"},{"name":"hip_or_spine_fragility","type":"boolean","description":"Echo of the hip-or-spine fragility flag"},{"name":"multiple_fragility_fractures","type":"boolean","description":"Echo of the multiple-fragility-fracture flag"},{"name":"basal_risk_level","type":"string","description":"low, moderate, or high from the printed T-score table before clinical bumps"},{"name":"risk_level","type":"string","description":"low, moderate, or high after Papaioannou 2010 bumps. Labels: low <10%, moderate 10-20%, high >20% 10-year MOF. Not FRAX. Not a bisphosphonate order."},{"name":"ten_year_mof_label","type":"string","description":"Published CAROC 2010 label for risk_level: <10%, 10-20%, or >20%"},{"name":"components","type":"array","description":"Rows for the four clinical flags and basal_low, basal_moderate, basal_high with factor, met, and value"},{"name":"citation","type":"object","description":"Papaioannou 2010 CMAJ citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"50","femoral_neck_t_score":"-1.0","fragility_fracture_after_40":"false","hip_or_spine_fragility":"false","multiple_fragility_fractures":"false","prolonged_glucocorticoids":"false","sex":"female"},{"age":"50","femoral_neck_t_score":"-1.0","fragility_fracture_after_40":"false","hip_or_spine_fragility":"false","multiple_fragility_fractures":"false","prolonged_glucocorticoids":"false","sex":"female"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/caroc","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/caroc?age=50&sex=female&femoral_neck_t_score=-1.0&fragility_fracture_after_40=false&prolonged_glucocorticoids=false&hip_or_spine_fragility=false&multiple_fragility_fractures=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/caroc","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/maintenance-fluids","description":"Holliday–Segar 1957 daily maintenance water from weight: 100 mL/kg for the first 10 kg, 50 mL/kg for the next 10 kg, 20 mL/kg thereafter. Returns daily and hourly milliliters. Deterministic published arithmetic with citation; not a treatment order or IV prescription.","parameters":[{"in":"query","name":"weight_kg","type":"number","description":"Weight in kilograms. Provide weight_kg or weight_lb.","required":false,"example":"30"},{"in":"query","name":"weight_lb","type":"number","description":"Weight in pounds. Converted as kg = lb * 0.45359237.","required":false,"example":"66.1387"}],"errors":[{"code":"invalid_weight","message":"weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/maintenance-fluids","citation":{"authors":"Holliday MA, Segar WE","doi":"10.1542/peds.19.5.823","id":"holliday-segar-1957","source":"Pediatrics. 1957;19(5):823-832","title":"The maintenance need for water in parenteral fluid therapy","url":"https://doi.org/10.1542/peds.19.5.823"},"formula_expression":"daily_ml = 100*min(kg,10) + 50*max(0, min(kg,20)-10) + 20*max(0, kg-20); hourly_ml = daily_ml / 24","purpose":"Compute Holliday–Segar 1957 daily maintenance water from weight, plus the corresponding hourly milliliters.","markdown_url":"https://magentlab.com/docs/maintenance-fluids.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"holliday_segar"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"weight_kg","type":"number","description":"Normalized weight in kg"},{"name":"daily_ml","type":"number","description":"Holliday–Segar daily maintenance water in mL (integer if whole, else 1 decimal)"},{"name":"hourly_ml","type":"number","description":"daily_ml / 24, 1 decimal. Not the later 4-2-1 bedside rule."},{"name":"citation","type":"object","description":"Holliday and Segar Pediatrics 1957 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"weight_kg":"30"},{"weight_kg":"30"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/maintenance-fluids","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/maintenance-fluids?weight_kg=30","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/maintenance-fluids","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/parkland","description":"Adult Parkland crystalloid volume: 4 mL × kg × %TBSA for 24 hours, half in the first 8 hours from the time of injury. Baxter 1974. Deterministic published arithmetic with citation; not a treatment order, IV prescription, or urine-output titration.","parameters":[{"in":"query","name":"weight_kg","type":"number","description":"Weight in kilograms. Provide weight_kg or weight_lb.","required":false,"example":"70"},{"in":"query","name":"weight_lb","type":"number","description":"Weight in pounds. Converted as kg = lb * 0.45359237.","required":false,"example":"154.3236"},{"in":"query","name":"tbsa_percent","type":"number","description":"Percent total body surface area burned (1-100). 0 is invalid.","required":true,"example":"50"}],"errors":[{"code":"invalid_weight","message":"weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_tbsa_percent","message":"tbsa_percent must be a number from 1 to 100. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/parkland","citation":{"authors":"Baxter CR","doi":"10.1016/S0094-1298(20)30126-7","id":"baxter-1974","source":"Clin Plast Surg. 1974;1(4):693-703","title":"Fluid volume and electrolyte changes of the early postburn period","url":"https://doi.org/10.1016/S0094-1298(20)30126-7"},"formula_expression":"volume_24h_ml = 4 * weight_kg * tbsa_percent; first_8h_ml = volume_24h_ml / 2; remaining_16h_ml = volume_24h_ml / 2","purpose":"Compute adult Parkland 24-hour crystalloid volume from weight and percent TBSA, with half allotted to the first 8 hours from the time of burn.","markdown_url":"https://magentlab.com/docs/parkland.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"parkland"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"weight_kg","type":"number","description":"Normalized weight in kg"},{"name":"tbsa_percent","type":"number","description":"Percent TBSA used (1-100)"},{"name":"volume_24h_ml","type":"number","description":"Adult Parkland 24-hour crystalloid in mL, 1 decimal"},{"name":"first_8h_ml","type":"number","description":"Half of volume_24h_ml for the first 8 hours from the time of burn, 1 decimal"},{"name":"remaining_16h_ml","type":"number","description":"Half of volume_24h_ml for the remaining 16 hours, 1 decimal"},{"name":"citation","type":"object","description":"Baxter Clin Plast Surg 1974 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"tbsa_percent":"50","weight_kg":"70"},{"tbsa_percent":"50","weight_kg":"70"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/parkland","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/parkland?weight_kg=70&tbsa_percent=50","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/parkland","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/fluid-io","description":"Net fluid balance in mL: caller-assigned total intake minus total output over the same interval. Optional oral plus IV intake and urine, ultrafiltration, drain, and GI output must sum to those totals when sent (Acheampong and Vincent 2015). Does not estimate insensible losses. Not a resuscitation or diuretic order; magent does not measure I/O. Deterministic published arithmetic with citation.","parameters":[{"in":"query","name":"total_intake_ml","type":"number","description":"Caller-assigned total fluid intake in mL over the interval (0-100000). Acheampong 2015: sum of intravenous and oral fluids. magent does not measure intake.","required":true,"example":2500},{"in":"query","name":"total_output_ml","type":"number","description":"Caller-assigned total fluid output in mL over the same interval (0-100000). Acheampong 2015: urine, ultrafiltration, drain fluid, and estimated gastrointestinal losses. magent does not measure output.","required":true,"example":1800},{"in":"query","name":"oral_intake_ml","type":"number","description":"Optional oral intake in mL (0-100000). When any intake addend is sent, oral_intake_ml + iv_intake_ml (missing as 0) must equal total_intake_ml.","required":false,"example":500},{"in":"query","name":"iv_intake_ml","type":"number","description":"Optional intravenous intake in mL (0-100000). When any intake addend is sent, oral_intake_ml + iv_intake_ml (missing as 0) must equal total_intake_ml.","required":false,"example":2000},{"in":"query","name":"urine_output_ml","type":"number","description":"Optional urine output in mL (0-100000). When any output addend is sent, urine + ultrafiltration + drain + GI (missing as 0) must equal total_output_ml.","required":false,"example":1500},{"in":"query","name":"ultrafiltration_ml","type":"number","description":"Optional ultrafiltration volume in mL (0-100000). When any output addend is sent, the output addends (missing as 0) must equal total_output_ml.","required":false,"example":0},{"in":"query","name":"drain_output_ml","type":"number","description":"Optional drain fluid in mL (0-100000). When any output addend is sent, the output addends (missing as 0) must equal total_output_ml.","required":false,"example":200},{"in":"query","name":"gi_output_ml","type":"number","description":"Optional estimated gastrointestinal losses in mL (0-100000). Acheampong 2015 counted stool only with profound diarrhea. When any output addend is sent, the output addends (missing as 0) must equal total_output_ml. magent does not estimate insensible loss.","required":false,"example":100}],"errors":[{"code":"invalid_fluid_io","message":"Fluid-balance inputs must match caller-assigned intake and output volumes as published. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/fluid-io","citation":{"authors":"Acheampong A, Vincent JL","doi":"10.1186/s13054-015-0970-1","id":"acheampong-2015","pmid":"26073560","source":"Crit Care. 2015;19(1):251","title":"A positive fluid balance is an independent prognostic factor in patients with sepsis","url":"https://doi.org/10.1186/s13054-015-0970-1"},"formula_expression":"net_balance_ml = total_intake_ml - total_output_ml","purpose":"Compute net fluid balance in mL as caller-assigned total intake minus total output over the same interval, with a positive, negative, or zero label from the sign of that difference.","markdown_url":"https://magentlab.com/docs/fluid-io.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"acheampong_2015"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"total_intake_ml","type":"number","description":"Caller-assigned total intake in mL used in the subtraction"},{"name":"total_output_ml","type":"number","description":"Caller-assigned total output in mL used in the subtraction"},{"name":"net_balance_ml","type":"number","description":"total_intake_ml minus total_output_ml, 1 decimal then integer when whole"},{"name":"balance_label","type":"string","description":"positive (net_balance_ml > 0), negative (net_balance_ml < 0), or zero (net_balance_ml = 0). A sign label, not a fluid order."},{"name":"citation","type":"object","description":"Acheampong and Vincent Crit Care 2015 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"total_intake_ml":"2500","total_output_ml":"1800"},{"total_intake_ml":"2500","total_output_ml":"1800"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/fluid-io","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/fluid-io?total_intake_ml=2500&total_output_ml=1800","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/fluid-io","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rule-of-nines","description":"Adult Wallace 1951 rule of nines: percent TBSA from eight region fractions (0 none, 0.5 half, 1 full) using head 9, each arm 9, anterior trunk 18, posterior trunk 18, each leg 18, perineum 1. magent does not examine the burn. Not Lund-Browder and not a Parkland fluid order (Parkland takes tbsa_percent separately).","parameters":[{"in":"query","name":"head","type":"number","enum":[0,0.5,1],"description":"Caller-assigned Wallace 1951 adult head involvement (0 none, 0.5 half, 1 full). Full involvement is 9%. magent does not examine the burn.","required":true,"example":"0"},{"in":"query","name":"arm_left","type":"number","enum":[0,0.5,1],"description":"Caller-assigned Wallace 1951 adult arm_left involvement (0 none, 0.5 half, 1 full). Full involvement is 9%. magent does not examine the burn.","required":true,"example":"0"},{"in":"query","name":"arm_right","type":"number","enum":[0,0.5,1],"description":"Caller-assigned Wallace 1951 adult arm_right involvement (0 none, 0.5 half, 1 full). Full involvement is 9%. magent does not examine the burn.","required":true,"example":"0"},{"in":"query","name":"anterior_trunk","type":"number","enum":[0,0.5,1],"description":"Caller-assigned Wallace 1951 adult anterior_trunk involvement (0 none, 0.5 half, 1 full). Full involvement is 18%. magent does not examine the burn.","required":true,"example":"1"},{"in":"query","name":"posterior_trunk","type":"number","enum":[0,0.5,1],"description":"Caller-assigned Wallace 1951 adult posterior_trunk involvement (0 none, 0.5 half, 1 full). Full involvement is 18%. magent does not examine the burn.","required":true,"example":"0"},{"in":"query","name":"leg_left","type":"number","enum":[0,0.5,1],"description":"Caller-assigned Wallace 1951 adult leg_left involvement (0 none, 0.5 half, 1 full). Full involvement is 18%. magent does not examine the burn.","required":true,"example":"0"},{"in":"query","name":"leg_right","type":"number","enum":[0,0.5,1],"description":"Caller-assigned Wallace 1951 adult leg_right involvement (0 none, 0.5 half, 1 full). Full involvement is 18%. magent does not examine the burn.","required":true,"example":"0"},{"in":"query","name":"perineum","type":"number","enum":[0,0.5,1],"description":"Caller-assigned Wallace 1951 adult perineum involvement (0 none, 0.5 half, 1 full). Full involvement is 1%. magent does not examine the burn.","required":true,"example":"0"}],"errors":[{"code":"invalid_region_fraction","message":"each burn region must be 0, 0.5, or 1 (Wallace 1951 adult rule of nines). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rule-of-nines","citation":{"authors":"Wallace AB","doi":"10.1016/s0140-6736(51)91975-7","id":"wallace-1951","pmid":"14805109","source":"Lancet. 1951;1(6653):501-504","title":"The exposure treatment of burns","url":"https://doi.org/10.1016/s0140-6736(51)91975-7"},"formula_expression":"tbsa_percent = head*9 + arm_left*9 + arm_right*9 + anterior_trunk*18 + posterior_trunk*18 + leg_left*18 + leg_right*18 + perineum*1 (Wallace 1951 adult percents; each factor is 0, 0.5, or 1)","purpose":"Sum Wallace 1951 adult region percents from caller-assigned none/half/full fractions to a percent TBSA.","markdown_url":"https://magentlab.com/docs/rule-of-nines.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rule_of_nines"},{"name":"formula_expression","type":"string","description":"Exact Wallace 1951 adult expression used"},{"name":"head","type":"number","description":"Parsed involvement fraction 0, 0.5, or 1 (Wallace adult 9% when full)"},{"name":"arm_left","type":"number","description":"Parsed involvement fraction 0, 0.5, or 1 (Wallace adult 9% when full)"},{"name":"arm_right","type":"number","description":"Parsed involvement fraction 0, 0.5, or 1 (Wallace adult 9% when full)"},{"name":"anterior_trunk","type":"number","description":"Parsed involvement fraction 0, 0.5, or 1 (Wallace adult 18% when full)"},{"name":"posterior_trunk","type":"number","description":"Parsed involvement fraction 0, 0.5, or 1 (Wallace adult 18% when full)"},{"name":"leg_left","type":"number","description":"Parsed involvement fraction 0, 0.5, or 1 (Wallace adult 18% when full)"},{"name":"leg_right","type":"number","description":"Parsed involvement fraction 0, 0.5, or 1 (Wallace adult 18% when full)"},{"name":"perineum","type":"number","description":"Parsed involvement fraction 0, 0.5, or 1 (Wallace adult 1% when full)"},{"name":"tbsa_percent","type":"number","description":"Sum of region fraction × Wallace adult percent (max 100)"},{"name":"citation","type":"object","description":"Wallace Lancet 1951 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"anterior_trunk":"1","arm_left":"0","arm_right":"0","head":"0","leg_left":"0","leg_right":"0","perineum":"0","posterior_trunk":"0"},{"anterior_trunk":"1","arm_left":"0","arm_right":"0","head":"0","leg_left":"0","leg_right":"0","perineum":"0","posterior_trunk":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rule-of-nines","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rule-of-nines?head=0&arm_left=0&arm_right=0&anterior_trunk=1&posterior_trunk=0&leg_left=0&leg_right=0&perineum=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rule-of-nines","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/nice-iv-maintenance","description":"NICE CG174 adult hospital routine maintenance: 20, 25, or 30 mL/kg/day water times dosing weight, about 1 mmol/kg/day sodium, potassium, and chloride each, and 50–100 g/day glucose. Flags water over 2.5 L without capping. Not 4-2-1, not Holliday–Segar, not a fluid-type order. Caller assigns IBW when obese. Deterministic published arithmetic with citation.","parameters":[{"in":"query","name":"weight_kg","type":"number","description":"Dosing weight in kilograms (1-500). Provide weight_kg or weight_lb. For obesity, caller assigns ideal body weight (CG174 1.4.2); magent does not compute IBW.","required":false,"example":"70"},{"in":"query","name":"weight_lb","type":"number","description":"Dosing weight in pounds (2-1100). Converted as kg = lb * 0.45359237.","required":false,"example":"154.3236"},{"in":"query","name":"ml_per_kg_day","type":"integer","description":"Routine maintenance water rate: 30 (1.4.1 upper initial 25-30), 25 (1.4.1 lower or 1.4.3 reduced upper), or 20 (1.4.3 reduced initial). Integers 20, 25, or 30 only.","required":true,"example":"25"}],"errors":[{"code":"invalid_nice_iv_maintenance","message":"NICE CG174 adult maintenance inputs must match dosing weight and water rate 20, 25, or 30 mL/kg/day from that guideline. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/nice-iv-maintenance","citation":{"authors":"National Institute for Health and Care Excellence","id":"nice-cg174","source":"NICE Clinical Guideline CG174. 2013 (updated 2017)","title":"Intravenous fluid therapy in adults in hospital","url":"https://www.nice.org.uk/guidance/cg174"},"formula_expression":"water_ml_day = ml_per_kg_day * weight_kg; electrolyte_mmol_day = 1 * weight_kg; glucose_g_day_low = 50; glucose_g_day_high = 100","purpose":"Compute NICE CG174 adult hospital routine maintenance water (20, 25, or 30 mL/kg/day), approximately 1 mmol/kg/day sodium, potassium, and chloride each, and the fixed 50–100 g/day glucose range.","markdown_url":"https://magentlab.com/docs/nice-iv-maintenance.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"nice_cg174"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"weight_kg","type":"number","description":"Normalized dosing weight in kg"},{"name":"ml_per_kg_day","type":"integer","description":"Caller-chosen 20, 25, or 30 mL/kg/day water rate"},{"name":"water_ml_day","type":"number","description":"ml_per_kg_day * weight_kg, 1 decimal then integer when whole. Not capped."},{"name":"electrolyte_mmol_day","type":"integer","description":"Approximately 1 mmol/kg/day sodium, potassium, and chloride each"},{"name":"glucose_g_day_low","type":"integer","description":"Fixed CG174 1.4.1 lower glucose, 50 g/day"},{"name":"glucose_g_day_high","type":"integer","description":"Fixed CG174 1.4.1 upper glucose, 100 g/day"},{"name":"exceeds_2500_ml","type":"boolean","description":"true when water_ml_day > 2500 (CG174 1.4.4 warning; volume is not capped)"},{"name":"citation","type":"object","description":"NICE CG174 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"ml_per_kg_day":"25","weight_kg":"70"},{"ml_per_kg_day":"25","weight_kg":"70"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/nice-iv-maintenance","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/nice-iv-maintenance?weight_kg=70&ml_per_kg_day=25","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/nice-iv-maintenance","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/iv-drip","description":"INS gravity drip rate: gtt/min = (volume_ml × drop_factor_gtt_ml) / time_min, rounded half away from zero to an integer. Drop factor 10, 15, or 20 gtt/mL macrodrip or 60 gtt/mL microdrip. Also reports mL/hour. Not a pump program, drug order, or device. Deterministic published arithmetic with citation.","parameters":[{"in":"query","name":"volume_ml","type":"number","description":"Infused volume in mL (1-10000, magent clamp). Caller-assigned bag or syringe volume; magent does not choose a fluid.","required":true,"example":1000},{"in":"query","name":"time_min","type":"integer","description":"Infusion duration in minutes (1-1440, magent clamp). Convert hours to minutes before calling (8 hours = 480).","required":true,"example":480},{"in":"query","name":"drop_factor_gtt_ml","type":"integer","enum":[10,15,20,60],"description":"Administration-set drop factor in gtt/mL printed on the tubing package: 10, 15, or 20 (macrodrip) or 60 (microdrip). Integers 10, 15, 20, or 60 only. magent does not choose tubing.","required":true,"example":15}],"errors":[{"code":"invalid_iv_drip","message":"IV drip-rate inputs must match volume, time, and drop factor as published for gtt/min. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/iv-drip","citation":{"authors":"Gorski LA, Hadaway L, Hagle ME, Broadhurst D, Clare S, Kleidon T, Meyer BM, Nickel B, Rowley S, Sharpe E, Alexander M","doi":"10.1097/NAN.0000000000000396","id":"gorski-ins-infusion-standards","pmid":"33394637","source":"J Infus Nurs. 2021;44(1S Suppl 1):S1-S224","title":"Infusion Therapy Standards of Practice, 8th Edition","url":"https://doi.org/10.1097/NAN.0000000000000396"},"formula_expression":"gtt_per_min = round_half_away((volume_ml * drop_factor_gtt_ml) / time_min); ml_per_hour = volume_ml / (time_min / 60)","purpose":"Compute a gravity infusion rate in drops per minute from volume, duration, and the administration-set drop factor (10, 15, or 20 gtt/mL macrodrip or 60 gtt/mL microdrip), and the equivalent mL/hour.","markdown_url":"https://magentlab.com/docs/iv-drip.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"iv_drip"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"volume_ml","type":"number","description":"Volume in mL used in the rate"},{"name":"time_min","type":"integer","description":"Duration in minutes used in the rate"},{"name":"drop_factor_gtt_ml","type":"integer","description":"Caller-assigned 10, 15, 20, or 60 gtt/mL"},{"name":"gtt_per_min","type":"integer","description":"Gravity drip rate in drops per minute, rounded half away from zero to an integer"},{"name":"ml_per_hour","type":"number","description":"volume_ml / (time_min / 60), 1 decimal then integer when whole"},{"name":"citation","type":"object","description":"INS Infusion Therapy Standards citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"drop_factor_gtt_ml":"15","time_min":"480","volume_ml":"1000"},{"drop_factor_gtt_ml":"15","time_min":"480","volume_ml":"1000"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/iv-drip","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/iv-drip?volume_ml=1000&time_min=480&drop_factor_gtt_ml=15","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/iv-drip","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/nice-pediatric-iv","description":"NICE NG29 (2015, updated 2020) pediatric IV maintenance for children and young people: Holliday–Segar daily 100/50/20 mL/kg, then male 2500 mL or female 2000 mL 24-hour caps, then ADH-risk restriction at 50%, 80%, or 100% of the capped volume. Hourly is restricted/24, not 4-2-1. Not a prescription, not neonate day-of-life volumes, and not adult CG174.","parameters":[{"in":"query","name":"weight_kg","type":"number","description":"Weight in kilograms (1-500). Provide weight_kg or weight_lb.","required":false,"example":"30"},{"in":"query","name":"weight_lb","type":"number","description":"Weight in pounds (2-1100). Converted as kg = lb * 0.45359237.","required":false,"example":"66.1387"},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"Sex for the NICE NG29 1.4.1 24-hour cap (female 2000 mL; male 2500 mL).","required":true,"example":"female"},{"in":"query","name":"restriction_percent","type":"integer","enum":[50,80,100],"description":"NICE NG29 1.4.9 ADH-risk restriction as a percent of the capped daily volume. 50, 80, or 100 (100 = no restriction).","required":true,"example":"100"}],"errors":[{"code":"invalid_nice_pediatric_iv","message":"NICE NG29 pediatric maintenance inputs must match Holliday-Segar weight, sex for the 2000/2500 mL cap, and restriction_percent 50, 80, or 100 from that guideline. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/nice-pediatric-iv","citation":{"authors":"National Institute for Health and Care Excellence","id":"nice-ng29","source":"NICE Guideline NG29. 2015 (updated 2020)","title":"Intravenous fluid therapy in children and young people in hospital","url":"https://www.nice.org.uk/guidance/ng29"},"formula_expression":"holliday_ml = 100*min(kg,10) + 50*max(0, min(kg,20)-10) + 20*max(0, kg-20); capped_ml = min(holliday_ml, male 2500 else 2000); restricted_ml = capped_ml * restriction_percent / 100; hourly_ml = restricted_ml / 24","purpose":"Compute NICE NG29 routine IV maintenance for children and young people from Holliday–Segar daily volume, the 1.4.1 sex cap, and the 1.4.9 ADH-risk restriction.","markdown_url":"https://magentlab.com/docs/nice-pediatric-iv.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"nice_ng29"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"weight_kg","type":"number","description":"Normalized weight in kg"},{"name":"sex","type":"string","description":"female or male"},{"name":"restriction_percent","type":"integer","description":"50, 80, or 100 (100 = no restriction)"},{"name":"holliday_ml","type":"number","description":"Holliday–Segar daily maintenance water in mL before the 1.4.1 cap"},{"name":"capped_ml","type":"number","description":"min(holliday_ml, 2500 if male else 2000) from NICE NG29 1.4.1"},{"name":"restricted_ml","type":"number","description":"capped_ml * restriction_percent / 100 from NICE NG29 1.4.9"},{"name":"hourly_ml","type":"number","description":"restricted_ml / 24, 1 decimal. Not the later 4-2-1 bedside rule."},{"name":"citation","type":"object","description":"NICE NG29 2015 (updated 2020) citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"restriction_percent":"100","sex":"female","weight_kg":"30"},{"restriction_percent":"100","sex":"female","weight_kg":"30"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/nice-pediatric-iv","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/nice-pediatric-iv?weight_kg=30&sex=female&restriction_percent=100","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/nice-pediatric-iv","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/map","description":"Mean arterial pressure from cuff systolic and diastolic BP using diastolic + pulse pressure / 3. Conventional 1/3 estimate, not an invasive aortic mean. Deterministic published arithmetic with citation; not a treatment target.","parameters":[{"in":"query","name":"systolic_mm_hg","type":"number","description":"Cuff systolic blood pressure in mm Hg (50-250).","required":true,"example":"120"},{"in":"query","name":"diastolic_mm_hg","type":"number","description":"Cuff diastolic blood pressure in mm Hg (20-160). Must be less than systolic.","required":true,"example":"80"}],"errors":[{"code":"invalid_systolic_bp","message":"systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.","status":400},{"code":"invalid_diastolic_bp","message":"diastolic_mm_hg must be a number from 20 to 160. Returned before settlement; you are not charged.","status":400},{"code":"invalid_pulse_pressure","message":"diastolic_mm_hg must be less than systolic_mm_hg. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/map","citation":{"authors":"Sesso HD, Stampfer MJ, Rosner B, et al.","doi":"10.1161/01.HYP.36.5.801","id":"sesso-2000","source":"Hypertension. 2000;36(5):801-807","title":"Systolic and diastolic blood pressure, pulse pressure, and mean arterial pressure as predictors of cardiovascular disease risk in men","url":"https://doi.org/10.1161/01.HYP.36.5.801"},"formula_expression":"MAP_mm_hg = diastolic_mm_hg + (systolic_mm_hg - diastolic_mm_hg) / 3","purpose":"Compute conventional estimated mean arterial pressure from cuff systolic and diastolic pressures.","markdown_url":"https://magentlab.com/docs/map.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"map"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"systolic_mm_hg","type":"number","description":"Systolic pressure used"},{"name":"diastolic_mm_hg","type":"number","description":"Diastolic pressure used"},{"name":"pulse_pressure_mm_hg","type":"number","description":"Systolic minus diastolic, mm Hg"},{"name":"map_mm_hg","type":"number","description":"Estimated MAP in mm Hg, 1 decimal"},{"name":"citation","type":"object","description":"Sesso 2000 Hypertension citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"diastolic_mm_hg":"80","systolic_mm_hg":"120"},{"diastolic_mm_hg":"80","systolic_mm_hg":"120"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/map","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/map?systolic_mm_hg=120&diastolic_mm_hg=80","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/map","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/shock-index","description":"Shock index as heart rate in bpm divided by cuff systolic pressure in mm Hg (Allgöwer and Burri 1967). Returns the original ratio rounded to two decimals. Not a shock diagnosis, treatment target, or cutoff, and does not use MAP or diastolic pressure.","parameters":[{"in":"query","name":"heart_rate_bpm","type":"integer","description":"Heart rate in beats per minute (integer 30-220).","required":true,"example":"80"},{"in":"query","name":"systolic_mm_hg","type":"number","description":"Cuff systolic blood pressure in mm Hg (50-250).","required":true,"example":"120"}],"errors":[{"code":"invalid_heart_rate","message":"heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.","status":400},{"code":"invalid_systolic_bp","message":"systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/shock-index","citation":{"authors":"Allgöwer M, Burri C","doi":"10.1055/s-0028-1106070","id":"allgower-burri-1967","source":"Dtsch Med Wochenschr. 1967;92(43):1947-1950","title":"Shock index","url":"https://doi.org/10.1055/s-0028-1106070"},"formula_expression":"shock_index = heart_rate_bpm / systolic_mm_hg","purpose":"Compute the Allgöwer–Burri shock index as heart rate in bpm divided by cuff systolic pressure in mm Hg.","markdown_url":"https://magentlab.com/docs/shock-index.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"shock_index"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"heart_rate_bpm","type":"integer","description":"Heart rate used, bpm"},{"name":"systolic_mm_hg","type":"number","description":"Systolic pressure used, mm Hg"},{"name":"shock_index","type":"number","description":"Heart rate divided by systolic pressure, 2 decimals"},{"name":"citation","type":"object","description":"Allgöwer and Burri 1967 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"heart_rate_bpm":"80","systolic_mm_hg":"120"},{"heart_rate_bpm":"80","systolic_mm_hg":"120"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/shock-index","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/shock-index?heart_rate_bpm=80&systolic_mm_hg=120","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/shock-index","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/cpo","description":"Fincke 2004 cardiac power output from MAP (mm Hg) and cardiac output (L/min): CPO = MAP × CO / 451. Returns cpo_watts to two decimals and the paper ROC band (<=0.53 or >0.53) from the unrounded value. Equality at 0.53 W is <=0.53. MAP is caller-supplied (Fincke used diastolic + (systolic−diastolic)/3); this tool does not take SBP/DBP or compute cardiac power index. Not a medical device, shock diagnosis, or treatment target.","parameters":[{"in":"query","name":"map_mm_hg","type":"number","description":"Mean arterial pressure in mm Hg (30-180). Fincke 2004 used diastolic + (systolic−diastolic)/3. Callers may send MAP from /api/calc/map; this tool does not take SBP or DBP.","required":true,"example":"90"},{"in":"query","name":"cardiac_output_l_min","type":"number","description":"Cardiac output in L/min (0.5-20). Not indexed to body surface area.","required":true,"example":"5"}],"errors":[{"code":"invalid_map_mm_hg","message":"map_mm_hg must be a number from 30 to 180. Returned before settlement; you are not charged.","status":400},{"code":"invalid_cardiac_output","message":"cardiac_output_l_min must be a number from 0.5 to 20 (Fincke 2004 CPO). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/cpo","citation":{"authors":"Fincke R, Hochman JS, Lowe AM, et al.","doi":"10.1016/j.jacc.2004.03.060","id":"fincke-2004","pmid":"15261929","source":"J Am Coll Cardiol. 2004;44(2):340-348","title":"Cardiac power is the strongest hemodynamic correlate of mortality in cardiogenic shock: a report from the SHOCK trial registry","url":"https://doi.org/10.1016/j.jacc.2004.03.060"},"formula_expression":"cpo_watts = map_mm_hg * cardiac_output_l_min / 451","purpose":"Compute Fincke 2004 cardiac power output in watts from mean arterial pressure and cardiac output.","markdown_url":"https://magentlab.com/docs/cpo.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"cpo"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"map_mm_hg","type":"number","description":"Mean arterial pressure used, mm Hg"},{"name":"cardiac_output_l_min","type":"number","description":"Cardiac output used, L/min"},{"name":"cpo_watts","type":"number","description":"Cardiac power output in watts, 2 decimals"},{"name":"band","type":"string","description":"Fincke 2004 ROC cutpoint from the unrounded CPO: <=0.53 or >0.53. Equality at 0.53 W is <=0.53."},{"name":"citation","type":"object","description":"Fincke 2004 SHOCK registry citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"cardiac_output_l_min":"5","map_mm_hg":"90"},{"cardiac_output_l_min":"5","map_mm_hg":"90"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/cpo","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/cpo?map_mm_hg=90&cardiac_output_l_min=5","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/cpo","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/fick","description":"Fick 1870 cardiac output: CO (L/min) = VO2 (ml/min) / (CaO2 - CvO2) with contents in ml/L (ml/dL x10). Caller supplies the three measured terms. Does not estimate VO2 from BSA or apply Hufner Hb factors. Rejects CaO2 <= CvO2. Not a catheter order, shock diagnosis, or medical device. magent does not sample blood.","parameters":[{"in":"query","name":"vo2_ml_min","type":"number","description":"Measured oxygen consumption in ml/min (50-2000, magent clamp; Fick 1870 does not publish an input band). Caller supplies the measured term. magent does not estimate VO2 from BSA or assume 125 ml/min/m².","required":true,"example":"250"},{"in":"query","name":"cao2_ml_l","type":"number","description":"Arterial oxygen content in ml/L (50-400, magent clamp). Provide this or cao2_ml_dl, not both. magent does not compute content from hemoglobin or Hüfner factors.","required":false,"example":"200"},{"in":"query","name":"cvo2_ml_l","type":"number","description":"Mixed-venous oxygen content in ml/L (20-350, magent clamp). Provide this or cvo2_ml_dl, not both. Must be less than CaO2. magent does not sample mixed-venous blood.","required":false,"example":"150"},{"in":"query","name":"cao2_ml_dl","type":"number","description":"Arterial oxygen content in ml/dL (5-40, magent clamp). Converted as ml/L = ml/dL × 10. Provide this or cao2_ml_l, not both.","required":false,"example":"20"},{"in":"query","name":"cvo2_ml_dl","type":"number","description":"Mixed-venous oxygen content in ml/dL (2-35, magent clamp). Converted as ml/L = ml/dL × 10. Provide this or cvo2_ml_l, not both. Must be less than CaO2 after conversion.","required":false,"example":"15"}],"errors":[{"code":"invalid_fick","message":"Fick cardiac output inputs must be numeric oxygen consumption and arterial and mixed-venous oxygen contents from that principle. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/fick","citation":{"authors":"Fick A","id":"fick-1870","source":"Sitzungsberichte der Physikalisch-Medizinischen Gesellschaft zu Würzburg. 1870;XVI-XVII","title":"Ueber die Messung des Blutquantums in den Herzventrikeln","url":"https://digitalesammlungen.uni-weimar.de/viewer/metadata/lit26189/1/"},"formula_expression":"cardiac_output_l_min = vo2_ml_min / (cao2_ml_l - cvo2_ml_l)","purpose":"Compute Fick 1870 cardiac output in L/min from measured oxygen consumption and arterial and mixed-venous oxygen contents.","markdown_url":"https://magentlab.com/docs/fick.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"fick"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"vo2_ml_min","type":"number","description":"Measured oxygen consumption used, ml/min"},{"name":"cao2_ml_l","type":"number","description":"Arterial oxygen content used, ml/L (ml/dL inputs converted ×10)"},{"name":"cvo2_ml_l","type":"number","description":"Mixed-venous oxygen content used, ml/L (ml/dL inputs converted ×10)"},{"name":"avo2_difference_ml_l","type":"number","description":"CaO2 minus CvO2 in ml/L, 1 decimal"},{"name":"cardiac_output_l_min","type":"number","description":"Fick cardiac output in L/min, 1 decimal"},{"name":"citation","type":"object","description":"Fick 1870 Würzburg citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"cao2_ml_l":"200","cvo2_ml_l":"150","vo2_ml_min":"250"},{"cao2_ml_l":"200","cvo2_ml_l":"150","vo2_ml_min":"250"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/fick","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/fick?vo2_ml_min=250&cao2_ml_l=200&cvo2_ml_l=150","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/fick","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/dsi","description":"Diastolic shock index as heart rate in bpm divided by cuff diastolic pressure in mm Hg (Ospina-Tascón 2020). Returns the ratio rounded to two decimals. Not a shock diagnosis, treatment target, or cutoff. Distinct from Allgöwer–Burri HR/SBP shock index. The 2020 cohort had no normal-subject control group, so a DSI cutoff to identify abnormality could be misleading.","parameters":[{"in":"query","name":"heart_rate_bpm","type":"integer","description":"Heart rate in beats per minute (integer 30-220).","required":true,"example":"80"},{"in":"query","name":"diastolic_mm_hg","type":"number","description":"Cuff diastolic blood pressure in mm Hg (20-160).","required":true,"example":"80"}],"errors":[{"code":"invalid_heart_rate","message":"heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.","status":400},{"code":"invalid_diastolic_bp","message":"diastolic_mm_hg must be a number from 20 to 160. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/dsi","citation":{"authors":"Ospina-Tascón GA, Teboul JL, Hernandez G, et al.","doi":"10.1186/s13613-020-00658-8","id":"ospina-tascon-2020","pmid":"32296976","source":"Ann Intensive Care. 2020;10(1):41","title":"Diastolic shock index and clinical outcomes in patients with septic shock.","url":"https://doi.org/10.1186/s13613-020-00658-8"},"formula_expression":"dsi = heart_rate_bpm / diastolic_mm_hg","purpose":"Compute the Ospina-Tascón diastolic shock index as heart rate in bpm divided by cuff diastolic pressure in mm Hg.","markdown_url":"https://magentlab.com/docs/dsi.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"dsi"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"heart_rate_bpm","type":"integer","description":"Heart rate used, bpm"},{"name":"diastolic_mm_hg","type":"number","description":"Diastolic pressure used, mm Hg"},{"name":"dsi","type":"number","description":"Heart rate divided by diastolic pressure, 2 decimals"},{"name":"citation","type":"object","description":"Ospina-Tascón 2020 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"diastolic_mm_hg":"80","heart_rate_bpm":"80"},{"diastolic_mm_hg":"80","heart_rate_bpm":"80"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/dsi","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/dsi?heart_rate_bpm=80&diastolic_mm_hg=80","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/dsi","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/papi","description":"Korabathina 2012 pulmonary artery pulsatility index from PA systolic (mm Hg), PA diastolic (mm Hg), and RAP (mm Hg): PAPi = (PAS − PAD) / RAP. Returns papi to two decimals and the paper ROC band (<=0.9 or >0.9) from the unrounded ratio. Equality at 0.9 is <=0.9. RAP 0 is invalid (no RAP=1 substitution). Not a medical device, RV-failure diagnosis, or device threshold.","parameters":[{"in":"query","name":"pa_systolic_mm_hg","type":"number","description":"Pulmonary artery systolic pressure in mm Hg (10-150). Invasive catheter number; this tool does not read waveforms.","required":true,"example":"30"},{"in":"query","name":"pa_diastolic_mm_hg","type":"number","description":"Pulmonary artery diastolic pressure in mm Hg (1-80). Must be less than PA systolic.","required":true,"example":"12"},{"in":"query","name":"ra_mm_hg","type":"number","description":"Right atrial pressure in mm Hg (1-40). RAP 0 is invalid; Korabathina 2012 did not substitute RAP=1.","required":true,"example":"6"}],"errors":[{"code":"invalid_pa_systolic","message":"pa_systolic_mm_hg must be a number from 10 to 150 (Korabathina 2012 PAPi). Returned before settlement; you are not charged.","status":400},{"code":"invalid_pa_diastolic","message":"pa_diastolic_mm_hg must be a number from 1 to 80 (Korabathina 2012 PAPi). Returned before settlement; you are not charged.","status":400},{"code":"invalid_ra_pressure","message":"ra_mm_hg must be a number from 1 to 40 (Korabathina 2012 PAPi; RAP 0 is not scored). Returned before settlement; you are not charged.","status":400},{"code":"invalid_pa_pulse_pressure","message":"pa_diastolic_mm_hg must be less than pa_systolic_mm_hg (Korabathina 2012 PAPi). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/papi","citation":{"authors":"Korabathina R, Heffernan KS, Paruchuri V, et al.","doi":"10.1002/ccd.23309","id":"korabathina-2012","pmid":"21954053","source":"Catheter Cardiovasc Interv. 2012;80(4):593-600","title":"The pulmonary artery pulsatility index identifies severe right ventricular dysfunction in acute inferior myocardial infarction.","url":"https://doi.org/10.1002/ccd.23309"},"formula_expression":"papi = (pa_systolic_mm_hg - pa_diastolic_mm_hg) / ra_mm_hg","purpose":"Compute Korabathina 2012 pulmonary artery pulsatility index from PA systolic, PA diastolic, and right atrial pressure.","markdown_url":"https://magentlab.com/docs/papi.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"papi"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"pa_systolic_mm_hg","type":"number","description":"Pulmonary artery systolic pressure used, mm Hg"},{"name":"pa_diastolic_mm_hg","type":"number","description":"Pulmonary artery diastolic pressure used, mm Hg"},{"name":"ra_mm_hg","type":"number","description":"Right atrial pressure used, mm Hg"},{"name":"papi","type":"number","description":"Pulmonary artery pulsatility index, 2 decimals"},{"name":"band","type":"string","description":"Korabathina 2012 ROC cut-point from the unrounded PAPi: <=0.9 or >0.9. Equality at 0.9 is <=0.9."},{"name":"citation","type":"object","description":"Korabathina 2012 PAPi citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"pa_diastolic_mm_hg":"12","pa_systolic_mm_hg":"30","ra_mm_hg":"6"},{"pa_diastolic_mm_hg":"12","pa_systolic_mm_hg":"30","ra_mm_hg":"6"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/papi","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/papi?pa_systolic_mm_hg=30&pa_diastolic_mm_hg=12&ra_mm_hg=6","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/papi","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/adhere","description":"Fonarow 2005 ADHERE CART bedside tree from admission BUN, systolic BP, and serum creatinine. high: BUN>=43, SBP<115, Cr>=2.75; intermediate_1: BUN>=43, SBP<115, Cr<2.75; intermediate_2: BUN>=43, SBP>=115; intermediate_3: BUN<43, SBP<115; low: BUN<43, SBP>=115. Creatinine consulted only when BUN>=43 and SBP<115. CART tree only, not the logistic model or GWTG-HF. Not a heart-failure diagnosis or treatment/ICU order.","parameters":[{"in":"query","name":"bun_mg_dl","type":"number","description":"Admission blood urea nitrogen in mg/dL (1-200). Fonarow 2005 CART first split is BUN >= 43. magent does not measure BUN.","required":true,"example":"20"},{"in":"query","name":"systolic_bp_mm_hg","type":"integer","description":"Admission systolic blood pressure in mm Hg (integer 50-250). Fonarow 2005 CART second split is SBP < 115. magent does not measure blood pressure.","required":true,"example":"140"},{"in":"query","name":"creatinine_mg_dl","type":"number","description":"Admission serum creatinine in mg/dL (0.1-20). Provide this or creatinine_umol_l, not both. Fonarow 2005 CART consults creatinine only when BUN >= 43 and SBP < 115; the split is creatinine >= 2.75. magent does not measure creatinine.","required":false,"example":"1.0"},{"in":"query","name":"creatinine_umol_l","type":"number","description":"Admission serum creatinine in µmol/L (9-1768). Converted as mg/dL = µmol/L / 88.42. Provide this or creatinine_mg_dl, not both.","required":false,"example":"88.4"}],"errors":[{"code":"invalid_bun","message":"bun_mg_dl must be a number from 1 to 200. Returned before settlement; you are not charged.","status":400},{"code":"invalid_systolic_bp","message":"systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.","status":400},{"code":"invalid_creatinine","message":"creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/adhere","citation":{"authors":"Fonarow GC, Adams KF Jr, Abraham WT, Yancy CW, Boscardin WJ; ADHERE Scientific Advisory Committee, Study Group, and Investigators","doi":"10.1001/jama.293.5.572","id":"fonarow-2005","pmid":"15687312","source":"JAMA. 2005;293(5):572-580","title":"Risk stratification for in-hospital mortality in acutely decompensated heart failure: classification and regression tree analysis","url":"https://doi.org/10.1001/jama.293.5.572"},"formula_expression":"high: bun_mg_dl >= 43 AND systolic_bp_mm_hg < 115 AND creatinine_mg_dl >= 2.75; intermediate_1: bun_mg_dl >= 43 AND systolic_bp_mm_hg < 115 AND creatinine_mg_dl < 2.75; intermediate_2: bun_mg_dl >= 43 AND systolic_bp_mm_hg >= 115; intermediate_3: bun_mg_dl < 43 AND systolic_bp_mm_hg < 115; low: bun_mg_dl < 43 AND systolic_bp_mm_hg >= 115 (Fonarow 2005 CART)","purpose":"Apply the Fonarow 2005 ADHERE classification and regression tree for in-hospital mortality risk in acutely decompensated heart failure from admission BUN, systolic blood pressure, and serum creatinine.","markdown_url":"https://magentlab.com/docs/adhere.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"adhere"},{"name":"formula_expression","type":"string","description":"Fonarow 2005 ADHERE CART bedside-tree terminal groups in paper units"},{"name":"bun_mg_dl","type":"number","description":"Admission BUN used in mg/dL"},{"name":"systolic_bp_mm_hg","type":"integer","description":"Admission systolic blood pressure used in mm Hg"},{"name":"creatinine_mg_dl","type":"number","description":"Admission serum creatinine used in mg/dL (after µmol/L conversion when supplied)"},{"name":"adhere_risk","type":"string","description":"high, intermediate_1, intermediate_2, intermediate_3, or low (Fonarow 2005 CART). Not a logistic-model score."},{"name":"citation","type":"object","description":"Fonarow 2005 JAMA citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"bun_mg_dl":"20","creatinine_mg_dl":"1.0","systolic_bp_mm_hg":"140"},{"bun_mg_dl":"20","creatinine_mg_dl":"1.0","systolic_bp_mm_hg":"140"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/adhere","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/adhere?bun_mg_dl=20&systolic_bp_mm_hg=140&creatinine_mg_dl=1.0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/adhere","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/h2fpef","description":"Reddy 2018 H2FPEF points score. Six components, max 9: BMI >30 (2), >=2 antihypertensives (1), atrial fibrillation (3), echo PASP >35 mm Hg (1), age >60 (1), E/e' >9 (1). BMI 30 and age 60 do not score. Returns score and max_score only; odds roughly double per point. Not probability classes, not the continuous nomogram, not HFA-PEFF, not a diagnosis or cath substitute. magent does not read echo or compute BMI.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Reddy 2018 elderly: scores 1 when >60. Age 60 does not score.","required":true,"example":"50"},{"in":"query","name":"bmi_kg_m2","type":"number","description":"Body-mass index in kg/m^2 (10-80). Reddy 2018 heavy/obesity: scores 2 when >30. BMI 30 does not score. Caller-supplied; magent does not compute BMI from height and weight.","required":true,"example":"25"},{"in":"query","name":"antihypertensive_ge_2","type":"boolean","description":"Treatment with two or more antihypertensive drugs (Reddy 2018 hypertensive). true or false. Caller-assigned. 1 point if true.","required":true,"example":"false"},{"in":"query","name":"atrial_fibrillation","type":"boolean","description":"Paroxysmal or persistent atrial fibrillation (Reddy 2018). true or false. Caller-assigned. 3 points if true.","required":true,"example":"false"},{"in":"query","name":"pasp_gt_35","type":"boolean","description":"Echocardiographic pulmonary artery systolic pressure >35 mm Hg (Reddy 2018 pulmonary hypertension). true or false. Caller-assigned. 1 point if true. magent does not measure PASP.","required":true,"example":"false"},{"in":"query","name":"e_over_e_prime_gt_9","type":"boolean","description":"E/e' ratio >9 (Reddy 2018 filling pressures). true or false. Caller-assigned. 1 point if true. magent does not measure E/e'.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_bmi_kg_m2","message":"bmi_kg_m2 must be a number from 10 to 80. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/h2fpef","citation":{"authors":"Reddy YNV, Carter RE, Obokata M, Redfield MM, Borlaug BA","doi":"10.1161/CIRCULATIONAHA.118.034646","id":"reddy-2018","pmid":"29792299","source":"Circulation. 2018;138(9):861-870","title":"A Simple, Evidence-Based Approach to Help Guide Diagnosis of Heart Failure With Preserved Ejection Fraction","url":"https://doi.org/10.1161/CIRCULATIONAHA.118.034646"},"formula_expression":"H2FPEF = 2*(bmi_kg_m2>30) + antihypertensive_ge_2 + 3*atrial_fibrillation + pasp_gt_35 + (age>60) + e_over_e_prime_gt_9; max 9 (Reddy 2018 points score; not the continuous nomogram, not HFA-PEFF)","purpose":"Sum the Reddy 2018 H2FPEF points score (six components, max 9) and return score and max_score only.","markdown_url":"https://magentlab.com/docs/h2fpef.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"h2fpef"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"H2FPEF points 0-9"},{"name":"max_score","type":"integer","description":"9"},{"name":"age_years","type":"integer","description":"Age used for the >60 criterion"},{"name":"bmi_kg_m2","type":"number","description":"BMI used for the >30 criterion"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Reddy et al. Circulation 2018 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"50","antihypertensive_ge_2":"false","atrial_fibrillation":"false","bmi_kg_m2":"25","e_over_e_prime_gt_9":"false","pasp_gt_35":"false"},{"age":"50","antihypertensive_ge_2":"false","atrial_fibrillation":"false","bmi_kg_m2":"25","e_over_e_prime_gt_9":"false","pasp_gt_35":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/h2fpef","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/h2fpef?age=50&bmi_kg_m2=25&antihypertensive_ge_2=false&atrial_fibrillation=false&pasp_gt_35=false&e_over_e_prime_gt_9=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/h2fpef","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/steinhart","description":"Steinhart 2009 Equation 1 probability of acute heart failure from caller-assigned age, clinician pretest probability (fraction 0-1 or 0-100 percent), and NT-proBNP in pg/mL. Returns estimated_probability_percent from the unrounded probability plus published ≤0.20 rule-out and ≥0.80 rule-in flags. Not a diagnosis, diuretic, or admission order. magent does not assay NT-proBNP.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years, integer 18-100. Steinhart 2009 Equation 1 coefficient -0.011 per year. magent does not read an identity document.","required":true,"example":"70"},{"in":"query","name":"pretest_probability","type":"number","description":"Caller-assigned clinician pretest probability of acute heart failure before NT-proBNP. Fraction 0-1, or 0-100 percent (values above 1 are divided by 100). 1 means certainty, not 1 percent. Steinhart 2009 coefficient -5.914 on the fraction. magent does not assign pretest probability or examine the patient.","required":true,"example":"0.50"},{"in":"query","name":"nt_probnp_pg_ml","type":"number","description":"NT-proBNP in pg/mL (5-35000). Enters as log10. Not pmol/L; magent does not convert units or assay NT-proBNP.","required":true,"example":"1000"}],"errors":[{"code":"invalid_steinhart","message":"Steinhart AHF needs 2009 age, clinician pretest probability, and NT-proBNP in published ranges. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/steinhart","citation":{"authors":"Steinhart B, Thorpe KE, Bayoumi AM, Moe G, Januzzi JL Jr, Mazer CD","doi":"10.1016/j.jacc.2009.05.065","id":"steinhart-2009","pmid":"19815122","source":"J Am Coll Cardiol. 2009;54(16):1515-1521","title":"Improving the Diagnosis of Acute Heart Failure Using a Validated Prediction Model","url":"https://doi.org/10.1016/j.jacc.2009.05.065"},"formula_expression":"Pr(AHF) = 1 / (1 + exp(1.801 - 0.011*age - 5.914*pretest - 0.822*log10(nt_probnp_pg_ml))); pretest is clinician pretest probability as a fraction 0-1 (0-100 percent is divided by 100); NT-proBNP is pg/mL; logit = -(1.801 - 0.011*age - 5.914*pretest - 0.822*log10(nt_probnp_pg_ml)), 2 decimals; estimated_probability_percent = 100 * Pr(AHF) from the unrounded probability, 2 decimals; ahf_le_0_20 is true when Pr(AHF) <= 0.20; ahf_ge_0_80 is true when Pr(AHF) >= 0.80 (Steinhart 2009)","purpose":"Compute the Steinhart 2009 Equation 1 probability of acute heart failure from caller-assigned age, clinician pretest probability, and NT-proBNP in pg/mL.","markdown_url":"https://magentlab.com/docs/steinhart.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"steinhart"},{"name":"formula_expression","type":"string","description":"Steinhart 2009 Equation 1 Pr(AHF) and published 0.20 / 0.80 flags"},{"name":"age_years","type":"integer","description":"Age in years used in Equation 1"},{"name":"pretest_probability","type":"number","description":"Clinician pretest probability as a fraction 0-1 used in Equation 1"},{"name":"nt_probnp_pg_ml","type":"number","description":"NT-proBNP in pg/mL used in log10"},{"name":"logit","type":"number","description":"Log-odds of AHF, 2 decimal places: -(1.801 - 0.011*age - 5.914*pretest - 0.822*log10(NT-proBNP)). Percent uses the unrounded probability."},{"name":"estimated_probability_percent","type":"number","description":"100 * Pr(AHF) from the unrounded Equation 1 probability, 2 decimals. A population probability, not a diagnosis or admission order."},{"name":"ahf_le_0_20","type":"boolean","description":"true when Pr(AHF) <= 0.20 (Steinhart 2009 published rule-out threshold). Not an invented band."},{"name":"ahf_ge_0_80","type":"boolean","description":"true when Pr(AHF) >= 0.80 (Steinhart 2009 published rule-in threshold). Not an invented band."},{"name":"citation","type":"object","description":"Steinhart 2009 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"70","nt_probnp_pg_ml":"1000","pretest_probability":"0.50"},{"age":"70","nt_probnp_pg_ml":"1000","pretest_probability":"0.50"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/steinhart","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/steinhart?age=70&pretest_probability=0.50&nt_probnp_pg_ml=1000","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/steinhart","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/dasi","description":"Hlatky 1989 Duke Activity Status Index. Twelve caller-assigned yes/no items (self-care through strenuous sports); Yes adds the Table I weight, No adds 0. Light housework is 2.70. DASI is the sum (0-58.2). Estimated peak VO2 mL/kg/min = 0.43 x DASI + 9.6. magent does not observe the patient. Not a functional-capacity assignment or exercise-test replacement.","parameters":[{"in":"query","name":"self_care","type":"boolean","description":"Can take care of self: eating, dressing, bathing, or using the toilet (Hlatky 1989 Table I). true or false. Yes adds 2.75.","required":true,"example":"false"},{"in":"query","name":"walk_indoors","type":"boolean","description":"Can walk indoors, such as around the house (Hlatky 1989 Table I). true or false. Yes adds 1.75.","required":true,"example":"false"},{"in":"query","name":"walk_blocks","type":"boolean","description":"Can walk a block or two on level ground (Hlatky 1989 Table I). true or false. Yes adds 2.75.","required":true,"example":"false"},{"in":"query","name":"climb_stairs","type":"boolean","description":"Can climb a flight of stairs or walk up a hill (Hlatky 1989 Table I). true or false. Yes adds 5.50.","required":true,"example":"false"},{"in":"query","name":"run_short","type":"boolean","description":"Can run a short distance (Hlatky 1989 Table I). true or false. Yes adds 8.00.","required":true,"example":"false"},{"in":"query","name":"light_housework","type":"boolean","description":"Can do light work around the house like dusting or washing dishes (Hlatky 1989 Table I). true or false. Yes adds 2.70.","required":true,"example":"false"},{"in":"query","name":"moderate_housework","type":"boolean","description":"Can do moderate work around the house like vacuuming, sweeping floors, or carrying in groceries (Hlatky 1989 Table I). true or false. Yes adds 3.50.","required":true,"example":"false"},{"in":"query","name":"heavy_housework","type":"boolean","description":"Can do heavy work around the house like scrubbing floors, or lifting or moving heavy furniture (Hlatky 1989 Table I). true or false. Yes adds 8.00.","required":true,"example":"false"},{"in":"query","name":"yardwork","type":"boolean","description":"Can do yardwork like raking leaves, weeding, or pushing a power mower (Hlatky 1989 Table I). true or false. Yes adds 4.50.","required":true,"example":"false"},{"in":"query","name":"sexual_relations","type":"boolean","description":"Can have sexual relations (Hlatky 1989 Table I). true or false. Yes adds 5.25.","required":true,"example":"false"},{"in":"query","name":"moderate_recreation","type":"boolean","description":"Can participate in moderate recreational activities like golf, bowling, dancing, doubles tennis, or throwing a baseball or football (Hlatky 1989 Table I). true or false. Yes adds 6.00.","required":true,"example":"false"},{"in":"query","name":"strenuous_sports","type":"boolean","description":"Can participate in strenuous sports like swimming, singles tennis, football, basketball, or skiing (Hlatky 1989 Table I). true or false. Yes adds 7.50.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/dasi","citation":{"authors":"Hlatky MA, Boineau RE, Higginbotham MB, Lee KL, Mark DB, Califf RM, Cobb FR, Pryor DB","doi":"10.1016/0002-9149(89)90496-7","id":"hlatky-1989","pmid":"2782256","source":"Am J Cardiol. 1989;64(10):651-654","title":"A brief self-administered questionnaire to determine functional capacity (the Duke Activity Status Index)","url":"https://doi.org/10.1016/0002-9149(89)90496-7"},"formula_expression":"DASI = 2.75*self_care + 1.75*walk_indoors + 2.75*walk_blocks + 5.50*climb_stairs + 8.00*run_short + 2.70*light_housework + 3.50*moderate_housework + 8.00*heavy_housework + 4.50*yardwork + 5.25*sexual_relations + 6.00*moderate_recreation + 7.50*strenuous_sports (Yes = weight, No = 0); VO2peak_mL/kg/min = 0.43*DASI + 9.6 (Hlatky 1989 Table I)","purpose":"Sum the Hlatky 1989 Duke Activity Status Index Table I weights for 12 yes/no activities and return DASI and estimated peak VO2.","markdown_url":"https://magentlab.com/docs/dasi.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"dasi"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"number","description":"DASI (same as dasi); 0-58.2"},{"name":"max_score","type":"number","description":"58.2"},{"name":"dasi","type":"number","description":"Hlatky 1989 Table I weighted sum (0-58.2)"},{"name":"vo2peak_ml_kg_min","type":"number","description":"Estimated peak VO2 in mL/kg/min = 0.43 * DASI + 9.6"},{"name":"components","type":"array","description":"Per-activity Table I weights"},{"name":"citation","type":"object","description":"Hlatky et al. Am J Cardiol 1989 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"climb_stairs":"false","heavy_housework":"false","light_housework":"false","moderate_housework":"false","moderate_recreation":"false","run_short":"false","self_care":"false","sexual_relations":"false","strenuous_sports":"false","walk_blocks":"false","walk_indoors":"false","yardwork":"false"},{"climb_stairs":"false","heavy_housework":"false","light_housework":"false","moderate_housework":"false","moderate_recreation":"false","run_short":"false","self_care":"false","sexual_relations":"false","strenuous_sports":"false","walk_blocks":"false","walk_indoors":"false","yardwork":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/dasi","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/dasi?self_care=false&walk_indoors=false&walk_blocks=false&climb_stairs=false&run_short=false&light_housework=false&moderate_housework=false&heavy_housework=false&yardwork=false&sexual_relations=false&moderate_recreation=false&strenuous_sports=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/dasi","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/nyha","description":"NYHA 1994 functional capacity class 1-4 as assigned by the caller (Criteria Committee of the New York Heart Association, 9th edition). Returns class, score, max 4, and the published class description. Functional capacity only; not Objective Assessment A-D and not ACC/AHA stages. Not a heart-failure diagnosis; magent does not examine the patient.","parameters":[{"in":"query","name":"nyha_class","type":"integer","description":"NYHA 1994 functional capacity class 1-4 as assigned by the caller (1 no limitation of ordinary activity; 2 slight limitation, comfortable at rest, ordinary activity causes symptoms; 3 marked limitation, less than ordinary activity causes symptoms; 4 inability to carry on any physical activity without discomfort, symptoms may be present at rest). magent does not examine the patient.","required":true,"example":"1"}],"errors":[{"code":"invalid_nyha","message":"nyha_class must be an integer 1, 2, 3, or 4 (NYHA 1994). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/nyha","citation":{"authors":"The Criteria Committee of the New York Heart Association","id":"nyha-1994","source":"9th ed. Boston: Little, Brown & Co; 1994. p. 253-256","title":"Nomenclature and Criteria for Diagnosis of Diseases of the Heart and Great Vessels","url":"https://www.worldcat.org/oclc/29430883"},"formula_expression":"NYHA functional capacity class 1-4 as assigned by the caller (Criteria Committee of the New York Heart Association 1994 9th edition); not Objective Assessment A-D","purpose":"Return the 1994 NYHA functional capacity class 1-4 from a caller-assigned integer, with the published class description.","markdown_url":"https://magentlab.com/docs/nyha.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"nyha"},{"name":"formula_expression","type":"string","description":"Published class rule"},{"name":"nyha_class","type":"integer","description":"Caller-assigned class 1-4"},{"name":"score","type":"integer","description":"Same as nyha_class"},{"name":"max_score","type":"integer","description":"4"},{"name":"description","type":"string","description":"1994 functional-capacity wording for that class"},{"name":"components","type":"array","description":"NYHA-class component"},{"name":"citation","type":"object","description":"NYHA 1994 9th edition"},{"name":"disclaimer","type":"string","description":"Not a medical device"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"nyha_class":"1"},{"nyha_class":"1"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/nyha","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/nyha?nyha_class=1","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/nyha","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/gillmore","description":"Gillmore 2018 NAC ATTR cardiac staging from NT-proBNP (ng/L) and caller-assigned eGFR. Stage I: NT-proBNP <=3000 and eGFR >=45. Stage III: NT-proBNP >3000 and eGFR <45. Stage II: exactly one of those two adverse cut points. Returns gillmore_stage 1/2/3. ATTRwt and ATTRv. Not Mayo AL amyloid staging. Not NYHA. Not a treatment order. magent does not compute MDRD or CKD-EPI.","parameters":[{"in":"query","name":"nt_probnp_ng_l","type":"number","description":"NT-proBNP in ng/L (10-100000), same numeric value as pg/mL. Gillmore 2018 Stage I requires <= 3000; Stage III when > 3000. magent does not assay NT-proBNP.","required":true,"example":"500"},{"in":"query","name":"egfr_ml_min_1_73m2","type":"number","description":"Caller-assigned eGFR in mL/min/1.73m² (5-200). Gillmore 2018 Stage I requires >= 45; Stage III when < 45. magent does not compute MDRD or CKD-EPI.","required":true,"example":"70"}],"errors":[{"code":"invalid_nt_probnp","message":"nt_probnp_ng_l must be a number from 10 to 100000 (NT-proBNP ng/L = pg/mL; Gillmore 2018 NAC ATTR stage). Returned before settlement; you are not charged.","status":400},{"code":"invalid_egfr","message":"egfr_ml_min_1_73m2 must be a number from 5 to 200 (caller-assigned eGFR; magent does not compute MDRD or CKD-EPI). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/gillmore","citation":{"authors":"Gillmore JD, Damy T, Fontana M, Hutchinson M, Lachmann HJ, Martinez-Naharro A, Quarta CC, Rezk T, Whelan CJ, Gonzalez-Lopez E, Lane T, Gilbertson JA, Rowczenio D, Petrie A, Hawkins PN","doi":"10.1093/eurheartj/ehx589","id":"gillmore-2018","pmid":"29048471","source":"Eur Heart J. 2018;39(30):2799-2806","title":"A new staging system for cardiac transthyretin amyloidosis","url":"https://doi.org/10.1093/eurheartj/ehx589"},"formula_expression":"Stage I: nt_probnp_ng_l <= 3000 AND egfr_ml_min_1_73m2 >= 45; stage III: nt_probnp_ng_l > 3000 AND egfr_ml_min_1_73m2 < 45; stage II: exactly one of those two adverse cut points (Gillmore 2018 NAC ATTR)","purpose":"Apply the Gillmore 2018 National Amyloidosis Centre (NAC) three-stage system for cardiac transthyretin amyloidosis from NT-proBNP and caller-assigned eGFR.","markdown_url":"https://magentlab.com/docs/gillmore.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"gillmore"},{"name":"formula_expression","type":"string","description":"Gillmore 2018 NAC ATTR stage I / II / III rules (NT-proBNP ng/L and eGFR)"},{"name":"nt_probnp_ng_l","type":"number","description":"NT-proBNP used in ng/L (same numeric value as pg/mL)"},{"name":"egfr_ml_min_1_73m2","type":"number","description":"Caller-assigned eGFR in mL/min/1.73m²"},{"name":"gillmore_stage","type":"integer","description":"1, 2, or 3 (Gillmore 2018 NAC ATTR). Not Roman in this field."},{"name":"gillmore_stage_label","type":"string","description":"I, II, or III matching gillmore_stage"},{"name":"criteria","type":"array","description":"Per-factor rows with factor, met, and value for nt_probnp_gt_3000 and egfr_lt_45"},{"name":"citation","type":"object","description":"Gillmore 2018 Eur Heart J citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"egfr_ml_min_1_73m2":"70","nt_probnp_ng_l":"500"},{"egfr_ml_min_1_73m2":"70","nt_probnp_ng_l":"500"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/gillmore","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/gillmore?nt_probnp_ng_l=500&egfr_ml_min_1_73m2=70","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/gillmore","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/grogan","description":"Grogan 2016 ATTRwt staging: 1 point when NT-proBNP >3000 ng/L; 1 point when cardiac TnT >0.05 ng/mL. Stage I = 0, II = 1, III = 2. Equal to a cutoff does not score. Cohort 4-year OS I 57% / II 42% / III 18%; stage III median 20 months (labels, not a prediction). Troponin T only. Not Gillmore NAC (no eGFR). Not Mayo AL. Not NYHA. magent does not assay the biomarkers.","parameters":[{"in":"query","name":"nt_probnp_ng_l","type":"number","description":"NT-proBNP in ng/L (10-100000), same numeric value as pg/mL. Grogan 2016 scores 1 point when > 3000; equal to 3000 does not score. magent does not assay NT-proBNP.","required":true,"example":"1500"},{"in":"query","name":"troponin_t_ng_ml","type":"number","description":"Cardiac troponin T (cTnT) in ng/mL (0.001-50), same numeric value as 0.05 μg/L. Grogan 2016 scores 1 point when > 0.05; equal to 0.05 does not score. Troponin T only; magent does not invent a troponin I cutoff and does not assay troponin.","required":true,"example":"0.02"}],"errors":[{"code":"invalid_nt_probnp","message":"nt_probnp_ng_l must be a number from 10 to 100000 (NT-proBNP ng/L = pg/mL; Gillmore 2018 NAC ATTR stage). Returned before settlement; you are not charged.","status":400},{"code":"invalid_troponin_t","message":"troponin_t_ng_ml must be a number from 0.001 to 50 (cTnT ng/mL). Returned before settlement; you are not charged.","status":400},{"code":"invalid_grogan","message":"Grogan ATTR-CM staging needs nt_probnp_ng_l and troponin_t_ng_ml (Grogan 2016). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/grogan","citation":{"authors":"Grogan M, Scott CG, Kyle RA, Zeldenrust SR, Gertz MA, Lin G, Klarich KW, Miller WL, Maleszewski JJ, Dispenzieri A","doi":"10.1016/j.jacc.2016.06.033","id":"grogan-2016","pmid":"27585505","source":"J Am Coll Cardiol. 2016;68(10):1014-1020","title":"Natural History of Wild-Type Transthyretin Cardiac Amyloidosis and Risk Stratification Using a Novel Staging System","url":"https://doi.org/10.1016/j.jacc.2016.06.033"},"formula_expression":"Grogan = (nt_probnp_ng_l > 3000) + (troponin_t_ng_ml > 0.05); each 1; Grogan 2016 ATTRwt; stage I = 0, II = 1, III = 2; equal to a cutoff does not add a point","purpose":"Apply the Grogan 2016 two-biomarker staging system for wild-type transthyretin (ATTRwt) cardiac amyloidosis from NT-proBNP and cardiac troponin T.","markdown_url":"https://magentlab.com/docs/grogan.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"grogan"},{"name":"formula_expression","type":"string","description":"Exact Grogan 2016 ATTRwt expression used"},{"name":"nt_probnp_ng_l","type":"number","description":"NT-proBNP used in ng/L (same numeric value as pg/mL)"},{"name":"troponin_t_ng_ml","type":"number","description":"Cardiac troponin T used in ng/mL (same numeric value as μg/L)"},{"name":"score","type":"integer","description":"Grogan 2016 points 0-2"},{"name":"max_score","type":"integer","description":"2"},{"name":"grogan_stage","type":"string","description":"I (0 points), II (1 point), or III (2 points). Grogan 2016 ATTRwt. Not Gillmore 2018 NAC. Not Mayo AL amyloid staging."},{"name":"published_os_4_year_percent","type":"integer","description":"Published Grogan 2016 cohort 4-year overall survival percent for this stage (I 57, II 42, III 18). A cohort label, not a patient-specific prediction. Stage III median survival 20 months is published in the paper and is not returned as a prediction."},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Grogan 2016 J Am Coll Cardiol citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"nt_probnp_ng_l":"1500","troponin_t_ng_ml":"0.02"},{"nt_probnp_ng_l":"1500","troponin_t_ng_ml":"0.02"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/grogan","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/grogan?nt_probnp_ng_l=1500&troponin_t_ng_ml=0.02","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/grogan","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/framingham-hf","description":"McKee 1971 Framingham CHF criteria. Definite if two major, or one major plus two minor, are concurrent. Nine major and seven minor caller-assigned flags. Weight loss ≥4.5 kg in 5 days in response to treatment is dual: major if that is definite, else minor if that is definite, else unused. major_count and minor_count are the fixed flags only. Not a medical device, not an echocardiographic diagnosis, and not HFrEF or HFpEF staging.","parameters":[{"in":"query","name":"pnd_or_orthopnea","type":"boolean","description":"Paroxysmal nocturnal dyspnea or orthopnea (McKee 1971 major). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"false"},{"in":"query","name":"neck_vein_distention","type":"boolean","description":"Neck-vein distention (McKee 1971 major). true or false as assigned by the caller. magent does not examine the neck veins.","required":true,"example":"false"},{"in":"query","name":"rales","type":"boolean","description":"Rales (McKee 1971 major). true or false as assigned by the caller. magent does not auscultate the lungs.","required":true,"example":"false"},{"in":"query","name":"cardiomegaly","type":"boolean","description":"Cardiomegaly (McKee 1971 major). true or false as assigned by the caller. magent does not interpret a chest radiograph.","required":true,"example":"false"},{"in":"query","name":"acute_pulmonary_edema","type":"boolean","description":"Acute pulmonary edema (McKee 1971 major). true or false as assigned by the caller. magent does not diagnose pulmonary edema.","required":true,"example":"false"},{"in":"query","name":"s3_gallop","type":"boolean","description":"S3 gallop (McKee 1971 major). true or false as assigned by the caller. magent does not auscultate the heart.","required":true,"example":"false"},{"in":"query","name":"venous_pressure_gt_16","type":"boolean","description":"Increased venous pressure >16 cm of water (McKee 1971 major). true or false as assigned by the caller. magent does not measure venous pressure.","required":true,"example":"false"},{"in":"query","name":"circulation_time_ge_25","type":"boolean","description":"Circulation time ≥25 seconds (McKee 1971 major). true or false as assigned by the caller. magent does not measure circulation time.","required":true,"example":"false"},{"in":"query","name":"hepatojugular_reflux","type":"boolean","description":"Hepatojugular reflux (McKee 1971 major). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"ankle_edema","type":"boolean","description":"Ankle edema (McKee 1971 minor). true or false as assigned by the caller. magent does not examine the ankles.","required":true,"example":"false"},{"in":"query","name":"night_cough","type":"boolean","description":"Night cough (McKee 1971 minor). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"false"},{"in":"query","name":"dyspnea_on_exertion","type":"boolean","description":"Dyspnea on exertion (McKee 1971 minor). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"false"},{"in":"query","name":"hepatomegaly","type":"boolean","description":"Hepatomegaly (McKee 1971 minor). true or false as assigned by the caller. magent does not examine the liver.","required":true,"example":"false"},{"in":"query","name":"pleural_effusion","type":"boolean","description":"Pleural effusion (McKee 1971 minor). true or false as assigned by the caller. magent does not interpret imaging.","required":true,"example":"false"},{"in":"query","name":"vital_capacity_decreased_third","type":"boolean","description":"Vital capacity decreased one third from maximum (McKee 1971 minor). true or false as assigned by the caller. magent does not measure vital capacity.","required":true,"example":"false"},{"in":"query","name":"tachycardia_ge_120","type":"boolean","description":"Tachycardia ≥120 per minute (McKee 1971 minor). true or false as assigned by the caller. magent does not measure heart rate.","required":true,"example":"false"},{"in":"query","name":"weight_loss_45kg_5d_treatment","type":"boolean","description":"Weight loss ≥4.5 kg in 5 days in response to treatment (McKee 1971 dual major-or-minor). true or false as assigned by the caller. Counted as major if that assignment is definite, else as minor if that assignment is definite, else unused. magent does not weigh the patient.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/framingham-hf","citation":{"authors":"McKee PA, Castelli WP, McNamara PM, Kannel WB","doi":"10.1056/NEJM197112232852601","id":"mckee-1971","pmid":"5122894","source":"N Engl J Med. 1971;285(26):1441-1446","title":"The natural history of congestive heart failure: the Framingham study","url":"https://doi.org/10.1056/NEJM197112232852601"},"formula_expression":"definite iff 2 major OR (1 major AND 2 minor) concurrent (McKee 1971). weight_loss_45kg_5d_treatment (≥4.5 kg in 5 days in response to treatment) counts as major if that assignment is definite, else as minor if that assignment is definite, else unused. major_count is the 9 fixed majors; minor_count is the 7 fixed minors","purpose":"Apply the McKee 1971 Framingham concurrent major and minor criteria and return definite or not_definite from nine major flags, seven minor flags, and the dual weight-loss flag.","markdown_url":"https://magentlab.com/docs/framingham-hf.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"framingham_hf"},{"name":"formula_expression","type":"string","description":"Published McKee 1971 concurrent major/minor definite rule"},{"name":"major_count","type":"integer","description":"Count of the nine fixed McKee 1971 major flags that are true (0-9). Does not include weight_loss_45kg_5d_treatment."},{"name":"minor_count","type":"integer","description":"Count of the seven fixed McKee 1971 minor flags that are true (0-7). Does not include weight_loss_45kg_5d_treatment."},{"name":"weight_loss_45kg_5d_treatment","type":"boolean","description":"Echo of the dual major-or-minor weight-loss flag (≥4.5 kg in 5 days in response to treatment)"},{"name":"classification","type":"string","description":"definite if two major criteria, or one major plus two minor, are present concurrently after the dual weight-loss assignment; otherwise not_definite. Not a diagnosis."},{"name":"components","type":"array","description":"Per-flag rows with factor and met for the nine majors, seven minors, and dual weight-loss flag"},{"name":"citation","type":"object","description":"McKee 1971 N Engl J Med citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"acute_pulmonary_edema":"false","ankle_edema":"false","cardiomegaly":"false","circulation_time_ge_25":"false","dyspnea_on_exertion":"false","hepatojugular_reflux":"false","hepatomegaly":"false","neck_vein_distention":"false","night_cough":"false","pleural_effusion":"false","pnd_or_orthopnea":"false","rales":"false","s3_gallop":"false","tachycardia_ge_120":"false","venous_pressure_gt_16":"false","vital_capacity_decreased_third":"false","weight_loss_45kg_5d_treatment":"false"},{"acute_pulmonary_edema":"false","ankle_edema":"false","cardiomegaly":"false","circulation_time_ge_25":"false","dyspnea_on_exertion":"false","hepatojugular_reflux":"false","hepatomegaly":"false","neck_vein_distention":"false","night_cough":"false","pleural_effusion":"false","pnd_or_orthopnea":"false","rales":"false","s3_gallop":"false","tachycardia_ge_120":"false","venous_pressure_gt_16":"false","vital_capacity_decreased_third":"false","weight_loss_45kg_5d_treatment":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/framingham-hf","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/framingham-hf?pnd_or_orthopnea=false&neck_vein_distention=false&rales=false&cardiomegaly=false&acute_pulmonary_edema=false&s3_gallop=false&venous_pressure_gt_16=false&circulation_time_ge_25=false&hepatojugular_reflux=false&ankle_edema=false&night_cough=false&dyspnea_on_exertion=false&hepatomegaly=false&pleural_effusion=false&vital_capacity_decreased_third=false&tachycardia_ge_120=false&weight_loss_45kg_5d_treatment=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/framingham-hf","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/acc-aha-hf","description":"2013 ACCF/AHA heart-failure stages (Yancy) from four caller flags: high risk for HF, structural heart disease, prior or current HF symptoms, and refractory specialized care. Returns hf_stage A, B, C, D, or not_staged. Progressive and inviolate: D first, then C, B, A, else not_staged. Not NYHA class and not a diagnosis. magent does not examine the patient or read an echocardiogram.","parameters":[{"in":"query","name":"high_risk_for_hf","type":"boolean","description":"High risk for HF without structural heart disease or HF symptoms (Yancy 2013 stage A assignment). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"structural_heart_disease","type":"boolean","description":"Structural heart disease as assigned by the caller (Yancy 2013 stage B or C). true or false. magent does not read an echocardiogram.","required":true,"example":"false"},{"in":"query","name":"hf_symptoms_prior_or_current","type":"boolean","description":"Prior or current symptoms of HF as assigned by the caller (Yancy 2013 stage C). true or false. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"refractory_hf_specialized","type":"boolean","description":"Refractory HF requiring specialized interventions as assigned by the caller (Yancy 2013 stage D). true or false. magent does not examine the patient.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/acc-aha-hf","citation":{"authors":"Yancy CW, Jessup M, Bozkurt B, Butler J, Casey DE Jr, Drazner MH, Fonarow GC, Geraci SA, Horwich T, Januzzi JL, Johnson MR, Kasper EK, Levy WC, Masoudi FA, McBride PE, McMurray JJV, Mitchell JE, Peterson PN, Riegel B, Sam F, Stevenson LW, Tang WHW, Tsai EJ, Wilkoff BL","doi":"10.1161/CIR.0b013e31829e8776","id":"yancy-2013","pmid":"23741058","source":"Circulation. 2013;128(16):e240-e327","title":"2013 ACCF/AHA guideline for the management of heart failure: a report of the American College of Cardiology Foundation/American Heart Association Task Force on Practice Guidelines","url":"https://doi.org/10.1161/CIR.0b013e31829e8776"},"formula_expression":"hf_stage D if refractory_hf_specialized; else C if structural_heart_disease and hf_symptoms_prior_or_current; else B if structural_heart_disease and not hf_symptoms_prior_or_current; else A if high_risk_for_hf and not structural_heart_disease and not hf_symptoms_prior_or_current; else not_staged (Yancy 2013 ACCF/AHA stages, progressive/inviolate). Not NYHA class","purpose":"Apply the 2013 ACCF/AHA heart-failure stages (Yancy) from caller-assigned high-risk, structural heart disease, prior or current HF symptoms, and refractory specialized-care flags. Returns hf_stage A, B, C, D, or not_staged.","markdown_url":"https://magentlab.com/docs/acc-aha-hf.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"acc_aha_hf"},{"name":"formula_expression","type":"string","description":"Published Yancy 2013 ACCF/AHA stage assignment (progressive/inviolate)"},{"name":"high_risk_for_hf","type":"boolean","description":"Echo of the caller-assigned high-risk-for-HF flag"},{"name":"structural_heart_disease","type":"boolean","description":"Echo of the caller-assigned structural-heart-disease flag"},{"name":"hf_symptoms_prior_or_current","type":"boolean","description":"Echo of the caller-assigned prior-or-current HF symptoms flag"},{"name":"refractory_hf_specialized","type":"boolean","description":"Echo of the caller-assigned refractory specialized-care flag"},{"name":"hf_stage","type":"string","description":"ACCF/AHA stage A, B, C, or D, or not_staged when no high risk, no structural disease, and no symptoms. Not NYHA class. Not a diagnosis."},{"name":"components","type":"array","description":"Rows for the four caller flags with factor and met"},{"name":"citation","type":"object","description":"Yancy 2013 Circulation citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"hf_symptoms_prior_or_current":"false","high_risk_for_hf":"false","refractory_hf_specialized":"false","structural_heart_disease":"false"},{"hf_symptoms_prior_or_current":"false","high_risk_for_hf":"false","refractory_hf_specialized":"false","structural_heart_disease":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/acc-aha-hf","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/acc-aha-hf?high_risk_for_hf=false&structural_heart_disease=false&hf_symptoms_prior_or_current=false&refractory_hf_specialized=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/acc-aha-hf","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/vexus","description":"Beaubien-Souligny 2020 VExUS C only (not A, B, D, or E). Caller-assigned ivc_dilated (IVC ≥2 cm) plus hepatic, portal, and intra-renal Doppler each normal, mild, or severe. Grade 0 if the IVC is not dilated; 1 if dilated with zero severe patterns; 2 if exactly one severe; 3 if two or more are severe. magent does not perform ultrasound. Not an AKI diagnosis or a fluid-order. Not a medical device.","parameters":[{"in":"query","name":"ivc_dilated","type":"boolean","description":"Whether the IVC is dilated as assigned by the caller. Dilated iff maximal IVC diameter ≥2 cm (Beaubien-Souligny 2020). true or false. Grade 0 whenever this is false, regardless of Doppler. magent does not measure IVC.","required":true,"example":"false"},{"in":"query","name":"hepatic","type":"string","enum":["normal","mild","severe"],"description":"Hepatic-vein Doppler grade as assigned by the caller (Beaubien-Souligny 2020 Figure 1): normal (not mild and not severe; triphasic S > D toward the liver); mild (S component lower in magnitude than D but still toward the liver); severe (S component reversed, toward the heart). magent does not perform ultrasound.","required":true,"example":"normal"},{"in":"query","name":"portal","type":"string","enum":["normal","mild","severe"],"description":"Portal-vein Doppler grade as assigned by the caller (Beaubien-Souligny 2020 Figure 1 caption): normal (pulsatility fraction not in the mild or severe bands); mild (velocity variation 30 to <50%); severe (variation ≥50%). magent does not perform ultrasound.","required":true,"example":"normal"},{"in":"query","name":"renal","type":"string","enum":["normal","mild","severe"],"description":"Intra-renal venous Doppler grade as assigned by the caller (Beaubien-Souligny 2020 Figure 1): normal (continuous flow); mild (discontinuous with a systolic and a diastolic phase); severe (discontinuous with only a diastolic phase during the cardiac cycle). magent does not perform ultrasound.","required":true,"example":"normal"}],"errors":[{"code":"invalid_vexus","message":"hepatic, portal, and renal must each be normal, mild, or severe (Beaubien-Souligny 2020 VExUS C Doppler grades). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/vexus","citation":{"authors":"Beaubien-Souligny W, Rola P, Haycock K, Bouchard J, Lamarche Y, Spiegel R, Denault AY","doi":"10.1186/s13089-020-00163-w","id":"beaubien-souligny-2020","pmid":"32270297","source":"Ultrasound J. 2020;12(1):16","title":"Quantifying systemic congestion with Point-Of-Care ultrasound: development of the venous excess ultrasound grading system","url":"https://doi.org/10.1186/s13089-020-00163-w"},"formula_expression":"VExUS C grade 0 if ivc_dilated is false (regardless of Doppler); else 1 if zero of hepatic/portal/renal are severe; 2 if exactly one is severe; 3 if two or more are severe (Beaubien-Souligny 2020 prototype C). Hepatic: normal (triphasic S>D toward liver), mild (S<D toward liver), severe (S reversed toward heart). Portal: mild pulsatility 30 to <50%, severe ≥50%. Renal: mild discontinuous S and D, severe only D. IVC dilated iff maximal diameter ≥2 cm as assigned. Not prototypes A, B, D, E","purpose":"Apply Beaubien-Souligny 2020 VExUS prototype C and return vexus_grade 0-3 from a caller-assigned IVC dilatation flag and hepatic, portal, and intra-renal venous Doppler grades.","markdown_url":"https://magentlab.com/docs/vexus.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"vexus"},{"name":"formula_expression","type":"string","description":"Published Beaubien-Souligny 2020 VExUS C grade rule"},{"name":"vexus_grade","type":"integer","description":"VExUS C grade 0-3. 0 if the IVC is not dilated; 1 if dilated with zero severe Doppler patterns; 2 if dilated with exactly one severe; 3 if dilated with two or more severe. Not an AKI diagnosis."},{"name":"severe_doppler_count","type":"integer","description":"Count of hepatic, portal, and renal that are severe (0-3), independent of IVC dilatation"},{"name":"ivc_dilated","type":"boolean","description":"Echo of the caller-assigned IVC dilatation flag"},{"name":"hepatic","type":"string","description":"Echo of the caller-assigned hepatic-vein Doppler grade"},{"name":"portal","type":"string","description":"Echo of the caller-assigned portal-vein Doppler grade"},{"name":"renal","type":"string","description":"Echo of the caller-assigned intra-renal venous Doppler grade"},{"name":"components","type":"array","description":"Rows for ivc_dilated, hepatic_severe, portal_severe, renal_severe, and exclusive grades grade_0 through grade_3 with factor, met, and value where assigned"},{"name":"citation","type":"object","description":"Beaubien-Souligny 2020 Ultrasound J citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"hepatic":"normal","ivc_dilated":"false","portal":"normal","renal":"normal"},{"hepatic":"normal","ivc_dilated":"false","portal":"normal","renal":"normal"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/vexus","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/vexus?ivc_dilated=false&hepatic=normal&portal=normal&renal=normal","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/vexus","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/euromacs-rhf","description":"Soliman 2018 EUROMACS 9.5-point right-sided heart failure score after continuous-flow LVAD. Five caller-assigned flags: RA/PCWP >0.54 (2), hemoglobin ≤10 g/dL (1), multiple IV inotropes (2.5), INTERMACS class 1-3 (2), severe RV dysfunction (2). Max 9.5; half-points not integer-rounded. Bands: low 0-2, intermediate >2 to 4, high >4. Not a device indication. Not Michigan RV-failure score. Not CRITT. magent does not catheterize or echo.","parameters":[{"in":"query","name":"rap_pcwp_gt_054","type":"boolean","description":"RA/PCWP ratio >0.54 as assigned by the caller (Soliman 2018). true scores 2. magent does not catheterize or compute the ratio.","required":true,"example":"false"},{"in":"query","name":"hemoglobin_le_10","type":"boolean","description":"Hemoglobin ≤10 g/dL as assigned by the caller (Soliman 2018). true scores 1. magent does not measure hemoglobin.","required":true,"example":"false"},{"in":"query","name":"multiple_iv_inotropes","type":"boolean","description":"Use of multiple intravenous inotropes as assigned by the caller (Soliman 2018). true scores 2.5. magent does not order inotropes.","required":true,"example":"false"},{"in":"query","name":"intermacs_1_to_3","type":"boolean","description":"INTERMACS class 1, 2, or 3 as assigned by the caller (Soliman 2018). true scores 2. The primary paper uses classes 1-3, not 1-2 only. magent does not assign INTERMACS class.","required":true,"example":"false"},{"in":"query","name":"severe_rv_dysfunction","type":"boolean","description":"Severe RV dysfunction on echocardiography as assigned by the caller (Soliman 2018). true scores 2. magent does not echo.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/euromacs-rhf","citation":{"authors":"Soliman OII, Akin S, Muslem R, Boersma E, Manintveld OC, Krabatsch T, Gummert JF, de By TMMH, Bogers AJJC, Zijlstra F, Mohacsi P, Caliskan K, EUROMACS Investigators","doi":"10.1161/CIRCULATIONAHA.117.030543","id":"soliman-2018","pmid":"28847897","source":"Circulation. 2018;137(9):891-906","title":"Derivation and Validation of a Novel Right-Sided Heart Failure Model After Implantation of Continuous Flow Left Ventricular Assist Devices: The EUROMACS (European Registry for Patients with Mechanical Circulatory Support) Right-Sided Heart Failure Risk Score","url":"https://doi.org/10.1161/CIRCULATIONAHA.117.030543"},"formula_expression":"EUROMACS-RHF = 2*(rap_pcwp_gt_054) + 1*(hemoglobin_le_10) + 2.5*(multiple_iv_inotropes) + 2*(intermacs_1_to_3) + 2*(severe_rv_dysfunction); Soliman 2018; max 9.5; half-points not integer-rounded; bands low 0-2 inclusive, intermediate >2 to 4 inclusive, high >4; INTERMACS 1-3 (not 1-2 only)","purpose":"Sum Soliman 2018 EUROMACS 9.5-point right-sided heart failure points from five caller-assigned flags after continuous-flow LVAD implant and return score and band (low 0-2, intermediate >2 to 4, high >4).","markdown_url":"https://magentlab.com/docs/euromacs-rhf.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"euromacs_rhf"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"number","description":"Soliman 2018 EUROMACS-RHF points 0-9.5 (half-points allowed; not integer-rounded)"},{"name":"max_score","type":"number","description":"Always 9.5"},{"name":"band","type":"string","description":"Soliman 2018 band: low (0-2 inclusive), intermediate (>2 to 4 inclusive), or high (>4). A band, not a device indication."},{"name":"rap_pcwp_gt_054","type":"boolean","description":"Whether RA/PCWP >0.54 was assigned true"},{"name":"hemoglobin_le_10","type":"boolean","description":"Whether hemoglobin ≤10 g/dL was assigned true"},{"name":"multiple_iv_inotropes","type":"boolean","description":"Whether multiple IV inotropes was assigned true"},{"name":"intermacs_1_to_3","type":"boolean","description":"Whether INTERMACS class 1-3 was assigned true"},{"name":"severe_rv_dysfunction","type":"boolean","description":"Whether severe RV dysfunction was assigned true"},{"name":"components","type":"array","description":"Per-factor Soliman 2018 points"},{"name":"citation","type":"object","description":"Soliman et al. Circulation 2018 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"hemoglobin_le_10":"false","intermacs_1_to_3":"false","multiple_iv_inotropes":"false","rap_pcwp_gt_054":"false","severe_rv_dysfunction":"false"},{"hemoglobin_le_10":"false","intermacs_1_to_3":"false","multiple_iv_inotropes":"false","rap_pcwp_gt_054":"false","severe_rv_dysfunction":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/euromacs-rhf","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/euromacs-rhf?rap_pcwp_gt_054=false&hemoglobin_le_10=false&multiple_iv_inotropes=false&intermacs_1_to_3=false&severe_rv_dysfunction=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/euromacs-rhf","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/maggic","description":"Pocock 2013 MAGGIC integer score from 13 heart-failure predictors (age, EF, NYHA, creatinine, diabetes, not prescribed beta-blocker, SBP, BMI, HF duration >18 months, current smoker, COPD, male sex, not prescribed ACEI/ARB), including the published age×EF and SBP×EF extras. Returns integer score and Table 4 1-year and 3-year death probabilities for scores 0-50. Not a diagnosis, not a treatment order, not a reason to withhold therapy. magent does not examine the patient.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (integer 18-120). Pocock 2013 integer extra depends on EF: <55 scores 0; then 55-59, 60-64, 65-69, 70-74, 75-79, >=80. magent does not examine the patient.","required":true,"example":"50"},{"in":"query","name":"ef_percent","type":"number","description":"Left-ventricular ejection fraction in percent (1-90). Figure 2: <20 scores 7; 20-24 6; 25-29 5; 30-34 3; 35-39 2; >=40 0. Also selects the age and SBP extra rows. magent does not read an echocardiogram.","required":true,"example":"55"},{"in":"query","name":"nyha_class","type":"integer","description":"NYHA class 1-4 as assigned by the caller (Figure 2: I 0, II 2, III 6, IV 8). magent does not assign NYHA class.","required":true,"example":"1"},{"in":"query","name":"creatinine_umol_l","type":"number","description":"Serum creatinine in µmol/L (9-1768), the Figure 2 unit. Provide this or creatinine_mg_dl, not both. Bins: <90 0; 90-109 1; 110-129 2; 130-149 3; 150-169 4; 170-209 5; 210-249 6; >=250 8. magent does not assay creatinine.","required":false,"example":"80"},{"in":"query","name":"creatinine_mg_dl","type":"number","description":"Serum creatinine in mg/dL (0.1-20). Converted as µmol/L = mg/dL × 88.42, then Figure 2 µmol/L bins. Provide this or creatinine_umol_l, not both.","required":false,"example":"0.9"},{"in":"query","name":"diabetes","type":"boolean","description":"Diabetes as assigned by the caller. true scores 3 (Figure 2). magent does not diagnose diabetes.","required":true,"example":"false"},{"in":"query","name":"beta_blocker","type":"boolean","description":"Prescribed a beta-blocker as assigned by the caller. true scores 0; false (not prescribed) scores 3. magent does not prescribe therapy.","required":true,"example":"true"},{"in":"query","name":"systolic_mm_hg","type":"number","description":"Systolic blood pressure in mm Hg (50-250). Figure 2 extra depends on EF: <110, 110-119, 120-129, 130-139, 140-149, >=150. magent does not measure blood pressure.","required":true,"example":"150"},{"in":"query","name":"bmi_kg_m2","type":"number","description":"Caller-supplied body-mass index in kg/m² (10-80). Figure 2: <15 6; 15-19 5; 20-24 3; 25-29 2; >=30 0. magent does not compute BMI from height and weight.","required":true,"example":"30"},{"in":"query","name":"hf_duration_gt_18_months","type":"boolean","description":"Heart-failure duration greater than 18 months as assigned by the caller (Table 2 HF duration >18 months). true scores 2. magent does not date the diagnosis.","required":true,"example":"false"},{"in":"query","name":"current_smoker","type":"boolean","description":"Current smoker as assigned by the caller. true scores 1. magent does not take a smoking history.","required":true,"example":"false"},{"in":"query","name":"copd","type":"boolean","description":"COPD as assigned by the caller. true scores 2. magent does not diagnose COPD.","required":true,"example":"false"},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"Sex (female or male). Male scores 1 (Figure 2).","required":true,"example":"female"},{"in":"query","name":"acei_arb","type":"boolean","description":"Prescribed an ACE inhibitor or ARB as assigned by the caller. true scores 0; false (not prescribed) scores 1. magent does not prescribe therapy.","required":true,"example":"true"}],"errors":[{"code":"invalid_maggic","message":"MAGGIC inputs must be the thirteen Pocock 2013 integer-score variables from that paper (age, EF, NYHA, creatinine, diabetes, beta-blocker, SBP, BMI, diagnosis duration, smoker, COPD, sex, ACEI/ARB). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/maggic","citation":{"authors":"Pocock SJ, Ariti CA, McMurray JJV, Maggioni A, Køber L, Squire IB, Swedberg K, Dobson J, Poppe KK, Whalley GA, Doughty RN","doi":"10.1093/eurheartj/ehs337","id":"pocock-2013","pmid":"23095984","source":"Eur Heart J. 2013;34(19):1404-1413","title":"Predicting survival in heart failure: a risk score based on 39 372 patients from 30 studies","url":"https://doi.org/10.1093/eurheartj/ehs337"},"formula_expression":"MAGGIC integer score (Pocock 2013 Figure 2): EF <20 7, 20-24 6, 25-29 5, 30-34 3, 35-39 2, >=40 0; age extra by EF (<30 / 30-39 / >=40): <55 0/0/0, 55-59 1/2/3, 60-64 2/4/5, 65-69 4/6/7, 70-74 6/8/9, 75-79 8/10/12, >=80 10/13/15; SBP extra by EF: <110 5/3/2, 110-119 4/2/1, 120-129 3/1/1, 130-139 2/1/0, 140-149 1/0/0, >=150 0/0/0; BMI <15 6, 15-19 5, 20-24 3, 25-29 2, >=30 0; creatinine umol/L <90 0, 90-109 1, 110-129 2, 130-149 3, 150-169 4, 170-209 5, 210-249 6, >=250 8; NYHA I 0, II 2, III 6, IV 8; male 1; current smoker 1; diabetes 3; COPD 2; HF duration >18 months 2; not prescribed beta-blocker 3; not prescribed ACEI/ARB 1; Table 4 1-year and 3-year death probabilities for scores 0-50","purpose":"Sum the Pocock 2013 MAGGIC integer chart from thirteen caller-supplied heart-failure predictors and return the published Table 4 1-year and 3-year death probabilities for scores 0-50.","markdown_url":"https://magentlab.com/docs/maggic.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"maggic"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"age_years","type":"integer","description":"Age in years used"},{"name":"ef_percent","type":"number","description":"Ejection fraction used, percent"},{"name":"nyha_class","type":"integer","description":"Caller-assigned NYHA class 1-4 used"},{"name":"creatinine_umol_l","type":"number","description":"Serum creatinine used, µmol/L (after conversion if mg/dL was supplied)"},{"name":"diabetes","type":"boolean","description":"Diabetes flag used"},{"name":"beta_blocker","type":"boolean","description":"Prescribed beta-blocker flag used"},{"name":"systolic_mm_hg","type":"number","description":"Systolic BP used, mm Hg"},{"name":"bmi_kg_m2","type":"number","description":"Caller-supplied BMI used, kg/m²"},{"name":"hf_duration_gt_18_months","type":"boolean","description":"HF duration >18 months flag used"},{"name":"current_smoker","type":"boolean","description":"Current-smoker flag used"},{"name":"copd","type":"boolean","description":"COPD flag used"},{"name":"sex","type":"string","description":"female or male used"},{"name":"acei_arb","type":"boolean","description":"Prescribed ACEI/ARB flag used"},{"name":"score","type":"integer","description":"Pocock 2013 MAGGIC integer score"},{"name":"death_probability_1y","type":"number","description":"Table 4 1-year probability of death for scores 0-50. Omitted when score >50."},{"name":"death_probability_3y","type":"number","description":"Table 4 3-year probability of death for scores 0-50. Omitted when score >50."},{"name":"components","type":"array","description":"Per-predictor integer points"},{"name":"citation","type":"object","description":"Pocock 2013 Eur Heart J citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"acei_arb":"true","age":"50","beta_blocker":"true","bmi_kg_m2":"30","copd":"false","creatinine_umol_l":"80","current_smoker":"false","diabetes":"false","ef_percent":"55","hf_duration_gt_18_months":"false","nyha_class":"1","sex":"female","systolic_mm_hg":"150"},{"acei_arb":"true","age":"50","beta_blocker":"true","bmi_kg_m2":"30","copd":"false","creatinine_umol_l":"80","current_smoker":"false","diabetes":"false","ef_percent":"55","hf_duration_gt_18_months":"false","nyha_class":"1","sex":"female","systolic_mm_hg":"150"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/maggic","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/maggic?age=50&ef_percent=55&nyha_class=1&creatinine_umol_l=80&diabetes=false&beta_blocker=true&systolic_mm_hg=150&bmi_kg_m2=30&hf_duration_gt_18_months=false&current_smoker=false&copd=false&sex=female&acei_arb=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/maggic","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/gwtg-hf","description":"Peterson 2010 GWTG-HF Figure 2 integer points for in-hospital mortality in hospitalized heart failure: age 0-28, systolic BP 0-28, BUN 0-28, sodium 0-4, heart rate 0-8, COPD +2, caller-assigned nonblack (black=false) +3. Total 0-100. magent does not assign race. Not a diagnosis.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (integer 18-120). Peterson 2010 Figure 2: ≤19 scores 0; 20-29 scores 3; 30-39 scores 6; 40-49 scores 8; 50-59 scores 11; 60-69 scores 14; 70-79 scores 17; 80-89 scores 19; 90-99 scores 22; 100-109 scores 25; ≥110 scores 28.","required":true,"example":70},{"in":"query","name":"sbp_mm_hg","type":"integer","description":"Admission systolic blood pressure in mm Hg (integer 50-250). Peterson 2010 Figure 2: 50-59 scores 28, then lower points as SBP rises, to ≥200 scores 0. magent does not measure blood pressure.","required":true,"example":130},{"in":"query","name":"bun_mg_dl","type":"integer","description":"Admission blood urea nitrogen in mg/dL (integer 1-200). Peterson 2010 Figure 2: ≤9 scores 0; ≥150 scores 28. magent does not assay BUN.","required":true,"example":20},{"in":"query","name":"sodium_mmol_l","type":"integer","description":"Admission serum sodium in mmol/L (integer 110-160; numerically equal to mEq/L). Peterson 2010 Figure 2: ≤130 scores 4; 131-133 scores 3; 134-136 scores 2; 137-138 scores 1; ≥139 scores 0. magent does not assay sodium.","required":true,"example":138},{"in":"query","name":"heart_rate_bpm","type":"integer","description":"Admission heart rate in beats per minute (integer 30-220). Peterson 2010 Figure 2: ≤79 scores 0; 80-84 scores 1; 85-89 scores 3; 90-94 scores 4; 95-99 scores 5; 100-104 scores 6; ≥105 scores 8. magent does not measure heart rate.","required":true,"example":80},{"in":"query","name":"copd","type":"boolean","description":"History of chronic obstructive pulmonary disease as assigned by the caller (Peterson 2010 Figure 2). true scores 2. magent does not diagnose COPD.","required":true,"example":false},{"in":"query","name":"black","type":"boolean","description":"Caller-assigned black as used in Peterson 2010; magent does not assign race. Nonblack race (false) scores 3. true or false.","required":true,"example":true}],"errors":[{"code":"invalid_gwtg_hf","message":"GWTG-HF inputs must match Peterson 2010 age, SBP, BUN, sodium, heart rate, COPD, and caller-assigned black. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/gwtg-hf","citation":{"authors":"Peterson PN, Rumsfeld JS, Liang L, Albert NM, Hernandez AF, Peterson ED, Fonarow GC, Masoudi FA","doi":"10.1161/CIRCOUTCOMES.109.854877","id":"peterson-2010-gwtg-hf","pmid":"20123668","source":"Circ Cardiovasc Qual Outcomes. 2010;3(1):25-32","title":"A validated risk score for in-hospital mortality in patients with heart failure from the American Heart Association Get With the Guidelines Program","url":"https://doi.org/10.1161/CIRCOUTCOMES.109.854877"},"formula_expression":"GWTG-HF = age (<=19 0, 20-29 3, 30-39 6, 40-49 8, 50-59 11, 60-69 14, 70-79 17, 80-89 19, 90-99 22, 100-109 25, >=110 28) + sbp_mm_hg (50-59 28, 60-69 26, 70-79 24, 80-89 23, 90-99 21, 100-109 19, 110-119 17, 120-129 15, 130-139 13, 140-149 11, 150-159 9, 160-169 8, 170-179 6, 180-189 4, 190-199 2, >=200 0) + bun_mg_dl (<=9 0, 10-19 2, 20-29 4, 30-39 6, 40-49 8, 50-59 9, 60-69 11, 70-79 13, 80-89 15, 90-99 17, 100-109 19, 110-119 21, 120-129 23, 130-139 25, 140-149 27, >=150 28) + sodium_mmol_l (<=130 4, 131-133 3, 134-136 2, 137-138 1, >=139 0) + heart_rate_bpm (<=79 0, 80-84 1, 85-89 3, 90-94 4, 95-99 5, 100-104 6, >=105 8) + copd 2 + nonblack (black=false) 3; Peterson 2010 Figure 2 integer points; total clamped to 0-100","purpose":"Sum Peterson 2010 Figure 2 GWTG-HF integer points from seven admission predictors (age, systolic BP, BUN, sodium, heart rate, COPD, and caller-assigned nonblack race) for in-hospital mortality in hospitalized heart failure.","markdown_url":"https://magentlab.com/docs/gwtg-hf.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"gwtg_hf"},{"name":"formula_expression","type":"string","description":"Peterson 2010 Figure 2 integer-point expression"},{"name":"score","type":"integer","description":"Figure 2 integer sum, clamped to the paper's 0-100 range. Component maxima can sum to 101 (heart rate ≥105 scores 8)."},{"name":"max_score","type":"integer","description":"100 (Peterson 2010 total point range)"},{"name":"age","type":"integer","description":"Age in years used for the age band"},{"name":"sbp_mm_hg","type":"integer","description":"Systolic blood pressure in mm Hg used"},{"name":"bun_mg_dl","type":"integer","description":"BUN in mg/dL used"},{"name":"sodium_mmol_l","type":"integer","description":"Sodium in mmol/L used"},{"name":"heart_rate_bpm","type":"integer","description":"Heart rate in beats per minute used"},{"name":"copd","type":"boolean","description":"Caller-assigned COPD flag used"},{"name":"black","type":"boolean","description":"Caller-assigned black as used in Peterson 2010; magent does not assign race"},{"name":"components","type":"array","description":"Per-predictor Figure 2 points"},{"name":"citation","type":"object","description":"Peterson 2010 Circ Cardiovasc Qual Outcomes citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"70","black":"true","bun_mg_dl":"20","copd":"false","heart_rate_bpm":"80","sbp_mm_hg":"130","sodium_mmol_l":"138"},{"age":"70","black":"true","bun_mg_dl":"20","copd":"false","heart_rate_bpm":"80","sbp_mm_hg":"130","sodium_mmol_l":"138"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/gwtg-hf","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/gwtg-hf?age=70&sbp_mm_hg=130&bun_mg_dl=20&sodium_mmol_l=138&heart_rate_bpm=80&copd=false&black=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/gwtg-hf","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/pcp-hf","description":"Khan 2019 PCP-HF 10-year incident heart-failure percent for age 30-79 from sex, caller-assigned white or black cohort, treated or untreated systolic BP and fasting glucose, total and HDL cholesterol, BMI, smoking, and QRS duration. Table 2 coefficients. Caller assigns cohort; magent does not assign race. Not PREVENT 2024, not 2013 PCE, not a diagnosis or treatment order. magent does not assay lipids, measure blood pressure, or interpret an ECG.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (integer 30-79). Khan 2019 Table 2 10-year incident HF is for ages 30-79. magent does not take a date of birth.","required":true,"example":50},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"Sex used by the sex-specific Table 2 coefficients (female or male). Not cohort.","required":true,"example":"female"},{"in":"query","name":"cohort","type":"string","enum":["white","black"],"description":"Caller-assigned cohort as used in Khan 2019 Table 2: white or black (paper terms). Not param race. magent does not assign race or ethnicity. Other strings are rejected.","required":true,"example":"white"},{"in":"query","name":"sbp_mm_hg","type":"number","description":"Systolic blood pressure in mm Hg (50-250). Enters as ln(SBP) with the treated or untreated Table 2 coefficient according to antihypertensive. magent does not measure blood pressure.","required":true,"example":120},{"in":"query","name":"antihypertensive","type":"boolean","description":"Current antihypertensive treatment as assigned by the caller (true or false). true uses the Table 2 treated-SBP coefficient (and age × treated SBP when that cell is not N/A). false uses untreated SBP. Not both.","required":true,"example":false},{"in":"query","name":"glucose_mg_dl","type":"number","description":"Fasting glucose in mg/dL (40-600). Enters as ln(glucose) with the treated or untreated Table 2 coefficient according to diabetes_medication. magent does not assay glucose.","required":true,"example":90},{"in":"query","name":"diabetes_medication","type":"boolean","description":"Current diabetes medication as assigned by the caller (true or false). true uses the Table 2 treated-glucose coefficient. false uses untreated glucose. Not both.","required":true,"example":false},{"in":"query","name":"bmi_kg_m2","type":"number","description":"Body-mass index in kg/m2 (10-80). Enters as ln(BMI) and ln(age)×ln(BMI) when that Table 2 cell is not N/A. magent does not measure height or weight.","required":true,"example":22},{"in":"query","name":"total_cholesterol_mg_dl","type":"number","description":"Total cholesterol in mg/dL (50-800). Enters as ln(total cholesterol) when that Table 2 cell is not N/A. magent does not assay lipids.","required":true,"example":180},{"in":"query","name":"hdl_mg_dl","type":"number","description":"HDL cholesterol in mg/dL (5-150). Enters as ln(HDL-C) when that Table 2 cell is not N/A. magent does not assay lipids.","required":true,"example":55},{"in":"query","name":"smoker","type":"boolean","description":"Current cigarette smoking as assigned by the caller (true or false). Adds the Table 2 smoker term and ln(age) × smoker when that cell is not N/A. magent does not take a smoking history.","required":true,"example":false},{"in":"query","name":"qrs_ms","type":"number","description":"QRS duration in ms (40-300). Enters as ln(QRS). magent does not interpret an ECG.","required":true,"example":90}],"errors":[{"code":"invalid_pcp_hf","message":"PCP-HF inputs must match Khan 2019 age 30-79, sex, caller-assigned white or black cohort, treated or untreated SBP and glucose, lipids, BMI, smoking, and QRS. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/pcp-hf","citation":{"authors":"Khan SS, Ning H, Shah SJ, Yancy CW, Carnethon M, Berry JD, et al.","doi":"10.1016/j.jacc.2019.02.057","id":"khan-2019-pcp-hf","pmid":"31097157","source":"J Am Coll Cardiol. 2019;73(19):2388-2397","title":"10-Year Risk Equations for Incident Heart Failure in the General Population","url":"https://doi.org/10.1016/j.jacc.2019.02.057"},"formula_expression":"10-year incident HF % = 100*(1-S0**exp(IndX-MeanCV)); Khan 2019 Table 2; Ln=natural log; age 30-79; cohort white|black (caller-assigned paper terms; not param race); antihypertensive true uses treated SBP terms only; diabetes_medication true uses treated glucose terms only (not both); interactions only where Table 2 is not N/A; WHITE MALE: ln_age 41.94, ln_age^2 -0.88, ln_treated_sbp 1.03, ln_untreated_sbp 0.91, smoker 0.74, ln_treated_glucose 0.90, ln_untreated_glucose 0.78, ln_tc 0.49, ln_hdl -0.44, ln_bmi 37.2, ln_age*ln_bmi -8.83, ln_qrs 0.63, MeanCV 171.5, S0 0.98752; WHITE FEMALE: ln_age 20.55, ln_treated_sbp 12.95, ln_age*ln_treated_sbp -2.96, ln_untreated_sbp 11.86, ln_age*ln_untreated_sbp -2.73, smoker 11.02, ln_age*smoker -2.50, ln_treated_glucose 1.04, ln_untreated_glucose 0.91, ln_hdl -0.07, ln_bmi 1.33, ln_qrs 1.06, MeanCV 99.73, S0 0.99348; BLACK MALE: ln_age 2.88, ln_treated_sbp 2.31, ln_untreated_sbp 2.17, smoker 1.66, ln_age*smoker -0.25, ln_treated_glucose 0.64, ln_untreated_glucose 0.58, ln_hdl -0.81, ln_bmi 1.16, ln_qrs 0.73, MeanCV 28.73, S0 0.98295; BLACK FEMALE: ln_age 51.75, ln_treated_sbp 29.0, ln_age*ln_treated_sbp -6.59, ln_untreated_sbp 28.18, ln_age*ln_untreated_sbp -6.42, smoker 0.76, ln_treated_glucose 0.97, ln_untreated_glucose 0.80, ln_tc 0.32, ln_bmi 21.24, ln_age*ln_bmi -5.0, ln_qrs 1.27, MeanCV 233.9, S0 0.99260; round 1 decimal; not PREVENT 2024; not 2013 PCE; not a diagnosis","purpose":"Compute the Khan 2019 PCP-HF 10-year incident heart-failure percent for adults aged 30-79 from Table 2 sex- and cohort-specific Cox coefficients.","markdown_url":"https://magentlab.com/docs/pcp-hf.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"pcp_hf"},{"name":"formula_expression","type":"string","description":"Khan 2019 Table 2 sex- and cohort-specific 10-year incident HF"},{"name":"age","type":"integer","description":"Age in years used (30-79)"},{"name":"sex","type":"string","description":"female or male used"},{"name":"cohort","type":"string","description":"Caller-assigned white or black used"},{"name":"sbp_mm_hg","type":"number","description":"Systolic BP used, mm Hg"},{"name":"antihypertensive","type":"boolean","description":"Caller-assigned antihypertensive treatment used"},{"name":"glucose_mg_dl","type":"number","description":"Fasting glucose used, mg/dL"},{"name":"diabetes_medication","type":"boolean","description":"Caller-assigned diabetes medication used"},{"name":"bmi_kg_m2","type":"number","description":"BMI used, kg/m2"},{"name":"total_cholesterol_mg_dl","type":"number","description":"Total cholesterol used, mg/dL"},{"name":"hdl_mg_dl","type":"number","description":"HDL-C used, mg/dL"},{"name":"smoker","type":"boolean","description":"Caller-assigned current smoking used"},{"name":"qrs_ms","type":"number","description":"QRS duration used, ms"},{"name":"individual_sum","type":"number","description":"Table 2 IndX (coefficient × value sum), 4 decimals"},{"name":"ten_year_hf_percent","type":"number","description":"10-year incident HF percent, 1 decimal"},{"name":"citation","type":"object","description":"Khan et al. J Am Coll Cardiol 2019 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"50","antihypertensive":"false","bmi_kg_m2":"22","cohort":"white","diabetes_medication":"false","glucose_mg_dl":"90","hdl_mg_dl":"55","qrs_ms":"90","sbp_mm_hg":"120","sex":"female","smoker":"false","total_cholesterol_mg_dl":"180"},{"age":"50","antihypertensive":"false","bmi_kg_m2":"22","cohort":"white","diabetes_medication":"false","glucose_mg_dl":"90","hdl_mg_dl":"55","qrs_ms":"90","sbp_mm_hg":"120","sex":"female","smoker":"false","total_cholesterol_mg_dl":"180"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/pcp-hf","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/pcp-hf?age=50&sex=female&cohort=white&sbp_mm_hg=120&antihypertensive=false&glucose_mg_dl=90&diabetes_medication=false&bmi_kg_m2=22&total_cholesterol_mg_dl=180&hdl_mg_dl=55&smoker=false&qrs_ms=90","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/pcp-hf","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/seattle-hf","description":"Levy 2006 Seattle Heart Failure Model 1-, 2-, and 3-year survival from Table 2 multivariate HRs. Score = sum of ln(HR)*x; S(t)=exp(-0.0405*t)**exp(score). Age, sex, NYHA, EF, ischemic etiology, SBP, furosemide-eq diuretic, labs, and already-on ACEI, beta-blocker, ARB, K-sparing diuretic, statin, BiV, ICD, or BiV-ICD. Caller assigns class, etiology, and therapy. magent does not measure labs or blood pressure. Not a diagnosis, prescription, or device order.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (integer 14-100). Levy 2006 Table 2: per decade, multivariate HR 1.090. magent does not take a date of birth.","required":true,"example":60},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"Sex used by the forced Table 2 male HR 1.089 (female or male). magent does not assign sex.","required":true,"example":"male"},{"in":"query","name":"nyha","type":"integer","enum":[1,2,3,4],"description":"NYHA class 1-4 as assigned by the caller (integer). Levy 2006 Table 2 multivariate HR 1.600 per class. magent does not examine the patient.","required":true,"example":2},{"in":"query","name":"ef_percent","type":"number","description":"Left-ventricular ejection fraction in percent (1-80). Enters as 100/EF with Table 2 HR 1.030. magent does not interpret an echocardiogram.","required":true,"example":30},{"in":"query","name":"ischemic","type":"boolean","description":"Ischemic etiology as assigned by the caller (true or false). Table 2 multivariate HR 1.354. magent does not assign etiology.","required":true,"example":false},{"in":"query","name":"sbp_mm_hg","type":"number","description":"Systolic blood pressure in mm Hg (50-250). Table 2: per 10 mm Hg, HR 0.877, truncated at 160 (SBP 180 is scored as 160). magent does not measure blood pressure.","required":true,"example":120},{"in":"query","name":"weight_kg","type":"number","description":"Body weight in kg (20-250) used only to convert the furosemide-equivalent diuretic dose to mg/kg/day. magent does not weigh the patient.","required":true,"example":80},{"in":"query","name":"loop_diuretic_furosemide_eq_mg_day","type":"number","description":"Daily loop-diuretic dose as furosemide milligram equivalent (0-1000). Paper conversion: furosemide 80 = torsemide 40 = bumetanide 3. Divided by weight_kg; Table 2 HR 1.178 per mg/kg/day. magent does not prescribe a diuretic.","required":true,"example":0},{"in":"query","name":"allopurinol","type":"boolean","description":"Current allopurinol as assigned by the caller (true or false). Table 2 multivariate HR 1.571. magent does not prescribe allopurinol.","required":true,"example":false},{"in":"query","name":"sodium_meq_l","type":"number","description":"Serum sodium in mEq/L (110-160). Table 2: if Na<138, (138-Na) with HR 1.050 per mEq; values ≥138 add 0. magent does not assay sodium.","required":true,"example":140},{"in":"query","name":"total_cholesterol_mg_dl","type":"number","description":"Total cholesterol in mg/dL (50-800). Enters as 100/cholesterol with Table 2 HR 2.206. magent does not assay lipids.","required":true,"example":180},{"in":"query","name":"hemoglobin_g_dl","type":"number","description":"Hemoglobin in g/dL (4-22). Table 2: if Hb<16, (16-Hb) with HR 1.124 per g/dL; if Hb>16, (Hb-16) with HR 1.336 per g/dL. magent does not assay hemoglobin.","required":true,"example":14},{"in":"query","name":"lymphocyte_percent","type":"number","description":"Percent lymphocytes (0-100). Table 2: per 5% when <47%, HR 0.897; values >47% are truncated to 47. magent does not assay a CBC.","required":true,"example":25},{"in":"query","name":"uric_acid_mg_dl","type":"number","description":"Serum uric acid in mg/dL (0.5-25). Table 2: per mg/dL when >3.4, HR 1.064; values <3.4 are truncated to 3.4. magent does not assay uric acid.","required":true,"example":6},{"in":"query","name":"ace_inhibitor","type":"boolean","description":"Patient already on an ACE inhibitor as assigned by the caller (true or false). Table 2 already-on HR 0.77. Not a prescription.","required":true,"example":true},{"in":"query","name":"beta_blocker","type":"boolean","description":"Patient already on a beta-blocker as assigned by the caller (true or false). Table 2 already-on HR 0.66. Not a prescription.","required":true,"example":true},{"in":"query","name":"arb","type":"boolean","description":"Patient already on an angiotensin-receptor blocker as assigned by the caller (true or false). Table 2 already-on HR 0.85. Not a prescription.","required":true,"example":false},{"in":"query","name":"k_sparing_diuretic","type":"boolean","description":"Patient already on a potassium-sparing diuretic as assigned by the caller (true or false). Table 2 already-on HR 0.74. Not a prescription.","required":true,"example":false},{"in":"query","name":"statin","type":"boolean","description":"Patient already on a statin as assigned by the caller (true or false). Table 2 already-on / multivariate HR 0.63. Not a prescription.","required":true,"example":false},{"in":"query","name":"biv_pacemaker","type":"boolean","description":"Patient already has a biventricular pacemaker (without ICD) as assigned by the caller (true or false). Table 2 already-on HR 1.00. Mutually exclusive with icd and biv_icd. Not a device order.","required":true,"example":false},{"in":"query","name":"icd","type":"boolean","description":"Patient already has an ICD (without biventricular pacing) as assigned by the caller (true or false). Table 2 already-on HR 0.73. Mutually exclusive with biv_pacemaker and biv_icd. Not a device order.","required":true,"example":false},{"in":"query","name":"biv_icd","type":"boolean","description":"Patient already has a biventricular ICD as assigned by the caller (true or false). Table 2 already-on HR 0.79. Mutually exclusive with biv_pacemaker and icd. Not a device order.","required":true,"example":false}],"errors":[{"code":"invalid_shfm","message":"Seattle Heart Failure Model inputs must match Levy 2006 Table 2 clinical, laboratory, medication, and device predictors. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/seattle-hf","citation":{"authors":"Levy WC, Mozaffarian D, Linker DT, Sutradhar SC, Anker SD, Cropp AB, et al.","doi":"10.1161/CIRCULATIONAHA.105.584102","id":"levy-2006-shfm","pmid":"16534009","source":"Circulation. 2006;113(11):1424-1433","title":"The Seattle Heart Failure Model: Prediction of Survival in Heart Failure","url":"https://doi.org/10.1161/CIRCULATIONAHA.105.584102"},"formula_expression":"score = sum(ln(HR)*x); S(t)=exp(-0.0405*t)**exp(score) for t years 0-5; Levy 2006 Table 2 multivariate HRs (italic β=ln(HR); medication/device = patient-already-on column); 1/2/3-year survival % round 1 decimal; age/10 * ln(1.090); male ln(1.089) (forced); NYHA * ln(1.600); (100/EF)*ln(1.030); ischemic ln(1.354); min(SBP,160)/10 * ln(0.877); furosemide-eq mg/kg/day * ln(1.178) (furosemide 80 = torsemide 40 = bumetanide 3); allopurinol ln(1.571); if Na<138: (138-Na)*ln(1.050); (100/cholesterol)*ln(2.206); if Hb<16: (16-Hb)*ln(1.124); if Hb>16: (Hb-16)*ln(1.336); min(%lymphocytes,47)/5 * ln(0.897); max(uric_acid,3.4)*ln(1.064); ACEI ln(0.77); beta-blocker ln(0.66); ARB ln(0.85); K-sparing diuretic ln(0.74); statin ln(0.63); BiV pacemaker ln(1.00); ICD ln(0.73); BiV-ICD ln(0.79); devices mutually exclusive; not a diagnosis or treatment/device order","purpose":"Compute Levy 2006 Seattle Heart Failure Model 1-, 2-, and 3-year survival percents from Table 2 multivariate hazard ratios for a patient already on the listed medications and devices.","markdown_url":"https://magentlab.com/docs/seattle-hf.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"shfm"},{"name":"formula_expression","type":"string","description":"Levy 2006 Table 2 multivariate SHFM score and S(t)"},{"name":"age","type":"integer","description":"Age in years used (14-100)"},{"name":"sex","type":"string","description":"female or male used"},{"name":"nyha","type":"integer","description":"NYHA class 1-4 used"},{"name":"ef_percent","type":"number","description":"Ejection fraction used, percent"},{"name":"ischemic","type":"boolean","description":"Caller-assigned ischemic etiology used"},{"name":"sbp_mm_hg","type":"number","description":"Systolic BP used, mm Hg"},{"name":"weight_kg","type":"number","description":"Weight used, kg"},{"name":"loop_diuretic_furosemide_eq_mg_day","type":"number","description":"Furosemide-equivalent loop-diuretic dose used, mg/day"},{"name":"diuretic_furosemide_eq_mg_kg_day","type":"number","description":"Table 2 diuretic dose, furosemide-eq mg/kg/day, 4 decimals"},{"name":"allopurinol","type":"boolean","description":"Caller-assigned allopurinol used"},{"name":"sodium_meq_l","type":"number","description":"Serum sodium used, mEq/L"},{"name":"total_cholesterol_mg_dl","type":"number","description":"Total cholesterol used, mg/dL"},{"name":"hemoglobin_g_dl","type":"number","description":"Hemoglobin used, g/dL"},{"name":"lymphocyte_percent","type":"number","description":"Percent lymphocytes used"},{"name":"uric_acid_mg_dl","type":"number","description":"Uric acid used, mg/dL"},{"name":"ace_inhibitor","type":"boolean","description":"Caller-assigned already-on ACE inhibitor used"},{"name":"beta_blocker","type":"boolean","description":"Caller-assigned already-on beta-blocker used"},{"name":"arb","type":"boolean","description":"Caller-assigned already-on ARB used"},{"name":"k_sparing_diuretic","type":"boolean","description":"Caller-assigned already-on potassium-sparing diuretic used"},{"name":"statin","type":"boolean","description":"Caller-assigned already-on statin used"},{"name":"biv_pacemaker","type":"boolean","description":"Caller-assigned already-on biventricular pacemaker used"},{"name":"icd","type":"boolean","description":"Caller-assigned already-on ICD used"},{"name":"biv_icd","type":"boolean","description":"Caller-assigned already-on biventricular ICD used"},{"name":"score","type":"number","description":"Table 2 SHFM score (sum of ln(HR)*x), 4 decimals"},{"name":"survival_1y_percent","type":"number","description":"1-year survival percent, 1 decimal"},{"name":"survival_2y_percent","type":"number","description":"2-year survival percent, 1 decimal"},{"name":"survival_3y_percent","type":"number","description":"3-year survival percent, 1 decimal"},{"name":"citation","type":"object","description":"Levy et al. Circulation 2006 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"ace_inhibitor":"true","age":"60","allopurinol":"false","arb":"false","beta_blocker":"true","biv_icd":"false","biv_pacemaker":"false","ef_percent":"30","hemoglobin_g_dl":"14","icd":"false","ischemic":"false","k_sparing_diuretic":"false","loop_diuretic_furosemide_eq_mg_day":"0","lymphocyte_percent":"25","nyha":"2","sbp_mm_hg":"120","sex":"male","sodium_meq_l":"140","statin":"false","total_cholesterol_mg_dl":"180","uric_acid_mg_dl":"6","weight_kg":"80"},{"ace_inhibitor":"true","age":"60","allopurinol":"false","arb":"false","beta_blocker":"true","biv_icd":"false","biv_pacemaker":"false","ef_percent":"30","hemoglobin_g_dl":"14","icd":"false","ischemic":"false","k_sparing_diuretic":"false","loop_diuretic_furosemide_eq_mg_day":"0","lymphocyte_percent":"25","nyha":"2","sbp_mm_hg":"120","sex":"male","sodium_meq_l":"140","statin":"false","total_cholesterol_mg_dl":"180","uric_acid_mg_dl":"6","weight_kg":"80"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/seattle-hf","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/seattle-hf?age=60&sex=male&nyha=2&ef_percent=30&ischemic=false&sbp_mm_hg=120&weight_kg=80&loop_diuretic_furosemide_eq_mg_day=0&allopurinol=false&sodium_meq_l=140&total_cholesterol_mg_dl=180&hemoglobin_g_dl=14&lymphocyte_percent=25&uric_acid_mg_dl=6&ace_inhibitor=true&beta_blocker=true&arb=false&k_sparing_diuretic=false&statin=false&biv_pacemaker=false&icd=false&biv_icd=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/seattle-hf","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/save","description":"Schmidt 2015 SAVE-score from Table 4 integer cells plus constant −6. Age, weight, additive diagnoses, chronic renal failure, acute liver/CNS/renal failure, intubation hours, PIP ≤20, cardiac arrest, diastolic BP ≥40, pulse pressure ≤20, bicarbonate ≤15. Class I–V hospital survival 75/58/42/30/18%. Range −35 to 17. Not a VA-ECMO assignment. Not modified SAVE.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Schmidt 2015 Table 4: 18–38 → 7, 39–52 → 4, 53–62 → 3, ≥63 → 0. Adult SAVE-score; magent does not assign pediatric VA-ECMO.","required":true,"example":"70"},{"in":"query","name":"weight_kg","type":"number","description":"Weight in kg (20-400). Table 4 / Table 3 bands: ≤65 → 1, 66–89 → 2, ≥90 → 0. 65 kg scores 1 (≤65 before the 65–89 typeset overlap). Caller-supplied; magent does not weigh the patient.","required":true,"example":"95"},{"in":"query","name":"myocarditis","type":"boolean","description":"Acute myocarditis diagnosis (Table 4, +3). Diagnoses are not mutually exclusive (select one or more). true or false. Caller-assigned.","required":true,"example":"false"},{"in":"query","name":"refractory_vt_vf","type":"boolean","description":"Refractory ventricular tachycardia or fibrillation (Table 4, +2). May stack with other diagnosis flags. true or false. Caller-assigned.","required":true,"example":"false"},{"in":"query","name":"post_heart_or_lung_transplant","type":"boolean","description":"Post heart or lung transplantation (Table 4, +3). May stack with other diagnosis flags. true or false. Caller-assigned.","required":true,"example":"false"},{"in":"query","name":"congenital_heart_disease","type":"boolean","description":"Congenital heart disease (Table 4, −3). May stack with other diagnosis flags. true or false. Caller-assigned.","required":true,"example":"false"},{"in":"query","name":"liver_failure","type":"boolean","description":"Acute pre-ECMO liver failure (Table 4, −3). Paper footnote: bilirubin ≥33 µmol/L or ALT or AST >70 U/L. Acute organ failures may stack. true or false. Caller-assigned; magent does not measure labs.","required":true,"example":"false"},{"in":"query","name":"cns_dysfunction","type":"boolean","description":"Acute pre-ECMO CNS dysfunction (Table 4, −3): neurotrauma, stroke, encephalopathy, cerebral embolism, seizure or epileptic syndromes. May stack. true or false. Caller-assigned; magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"acute_renal_failure","type":"boolean","description":"Acute pre-ECMO renal failure (Table 4, −3): creatinine >1.5 mg/dL with or without RRT. Distinct from chronic_renal_failure. May stack. true or false. Caller-assigned.","required":true,"example":"false"},{"in":"query","name":"chronic_renal_failure","type":"boolean","description":"Chronic renal failure (Table 4, −6): kidney damage or GFR <60 mL/min/1.73 m² for ≥3 months. Distinct from acute_renal_failure. true or false. Caller-assigned.","required":true,"example":"false"},{"in":"query","name":"intubation_hours","type":"number","description":"Hours of intubation before ECMO (0-720). Table 4: ≤10 → 0, 11–29 → −2, ≥30 → −4. Caller-supplied; magent does not read a ventilator log.","required":true,"example":"5"},{"in":"query","name":"pip_cmh2o","type":"number","description":"Peak inspiratory pressure in cmH2O (5-80). Table 4: ≤20 → +3, otherwise 0. Worst value as assigned by the caller. magent does not read airway pressure.","required":true,"example":"25"},{"in":"query","name":"pre_ecmo_cardiac_arrest","type":"boolean","description":"Cardiac arrest before ECMO (Table 4, −2). Derivation excluded eCPR during cannulation. true or false. Caller-assigned.","required":true,"example":"false"},{"in":"query","name":"diastolic_bp_mm_hg","type":"number","description":"Diastolic blood pressure in mm Hg before ECMO (1-200). Worst value within 6 h of cannulation. Table 4: ≥40 → +3, otherwise 0. magent does not measure blood pressure.","required":true,"example":"35"},{"in":"query","name":"pulse_pressure_mm_hg","type":"number","description":"Pulse pressure in mm Hg before ECMO (0-200). Worst value within 6 h. Table 4: ≤20 → −2, otherwise 0. Caller-supplied; magent does not subtract systolic minus diastolic.","required":true,"example":"40"},{"in":"query","name":"bicarbonate_mmol_l","type":"number","description":"Serum bicarbonate in mmol/L before ECMO (1-50). Worst value within 6 h. Table 4: ≤15 → −3, otherwise 0. magent does not measure HCO3.","required":true,"example":"24"}],"errors":[{"code":"invalid_save","message":"SAVE needs Schmidt 2015 pre-ECMO cardiogenic-shock predictors in published ranges. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/save","citation":{"authors":"Schmidt M, Burrell A, Roberts L, et al.","doi":"10.1093/eurheartj/ehv194","id":"schmidt-2015","pmid":"26033984","source":"Eur Heart J. 2015;36(33):2246-2256","title":"Predicting survival after ECMO for refractory cardiogenic shock: the survival after veno-arterial-ECMO (SAVE)-score","url":"https://doi.org/10.1093/eurheartj/ehv194"},"formula_expression":"SAVE = constant(−6) + age(18–38 → 7, 39–52 → 4, 53–62 → 3, ≥63 → 0) + weight_kg(≤65 → 1, 66–89 → 2, ≥90 → 0) + myocarditis(3) + refractory_vt_vf(2) + post_heart_or_lung_transplant(3) + congenital_heart_disease(−3) + liver_failure(−3) + cns_dysfunction(−3) + acute_renal_failure(−3) + chronic_renal_failure(−6) + intubation_hours(≤10 → 0, 11–29 → −2, ≥30 → −4) + pip_cmh2o(≤20 → 3) + pre_ecmo_cardiac_arrest(−2) + diastolic_bp_mm_hg(≥40 → 3) + pulse_pressure_mm_hg(≤20 → −2) + bicarbonate_mmol_l(≤15 → −3); diagnoses and acute organ failures may stack (Table 4 select one or more); other diagnoses 0; range −35 to 17; class I >5 → 75%, II 1–5 → 58%, III −4 to 0 → 42%, IV −9 to −5 → 30%, V ≤−10 → 18%","purpose":"Sum Schmidt 2015 Table 4 SAVE-score cells including the published constant −6 and return class I–V with hospital survival percents.","markdown_url":"https://magentlab.com/docs/save.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"save"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"SAVE-score, theoretical −35 to 17"},{"name":"min_score","type":"integer","description":"-35"},{"name":"max_score","type":"integer","description":"17"},{"name":"save_class","type":"string","description":"Schmidt 2015 Table 4 class I (>5), II (1–5), III (−4 to 0), IV (−9 to −5), or V (≤−10). A class, not a cannulation order."},{"name":"hospital_survival_percent","type":"integer","description":"Table 4 hospital survival for that class: I 75, II 58, III 42, IV 30, V 18. Score 0 is ~50% in the paper text; this field is the class percent, not a logit."},{"name":"components","type":"array","description":"Per-cell Table 4 points including constant −6"},{"name":"citation","type":"object","description":"Schmidt et al. Eur Heart J 2015 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"acute_renal_failure":"false","age":"70","bicarbonate_mmol_l":"24","chronic_renal_failure":"false","cns_dysfunction":"false","congenital_heart_disease":"false","diastolic_bp_mm_hg":"35","intubation_hours":"5","liver_failure":"false","myocarditis":"false","pip_cmh2o":"25","post_heart_or_lung_transplant":"false","pre_ecmo_cardiac_arrest":"false","pulse_pressure_mm_hg":"40","refractory_vt_vf":"false","weight_kg":"95"},{"acute_renal_failure":"false","age":"70","bicarbonate_mmol_l":"24","chronic_renal_failure":"false","cns_dysfunction":"false","congenital_heart_disease":"false","diastolic_bp_mm_hg":"35","intubation_hours":"5","liver_failure":"false","myocarditis":"false","pip_cmh2o":"25","post_heart_or_lung_transplant":"false","pre_ecmo_cardiac_arrest":"false","pulse_pressure_mm_hg":"40","refractory_vt_vf":"false","weight_kg":"95"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/save","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/save?age=70&weight_kg=95&myocarditis=false&refractory_vt_vf=false&post_heart_or_lung_transplant=false&congenital_heart_disease=false&liver_failure=false&cns_dysfunction=false&acute_renal_failure=false&chronic_renal_failure=false&intubation_hours=5&pip_cmh2o=25&pre_ecmo_cardiac_arrest=false&diastolic_bp_mm_hg=35&pulse_pressure_mm_hg=40&bicarbonate_mmol_l=24","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/save","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/hcm-risk-scd","description":"O'Mahony 2014 HCM Risk-SCD: 5-year SCD probability from wall thickness, LA diameter, LVOT gradient, family history of SCD, NSVT, unexplained syncope, and age. Returns prognostic_index, five_year_scd_risk_percent, and 4%/6% risk_band (lower / intermediate / higher). Not an ICD or device order. Not a medical device.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age at clinical evaluation in years (integer 16-80). O'Mahony 2014 continuous predictor (coefficient -0.01799934). Derivation was HCM evaluated at 16 years or older. magent does not examine the patient.","required":true,"example":40},{"in":"query","name":"max_wall_thickness_mm","type":"number","description":"Maximal left-ventricular wall thickness in mm (10.0-35.0). Enters as linear and squared terms. magent does not read an echocardiogram.","required":true,"example":20},{"in":"query","name":"la_diameter_mm","type":"number","description":"Left-atrial diameter in mm (20.0-70.0). O'Mahony 2014 continuous predictor. magent does not measure the atrium.","required":true,"example":40},{"in":"query","name":"max_lvot_gradient_mm_hg","type":"number","description":"Maximal left-ventricular outflow-tract gradient in mm Hg (0.0-154.0). magent does not measure the gradient.","required":true,"example":20},{"in":"query","name":"family_history_scd","type":"boolean","description":"Family history of sudden cardiac death as assigned by the caller (true=1, false=0). magent does not take a family history.","required":true,"example":false},{"in":"query","name":"nsvt","type":"boolean","description":"Non-sustained ventricular tachycardia as assigned by the caller (true=1, false=0). magent does not interpret Holter monitoring.","required":true,"example":false},{"in":"query","name":"unexplained_syncope","type":"boolean","description":"Unexplained syncope as assigned by the caller (true=1, false=0). magent does not adjudicate syncope.","required":true,"example":false}],"errors":[{"code":"invalid_hcm_age","message":"age must be an integer from 16 to 80 (O'Mahony 2014 HCM Risk-SCD). Returned before settlement; you are not charged.","status":400},{"code":"invalid_wall_thickness","message":"max_wall_thickness_mm must be a number from 10.0 to 35.0 (O'Mahony 2014). Returned before settlement; you are not charged.","status":400},{"code":"invalid_la_diameter","message":"la_diameter_mm must be a number from 20.0 to 70.0 (O'Mahony 2014). Returned before settlement; you are not charged.","status":400},{"code":"invalid_lvot_gradient","message":"max_lvot_gradient_mm_hg must be a number from 0.0 to 154.0 (O'Mahony 2014). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/hcm-risk-scd","citation":{"authors":"O'Mahony C, Jichi F, Pavlou M, et al.","doi":"10.1093/eurheartj/eht439","id":"omahony-2014","pmid":"24126876","source":"Eur Heart J. 2014;35(30):2010-2020","title":"A novel clinical risk prediction model for sudden cardiac death in hypertrophic cardiomyopathy (HCM Risk-SCD)","url":"https://doi.org/10.1093/eurheartj/eht439"},"formula_expression":"P_5y = 1 - 0.998^exp(PI); PI = 0.15939858*max_wall_thickness_mm - 0.00294271*max_wall_thickness_mm^2 + 0.0259082*la_diameter_mm + 0.00446131*max_lvot_gradient_mm_hg + 0.4583082*family_history_scd + 0.82639195*nsvt + 0.71650361*unexplained_syncope - 0.01799934*age; flags 1 if true else 0; O'Mahony 2014; risk_band <4 lower, 4 to <6 intermediate, >=6 higher","purpose":"Compute the O'Mahony 2014 HCM Risk-SCD 5-year sudden cardiac death probability from maximal wall thickness, left-atrial diameter, maximal LVOT gradient, family history of SCD, NSVT, unexplained syncope, and age.","markdown_url":"https://magentlab.com/docs/hcm-risk-scd.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"hcm_risk_scd"},{"name":"formula_expression","type":"string","description":"O'Mahony 2014 PI and 5-year SCD probability"},{"name":"age","type":"integer","description":"Age in years used (16-80)"},{"name":"max_wall_thickness_mm","type":"number","description":"Maximal wall thickness used, mm"},{"name":"la_diameter_mm","type":"number","description":"Left-atrial diameter used, mm"},{"name":"max_lvot_gradient_mm_hg","type":"number","description":"Maximal LVOT gradient used, mm Hg"},{"name":"family_history_scd","type":"boolean","description":"Caller-assigned family history of SCD used"},{"name":"nsvt","type":"boolean","description":"Caller-assigned NSVT used"},{"name":"unexplained_syncope","type":"boolean","description":"Caller-assigned unexplained syncope used"},{"name":"prognostic_index","type":"number","description":"O'Mahony 2014 prognostic index, 6 decimals"},{"name":"five_year_scd_risk_percent","type":"number","description":"5-year SCD probability percent, 1 decimal (100 * (1 - 0.998^exp(PI)))"},{"name":"risk_band","type":"string","description":"O'Mahony 2014 5-year operating points: lower (<4), intermediate (4 to <6), higher (>=6). Not an ICD indication or device order."},{"name":"citation","type":"object","description":"O'Mahony et al. Eur Heart J 2014 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"40","family_history_scd":"false","la_diameter_mm":"40","max_lvot_gradient_mm_hg":"20","max_wall_thickness_mm":"20","nsvt":"false","unexplained_syncope":"false"},{"age":"40","family_history_scd":"false","la_diameter_mm":"40","max_lvot_gradient_mm_hg":"20","max_wall_thickness_mm":"20","nsvt":"false","unexplained_syncope":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/hcm-risk-scd","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/hcm-risk-scd?age=40&max_wall_thickness_mm=20&la_diameter_mm=40&max_lvot_gradient_mm_hg=20&family_history_scd=false&nsvt=false&unexplained_syncope=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/hcm-risk-scd","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/aap-pediatric-bp","description":"AAP 2017 Flynn Table 3 pediatric BP category (normal, elevated, stage_1, stage_2) from age 1-17 and cuff mm Hg. Age ≥13 uses adult-aligned 120/80, 130/80, and 140/90 cutoffs. Age 1-12 needs caller 90th/95th mm Hg (magent does not interpolate height/sex tables). Category is the more severe limb. magent does not measure BP. Not a device, not a hypertension diagnosis, not the 2004 Fourth Report, and not ACC/AHA 2017 for age <13.","parameters":[{"in":"query","name":"age_years","type":"integer","description":"Completed age in years, integer 1-17 (Flynn 2017 Table 3). Age 1-12 uses the left-column percentile rule and requires caller 90th/95th mm Hg. Age 13-17 uses the right-column adult-aligned cutoffs and must omit percentile fields. Age 0 and age ≥18 are rejected.","required":true,"example":"15"},{"in":"query","name":"systolic_mm_hg","type":"number","description":"Caller-assigned cuff systolic blood pressure in mm Hg (50-250). magent does not measure blood pressure.","required":true,"example":"118"},{"in":"query","name":"diastolic_mm_hg","type":"number","description":"Caller-assigned cuff diastolic blood pressure in mm Hg (20-160). Must be less than systolic. magent does not measure blood pressure.","required":true,"example":"72"},{"in":"query","name":"sbp_p90_mm_hg","type":"number","description":"Caller-assigned AAP Table 4/5 systolic 90th percentile in mm Hg for that child (40-180, and must be < sbp_p95_mm_hg). Required for age 1-12. Must be omitted for age ≥13. magent does not interpolate height or sex tables.","required":false,"example":"108"},{"in":"query","name":"sbp_p95_mm_hg","type":"number","description":"Caller-assigned AAP Table 4/5 systolic 95th percentile in mm Hg for that child (40-180, and must be > sbp_p90_mm_hg). Required for age 1-12. Must be omitted for age ≥13. magent does not interpolate height or sex tables.","required":false,"example":"115"},{"in":"query","name":"dbp_p90_mm_hg","type":"number","description":"Caller-assigned AAP Table 4/5 diastolic 90th percentile in mm Hg for that child (40-180, and must be < dbp_p95_mm_hg). Required for age 1-12. Must be omitted for age ≥13. magent does not interpolate height or sex tables.","required":false,"example":"66"},{"in":"query","name":"dbp_p95_mm_hg","type":"number","description":"Caller-assigned AAP Table 4/5 diastolic 95th percentile in mm Hg for that child (40-180, and must be > dbp_p90_mm_hg). Required for age 1-12. Must be omitted for age ≥13. magent does not interpolate height or sex tables.","required":false,"example":"74"}],"errors":[{"code":"invalid_aap_pediatric_bp","message":"AAP 2017 pediatric BP inputs must match Flynn Table 3 age 1-17, systolic/diastolic mm Hg, and for age 1-12 caller-assigned 90th and 95th mm Hg from that guideline. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/aap-pediatric-bp","citation":{"authors":"Flynn JT, Kaelber DC, Baker-Smith CM, et al; Subcommittee on Screening and Management of High Blood Pressure in Children","doi":"10.1542/peds.2017-1904","id":"flynn-2017","pmid":"29192011","source":"Pediatrics. 2017;140(3):e20171904","title":"Clinical Practice Guideline for Screening and Management of High Blood Pressure in Children and Adolescents","url":"https://doi.org/10.1542/peds.2017-1904"},"formula_expression":"AAP 2017 Flynn Table 3 category is the more severe of the systolic and diastolic limbs (normal | elevated | stage_1 | stage_2). Age ≥13 (adult-aligned): normal if SBP <120 and DBP <80; elevated if SBP 120–129 and DBP <80; stage_1 if SBP 130–139 or DBP 80–89 and not stage_2; stage_2 if SBP ≥140 or DBP ≥90. Age 1–12 (caller-assigned AAP-table 90th and 95th mm Hg; magent does not interpolate Tables 4/5): stage_2 if SBP ≥ min(sbp_p95+12, 140) or DBP ≥ min(dbp_p95+12, 90); else stage_1 if SBP ≥ min(sbp_p95, 130) or DBP ≥ min(dbp_p95, 80); else elevated if SBP ≥ min(sbp_p90, 120) or DBP ≥ min(dbp_p90, 80); else normal. Percentile fields are required for age 1–12 and must be omitted for age ≥13. magent does not measure BP","purpose":"Apply Flynn 2017 Table 3 and return the more severe of the systolic and diastolic pediatric blood-pressure categories (normal, elevated, stage_1, or stage_2) from completed age and cuff readings, using caller-assigned 90th and 95th mm Hg for age 1-12.","markdown_url":"https://magentlab.com/docs/aap-pediatric-bp.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"aap_pediatric_bp"},{"name":"formula_expression","type":"string","description":"Published Flynn 2017 Table 3 pediatric BP category rule"},{"name":"category","type":"string","description":"More severe of the systolic and diastolic limbs: normal, elevated, stage_1, or stage_2. Not a hypertension diagnosis."},{"name":"age_years","type":"integer","description":"Echo of completed age in years (1-17)"},{"name":"systolic_mm_hg","type":"number","description":"Echo of cuff systolic mm Hg"},{"name":"diastolic_mm_hg","type":"number","description":"Echo of cuff diastolic mm Hg"},{"name":"components","type":"array","description":"Tree rows for systolic_stage_2, diastolic_stage_2, systolic_stage_1, diastolic_stage_1, systolic_elevated, and diastolic_elevated with factor, met, and value (the limb cutoff in mm Hg)"},{"name":"citation","type":"object","description":"Flynn 2017 Pediatrics citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age_years":"15","diastolic_mm_hg":"72","systolic_mm_hg":"118"},{"age_years":"15","diastolic_mm_hg":"72","systolic_mm_hg":"118"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/aap-pediatric-bp","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/aap-pediatric-bp?age_years=15&systolic_mm_hg=118&diastolic_mm_hg=72","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/aap-pediatric-bp","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/hfa-icos-anthracycline","description":"Lyon 2020 HFA-ICOS baseline cardiovascular risk before anthracycline chemotherapy. Returns risk_level low, medium, high, or very_high from published Very high, High, Medium 2, and Medium 1 factors, plus medium_points and the paper's expert-opinion cardiotoxicity_guide. Age and LVEF use the highest matching printed band only. Caller assigns labs and BMI >30. magent does not examine the patient or read imaging. Not a medical device or treatment order.","parameters":[{"in":"query","name":"age_years","type":"integer","description":"Age in years (18-100, integer). Lyon 2020: >=80 High; 65-79 Medium 2; <65 no age factor. Highest matching band only.","required":true,"example":50},{"in":"query","name":"lvef_percent","type":"integer","description":"LVEF percent (10-80, integer). Lyon 2020: <50 High; 50-54 Medium 2; >=55 no LVEF factor. Highest matching printed band only. magent does not read imaging.","required":true,"example":60},{"in":"query","name":"heart_failure_or_cardiomyopathy","type":"boolean","description":"Heart failure or cardiomyopathy (Lyon 2020 Very high). true or false as assigned by the caller. magent does not examine the patient or read imaging.","required":true,"example":false},{"in":"query","name":"severe_valvular_heart_disease","type":"boolean","description":"Severe valvular heart disease (Lyon 2020 High). true or false as assigned by the caller. magent does not examine the patient or read imaging.","required":true,"example":false},{"in":"query","name":"mi_or_coronary_revascularization","type":"boolean","description":"Myocardial infarction or previous coronary revascularization (PCI or CABG) (Lyon 2020 High). true or false as assigned by the caller. magent does not read imaging.","required":true,"example":false},{"in":"query","name":"stable_angina","type":"boolean","description":"Stable angina (Lyon 2020 High). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":false},{"in":"query","name":"previous_anthracycline","type":"boolean","description":"Previous anthracycline exposure (Lyon 2020 High). true or false as assigned by the caller.","required":true,"example":false},{"in":"query","name":"prior_left_chest_or_mediastinal_rt","type":"boolean","description":"Prior radiotherapy to the left chest or mediastinum (Lyon 2020 High). true or false as assigned by the caller.","required":true,"example":false},{"in":"query","name":"elevated_troponin","type":"boolean","description":"Baseline troponin above the local laboratory ULN as assigned by the caller (Lyon 2020 Medium 1). true or false. magent does not assay troponin.","required":true,"example":false},{"in":"query","name":"elevated_bnp","type":"boolean","description":"Baseline BNP or NT-proBNP above the local laboratory ULN as assigned by the caller (Lyon 2020 Medium 1). true or false. magent does not assay natriuretic peptides.","required":true,"example":false},{"in":"query","name":"hypertension","type":"boolean","description":"Hypertension (SBP >140 mmHg or DBP >90 mmHg or on treatment) as assigned by the caller (Lyon 2020 Medium 1). true or false. magent does not measure blood pressure.","required":true,"example":false},{"in":"query","name":"diabetes","type":"boolean","description":"Diabetes mellitus (HbA1c >7.0% or >53 mmol/mol or on treatment) as assigned by the caller (Lyon 2020 Medium 1). true or false. magent does not assay HbA1c.","required":true,"example":false},{"in":"query","name":"ckd","type":"boolean","description":"Chronic kidney disease (eGFR <60 mL/min/1.73 m2) as assigned by the caller (Lyon 2020 Medium 1). true or false. magent does not compute eGFR.","required":true,"example":false},{"in":"query","name":"previous_non_anthracycline_chemo","type":"boolean","description":"Previous non-anthracycline-based chemotherapy (Lyon 2020 Medium 1). true or false as assigned by the caller.","required":true,"example":false},{"in":"query","name":"current_or_significant_smoker","type":"boolean","description":"Current smoker or significant smoking history (Lyon 2020 Medium 1). true or false as assigned by the caller.","required":true,"example":false},{"in":"query","name":"obesity","type":"boolean","description":"Obesity (BMI >30 kg/m2) as assigned by the caller (Lyon 2020 Medium 1). true or false. magent does not compute BMI.","required":true,"example":false}],"errors":[{"code":"invalid_hfa_icos_anthracycline","message":"Lyon 2020 HFA-ICOS anthracycline inputs must match that table's age, LVEF, and yes/no factors. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/hfa-icos-anthracycline","citation":{"authors":"Lyon AR, Dent S, Stanway S, et al.","doi":"10.1002/ejhf.1920","id":"lyon-2020","pmid":"32463967","source":"Eur J Heart Fail. 2020;22(11):1945-1960","title":"Baseline cardiovascular risk assessment in cancer patients scheduled to receive cardiotoxic cancer therapies: a position statement and new risk assessment tools from the Cardio-Oncology Study Group of the Heart Failure Association of the European Society of Cardiology in collaboration with the International Cardio-Oncology Society","url":"https://doi.org/10.1002/ejhf.1920"},"formula_expression":"very_high if heart_failure_or_cardiomyopathy; else high if any High factor (severe_valvular_heart_disease, mi_or_coronary_revascularization, stable_angina, lvef_percent<50, age_years>=80, previous_anthracycline, prior_left_chest_or_mediastinal_rt) OR medium_points>=5; else medium if medium_points in 2..4; else low (no factors or one Medium 1). medium_points sums Medium 1 (=1: elevated_troponin, elevated_bnp, hypertension, diabetes, ckd, previous_non_anthracycline_chemo, current_or_significant_smoker, obesity) and Medium 2 (=2: lvef_percent 50-54, age_years 65-79) only. Age and LVEF use the highest matching printed band. Lyon 2020 HFA-ICOS anthracycline table. cardiotoxicity_guide is that paper's expert-opinion guide: low <2%, medium 2-9%, high 10-19%, very high >=20%","purpose":"Apply the Lyon 2020 HFA-ICOS anthracycline baseline cardiovascular risk proforma from caller-assigned age, LVEF, and published Very high, High, Medium 2, and Medium 1 factors. Returns risk_level, medium_points, and the paper's expert-opinion cardiotoxicity_guide.","markdown_url":"https://magentlab.com/docs/hfa-icos-anthracycline.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"hfa_icos_anthracycline"},{"name":"formula_expression","type":"string","description":"Lyon 2020 HFA-ICOS anthracycline classification"},{"name":"age_years","type":"integer","description":"Age in years used (18-100)"},{"name":"lvef_percent","type":"integer","description":"LVEF percent used (10-80)"},{"name":"medium_points","type":"integer","description":"Sum of Medium 1 (1) and Medium 2 (2) only"},{"name":"risk_level","type":"string","description":"low, medium, high, or very_high (Lyon 2020). Not a treatment order."},{"name":"cardiotoxicity_guide","type":"string","description":"Expert-opinion guide from Lyon 2020: <2%, 2-9%, 10-19%, or >=20%. Not a validated absolute risk."},{"name":"components","type":"array","description":"Per-factor Points rows; High and Very high have 0 medium_points"},{"name":"citation","type":"object","description":"Lyon 2020 Eur J Heart Fail citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age_years":"50","ckd":"false","current_or_significant_smoker":"false","diabetes":"false","elevated_bnp":"false","elevated_troponin":"false","heart_failure_or_cardiomyopathy":"false","hypertension":"false","lvef_percent":"60","mi_or_coronary_revascularization":"false","obesity":"false","previous_anthracycline":"false","previous_non_anthracycline_chemo":"false","prior_left_chest_or_mediastinal_rt":"false","severe_valvular_heart_disease":"false","stable_angina":"false"},{"age_years":"50","ckd":"false","current_or_significant_smoker":"false","diabetes":"false","elevated_bnp":"false","elevated_troponin":"false","heart_failure_or_cardiomyopathy":"false","hypertension":"false","lvef_percent":"60","mi_or_coronary_revascularization":"false","obesity":"false","previous_anthracycline":"false","previous_non_anthracycline_chemo":"false","prior_left_chest_or_mediastinal_rt":"false","severe_valvular_heart_disease":"false","stable_angina":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/hfa-icos-anthracycline","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/hfa-icos-anthracycline?age_years=50&lvef_percent=60&heart_failure_or_cardiomyopathy=false&severe_valvular_heart_disease=false&mi_or_coronary_revascularization=false&stable_angina=false&previous_anthracycline=false&prior_left_chest_or_mediastinal_rt=false&elevated_troponin=false&elevated_bnp=false&hypertension=false&diabetes=false&ckd=false&previous_non_anthracycline_chemo=false&current_or_significant_smoker=false&obesity=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/hfa-icos-anthracycline","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/hfa-icos-her2","description":"Lyon 2020 HFA-ICOS baseline cardiovascular risk before HER2-targeted therapy (trastuzumab and related agents). Very high, high, medium, or low from published factors plus Medium 1/2 points; expert-opinion cardiotoxicity guide <2% / 2-9% / 10-19% / >=20%. Concurrent anthracycline is High; sequential anthracycline before HER2 is Medium 1. Deterministic published classification with citation; not a treatment order. magent does not measure LVEF or biomarkers.","parameters":[{"in":"query","name":"age_years","type":"integer","description":"Age in years (integer 18-100). Lyon 2020 exclusive bands: ≥80 is High; 65-79 is Medium 2 (2 points); younger than 65 does not score. Age 80 is High, not Medium 2.","required":true,"example":50},{"in":"query","name":"lvef_percent","type":"integer","description":"Left-ventricular ejection fraction percent (integer 10-80) as assigned by the caller. <50 is High; 50-54 is Medium 2 (2 points); ≥55 does not score. magent does not measure LVEF.","required":true,"example":60},{"in":"query","name":"heart_failure_or_cardiomyopathy","type":"boolean","description":"Heart failure or cardiomyopathy as assigned by the caller (Lyon 2020 HER2 table Very high). true or false.","required":true,"example":false},{"in":"query","name":"prior_trastuzumab_cardiotoxicity","type":"boolean","description":"Prior trastuzumab cardiotoxicity as assigned by the caller (Lyon 2020 HER2 table Very high). true or false. magent does not review prior exposure.","required":true,"example":false},{"in":"query","name":"mi_or_cabg","type":"boolean","description":"Prior myocardial infarction or CABG as assigned by the caller (Lyon 2020 HER2 table High). true or false.","required":true,"example":false},{"in":"query","name":"stable_angina","type":"boolean","description":"Stable angina as assigned by the caller (Lyon 2020 HER2 table High). true or false.","required":true,"example":false},{"in":"query","name":"severe_valvular_heart_disease","type":"boolean","description":"Severe valvular heart disease as assigned by the caller (Lyon 2020 HER2 table High). true or false.","required":true,"example":false},{"in":"query","name":"concurrent_anthracycline_and_her2","type":"boolean","description":"Anthracycline and trastuzumab delivered concurrently on the current protocol (Lyon 2020 HER2 table footnote f; High). true or false. When true, anthracycline_before_her2 does not add Medium 1 points.","required":true,"example":false},{"in":"query","name":"arrhythmia","type":"boolean","description":"Atrial fibrillation, atrial flutter, VT, or VF as assigned by the caller (Lyon 2020 HER2 table Medium 2). true or false. magent does not interpret the ECG.","required":true,"example":false},{"in":"query","name":"elevated_troponin","type":"boolean","description":"Elevated troponin as assigned by the caller (Lyon 2020 HER2 table Medium 2). true or false. magent does not assay troponin.","required":true,"example":false},{"in":"query","name":"elevated_bnp","type":"boolean","description":"Elevated BNP or NT-proBNP as assigned by the caller (Lyon 2020 HER2 table Medium 2). true or false. magent does not assay natriuretic peptides.","required":true,"example":false},{"in":"query","name":"prior_remote_anthracycline","type":"boolean","description":"Prior remote anthracycline for a previous malignancy, not the current protocol (Lyon 2020 HER2 table footnote g; Medium 2). true or false.","required":true,"example":false},{"in":"query","name":"prior_left_chest_or_mediastinal_rt","type":"boolean","description":"Prior left-chest or mediastinal radiotherapy as assigned by the caller (Lyon 2020 HER2 table Medium 2). true or false.","required":true,"example":false},{"in":"query","name":"hypertension","type":"boolean","description":"Hypertension as assigned by the caller (Lyon 2020 HER2 table Medium 1). true or false.","required":true,"example":false},{"in":"query","name":"diabetes","type":"boolean","description":"Diabetes mellitus as assigned by the caller (Lyon 2020 HER2 table Medium 1). true or false.","required":true,"example":false},{"in":"query","name":"ckd","type":"boolean","description":"Chronic kidney disease as assigned by the caller (Lyon 2020 HER2 table Medium 1). true or false.","required":true,"example":false},{"in":"query","name":"anthracycline_before_her2","type":"boolean","description":"Current regimen includes anthracycline before HER2-targeted therapy, sequential not concurrent (Lyon 2020 HER2 table Medium 1). true or false. Ignored for points when concurrent_anthracycline_and_her2 is true.","required":true,"example":false},{"in":"query","name":"current_or_significant_smoker","type":"boolean","description":"Current or significant smoking history as assigned by the caller (Lyon 2020 HER2 table Medium 1). true or false.","required":true,"example":false},{"in":"query","name":"obesity","type":"boolean","description":"Obesity as assigned by the caller (Lyon 2020 HER2 table Medium 1). true or false. magent does not compute BMI.","required":true,"example":false}],"errors":[{"code":"invalid_hfa_icos_her2","message":"Lyon 2020 HFA-ICOS HER2-targeted therapy inputs must match that table's age, LVEF, anthracycline timing, and yes/no factors. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/hfa-icos-her2","citation":{"authors":"Lyon AR, Dent S, Stanway S, et al.","doi":"10.1002/ejhf.1920","id":"lyon-2020","pmid":"32463967","source":"Eur J Heart Fail. 2020;22(11):1945-1960","title":"Baseline cardiovascular risk assessment in cancer patients scheduled to receive cardiotoxic cancer therapies: a position statement and new risk assessment tools from the Cardio-Oncology Study Group of the Heart Failure Association of the European Society of Cardiology in collaboration with the International Cardio-Oncology Society","url":"https://doi.org/10.1002/ejhf.1920"},"formula_expression":"HFA-ICOS HER2 (Lyon 2020): very_high if heart_failure_or_cardiomyopathy or prior_trastuzumab_cardiotoxicity; else high if mi_or_cabg or stable_angina or severe_valvular_heart_disease or lvef_percent<50 or age_years>=80 or concurrent_anthracycline_and_her2 or medium_points>=5; else medium if medium_points 2-4; else low; medium_points = Medium 2 (2) + Medium 1 (1); Medium 2 = lvef 50-54, arrhythmia, elevated_troponin, elevated_bnp, age 65-79, prior_remote_anthracycline, prior_left_chest_or_mediastinal_rt; Medium 1 = hypertension, diabetes, ckd, anthracycline_before_her2 (if not concurrent), current_or_significant_smoker, obesity; cardiotoxicity_guide low <2%, medium 2-9%, high 10-19%, very_high >=20%","purpose":"Classify Lyon 2020 HFA-ICOS baseline cardiovascular risk before HER2-targeted therapy and return low, medium, high, or very high with the expert-opinion cardiotoxicity guide.","markdown_url":"https://magentlab.com/docs/hfa-icos-her2.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"hfa_icos_her2"},{"name":"formula_expression","type":"string","description":"Lyon 2020 HFA-ICOS HER2 classification expression"},{"name":"score","type":"integer","description":"Same as medium_points (Medium 1 + Medium 2 only)"},{"name":"max_score","type":"integer","description":"20 (seven Medium 2 factors at 2 plus six Medium 1 factors at 1)"},{"name":"medium_points","type":"integer","description":"Medium 1 (1 each) plus Medium 2 (2 each); High and Very high add 0"},{"name":"risk_level","type":"string","description":"low, medium, high, or very_high from the Lyon 2020 HER2 table. A class, not a treatment order."},{"name":"cardiotoxicity_guide","type":"string","description":"Lyon 2020 expert-opinion symptomatic CTRCD guide: <2%, 2-9%, 10-19%, or >=20%. Not a patient-specific probability."},{"name":"very_high_present","type":"boolean","description":"True when any Very high table factor is present"},{"name":"high_present","type":"boolean","description":"True when any High table factor is present (not medium_points >=5 alone)"},{"name":"age_years","type":"integer","description":"Age used for the exclusive age bands"},{"name":"lvef_percent","type":"integer","description":"LVEF percent used for the <50 / 50-54 / ≥55 bands"},{"name":"concurrent_anthracycline_and_her2","type":"boolean","description":"Echo of the concurrent anthracycline-plus-trastuzumab flag"},{"name":"anthracycline_before_her2","type":"boolean","description":"Echo of the sequential anthracycline-before-HER2 flag (points only when concurrent is false)"},{"name":"components","type":"array","description":"Per-factor Medium points and present flags"},{"name":"citation","type":"object","description":"Lyon et al. Eur J Heart Fail 2020 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age_years":"50","anthracycline_before_her2":"false","arrhythmia":"false","ckd":"false","concurrent_anthracycline_and_her2":"false","current_or_significant_smoker":"false","diabetes":"false","elevated_bnp":"false","elevated_troponin":"false","heart_failure_or_cardiomyopathy":"false","hypertension":"false","lvef_percent":"60","mi_or_cabg":"false","obesity":"false","prior_left_chest_or_mediastinal_rt":"false","prior_remote_anthracycline":"false","prior_trastuzumab_cardiotoxicity":"false","severe_valvular_heart_disease":"false","stable_angina":"false"},{"age_years":"50","anthracycline_before_her2":"false","arrhythmia":"false","ckd":"false","concurrent_anthracycline_and_her2":"false","current_or_significant_smoker":"false","diabetes":"false","elevated_bnp":"false","elevated_troponin":"false","heart_failure_or_cardiomyopathy":"false","hypertension":"false","lvef_percent":"60","mi_or_cabg":"false","obesity":"false","prior_left_chest_or_mediastinal_rt":"false","prior_remote_anthracycline":"false","prior_trastuzumab_cardiotoxicity":"false","severe_valvular_heart_disease":"false","stable_angina":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/hfa-icos-her2","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/hfa-icos-her2?age_years=50&lvef_percent=60&heart_failure_or_cardiomyopathy=false&prior_trastuzumab_cardiotoxicity=false&mi_or_cabg=false&stable_angina=false&severe_valvular_heart_disease=false&concurrent_anthracycline_and_her2=false&arrhythmia=false&elevated_troponin=false&elevated_bnp=false&prior_remote_anthracycline=false&prior_left_chest_or_mediastinal_rt=false&hypertension=false&diabetes=false&ckd=false&anthracycline_before_her2=false&current_or_significant_smoker=false&obesity=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/hfa-icos-her2","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/hfa-icos-vegf","description":"Lyon 2020 HFA-ICOS baseline CV risk before VEGF inhibitors or VEGF TKIs. Very high if heart failure/cardiomyopathy or arterial vascular disease. High if venous thrombosis, LVEF <50%, QTc >=480 ms, age >=75, hypertension, prior anthracycline, or >=5 medium points. Medium if 2-4 medium points. Guide <2% / 2-9% / 10-19% / >=20%. Not a device or treatment order.","parameters":[{"in":"query","name":"age_years","type":"integer","description":"Integer age in years (18-100) as assigned by the caller. Lyon 2020 VEGF-inhibitor table: >=75 High; 65-74 Medium 1; <65 no age points. Bands are exclusive. magent does not read an identity document.","required":true,"example":50},{"in":"query","name":"sex","type":"string","description":"male or female as assigned by the caller. Used only for the sex-specific borderline QTc Medium 2 band (men 450-479 ms; women 460-479 ms).","required":true,"example":"female"},{"in":"query","name":"lvef_percent","type":"integer","description":"Baseline left-ventricular ejection fraction, integer percent 10-80, as assigned by the caller. <50 High; 50-54 Medium 2; >=55 no LVEF points. magent does not read an echocardiogram.","required":true,"example":60},{"in":"query","name":"qtc_ms","type":"integer","description":"Baseline QTc in milliseconds, integer 300-700, as assigned by the caller. >=480 High; men 450-479 Medium 2; women 460-479 Medium 2. magent does not measure QTc.","required":true,"example":400},{"in":"query","name":"heart_failure_or_cardiomyopathy","type":"boolean","description":"Heart failure or cardiomyopathy (Lyon 2020 VEGF-inhibitor table, very high). Caller-assigned. true or false.","required":true,"example":false},{"in":"query","name":"arterial_vascular_disease","type":"boolean","description":"Arterial vascular disease: IHD, PCI, CABG, stable angina, TIA, stroke, or PVD as one caller bool (Lyon 2020 VEGF-inhibitor table, very high). true or false. magent does not diagnose vascular disease.","required":true,"example":false},{"in":"query","name":"venous_thrombosis","type":"boolean","description":"Venous thrombosis (DVT or PE) as assigned by the caller (Lyon 2020 VEGF-inhibitor table, High). true or false.","required":true,"example":false},{"in":"query","name":"hypertension","type":"boolean","description":"Hypertension (SBP >140 mmHg or DBP >90 mmHg, or on treatment) as assigned by the caller (Lyon 2020 VEGF-inhibitor table, High). true or false. magent does not read a blood-pressure cuff.","required":true,"example":false},{"in":"query","name":"prior_anthracycline","type":"boolean","description":"Prior anthracycline exposure as assigned by the caller (Lyon 2020 VEGF-inhibitor table, High). true or false.","required":true,"example":false},{"in":"query","name":"arrhythmia","type":"boolean","description":"Arrhythmia (atrial fibrillation, atrial flutter, ventricular tachycardia, or ventricular fibrillation) as assigned by the caller (Lyon 2020 VEGF-inhibitor table, Medium 2). true or false.","required":true,"example":false},{"in":"query","name":"elevated_troponin","type":"boolean","description":"Elevated baseline troponin above the local laboratory upper limit of normal as assigned by the caller (Lyon 2020 VEGF-inhibitor table, Medium 1). true or false. magent does not assay troponin.","required":true,"example":false},{"in":"query","name":"elevated_bnp","type":"boolean","description":"Elevated baseline BNP or NT-proBNP above the local laboratory upper limit of normal as assigned by the caller (Lyon 2020 VEGF-inhibitor table, Medium 1). true or false. magent does not assay BNP.","required":true,"example":false},{"in":"query","name":"diabetes","type":"boolean","description":"Diabetes mellitus (glycated haemoglobin >7.0% or >53 mmol/mol, or on treatment) as assigned by the caller (Lyon 2020 VEGF-inhibitor table, Medium 1). true or false.","required":true,"example":false},{"in":"query","name":"hyperlipidemia","type":"boolean","description":"Hyperlipidemia (non-HDL cholesterol >3.8 mmol/L or >145 mg/dL) as assigned by the caller (Lyon 2020 VEGF-inhibitor table, Medium 1). true or false. magent does not convert lipid units.","required":true,"example":false},{"in":"query","name":"ckd","type":"boolean","description":"Chronic kidney disease (eGFR <60 mL/min/1.73 m2) as assigned by the caller (Lyon 2020 VEGF-inhibitor table, Medium 1). true or false. magent does not compute eGFR.","required":true,"example":false},{"in":"query","name":"proteinuria","type":"boolean","description":"Proteinuria as assigned by the caller (Lyon 2020 VEGF-inhibitor table, Medium 1). true or false.","required":true,"example":false},{"in":"query","name":"prior_left_chest_or_mediastinal_rt","type":"boolean","description":"Prior radiotherapy to the left chest or mediastinum as assigned by the caller (Lyon 2020 VEGF-inhibitor table, Medium 1). true or false.","required":true,"example":false},{"in":"query","name":"current_or_significant_smoker","type":"boolean","description":"Current smoker or significant smoking history as assigned by the caller (Lyon 2020 VEGF-inhibitor table, Medium 1). true or false.","required":true,"example":false},{"in":"query","name":"obesity","type":"boolean","description":"Obesity (BMI >30 kg/m2) as assigned by the caller (Lyon 2020 VEGF-inhibitor table, Medium 1). true or false. magent does not compute BMI.","required":true,"example":false}],"errors":[{"code":"invalid_hfa_icos_vegf","message":"Lyon 2020 HFA-ICOS VEGF-inhibitor inputs must match that table's age, LVEF, QTc, sex, and yes/no factors. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/hfa-icos-vegf","citation":{"authors":"Lyon AR, Dent S, Stanway S, et al.","doi":"10.1002/ejhf.1920","id":"lyon-2020","pmid":"32463967","source":"Eur J Heart Fail. 2020;22(11):1945-1960","title":"Baseline cardiovascular risk assessment in cancer patients scheduled to receive cardiotoxic cancer therapies: a position statement and new risk assessment tools from the Cardio-Oncology Study Group of the Heart Failure Association of the European Society of Cardiology in collaboration with the International Cardio-Oncology Society","url":"https://doi.org/10.1002/ejhf.1920"},"formula_expression":"HFA-ICOS VEGF-inhibitor class (Lyon 2020): very_high if any very-high factor; else high if any high factor or medium_points>=5; else medium if medium_points 2-4; else low. medium_points = Medium 2 + Medium 1 only. Very high: heart_failure_or_cardiomyopathy, arterial_vascular_disease (IHD, PCI, CABG, stable angina, TIA, stroke, or PVD). High: venous_thrombosis, lvef_percent<50, qtc_ms>=480, age_years>=75, hypertension, prior_anthracycline. Medium 2: lvef 50-54, male 450<=qtc<480, female 460<=qtc<480, arrhythmia (AF/flutter/VT/VF). Medium 1: elevated_troponin, elevated_bnp, age 65-74, diabetes, hyperlipidemia, ckd, proteinuria, prior_left_chest_or_mediastinal_rt, current_or_significant_smoker, obesity. Age exclusive (>=75 High; 65-74 Medium 1; <65 none). LVEF exclusive (<50 High; 50-54 Medium 2; >=55 none). QTc exclusive (>=480 High; else sex-specific Medium 2). cardiotoxicity_guide low <2%, medium 2-9%, high 10-19%, very_high >=20%","purpose":"Classify Lyon 2020 HFA-ICOS baseline cardiovascular risk for someone scheduled to receive VEGF inhibitors or VEGF TKIs, using that table's very-high, High, Medium 2, and Medium 1 rows.","markdown_url":"https://magentlab.com/docs/hfa-icos-vegf.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"hfa_icos_vegf"},{"name":"formula_expression","type":"string","description":"Lyon 2020 VEGF-inhibitor HFA-ICOS classification expression"},{"name":"age_years","type":"integer","description":"Integer age 18-100 used"},{"name":"sex","type":"string","description":"male or female used for borderline QTc"},{"name":"lvef_percent","type":"integer","description":"Integer LVEF percent 10-80 used"},{"name":"qtc_ms","type":"integer","description":"Integer QTc in milliseconds 300-700 used"},{"name":"very_high_factor","type":"boolean","description":"true if any Lyon 2020 VEGF-inhibitor very-high factor is present"},{"name":"high_factor","type":"boolean","description":"true if any Lyon 2020 VEGF-inhibitor High factor is present"},{"name":"medium_points","type":"integer","description":"Sum of Medium 1 and Medium 2 points only"},{"name":"risk_level","type":"string","description":"low, medium, high, or very_high from the published classification"},{"name":"cardiotoxicity_guide","type":"string","description":"Published guide: <2%, 2-9%, 10-19%, or >=20%"},{"name":"components","type":"array","description":"Per-factor present flag, points, and tier"},{"name":"citation","type":"object","description":"Lyon et al. Eur J Heart Fail 2020 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age_years":"50","arrhythmia":"false","arterial_vascular_disease":"false","ckd":"false","current_or_significant_smoker":"false","diabetes":"false","elevated_bnp":"false","elevated_troponin":"false","heart_failure_or_cardiomyopathy":"false","hyperlipidemia":"false","hypertension":"false","lvef_percent":"60","obesity":"false","prior_anthracycline":"false","prior_left_chest_or_mediastinal_rt":"false","proteinuria":"false","qtc_ms":"400","sex":"female","venous_thrombosis":"false"},{"age_years":"50","arrhythmia":"false","arterial_vascular_disease":"false","ckd":"false","current_or_significant_smoker":"false","diabetes":"false","elevated_bnp":"false","elevated_troponin":"false","heart_failure_or_cardiomyopathy":"false","hyperlipidemia":"false","hypertension":"false","lvef_percent":"60","obesity":"false","prior_anthracycline":"false","prior_left_chest_or_mediastinal_rt":"false","proteinuria":"false","qtc_ms":"400","sex":"female","venous_thrombosis":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/hfa-icos-vegf","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/hfa-icos-vegf?age_years=50&sex=female&lvef_percent=60&qtc_ms=400&heart_failure_or_cardiomyopathy=false&arterial_vascular_disease=false&venous_thrombosis=false&hypertension=false&prior_anthracycline=false&arrhythmia=false&elevated_troponin=false&elevated_bnp=false&diabetes=false&hyperlipidemia=false&ckd=false&proteinuria=false&prior_left_chest_or_mediastinal_rt=false&current_or_significant_smoker=false&obesity=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/hfa-icos-vegf","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/hfa-icos-raf-mek","description":"Lyon 2020 HFA-ICOS baseline CV risk before combination RAF and MEK inhibitors. Very high if heart failure or cardiomyopathy; High if MI/CABG, stable angina, severe valvular disease, prior anthracycline, or ≥5 medium points; Medium if 2-4 medium points; Low if 0-1. Age ≥65 is Medium 1 only. LVEF 50-54 is Medium 2; this table has no printed LVEF <50 High row. Expert-opinion cardiotoxicity guide <2% / 2-9% / 10-19% / ≥20%. Not a treatment order.","parameters":[{"in":"query","name":"age_years","type":"integer","description":"Age in whole years (18-100). Lyon 2020 RAF-MEK table: age ≥65 is Medium 1. There is no High age band on this table. magent does not read an identity document.","required":true,"example":50},{"in":"query","name":"lvef_percent","type":"integer","description":"Baseline LVEF in whole percent (10-80) as assigned by the caller. 50-54 is Medium 2. ≥55 adds no points. This table has no printed LVEF <50 High row; LVEF <50 does not raise risk_level by itself. magent does not read an echocardiogram.","required":true,"example":60},{"in":"query","name":"heart_failure_or_cardiomyopathy","type":"boolean","description":"Heart failure or cardiomyopathy as assigned by the caller (Lyon 2020 RAF-MEK table). true is Very high. magent does not diagnose heart failure.","required":true,"example":false},{"in":"query","name":"mi_or_cabg","type":"boolean","description":"Myocardial infarction or CABG as assigned by the caller (Lyon 2020 RAF-MEK table). true is High.","required":true,"example":false},{"in":"query","name":"stable_angina","type":"boolean","description":"Stable angina as assigned by the caller (Lyon 2020 RAF-MEK table). true is High. magent does not diagnose angina.","required":true,"example":false},{"in":"query","name":"severe_valvular_heart_disease","type":"boolean","description":"Severe valvular heart disease as assigned by the caller (Lyon 2020 RAF-MEK table). true is High.","required":true,"example":false},{"in":"query","name":"prior_anthracycline","type":"boolean","description":"Prior anthracycline exposure as assigned by the caller (Lyon 2020 RAF-MEK table). true is High. magent does not read a chemotherapy record.","required":true,"example":false},{"in":"query","name":"elevated_troponin","type":"boolean","description":"Elevated baseline troponin above the local laboratory upper limit of normal as assigned by the caller (Lyon 2020 RAF-MEK table). true is Medium 2. magent does not assay troponin.","required":true,"example":false},{"in":"query","name":"elevated_bnp","type":"boolean","description":"Elevated baseline BNP or NT-proBNP above the local laboratory upper limit of normal as assigned by the caller (Lyon 2020 RAF-MEK table). true is Medium 2. magent does not assay natriuretic peptides.","required":true,"example":false},{"in":"query","name":"hypertension","type":"boolean","description":"Hypertension (systolic >140 mm Hg or diastolic >90 mm Hg, or on treatment) as assigned by the caller (Lyon 2020 RAF-MEK table). true is Medium 2. magent does not measure blood pressure.","required":true,"example":false},{"in":"query","name":"prior_left_chest_or_mediastinal_rt","type":"boolean","description":"Prior radiotherapy to the left chest or mediastinum as assigned by the caller (Lyon 2020 RAF-MEK table). true is Medium 2.","required":true,"example":false},{"in":"query","name":"arrhythmia","type":"boolean","description":"Atrial fibrillation, atrial flutter, ventricular tachycardia, or ventricular fibrillation as assigned by the caller (Lyon 2020 RAF-MEK table footnote). true is Medium 1. magent does not read an ECG.","required":true,"example":false},{"in":"query","name":"diabetes","type":"boolean","description":"Diabetes mellitus (glycated haemoglobin >7.0% or >53 mmol/mol, or on treatment) as assigned by the caller (Lyon 2020 RAF-MEK table). true is Medium 1. magent does not assay haemoglobin A1c.","required":true,"example":false},{"in":"query","name":"ckd","type":"boolean","description":"Chronic kidney disease (estimated glomerular filtration rate <60 mL/min/1.73 m2) as assigned by the caller (Lyon 2020 RAF-MEK table). true is Medium 1. magent does not compute eGFR.","required":true,"example":false},{"in":"query","name":"current_or_significant_smoker","type":"boolean","description":"Current smoker or significant smoking history as assigned by the caller (Lyon 2020 RAF-MEK table). true is Medium 1.","required":true,"example":false},{"in":"query","name":"obesity","type":"boolean","description":"Obesity (BMI >30 kg/m2) as assigned by the caller (Lyon 2020 RAF-MEK table). true is Medium 1. magent does not compute BMI.","required":true,"example":false}],"errors":[{"code":"invalid_hfa_icos_raf_mek","message":"Lyon 2020 HFA-ICOS RAF-MEK inhibitor inputs must match that table's age, LVEF, and yes/no factors. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/hfa-icos-raf-mek","citation":{"authors":"Lyon AR, Dent S, Stanway S, et al.","doi":"10.1002/ejhf.1920","id":"lyon-2020","pmid":"32463967","source":"Eur J Heart Fail. 2020;22(11):1945-1960","title":"Baseline cardiovascular risk assessment in cancer patients scheduled to receive cardiotoxic cancer therapies: a position statement and new risk assessment tools from the Cardio-Oncology Study Group of the Heart Failure Association of the European Society of Cardiology in collaboration with the International Cardio-Oncology Society","url":"https://doi.org/10.1002/ejhf.1920"},"formula_expression":"HFA-ICOS RAF-MEK (Lyon 2020): very_high if heart_failure_or_cardiomyopathy; high if mi_or_cabg or stable_angina or severe_valvular_heart_disease or prior_anthracycline or medium_points>=5; medium if medium_points 2-4; low if medium_points 0-1; medium_points = M2 (lvef 50-54, elevated_troponin, elevated_bnp, hypertension, prior_left_chest_or_mediastinal_rt) + M1 (arrhythmia, age>=65, diabetes, ckd, current_or_significant_smoker, obesity); LVEF <50 is not a printed High row on this table; age>=65 Medium 1 only (no High age band); cardiotoxicity_guide low <2%, medium 2-9%, high 10-19%, very_high >=20%","purpose":"Classify Lyon 2020 HFA-ICOS baseline cardiovascular risk before combination RAF and MEK inhibitors as very_high, high, medium, or low from that table's printed factors and the shared medium-point rule.","markdown_url":"https://magentlab.com/docs/hfa-icos-raf-mek.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"hfa_icos_raf_mek"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"age_years","type":"integer","description":"Age in years used for the ≥65 Medium 1 band"},{"name":"lvef_percent","type":"integer","description":"LVEF percent used for the 50-54 Medium 2 band"},{"name":"risk_level","type":"string","description":"very_high, high, medium, or low from the Lyon 2020 RAF-MEK table and the shared HFA-ICOS medium-point rule (0-1 low, 2-4 medium, ≥5 high). A class, not a treatment order. LVEF <50 is not a printed High factor on this table."},{"name":"medium_points","type":"integer","description":"Sum of Medium 1 and Medium 2 points only (High and Very high are not added)"},{"name":"cardiotoxicity_guide","type":"string","description":"Lyon 2020 expert-opinion cardiotoxicity guide: <2% (low), 2-9% (medium), 10-19% (high), >=20% (very_high). A guide, not a patient-specific probability."},{"name":"components","type":"array","description":"Per-factor present, points, and tier"},{"name":"citation","type":"object","description":"Lyon et al. Eur J Heart Fail 2020 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age_years":"50","arrhythmia":"false","ckd":"false","current_or_significant_smoker":"false","diabetes":"false","elevated_bnp":"false","elevated_troponin":"false","heart_failure_or_cardiomyopathy":"false","hypertension":"false","lvef_percent":"60","mi_or_cabg":"false","obesity":"false","prior_anthracycline":"false","prior_left_chest_or_mediastinal_rt":"false","severe_valvular_heart_disease":"false","stable_angina":"false"},{"age_years":"50","arrhythmia":"false","ckd":"false","current_or_significant_smoker":"false","diabetes":"false","elevated_bnp":"false","elevated_troponin":"false","heart_failure_or_cardiomyopathy":"false","hypertension":"false","lvef_percent":"60","mi_or_cabg":"false","obesity":"false","prior_anthracycline":"false","prior_left_chest_or_mediastinal_rt":"false","severe_valvular_heart_disease":"false","stable_angina":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/hfa-icos-raf-mek","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/hfa-icos-raf-mek?age_years=50&lvef_percent=60&heart_failure_or_cardiomyopathy=false&mi_or_cabg=false&stable_angina=false&severe_valvular_heart_disease=false&prior_anthracycline=false&elevated_troponin=false&elevated_bnp=false&hypertension=false&prior_left_chest_or_mediastinal_rt=false&arrhythmia=false&diabetes=false&ckd=false&current_or_significant_smoker=false&obesity=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/hfa-icos-raf-mek","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/hfa-icos-bcr-abl","description":"Lyon 2020 HFA-ICOS baseline cardiovascular risk before second- or third-generation multi-targeted kinase inhibitors for CML targeting BCR-ABL. Class is very_high, high, medium, or low from published very-high and high factors plus Medium 1/2 points (0–1 low, 2–4 medium, ≥5 high). Caller assigns the 10-year CVD >20% threshold; magent does not compute that score. Not a medical device or treatment order.","parameters":[{"in":"query","name":"age_years","type":"integer","description":"Age in years (integer 18-100). Lyon 2020 BCR-ABL table: ≥75 High; 65-74 Medium 2; 60-64 Medium 1 (paper row Age ≥60 years under the higher bands); <60 none. Bands do not stack. magent does not examine the patient.","required":true,"example":50},{"in":"query","name":"sex","type":"string","description":"Sex male or female. Selects the borderline QTc Medium 2 window (men 450≤QTc<480; women 460≤QTc<480). magent does not read an ECG.","required":true,"example":"female"},{"in":"query","name":"lvef_percent","type":"number","description":"Left-ventricular ejection fraction in percent (10-80). <50 is High. This table has no 50-54 Medium 2 LVEF row; ≥50 adds no LVEF points. magent does not read an echocardiogram.","required":true,"example":60},{"in":"query","name":"qtc_ms","type":"number","description":"QTc in milliseconds (300-700). ≥480 is High. Borderline Medium 2 is men 450≤QTc<480 and women 460≤QTc<480. magent does not measure QTc.","required":true,"example":400},{"in":"query","name":"arterial_vascular_disease","type":"boolean","description":"Caller-assigned arterial vascular disease (IHD, PCI, CABG, stable angina, TIA, stroke, or PVD). Very high. magent does not diagnose vascular disease.","required":true,"example":false},{"in":"query","name":"arterial_thrombosis_with_tki","type":"boolean","description":"Caller-assigned arterial thrombosis associated with a BCR-ABL TKI. Very high. magent does not diagnose thrombosis.","required":true,"example":false},{"in":"query","name":"heart_failure_or_lvsd","type":"boolean","description":"Caller-assigned heart failure or left-ventricular systolic dysfunction. High. magent does not diagnose heart failure.","required":true,"example":false},{"in":"query","name":"bcr_abl_tki_mediated_lvsd","type":"boolean","description":"Caller-assigned BCR-ABL TKI-mediated LVSD. High. magent does not attribute LVSD to a TKI.","required":true,"example":false},{"in":"query","name":"abpi_le_0_9","type":"boolean","description":"Caller-assigned abnormal ankle-brachial pressure index (paper: ABPI ≤0.9). High. magent does not measure ABPI.","required":true,"example":false},{"in":"query","name":"pulmonary_arterial_hypertension","type":"boolean","description":"Caller-assigned pulmonary arterial hypertension (paper: peak systolic PAP ≥35 mmHg when estimated on echocardiography). High. magent does not estimate pulmonary pressure.","required":true,"example":false},{"in":"query","name":"cvd_10y_risk_gt_20","type":"boolean","description":"Caller-assigned paper row Cardiovascular disease 10-year risk score >20%. High. magent does not compute SCORE2, PCE, or any other 10-year CVD equation.","required":true,"example":false},{"in":"query","name":"current_or_significant_smoker","type":"boolean","description":"Caller-assigned current smoker or significant smoking history. High on this BCR-ABL table (not Medium 1). magent does not take a smoking history.","required":true,"example":false},{"in":"query","name":"venous_thromboembolism","type":"boolean","description":"Caller-assigned venous thromboembolism (DVT or PE). Medium 2. magent does not diagnose VTE.","required":true,"example":false},{"in":"query","name":"arrhythmia","type":"boolean","description":"Caller-assigned arrhythmia (paper: atrial fibrillation, atrial flutter, ventricular tachycardia, or ventricular fibrillation). Medium 2. magent does not read a rhythm strip.","required":true,"example":false},{"in":"query","name":"hypertension","type":"boolean","description":"Caller-assigned hypertension (paper: SBP >140 mmHg or DBP >90 mmHg, or on treatment). Medium 2. magent does not measure blood pressure.","required":true,"example":false},{"in":"query","name":"diabetes","type":"boolean","description":"Caller-assigned diabetes (paper: HbA1c >7.0% or >53 mmol/mol, or on treatment). Medium 1. magent does not diagnose diabetes.","required":true,"example":false},{"in":"query","name":"hyperlipidemia","type":"boolean","description":"Caller-assigned hyperlipidemia (paper: non-HDL cholesterol >3.8 mmol/L or >145 mg/dL). Medium 1. magent does not assay lipids.","required":true,"example":false},{"in":"query","name":"ckd","type":"boolean","description":"Caller-assigned chronic kidney disease (paper: eGFR <60 mL/min/1.73 m²). Medium 1. magent does not compute eGFR.","required":true,"example":false},{"in":"query","name":"family_history_thrombophilia","type":"boolean","description":"Caller-assigned family history of thrombophilia. Medium 1. magent does not take a family history.","required":true,"example":false},{"in":"query","name":"obesity","type":"boolean","description":"Caller-assigned obesity (paper: BMI >30 kg/m²). Medium 1. magent does not compute BMI.","required":true,"example":false}],"errors":[{"code":"invalid_hfa_icos_bcr_abl","message":"Lyon 2020 HFA-ICOS BCR-ABL TKI inputs must match that table's age, LVEF, QTc, sex, caller-assigned 10-year CVD threshold, and yes/no factors. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/hfa-icos-bcr-abl","citation":{"authors":"Lyon AR, Dent S, Stanway S, et al.","doi":"10.1002/ejhf.1920","id":"lyon-2020","pmid":"32463967","source":"Eur J Heart Fail. 2020;22(11):1945-1960","title":"Baseline cardiovascular risk assessment in cancer patients scheduled to receive cardiotoxic cancer therapies: a position statement and new risk assessment tools from the Cardio-Oncology Study Group of the Heart Failure Association of the European Society of Cardiology in collaboration with the International Cardio-Oncology Society","url":"https://doi.org/10.1002/ejhf.1920"},"formula_expression":"HFA-ICOS BCR-ABL TKI (Lyon 2020) = very_high if arterial_vascular_disease or arterial_thrombosis_with_tki; else high if any high factor or medium_points>=5; else medium if medium_points 2-4; else low (0 or one M1); medium_points = M2*2 + M1*1 only; High: heart_failure_or_lvsd, bcr_abl_tki_mediated_lvsd, abpi_le_0_9, pulmonary_arterial_hypertension, LVEF<50, QTc>=480, caller cvd_10y_risk_gt_20, age>=75, current_or_significant_smoker; M2: venous_thromboembolism, arrhythmia, borderline QTc (men 450<=QTc<480, women 460<=QTc<480), hypertension, age 65-74; M1: diabetes, hyperlipidemia, age 60-64, ckd, family_history_thrombophilia, obesity; age bands mutually exclusive; no LVEF 50-54 row; magent does not compute 10-year CVD risk","purpose":"Classify published HFA-ICOS baseline cardiovascular risk before second- or third-generation multi-targeted kinase inhibitors for CML targeting BCR-ABL.","markdown_url":"https://magentlab.com/docs/hfa-icos-bcr-abl.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"hfa_icos_bcr_abl"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"age_years","type":"integer","description":"Age in years used"},{"name":"sex","type":"string","description":"male or female used for the QTc window"},{"name":"lvef_percent","type":"number","description":"LVEF percent used"},{"name":"qtc_ms","type":"number","description":"QTc in milliseconds used"},{"name":"medium_points","type":"integer","description":"Sum of Medium 1 (1 each) and Medium 2 (2 each) only"},{"name":"risk_level","type":"string","description":"very_high, high, medium, or low from the Lyon 2020 BCR-ABL table. A class, not a treatment order."},{"name":"cardiotoxicity_guide","type":"string","description":"Lyon 2020 expert-opinion future-cardiotoxicity guide: <2% / 2-9% / 10-19% / >=20%"},{"name":"components","type":"array","description":"Per-factor presence and medium points"},{"name":"citation","type":"object","description":"Lyon et al. Eur J Heart Fail 2020 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"abpi_le_0_9":"false","age_years":"50","arrhythmia":"false","arterial_thrombosis_with_tki":"false","arterial_vascular_disease":"false","bcr_abl_tki_mediated_lvsd":"false","ckd":"false","current_or_significant_smoker":"false","cvd_10y_risk_gt_20":"false","diabetes":"false","family_history_thrombophilia":"false","heart_failure_or_lvsd":"false","hyperlipidemia":"false","hypertension":"false","lvef_percent":"60","obesity":"false","pulmonary_arterial_hypertension":"false","qtc_ms":"400","sex":"female","venous_thromboembolism":"false"},{"abpi_le_0_9":"false","age_years":"50","arrhythmia":"false","arterial_thrombosis_with_tki":"false","arterial_vascular_disease":"false","bcr_abl_tki_mediated_lvsd":"false","ckd":"false","current_or_significant_smoker":"false","cvd_10y_risk_gt_20":"false","diabetes":"false","family_history_thrombophilia":"false","heart_failure_or_lvsd":"false","hyperlipidemia":"false","hypertension":"false","lvef_percent":"60","obesity":"false","pulmonary_arterial_hypertension":"false","qtc_ms":"400","sex":"female","venous_thromboembolism":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/hfa-icos-bcr-abl","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/hfa-icos-bcr-abl?age_years=50&sex=female&lvef_percent=60&qtc_ms=400&arterial_vascular_disease=false&arterial_thrombosis_with_tki=false&heart_failure_or_lvsd=false&bcr_abl_tki_mediated_lvsd=false&abpi_le_0_9=false&pulmonary_arterial_hypertension=false&cvd_10y_risk_gt_20=false&current_or_significant_smoker=false&venous_thromboembolism=false&arrhythmia=false&hypertension=false&diabetes=false&hyperlipidemia=false&ckd=false&family_history_thrombophilia=false&obesity=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/hfa-icos-bcr-abl","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/hfa-icos-myeloma","description":"Lyon 2020 HFA-ICOS baseline CV risk before proteasome inhibitors and immunomodulatory drugs for multiple myeloma. Returns risk_level low, medium, high, or very_high plus medium_points and the paper's expert-opinion cardiotoxicity_guide. Age >=75 is High; 65-74 is Medium 1. Caller assigns labs, BMI >30, and high-dose dexamethasone. magent does not examine the patient or read imaging. Not a medical device or treatment order.","parameters":[{"in":"query","name":"age_years","type":"integer","description":"Age in years (18-100, integer). Lyon 2020 myeloma-therapy table: >=75 High; 65-74 Medium 1; <65 no age factor. Highest matching band only.","required":true,"example":50},{"in":"query","name":"lvef_percent","type":"integer","description":"LVEF percent (10-80, integer). Lyon 2020: <50 High; 50-54 Medium 2; >=55 no LVEF factor. Highest matching printed band only. magent does not read imaging.","required":true,"example":60},{"in":"query","name":"heart_failure_or_cardiomyopathy","type":"boolean","description":"Heart failure or cardiomyopathy (Lyon 2020 Very high). true or false as assigned by the caller. magent does not examine the patient or read imaging.","required":true,"example":false},{"in":"query","name":"prior_proteasome_inhibitor_cardiotoxicity","type":"boolean","description":"Prior proteasome-inhibitor cardiotoxicity (Lyon 2020 Very high). true or false as assigned by the caller.","required":true,"example":false},{"in":"query","name":"venous_thrombosis","type":"boolean","description":"Venous thrombosis (DVT or PE) (Lyon 2020 Very high). true or false as assigned by the caller. magent does not diagnose thrombosis.","required":true,"example":false},{"in":"query","name":"cardiac_amyloidosis","type":"boolean","description":"Cardiac amyloidosis (Lyon 2020 Very high). true or false as assigned by the caller. magent does not read imaging or biopsy.","required":true,"example":false},{"in":"query","name":"arterial_vascular_disease","type":"boolean","description":"Arterial vascular disease (IHD, PCI, CABG, stable angina, TIA, stroke, or PVD) as one caller bool (Lyon 2020 Very high). true or false. magent does not diagnose vascular disease.","required":true,"example":false},{"in":"query","name":"prior_immunomodulatory_drug_cv_toxicity","type":"boolean","description":"Prior immunomodulatory-drug cardiovascular toxicity (Lyon 2020 High). true or false as assigned by the caller.","required":true,"example":false},{"in":"query","name":"elevated_bnp","type":"boolean","description":"Baseline BNP or NT-proBNP above the local laboratory ULN as assigned by the caller (Lyon 2020 High). true or false. magent does not assay natriuretic peptides.","required":true,"example":false},{"in":"query","name":"prior_anthracycline","type":"boolean","description":"Prior anthracycline exposure (Lyon 2020 High). true or false as assigned by the caller.","required":true,"example":false},{"in":"query","name":"arrhythmia","type":"boolean","description":"Arrhythmia (Lyon 2020 Medium 2). true or false as assigned by the caller. magent does not read a rhythm strip.","required":true,"example":false},{"in":"query","name":"elevated_troponin","type":"boolean","description":"Baseline troponin above the local laboratory ULN as assigned by the caller (Lyon 2020 Medium 2). true or false. magent does not assay troponin.","required":true,"example":false},{"in":"query","name":"left_ventricular_hypertrophy","type":"boolean","description":"Left-ventricular hypertrophy (Lyon 2020 Medium 1). true or false as assigned by the caller. magent does not read imaging.","required":true,"example":false},{"in":"query","name":"hypertension","type":"boolean","description":"Hypertension as assigned by the caller (Lyon 2020 Medium 1). true or false. magent does not measure blood pressure.","required":true,"example":false},{"in":"query","name":"diabetes","type":"boolean","description":"Diabetes mellitus as assigned by the caller (Lyon 2020 Medium 1). true or false. magent does not assay HbA1c.","required":true,"example":false},{"in":"query","name":"hyperlipidemia","type":"boolean","description":"Hyperlipidemia as assigned by the caller (Lyon 2020 Medium 1). true or false. magent does not assay lipids.","required":true,"example":false},{"in":"query","name":"ckd","type":"boolean","description":"Chronic kidney disease as assigned by the caller (Lyon 2020 Medium 1). true or false. magent does not compute eGFR.","required":true,"example":false},{"in":"query","name":"family_history_thrombophilia","type":"boolean","description":"Family history of thrombophilia (Lyon 2020 Medium 1). true or false as assigned by the caller. magent does not take a family history.","required":true,"example":false},{"in":"query","name":"prior_thoracic_spine_radiotherapy","type":"boolean","description":"Prior thoracic-spine radiotherapy (Lyon 2020 Medium 1). true or false as assigned by the caller.","required":true,"example":false},{"in":"query","name":"high_dose_dexamethasone","type":"boolean","description":"High-dose dexamethasone (>160 mg/month) as assigned by the caller (Lyon 2020 Medium 1). true or false. magent does not compute a steroid dose.","required":true,"example":false},{"in":"query","name":"current_or_significant_smoker","type":"boolean","description":"Current smoker or significant smoking history (Lyon 2020 Medium 1). true or false as assigned by the caller.","required":true,"example":false},{"in":"query","name":"obesity","type":"boolean","description":"Obesity (BMI >30 kg/m2) as assigned by the caller (Lyon 2020 Medium 1). true or false. magent does not compute BMI.","required":true,"example":false}],"errors":[{"code":"invalid_hfa_icos_myeloma","message":"Lyon 2020 HFA-ICOS multiple-myeloma therapy inputs must match that table's age, LVEF, and yes/no factors. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/hfa-icos-myeloma","citation":{"authors":"Lyon AR, Dent S, Stanway S, et al.","doi":"10.1002/ejhf.1920","id":"lyon-2020","pmid":"32463967","source":"Eur J Heart Fail. 2020;22(11):1945-1960","title":"Baseline cardiovascular risk assessment in cancer patients scheduled to receive cardiotoxic cancer therapies: a position statement and new risk assessment tools from the Cardio-Oncology Study Group of the Heart Failure Association of the European Society of Cardiology in collaboration with the International Cardio-Oncology Society","url":"https://doi.org/10.1002/ejhf.1920"},"formula_expression":"very_high if any Very high factor (heart_failure_or_cardiomyopathy, prior_proteasome_inhibitor_cardiotoxicity, venous_thrombosis, cardiac_amyloidosis, arterial_vascular_disease); else high if any High factor (prior_immunomodulatory_drug_cv_toxicity, lvef_percent<50, elevated_bnp, age_years>=75, prior_anthracycline) OR medium_points>=5; else medium if medium_points in 2..4; else low (no factors or one Medium 1). medium_points sums Medium 1 (=1: left_ventricular_hypertrophy, age_years 65-74, hypertension, diabetes, hyperlipidemia, ckd, family_history_thrombophilia, prior_thoracic_spine_radiotherapy, high_dose_dexamethasone, current_or_significant_smoker, obesity) and Medium 2 (=2: lvef_percent 50-54, arrhythmia, elevated_troponin) only. Age and LVEF use the highest matching printed band. Lyon 2020 HFA-ICOS multiple-myeloma therapy table. cardiotoxicity_guide is that paper's expert-opinion guide: low <2%, medium 2-9%, high 10-19%, very high >=20%","purpose":"Apply the Lyon 2020 HFA-ICOS multiple-myeloma therapy baseline cardiovascular risk proforma from caller-assigned age, LVEF, and published Very high, High, Medium 2, and Medium 1 factors before proteasome inhibitors and immunomodulatory drugs. Returns risk_level, medium_points, and the paper's expert-opinion cardiotoxicity_guide.","markdown_url":"https://magentlab.com/docs/hfa-icos-myeloma.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"hfa_icos_myeloma"},{"name":"formula_expression","type":"string","description":"Lyon 2020 HFA-ICOS multiple-myeloma therapy classification"},{"name":"age_years","type":"integer","description":"Age in years used (18-100)"},{"name":"lvef_percent","type":"integer","description":"LVEF percent used (10-80)"},{"name":"medium_points","type":"integer","description":"Sum of Medium 1 (1) and Medium 2 (2) only"},{"name":"risk_level","type":"string","description":"low, medium, high, or very_high (Lyon 2020). Not a treatment order."},{"name":"cardiotoxicity_guide","type":"string","description":"Expert-opinion guide from Lyon 2020: <2%, 2-9%, 10-19%, or >=20%. Not a validated absolute risk."},{"name":"components","type":"array","description":"Per-factor Points rows; High and Very high have 0 medium_points"},{"name":"citation","type":"object","description":"Lyon 2020 Eur J Heart Fail citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age_years":"50","arrhythmia":"false","arterial_vascular_disease":"false","cardiac_amyloidosis":"false","ckd":"false","current_or_significant_smoker":"false","diabetes":"false","elevated_bnp":"false","elevated_troponin":"false","family_history_thrombophilia":"false","heart_failure_or_cardiomyopathy":"false","high_dose_dexamethasone":"false","hyperlipidemia":"false","hypertension":"false","left_ventricular_hypertrophy":"false","lvef_percent":"60","obesity":"false","prior_anthracycline":"false","prior_immunomodulatory_drug_cv_toxicity":"false","prior_proteasome_inhibitor_cardiotoxicity":"false","prior_thoracic_spine_radiotherapy":"false","venous_thrombosis":"false"},{"age_years":"50","arrhythmia":"false","arterial_vascular_disease":"false","cardiac_amyloidosis":"false","ckd":"false","current_or_significant_smoker":"false","diabetes":"false","elevated_bnp":"false","elevated_troponin":"false","family_history_thrombophilia":"false","heart_failure_or_cardiomyopathy":"false","high_dose_dexamethasone":"false","hyperlipidemia":"false","hypertension":"false","left_ventricular_hypertrophy":"false","lvef_percent":"60","obesity":"false","prior_anthracycline":"false","prior_immunomodulatory_drug_cv_toxicity":"false","prior_proteasome_inhibitor_cardiotoxicity":"false","prior_thoracic_spine_radiotherapy":"false","venous_thrombosis":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/hfa-icos-myeloma","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/hfa-icos-myeloma?age_years=50&lvef_percent=60&heart_failure_or_cardiomyopathy=false&prior_proteasome_inhibitor_cardiotoxicity=false&venous_thrombosis=false&cardiac_amyloidosis=false&arterial_vascular_disease=false&prior_immunomodulatory_drug_cv_toxicity=false&elevated_bnp=false&prior_anthracycline=false&arrhythmia=false&elevated_troponin=false&left_ventricular_hypertrophy=false&hypertension=false&diabetes=false&hyperlipidemia=false&ckd=false&family_history_thrombophilia=false&prior_thoracic_spine_radiotherapy=false&high_dose_dexamethasone=false&current_or_significant_smoker=false&obesity=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/hfa-icos-myeloma","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/aa-gradient","description":"Returns the alveolar–arterial O2 gradient from FiO2, PB, PaCO2, and PaO2.","parameters":[{"in":"query","name":"paco2_mm_hg","type":"number","description":"Arterial PCO2 in mm Hg (8-80).","required":true,"example":"40"},{"in":"query","name":"pao2_mm_hg","type":"number","description":"Arterial PO2 in mm Hg (20-700).","required":true,"example":"95"},{"in":"query","name":"fio2","type":"number","description":"Inspired oxygen as a fraction (0.21-1.0), not a percent. Omitted uses 0.21 (room air).","required":false,"example":"0.21"},{"in":"query","name":"pb_mm_hg","type":"number","description":"Barometric pressure in mm Hg (500-800). Omitted uses 760.","required":false,"example":"760"},{"in":"query","name":"rq","type":"number","description":"Respiratory exchange ratio R (0.7-1.0). Omitted uses 0.8.","required":false,"example":"0.8"}],"errors":[{"code":"invalid_paco2","message":"paco2_mm_hg must be a number from 8 to 80. Returned before settlement; you are not charged.","status":400},{"code":"invalid_pao2","message":"pao2_mm_hg must be a number from 20 to 700. Returned before settlement; you are not charged.","status":400},{"code":"invalid_fio2","message":"fio2 must be a fraction from 0.21 to 1.0. Returned before settlement; you are not charged.","status":400},{"code":"invalid_barometric_pressure","message":"pb_mm_hg must be a number from 500 to 800. Returned before settlement; you are not charged.","status":400},{"code":"invalid_rq","message":"rq must be a number from 0.7 to 1.0. Returned before settlement; you are not charged.","status":400},{"code":"invalid_alveolar_po2","message":"computed alveolar PO2 would be negative; check FiO2, PB, PaCO2, and RQ. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/aa-gradient","citation":{"authors":"Riley RL, Cournand A","doi":"10.1152/jappl.1949.1.12.825","id":"riley-cournand-1949","source":"J Appl Physiol. 1949;1(12):825-847","title":"\"Ideal\" alveolar air and the analysis of ventilation-perfusion relationships in the lungs","url":"https://doi.org/10.1152/jappl.1949.1.12.825"},"formula_expression":"PAO2_mm_hg = fio2 * (pb_mm_hg - 47) - paco2_mm_hg / rq; aa_gradient_mm_hg = PAO2_mm_hg - pao2_mm_hg","purpose":"Compute the alveolar–arterial oxygen gradient from arterial blood-gas values using the simplified ideal alveolar-gas equation.","markdown_url":"https://magentlab.com/docs/aa-gradient.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"aa_gradient"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"fio2","type":"number","description":"Inspired oxygen fraction used (0.21 when omitted)"},{"name":"pb_mm_hg","type":"number","description":"Barometric pressure used (760 when omitted)"},{"name":"water_vapor_mm_hg","type":"number","description":"Water-vapor pressure at body temperature, always 47"},{"name":"rq","type":"number","description":"Respiratory exchange ratio used (0.8 when omitted)"},{"name":"paco2_mm_hg","type":"number","description":"Arterial PCO2 used"},{"name":"pao2_mm_hg","type":"number","description":"Arterial PO2 used"},{"name":"pao2_alveolar_mm_hg","type":"number","description":"Ideal alveolar PO2 in mm Hg, 1 decimal"},{"name":"aa_gradient_mm_hg","type":"number","description":"Alveolar minus arterial PO2 in mm Hg, 1 decimal"},{"name":"citation","type":"object","description":"Riley and Cournand 1949 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"paco2_mm_hg":"40","pao2_mm_hg":"95"},{"paco2_mm_hg":"40","pao2_mm_hg":"95"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/aa-gradient","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/aa-gradient?paco2_mm_hg=40&pao2_mm_hg=95","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/aa-gradient","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/oxygenation-index","description":"Oxygenation index from FiO2 as a fraction (0.21–1.0), mean airway pressure in cm H2O, and PaO2: FiO2 × MAP × 100 / PaO2. Deterministic published arithmetic with citation; not a diagnosis or an ECMO-initiation protocol.","parameters":[{"in":"query","name":"fio2","type":"number","description":"Inspired oxygen as a fraction (0.21-1.0), not a percent.","required":true,"example":"0.5"},{"in":"query","name":"mean_airway_pressure_cm_h2o","type":"number","description":"Mean airway pressure in cm H2O (4-45), not blood-pressure MAP.","required":true,"example":"12"},{"in":"query","name":"pao2_mm_hg","type":"number","description":"Arterial PO2 in mm Hg (20-700).","required":true,"example":"80"}],"errors":[{"code":"invalid_fio2","message":"fio2 must be a fraction from 0.21 to 1.0. Returned before settlement; you are not charged.","status":400},{"code":"invalid_mean_airway_pressure","message":"mean_airway_pressure_cm_h2o must be a number from 4 to 45. Returned before settlement; you are not charged.","status":400},{"code":"invalid_pao2","message":"pao2_mm_hg must be a number from 20 to 700. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/oxygenation-index","citation":{"authors":"Ortiz RM, Cilley RE, Bartlett RH","doi":"10.1016/s0031-3955(16)36179-x","id":"ortiz-bartlett-1987","pmid":"3808772","source":"Pediatr Clin North Am. 1987;34(1):39-46","title":"Extracorporeal membrane oxygenation in pediatric respiratory failure","url":"https://doi.org/10.1016/s0031-3955(16)36179-x"},"formula_expression":"oxygenation_index = fio2 * mean_airway_pressure_cm_h2o * 100 / pao2_mm_hg","purpose":"Compute the oxygenation index from inspired oxygen fraction, mean airway pressure in cm H2O, and arterial PO2.","markdown_url":"https://magentlab.com/docs/oxygenation-index.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"oxygenation_index"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"fio2","type":"number","description":"Inspired oxygen fraction used"},{"name":"mean_airway_pressure_cm_h2o","type":"number","description":"Mean airway pressure in cm H2O used"},{"name":"pao2_mm_hg","type":"number","description":"Arterial PO2 used"},{"name":"oxygenation_index","type":"number","description":"FiO2 × mean airway pressure × 100 / PaO2, 1 decimal"},{"name":"citation","type":"object","description":"Ortiz, Cilley, and Bartlett 1987 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"fio2":"0.5","mean_airway_pressure_cm_h2o":"12","pao2_mm_hg":"80"},{"fio2":"0.5","mean_airway_pressure_cm_h2o":"12","pao2_mm_hg":"80"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/oxygenation-index","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/oxygenation-index?fio2=0.5&mean_airway_pressure_cm_h2o=12&pao2_mm_hg=80","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/oxygenation-index","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/pf-ratio","description":"PaO2/FiO2 ratio as arterial PO2 in mm Hg divided by inspired oxygen as a fraction (0.21–1.0). Returns the ratio rounded to one decimal. Magent does not apply ARDS severity cutoffs, and this is not the oxygenation index (FiO2 × MAP × 100 / PaO2).","parameters":[{"in":"query","name":"pao2_mm_hg","type":"number","description":"Arterial PO2 in mm Hg (20-700).","required":true,"example":"95"},{"in":"query","name":"fio2","type":"number","description":"Inspired oxygen as a fraction (0.21-1.0), not a percent. Required.","required":true,"example":"0.21"}],"errors":[{"code":"invalid_pao2","message":"pao2_mm_hg must be a number from 20 to 700. Returned before settlement; you are not charged.","status":400},{"code":"invalid_fio2","message":"fio2 must be a fraction from 0.21 to 1.0. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/pf-ratio","citation":{"authors":"Horovitz JH, Carrico CJ, Shires GT","doi":"10.1001/archsurg.1974.01350270079014","id":"horovitz-1974","pmid":"4813333","source":"Arch Surg. 1974;108(3):349-355","title":"Pulmonary response to major injury","url":"https://doi.org/10.1001/archsurg.1974.01350270079014"},"formula_expression":"pf_ratio = pao2_mm_hg / fio2","purpose":"Compute the PaO2/FiO2 ratio as arterial PO2 in mm Hg divided by inspired oxygen fraction.","markdown_url":"https://magentlab.com/docs/pf-ratio.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"pf_ratio"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"pao2_mm_hg","type":"number","description":"Arterial PO2 used, mm Hg"},{"name":"fio2","type":"number","description":"Inspired oxygen fraction used"},{"name":"pf_ratio","type":"number","description":"PaO2 divided by FiO2, 1 decimal"},{"name":"citation","type":"object","description":"Horovitz, Carrico, and Shires 1974 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"fio2":"0.21","pao2_mm_hg":"95"},{"fio2":"0.21","pao2_mm_hg":"95"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/pf-ratio","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/pf-ratio?pao2_mm_hg=95&fio2=0.21","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/pf-ratio","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/murray","description":"Murray 1988 lung injury score (LIS): mean of four 0–4 components (caller-assigned CXR quadrants; PaO2/FiO2 ≥300→0, 225–299→1, 175–224→2, 100–174→3, <100→4; PEEP cm H2O ≤5→0, 6–8→1, 9–11→2, 12–14→3, ≥15→4; compliance mL/cm H2O ≥80→0, 60–79→1, 40–59→2, 20–39→3, ≤19→4). LIS 0 none, 0<LIS≤2.5 mild_moderate, >2.5 severe. Not a medical device, not a Berlin ARDS diagnosis, not a ventilator order. magent does not interpret imaging.","parameters":[{"in":"query","name":"chest_radiograph_quadrants","type":"integer","enum":[0,1,2,3,4],"description":"Caller-assigned alveolar consolidation quadrants 0-4 (Murray 1988). 0 none, 1 one quadrant, 2 two quadrants, 3 three quadrants, 4 four quadrants. The integer is that component's points. magent does not interpret imaging.","required":true,"example":"0"},{"in":"query","name":"pf_ratio","type":"number","description":"PaO2/FiO2 ratio (20-800). Murray 1988: ≥300 → 0, 225-299 → 1, 175-224 → 2, 100-174 → 3, <100 → 4. magent does not read an ABG.","required":true,"example":"400"},{"in":"query","name":"peep_cm_h2o","type":"number","description":"PEEP in cm H2O (0-40). Murray 1988: ≤5 → 0, 6-8 → 1, 9-11 → 2, 12-14 → 3, ≥15 → 4. Not a ventilator order. magent does not set PEEP.","required":true,"example":"5"},{"in":"query","name":"compliance_ml_cm_h2o","type":"number","description":"Respiratory system compliance in mL/cm H2O (5-200). Murray 1988: ≥80 → 0, 60-79 → 1, 40-59 → 2, 20-39 → 3, ≤19 → 4. magent does not measure compliance.","required":true,"example":"90"}],"errors":[{"code":"invalid_murray","message":"chest_radiograph_quadrants must be an integer 0, 1, 2, 3, or 4 (Murray 1988). Returned before settlement; you are not charged.","status":400},{"code":"invalid_pf_ratio","message":"pf_ratio must be a number from 20 to 800. Returned before settlement; you are not charged.","status":400},{"code":"invalid_peep_cm_h2o","message":"peep_cm_h2o must be a number from 0 to 40 (Murray 1988). Returned before settlement; you are not charged.","status":400},{"code":"invalid_compliance_ml_cm","message":"compliance_ml_cm_h2o must be a number from 5 to 200 (Murray 1988). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/murray","citation":{"authors":"Murray JF, Matthay MA, Luce JM, Flick MR","doi":"10.1164/ajrccm/138.3.720","id":"murray-1988","pmid":"3202424","source":"Am Rev Respir Dis. 1988;138(3):720-723","title":"An expanded definition of the adult respiratory distress syndrome","url":"https://doi.org/10.1164/ajrccm/138.3.720"},"formula_expression":"LIS = mean of chest_radiograph_quadrants (0–4) + PaO2/FiO2 (≥300→0, 225–299→1, 175–224→2, 100–174→3, <100→4) + PEEP cm H2O (≤5→0, 6–8→1, 9–11→2, 12–14→3, ≥15→4) + compliance mL/cm H2O (≥80→0, 60–79→1, 40–59→2, 20–39→3, ≤19→4); Murray 1988; none if LIS=0, mild_moderate if 0<LIS≤2.5, severe if LIS>2.5","purpose":"Mean the four Murray 1988 lung injury score components (chest radiograph quadrants, PaO2/FiO2, PEEP, and compliance), each 0–4, and return LIS and injury_band.","markdown_url":"https://magentlab.com/docs/murray.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"murray"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"lis","type":"number","description":"Murray lung injury score: mean of the four 0-4 components, 2 decimals"},{"name":"injury_band","type":"string","description":"Murray 1988: none if LIS=0, mild_moderate if 0<LIS≤2.5, severe if LIS>2.5. Not a Berlin ARDS diagnosis."},{"name":"chest_radiograph_quadrants","type":"integer","description":"Caller-assigned quadrants 0-4 used"},{"name":"pf_ratio","type":"number","description":"PaO2/FiO2 used"},{"name":"peep_cm_h2o","type":"number","description":"PEEP in cm H2O used"},{"name":"compliance_ml_cm_h2o","type":"number","description":"Respiratory system compliance in mL/cm H2O used"},{"name":"components","type":"array","description":"Per-component Murray 1988 points"},{"name":"citation","type":"object","description":"Murray et al. Am Rev Respir Dis 1988 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"chest_radiograph_quadrants":"0","compliance_ml_cm_h2o":"90","peep_cm_h2o":"5","pf_ratio":"400"},{"chest_radiograph_quadrants":"0","compliance_ml_cm_h2o":"90","peep_cm_h2o":"5","pf_ratio":"400"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/murray","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/murray?chest_radiograph_quadrants=0&pf_ratio=400&peep_cm_h2o=5&compliance_ml_cm_h2o=90","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/murray","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/bli","description":"Pizov 1999 blast lung injury severity. Mild, moderate, or severe only when inputs match a published definition: mild PaO2/FiO2 > 200, localized infiltrates, no pneumothorax; moderate 60 to 200, diffuse infiltrates, with or without pneumothorax; severe < 60, bilateral infiltrates, and bronchopleural fistula. Unmatched combinations are rejected. Caller assigns all findings. magent does not read a chest radiograph or assay blood gas. Not a ventilator prescription.","parameters":[{"in":"query","name":"pf_ratio","type":"number","description":"PaO2/FiO2 ratio in mm Hg (20-600). Pizov 1999 bands: >200 mild, 60 to 200 moderate, <60 severe. Caller-supplied; magent does not assay blood gas.","required":true,"example":"250"},{"in":"query","name":"infiltrates","type":"string","description":"Lung infiltrate pattern as assigned by the caller: localized (mild), diffuse (moderate; Pizov 1999 diffuse bilateral or unilateral), or bilateral (severe). magent does not read a chest radiograph.","required":true,"example":"localized"},{"in":"query","name":"pneumothorax","type":"boolean","description":"true when the caller assigns pneumothorax. Mild requires false; moderate allows true or false; severe does not use this flag (Pizov 1999). magent does not read a chest radiograph.","required":true,"example":"false"},{"in":"query","name":"bronchopleural_fistula","type":"boolean","description":"true when the caller assigns bronchopleural fistula. Required true for severe; mild and moderate require false so the combination matches a Pizov 1999 definition exactly. magent does not read a chest radiograph.","required":true,"example":"false"}],"errors":[{"code":"invalid_bli","message":"Blast-lung-injury inputs must match a Pizov 1999 mild, moderate, or severe definition from that paper (PaO2/FiO2, infiltrates, pneumothorax, bronchopleural fistula). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/bli","citation":{"authors":"Pizov R, Oppenheim-Eden A, Matot I, Weiss YG, Eidelman LA, Rivkind AI, Sprung CL","doi":"10.1378/chest.115.1.165","id":"pizov-1999","pmid":"9925079","source":"Chest. 1999;115(1):165-172","title":"Blast lung injury from an explosion on a civilian bus","url":"https://doi.org/10.1378/chest.115.1.165"},"formula_expression":"mild iff pf_ratio > 200 and infiltrates localized and no pneumothorax and no bronchopleural fistula; moderate iff 60 <= pf_ratio <= 200 and infiltrates diffuse and no bronchopleural fistula (pneumothorax optional); severe iff pf_ratio < 60 and infiltrates bilateral and bronchopleural fistula; unmatched combinations are invalid (Pizov 1999). Not a numeric point total","purpose":"Return Pizov 1999 blast lung injury severity (mild, moderate, or severe) only when caller-assigned PaO2/FiO2, infiltrates, pneumothorax, and bronchopleural fistula match one published definition exactly.","markdown_url":"https://magentlab.com/docs/bli.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"bli"},{"name":"formula_expression","type":"string","description":"Published Pizov 1999 mild, moderate, or severe exact-match rule"},{"name":"pf_ratio","type":"number","description":"Caller-supplied PaO2/FiO2 in mm Hg used to match a class"},{"name":"infiltrates","type":"string","description":"Caller-assigned pattern: localized, diffuse, or bilateral"},{"name":"pneumothorax","type":"boolean","description":"true when the caller assigns pneumothorax"},{"name":"bronchopleural_fistula","type":"boolean","description":"true when the caller assigns bronchopleural fistula"},{"name":"severity","type":"string","description":"mild, moderate, or severe. Mutually exclusive. Not a nearest class."},{"name":"description","type":"string","description":"Pizov 1999 wording for that class"},{"name":"components","type":"array","description":"pf_ratio, infiltrates, pneumothorax, bronchopleural_fistula, and class rows"},{"name":"citation","type":"object","description":"Pizov 1999 Chest blast lung injury"},{"name":"disclaimer","type":"string","description":"Not a medical device"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"bronchopleural_fistula":"false","infiltrates":"localized","pf_ratio":"250","pneumothorax":"false"},{"bronchopleural_fistula":"false","infiltrates":"localized","pf_ratio":"250","pneumothorax":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/bli","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/bli?pf_ratio=250&infiltrates=localized&pneumothorax=false&bronchopleural_fistula=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/bli","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rsbi","description":"Rapid shallow breathing index (RSBI) as respiratory rate in breaths/min divided by tidal volume in liters (Yang and Tobin 1991). Provide tidal_volume_ml (50–2000) or tidal_volume_l (0.05–2.0), not both. Returns f/VT rounded to one decimal and whether that ratio is greater than 105 breaths/min/L. Not a wean order; magent does not perform a spontaneous breathing trial (SBT).","parameters":[{"in":"query","name":"respiratory_rate","type":"integer","description":"Respiratory rate in breaths/min (integer 4-80).","required":true,"example":"20"},{"in":"query","name":"tidal_volume_ml","type":"number","description":"Tidal volume in milliliters (50-2000). Converted as tidal_volume_l = tidal_volume_ml / 1000. Provide this or tidal_volume_l, not both.","required":false,"example":"400"},{"in":"query","name":"tidal_volume_l","type":"number","description":"Tidal volume in liters (0.05-2.0). Yang and Tobin RSBI uses VT in liters. Provide this or tidal_volume_ml, not both.","required":false,"example":"0.4"}],"errors":[{"code":"invalid_respiratory_rate","message":"respiratory_rate must be an integer from 4 to 80. Returned before settlement; you are not charged.","status":400},{"code":"invalid_tidal_volume","message":"tidal_volume_ml (50-2000) or tidal_volume_l (0.05-2.0) is required, not both. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rsbi","citation":{"authors":"Yang KL, Tobin MJ","doi":"10.1056/NEJM199105233242101","id":"yang-tobin-1991","source":"N Engl J Med. 1991;324(21):1445-1450","title":"A prospective study of indexes predicting the outcome of trials of weaning from mechanical ventilation","url":"https://doi.org/10.1056/NEJM199105233242101"},"formula_expression":"rsbi = respiratory_rate / tidal_volume_l","purpose":"Compute the Yang and Tobin rapid shallow breathing index as respiratory rate in breaths/min divided by tidal volume in liters.","markdown_url":"https://magentlab.com/docs/rsbi.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rsbi"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"respiratory_rate","type":"integer","description":"Respiratory rate used, breaths/min"},{"name":"tidal_volume_l","type":"number","description":"Tidal volume used, liters (ml inputs converted / 1000)"},{"name":"rsbi","type":"number","description":"Respiratory rate divided by tidal volume in liters, 1 decimal"},{"name":"rsbi_gt_105","type":"boolean","description":"True when rounded RSBI is greater than 105 breaths/min/L"},{"name":"citation","type":"object","description":"Yang and Tobin 1991 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"respiratory_rate":"20","tidal_volume_ml":"400"},{"respiratory_rate":"20","tidal_volume_ml":"400"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rsbi","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rsbi?respiratory_rate=20&tidal_volume_ml=400","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rsbi","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rox","description":"ROX index as (SpO2 percent / FiO2) / respiratory rate in breaths/min (Roca 2016). Returns the index rounded to two decimals. Not a ventilation order. This is not the PaO2/FiO2 (P/F) ratio and not RSBI (respiratory rate / tidal volume).","parameters":[{"in":"query","name":"spo2_percent","type":"number","description":"Pulse-oximetry SpO2 as a percent (50-100).","required":true,"example":"95"},{"in":"query","name":"fio2","type":"number","description":"Inspired oxygen as a fraction (0.21-1.0), not a percent. Required.","required":true,"example":"0.21"},{"in":"query","name":"respiratory_rate","type":"integer","description":"Respiratory rate in breaths/min (integer 4-80).","required":true,"example":"20"}],"errors":[{"code":"invalid_spo2","message":"spo2_percent must be a number from 50 to 100. Returned before settlement; you are not charged.","status":400},{"code":"invalid_fio2","message":"fio2 must be a fraction from 0.21 to 1.0. Returned before settlement; you are not charged.","status":400},{"code":"invalid_respiratory_rate","message":"respiratory_rate must be an integer from 4 to 80. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rox","citation":{"authors":"Roca O, Messika J, Caralt B, García-de-Acilu M, Sztrymf B, Ricard JD, Masclans JR","doi":"10.1016/j.jcrc.2016.05.022","id":"roca-2016","source":"J Crit Care. 2016;35:200-205","title":"Predicting success of high-flow nasal cannula in pneumonia patients with hypoxemic respiratory failure: The utility of the ROX index","url":"https://doi.org/10.1016/j.jcrc.2016.05.022"},"formula_expression":"rox = (spo2_percent / fio2) / respiratory_rate","purpose":"Compute the ROX index as pulse-oximetry SpO2 percent divided by inspired oxygen fraction, then divided by respiratory rate.","markdown_url":"https://magentlab.com/docs/rox.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rox"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"spo2_percent","type":"number","description":"SpO2 percent used"},{"name":"fio2","type":"number","description":"Inspired oxygen fraction used"},{"name":"respiratory_rate","type":"integer","description":"Respiratory rate used, breaths/min"},{"name":"rox","type":"number","description":"(SpO2 percent / FiO2) / respiratory rate, 2 decimals"},{"name":"citation","type":"object","description":"Roca 2016 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"fio2":"0.21","respiratory_rate":"20","spo2_percent":"95"},{"fio2":"0.21","respiratory_rate":"20","spo2_percent":"95"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rox","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rox?spo2_percent=95&fio2=0.21&respiratory_rate=20","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rox","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/sf-ratio","description":"SpO2/FiO2 (S/F) ratio as pulse-oximetry SpO2 percent divided by inspired oxygen as a fraction (0.21–1.0) (Rice 2007). Returns the ratio rounded to one decimal. Magent does not apply ARDS or Berlin bands. This is not the PaO2/FiO2 (P/F) ratio and not the ROX index.","parameters":[{"in":"query","name":"spo2_percent","type":"number","description":"Pulse-oximetry SpO2 as a percent (50-100).","required":true,"example":"95"},{"in":"query","name":"fio2","type":"number","description":"Inspired oxygen as a fraction (0.21-1.0), not a percent. Required.","required":true,"example":"0.21"}],"errors":[{"code":"invalid_spo2","message":"spo2_percent must be a number from 50 to 100. Returned before settlement; you are not charged.","status":400},{"code":"invalid_fio2","message":"fio2 must be a fraction from 0.21 to 1.0. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/sf-ratio","citation":{"authors":"Rice TW, Wheeler AP, Bernard GR, Hayden DL, Schoenfeld DA, Ware LB","doi":"10.1378/chest.07-0617","id":"rice-2007","source":"Chest. 2007;132(2):410-417","title":"Comparison of the SpO2/FIO2 ratio and the PaO2/FIO2 ratio in patients with acute lung injury or ARDS","url":"https://doi.org/10.1378/chest.07-0617"},"formula_expression":"sf_ratio = spo2_percent / fio2","purpose":"Compute the SpO2/FiO2 (S/F) ratio as pulse-oximetry SpO2 percent divided by inspired oxygen fraction.","markdown_url":"https://magentlab.com/docs/sf-ratio.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"sf_ratio"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"spo2_percent","type":"number","description":"SpO2 percent used"},{"name":"fio2","type":"number","description":"Inspired oxygen fraction used"},{"name":"sf_ratio","type":"number","description":"SpO2 percent divided by FiO2, 1 decimal"},{"name":"citation","type":"object","description":"Rice 2007 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"fio2":"0.21","spo2_percent":"95"},{"fio2":"0.21","spo2_percent":"95"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/sf-ratio","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/sf-ratio?spo2_percent=95&fio2=0.21","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/sf-ratio","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/lights","description":"Light 1972 pleural fluid criteria: exudate if protein ratio > 0.5, LDH ratio > 0.6, or pleural LDH > two-thirds the laboratory LDH ULN. ULN is required; magent does not assume 200 U/L. Strictly greater than those cutoffs. Deterministic published arithmetic with citation; not a diagnosis of cause, not Heffner's abbreviated criteria, and not a chest x-ray interpretation.","parameters":[{"in":"query","name":"pleural_protein_g_dl","type":"number","description":"Pleural fluid protein in g/dL (0.1-20).","required":true,"example":"3.0"},{"in":"query","name":"serum_protein_g_dl","type":"number","description":"Serum protein in g/dL (0.1-20).","required":true,"example":"6.0"},{"in":"query","name":"pleural_ldh_u_l","type":"number","description":"Pleural fluid LDH in U/L (1-10000).","required":true,"example":"100"},{"in":"query","name":"serum_ldh_u_l","type":"number","description":"Serum LDH in U/L (1-10000).","required":true,"example":"200"},{"in":"query","name":"ldh_uln_u_l","type":"number","description":"Laboratory LDH upper limit of normal in U/L (50-2000). Required; magent does not assume 200.","required":true,"example":"200"}],"errors":[{"code":"invalid_pleural_protein","message":"pleural_protein_g_dl must be a number from 0.1 to 20. Returned before settlement; you are not charged.","status":400},{"code":"invalid_serum_protein","message":"serum_protein_g_dl must be a number from 0.1 to 20. Returned before settlement; you are not charged.","status":400},{"code":"invalid_pleural_ldh","message":"pleural_ldh_u_l must be a number from 1 to 10000. Returned before settlement; you are not charged.","status":400},{"code":"invalid_serum_ldh","message":"serum_ldh_u_l must be a number from 1 to 10000. Returned before settlement; you are not charged.","status":400},{"code":"invalid_ldh_uln","message":"ldh_uln_u_l must be a number from 50 to 2000. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/lights","citation":{"authors":"Light RW, Macgregor MI, Luchsinger PC, Ball WC Jr","doi":"10.7326/0003-4819-77-4-507","id":"light-1972","source":"Ann Intern Med. 1972;77(4):507-513","title":"Pleural effusions: the diagnostic separation of transudates and exudates","url":"https://doi.org/10.7326/0003-4819-77-4-507"},"formula_expression":"exudate if pleural_protein_g_dl / serum_protein_g_dl > 0.5 or pleural_ldh_u_l / serum_ldh_u_l > 0.6 or pleural_ldh_u_l > (2/3) * ldh_uln_u_l","purpose":"Apply Light 1972 pleural fluid criteria from protein ratio, LDH ratio, and pleural LDH versus two-thirds the laboratory LDH upper limit of normal.","markdown_url":"https://magentlab.com/docs/lights.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"lights"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"exudate","type":"boolean","description":"true if any Light 1972 criterion is met (strictly greater than). Not a diagnosis of cause."},{"name":"protein_ratio","type":"number","description":"pleural_protein_g_dl / serum_protein_g_dl, 3 decimals"},{"name":"ldh_ratio","type":"number","description":"pleural_ldh_u_l / serum_ldh_u_l, 3 decimals"},{"name":"ldh_two_thirds_uln","type":"number","description":"(2/3) × ldh_uln_u_l, 1 decimal"},{"name":"pleural_ldh_u_l","type":"number","description":"Pleural fluid LDH used, U/L"},{"name":"criteria","type":"array","description":"Three Light 1972 rows (protein_ratio_gt_0_5, ldh_ratio_gt_0_6, pleural_ldh_gt_two_thirds_uln), each with factor, met, and value"},{"name":"citation","type":"object","description":"Light et al. 1972 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"ldh_uln_u_l":"200","pleural_ldh_u_l":"100","pleural_protein_g_dl":"3.0","serum_ldh_u_l":"200","serum_protein_g_dl":"6.0"},{"ldh_uln_u_l":"200","pleural_ldh_u_l":"100","pleural_protein_g_dl":"3.0","serum_ldh_u_l":"200","serum_protein_g_dl":"6.0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/lights","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/lights?pleural_protein_g_dl=3.0&serum_protein_g_dl=6.0&pleural_ldh_u_l=100&serum_ldh_u_l=200&ldh_uln_u_l=200","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/lights","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rapid","description":"Rahman 2014 RAPID score for pleural infection: urea (<5=0, 5-8=1, >8=2 mmol/L), age (<50=0, 50-70=1, >70=2), non-purulent fluid 1, hospital-acquired 1, albumin <27 g/L 1; total 0-7 with low/medium/high bands. Deterministic published arithmetic with citation; not a drain or surgery decision and not Light's criteria.","parameters":[{"in":"query","name":"urea_mmol_l","type":"number","description":"Serum urea in mmol/L (1-50). Provide this or bun_mg_dl, not both. <5 scores 0; 5.0-8.0 inclusive scores 1; >8 scores 2 (Rahman 2014).","required":false,"example":"4"},{"in":"query","name":"bun_mg_dl","type":"number","description":"BUN in mg/dL (3-140). Converted as urea_mmol_l = bun_mg_dl / 2.8.","required":false,"example":"11.2"},{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). <50 scores 0; 50-70 inclusive scores 1; >70 scores 2.","required":true,"example":"40"},{"in":"query","name":"pleural_purulent","type":"boolean","description":"Purulent pleural fluid (Rahman 2014). true scores 0; false (non-purulent) scores 1. magent does not inspect the fluid.","required":true,"example":"true"},{"in":"query","name":"hospital_acquired","type":"boolean","description":"Hospital-acquired pleural infection (Rahman 2014). true scores 1; false (community) scores 0.","required":true,"example":"false"},{"in":"query","name":"albumin_g_l","type":"number","description":"Serum albumin in g/L (10-60). Provide this or albumin_g_dl, not both. ≥27 scores 0; <27 scores 1.","required":false,"example":"35"},{"in":"query","name":"albumin_g_dl","type":"number","description":"Serum albumin in g/dL (1-6). Converted as g/L = g/dL × 10. Provide this or albumin_g_l, not both.","required":false,"example":"3.5"}],"errors":[{"code":"invalid_urea","message":"urea_mmol_l (1-50) or bun_mg_dl (3-140) is required, not both. Returned before settlement; you are not charged.","status":400},{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_albumin","message":"albumin_g_dl (1-6) or albumin_g_l (10-60) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rapid","citation":{"authors":"Rahman NM, Kahan BC, Pendleton RC, et al.","doi":"10.1378/chest.13-1558","id":"rahman-2014","pmid":"24264558","source":"Chest. 2014;145(4):848-855","title":"A clinical score (RAPID) to identify those at risk for poor outcome at presentation in patients with pleural infection","url":"https://doi.org/10.1378/chest.13-1558"},"formula_expression":"RAPID = urea_points + age_points + nonpurulent_points + hospital_acquired_points + albumin_points; urea <5 = 0, 5.0-8.0 = 1, >8 = 2; age <50 = 0, 50-70 = 1, >70 = 2; purulent = 0, non-purulent = 1; community = 0, hospital = 1; albumin >=27 g/L = 0, <27 = 1; max 7","purpose":"Sum the Rahman 2014 RAPID points for pleural infection at presentation and return the published low, medium, or high band.","markdown_url":"https://magentlab.com/docs/rapid.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rapid"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"RAPID points 0-7"},{"name":"max_score","type":"integer","description":"7"},{"name":"risk_band","type":"string","description":"Rahman 2014 band: low (0-2), medium (3-4), or high (5-7). A band, not a drain or surgery decision."},{"name":"urea_mmol_l","type":"number","description":"Urea in mmol/L used"},{"name":"age_years","type":"integer","description":"Age used"},{"name":"pleural_purulent","type":"boolean","description":"Purulent pleural fluid flag used"},{"name":"hospital_acquired","type":"boolean","description":"Hospital-acquired infection flag used"},{"name":"albumin_g_l","type":"number","description":"Serum albumin used in g/L (after g/dL conversion when supplied)"},{"name":"components","type":"array","description":"Per-variable points"},{"name":"citation","type":"object","description":"Rahman et al. Chest 2014 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"40","albumin_g_l":"35","hospital_acquired":"false","pleural_purulent":"true","urea_mmol_l":"4"},{"age":"40","albumin_g_l":"35","hospital_acquired":"false","pleural_purulent":"true","urea_mmol_l":"4"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rapid","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rapid?urea_mmol_l=4&age=40&pleural_purulent=true&hospital_acquired=false&albumin_g_l=35","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rapid","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/lent","description":"Clive 2014 LENT score for malignant pleural effusion: pleural LDH IU/L (<1500 → 0, >1500 → 1), ECOG 0-4 (0→0, 1→1, 2→2, 3-4→3), serum NLR as a number (<9 → 0, >9 → 1), tumour type (mesothelioma/haematological 0; breast/gynaecological/renal_cell 1; lung/other 2). Score 0-7: 0-1 low, 2-4 moderate, 5-7 high. Equality at 1500 or 9 is not scored. Not a diagnosis or treatment order.","parameters":[{"in":"query","name":"pleural_ldh_u_l","type":"number","description":"Pleural fluid LDH in IU/L (1-20000, not 1500). Clive 2014 Table 3: <1500 scores 0, >1500 scores 1. Equality at 1500 is not scored.","required":true,"example":"1000"},{"in":"query","name":"ecog","type":"integer","description":"Oken 1982 ECOG performance status 0-4 as assigned by the caller. Clive 2014: 0→0, 1→1, 2→2, 3-4→3. Grade 5 (dead) is not scored. magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"nlr","type":"number","description":"Serum neutrophil-to-lymphocyte ratio as a number (0.05-200, not 9). Clive 2014 Table 3: <9 scores 0, >9 scores 1. Equality at 9 is not scored. Pass nlr; magent does not compute it from percents.","required":true,"example":"5"},{"in":"query","name":"tumor_type","type":"string","enum":["mesothelioma","haematological","breast","gynaecological","renal_cell","lung","other"],"description":"Clive 2014 tumour type. mesothelioma or haematological (also hematological) scores 0; breast, gynaecological (also gynecological), or renal_cell scores 1; lung or other scores 2. magent does not assign tumour type from histology text.","required":true,"example":"mesothelioma"}],"errors":[{"code":"invalid_lent_ldh","message":"pleural_ldh_u_l must be a number from 1 to 20000 and not 1500 (Clive 2014 LENT uses <1500 vs >1500). Returned before settlement; you are not charged.","status":400},{"code":"invalid_ecog_ps","message":"ecog must be an integer from 0 to 4 (Oken 1982). Grade 5 (dead) is not scored. Returned before settlement; you are not charged.","status":400},{"code":"invalid_lent_nlr","message":"nlr must be a number from 0.05 to 200 and not 9 (Clive 2014 LENT uses <9 vs >9). Returned before settlement; you are not charged.","status":400},{"code":"invalid_lent_tumor","message":"tumor_type must be mesothelioma, haematological, breast, gynaecological, renal_cell, lung, or other (Clive 2014 LENT). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/lent","citation":{"authors":"Clive AO, Kahan BC, Hooper CE, Bhatnagar R, Morley AJ, Zahan-Evans N, Bintcliffe OJ, Boshuizen RC, Fysh ETH, Tobin CL, Medford ARL, Harvey JE, van den Heuvel MM, Lee YCG, Maskell NA","doi":"10.1136/thoraxjnl-2014-205285","id":"clive-2014","pmid":"25100651","source":"Thorax. 2014;69(12):1098-1104","title":"Predicting survival in malignant pleural effusion: development and validation of the LENT prognostic score","url":"https://doi.org/10.1136/thoraxjnl-2014-205285"},"formula_expression":"LENT = L (pleural LDH IU/L: <1500 → 0, >1500 → 1) + E (ECOG 0→0, 1→1, 2→2, 3-4→3) + N (serum NLR: <9 → 0, >9 → 1) + T (mesothelioma/haematological → 0; breast/gynaecological/renal_cell → 1; lung/other → 2); Clive 2014 Table 3; max 7; 0-1 low, 2-4 moderate, 5-7 high","purpose":"Sum the Clive 2014 Table 3 LENT score (pleural fluid LDH, ECOG, serum NLR, tumour type) and return low (0-1), moderate (2-4), or high (5-7).","markdown_url":"https://magentlab.com/docs/lent.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"lent"},{"name":"formula_expression","type":"string","description":"Clive 2014 Table 3 LENT rule"},{"name":"score","type":"integer","description":"LENT points 0-7"},{"name":"max_score","type":"integer","description":"7"},{"name":"risk","type":"string","description":"low when score is 0-1, moderate when 2-4, high when 5-7 (Clive 2014). Not a diagnosis or treatment order. Paper median survivals 319 / 130 / 44 days are table numbers only."},{"name":"pleural_ldh_u_l","type":"number","description":"Pleural fluid LDH used, IU/L"},{"name":"ecog","type":"integer","description":"Caller-assigned Oken 1982 ECOG grade 0-4"},{"name":"nlr","type":"number","description":"Serum NLR used (caller-supplied number)"},{"name":"tumor_type","type":"string","description":"Canonical Clive 2014 tumour token used for T"},{"name":"components","type":"array","description":"L, E, N, and T points"},{"name":"citation","type":"object","description":"Clive 2014 Thorax citation"},{"name":"disclaimer","type":"string","description":"Not a medical device"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"ecog":"0","nlr":"5","pleural_ldh_u_l":"1000","tumor_type":"mesothelioma"},{"ecog":"0","nlr":"5","pleural_ldh_u_l":"1000","tumor_type":"mesothelioma"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/lent","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/lent?pleural_ldh_u_l=1000&ecog=0&nlr=5&tumor_type=mesothelioma","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/lent","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/promise","description":"Psallidas 2018 Table 2A clinical PROMISE for malignant pleural effusion: chemo 0/4, radiotherapy 0/2, haemoglobin g/dL 0-4, WBC 10^9/L 0/2/4/7/10, CRP mg/L 0/3/5/8/11, ECOG 0-1=0 or 2-4=7, cancer mesothelioma 0 / other 4 / lung 5. Groups A 0-20 <25%, B 21-27, C 28-35, D >35 >=75% 3-month mortality. Not TIMP1. Not a treatment order.","parameters":[{"in":"query","name":"chemotherapy","type":"boolean","description":"Previous chemotherapy as assigned by the caller (Psallidas 2018 Table 2A). true or false. true scores 4; false scores 0. Not a chemotherapy order. magent does not read a treatment history.","required":true,"example":"false"},{"in":"query","name":"radiotherapy","type":"boolean","description":"Previous radiotherapy as assigned by the caller (Psallidas 2018 Table 2A). true or false. true scores 2; false scores 0. Not a radiotherapy order. magent does not read a treatment history.","required":true,"example":"false"},{"in":"query","name":"haemoglobin_g_dl","type":"number","description":"Haemoglobin in g/dL (3-25). Psallidas 2018 Table 2A: ≥16 scores 0; 14 to <16 scores 1; 12 to <14 scores 2; 10 to <12 scores 3; <10 scores 4. Caller-supplied; magent does not assay haemoglobin.","required":true,"example":"15.0"},{"in":"query","name":"wbc","type":"number","description":"Serum white cell count as 10^9/L (0.1-80). Psallidas 2018 Table 2A: <4 scores 0; 4 to <6.3 scores 2; 6.3 to <10 scores 4; 10 to <15.8 scores 7; ≥15.8 scores 10. Caller-supplied; magent does not assay WBC.","required":true,"example":"8.0"},{"in":"query","name":"crp_mg_l","type":"number","description":"Serum CRP in mg/L (0-500), not IU/L. Psallidas 2018 Table 2A: <3 scores 0; 3 to <10 scores 3; 10 to <32 scores 5; 32 to <100 scores 8; ≥100 scores 11. Caller-supplied; magent does not assay CRP or convert IU/L.","required":true,"example":"20"},{"in":"query","name":"ecog","type":"integer","description":"Oken 1982 ECOG performance status 0-4 as assigned by the caller. Psallidas 2018 Table 2A: 0-1 scores 0; 2-4 scores 7. Grade 5 (dead) is not scored. magent does not observe the patient or convert Karnofsky.","required":true,"example":"0"},{"in":"query","name":"cancer_type","type":"string","enum":["mesothelioma","lung","other"],"description":"Psallidas 2018 Table 2A cancer type as assigned by the caller. mesothelioma scores 0; other scores 4; lung scores 5. magent does not assign cancer type from histology text.","required":true,"example":"other"}],"errors":[{"code":"invalid_promise","message":"Clinical PROMISE needs Psallidas 2018 chemotherapy, radiotherapy, haemoglobin, WBC, CRP, ECOG, and cancer type in published ranges. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/promise","citation":{"authors":"Psallidas I, Kanellakis NI, Gerry S, et al.","doi":"10.1016/S1470-2045(18)30294-8","id":"psallidas-2018","pmid":"29908990","source":"Lancet Oncol. 2018;19(7):930-939","title":"Development and validation of response markers to predict survival and pleurodesis success in patients with malignant pleural effusion (PROMISE): a multicohort analysis","url":"https://doi.org/10.1016/S1470-2045(18)30294-8"},"formula_expression":"clinical PROMISE = previous_chemotherapy (no 0, yes 4) + previous_radiotherapy (no 0, yes 2) + haemoglobin_g_dl (≥16 → 0; 14 to <16 → 1; 12 to <14 → 2; 10 to <12 → 3; <10 → 4) + wbc_10e9_l (<4 → 0; 4 to <6.3 → 2; 6.3 to <10 → 4; 10 to <15.8 → 7; ≥15.8 → 10) + crp_mg_l (<3 → 0; 3 to <10 → 3; 10 to <32 → 5; 32 to <100 → 8; ≥100 → 11) + ECOG (0–1 → 0; 2–4 → 7) + cancer_type (mesothelioma → 0; other → 4; lung → 5); Psallidas 2018 Table 2A; groups A 0–20 <25% 3-month mortality, B 21–27 25% to <50%, C 28–35 50% to <75%, D >35 ≥75%","purpose":"Sum the Psallidas 2018 Table 2A clinical PROMISE points (previous chemotherapy and radiotherapy, haemoglobin, WBC, CRP, ECOG, cancer type) and return group A-D 3-month mortality bands.","markdown_url":"https://magentlab.com/docs/promise.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"promise"},{"name":"formula_expression","type":"string","description":"Psallidas 2018 Table 2A clinical PROMISE rule"},{"name":"score","type":"integer","description":"Clinical PROMISE points 0-43"},{"name":"max_score","type":"integer","description":"43"},{"name":"group","type":"string","description":"A when score is 0-20, B when 21-27, C when 28-35, D when score is >35 (Psallidas 2018 Table 2A). Not a diagnosis or treatment order."},{"name":"three_month_mortality","type":"string","description":"Published Table 2A 3-month mortality band: <25% (A), 25% to <50% (B), 50% to <75% (C), >=75% (D). Paper group percents only, not a prognosis assignment."},{"name":"chemotherapy","type":"boolean","description":"Caller-assigned previous chemotherapy flag used"},{"name":"radiotherapy","type":"boolean","description":"Caller-assigned previous radiotherapy flag used"},{"name":"haemoglobin_g_dl","type":"number","description":"Haemoglobin used, g/dL"},{"name":"wbc","type":"number","description":"Serum WBC used, 10^9/L"},{"name":"crp_mg_l","type":"number","description":"Serum CRP used, mg/L"},{"name":"ecog","type":"integer","description":"Caller-assigned Oken 1982 ECOG grade 0-4"},{"name":"cancer_type","type":"string","description":"Canonical Table 2A cancer token used (mesothelioma, lung, or other)"},{"name":"components","type":"array","description":"Per-factor Table 2A points"},{"name":"citation","type":"object","description":"Psallidas 2018 Lancet Oncology citation"},{"name":"disclaimer","type":"string","description":"Not a medical device"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"cancer_type":"other","chemotherapy":"false","crp_mg_l":"20","ecog":"0","haemoglobin_g_dl":"15.0","radiotherapy":"false","wbc":"8.0"},{"cancer_type":"other","chemotherapy":"false","crp_mg_l":"20","ecog":"0","haemoglobin_g_dl":"15.0","radiotherapy":"false","wbc":"8.0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/promise","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/promise?chemotherapy=false&radiotherapy=false&haemoglobin_g_dl=15.0&wbc=8.0&crp_mg_l=20&ecog=0&cancer_type=other","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/promise","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/mayo-spn","description":"Swensen 1997 Mayo Clinic logistic probability of malignancy for a 4-30 mm radiologically indeterminate solitary pulmonary nodule. Inputs: age, current or former smoking, extrathoracic cancer diagnosed ≥5 years before the nodule, largest diameter in mm, caller-assigned spiculation, and caller-assigned upper-lobe location. Returns logit x and P = e^x / (1 + e^x). magent does not read the film. Not Gould 2007, not Brock, not a diagnosis, not a biopsy order, and not a medical device.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Swensen 1997 is an adult derivation; 18 is an implementation clamp.","required":true,"example":"50"},{"in":"query","name":"smoke","type":"boolean","description":"Cigarette smoking as coded in Swensen 1997. true = current or former smoker (1); false = never (0). The caller assigns smoking history.","required":true,"example":"false"},{"in":"query","name":"cancer","type":"boolean","description":"Extrathoracic cancer diagnosed ≥5 years before the nodule (Swensen 1997). true scores 1; false scores 0. The derivation excluded cancer within 5 years. The caller assigns the history.","required":true,"example":"false"},{"in":"query","name":"diameter_mm","type":"number","description":"Largest nodule diameter in millimetres (4-30). Swensen 1997 derivation range. magent does not measure the film.","required":true,"example":"8"},{"in":"query","name":"spiculation","type":"boolean","description":"Spiculated edge as assigned by the caller (Swensen 1997). true or false. magent does not read the film.","required":true,"example":"false"},{"in":"query","name":"upper_lobe","type":"boolean","description":"Upper-lobe location as assigned by the caller (Swensen 1997). true or false. magent does not read the film.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_mayo_spn","message":"each Mayo 1997 SPN item must be a published value for that field. Returned before settlement; you are not charged.","status":400},{"code":"invalid_nodule_mm","message":"diameter_mm must be a number from 4 to 30 (Swensen 1997 derivation). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/mayo-spn","citation":{"authors":"Swensen SJ, Silverstein MD, Ilstrup DM, Schleck CD, Edell ES","doi":"10.1001/archinte.1997.00440290031002","id":"swensen-1997","pmid":"9129544","source":"Arch Intern Med. 1997;157(8):849-855","title":"The probability of malignancy in solitary pulmonary nodules. Application to small radiologically indeterminate nodules","url":"https://doi.org/10.1001/archinte.1997.00440290031002"},"formula_expression":"P = e^x / (1 + e^x); x = -6.8272 + 0.0391*age + 0.7917*smoke + 1.3388*cancer + 0.1274*diameter_mm + 1.0407*spiculation + 0.7838*upper_lobe; smoke 1 = current or former, 0 = never; cancer 1 = extrathoracic cancer diagnosed ≥5 years before the nodule; spiculation 1/0; upper_lobe 1/0 (Swensen 1997)","purpose":"Compute the Swensen 1997 Mayo Clinic logistic probability of malignancy for a radiologically indeterminate solitary pulmonary nodule from age, smoking, remote extrathoracic cancer, diameter, spiculation, and upper-lobe location.","markdown_url":"https://magentlab.com/docs/mayo-spn.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"mayo_spn"},{"name":"formula_expression","type":"string","description":"Swensen 1997 logistic expression"},{"name":"age_years","type":"integer","description":"Age in years used"},{"name":"smoke","type":"boolean","description":"true if current or former smoker; false if never"},{"name":"cancer","type":"boolean","description":"true if extrathoracic cancer diagnosed ≥5 years before the nodule"},{"name":"diameter_mm","type":"number","description":"Largest nodule diameter in millimetres"},{"name":"spiculation","type":"boolean","description":"Caller-assigned spiculated edge"},{"name":"upper_lobe","type":"boolean","description":"Caller-assigned upper-lobe location"},{"name":"linear_predictor","type":"number","description":"Swensen 1997 logit x, 4 decimals"},{"name":"probability","type":"number","description":"P = e^x / (1 + e^x) on 0-1, 4 decimals. Not a malignancy-percent band, diagnosis, or biopsy order."},{"name":"citation","type":"object","description":"Swensen 1997 Arch Intern Med citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"50","cancer":"false","diameter_mm":"8","smoke":"false","spiculation":"false","upper_lobe":"false"},{"age":"50","cancer":"false","diameter_mm":"8","smoke":"false","spiculation":"false","upper_lobe":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/mayo-spn","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/mayo-spn?age=50&smoke=false&cancer=false&diameter_mm=8&spiculation=false&upper_lobe=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/mayo-spn","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/fleischner-2017","description":"MacMahon 2017 Fleischner table for one solid noncalcified incidental nodule. size_mm 1-30 and caller-assigned high_risk. <6 mm: no routine follow-up (optional CT at 12 months if high risk). 6-8 mm: CT at 6-12 months, then consider or obtain 18-24 month CT by risk. >8 mm: consider CT at 3 months, PET/CT, or tissue sampling. Not subsolid, multiple, or Lung-RADS screening. magent does not read CT. Not a diagnosis or medical device.","parameters":[{"in":"query","name":"size_mm","type":"number","description":"Average diameter in millimetres of a single solid noncalcified incidental nodule (1-30). MacMahon 2017 bands: <6, 6-8, and >8. magent does not measure the nodule or read CT.","required":true,"example":"5"},{"in":"query","name":"high_risk","type":"boolean","description":"High versus low clinical risk as assigned by the caller (for example heavy smoking or other published high-risk features in MacMahon 2017). true or false. magent does not compute a risk model.","required":true,"example":"false"}],"errors":[{"code":"invalid_fleischner_mm","message":"size_mm must be a number from 1 to 30 (MacMahon 2017 solid nodule average diameter). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/fleischner-2017","citation":{"authors":"MacMahon H, Naidich DP, Goo JM, Lee KS, Leung ANC, Rajendran K, Travis WD, Bankier AA","doi":"10.1148/radiol.2017161659","id":"macmahon-2017","pmid":"28240562","source":"Radiology. 2017;284(1):228-243","title":"Guidelines for Management of Incidental Pulmonary Nodules Detected on CT Images: From the Fleischner Society 2017","url":"https://doi.org/10.1148/radiol.2017161659"},"formula_expression":"Single solid noncalcified incidental nodule (MacMahon 2017): size_mm < 6 → no_routine_followup if not high_risk else optional_ct_12_months; 6 <= size_mm <= 8 → ct_6_12_then_consider_18_24 if not high_risk else ct_6_12_then_18_24; size_mm > 8 → consider_ct_3_pet_or_tissue (low or high risk). Not subsolid. Not multiple nodules. Not Lung-RADS screening. magent does not read CT.","purpose":"Apply the MacMahon 2017 Fleischner Society table for a single solid noncalcified incidental pulmonary nodule and return the published follow-up recommendation from average diameter and caller-assigned high versus low clinical risk.","markdown_url":"https://magentlab.com/docs/fleischner-2017.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"fleischner_2017"},{"name":"formula_expression","type":"string","description":"MacMahon 2017 single solid incidental nodule follow-up table"},{"name":"size_band","type":"string","description":"<6, 6-8, or >8 from size_mm. Not a measurement of the nodule."},{"name":"high_risk","type":"boolean","description":"Echo of the caller-assigned high_risk flag"},{"name":"recommendation","type":"string","description":"no_routine_followup, optional_ct_12_months, ct_6_12_then_consider_18_24, ct_6_12_then_18_24, or consider_ct_3_pet_or_tissue. Not a diagnosis or imaging order."},{"name":"criteria","type":"array","description":"Tree rows for size_lt_6, size_6_to_8, size_gt_8 (with size_mm value) and high_risk"},{"name":"citation","type":"object","description":"MacMahon 2017 Radiology Fleischner Society citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"high_risk":"false","size_mm":"5"},{"high_risk":"false","size_mm":"5"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/fleischner-2017","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/fleischner-2017?size_mm=5&high_risk=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/fleischner-2017","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/ariscat","description":"Canet 2010 ARISCAT simplified risk score (Table 6, β×10 rounded; Mazo 2014 reprints the same points): age <=50=0, 51-80=3, >80=16; SpO2 >=96=0, 91-95=8, <=90=24; respiratory infection last month=17; anemia Hb <=10 flag=11; incision peripheral 0, upper_abdominal 15, intrathoracic 24; duration hours <=2=0, >2 to 3=16, >3=23; emergency=8. Max 123. Low <26, intermediate 26-44, high >=45. Not a diagnosis or cancel-surgery order. magent does not measure SpO2.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Canet 2010 Table 6: <=50 scores 0; 51-80 scores 3; >80 scores 16. Age 50 scores 0; 51 scores 3; 80 scores 3; 81 scores 16.","required":true,"example":"50"},{"in":"query","name":"spo2_percent","type":"number","description":"Preoperative SpO2 percent (50-100) as assigned by the caller. Canet 2010 Table 6: >=96 scores 0; 91-95 scores 8; <=90 scores 24. magent does not measure SpO2.","required":true,"example":"97"},{"in":"query","name":"respiratory_infection","type":"boolean","description":"Respiratory infection in the last month as assigned by the caller (Canet 2010 Table 6). true scores 17. true or false.","required":true,"example":"false"},{"in":"query","name":"anemia","type":"boolean","description":"Preoperative anemia (Hb <=10 g/dL) as assigned by the caller (Canet 2010 Table 6). true scores 11. Flag only; do not send a hemoglobin number.","required":true,"example":"false"},{"in":"query","name":"incision","type":"string","enum":["peripheral","upper_abdominal","intrathoracic"],"description":"Surgical incision as assigned by the caller (Canet 2010 Table 6): peripheral scores 0, upper_abdominal scores 15, intrathoracic scores 24. magent does not classify the procedure from an op note.","required":true,"example":"peripheral"},{"in":"query","name":"duration_hours","type":"number","description":"Duration of surgery in hours (0.1-24). Canet 2010 Table 6: <=2 scores 0; >2 to 3 scores 16; >3 scores 23. Duration 2.0 scores 0; 2.1 scores 16; 3.0 scores 16; 3.1 scores 23.","required":true,"example":"2.0"},{"in":"query","name":"emergency","type":"boolean","description":"Emergency procedure as assigned by the caller (Canet 2010 Table 6; β 0.768 × 10 rounded). true scores 8. true or false.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_spo2","message":"spo2_percent must be a number from 50 to 100. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_surgical_incision","message":"incision must be peripheral, upper_abdominal, or intrathoracic (Canet 2010). Returned before settlement; you are not charged.","status":400},{"code":"invalid_ariscat","message":"duration_hours must be 0.1-24, and each other ARISCAT 2010 item must be a published category. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/ariscat","citation":{"authors":"Canet J, Gallart L, Gomar C, et al","doi":"10.1097/ALN.0b013e3181fc6e0a","id":"canet-2010","pmid":"21045639","source":"Anesthesiology. 2010;113(6):1338-1350","title":"Prediction of Postoperative Pulmonary Complications in a Population-based Surgical Cohort","url":"https://doi.org/10.1097/ALN.0b013e3181fc6e0a"},"formula_expression":"ARISCAT = age (<=50: 0, 51-80: 3, >80: 16) + spo2 (>=96: 0, 91-95: 8, <=90: 24) + respiratory_infection(17) + anemia(11) + incision (peripheral 0, upper_abdominal 15, intrathoracic 24) + duration_hours (<=2: 0, >2 to 3: 16, >3: 23) + emergency(8); max 123; low <26, intermediate 26-44, high >=45","purpose":"Sum Canet 2010 Table 6 simplified ARISCAT points (β×10 rounded) from age, preoperative SpO2, respiratory infection, anemia flag, incision, duration of surgery, and emergency, and return the published low / intermediate / high band.","markdown_url":"https://magentlab.com/docs/ariscat.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"ariscat"},{"name":"formula_expression","type":"string","description":"Canet 2010 Table 6 simplified risk score"},{"name":"score","type":"integer","description":"ARISCAT points 0-123"},{"name":"max_score","type":"integer","description":"123"},{"name":"risk_band","type":"string","description":"Canet 2010 interval: low (<26), intermediate (26-44), or high (>=45). A band, not a diagnosis or cancel-surgery order."},{"name":"age_years","type":"integer","description":"Age used for the exclusive age band"},{"name":"spo2_percent","type":"number","description":"Caller-assigned preoperative SpO2 percent"},{"name":"respiratory_infection","type":"boolean","description":"Caller-assigned respiratory infection in the last month"},{"name":"anemia","type":"boolean","description":"Caller-assigned preoperative anemia (Hb <=10 g/dL) flag"},{"name":"incision","type":"string","description":"peripheral, upper_abdominal, or intrathoracic"},{"name":"duration_hours","type":"number","description":"Duration of surgery in hours used for the exclusive duration band"},{"name":"emergency","type":"boolean","description":"Caller-assigned emergency procedure"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Canet et al. Anesthesiology 2010 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"50","anemia":"false","duration_hours":"2.0","emergency":"false","incision":"peripheral","respiratory_infection":"false","spo2_percent":"97"},{"age":"50","anemia":"false","duration_hours":"2.0","emergency":"false","incision":"peripheral","respiratory_infection":"false","spo2_percent":"97"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/ariscat","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/ariscat?age=50&spo2_percent=97&respiratory_infection=false&anemia=false&incision=peripheral&duration_hours=2.0&emergency=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/ariscat","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/peak-expiratory-flow","description":"Nunn and Gregg 1989 predicted adult peak expiratory flow (L/min) from age, sex, and height. Sex-specific ln(PEF) regressions as published. Deterministic published arithmetic with citation; not a personal-best or action-plan zone.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (integer 15-85). Nunn and Gregg 1989 adult range.","required":true,"example":"40"},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"Sex for the published regression (female or male).","required":true,"example":"male"},{"in":"query","name":"height_cm","type":"number","description":"Height in centimetres (50-250). Provide height_cm or height_in.","required":false,"example":"175"},{"in":"query","name":"height_in","type":"number","description":"Height in inches (20-98). Converted as cm = in × 2.54.","required":false,"example":"68.8976"}],"errors":[{"code":"invalid_peak_flow_age","message":"age must be an integer from 15 to 85 (Nunn and Gregg 1989). Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_height","message":"height_cm (50-250) or height_in (20-98) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/peak-expiratory-flow","citation":{"authors":"Nunn AJ, Gregg I","doi":"10.1136/bmj.298.6680.1068","id":"nunn-gregg-1989","pmid":"2497892","source":"BMJ. 1989;298(6680):1068-1070","title":"New regression equations for predicting peak expiratory flow in adults","url":"https://doi.org/10.1136/bmj.298.6680.1068"},"formula_expression":"ln(PEF_l_min) = a*ln(age) + b*age + c/height_cm + d; male a=0.544 b=-0.0151 c=-74.7 d=5.48; female a=0.376 b=-0.0120 c=-58.8 d=5.63","purpose":"Compute Nunn and Gregg 1989 predicted peak expiratory flow in L/min from age, sex, and height.","markdown_url":"https://magentlab.com/docs/peak-expiratory-flow.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"nunn_gregg_1989"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"age_years","type":"integer","description":"Age used"},{"name":"sex","type":"string","description":"male or female"},{"name":"height_cm","type":"number","description":"Normalized height in cm"},{"name":"predicted_pef_l_min","type":"number","description":"Predicted peak expiratory flow in L/min, nearest litre"},{"name":"citation","type":"object","description":"Nunn and Gregg BMJ 1989 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"40","height_cm":"175","sex":"male"},{"age":"40","height_cm":"175","sex":"male"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/peak-expiratory-flow","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/peak-expiratory-flow?age=40&sex=male&height_cm=175","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/peak-expiratory-flow","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/6mwd","description":"Enright 1998 predicted six-minute walk distance (meters) from sex, age 40-80, height_cm, and weight_kg (Table 3 height/weight: male 7.57H−5.02age−1.76W−309; female 2.11H−2.29W−5.78age+667). Reports predicted_m and lln_m (minus 153 m men or 139 m women). Optional walked_m (0-1500) yields percent_predicted. Not a timed walk, BMI-equation path, or 80%/400 m class. Not a medical device.","parameters":[{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"Sex used by Enright 1998 Table 3 (separate male and female height/weight equations).","required":true,"example":"male"},{"in":"query","name":"age","type":"integer","description":"Age in years (integer 40-80). Enright 1998 derivation range.","required":true,"example":"50"},{"in":"query","name":"height_cm","type":"number","description":"Height in centimeters (50-250). Provide height_cm or height_in.","required":false,"example":"170"},{"in":"query","name":"height_in","type":"number","description":"Height in inches (20-98). Converted as cm = in × 2.54.","required":false,"example":"66.9291"},{"in":"query","name":"weight_kg","type":"number","description":"Weight in kilograms (1-500). Provide weight_kg or weight_lb.","required":false,"example":"70"},{"in":"query","name":"weight_lb","type":"number","description":"Weight in pounds (2-1100). Converted as kg = lb × 0.45359237.","required":false,"example":"154.324"},{"in":"query","name":"walked_m","type":"number","description":"Optional distance walked in meters (0-1500). When present, percent_predicted = walked_m / predicted_m × 100. magent does not time the walk.","required":false,"example":"400"}],"errors":[{"code":"invalid_6mwd","message":"Predicted 6MWD needs sex, age 40-80, height, and weight as used in Enright 1998; optional walked_m is a non-negative distance in meters. Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_height","message":"height_cm (50-250) or height_in (20-98) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_weight","message":"weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_walked_m","message":"walked_m must be a number from 0 to 1500. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/6mwd","citation":{"authors":"Enright PL, Sherrill DL","doi":"10.1164/ajrccm.158.5.9710086","id":"enright-1998","pmid":"9817683","source":"Am J Respir Crit Care Med. 1998;158(5 Pt 1):1384-1387","title":"Reference equations for the six-minute walk in healthy adults","url":"https://doi.org/10.1164/ajrccm.158.5.9710086"},"formula_expression":"male: 6MWD_m = 7.57 × height_cm − 5.02 × age − 1.76 × weight_kg − 309; female: 6MWD_m = 2.11 × height_cm − 2.29 × weight_kg − 5.78 × age + 667; LLN_m = predicted_m − 153 (male) or predicted_m − 139 (female)","purpose":"Compute Enright 1998 predicted six-minute walk distance and lower limit of normal from sex, age, height, and weight using the Table 3 height/weight equations.","markdown_url":"https://magentlab.com/docs/6mwd.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"enright_1998"},{"name":"formula_expression","type":"string","description":"Exact Enright 1998 Table 3 height/weight expressions used"},{"name":"sex","type":"string","description":"female or male"},{"name":"age_years","type":"integer","description":"Age in years used"},{"name":"height_cm","type":"number","description":"Normalized height in cm"},{"name":"weight_kg","type":"number","description":"Normalized weight in kg"},{"name":"predicted_m","type":"number","description":"Predicted 6MWD in meters, 1 decimal"},{"name":"lln_m","type":"number","description":"Lower limit of normal in meters (predicted_m minus 153 men or 139 women), 1 decimal"},{"name":"walked_m","type":"number","description":"Walked distance in meters when walked_m was supplied. Omitted otherwise."},{"name":"percent_predicted","type":"number","description":"walked_m / predicted_m × 100, 1 decimal, when walked_m was supplied. Omitted otherwise."},{"name":"citation","type":"object","description":"Enright and Sherrill 1998 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"50","height_cm":"170","sex":"male","weight_kg":"70"},{"age":"50","height_cm":"170","sex":"male","weight_kg":"70"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/6mwd","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/6mwd?sex=male&age=50&height_cm=170&weight_kg=70","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/6mwd","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/bode","description":"Celli 2004 BODE index from BMI (≤21 → 1), FEV1 % predicted (0–3), MMRC dyspnea (0–3), and 6-minute walk in meters (0–3). Returns a 0–10 total and quartile 1–4 (0–2 / 3–4 / 5–6 / 7–10). Deterministic published points with citation. Not a GOLD stage and not a transplant listing.","parameters":[{"in":"query","name":"bmi_kg_m2","type":"number","description":"Body-mass index in kg/m^2 (10-80). Caller-supplied; magent does not compute BMI from height and weight. Celli 2004: >21 scores 0; <=21 scores 1.","required":true,"example":"24"},{"in":"query","name":"fev1_percent_predicted","type":"number","description":"FEV1 percent predicted (10-150). Celli 2004 Table 2: >=65 scores 0; 50-64 scores 1; 36-49 scores 2; <=35 scores 3.","required":true,"example":"70"},{"in":"query","name":"mmrc","type":"integer","description":"Modified Medical Research Council dyspnea grade as an integer 0-4 (Celli 2004). 0-1 scores 0; 2 scores 1; 3 scores 2; 4 scores 3. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"six_minute_walk_m","type":"number","description":"Six-minute walk distance in meters (0-1000). Celli 2004 Table 2: >=350 scores 0; 250-349 scores 1; 150-249 scores 2; <=149 scores 3.","required":true,"example":"400"}],"errors":[{"code":"invalid_bmi_kg_m2","message":"bmi_kg_m2 must be a number from 10 to 80. Returned before settlement; you are not charged.","status":400},{"code":"invalid_fev1_percent","message":"fev1_percent_predicted must be a number from 10 to 150. Returned before settlement; you are not charged.","status":400},{"code":"invalid_mmrc","message":"mmrc must be an integer from 0 to 4. Returned before settlement; you are not charged.","status":400},{"code":"invalid_six_minute_walk_m","message":"six_minute_walk_m must be a number from 0 to 1000. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/bode","citation":{"authors":"Celli BR, Cote CG, Marin JM, et al.","doi":"10.1056/NEJMoa021322","id":"celli-2004","pmid":"14999112","source":"N Engl J Med. 2004;350(10):1005-1012","title":"The body-mass index, airflow obstruction, dyspnea, and exercise capacity index in chronic obstructive pulmonary disease","url":"https://doi.org/10.1056/NEJMoa021322"},"formula_expression":"BODE = bmi_points + fev1_points + mmrc_points + walk_points; BMI <=21 -> 1 else 0; FEV1% >=65 -> 0, 50-64 -> 1, 36-49 -> 2, <=35 -> 3; MMRC 0-1 -> 0, 2 -> 1, 3 -> 2, 4 -> 3; 6MWD m >=350 -> 0, 250-349 -> 1, 150-249 -> 2, <=149 -> 3; quartiles 0-2 / 3-4 / 5-6 / 7-10; max 10","purpose":"Sum Celli 2004 BODE points from BMI, FEV1 percent predicted, MMRC dyspnea, and 6-minute walk distance.","markdown_url":"https://magentlab.com/docs/bode.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"bode"},{"name":"formula_expression","type":"string","description":"Exact Celli 2004 expression"},{"name":"score","type":"integer","description":"BODE points 0-10"},{"name":"max_score","type":"integer","description":"Always 10"},{"name":"quartile","type":"integer","description":"Celli 2004 quartile 1 (0-2), 2 (3-4), 3 (5-6), or 4 (7-10). Not a GOLD stage."},{"name":"bmi_kg_m2","type":"number","description":"Caller-supplied BMI in kg/m^2"},{"name":"fev1_percent_predicted","type":"number","description":"FEV1 percent predicted used"},{"name":"mmrc","type":"integer","description":"Caller-assigned MMRC grade 0-4"},{"name":"six_minute_walk_m","type":"number","description":"Six-minute walk distance in meters"},{"name":"components","type":"array","description":"Per-factor points for bmi, fev1, mmrc, and six_minute_walk"},{"name":"citation","type":"object","description":"Celli et al. NEJM 2004 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"bmi_kg_m2":"24","fev1_percent_predicted":"70","mmrc":"0","six_minute_walk_m":"400"},{"bmi_kg_m2":"24","fev1_percent_predicted":"70","mmrc":"0","six_minute_walk_m":"400"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/bode","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/bode?bmi_kg_m2=24&fev1_percent_predicted=70&mmrc=0&six_minute_walk_m=400","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/bode","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/cat","description":"Jones 2009 COPD Assessment Test (CAT): eight caller-assigned integers 0-5 (cough, phlegm, chest tightness, breathlessness, activities, confidence, sleep, energy). Sum 0-40. magent does not interview. Jones 2009 printed no GOLD 0-10/11-20/21-30/31-40 impact bands; later website cutoffs are not applied. Not a diagnosis, not GOLD ABE, not BODE, and not a medical device.","parameters":[{"in":"query","name":"cough","type":"integer","description":"Caller-assigned Jones 2009 CAT cough (integer 0-5): 0 I never cough to 5 I cough all the time. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"phlegm","type":"integer","description":"Caller-assigned Jones 2009 CAT phlegm (integer 0-5): 0 I have no phlegm (mucus) in my chest at all to 5 my chest is completely full of phlegm (mucus). magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"chest_tightness","type":"integer","description":"Caller-assigned Jones 2009 CAT chest tightness (integer 0-5): 0 my chest does not feel tight at all to 5 my chest feels very tight. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"breathlessness","type":"integer","description":"Caller-assigned Jones 2009 CAT breathlessness (integer 0-5): 0 when I walk up a hill or one flight of stairs I am not breathless to 5 when I walk up a hill or one flight of stairs I am very breathless. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"activities","type":"integer","description":"Caller-assigned Jones 2009 CAT activities (integer 0-5): 0 I am not limited doing any activities at home to 5 I am very limited doing activities at home. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"confidence","type":"integer","description":"Caller-assigned Jones 2009 CAT confidence (integer 0-5): 0 I am confident leaving my home despite my lung condition to 5 I am not at all confident leaving my home because of my lung condition. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"sleep","type":"integer","description":"Caller-assigned Jones 2009 CAT sleep (integer 0-5): 0 I sleep soundly to 5 I don't sleep soundly because of my lung condition. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"energy","type":"integer","description":"Caller-assigned Jones 2009 CAT energy (integer 0-5): 0 I have lots of energy to 5 I have no energy at all. magent does not interview the patient.","required":true,"example":"0"}],"errors":[{"code":"invalid_cat","message":"COPD Assessment Test needs the eight Jones 2009 items each as an integer 0-5. Returned before settlement; you are not charged.","status":400},{"code":"invalid_cat_item","message":"each CAT item must be an integer from 0 to 5 (Jones 2009). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/cat","citation":{"authors":"Jones PW, Harding G, Berry P, Wiklund I, Chen WH, Kline Leidy N","doi":"10.1183/09031936.00102509","id":"jones-2009","pmid":"19720809","source":"Eur Respir J. 2009;34(3):648-654","title":"Development and first validation of the COPD Assessment Test","url":"https://doi.org/10.1183/09031936.00102509"},"formula_expression":"CAT = cough + phlegm + chest_tightness + breathlessness + activities + confidence + sleep + energy; each caller-assigned 0-5; Jones 2009 eight items; max 40; no GOLD 0-10 / 11-20 / 21-30 / 31-40 impact bands","purpose":"Sum eight caller-assigned Jones 2009 CAT items (each integer 0-5) and return the published 0-40 total. Does not apply later GOLD CAT impact bands.","markdown_url":"https://magentlab.com/docs/cat.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"cat"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Jones 2009 sum of eight caller-assigned 0-5 items (total 0-40)"},{"name":"max_score","type":"integer","description":"Always 40"},{"name":"components","type":"array","description":"Per-item caller-assigned points"},{"name":"citation","type":"object","description":"Jones Eur Respir J 2009 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"activities":"0","breathlessness":"0","chest_tightness":"0","confidence":"0","cough":"0","energy":"0","phlegm":"0","sleep":"0"},{"activities":"0","breathlessness":"0","chest_tightness":"0","confidence":"0","cough":"0","energy":"0","phlegm":"0","sleep":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/cat","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/cat?cough=0&phlegm=0&chest_tightness=0&breathlessness=0&activities=0&confidence=0&sleep=0&energy=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/cat","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/mmrc","description":"Mahler 1988 modified Medical Research Council (mMRC) dyspnea grade 0-4 as assigned by the caller. Returns the grade, score (same as grade), max 4, and published wording (breathless only with strenuous exercise through too breathless to leave the house or breathless when dressing). Not GOLD ABE groups, not a BODE index, and not Bestall MRC grades 1-5. magent does not examine the patient.","parameters":[{"in":"query","name":"mmrc","type":"integer","description":"Mahler 1988 modified MRC dyspnea grade 0-4 as assigned by the caller (0 breathless only with strenuous exercise; 1 short of breath when hurrying on the level or walking up a slight hill; 2 walks slower than people of the same age on the level because of breathlessness, or has to stop for breath when walking at own pace on the level; 3 stops for breath after walking about 100 yards or after a few minutes on the level; 4 too breathless to leave the house, or breathless when dressing or undressing). Not Bestall MRC 1-5. magent does not examine the patient.","required":true,"example":"0"}],"errors":[{"code":"invalid_mmrc","message":"mmrc must be an integer from 0 to 4. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/mmrc","citation":{"authors":"Mahler DA, Wells CK","doi":"10.1378/chest.93.3.580","id":"mahler-1988","pmid":"3342669","source":"Chest. 1988;93(3):580-586","title":"Evaluation of clinical methods for rating dyspnea","url":"https://doi.org/10.1378/chest.93.3.580"},"formula_expression":"modified MRC (mMRC) grade 0-4 as assigned by the caller; Mahler 1988 (not Bestall MRC 1-5)","purpose":"Return the Mahler 1988 modified Medical Research Council (mMRC) dyspnea grade 0-4 from a caller-assigned integer, with the published grade wording.","markdown_url":"https://magentlab.com/docs/mmrc.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"mmrc"},{"name":"formula_expression","type":"string","description":"Published grade rule"},{"name":"mmrc","type":"integer","description":"Caller-assigned modified MRC grade 0-4"},{"name":"score","type":"integer","description":"Same as mmrc"},{"name":"max_score","type":"integer","description":"4"},{"name":"description","type":"string","description":"Mahler 1988 wording for that grade"},{"name":"components","type":"array","description":"mmrc component"},{"name":"citation","type":"object","description":"Mahler and Wells 1988"},{"name":"disclaimer","type":"string","description":"Not a medical device"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"mmrc":"0"},{"mmrc":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/mmrc","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/mmrc?mmrc=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/mmrc","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/gap-index","description":"Ley 2012 GAP index (points) from sex (male 1), age (≤60 → 0, 61–65 → 1, >65 → 2), FVC % predicted (>75 → 0, 50–75 → 1, <50 → 2), and DLCO % predicted (>55 → 0, 36–55 → 1, ≤35 → 2; cannot perform → 3). Returns a 0–8 total and stage 1–3 (0–3 / 4–5 / 6–8). Deterministic published points with citation. Not a transplant listing and not a continuous GAP calculator.","parameters":[{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"Sex (female or male). Ley 2012: female scores 0; male scores 1.","required":true,"example":"female"},{"in":"query","name":"age","type":"integer","description":"Age in years (integer 18-120). Ley 2012: <=60 scores 0; 61-65 scores 1; >65 scores 2.","required":true,"example":"55"},{"in":"query","name":"fvc_percent_predicted","type":"number","description":"FVC percent predicted (10-150). Ley 2012: >75 scores 0; 50-75 scores 1; <50 scores 2. 75.0 scores 1.","required":true,"example":"80"},{"in":"query","name":"dlco_percent_predicted","type":"number","description":"DLCO percent predicted (1-150). Provide this or dlco_cannot_perform=true, not both. Ley 2012: >55 scores 0; 36-55 scores 1; <=35 scores 2.","required":false,"example":"60"},{"in":"query","name":"dlco_cannot_perform","type":"boolean","description":"true when DLCO cannot be performed (Ley 2012 scores 3). Provide this or dlco_percent_predicted, not both.","required":false,"example":"true"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_fvc_percent","message":"fvc_percent_predicted must be a number from 10 to 150. Returned before settlement; you are not charged.","status":400},{"code":"invalid_dlco_percent","message":"dlco_percent_predicted must be a number from 1 to 150. Returned before settlement; you are not charged.","status":400},{"code":"invalid_gap_dlco","message":"provide dlco_percent_predicted or dlco_cannot_perform=true, not both (Ley 2012). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/gap-index","citation":{"authors":"Ley B, Ryerson CJ, Vittinghoff E, et al.","doi":"10.7326/0003-4819-156-10-201205150-00004","id":"ley-2012","pmid":"22586007","source":"Ann Intern Med. 2012;156(10):684-691","title":"A multidimensional index and staging system for idiopathic pulmonary fibrosis","url":"https://doi.org/10.7326/0003-4819-156-10-201205150-00004"},"formula_expression":"GAP = sex_points + age_points + fvc_points + dlco_points; female 0 male 1; age <=60 -> 0, 61-65 -> 1, >65 -> 2; FVC% >75 -> 0, 50-75 -> 1, <50 -> 2; DLCO% >55 -> 0, 36-55 -> 1, <=35 -> 2, cannot perform -> 3; stages I 0-3 / II 4-5 / III 6-8; max 8","purpose":"Sum Ley 2012 GAP index points from sex, age, FVC percent predicted, and DLCO percent predicted or cannot-perform.","markdown_url":"https://magentlab.com/docs/gap-index.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"gap_index"},{"name":"formula_expression","type":"string","description":"Exact Ley 2012 GAP index expression"},{"name":"score","type":"integer","description":"GAP index points 0-8"},{"name":"max_score","type":"integer","description":"Always 8"},{"name":"gap_stage","type":"integer","description":"Ley 2012 stage 1 (0-3), 2 (4-5), or 3 (6-8). Not a transplant listing."},{"name":"sex","type":"string","description":"female or male used"},{"name":"age_years","type":"integer","description":"Age in years used"},{"name":"fvc_percent_predicted","type":"number","description":"FVC percent predicted used"},{"name":"dlco_percent_predicted","type":"number","description":"DLCO percent predicted used, or null when cannot perform"},{"name":"dlco_cannot_perform","type":"boolean","description":"true when Ley 2012 cannot-perform DLCO (3 points) was used"},{"name":"components","type":"array","description":"Per-factor points for sex, age, fvc, and dlco"},{"name":"citation","type":"object","description":"Ley et al. Ann Intern Med 2012 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"55","dlco_percent_predicted":"60","fvc_percent_predicted":"80","sex":"female"},{"age":"55","dlco_percent_predicted":"60","fvc_percent_predicted":"80","sex":"female"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/gap-index","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/gap-index?sex=female&age=55&fvc_percent_predicted=80&dlco_percent_predicted=60","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/gap-index","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/du-bois","description":"du Bois 2011 abbreviated four-predictor IPF score from age (<60 → 0, 60–69 → 4, ≥70 → 8), 24-week respiratory hospitalization (true → 14), FVC % predicted (<50 → 18, 51–65 → 13, 66–79 → 8, >80 → 0; 50 and 80 unpublished), and 24-week FVC % change (≤ −10 → 21, > −10 and < −4.9 → 10, ≥ −4.9 → 0). Returns a 0–61 total only. Does not interpolate Table 4 risk percents. Not GAP and not a transplant listing.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (integer 18-120). du Bois 2011 Table 4: <60 scores 0; 60-69 scores 4; >=70 scores 8.","required":true,"example":"70"},{"in":"query","name":"respiratory_hospitalization","type":"boolean","description":"24-week history of respiratory hospitalization (true or false). du Bois 2011 Table 4: false scores 0; true scores 14.","required":true,"example":"false"},{"in":"query","name":"fvc_percent_predicted","type":"number","description":"FVC percent predicted (10-150). du Bois 2011 Table 4: <50 scores 18; 51-65 scores 13; 66-79 scores 8; >80 scores 0. Exactly 50 or 80 is unpublished.","required":true,"example":"55"},{"in":"query","name":"fvc_change_24wk","type":"number","description":"24-week change in FVC percent predicted, in percentage points (-50 to 50). du Bois 2011 Table 4: <= -10 scores 21; > -10 and < -4.9 scores 10; >= -4.9 scores 0.","required":true,"example":"-7"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_fvc_percent","message":"fvc_percent_predicted must be a number from 10 to 150. Returned before settlement; you are not charged.","status":400},{"code":"invalid_du_bois_fvc","message":"fvc_percent_predicted must be <50, 51-65, 66-79, or >80 (du Bois 2011 Table 4; 50 and 80 are not published cells). Returned before settlement; you are not charged.","status":400},{"code":"invalid_fvc_change","message":"fvc_change_24wk must be a number from -50 to 50 (du Bois 2011 24-week change in % predicted FVC). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/du-bois","citation":{"authors":"du Bois RM, Weycker D, Albera C, Bradford WZ, Costabel U, Kartashov A, Lancaster L, Noble PW, Raghu G, Sahn SA, Szwarcberg J, Thomeer M, Valeyre D, King TE Jr","doi":"10.1164/rccm.201011-1790OC","id":"du-bois-2011","pmid":"21616999","source":"Am J Respir Crit Care Med. 2011;184(4):459-466","title":"Ascertainment of individual risk of mortality for patients with idiopathic pulmonary fibrosis","url":"https://doi.org/10.1164/rccm.201011-1790OC"},"formula_expression":"du_bois = age_points + hospitalization_points + fvc_points + fvc_change_points; age <60 -> 0, 60-69 -> 4, >=70 -> 8; respiratory_hospitalization false -> 0, true -> 14; FVC% <50 -> 18, 51-65 -> 13, 66-79 -> 8, >80 -> 0 (50 and 80 unpublished); 24-wk FVC% change <= -10 -> 21, > -10 and < -4.9 -> 10, >= -4.9 -> 0; max 61; score only","purpose":"Sum du Bois 2011 Table 4 points from age, 24-week respiratory hospitalization, FVC percent predicted, and 24-week change in FVC percent predicted (abbreviated four-predictor model).","markdown_url":"https://magentlab.com/docs/du-bois.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"du_bois"},{"name":"formula_expression","type":"string","description":"Exact du Bois 2011 four-predictor Table 4 expression"},{"name":"score","type":"integer","description":"du Bois 2011 Table 4 points 0-61"},{"name":"max_score","type":"integer","description":"Always 61"},{"name":"age_years","type":"integer","description":"Age in years used"},{"name":"respiratory_hospitalization","type":"boolean","description":"Caller-assigned 24-week respiratory hospitalization flag"},{"name":"fvc_percent_predicted","type":"number","description":"FVC percent predicted used"},{"name":"fvc_change_24wk","type":"number","description":"24-week change in FVC percent predicted, in percentage points"},{"name":"components","type":"array","description":"Per-factor points for age, hospitalization, fvc, and fvc_change"},{"name":"citation","type":"object","description":"du Bois et al. Am J Respir Crit Care Med 2011 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"70","fvc_change_24wk":"-7","fvc_percent_predicted":"55","respiratory_hospitalization":"false"},{"age":"70","fvc_change_24wk":"-7","fvc_percent_predicted":"55","respiratory_hospitalization":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/du-bois","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/du-bois?age=70&respiratory_hospitalization=false&fvc_percent_predicted=55&fvc_change_24wk=-7","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/du-bois","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/decaf","description":"Steer 2012 DECAF: eMRCD 1-4 → 0, 5a → 1, 5b → 2; eosinophils <0.05 ×10^9/L → 1 (0.05 does not score); caller-assigned consolidation → 1; arterial pH <7.30 → 1 (7.30 does not score); atrial fibrillation → 1. Returns a 0–6 total and band 0-1 / 2 / 3-6. Deterministic published points with citation. Not an early-discharge or escalation protocol and not a medical device.","parameters":[{"in":"query","name":"emrcd","type":"string","enum":["1-4","5a","5b"],"description":"Steer 2012 extended MRC dyspnoea as assigned by the caller. 1-4 scores 0; 5a scores 1; 5b scores 2. magent does not interview the patient.","required":true,"example":"1-4"},{"in":"query","name":"eosinophils_10e9_l","type":"number","description":"Blood eosinophil count ×10^9/L (0-5). Steer 2012: <0.05 scores 1; 0.05 does not score.","required":true,"example":"0.10"},{"in":"query","name":"consolidation","type":"boolean","description":"Chest radiograph consolidation as assigned by the caller (Steer 2012 C). true or false. 1 point if true. magent does not interpret radiographs.","required":true,"example":"false"},{"in":"query","name":"arterial_ph","type":"number","description":"Arterial pH (6.80-7.80). Steer 2012: <7.30 scores 1; 7.30 does not score.","required":true,"example":"7.40"},{"in":"query","name":"atrial_fibrillation","type":"boolean","description":"Atrial fibrillation as assigned by the caller (Steer 2012 F). true or false. 1 point if true. magent does not interpret the ECG.","required":true,"example":"false"}],"errors":[{"code":"invalid_emrcd","message":"emrcd must be 1-4, 5a, or 5b (Steer 2012 extended MRC dyspnoea). Returned before settlement; you are not charged.","status":400},{"code":"invalid_eosinophils","message":"eosinophils_10e9_l must be a number from 0 to 5 (Steer 2012). Returned before settlement; you are not charged.","status":400},{"code":"invalid_arterial_ph","message":"arterial_ph must be a number from 6.80 to 7.80. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/decaf","citation":{"authors":"Steer J, Gibson J, Bourke SC","doi":"10.1136/thoraxjnl-2012-202103","id":"steer-2012","pmid":"22895999","source":"Thorax. 2012;67(11):970-976","title":"The DECAF Score: predicting hospital mortality in exacerbations of chronic obstructive pulmonary disease","url":"https://doi.org/10.1136/thoraxjnl-2012-202103"},"formula_expression":"DECAF = emrcd_points + eosinopenia + consolidation + acidemia + atrial_fibrillation; eMRCD 1-4 -> 0, 5a -> 1, 5b -> 2; eosinophils_10e9_l < 0.05 -> 1 (0.05 does not score); consolidation true -> 1; arterial_ph < 7.30 -> 1 (7.30 does not score); atrial_fibrillation true -> 1; bands 0-1 / 2 / 3-6; max 6","purpose":"Sum Steer 2012 DECAF points from extended MRC dyspnoea, eosinophils, chest radiograph consolidation, arterial pH, and atrial fibrillation.","markdown_url":"https://magentlab.com/docs/decaf.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"decaf"},{"name":"formula_expression","type":"string","description":"Exact Steer 2012 expression"},{"name":"score","type":"integer","description":"DECAF points 0-6"},{"name":"max_score","type":"integer","description":"Always 6"},{"name":"decaf_band","type":"string","description":"Steer 2012 band 0-1 (low), 2 (moderate), or 3-6 (high). A band, not a mortality percent."},{"name":"emrcd","type":"string","description":"Caller-assigned eMRCD: 1-4, 5a, or 5b"},{"name":"eosinophils_10e9_l","type":"number","description":"Eosinophil count ×10^9/L used"},{"name":"consolidation","type":"boolean","description":"Caller-assigned chest radiograph consolidation"},{"name":"arterial_ph","type":"number","description":"Arterial pH used"},{"name":"atrial_fibrillation","type":"boolean","description":"Caller-assigned atrial fibrillation"},{"name":"components","type":"array","description":"Per-factor points for emrcd, eosinopenia, consolidation, acidemia, and AF"},{"name":"citation","type":"object","description":"Steer et al. Thorax 2012 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"arterial_ph":"7.40","atrial_fibrillation":"false","consolidation":"false","emrcd":"1-4","eosinophils_10e9_l":"0.10"},{"arterial_ph":"7.40","atrial_fibrillation":"false","consolidation":"false","emrcd":"1-4","eosinophils_10e9_l":"0.10"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/decaf","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/decaf?emrcd=1-4&eosinophils_10e9_l=0.10&consolidation=false&arterial_ph=7.40&atrial_fibrillation=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/decaf","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/bap-65","description":"BAP-65 (Tabak 2009) class I–V for acute exacerbation of COPD. Three caller-assigned main factors: BUN >25 mg/dL, altered mental status (GCS <14 or disoriented/stupor/coma), and pulse >109/min. Age >65 splits class I from II only when zero main factors are present; age is not a fourth additive point. magent does not compute GCS, BUN, or pulse. Not a medical device and not a ventilation or ICU-admission order.","parameters":[{"in":"query","name":"bun_gt_25","type":"boolean","description":"BUN >25 mg/dL (strict greater than; 25 does not meet). true or false as assigned by the caller. magent does not compute BUN.","required":true,"example":"false"},{"in":"query","name":"altered_mental_status","type":"boolean","description":"GCS <14 or physician designation of disoriented, stupor, or coma (Tabak 2009). true or false as assigned by the caller. magent does not compute GCS.","required":true,"example":"false"},{"in":"query","name":"pulse_gt_109","type":"boolean","description":"Pulse >109/min (strict greater than; 109 does not meet). true or false as assigned by the caller. magent does not compute pulse.","required":true,"example":"false"},{"in":"query","name":"age_gt_65","type":"boolean","description":"Age >65 years (strict greater than). Used only when zero of the three main factors are present, to split class I from II. true or false as assigned by the caller. magent does not compute age.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/bap-65","citation":{"authors":"Tabak YP, Sun X, Johannes RS, Gupta V, Shorr AF","doi":"10.1001/archinternmed.2009.270","id":"tabak-2009","pmid":"19786679","source":"Arch Intern Med. 2009;169(17):1595-1602","title":"Mortality and need for mechanical ventilation in acute exacerbations of chronic obstructive pulmonary disease: development and validation of a simple risk score","url":"https://doi.org/10.1001/archinternmed.2009.270"},"formula_expression":"class I = 0 main factors and age ≤65; II = 0 main factors and age >65; III = 1 main factor; IV = 2 main factors; V = 3 main factors (BUN >25 mg/dL, GCS <14 or disoriented/stupor/coma, pulse >109/min); age is not a 4th additive point","purpose":"Apply Tabak 2009 BAP-65 and return class I–V from three caller-assigned main factors, using age >65 only to split class I from II when zero main factors are present.","markdown_url":"https://magentlab.com/docs/bap-65.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"bap_65"},{"name":"formula_expression","type":"string","description":"Tabak 2009: class I/II from zero main factors plus age; III/IV/V from 1/2/3 main factors"},{"name":"bap65_class","type":"string","description":"Tabak 2009 class I, II, III, IV, or V. A class, not a ventilation or ICU-admission order."},{"name":"main_factor_count","type":"integer","description":"Count of the three main factors (BUN >25, altered mental status, pulse >109). 0-3. Age is not counted."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met for bun_gt_25, altered_mental_status, pulse_gt_109, and age_gt_65"},{"name":"citation","type":"object","description":"Tabak 2009 Arch Intern Med citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age_gt_65":"false","altered_mental_status":"false","bun_gt_25":"false","pulse_gt_109":"false"},{"age_gt_65":"false","altered_mental_status":"false","bun_gt_25":"false","pulse_gt_109":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/bap-65","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/bap-65?bun_gt_25=false&altered_mental_status=false&pulse_gt_109=false&age_gt_65=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/bap-65","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/stop-bang","description":"Chung 2008 Appendix 2 STOP-Bang OSA screen. Four caller-assigned STOP flags (loud snoring heard through closed doors, daytime tiredness, observed stop-breathing, hypertension) plus computed BANG: BMI >35, age >50, neck >40 cm, male; each 1; max 8. BMI 35, age 50, and neck 40 cm do not score. Returns bands 0-2 and >=3. Not Chung 2012 three-tier, not a medical device, and not a sleep-study order.","parameters":[{"in":"query","name":"snoring","type":"boolean","description":"Loud snoring heard through closed doors (Chung 2008 Appendix 2 STOP). true or false. Caller-assigned. 1 point if true.","required":true,"example":"false"},{"in":"query","name":"tired","type":"boolean","description":"Daytime tiredness, fatigue, or sleepiness (Chung 2008 Appendix 2 STOP). true or false. Caller-assigned. 1 point if true.","required":true,"example":"false"},{"in":"query","name":"observed_apnea","type":"boolean","description":"Anyone observed the patient stop breathing during sleep (Chung 2008 Appendix 2 STOP). true or false. Caller-assigned. 1 point if true.","required":true,"example":"false"},{"in":"query","name":"hypertension","type":"boolean","description":"Has or is being treated for high blood pressure (Chung 2008 Appendix 2 STOP). true or false. Caller-assigned. 1 point if true.","required":true,"example":"false"},{"in":"query","name":"bmi_kg_m2","type":"number","description":"Body-mass index in kg/m^2 (10-80). Chung 2008 Appendix 2 BANG: scores 1 when >35. BMI 35 does not score. Caller-supplied; magent does not compute BMI from height and weight.","required":true,"example":"30"},{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Chung 2008 Appendix 2 BANG: scores 1 when >50. Age 50 does not score.","required":true,"example":"40"},{"in":"query","name":"neck_cm","type":"number","description":"Neck circumference in cm (20-80). Chung 2008 Appendix 2 BANG: scores 1 when >40. Neck 40 does not score.","required":true,"example":"38"},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"female or male. Chung 2008 Appendix 2 BANG: male scores 1. Female scores 0.","required":true,"example":"female"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_bmi_kg_m2","message":"bmi_kg_m2 must be a number from 10 to 80. Returned before settlement; you are not charged.","status":400},{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_neck_cm","message":"neck_cm must be a number from 20 to 80 (Chung 2008 STOP-Bang). Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/stop-bang","citation":{"authors":"Chung F, Yegneswaran B, Liao P, et al.","doi":"10.1097/ALN.0b013e31816d83e4","id":"chung-2008","pmid":"18431116","source":"Anesthesiology. 2008;108(5):812-821","title":"STOP questionnaire: a tool to screen patients for obstructive sleep apnea","url":"https://doi.org/10.1097/ALN.0b013e31816d83e4"},"formula_expression":"STOP-Bang = snoring + tired + observed_apnea + hypertension + (bmi_kg_m2>35) + (age>50) + (neck_cm>40) + male; each 1 if true; max 8; bands 0-2 / >=3","purpose":"Compute Chung 2008 Appendix 2 STOP-Bang from four STOP flags and computed BANG (BMI >35, age >50, neck >40 cm, male) and return the published 0-2 / >=3 OSA-risk band.","markdown_url":"https://magentlab.com/docs/stop-bang.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"stop_bang"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"STOP-Bang points 0-8"},{"name":"max_score","type":"integer","description":"8"},{"name":"stop_bang_band","type":"string","description":"Chung 2008 Appendix 2 OSA-risk band: 0-2 (yes to fewer than three items) or >=3 (yes to three or more). Not Chung 2012 0-2/3-4/5-8. Percents are not returned."},{"name":"snoring","type":"boolean","description":"STOP snoring flag used"},{"name":"tired","type":"boolean","description":"STOP tired flag used"},{"name":"observed_apnea","type":"boolean","description":"STOP observed-apnea flag used"},{"name":"hypertension","type":"boolean","description":"STOP hypertension flag used"},{"name":"bmi_kg_m2","type":"number","description":"BMI used for the >35 criterion"},{"name":"age_years","type":"integer","description":"Age used for the >50 criterion"},{"name":"neck_cm","type":"number","description":"Neck circumference used for the >40 criterion"},{"name":"sex","type":"string","description":"female or male"},{"name":"components","type":"array","description":"Per-item points"},{"name":"citation","type":"object","description":"Chung 2008 Anesthesiology citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"40","bmi_kg_m2":"30","hypertension":"false","neck_cm":"38","observed_apnea":"false","sex":"female","snoring":"false","tired":"false"},{"age":"40","bmi_kg_m2":"30","hypertension":"false","neck_cm":"38","observed_apnea":"false","sex":"female","snoring":"false","tired":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/stop-bang","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/stop-bang?snoring=false&tired=false&observed_apnea=false&hypertension=false&bmi_kg_m2=30&age=40&neck_cm=38&sex=female","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/stop-bang","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/hacor","description":"Duan 2017 HACOR (ESM Table 2): HR ≤120 → 0, ≥121 → 1; pH ≥7.35 → 0, 7.30–7.34 → 2, 7.25–7.29 → 3, <7.25 → 4; GCS 15 → 0, 13–14 → 2, 11–12 → 5, ≤10 → 10; P/F ≥201 → 0, 176–200 → 2, 151–175 → 3, 126–150 → 4, 101–125 → 5, ≤100 → 6; RR ≤30 → 0, 31–35 → 1, 36–40 → 2, 41–45 → 3, ≥46 → 4. Max 25. Low ≤5, high >5. Not an intubation or NIV-failure order. magent does not read an ABG, GCS the patient, or a ventilator.","parameters":[{"in":"query","name":"heart_rate_bpm","type":"integer","description":"Heart rate in beats/min (integer 30-220). Duan 2017 ESM Table 2: ≤120 → 0, ≥121 → 1.","required":true,"example":"80"},{"in":"query","name":"ph","type":"number","description":"Arterial pH (6.80-7.80). Duan 2017 ESM Table 2: ≥7.35 → 0, 7.30-7.34 → 2, 7.25-7.29 → 3, <7.25 → 4. magent does not read an ABG.","required":true,"example":"7.40"},{"in":"query","name":"gcs","type":"integer","description":"Total Glasgow Coma Scale 3-15 as assigned by the caller. Duan 2017 ESM Table 2: 15 → 0, 13-14 → 2, 11-12 → 5, ≤10 → 10. Not a GCS 10-12 / ≤9 table. magent does not GCS the patient.","required":true,"example":"15"},{"in":"query","name":"pf_ratio","type":"number","description":"PaO2/FiO2 ratio (20-800). Duan 2017 ESM Table 2: ≥201 → 0, 176-200 → 2, 151-175 → 3, 126-150 → 4, 101-125 → 5, ≤100 → 6. magent does not read an ABG or a ventilator.","required":true,"example":"300"},{"in":"query","name":"respiratory_rate","type":"integer","description":"Respiratory rate in breaths/min (integer 4-80). Duan 2017 ESM Table 2: ≤30 → 0, 31-35 → 1, 36-40 → 2, 41-45 → 3, ≥46 → 4.","required":true,"example":"18"}],"errors":[{"code":"invalid_heart_rate","message":"heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.","status":400},{"code":"invalid_ph","message":"ph must be a number from 6.80 to 7.80 (Duan 2017 HACOR). Returned before settlement; you are not charged.","status":400},{"code":"invalid_gcs_total","message":"gcs must be an integer from 3 to 15. Returned before settlement; you are not charged.","status":400},{"code":"invalid_pf_ratio","message":"pf_ratio must be a number from 20 to 800. Returned before settlement; you are not charged.","status":400},{"code":"invalid_respiratory_rate","message":"respiratory_rate must be an integer from 4 to 80. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/hacor","citation":{"authors":"Duan J, Han X, Bai L, Zhou L, Huang S","doi":"10.1007/s00134-016-4601-3","id":"duan-2017","pmid":"27812731","source":"Intensive Care Med. 2017;43(2):192-199","title":"Assessment of heart rate, acidosis, consciousness, oxygenation, and respiratory rate to predict noninvasive ventilation failure in hypoxemic patients","url":"https://doi.org/10.1007/s00134-016-4601-3"},"formula_expression":"HACOR = HR(≤120→0, ≥121→1) + pH(≥7.35→0, 7.30–7.34→2, 7.25–7.29→3, <7.25→4) + GCS(15→0, 13–14→2, 11–12→5, ≤10→10) + P/F(≥201→0, 176–200→2, 151–175→3, 126–150→4, 101–125→5, ≤100→6) + RR(≤30→0, 31–35→1, 36–40→2, 41–45→3, ≥46→4); Duan 2017 ESM Table 2; max 25; low ≤5, high >5","purpose":"Sum Duan 2017 HACOR (ESM Table 2) points from heart rate, pH, GCS, PaO2/FiO2, and respiratory rate and return low (≤5) or high (>5).","markdown_url":"https://magentlab.com/docs/hacor.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"hacor"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"HACOR points 0-25"},{"name":"max_score","type":"integer","description":"Always 25"},{"name":"hacor_band","type":"string","description":"low when score is ≤5, high when score is >5 (Duan 2017 comparison at 1 h of NIV). Not an intubation or NIV-failure order."},{"name":"heart_rate_bpm","type":"integer","description":"Heart rate used, bpm"},{"name":"ph","type":"number","description":"Arterial pH used"},{"name":"gcs","type":"integer","description":"Caller-assigned total GCS used"},{"name":"pf_ratio","type":"number","description":"PaO2/FiO2 used"},{"name":"respiratory_rate","type":"integer","description":"Respiratory rate used, breaths/min"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Duan 2017 Intensive Care Med citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"gcs":"15","heart_rate_bpm":"80","pf_ratio":"300","ph":"7.40","respiratory_rate":"18"},{"gcs":"15","heart_rate_bpm":"80","pf_ratio":"300","ph":"7.40","respiratory_rate":"18"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/hacor","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/hacor?heart_rate_bpm=80&ph=7.40&gcs=15&pf_ratio=300&respiratory_rate=18","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/hacor","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/nivo","description":"Hartley 2021 NIVO: consolidation, GCS ≤14, AF, and pH <7.25 score 1 each; time to acidaemia >12 h scores 2; eMRCD 1_to_4 → 0, 5a → 2, 5b → 3 (cannot score both). Returns 0–9 and Table 4 bands 0-2 / 3-4 / 5-6 / 7-9 with grouped in-hospital mortality 5.0 / 16.8 / 41.2 / 71.4%. Not HACOR, DECAF, APACHE II, or a weaning predictor. Not a medical device.","parameters":[{"in":"query","name":"chest_radiograph_consolidation","type":"boolean","description":"Chest radiograph consolidation as assigned by the caller (Hartley 2021). true or false. 1 point if true. magent does not interpret radiographs.","required":true,"example":"false"},{"in":"query","name":"gcs_le_14","type":"boolean","description":"GCS ≤14 prior to ventilation as assigned by the caller (Hartley 2021). true or false. 1 point if true. magent does not measure GCS.","required":true,"example":"false"},{"in":"query","name":"atrial_fibrillation","type":"boolean","description":"Persistent AF, new AF, or paroxysmal AF even if in sinus rhythm at NIV start (Hartley 2021). true or false. 1 point if true. magent does not interpret the ECG.","required":true,"example":"false"},{"in":"query","name":"ph_lt_7_25","type":"boolean","description":"Arterial pH <7.25 as assigned by the caller (Hartley 2021). true or false. 1 point if true. magent does not measure pH.","required":true,"example":"false"},{"in":"query","name":"time_to_acidaemia_gt_12h","type":"boolean","description":">12 h from hospital arrival to index acidaemia as assigned by the caller (Hartley 2021). true or false. 2 points if true. magent does not clock admission time.","required":true,"example":"false"},{"in":"query","name":"emrcd","type":"string","enum":["1_to_4","5a","5b"],"description":"Hartley 2021 extended MRC dyspnoea as assigned by the caller. 1_to_4 scores 0; 5a scores 2; 5b scores 3. 5a and 5b are mutually exclusive. magent does not interview the patient.","required":true,"example":"1_to_4"}],"errors":[{"code":"invalid_nivo_emrcd","message":"emrcd must be 1_to_4, 5a, or 5b (Hartley 2021 NIVO; 5a and 5b are mutually exclusive). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/nivo","citation":{"authors":"Hartley T, Lane ND, Steer J, et al.","doi":"10.1183/13993003.04042-2020","id":"hartley-2021","pmid":"33479109","source":"Eur Respir J. 2021;58(2):2004042","title":"The Noninvasive Ventilation Outcomes (NIVO) score: prediction of in-hospital mortality in exacerbations of COPD requiring assisted ventilation","url":"https://doi.org/10.1183/13993003.04042-2020"},"formula_expression":"NIVO = chest_radiograph_consolidation + gcs_le_14 + atrial_fibrillation + ph_lt_7_25 + time_to_acidaemia_gt_12h + emrcd; consolidation true -> 1; GCS <=14 prior to ventilation -> 1; AF (persistent, new, or paroxysmal even if sinus at NIV start) true -> 1; pH <7.25 -> 1; time from hospital arrival to index acidaemia >12 h -> 2; eMRCD 1_to_4 -> 0, 5a -> 2, 5b -> 3; cannot score both 5a and 5b; Hartley 2021 validation Table 4 bands 0-2 / 3-4 / 5-6 / 7-9; max 9","purpose":"Sum Hartley 2021 NIVO points from chest radiograph consolidation, GCS ≤14, atrial fibrillation, pH <7.25, time to acidaemia >12 h, and eMRCD, and return the validation Table 4 grouped in-hospital mortality band.","markdown_url":"https://magentlab.com/docs/nivo.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"nivo"},{"name":"formula_expression","type":"string","description":"Exact Hartley 2021 expression"},{"name":"score","type":"integer","description":"NIVO points 0-9"},{"name":"max_score","type":"integer","description":"Always 9"},{"name":"nivo_band","type":"string","description":"Hartley 2021 validation Table 4 grouped band: 0_to_2, 3_to_4, 5_to_6, or 7_to_9. Not a per-integer rate."},{"name":"in_hospital_mortality_percent","type":"number","description":"Hartley 2021 validation Table 4 grouped in-hospital mortality percent for that band (5.0 / 16.8 / 41.2 / 71.4). Not a per-integer percent."},{"name":"chest_radiograph_consolidation","type":"boolean","description":"Caller-assigned chest radiograph consolidation"},{"name":"gcs_le_14","type":"boolean","description":"Caller-assigned GCS ≤14 prior to ventilation"},{"name":"atrial_fibrillation","type":"boolean","description":"Caller-assigned atrial fibrillation (persistent, new, or paroxysmal)"},{"name":"ph_lt_7_25","type":"boolean","description":"Caller-assigned arterial pH <7.25"},{"name":"time_to_acidaemia_gt_12h","type":"boolean","description":"Caller-assigned >12 h from hospital arrival to index acidaemia"},{"name":"emrcd","type":"string","description":"Caller-assigned eMRCD: 1_to_4, 5a, or 5b"},{"name":"components","type":"array","description":"Per-factor points for the six Hartley 2021 NIVO items"},{"name":"citation","type":"object","description":"Hartley et al. Eur Respir J 2021 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"atrial_fibrillation":"false","chest_radiograph_consolidation":"false","emrcd":"1_to_4","gcs_le_14":"false","ph_lt_7_25":"false","time_to_acidaemia_gt_12h":"false"},{"atrial_fibrillation":"false","chest_radiograph_consolidation":"false","emrcd":"1_to_4","gcs_le_14":"false","ph_lt_7_25":"false","time_to_acidaemia_gt_12h":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/nivo","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/nivo?chest_radiograph_consolidation=false&gcs_le_14=false&atrial_fibrillation=false&ph_lt_7_25=false&time_to_acidaemia_gt_12h=false&emrcd=1_to_4","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/nivo","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/qcsi","description":"Haimovich 2020 qCSI (Table 2 bedside points): RR ≤22 → 0, 23–28 → 1, >28 → 2; SpO2 >92 → 0, 89–92 → 2, ≤88 → 5; O2 ≤2 L/min → 0, 3–4 → 4, 5–6 → 5. Max 12. Lowest SpO2 and nasal-cannula flow as assigned by the caller. Not a COVID-19 diagnosis, triage order, or the 12-variable CSI gradient-boosting model. Derivation excluded >6 L/min. magent does not measure vitals.","parameters":[{"in":"query","name":"respiratory_rate","type":"integer","description":"Respiratory rate in breaths/min (integer 4-80). Haimovich 2020 Table 2: ≤22 → 0, 23-28 → 1, >28 → 2. magent does not measure vitals.","required":true,"example":"16"},{"in":"query","name":"spo2_percent","type":"number","description":"Lowest SpO2 percent as assigned by the caller (50-100). Haimovich 2020 Table 2: >92 → 0, 89-92 → 2, ≤88 → 5. magent does not measure SpO2.","required":true,"example":"98"},{"in":"query","name":"oxygen_l_min","type":"number","description":"Nasal-cannula oxygen flow in L/min (0-6). Haimovich 2020 Table 2: ≤2 → 0, 3-4 → 4, 5-6 → 5. Derivation excluded >6 L/min. magent does not measure flow.","required":true,"example":"0"}],"errors":[{"code":"invalid_respiratory_rate","message":"respiratory_rate must be an integer from 4 to 80. Returned before settlement; you are not charged.","status":400},{"code":"invalid_spo2","message":"spo2_percent must be a number from 50 to 100. Returned before settlement; you are not charged.","status":400},{"code":"invalid_o2_flow_l_min","message":"oxygen_l_min must be a number from 0 to 6 (Haimovich 2020 qCSI; derivation excluded >6 L/min). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/qcsi","citation":{"authors":"Haimovich AD, Ravindra NG, Stoytchev S, Young HP, Wilson FP, van Dijk D, Schulz WL, Taylor RA","doi":"10.1016/j.annemergmed.2020.07.022","id":"haimovich-2020","pmid":"33012378","source":"Ann Emerg Med. 2020;76(4):442-453","title":"Development and Validation of the Quick COVID-19 Severity Index: A Prognostic Tool for Early Clinical Decompensation","url":"https://doi.org/10.1016/j.annemergmed.2020.07.022"},"formula_expression":"qCSI = RR(≤22→0, 23–28→1, >28→2) + SpO2(>92→0, 89–92→2, ≤88→5) + O2_L_min(≤2→0, 3–4→4, 5–6→5); Haimovich 2020 Table 2 bedside; max 12","purpose":"Sum Haimovich 2020 qCSI bedside points (Table 2) from respiratory rate, lowest SpO2, and nasal-cannula oxygen flow and return the integer total (max 12).","markdown_url":"https://magentlab.com/docs/qcsi.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"qcsi"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"qCSI points 0-12"},{"name":"max_score","type":"integer","description":"Always 12"},{"name":"respiratory_rate","type":"integer","description":"Respiratory rate used, breaths/min"},{"name":"spo2_percent","type":"number","description":"Caller-assigned lowest SpO2 used, %"},{"name":"oxygen_l_min","type":"number","description":"Caller-assigned nasal-cannula oxygen flow used, L/min"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Haimovich 2020 Ann Emerg Med citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"oxygen_l_min":"0","respiratory_rate":"16","spo2_percent":"98"},{"oxygen_l_min":"0","respiratory_rate":"16","spo2_percent":"98"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/qcsi","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/qcsi?respiratory_rate=16&spo2_percent=98&oxygen_l_min=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/qcsi","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/gold-copd","description":"GOLD 2017 spirometric grade (Vogelmeier executive summary). Post-bronchodilator FEV1/FVC < 0.70 defines obstruction; then GOLD 1 if FEV1 % predicted >= 80, GOLD 2 if 50 to <80, GOLD 3 if 30 to <50, GOLD 4 if <30. Ratio >= 0.70 returns not_obstructed even when FEV1 is low. Not GOLD ABE (no mMRC, CAT, or exacerbations). magent does not perform spirometry. Not a medical device or a diagnosis.","parameters":[{"in":"query","name":"fev1_percent_predicted","type":"number","description":"Post-bronchodilator FEV1 as percent of predicted (10-150). Used for GOLD 1-4 only when FEV1/FVC is < 0.70. magent does not perform spirometry.","required":true,"example":"85"},{"in":"query","name":"fev1_fvc_ratio","type":"number","description":"Post-bronchodilator FEV1/FVC as a fraction (0.20-1.00). Values < 0.70 are obstructed; 0.70 and above are not_obstructed with no GOLD 1-4. magent does not perform spirometry.","required":true,"example":"0.65"}],"errors":[{"code":"invalid_fev1_percent","message":"fev1_percent_predicted must be a number from 10 to 150. Returned before settlement; you are not charged.","status":400},{"code":"invalid_fev1_fvc_ratio","message":"fev1_fvc_ratio must be a number from 0.20 to 1.00 (post-bronchodilator). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/gold-copd","citation":{"authors":"Vogelmeier CF, Criner GJ, Martinez FJ, Anzueto A, Barnes PJ, Bourbeau J, Celli BR, Chen R, Decramer M, Fabbri LM, Frith P, Halpin DMG, López Varela MV, Nishimura M, Roche N, Rodriguez-Roisin R, Sin DD, Singh D, Stockley R, Vestbo J, Wedzicha JA, Agustí A","doi":"10.1183/13993003.00214-2017","id":"vogelmeier-2017","source":"Eur Respir J. 2017;49(3):1700214","title":"Global Strategy for the Diagnosis, Management, and Prevention of Chronic Obstructive Lung Disease 2017 Report. GOLD Executive Summary","url":"https://doi.org/10.1183/13993003.00214-2017"},"formula_expression":"If post-bronchodilator FEV1/FVC >= 0.70 then gold_grade is not_obstructed (no GOLD 1-4). If FEV1/FVC < 0.70: GOLD 1 (mild) FEV1 >= 80% predicted; GOLD 2 (moderate) 50% <= FEV1 < 80%; GOLD 3 (severe) 30% <= FEV1 < 50%; GOLD 4 (very severe) FEV1 < 30% (Vogelmeier 2017 GOLD executive summary)","purpose":"Apply the 2017 GOLD executive summary spirometric classification: obstruction when post-bronchodilator FEV1/FVC is < 0.70, then GOLD grades 1-4 from FEV1 percent predicted.","markdown_url":"https://magentlab.com/docs/gold-copd.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"gold_copd"},{"name":"formula_expression","type":"string","description":"Published Vogelmeier 2017 GOLD spirometric grade rule"},{"name":"fev1_percent_predicted","type":"number","description":"Echo of post-bronchodilator FEV1 percent predicted"},{"name":"fev1_fvc_ratio","type":"number","description":"Echo of post-bronchodilator FEV1/FVC"},{"name":"obstructed","type":"boolean","description":"true when FEV1/FVC is < 0.70"},{"name":"gold_grade","type":"string","description":"GOLD 1, 2, 3, or 4 when obstructed; not_obstructed when FEV1/FVC is >= 0.70. Not a diagnosis."},{"name":"components","type":"array","description":"Rows for obstructed and gold_1 through gold_4 with factor, met, and value"},{"name":"citation","type":"object","description":"Vogelmeier 2017 Eur Respir J citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"fev1_fvc_ratio":"0.65","fev1_percent_predicted":"85"},{"fev1_fvc_ratio":"0.65","fev1_percent_predicted":"85"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/gold-copd","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/gold-copd?fev1_percent_predicted=85&fev1_fvc_ratio=0.65","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/gold-copd","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/pram","description":"Chalut 2000 Preschool Respiratory Assessment Measure (PRAM): five caller-assigned items — oxygen_sat_points (0/1/2), suprasternal retractions (0/2), scalene contraction (0/2), air_entry (0-3), and wheezing (0-3). magent sums only (max 12) and does not auscultate or measure saturation. Score only; no invented mild/moderate/severe bands. Not a diagnosis and not the Westley 1978 croup score.","parameters":[{"in":"query","name":"oxygen_sat_points","type":"integer","description":"Caller-assigned Chalut 2000 PRAM oxygen saturation points (integer 0, 1, or 2): 0 if ≥95%; 1 if 92-94%; 2 if <92%. magent does not measure oxygen saturation.","required":true,"example":"0"},{"in":"query","name":"suprasternal","type":"integer","description":"Caller-assigned Chalut 2000 PRAM suprasternal retractions (integer 0 or 2): 0 absent; 2 present. Not 1. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"scalene","type":"integer","description":"Caller-assigned Chalut 2000 PRAM scalene muscle contraction (integer 0 or 2): 0 absent; 2 present. Not 1. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"air_entry","type":"integer","description":"Caller-assigned Chalut 2000 PRAM air entry (integer 0, 1, 2, or 3): 0 normal; 1 decreased at the base; 2 decreased at the apex and base; 3 minimal or absent. magent does not auscultate.","required":true,"example":"0"},{"in":"query","name":"wheezing","type":"integer","description":"Caller-assigned Chalut 2000 PRAM wheezing (integer 0, 1, 2, or 3): 0 absent; 1 expiratory only; 2 inspiratory with or without expiratory; 3 audible without a stethoscope or silent chest. magent does not auscultate.","required":true,"example":"0"}],"errors":[{"code":"invalid_pram_item","message":"oxygen_sat_points 0-2, suprasternal 0 or 2, scalene 0 or 2, air_entry 0-3, and wheezing 0-3 (Chalut 2000). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/pram","citation":{"authors":"Chalut DS, Ducharme FM, Davis GM","doi":"10.1067/mpd.2000.110121","id":"chalut-2000","pmid":"11113831","source":"J Pediatr. 2000;137(6):762-768","title":"The Preschool Respiratory Assessment Measure (PRAM): a responsive index of acute asthma severity","url":"https://doi.org/10.1067/mpd.2000.110121"},"formula_expression":"PRAM = oxygen_sat_points + suprasternal + scalene + air_entry + wheezing; Chalut 2000 caller-assigned points; oxygen_sat_points 0/1/2, suprasternal 0/2, scalene 0/2, air_entry 0-3, wheezing 0-3; max 12","purpose":"Sum five caller-assigned Chalut 2000 PRAM item points and return the published 0-12 total.","markdown_url":"https://magentlab.com/docs/pram.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"pram"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"PRAM points 0-12"},{"name":"max_score","type":"integer","description":"Always 12"},{"name":"components","type":"array","description":"Per-item caller-assigned points"},{"name":"citation","type":"object","description":"Chalut et al. J Pediatr 2000 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"air_entry":"0","oxygen_sat_points":"0","scalene":"0","suprasternal":"0","wheezing":"0"},{"air_entry":"0","oxygen_sat_points":"0","scalene":"0","suprasternal":"0","wheezing":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/pram","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/pram?oxygen_sat_points=0&suprasternal=0&scalene=0&air_entry=0&wheezing=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/pram","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/liu-respiratory","description":"Liu 2004 respiratory clinical score: four caller-assigned 0-3 domains — respiratory_rate (age-banded Table 1 ordinal, not raw breaths/min), retractions, dyspnea, and auscultation. magent sums only (max 12) and does not count breaths or auscultate. Score only; Liu 2004 does not print mild/moderate/severe total-score cutoffs. Not a diagnosis or treatment order. Not PRAM. Not Westley 1978 croup.","parameters":[{"in":"query","name":"respiratory_rate","type":"integer","description":"Caller-assigned Liu 2004 respiratory-rate points (integer 0-3), not raw breaths/min. Table 1 age bands for 1/2/3: <2 months ≤60 / 61-69 / ≥70; 2-12 months ≤50 / 51-59 / ≥60; 1-2 years ≤40 / 41-44 / ≥45; 2-3 years ≤34 / 35-39 / ≥40; 4-5 years ≤30 / 31-35 / ≥36; 6-12 years ≤26 / 27-30 / ≥31; >12 years ≤23 / 24-27 / ≥28. 0 is the 0-point ordinal. magent does not count breaths.","required":true,"example":"0"},{"in":"query","name":"retractions","type":"integer","description":"Caller-assigned Liu 2004 retractions (integer 0-3): 0 none; 1 subcostal or intercostal; 2 two of subcostal, intercostal, substernal or nasal flaring (infant); 3 three of subcostal, intercostal, substernal, infraclavicular or nasal flaring/head bobbing (infant). magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"dyspnea","type":"integer","description":"Caller-assigned Liu 2004 dyspnea (integer 0-3). 0-2 years: 0 normal feeding, vocalizations and activity; 1 one of difficulty feeding, decreased vocalization or agitated; 2 two of those; 3 stops feeding, no vocalization, drowsy or confused. 2-4 years: 0 normal feeding, vocalizations and activity; 1 one of decreased appetite, increased coughing after play, hyperactivity; 2 two of those; 3 stops eating or drinking, stops playing, or drowsy and confused. >4 years: 0 counts to ≥10 in one breath; 1 counts to 7-9; 2 counts to 4-6; 3 counts to ≤3. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"auscultation","type":"integer","description":"Caller-assigned Liu 2004 auscultation (integer 0-3): 0 normal breathing, no wheezing; 1 end-expiratory wheeze only; 2 expiratory wheeze only (greater than end-expiratory); 3 inspiratory and expiratory wheeze or diminished breath sounds or both. magent does not auscultate.","required":true,"example":"0"}],"errors":[{"code":"invalid_liu_component","message":"each Liu 2004 respiratory-score domain must be an integer from 0 to 3. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/liu-respiratory","citation":{"authors":"Liu LL, Gallaher MM, Davis RL, Rutter CM, Lewis TC, Marcuse EK","doi":"10.1002/ppul.10425","id":"liu-2004","source":"Pediatr Pulmonol. 2004;37(3):243-248","title":"Use of a respiratory clinical score among different providers","url":"https://doi.org/10.1002/ppul.10425"},"formula_expression":"Liu = respiratory_rate + retractions + dyspnea + auscultation; each caller-assigned 0-3; max 12","purpose":"Sum four caller-assigned Liu 2004 respiratory clinical-score domains (respiratory rate, retractions, dyspnea, auscultation; each 0-3) and return the published 0-12 total.","markdown_url":"https://magentlab.com/docs/liu-respiratory.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"liu_respiratory"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Liu 2004 points 0-12"},{"name":"max_score","type":"integer","description":"Always 12"},{"name":"respiratory_rate","type":"integer","description":"Caller-assigned respiratory-rate points 0-3"},{"name":"retractions","type":"integer","description":"Caller-assigned retractions 0-3"},{"name":"dyspnea","type":"integer","description":"Caller-assigned dyspnea 0-3"},{"name":"auscultation","type":"integer","description":"Caller-assigned auscultation 0-3"},{"name":"components","type":"array","description":"Per-domain caller-assigned points"},{"name":"citation","type":"object","description":"Liu et al. Pediatr Pulmonol 2004 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"auscultation":"0","dyspnea":"0","respiratory_rate":"0","retractions":"0"},{"auscultation":"0","dyspnea":"0","respiratory_rate":"0","retractions":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/liu-respiratory","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/liu-respiratory?respiratory_rate=0&retractions=0&dyspnea=0&auscultation=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/liu-respiratory","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/pediatric-asthma-score","description":"Qureshi 1998 pediatric asthma score: five caller-assigned 1-3 domains — respiratory_rate (Table 1 age-banded ordinal, not raw breaths/min), oxygen_saturation, auscultation, retractions, and dyspnea. magent sums only (5-15) and returns Table 1 asthma_band mild 5-7, moderate 8-11, or severe 12-15. magent does not count breaths, measure SpO2, auscultate, or grade work of breathing. Not a diagnosis or treatment order. Not PRAM. Not Liu 2004. Not Westley croup.","parameters":[{"in":"query","name":"respiratory_rate","type":"integer","description":"Caller-assigned Qureshi 1998 Table 1 respiratory-rate points (integer 1-3), not raw breaths/min and not age. Table 1 age bands for 1/2/3: 2-3 yr ≤34 / 35-39 / ≥40; 4-5 yr ≤30 / 31-35 / ≥36; 6-12 yr ≤26 / 27-30 / ≥31; >12 yr ≤23 / 24-27 / ≥28. That paper enrolled ages 2-18 and has no <2 yr column. magent does not count breaths.","required":true,"example":1},{"in":"query","name":"oxygen_saturation","type":"integer","description":"Caller-assigned Qureshi 1998 Table 1 oxygen-saturation points (integer 1-3): 1 if >95% on room air; 2 if 90-95% on room air or >90% with supplemental oxygen; 3 if <90% on room air or supplemental oxygen as in Table 1. magent does not measure SpO2.","required":true,"example":1},{"in":"query","name":"auscultation","type":"integer","description":"Caller-assigned Qureshi 1998 Table 1 auscultation (integer 1-3): 1 normal breathing or end-expiratory wheeze; 2 expiratory wheezing; 3 inspiratory and expiratory wheezing, diminished breath sounds, or both. magent does not auscultate.","required":true,"example":1},{"in":"query","name":"retractions","type":"integer","description":"Caller-assigned Qureshi 1998 Table 1 retractions (integer 1-3): 1 none or intercostal; 2 intercostal and substernal; 3 intercostal, substernal, and supraclavicular. magent does not examine the patient.","required":true,"example":1},{"in":"query","name":"dyspnea","type":"integer","description":"Caller-assigned Qureshi 1998 Table 1 dyspnea (integer 1-3): 1 speaks in sentences or coos and babbles; 2 speaks in partial sentences or short cries; 3 speaks in single words, short phrases, or grunts. magent does not examine the patient.","required":true,"example":1}],"errors":[{"code":"invalid_pediatric_asthma_component","message":"each Qureshi 1998 pediatric asthma-score domain must be an integer from 1 to 3. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/pediatric-asthma-score","citation":{"authors":"Qureshi F, Pestian J, Davis P, Zaritsky A","doi":"10.1056/NEJM199810083391503","id":"qureshi-1998","source":"N Engl J Med. 1998;339(15):1030-1035","title":"Effect of nebulized ipratropium on the hospitalization rates of children with asthma","url":"https://doi.org/10.1056/NEJM199810083391503"},"formula_expression":"Qureshi 1998 = respiratory_rate + oxygen_saturation + auscultation + retractions + dyspnea; each caller-assigned Table 1 integer 1-3; max 15; asthma_band mild 5-7, moderate 8-11, severe 12-15","purpose":"Sum five caller-assigned Qureshi 1998 Table 1 pediatric asthma-score domains (each integer 1-3) and return the published 5-15 total and mild/moderate/severe asthma_band.","markdown_url":"https://magentlab.com/docs/pediatric-asthma-score.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"pediatric_asthma_score"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Qureshi 1998 points 5-15"},{"name":"max_score","type":"integer","description":"Always 15"},{"name":"asthma_band","type":"string","description":"Qureshi 1998 Table 1 asthma-score band: mild (5-7), moderate (8-11), or severe (12-15). Not a treatment or admission order."},{"name":"respiratory_rate","type":"integer","description":"Caller-assigned Table 1 respiratory-rate points 1-3"},{"name":"oxygen_saturation","type":"integer","description":"Caller-assigned Table 1 oxygen-saturation points 1-3"},{"name":"auscultation","type":"integer","description":"Caller-assigned auscultation 1-3"},{"name":"retractions","type":"integer","description":"Caller-assigned retractions 1-3"},{"name":"dyspnea","type":"integer","description":"Caller-assigned dyspnea 1-3"},{"name":"components","type":"array","description":"Per-domain caller-assigned points"},{"name":"citation","type":"object","description":"Qureshi et al. N Engl J Med 1998 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"auscultation":"1","dyspnea":"1","oxygen_saturation":"1","respiratory_rate":"1","retractions":"1"},{"auscultation":"1","dyspnea":"1","oxygen_saturation":"1","respiratory_rate":"1","retractions":"1"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/pediatric-asthma-score","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/pediatric-asthma-score?respiratory_rate=1&oxygen_saturation=1&auscultation=1&retractions=1&dyspnea=1","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/pediatric-asthma-score","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/asthma-api","description":"Asthma Predictive Index (Castro-Rodriguez 2000, Tucson Children's Respiratory Study). Stringent positive if early frequent wheeze (parent frequency scale > 3) plus 1+ major or 2+ minor criteria. Loose positive if any early wheeze plus the same risk factors. Majors: parental MD asthma, MD eczema. Minors: MD allergic rhinitis, wheezing apart from colds, circulating eosinophils >4% of WBC (caller-assigned). Not mAPI. Not an asthma diagnosis. magent does not examine the child. Not a medical device.","parameters":[{"in":"query","name":"wheeze","type":"string","enum":["none","any","frequent"],"description":"Early-wheeze class from Castro-Rodriguez 2000. none = not an early wheezer; any = early wheezer (chest ever sounded wheezy in the first 3 years); frequent = early frequent wheezer (parent frequency scale > 3). Loose index requires any or frequent. Stringent index requires frequent.","required":true,"example":"none"},{"in":"query","name":"parental_md_asthma","type":"boolean","description":"Parental physician-diagnosed asthma as assigned by the caller. true or false. Major criterion (Castro-Rodriguez 2000 Table 1). magent does not take a family history.","required":true,"example":"false"},{"in":"query","name":"md_eczema","type":"boolean","description":"Physician-diagnosed eczema as assigned by the caller. true or false. Major criterion (Castro-Rodriguez 2000 Table 1). magent does not examine the child.","required":true,"example":"false"},{"in":"query","name":"md_allergic_rhinitis","type":"boolean","description":"Physician-diagnosed allergic rhinitis as assigned by the caller. true or false. Minor criterion (Castro-Rodriguez 2000 Table 1). magent does not examine the child.","required":true,"example":"false"},{"in":"query","name":"wheezing_apart_from_colds","type":"boolean","description":"Wheezing apart from colds as assigned by the caller. true or false. Minor criterion (Castro-Rodriguez 2000 Table 1). magent does not auscultate.","required":true,"example":"false"},{"in":"query","name":"eosinophilia_gt_4pct","type":"boolean","description":"Circulating eosinophils >4% of WBC as assigned by the caller (Castro-Rodriguez 2000 Table 1). true or false. Minor criterion. magent does not take an eosinophil percent and does not interpret a CBC.","required":true,"example":"false"}],"errors":[{"code":"invalid_api_wheeze","message":"wheeze must be none, any, or frequent (Castro-Rodriguez 2000 early wheezer vs early frequent wheezer). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/asthma-api","citation":{"authors":"Castro-Rodríguez JA, Holberg CJ, Wright AL, Martinez FD","doi":"10.1164/ajrccm.162.4.9912111","id":"castro-rodriguez-2000","pmid":"11029352","source":"Am J Respir Crit Care Med. 2000;162(4 Pt 1):1403-1406","title":"A clinical index to define risk of asthma in young children with recurrent wheezing","url":"https://doi.org/10.1164/ajrccm.162.4.9912111"},"formula_expression":"stringent_positive iff wheeze is frequent and (major_count >= 1 or minor_count >= 2); loose_positive iff wheeze is any or frequent and the same risk factors; majors parental_md_asthma and md_eczema; minors md_allergic_rhinitis, wheezing_apart_from_colds, eosinophilia_gt_4pct (Castro-Rodriguez 2000 Table 1)","purpose":"Apply Castro-Rodriguez 2000 Table 1 and return stringent and loose Asthma Predictive Index flags from caller-assigned early-wheeze class and five major/minor criteria.","markdown_url":"https://magentlab.com/docs/asthma-api.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"asthma_api"},{"name":"formula_expression","type":"string","description":"Castro-Rodriguez 2000 Table 1 stringent and loose API rule"},{"name":"stringent_positive","type":"boolean","description":"true when wheeze is frequent (early frequent wheezer) and risk_factors_met is true. Not a diagnosis of asthma."},{"name":"loose_positive","type":"boolean","description":"true when wheeze is any or frequent (early wheezer) and risk_factors_met is true. Not a diagnosis of asthma."},{"name":"risk_factors_met","type":"boolean","description":"true when at least one major criterion is present or at least two minor criteria are present"},{"name":"major_count","type":"integer","description":"Count of true major criteria (parental_md_asthma, md_eczema); 0-2"},{"name":"minor_count","type":"integer","description":"Count of true minor criteria (md_allergic_rhinitis, wheezing_apart_from_colds, eosinophilia_gt_4pct); 0-3"},{"name":"wheeze","type":"string","description":"Parsed early-wheeze class: none, any, or frequent"},{"name":"criteria","type":"array","description":"Per-criterion rows with factor and met for the two majors then three minors; met is true when that Table 1 finding is present"},{"name":"citation","type":"object","description":"Castro-Rodriguez 2000 Am J Respir Crit Care Med citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"eosinophilia_gt_4pct":"false","md_allergic_rhinitis":"false","md_eczema":"false","parental_md_asthma":"false","wheeze":"none","wheezing_apart_from_colds":"false"},{"eosinophilia_gt_4pct":"false","md_allergic_rhinitis":"false","md_eczema":"false","parental_md_asthma":"false","wheeze":"none","wheezing_apart_from_colds":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/asthma-api","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/asthma-api?wheeze=none&parental_md_asthma=false&md_eczema=false&md_allergic_rhinitis=false&wheezing_apart_from_colds=false&eosinophilia_gt_4pct=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/asthma-api","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/mapi","description":"Guilbert 2004 mAPI (PEAK Table I). Positive if 4+ wheeze episodes in one year (one MD-diagnosed) plus 1+ major or 2+ minor. Majors: parental asthma, MD atopic dermatitis, aeroallergen sensitization. Minors: milk/egg/peanut sensitization, wheezing unrelated to colds, eosinophils ≥4%. Not original API. Not m²API. Not an asthma diagnosis. magent does not examine the child. Not a medical device.","parameters":[{"in":"query","name":"four_or_more_wheeze_episodes","type":"boolean","description":"Caller-assigned history of 4 or more wheezing episodes in one year with at least one physician-diagnosed episode (Guilbert 2004 PEAK Table I primary criterion). true or false. magent does not take a numeric episode count.","required":true,"example":"false"},{"in":"query","name":"parental_asthma","type":"boolean","description":"Parental asthma as assigned by the caller. true or false. Major criterion (Guilbert 2004 PEAK Table I). magent does not take a family history.","required":true,"example":"false"},{"in":"query","name":"md_atopic_dermatitis","type":"boolean","description":"Physician-diagnosed atopic dermatitis as assigned by the caller. true or false. Major criterion (Guilbert 2004 PEAK Table I). magent does not examine the child.","required":true,"example":"false"},{"in":"query","name":"aeroallergen_sensitization","type":"boolean","description":"Allergic sensitization to at least one aeroallergen as assigned by the caller. true or false. Major criterion (Guilbert 2004 PEAK Table I). magent does not interpret allergy testing.","required":true,"example":"false"},{"in":"query","name":"food_sensitization_milk_egg_peanut","type":"boolean","description":"Allergic sensitization to milk, egg, or peanuts as assigned by the caller. true or false. Minor criterion (Guilbert 2004 PEAK Table I). magent does not interpret allergy testing.","required":true,"example":"false"},{"in":"query","name":"wheezing_unrelated_to_colds","type":"boolean","description":"Wheezing unrelated to colds as assigned by the caller. true or false. Minor criterion (Guilbert 2004 PEAK Table I). magent does not auscultate.","required":true,"example":"false"},{"in":"query","name":"eosinophilia_ge_4pct","type":"boolean","description":"Blood eosinophils ≥4% of WBC as assigned by the caller (Guilbert 2004 PEAK Table I; 4% or greater). true or false. Minor criterion. magent does not take an eosinophil percent and does not interpret a CBC. Not Castro-Rodriguez circulating eosinophils >4%.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/mapi","citation":{"authors":"Guilbert TW, Morgan WJ, Zeiger RS, et al.","doi":"10.1016/j.jaci.2004.09.020","id":"guilbert-2004","pmid":"15577824","source":"J Allergy Clin Immunol. 2004;114(6):1282-1287","title":"Atopic characteristics of children with recurrent wheezing at high risk for the development of childhood asthma","url":"https://doi.org/10.1016/j.jaci.2004.09.020"},"formula_expression":"positive iff four_or_more_wheeze_episodes and (major_count >= 1 or minor_count >= 2); majors parental_asthma, md_atopic_dermatitis, aeroallergen_sensitization; minors food_sensitization_milk_egg_peanut, wheezing_unrelated_to_colds, eosinophilia_ge_4pct (Guilbert 2004 PEAK Table I)","purpose":"Apply Guilbert 2004 PEAK Table I and return a binary modified Asthma Predictive Index flag from caller-assigned history of 4 or more wheezing episodes and six major/minor criteria.","markdown_url":"https://magentlab.com/docs/mapi.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"mapi"},{"name":"formula_expression","type":"string","description":"Guilbert 2004 PEAK Table I mAPI binary positive rule"},{"name":"positive","type":"boolean","description":"true when four_or_more_wheeze_episodes is true and at least one major criterion is present or at least two minor criteria are present. Not a diagnosis of asthma."},{"name":"major_count","type":"integer","description":"Count of true major criteria (parental_asthma, md_atopic_dermatitis, aeroallergen_sensitization); 0-3"},{"name":"minor_count","type":"integer","description":"Count of true minor criteria (food_sensitization_milk_egg_peanut, wheezing_unrelated_to_colds, eosinophilia_ge_4pct); 0-3"},{"name":"four_or_more_wheeze_episodes","type":"boolean","description":"Parsed primary criterion: caller-assigned history of 4 or more wheezing episodes in one year with at least one physician-diagnosed episode"},{"name":"criteria","type":"array","description":"Per-criterion rows with factor and met for the primary four-or-more wheeze flag then three majors then three minors; met is true when that Table I finding is present"},{"name":"citation","type":"object","description":"Guilbert 2004 J Allergy Clin Immunol citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"aeroallergen_sensitization":"false","eosinophilia_ge_4pct":"false","food_sensitization_milk_egg_peanut":"false","four_or_more_wheeze_episodes":"false","md_atopic_dermatitis":"false","parental_asthma":"false","wheezing_unrelated_to_colds":"false"},{"aeroallergen_sensitization":"false","eosinophilia_ge_4pct":"false","food_sensitization_milk_egg_peanut":"false","four_or_more_wheeze_episodes":"false","md_atopic_dermatitis":"false","parental_asthma":"false","wheezing_unrelated_to_colds":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/mapi","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/mapi?four_or_more_wheeze_episodes=false&parental_asthma=false&md_atopic_dermatitis=false&aeroallergen_sensitization=false&food_sensitization_milk_egg_peanut=false&wheezing_unrelated_to_colds=false&eosinophilia_ge_4pct=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/mapi","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/piama","description":"Caudri 2009 PIAMA Table III decimal clinical prediction score (max 55.1). Male 4.6, post-term 7.3, medium/low parental education 4.2, parental inhaled medication 7.7, wheezing none/1–3/≥4 → 0/4.2/9.1, wheeze or dyspnea apart from colds 7.1, serious infections none/1–2/≥3 → 0/4.6/6.9, eczema with rash 8.2. Score <10 ~3% asthma at 7–8 years; ≥30 ~42%. Not a 0–18 integer port, API, or mAPI. Not a diagnosis. magent does not examine the child.","parameters":[{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"Caller-assigned sex (Caudri 2009 Table III). male scores 4.6; female scores 0. magent does not assign sex.","required":true,"example":"female"},{"in":"query","name":"postterm_delivery","type":"boolean","description":"Post-term delivery as assigned by the caller (Caudri 2009 Table III). true scores 7.3. magent does not take an obstetric history.","required":true,"example":"false"},{"in":"query","name":"medium_low_parental_education","type":"boolean","description":"Medium or low education in at least one parent as assigned by the caller (Caudri 2009 Table III). true scores 4.2. magent does not take a parental education history.","required":true,"example":"false"},{"in":"query","name":"parental_inhaled_medication","type":"boolean","description":"Inhalation medication by at least one parent as assigned by the caller (Caudri 2009 Table III). true scores 7.7. magent does not take a family medication history.","required":true,"example":"false"},{"in":"query","name":"wheezing","type":"string","enum":["none","1_to_3","ge_4"],"description":"Wheezing frequency in the last year (Caudri 2009 Table III). none scores 0; 1_to_3 (infrequent, 1–3 times/year) scores 4.2; ge_4 (frequent, ≥4 times/year) scores 9.1. Mutually exclusive. magent does not auscultate.","required":true,"example":"none"},{"in":"query","name":"wheeze_dyspnea_apart_from_colds","type":"boolean","description":"Wheeze or dyspnea apart from colds as assigned by the caller (Caudri 2009 Table III). true scores 7.1. PIAMA collected this only at ages 3–4 and treated younger children as negative by default; the caller assigns the boolean. magent does not take numeric age and does not auto-override.","required":true,"example":"false"},{"in":"query","name":"serious_infections","type":"string","enum":["none","1_to_2","ge_3"],"description":"Serious respiratory or ear/nose/throat infections per year (Caudri 2009 Table III). none scores 0; 1_to_2 (1–2 times/year) scores 4.6; ge_3 (≥3 times/year) scores 6.9. Mutually exclusive. magent does not diagnose infection.","required":true,"example":"none"},{"in":"query","name":"eczema_with_rash","type":"boolean","description":"Doctor's diagnosis of eczema AND eczematous rash present, as assigned by the caller (Caudri 2009 Table III). true scores 8.2. magent does not examine the child.","required":true,"example":"false"}],"errors":[{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_piama","message":"wheezing must be none, 1_to_3, or ge_4; serious_infections must be none, 1_to_2, or ge_3 (Caudri 2009 PIAMA Table III). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/piama","citation":{"authors":"Caudri D, Wijga A, Schipper CMA, Hoekstra M, Postma DS, Koppelman GH, Brunekreef B, Smit HA, de Jongste JC","doi":"10.1016/j.jaci.2009.06.045","id":"caudri-2009","pmid":"19665765","source":"J Allergy Clin Immunol. 2009;124(5):903-910","title":"Predicting the long-term prognosis of children with symptoms suggestive of asthma at preschool age","url":"https://doi.org/10.1016/j.jaci.2009.06.045"},"formula_expression":"piama = 4.6*male + 7.3*postterm_delivery + 4.2*medium_low_parental_education + 7.7*parental_inhaled_medication + wheezing(none 0, 1_to_3 4.2, ge_4 9.1) + 7.1*wheeze_dyspnea_apart_from_colds + serious_infections(none 0, 1_to_2 4.6, ge_3 6.9) + 8.2*eczema_with_rash; Caudri 2009 Table III; max 55.1; below_10 iff score < 10 (~3% asthma at 7-8 years); ge_30 iff score ≥ 30 (~42% risk)","purpose":"Sum the Caudri 2009 PIAMA Table III decimal clinical prediction weights for preschool children with symptoms suggestive of asthma and return below_10 (score < 10) and ge_30 (score ≥ 30).","markdown_url":"https://magentlab.com/docs/piama.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"piama"},{"name":"formula_expression","type":"string","description":"Caudri 2009 Table III decimal clinical prediction expression"},{"name":"score","type":"number","description":"Caudri 2009 Table III points 0-55.1, one decimal"},{"name":"max_score","type":"number","description":"Always 55.1"},{"name":"below_10","type":"boolean","description":"true iff score < 10 (Caudri 2009 abstract: ~3% risk of asthma at 7–8 years). Not a diagnosis of asthma."},{"name":"ge_30","type":"boolean","description":"true iff score ≥ 30 (Caudri 2009 abstract: ~42% risk of asthma at 7–8 years). Not a diagnosis of asthma."},{"name":"components","type":"array","description":"Per-factor Table III points"},{"name":"citation","type":"object","description":"Caudri 2009 J Allergy Clin Immunol citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"eczema_with_rash":"false","medium_low_parental_education":"false","parental_inhaled_medication":"false","postterm_delivery":"false","serious_infections":"none","sex":"female","wheeze_dyspnea_apart_from_colds":"false","wheezing":"none"},{"eczema_with_rash":"false","medium_low_parental_education":"false","parental_inhaled_medication":"false","postterm_delivery":"false","serious_infections":"none","sex":"female","wheeze_dyspnea_apart_from_colds":"false","wheezing":"none"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/piama","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/piama?sex=female&postterm_delivery=false&medium_low_parental_education=false&parental_inhaled_medication=false&wheezing=none&wheeze_dyspnea_apart_from_colds=false&serious_infections=none&eczema_with_rash=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/piama","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/pars","description":"Biagini Myers 2019 Pediatric Asthma Risk Score (PARS). Table III weights (OR rounded to nearest integer): parental asthma 2, eczema before age 3 2, wheezing apart from colds 3, wheezing before age 3 3, caller-assigned African American race 2, SPT ≥2 aeroallergens and/or food allergens 2. Max 14. Fig E1 predicted asthma by age 7 as an integer percent. Scores 1 and 13 are unattainable. Not API or mAPI. Not a diagnosis. magent does not assign race and does not perform SPT.","parameters":[{"in":"query","name":"parental_asthma","type":"boolean","description":"Parental asthma as assigned by the caller (Biagini Myers 2019 Table III). true scores 2. magent does not take a family history. true or false.","required":true,"example":"false"},{"in":"query","name":"eczema_before_age_3","type":"boolean","description":"Eczema before age 3 years as assigned by the caller (Biagini Myers 2019 Table III). true scores 2. magent does not examine the child. true or false.","required":true,"example":"false"},{"in":"query","name":"wheezing_apart_from_colds","type":"boolean","description":"Wheezing apart from colds as assigned by the caller (Biagini Myers 2019 Table III). true scores 3. magent does not auscultate. true or false.","required":true,"example":"false"},{"in":"query","name":"wheezing_before_age_3","type":"boolean","description":"Wheezing before age 3 years as assigned by the caller (Biagini Myers 2019 Table III). true scores 3. magent does not auscultate. true or false.","required":true,"example":"false"},{"in":"query","name":"african_american","type":"boolean","description":"Caller-assigned African American race as used in Biagini Myers 2019 Table III. true scores 2. magent does not assign race. true or false.","required":true,"example":"false"},{"in":"query","name":"spt_ge_2","type":"boolean","description":"Skin prick test positive to ≥2 aeroallergens and/or food allergens as assigned by the caller (Biagini Myers 2019 Table III). true scores 2. magent does not perform SPT. true or false.","required":true,"example":"false"}],"errors":[{"code":"invalid_pars","message":"PARS flags must be true or false as in Biagini Myers 2019 Table III / Fig E1. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/pars","citation":{"authors":"Biagini Myers JM, Schauberger E, He H, Martin LJ, Kroner J, Hill GM, Ryan PH, LeMasters GK, Bernstein DI, Lockey JE, Arshad SH, Kurukulaaratchy R, Khurana Hershey GK","doi":"10.1016/j.jaci.2018.09.037","id":"biagini-myers-2019-pars","pmid":"30554722","source":"J Allergy Clin Immunol. 2019;143(4):1803-1810.e2","title":"A Pediatric Asthma Risk Score to better predict asthma development in young children","url":"https://doi.org/10.1016/j.jaci.2018.09.037"},"formula_expression":"PARS = 2*parental_asthma + 2*eczema_before_age_3 + 3*wheezing_apart_from_colds + 3*wheezing_before_age_3 + 2*african_american + 2*spt_ge_2; Biagini Myers 2019 Table III (OR rounded to nearest integer) and Fig E1; max 14; predicted_asthma_percent is the Fig E1 integer predicted risk of asthma by age 7; scores 1 and 13 are unattainable","purpose":"Sum the Biagini Myers 2019 Table III Pediatric Asthma Risk Score weights and return the Fig E1 integer predicted risk of asthma by age 7.","markdown_url":"https://magentlab.com/docs/pars.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"pars"},{"name":"formula_expression","type":"string","description":"Biagini Myers 2019 Table III PARS weights and Fig E1 mapping"},{"name":"score","type":"integer","description":"PARS points 0-14; 1 and 13 are unattainable"},{"name":"max_score","type":"integer","description":"14"},{"name":"predicted_asthma_percent","type":"integer","description":"Fig E1 integer predicted risk of asthma by age 7. Not a named low/moderate/high band. Not a diagnosis of asthma."},{"name":"components","type":"array","description":"Per-factor Table III points"},{"name":"citation","type":"object","description":"Biagini Myers 2019 J Allergy Clin Immunol citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"african_american":"false","eczema_before_age_3":"false","parental_asthma":"false","spt_ge_2":"false","wheezing_apart_from_colds":"false","wheezing_before_age_3":"false"},{"african_american":"false","eczema_before_age_3":"false","parental_asthma":"false","spt_ge_2":"false","wheezing_apart_from_colds":"false","wheezing_before_age_3":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/pars","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/pars?parental_asthma=false&eczema_before_age_3=false&wheezing_apart_from_colds=false&wheezing_before_age_3=false&african_american=false&spt_ge_2=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/pars","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/pass","description":"Gorelick 2004 three-item Pediatric Asthma Severity Score (PASS): caller-assigned wheezing (0 none or mild; 1 moderate; 2 severe or absent from poor air exchange), work_of_breathing (0 none or mild; 1 moderate; 2 severe), and prolongation_of_expiration (0 normal or mildly prolonged; 1 moderately; 2 severely). magent sums only (max 6) and does not auscultate. Score only; no invented severity or GINA bands. Not a diagnosis, not Chalut 2000 PRAM, not Westley 1978 croup, and not hospital PAS.","parameters":[{"in":"query","name":"wheezing","type":"integer","description":"Caller-assigned Gorelick 2004 PASS wheezing (integer 0, 1, or 2): 0 none or mild; 1 moderate; 2 severe wheezing or absent due to poor air exchange. magent does not auscultate.","required":true,"example":"0"},{"in":"query","name":"work_of_breathing","type":"integer","description":"Caller-assigned Gorelick 2004 PASS work of breathing (integer 0, 1, or 2): 0 none or mild accessory-muscle use or retractions; 1 moderate; 2 severe. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"prolongation_of_expiration","type":"integer","description":"Caller-assigned Gorelick 2004 PASS prolongation of expiration (integer 0, 1, or 2): 0 normal or mildly prolonged; 1 moderately prolonged; 2 severely prolonged. magent does not auscultate.","required":true,"example":"0"}],"errors":[{"code":"invalid_pass_item","message":"wheezing, work_of_breathing, and prolongation_of_expiration must each be an integer 0, 1, or 2 (Gorelick 2004 PASS). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/pass","citation":{"authors":"Gorelick MH, Stevens MW, Schultz TR, Scribano PV","doi":"10.1197/j.aem.2003.07.015","id":"gorelick-2004","pmid":"14709423","source":"Acad Emerg Med. 2004;11(1):10-18","title":"Performance of a novel clinical score, the Pediatric Asthma Severity Score (PASS), in the evaluation of acute asthma","url":"https://doi.org/10.1197/j.aem.2003.07.015"},"formula_expression":"PASS = wheezing + work_of_breathing + prolongation_of_expiration; Gorelick 2004 caller-assigned points; each item 0/1/2; max 6","purpose":"Sum three caller-assigned Gorelick 2004 PASS item points and return the published 0-6 total.","markdown_url":"https://magentlab.com/docs/pass.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"pass"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"PASS points 0-6"},{"name":"max_score","type":"integer","description":"Always 6"},{"name":"components","type":"array","description":"Per-item caller-assigned points"},{"name":"citation","type":"object","description":"Gorelick et al. Acad Emerg Med 2004 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"prolongation_of_expiration":"0","wheezing":"0","work_of_breathing":"0"},{"prolongation_of_expiration":"0","wheezing":"0","work_of_breathing":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/pass","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/pass?wheezing=0&work_of_breathing=0&prolongation_of_expiration=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/pass","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rse","description":"Bateman 2015 Risk Score for Exacerbations (RSE): Table II normalized points from BMI >=30 (14), ACQ-5 (<1.5=0; 1.5 to <2.5=7; >=2.5=13), FEV1 % predicted (>=90=0; 80 to <90=13; <80=20), daily rescue occasions (<2=0; 2 to <4=11; >=4=26), and GINA step (3=0; 4=27). Total 0-100. Caller-assigned; magent does not administer ACQ-5 or spirometry. Not a diagnosis, GINA step change, or inhaler order.","parameters":[{"in":"query","name":"bmi_ge_30","type":"boolean","description":"Caller-assigned BMI >= 30 kg/m2 (Bateman 2015 Table II). true scores 14; false scores 0. magent does not compute BMI.","required":true,"example":"false"},{"in":"query","name":"acq5","type":"number","description":"Caller-assigned 5-item Asthma Control Questionnaire mean (0-6). Table II: <1.5 scores 0; 1.5 <= ACQ-5 < 2.5 scores 7; >=2.5 scores 13. magent does not administer ACQ-5.","required":true,"example":"1.0"},{"in":"query","name":"fev1_percent_predicted","type":"number","description":"Caller-assigned FEV1 as percent of predicted (10-150). Table II: >=90 scores 0; 80 <= FEV1 < 90 scores 13; <80 scores 20. magent does not perform spirometry.","required":true,"example":"95"},{"in":"query","name":"rescue_occasions_per_day","type":"number","description":"Caller-assigned daily reliever occasions (0-30). Table II: <2 scores 0; 2 <= occasions < 4 scores 11; >=4 scores 26. magent does not count inhaler actuations.","required":true,"example":"0"},{"in":"query","name":"gina_step","type":"integer","description":"Caller-assigned GINA treatment step in the Bateman 2015 derivation population. Must be 3 (0 points) or 4 (27 points). Other steps are invalid_gina_step. Not a step-change or inhaler order.","required":true,"example":"3"}],"errors":[{"code":"invalid_acq5","message":"acq5 must be a number from 0 to 6 (Bateman 2015 RSE 5-item Asthma Control Questionnaire). Returned before settlement; you are not charged.","status":400},{"code":"invalid_rescue_occasions","message":"rescue_occasions_per_day must be a number from 0 to 30 (Bateman 2015 RSE daily reliever occasions). Returned before settlement; you are not charged.","status":400},{"code":"invalid_gina_step","message":"gina_step must be 3 or 4 (Bateman 2015 RSE derivation population GINA treatment step). Returned before settlement; you are not charged.","status":400},{"code":"invalid_fev1_percent","message":"fev1_percent_predicted must be a number from 10 to 150. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rse","citation":{"authors":"Bateman ED, Buhl R, O'Byrne PM, Humbert M, Reddel HK, Sears MR, Jenkins C, Harrison TW, Quirce S, Peterson S, Eriksson G","doi":"10.1016/j.jaci.2014.08.015","id":"bateman-2015","pmid":"25258144","source":"J Allergy Clin Immunol. 2015;135(6):1457-1464.e4","title":"Development and validation of a novel risk score for asthma exacerbations: The risk score for exacerbations","url":"https://doi.org/10.1016/j.jaci.2014.08.015"},"formula_expression":"RSE = bmi_ge_30 + acq5 + fev1_percent_predicted + rescue_occasions_per_day + gina_step; Bateman 2015 Table II normalized points; BMI >=30 -> 14 else 0; ACQ-5 <1.5 -> 0, 1.5 <= ACQ-5 < 2.5 -> 7, >=2.5 -> 13; FEV1 % predicted >=90 -> 0, 80 <= FEV1 < 90 -> 13, <80 -> 20; rescue occasions/day <2 -> 0, 2 <= x < 4 -> 11, >=4 -> 26; GINA step 3 -> 0, 4 -> 27; max 100","purpose":"Sum Bateman 2015 Table II normalized RSE points from caller-assigned BMI >=30, ACQ-5, FEV1 percent predicted, daily rescue occasions, and GINA treatment step 3 or 4, and return the 0-100 total.","markdown_url":"https://magentlab.com/docs/rse.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rse"},{"name":"formula_expression","type":"string","description":"Bateman 2015 Table II normalized RSE expression"},{"name":"score","type":"integer","description":"Table II normalized points 0-100. Score only; no invented risk labels."},{"name":"max_score","type":"integer","description":"100"},{"name":"bmi_ge_30","type":"boolean","description":"Echo of caller-assigned BMI >= 30 flag"},{"name":"acq5","type":"number","description":"Echo of caller-assigned ACQ-5"},{"name":"fev1_percent_predicted","type":"number","description":"Echo of caller-assigned FEV1 percent predicted"},{"name":"rescue_occasions_per_day","type":"number","description":"Echo of caller-assigned daily rescue occasions"},{"name":"gina_step","type":"integer","description":"Echo of caller-assigned GINA step 3 or 4"},{"name":"components","type":"array","description":"Per-factor Table II points"},{"name":"citation","type":"object","description":"Bateman et al. J Allergy Clin Immunol 2015 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"acq5":"1.0","bmi_ge_30":"false","fev1_percent_predicted":"95","gina_step":"3","rescue_occasions_per_day":"0"},{"acq5":"1.0","bmi_ge_30":"false","fev1_percent_predicted":"95","gina_step":"3","rescue_occasions_per_day":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rse","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rse?bmi_ge_30=false&acq5=1.0&fev1_percent_predicted=95&rescue_occasions_per_day=0&gina_step=3","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rse","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/berlin-ards","description":"Berlin Definition of ARDS (Ranieri 2012). berlin_ards iff clinical box (onset within 1 week, bilateral opacities not fully explained, origin not fully HF or fluid) and severity mild, moderate, or severe. Severe: PF<=100 with PEEP>=5. Moderate: 100<PF<=200 with PEEP>=5. Mild: 200<PF<=300 with PEEP or CPAP>=5. Caller assigns flags and pf_ratio. magent does not read radiographs or echo, diagnose ARDS, or set ventilator mode. Not AECC 1994, not Kigali, not the oxygenation index.","parameters":[{"in":"query","name":"onset_within_1_week","type":"boolean","description":"Onset within 1 week of a known clinical insult or new or worsening respiratory symptoms (Ranieri 2012). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"},{"in":"query","name":"bilateral_opacities_not_fully_explained","type":"boolean","description":"Bilateral opacities not fully explained by effusions, lobar/lung collapse, or nodules (Ranieri 2012). true or false as assigned by the caller. magent does not read radiographs.","required":true,"example":"true"},{"in":"query","name":"origin_not_fully_hf_or_fluid","type":"boolean","description":"Respiratory failure not fully explained by cardiac failure or fluid overload (Ranieri 2012). true or false as assigned by the caller. magent does not read echocardiography.","required":true,"example":"true"},{"in":"query","name":"peep_ge_5","type":"boolean","description":"PEEP >= 5 cm H2O as assigned by the caller (required for moderate and severe; either PEEP or CPAP for mild). magent does not set ventilator mode.","required":true,"example":"true"},{"in":"query","name":"cpap_ge_5","type":"boolean","description":"CPAP >= 5 cm H2O as assigned by the caller (counts for mild only; CPAP without PEEP is not moderate or severe). magent does not set ventilator mode.","required":true,"example":"false"},{"in":"query","name":"pf_ratio","type":"number","description":"PaO2/FiO2 ratio in mm Hg (20-800). Caller-supplied; magent does not recompute from PaO2 and FiO2.","required":true,"example":"90"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_pf_ratio","message":"pf_ratio must be a number from 20 to 800. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/berlin-ards","citation":{"authors":"ARDS Definition Task Force; Ranieri VM, Rubenfeld GD, Thompson BT, Ferguson ND, Caldwell E, Fan E, Camporota L, Slutsky AS","doi":"10.1001/jama.2012.5669","id":"ranieri-2012","pmid":"22797452","source":"JAMA. 2012;307(23):2526-2533","title":"Acute respiratory distress syndrome: the Berlin Definition","url":"https://doi.org/10.1001/jama.2012.5669"},"formula_expression":"clinical_box iff onset_within_1_week and bilateral_opacities_not_fully_explained and origin_not_fully_hf_or_fluid; severe iff clinical_box and pf_ratio <= 100 and peep_ge_5; moderate iff clinical_box and 100 < pf_ratio <= 200 and peep_ge_5; mild iff clinical_box and 200 < pf_ratio <= 300 and (peep_ge_5 or cpap_ge_5); berlin_ards iff severity is mild, moderate, or severe; else none (Ranieri 2012 Berlin Definition)","purpose":"Apply the 2012 Berlin Definition of ARDS and return whether the clinical box holds, severity (none, mild, moderate, or severe), and berlin_ards.","markdown_url":"https://magentlab.com/docs/berlin-ards.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"berlin_ards"},{"name":"formula_expression","type":"string","description":"Ranieri 2012 Berlin Definition clinical box and PaO2/FiO2 severity rule"},{"name":"pf_ratio","type":"number","description":"Caller-supplied PaO2/FiO2 in mm Hg used for severity"},{"name":"clinical_box","type":"boolean","description":"true when onset within 1 week, bilateral opacities not fully explained, and origin not fully cardiac failure or fluid overload all hold"},{"name":"severity","type":"string","description":"none, mild, moderate, or severe. Mutually exclusive. Not a diagnosis."},{"name":"berlin_ards","type":"boolean","description":"true when severity is mild, moderate, or severe. Not a diagnosis."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met; severe, moderate, and mild rows include pf_ratio as value"},{"name":"citation","type":"object","description":"Ranieri 2012 JAMA Berlin Definition citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"bilateral_opacities_not_fully_explained":"true","cpap_ge_5":"false","onset_within_1_week":"true","origin_not_fully_hf_or_fluid":"true","peep_ge_5":"true","pf_ratio":"90"},{"bilateral_opacities_not_fully_explained":"true","cpap_ge_5":"false","onset_within_1_week":"true","origin_not_fully_hf_or_fluid":"true","peep_ge_5":"true","pf_ratio":"90"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/berlin-ards","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/berlin-ards?onset_within_1_week=true&bilateral_opacities_not_fully_explained=true&origin_not_fully_hf_or_fluid=true&peep_ge_5=true&cpap_ge_5=false&pf_ratio=90","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/berlin-ards","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/ardsnet-tv","description":"ARDS Network 2000 predicted body weight (PBW) from height and sex, and the lower-tidal-volume arm 6 mL/kg PBW. Male PBW_kg = 50 + 0.91*(height_cm-152.4); female uses 45.5. Also returns the published 4 mL/kg minimum. Height in cm or inches. Not a ventilator order, plateau-pressure titration, Berlin/AECC diagnosis, pediatric tube size, or ETT insertion depth. Not Devine IBW. Deterministic published arithmetic with citation.","parameters":[{"in":"query","name":"height_cm","type":"number","description":"Height in centimeters (50-250). Provide height_cm or height_in.","required":false,"example":"170"},{"in":"query","name":"height_in","type":"number","description":"Height in inches (20-98). Converted as cm = in * 2.54.","required":false,"example":"67"},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"Sex used by ARDSNet PBW (50 kg male, 45.5 kg female base).","required":true,"example":"male"}],"errors":[{"code":"invalid_height","message":"height_cm (50-250) or height_in (20-98) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/ardsnet-tv","citation":{"authors":"The Acute Respiratory Distress Syndrome Network","doi":"10.1056/NEJM200005043421801","id":"ardsnet-2000","pmid":"10793162","source":"N Engl J Med. 2000;342(18):1301-1308","title":"Ventilation with lower tidal volumes as compared with traditional tidal volumes for acute lung injury and the acute respiratory distress syndrome","url":"https://doi.org/10.1056/NEJM200005043421801"},"formula_expression":"PBW_kg = 50 + 0.91 * (height_cm - 152.4) (male); PBW_kg = 45.5 + 0.91 * (height_cm - 152.4) (female); tidal_volume_6_ml = 6 * PBW_kg; tidal_volume_4_ml = 4 * PBW_kg","purpose":"Compute ARDS Network 2000 predicted body weight from height and sex and the lower-tidal-volume arm of 6 mL/kg PBW.","markdown_url":"https://magentlab.com/docs/ardsnet-tv.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"ardsnet_tv"},{"name":"formula_expression","type":"string","description":"Exact expressions used"},{"name":"sex","type":"string","description":"female or male"},{"name":"height_cm","type":"number","description":"Normalized height in cm"},{"name":"pbw_kg","type":"number","description":"ARDSNet predicted body weight in kg, 1 decimal"},{"name":"tidal_volume_6_ml","type":"number","description":"Lower-tidal-volume arm 6 mL/kg PBW, whole mL"},{"name":"tidal_volume_4_ml","type":"number","description":"Published ARDSNet minimum 4 mL/kg PBW, whole mL"},{"name":"citation","type":"object","description":"ARDS Network 2000 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"height_cm":"170","sex":"male"},{"height_cm":"170","sex":"male"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/ardsnet-tv","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/ardsnet-tv?sex=male&height_cm=170","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/ardsnet-tv","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rdos","description":"Campbell 2010 RDOS for patients unable to self-report dyspnea. Eight caller-assigned 0-2 integers (heart_rate, respiratory_rate, restlessness, paradoxical_breathing, accessory_muscle_use, grunting, nasal_flaring, look_of_fear). magent sums only (max 16); does not convert raw heart or respiratory rate or observe the patient. Campbell 2010 published the 0-16 instrument; magent does not apply later cutoff papers. Not a medical device and not an opioid or oxygen order.","parameters":[{"in":"query","name":"heart_rate","type":"integer","description":"Caller-assigned Campbell 2010 heart_rate points (integer 0-2). Paper bins: ≤90 beats/min → 0; 91–110 → 1; ≥111 → 2. magent does not convert raw beats/min and does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"respiratory_rate","type":"integer","description":"Caller-assigned Campbell 2010 respiratory_rate points (integer 0-2). Paper bins: ≤18 breaths/min → 0; 19–28 → 1; ≥29 → 2. magent does not convert raw breaths/min and does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"restlessness","type":"integer","description":"Caller-assigned Campbell 2010 restlessness (nonpurposeful movements) points (integer 0-2): 0 none; 1 occasional, slight movements; 2 frequent movements. magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"paradoxical_breathing","type":"integer","description":"Caller-assigned Campbell 2010 paradoxical_breathing points (integer 0-2). Paper scores 0 none or 2 present (abdomen moves in on inspiration); there is no 1-point cell. magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"accessory_muscle_use","type":"integer","description":"Caller-assigned Campbell 2010 accessory_muscle_use (rise in clavicle during inspiration) points (integer 0-2): 0 none; 1 slight rise; 2 pronounced rise. magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"grunting","type":"integer","description":"Caller-assigned Campbell 2010 grunting at end-expiration (guttural sound) points (integer 0-2). Paper scores 0 none or 2 present; there is no 1-point cell. magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"nasal_flaring","type":"integer","description":"Caller-assigned Campbell 2010 nasal_flaring (involuntary movement of nares) points (integer 0-2). Paper scores 0 none or 2 present; there is no 1-point cell. magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"look_of_fear","type":"integer","description":"Caller-assigned Campbell 2010 look_of_fear points (integer 0-2). Paper scores 0 none or 2 eyes wide open, facial muscles tense, brow furrowed, mouth open, teeth together; there is no 1-point cell. magent does not observe the patient.","required":true,"example":"0"}],"errors":[{"code":"invalid_rdos","message":"heart_rate, respiratory_rate, restlessness, paradoxical_breathing, accessory_muscle_use, grunting, nasal_flaring, and look_of_fear must each be an integer 0, 1, or 2 (Campbell 2010 RDOS). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rdos","citation":{"authors":"Campbell ML, Templin T, Walch J","doi":"10.1089/jpm.2009.0229","id":"campbell-2010","pmid":"20078243","source":"J Palliat Med. 2010;13(3):285-290","title":"A Respiratory Distress Observation Scale for patients unable to self-report dyspnea","url":"https://doi.org/10.1089/jpm.2009.0229"},"formula_expression":"RDOS = heart_rate + respiratory_rate + restlessness + paradoxical_breathing + accessory_muscle_use + grunting + nasal_flaring + look_of_fear; each caller-assigned 0-2; max 16","purpose":"Sum the eight Campbell 2010 RDOS observer-rated items (each a caller-assigned integer 0-2) and return the published total (max 16).","markdown_url":"https://magentlab.com/docs/rdos.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rdos"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"RDOS points 0-16"},{"name":"max_score","type":"integer","description":"Always 16"},{"name":"components","type":"array","description":"Per-item caller-assigned points"},{"name":"citation","type":"object","description":"Campbell et al. J Palliat Med 2010 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"accessory_muscle_use":"0","grunting":"0","heart_rate":"0","look_of_fear":"0","nasal_flaring":"0","paradoxical_breathing":"0","respiratory_rate":"0","restlessness":"0"},{"accessory_muscle_use":"0","grunting":"0","heart_rate":"0","look_of_fear":"0","nasal_flaring":"0","paradoxical_breathing":"0","respiratory_rate":"0","restlessness":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rdos","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rdos?heart_rate=0&respiratory_rate=0&restlessness=0&paradoxical_breathing=0&accessory_muscle_use=0&grunting=0&nasal_flaring=0&look_of_fear=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rdos","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/lips","description":"Gajic 2011 lung injury prediction score (Table 3): caller-assigned predisposing conditions, at most one high-risk surgery type plus emergency add-on, stacking trauma items, and risk modifiers including diabetes -1 only with sepsis. Score is a number; published observed range 0-15.5. Band low if <4, high if >=4 (ROC cutoff). Not an ARDS diagnosis. magent does not examine the patient or read imaging.","parameters":[{"in":"query","name":"shock","type":"boolean","description":"Shock as assigned by the caller (Gajic 2011 Table 3). true scores 2. magent does not examine the patient.","required":true,"example":"true"},{"in":"query","name":"aspiration","type":"boolean","description":"Aspiration as assigned by the caller (Gajic 2011 Table 3). true scores 2. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"sepsis","type":"boolean","description":"Sepsis as assigned by the caller (Gajic 2011 Table 3). true scores 1. magent does not diagnose sepsis.","required":true,"example":"true"},{"in":"query","name":"pneumonia","type":"boolean","description":"Pneumonia as assigned by the caller (Gajic 2011 Table 3). true scores 1.5. magent does not read imaging.","required":true,"example":"true"},{"in":"query","name":"orthopedic_spine","type":"boolean","description":"High-risk orthopedic spine surgery as assigned by the caller (Gajic 2011 Table 3). true scores 1. At most one of orthopedic_spine, acute_abdomen, cardiac, and aortic_vascular may be true.","required":true,"example":"false"},{"in":"query","name":"acute_abdomen","type":"boolean","description":"High-risk acute abdomen surgery as assigned by the caller (Gajic 2011 Table 3). true scores 2. At most one of orthopedic_spine, acute_abdomen, cardiac, and aortic_vascular may be true.","required":true,"example":"false"},{"in":"query","name":"cardiac","type":"boolean","description":"High-risk cardiac surgery as assigned by the caller (Gajic 2011 Table 3). true scores 2.5. At most one of orthopedic_spine, acute_abdomen, cardiac, and aortic_vascular may be true.","required":true,"example":"false"},{"in":"query","name":"aortic_vascular","type":"boolean","description":"High-risk aortic vascular surgery as assigned by the caller (Gajic 2011 Table 3). true scores 3.5. At most one of orthopedic_spine, acute_abdomen, cardiac, and aortic_vascular may be true.","required":true,"example":"false"},{"in":"query","name":"emergency_surgery","type":"boolean","description":"Emergency surgery as assigned by the caller (Gajic 2011 Table 3 footnote *: add 1.5 points if emergency surgery). true scores 1.5 in addition to any one surgery type.","required":true,"example":"false"},{"in":"query","name":"traumatic_brain_injury","type":"boolean","description":"Traumatic brain injury as assigned by the caller (Gajic 2011 Table 3). true scores 2. Trauma items may stack. magent does not read imaging.","required":true,"example":"false"},{"in":"query","name":"smoke_inhalation","type":"boolean","description":"Smoke inhalation as assigned by the caller (Gajic 2011 Table 3). true scores 2. Trauma items may stack.","required":true,"example":"false"},{"in":"query","name":"near_drowning","type":"boolean","description":"Near drowning as assigned by the caller (Gajic 2011 Table 3). true scores 2. Trauma items may stack.","required":true,"example":"false"},{"in":"query","name":"lung_contusion","type":"boolean","description":"Lung contusion as assigned by the caller (Gajic 2011 Table 3). true scores 1.5. Trauma items may stack. magent does not read imaging.","required":true,"example":"false"},{"in":"query","name":"multiple_fractures","type":"boolean","description":"Multiple fractures as assigned by the caller (Gajic 2011 Table 3). true scores 1.5. Trauma items may stack.","required":true,"example":"false"},{"in":"query","name":"alcohol_abuse","type":"boolean","description":"Alcohol abuse as assigned by the caller (Gajic 2011 Table 3). true scores 1.","required":true,"example":"true"},{"in":"query","name":"obesity_bmi_gt_30","type":"boolean","description":"Obesity (BMI >30) as assigned by the caller (Gajic 2011 Table 3). true scores 1. magent does not take height or weight.","required":true,"example":"false"},{"in":"query","name":"hypoalbuminemia","type":"boolean","description":"Hypoalbuminemia as assigned by the caller (Gajic 2011 Table 3). true scores 1. magent does not assay albumin.","required":true,"example":"false"},{"in":"query","name":"chemotherapy","type":"boolean","description":"Chemotherapy as assigned by the caller (Gajic 2011 Table 3). true scores 1.","required":true,"example":"false"},{"in":"query","name":"fio2_gt_035","type":"boolean","description":"FiO2 >0.35 or >4 L/min as assigned by the caller (Gajic 2011 Table 3). true scores 2. magent does not read the ventilator or flowmeter.","required":true,"example":"true"},{"in":"query","name":"tachypnea_rr_gt_30","type":"boolean","description":"Tachypnea (respiratory rate >30) as assigned by the caller (Gajic 2011 Table 3). true scores 1.5. magent does not count respirations.","required":true,"example":"false"},{"in":"query","name":"spo2_lt_95","type":"boolean","description":"SpO2 <95% as assigned by the caller (Gajic 2011 Table 3). true scores 1. magent does not measure SpO2.","required":true,"example":"false"},{"in":"query","name":"acidosis_ph_lt_735","type":"boolean","description":"Acidosis (pH <7.35) as assigned by the caller (Gajic 2011 Table 3). true scores 1.5. magent does not assay blood gas.","required":true,"example":"false"},{"in":"query","name":"diabetes_mellitus","type":"boolean","description":"Diabetes mellitus as assigned by the caller (Gajic 2011 Table 3 footnote dagger). Subtracts 1 only when sepsis is true. If diabetes is true and sepsis is false, 0 points (do not subtract). magent does not diagnose diabetes.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_lips_surgery","message":"at most one high-risk surgery type may be true: orthopedic_spine, acute_abdomen, cardiac, or aortic_vascular (Gajic 2011 Table 3). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/lips","citation":{"authors":"Gajic O, Dabbagh O, Park PK, Adesanya A, Chang SY, Hou P, Anderson H 3rd, Hoth JJ, Mikkelsen ME, Gentile NT, Gong MN, Talmor D, Bajwa E, Watkins TR, Festic E, Yilmaz M, Liendahl M, Khan NA, Sevransky JE, Malinchoc M; US Critical Illness and Injury Trials Group: Lung Injury Prevention Study Investigators (USCIITG-LIPS)","doi":"10.1164/rccm.201004-0549OC","id":"gajic-2011","pmid":"20802164","source":"Am J Respir Crit Care Med. 2011;183(4):462-470","title":"Early Identification of Patients at Risk of Acute Lung Injury: Evaluation of Lung Injury Prediction Score in a Multicenter Cohort Study","url":"https://doi.org/10.1164/rccm.201004-0549OC"},"formula_expression":"LIPS = shock(2) + aspiration(2) + sepsis(1) + pneumonia(1.5) + at most one of orthopedic_spine(1), acute_abdomen(2), cardiac(2.5), aortic_vascular(3.5) + emergency_surgery(1.5) + traumatic_brain_injury(2) + smoke_inhalation(2) + near_drowning(2) + lung_contusion(1.5) + multiple_fractures(1.5) + alcohol_abuse(1) + obesity_bmi_gt_30(1) + hypoalbuminemia(1) + chemotherapy(1) + fio2_gt_035(2) + tachypnea_rr_gt_30(1.5) + spo2_lt_95(1) + acidosis_ph_lt_735(1.5) + diabetes_mellitus(-1 only if sepsis); Gajic 2011 Table 3; published observed range 0-15.5; low <4, high >=4","purpose":"Sum Gajic 2011 Table 3 lung injury prediction score items from caller-assigned flags and return the published ROC cutoff band (low <4, high ≥4).","markdown_url":"https://magentlab.com/docs/lips.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"lips"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"number","description":"LIPS points as a number (0.0, 1.5, 7.5, …). Half-points are allowed."},{"name":"max_score","type":"number","description":"15.5 is the Gajic 2011 published observed upper range, not a sum of every Table 3 row."},{"name":"lips_band","type":"string","description":"Gajic 2011 ROC cutoff: low when score <4, high when score >=4. Not an ARDS diagnosis. No other cut-points."},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Gajic et al. AJRCCM 2011 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"acidosis_ph_lt_735":"false","acute_abdomen":"false","alcohol_abuse":"true","aortic_vascular":"false","aspiration":"false","cardiac":"false","chemotherapy":"false","diabetes_mellitus":"false","emergency_surgery":"false","fio2_gt_035":"true","hypoalbuminemia":"false","lung_contusion":"false","multiple_fractures":"false","near_drowning":"false","obesity_bmi_gt_30":"false","orthopedic_spine":"false","pneumonia":"true","sepsis":"true","shock":"true","smoke_inhalation":"false","spo2_lt_95":"false","tachypnea_rr_gt_30":"false","traumatic_brain_injury":"false"},{"acidosis_ph_lt_735":"false","acute_abdomen":"false","alcohol_abuse":"true","aortic_vascular":"false","aspiration":"false","cardiac":"false","chemotherapy":"false","diabetes_mellitus":"false","emergency_surgery":"false","fio2_gt_035":"true","hypoalbuminemia":"false","lung_contusion":"false","multiple_fractures":"false","near_drowning":"false","obesity_bmi_gt_30":"false","orthopedic_spine":"false","pneumonia":"true","sepsis":"true","shock":"true","smoke_inhalation":"false","spo2_lt_95":"false","tachypnea_rr_gt_30":"false","traumatic_brain_injury":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/lips","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/lips?shock=true&aspiration=false&sepsis=true&pneumonia=true&orthopedic_spine=false&acute_abdomen=false&cardiac=false&aortic_vascular=false&emergency_surgery=false&traumatic_brain_injury=false&smoke_inhalation=false&near_drowning=false&lung_contusion=false&multiple_fractures=false&alcohol_abuse=true&obesity_bmi_gt_30=false&hypoalbuminemia=false&chemotherapy=false&fio2_gt_035=true&tachypnea_rr_gt_30=false&spo2_lt_95=false&acidosis_ph_lt_735=false&diabetes_mellitus=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/lips","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rads","description":"Oh 2012 radiologist's score (RADS) on one 1-cm axial chest CT slice. Four quadrants (not eight). Each quadrant worst finding: normal 0, interstitial 1, ground_glass 2, consolidation 3. Score 0-12; high when score > 8. Caller-assigned findings only; magent does not interpret CT. Not a diagnosis of inhalation injury. Not a bronchoscopy substitute. Not Endorf AIS inhalation grade. Not Yamamura bronchial wall thickness.","parameters":[{"in":"query","name":"q1","type":"string","enum":["normal","interstitial","ground_glass","consolidation"],"description":"Caller-assigned worst finding in that quadrant on one 1-cm axial chest CT slice (Oh 2012 radiologist's score; four quadrants, not eight): normal (0), interstitial / increased interstitial markings (1), ground_glass (2), or consolidation (3). magent does not interpret CT.","required":true,"example":"normal"},{"in":"query","name":"q2","type":"string","enum":["normal","interstitial","ground_glass","consolidation"],"description":"Caller-assigned worst finding in that quadrant on one 1-cm axial chest CT slice (Oh 2012 radiologist's score; four quadrants, not eight): normal (0), interstitial / increased interstitial markings (1), ground_glass (2), or consolidation (3). magent does not interpret CT.","required":true,"example":"normal"},{"in":"query","name":"q3","type":"string","enum":["normal","interstitial","ground_glass","consolidation"],"description":"Caller-assigned worst finding in that quadrant on one 1-cm axial chest CT slice (Oh 2012 radiologist's score; four quadrants, not eight): normal (0), interstitial / increased interstitial markings (1), ground_glass (2), or consolidation (3). magent does not interpret CT.","required":true,"example":"normal"},{"in":"query","name":"q4","type":"string","enum":["normal","interstitial","ground_glass","consolidation"],"description":"Caller-assigned worst finding in that quadrant on one 1-cm axial chest CT slice (Oh 2012 radiologist's score; four quadrants, not eight): normal (0), interstitial / increased interstitial markings (1), ground_glass (2), or consolidation (3). magent does not interpret CT.","required":true,"example":"normal"}],"errors":[{"code":"invalid_rads_finding","message":"each quadrant finding must be normal, interstitial, ground_glass, or consolidation (Oh 2012 RADS). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rads","citation":{"authors":"Oh JS, Chung KK, Allen A, Batchinsky AI, Huzar T, King BT, et al.","doi":"10.1097/BCR.0b013e318237455f","id":"oh-2012","pmid":"22210063","source":"J Burn Care Res. 2012;33(4):532-538","title":"Admission Chest CT Complements Fiberoptic Bronchoscopy in Prediction of Adverse Outcomes in Thermally Injured Patients","url":"https://doi.org/10.1097/BCR.0b013e318237455f"},"formula_expression":"RADS = q1 + q2 + q3 + q4; each quadrant worst finding on one 1-cm axial CT slice (Oh 2012 radiologist's score as reprinted in Dries/Walker 2015 Table 2): normal 0, interstitial (increased interstitial markings) 1, ground_glass 2, consolidation 3; four quadrants (not eight); range 0-12; high iff score > 8 per slice","purpose":"Sum four caller-assigned Oh 2012 radiologist's-score quadrant findings on one 1-cm axial CT slice (normal 0, interstitial 1, ground_glass 2, consolidation 3; range 0-12) and return high when the score is greater than 8.","markdown_url":"https://magentlab.com/docs/rads.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rads"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"RADS points 0-12 (sum of four quadrants)"},{"name":"max_score","type":"integer","description":"12"},{"name":"high","type":"boolean","description":"true iff score > 8 per 1-cm axial slice (Oh 2012: high RADS plus +FOB associated with 12.7-fold composite pneumonia/ALI-ARDS/death). Score 8 is not high."},{"name":"q1","type":"string","description":"Echo of the caller-assigned q1 finding"},{"name":"q2","type":"string","description":"Echo of the caller-assigned q2 finding"},{"name":"q3","type":"string","description":"Echo of the caller-assigned q3 finding"},{"name":"q4","type":"string","description":"Echo of the caller-assigned q4 finding"},{"name":"components","type":"array","description":"Per-quadrant points and finding"},{"name":"citation","type":"object","description":"Oh et al. J Burn Care Res 2012 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"q1":"normal","q2":"normal","q3":"normal","q4":"normal"},{"q1":"normal","q2":"normal","q3":"normal","q4":"normal"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rads","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rads?q1=normal&q2=normal&q3=normal&q4=normal","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rads","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/irae-pneumonitis","description":"Brahmer 2018 ASCO Table 3.1 irAE pneumonitis. First-match: G4 life-threatening respiratory compromise; else G3 hospitalization, oxygen, limiting self-care, or all lobes/>50%; else G2 symptomatic, >1 lobe, 25-50% parenchyma, or limiting instrumental ADL; else G1. ICPi: hold_if_radiographic_progression (G1), hold (G2), permanently_discontinue (G3-4). Caller-assigned flags. magent does not read CT or pulse oximetry. Not SITC 2021, not a CTCAE instrument, not a diagnosis, not a steroid dose.","parameters":[{"in":"query","name":"life_threatening_respiratory","type":"boolean","description":"Life-threatening respiratory compromise with urgent intervention indicated (intubation) as assigned by the caller (Brahmer 2018 Table 3.1 grade 4). true or false. When true, grade is 4 regardless of other flags. magent does not examine the patient or set a ventilator.","required":true,"example":"false"},{"in":"query","name":"hospitalization_required","type":"boolean","description":"Hospitalization required as assigned by the caller (Brahmer 2018 Table 3.1 grade 3). true or false. magent does not decide admission.","required":true,"example":"false"},{"in":"query","name":"oxygen_indicated","type":"boolean","description":"Oxygen indicated as assigned by the caller (Brahmer 2018 Table 3.1 grade 3). true or false. magent does not read pulse oximetry or start oxygen.","required":true,"example":"false"},{"in":"query","name":"limiting_self_care","type":"boolean","description":"Limiting self-care ADL as assigned by the caller (Brahmer 2018 Table 3.1 grade 3). true or false. magent does not assess ADL.","required":true,"example":"false"},{"in":"query","name":"all_lobes_or_gt_50_pct","type":"boolean","description":"Involves all lung lobes or >50% of lung parenchyma as assigned by the caller (Brahmer 2018 Table 3.1 grade 3). true or false. magent does not read CT.","required":true,"example":"false"},{"in":"query","name":"symptomatic","type":"boolean","description":"Symptomatic as assigned by the caller (Brahmer 2018 Table 3.1 grade 2). true or false. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"more_than_one_lobe","type":"boolean","description":"Involves more than one lobe as assigned by the caller (Brahmer 2018 Table 3.1 grade 2). true or false. magent does not read CT.","required":true,"example":"false"},{"in":"query","name":"extent_25_to_50_pct","type":"boolean","description":"Involves 25%–50% of lung parenchyma as assigned by the caller (Brahmer 2018 Table 3.1 grade 2). true or false. magent does not read CT.","required":true,"example":"false"},{"in":"query","name":"limiting_instrumental_adl","type":"boolean","description":"Limiting instrumental ADL as assigned by the caller (Brahmer 2018 Table 3.1 grade 2). true or false. magent does not assess ADL.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/irae-pneumonitis","citation":{"authors":"Brahmer JR, Lacchetti C, Schneider BJ, Atkins MB, Brassil KJ, Caterino JM, Chau I, Ernstoff MS, Gardner JM, Ginex P, Hallmeyer S, Holter Chakrabarty J, Leighl NB, Mammen JS, McDermott DF, Naing A, Nastoupil LJ, Phillips T, Porter LD, Puzanov I, Reichner CA, Santomasso BD, Seigel C, Spira A, Suarez-Almazor ME, Wang Y, Weber JS, Wolchok JD, Thompson JA","doi":"10.1200/JCO.2017.77.6385","id":"brahmer-2018","pmid":"29442540","source":"J Clin Oncol. 2018;36(17):1714-1768","title":"Management of Immune-Related Adverse Events in Patients Treated With Immune Checkpoint Inhibitor Therapy: American Society of Clinical Oncology Clinical Practice Guideline","url":"https://doi.org/10.1200/JCO.2017.77.6385"},"formula_expression":"irae_pneumonitis first-match worst-wins (Brahmer 2018 Table 3.1): grade 4 if life_threatening_respiratory; else grade 3 if hospitalization_required or oxygen_indicated or limiting_self_care or all_lobes_or_gt_50_pct; else grade 2 if symptomatic or more_than_one_lobe or extent_25_to_50_pct or limiting_instrumental_adl; else grade 1. icpi_action hold_if_radiographic_progression (grade 1), hold (grade 2), permanently_discontinue (grade 3 or 4). magent does not read CT or pulse oximetry. Not SITC 2021. Not CTCAE pneumonitis as a separate instrument. Not a diagnosis. Not a steroid dose","purpose":"Apply Brahmer 2018 ASCO Table 3.1 immune-related pneumonitis grading and return grade 1-4 plus the published ICPi hold or permanently-discontinue action from caller-assigned flags.","markdown_url":"https://magentlab.com/docs/irae-pneumonitis.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"irae_pneumonitis"},{"name":"formula_expression","type":"string","description":"Brahmer 2018 Table 3.1 first-match worst-wins pneumonitis grade and ICPi action"},{"name":"grade","type":"integer","description":"1, 2, 3, or 4. First-match worst-wins on caller-assigned Brahmer 2018 Table 3.1 flags. Not a diagnosis. Not a steroid dose."},{"name":"icpi_action","type":"string","description":"hold_if_radiographic_progression (grade 1), hold (grade 2), or permanently_discontinue (grade 3 or 4)"},{"name":"life_threatening_respiratory","type":"boolean","description":"Echo of caller-assigned life_threatening_respiratory (true or false)"},{"name":"hospitalization_required","type":"boolean","description":"Echo of caller-assigned hospitalization_required (true or false)"},{"name":"oxygen_indicated","type":"boolean","description":"Echo of caller-assigned oxygen_indicated (true or false)"},{"name":"limiting_self_care","type":"boolean","description":"Echo of caller-assigned limiting_self_care (true or false)"},{"name":"all_lobes_or_gt_50_pct","type":"boolean","description":"Echo of caller-assigned all_lobes_or_gt_50_pct (true or false)"},{"name":"symptomatic","type":"boolean","description":"Echo of caller-assigned symptomatic (true or false)"},{"name":"more_than_one_lobe","type":"boolean","description":"Echo of caller-assigned more_than_one_lobe (true or false)"},{"name":"extent_25_to_50_pct","type":"boolean","description":"Echo of caller-assigned extent_25_to_50_pct (true or false)"},{"name":"limiting_instrumental_adl","type":"boolean","description":"Echo of caller-assigned limiting_instrumental_adl (true or false)"},{"name":"criteria","type":"array","description":"Per-factor Tree rows with factor and met for each Brahmer 2018 Table 3.1 caller-assigned flag"},{"name":"citation","type":"object","description":"Brahmer 2018 J Clin Oncol ASCO irAE guideline citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"all_lobes_or_gt_50_pct":"false","extent_25_to_50_pct":"false","hospitalization_required":"false","life_threatening_respiratory":"false","limiting_instrumental_adl":"false","limiting_self_care":"false","more_than_one_lobe":"false","oxygen_indicated":"false","symptomatic":"false"},{"all_lobes_or_gt_50_pct":"false","extent_25_to_50_pct":"false","hospitalization_required":"false","life_threatening_respiratory":"false","limiting_instrumental_adl":"false","limiting_self_care":"false","more_than_one_lobe":"false","oxygen_indicated":"false","symptomatic":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/irae-pneumonitis","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/irae-pneumonitis?life_threatening_respiratory=false&hospitalization_required=false&oxygen_indicated=false&limiting_self_care=false&all_lobes_or_gt_50_pct=false&symptomatic=false&more_than_one_lobe=false&extent_25_to_50_pct=false&limiting_instrumental_adl=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/irae-pneumonitis","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/brescia-covid","description":"Duca 2020 Brescia-COVID Respiratory Severity Scale testing-criteria count: four caller-assigned binaries (wheezing or inability to speak in full sentences at rest or with minimal effort; respiratory rate >22; PaO2 <65 mmHg or SpO2 <90%; significant worsening on chest radiograph). bcrss is the count of positives (0–4). magent does not examine the patient or read imaging. Not a COVID-19 diagnosis, ventilator order, or medical device. Not the 0–8 NIV/intubation/proning ladder.","parameters":[{"in":"query","name":"wheezing_or_unable_full_sentences","type":"boolean","description":"Wheezing or inability to speak in full sentences while at rest or with minimal effort, as assigned by the caller (Duca 2020 testing criterion 1). true or false. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"respiratory_rate_gt_22","type":"boolean","description":"Respiratory rate >22 breaths/min as assigned by the caller (Duca 2020 testing criterion 2). true or false. magent does not count breaths.","required":true,"example":"false"},{"in":"query","name":"pao2_lt_65_or_spo2_lt_90","type":"boolean","description":"PaO2 <65 mmHg or SpO2 <90% as assigned by the caller (Duca 2020 testing criterion 3). true or false. magent does not measure SpO2 or PaO2.","required":true,"example":"false"},{"in":"query","name":"chest_radiograph_worsening","type":"boolean","description":"Significant worsening on chest radiograph as assigned by the caller (Duca 2020 testing criterion 4). true or false. magent does not read imaging.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/brescia-covid","citation":{"authors":"Duca A, Piva S, Focà E, Latronico N, Rizzi M","id":"duca-2020","pmid":"32297727","source":"Emerg Med Pract. 2020 Apr 16;22(5 Suppl):CD1-CD2","title":"Calculated Decisions: Brescia-COVID Respiratory Severity Scale (BCRSS)/Algorithm","url":"https://pubmed.ncbi.nlm.nih.gov/32297727"},"formula_expression":"bcrss = wheezing_or_unable_full_sentences + respiratory_rate_gt_22 + pao2_lt_65_or_spo2_lt_90 + chest_radiograph_worsening; each 1 if true; Duca 2020 BCRSS testing criteria; max 4","purpose":"Count the four Duca 2020 BCRSS testing-criteria binaries as assigned by the caller and return the integer total (0–4).","markdown_url":"https://magentlab.com/docs/brescia-covid.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"brescia_covid"},{"name":"formula_expression","type":"string","description":"Duca 2020 BCRSS testing-criteria count of four binaries"},{"name":"bcrss","type":"integer","description":"Count of true testing criteria (0-4). Not a diagnosis or ventilator order."},{"name":"max_score","type":"integer","description":"Always 4"},{"name":"criteria","type":"array","description":"Per-criterion Tree rows with factor and met"},{"name":"citation","type":"object","description":"Duca 2020 Emerg Med Pract citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"chest_radiograph_worsening":"false","pao2_lt_65_or_spo2_lt_90":"false","respiratory_rate_gt_22":"false","wheezing_or_unable_full_sentences":"false"},{"chest_radiograph_worsening":"false","pao2_lt_65_or_spo2_lt_90":"false","respiratory_rate_gt_22":"false","wheezing_or_unable_full_sentences":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/brescia-covid","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/brescia-covid?wheezing_or_unable_full_sentences=false&respiratory_rate_gt_22=false&pao2_lt_65_or_spo2_lt_90=false&chest_radiograph_worsening=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/brescia-covid","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/reveal-pah","description":"Benza 2019 REVEAL 2.0: start at 6; add published points for etiology (CTD +1, PoPH +3, heritable +2), male >60, renal insufficiency, WHO FC, 6-month hospitalization, SBP <110, HR >96, 6MWD, BNP/NT-proBNP, pericardial effusion, DLCO <40%, mRAP >20, and PVR <5. Returns low (0-6), intermediate (7-8), or high (>=9) 12-month mortality. Caller-assigned; not a PAH diagnosis or dose. Not REVEAL 1.0 or Lite 2.","parameters":[{"in":"query","name":"who_fc","type":"integer","description":"WHO / NYHA functional class 1, 2, 3, or 4 (Benza 2019). FC I -1; II 0; III +1; IV +2. Caller-assigned; magent does not interview the patient.","required":true,"example":"1"},{"in":"query","name":"etiology","type":"string","enum":["other","ctd","poph","heritable"],"description":"PAH subgroup (Benza 2019). other (including idiopathic) 0; ctd +1; poph +3; heritable +2. Mutually exclusive. Caller-assigned.","required":true,"example":"other"},{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Male and age >60 scores +2 (Benza 2019).","required":true,"example":"40"},{"in":"query","name":"male","type":"boolean","description":"Male sex as assigned by the caller. true or false. Scores +2 only when age >60.","required":true,"example":"false"},{"in":"query","name":"renal_insufficiency","type":"boolean","description":"eGFR <60 mL/min/1.73 m2 or renal insufficiency by clinical judgment when eGFR is unavailable (Benza 2019). true or false. +1 if true. magent does not compute eGFR.","required":true,"example":"false"},{"in":"query","name":"hospitalization_6mo","type":"boolean","description":"All-cause hospitalization in the prior 6 months (Benza 2019). true or false. +1 if true.","required":true,"example":"false"},{"in":"query","name":"sbp_lt_110","type":"boolean","description":"Systolic blood pressure <110 mmHg as assigned by the caller (Benza 2019). true or false. +1 if true. magent does not measure blood pressure.","required":true,"example":"false"},{"in":"query","name":"hr_gt_96","type":"boolean","description":"Heart rate >96 bpm as assigned by the caller (Benza 2019 REVEAL 2.0, not the 1.0 >92 cutoff). true or false. +1 if true.","required":true,"example":"false"},{"in":"query","name":"six_minute_walk_m","type":"number","description":"Six-minute walk distance in meters 0-1000 (Benza 2019). >=440 -2; 320-<440 -1; 165-<320 0; <165 +1. Caller-assigned; magent does not time the walk.","required":true,"example":"480"},{"in":"query","name":"bnp_pg_ml","type":"number","description":"BNP in pg/mL 0-35000 (Benza 2019). <50 -2; 50-<200 0; 200-<800 +1; >=800 +2. Omit only when sending nt_probnp_pg_ml instead. magent does not assay BNP.","required":true,"example":"40"},{"in":"query","name":"nt_probnp_pg_ml","type":"number","description":"NT-proBNP in pg/mL 0-35000 when BNP is not sent (Benza 2019). <300 -2; 300-<1100 0; >=1100 +2. BNP is used when both are sent.","required":false,"example":"200"},{"in":"query","name":"pericardial_effusion","type":"boolean","description":"Pericardial effusion on echocardiography as assigned by the caller (Benza 2019). true or false. +1 if true. magent does not read the echocardiogram.","required":true,"example":"false"},{"in":"query","name":"dlco_lt_40","type":"boolean","description":"DLCO <40% predicted as assigned by the caller (Benza 2019 REVEAL 2.0, not the 1.0 <=32 / >=80 bands). true or false. +1 if true.","required":true,"example":"false"},{"in":"query","name":"mrap_gt_20","type":"boolean","description":"Mean right atrial pressure >20 mmHg within 1 year as assigned by the caller (Benza 2019). true or false. +1 if true. magent does not catheterize.","required":true,"example":"false"},{"in":"query","name":"pvr_lt_5","type":"boolean","description":"Pulmonary vascular resistance <5 Wood units as assigned by the caller (Benza 2019 REVEAL 2.0, not the 1.0 >32 WU band). true or false. -1 if true.","required":true,"example":"true"}],"errors":[{"code":"invalid_who_fc","message":"who_fc must be 1, 2, 3, or 4 (Benza 2019 REVEAL 2.0 WHO functional class). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_reveal_6mwd","message":"six_minute_walk_m must be a number from 0 to 1000. Returned before settlement; you are not charged.","status":400},{"code":"invalid_bnp_pg_ml","message":"bnp_pg_ml must be a number from 0 to 35000 (Reed 2010 ROSE). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/reveal-pah","citation":{"authors":"Benza RL, Gomberg-Maitland M, Elliott CG, et al.","doi":"10.1016/j.chest.2019.02.004","id":"benza-2019","pmid":"30772387","source":"Chest. 2019;156(2):323-337","title":"Predicting Survival in Patients With Pulmonary Arterial Hypertension: The REVEAL Risk Score Calculator 2.0 and Comparison With ESC/ERS-Based Risk Assessment Strategies","url":"https://doi.org/10.1016/j.chest.2019.02.004"},"formula_expression":"REVEAL 2.0 = 6 + etiology + male_gt_60 + renal_insufficiency + who_fc + hospitalization_6mo + sbp_lt_110 + hr_gt_96 + six_minute_walk + bnp_or_nt_probnp + pericardial_effusion + dlco_lt_40 + mrap_gt_20 + pvr_lt_5; etiology ctd +1, poph +3, heritable +2, other 0; male and age >60 +2; eGFR <60 or renal insufficiency +1; WHO FC I -1, II 0, III +1, IV +2; all-cause hospitalization in prior 6 months +1; SBP <110 mmHg +1; HR >96 bpm +1; 6MWD >=440 m -2, 320-<440 m -1, 165-<320 m 0, <165 m +1; BNP <50 or NT-proBNP <300 -2, BNP 50-<200 or NT-proBNP 300-<1100 0, BNP 200-<800 +1, BNP >=800 or NT-proBNP >=1100 +2; pericardial effusion +1; DLCO <40% predicted +1; mRAP >20 mmHg +1; PVR <5 WU -1; low 0-6, intermediate 7-8, high >=9 (12-month mortality); max 23","purpose":"Sum Benza 2019 REVEAL 2.0 points from etiology, demographics, renal insufficiency, WHO functional class, 6-month hospitalization, vitals, 6MWD, BNP or NT-proBNP, echo, DLCO, and hemodynamics, and return the published low / intermediate / high 12-month mortality category.","markdown_url":"https://magentlab.com/docs/reveal-pah.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"reveal_pah"},{"name":"formula_expression","type":"string","description":"Exact Benza 2019 expression"},{"name":"score","type":"integer","description":"REVEAL 2.0 points 0-23 including the start of 6"},{"name":"max_score","type":"integer","description":"23"},{"name":"risk","type":"string","description":"Benza 2019 three-category 12-month mortality: low (0-6), intermediate (7-8), high (>=9). Not a diagnosis or dose."},{"name":"who_fc","type":"integer","description":"WHO functional class 1-4 used"},{"name":"etiology","type":"string","description":"other, ctd, poph, or heritable"},{"name":"age_years","type":"integer","description":"Age used for male >60"},{"name":"male","type":"boolean","description":"Male flag used"},{"name":"renal_insufficiency","type":"boolean","description":"Renal insufficiency flag used"},{"name":"hospitalization_6mo","type":"boolean","description":"6-month hospitalization flag used"},{"name":"sbp_lt_110","type":"boolean","description":"SBP <110 flag used"},{"name":"hr_gt_96","type":"boolean","description":"HR >96 flag used"},{"name":"six_minute_walk_m","type":"number","description":"Walk distance in meters used"},{"name":"bnp_pg_ml","type":"number","description":"BNP pg/mL when that peptide was used"},{"name":"nt_probnp_pg_ml","type":"number","description":"NT-proBNP pg/mL when that peptide was used"},{"name":"pericardial_effusion","type":"boolean","description":"Pericardial effusion flag used"},{"name":"dlco_lt_40","type":"boolean","description":"DLCO <40% predicted flag used"},{"name":"mrap_gt_20","type":"boolean","description":"mRAP >20 mmHg flag used"},{"name":"pvr_lt_5","type":"boolean","description":"PVR <5 WU flag used"},{"name":"components","type":"array","description":"Per-factor points including the start of 6"},{"name":"citation","type":"object","description":"Benza et al. Chest 2019 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"40","bnp_pg_ml":"40","dlco_lt_40":"false","etiology":"other","hospitalization_6mo":"false","hr_gt_96":"false","male":"false","mrap_gt_20":"false","pericardial_effusion":"false","pvr_lt_5":"true","renal_insufficiency":"false","sbp_lt_110":"false","six_minute_walk_m":"480","who_fc":"1"},{"age":"40","bnp_pg_ml":"40","dlco_lt_40":"false","etiology":"other","hospitalization_6mo":"false","hr_gt_96":"false","male":"false","mrap_gt_20":"false","pericardial_effusion":"false","pvr_lt_5":"true","renal_insufficiency":"false","sbp_lt_110":"false","six_minute_walk_m":"480","who_fc":"1"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/reveal-pah","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/reveal-pah?who_fc=1&etiology=other&age=40&male=false&renal_insufficiency=false&hospitalization_6mo=false&sbp_lt_110=false&hr_gt_96=false&six_minute_walk_m=480&bnp_pg_ml=40&pericardial_effusion=false&dlco_lt_40=false&mrap_gt_20=false&pvr_lt_5=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/reveal-pah","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/macocha","description":"De Jong 2013 MACOCHA from seven caller-assigned flags: Mallampati III or IV (5), OSA (2), reduced cervical mobility (1), mouth opening <3 cm (1), coma (1), SpO2 <80% (1), non-anesthesiologist (1). Total 0-12 (0 easy, 12 very difficult); high_risk at >=3. Not an intubation order. magent does not examine the airway, compute GCS, or measure SpO2.","parameters":[{"in":"query","name":"mallampati_iii_iv","type":"boolean","description":"Mallampati class III or IV as assigned by the caller (De Jong 2013 Table 1). true or false. Not a 1-4 Mallampati integer. magent does not examine the airway.","required":true,"example":"false"},{"in":"query","name":"obstructive_sleep_apnea","type":"boolean","description":"Obstructive sleep apnea syndrome as assigned by the caller (De Jong 2013 Table 1). true or false. magent does not diagnose sleep apnea.","required":true,"example":"false"},{"in":"query","name":"reduced_cervical_mobility","type":"boolean","description":"Reduced mobility of the cervical spine as assigned by the caller (De Jong 2013 Table 1). true or false. magent does not examine the neck.","required":true,"example":"false"},{"in":"query","name":"limited_mouth_opening","type":"boolean","description":"Limited mouth opening <3 cm as assigned by the caller (De Jong 2013 Table 1). true or false. magent does not measure mouth opening.","required":true,"example":"false"},{"in":"query","name":"coma","type":"boolean","description":"Coma as assigned by the caller (De Jong 2013 Table 1 pathology item; typically GCS <8 in that derivation). true or false. magent does not take raw GCS or compute GCS.","required":true,"example":"false"},{"in":"query","name":"severe_hypoxemia","type":"boolean","description":"Severe hypoxemia (SpO2 <80%) as assigned by the caller (De Jong 2013 Table 1). true or false. magent does not measure SpO2.","required":true,"example":"false"},{"in":"query","name":"non_anesthesiologist","type":"boolean","description":"Non-anesthesiologist operator as assigned by the caller (De Jong 2013 Table 1). true or false. magent does not identify the operator.","required":true,"example":"false"}],"errors":[{"code":"invalid_macocha","message":"MACOCHA inputs must match De Jong 2013 Mallampati, sleep apnea, cervical mobility, mouth opening, coma, hypoxia, and operator factors from that paper. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/macocha","citation":{"authors":"De Jong A, Molinari N, Terzi N, Mongardon N, Arnal JM, Guitton C, et al.","doi":"10.1164/rccm.201210-1851OC","id":"de-jong-2013","pmid":"23348979","source":"Am J Respir Crit Care Med. 2013;187(8):832-839","title":"Early identification of patients at risk for difficult intubation in the intensive care unit: development and validation of the MACOCHA score in a multicenter cohort study","url":"https://doi.org/10.1164/rccm.201210-1851OC"},"formula_expression":"MACOCHA = mallampati_iii_iv (5) + obstructive_sleep_apnea (2) + reduced_cervical_mobility (1) + limited_mouth_opening (1) + coma (1) + severe_hypoxemia (1) + non_anesthesiologist (1); De Jong 2013 Table 1; max 12; 0 easy, 12 very difficult; high_risk iff score >= 3","purpose":"Sum the seven De Jong 2013 Table 1 MACOCHA factors from caller-assigned flags and return the 0-12 total plus high_risk at that paper's score >= 3 cutoff.","markdown_url":"https://magentlab.com/docs/macocha.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"macocha"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"MACOCHA points 0-12"},{"name":"max_score","type":"integer","description":"Always 12"},{"name":"high_risk","type":"boolean","description":"true iff score >= 3 (De Jong 2013 operating point for ruling out difficult intubation; NPV ~98% in that validation cohort). Not an intubation order."},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"De Jong 2013 Am J Respir Crit Care Med citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"coma":"false","limited_mouth_opening":"false","mallampati_iii_iv":"false","non_anesthesiologist":"false","obstructive_sleep_apnea":"false","reduced_cervical_mobility":"false","severe_hypoxemia":"false"},{"coma":"false","limited_mouth_opening":"false","mallampati_iii_iv":"false","non_anesthesiologist":"false","obstructive_sleep_apnea":"false","reduced_cervical_mobility":"false","severe_hypoxemia":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/macocha","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/macocha?mallampati_iii_iv=false&obstructive_sleep_apnea=false&reduced_cervical_mobility=false&limited_mouth_opening=false&coma=false&severe_hypoxemia=false&non_anesthesiologist=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/macocha","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/roth","description":"Chorin 2016 Roth score: caller max_count (integer 1-30, highest number reached counting 1 to 30 in one breath) and counting_time_seconds (greater than 0, at most 60). Echoes both; time to 1 decimal. Flags quote Table 2/discussion: max_count <10, counting_time <7 s, max_count <7, counting_time <5 s. Not a hypoxia class or 2021 general-practice cutoff. Not a medical device. magent does not time the patient.","parameters":[{"in":"query","name":"max_count","type":"integer","description":"Highest number reached counting 1 to 30 in one breath (integer 1-30). Caller supplies the count. magent does not administer the count.","required":true,"example":"30"},{"in":"query","name":"counting_time_seconds","type":"number","description":"Elapsed seconds from 1 until the highest number reached (greater than 0 and at most 60). Caller supplies the stopwatch reading. magent does not time the patient.","required":true,"example":"12"}],"errors":[{"code":"invalid_roth","message":"Roth-score inputs must be max_count 1-30 and counting_time_seconds as used in Chorin 2016. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/roth","citation":{"authors":"Chorin E, Padegimas A, Havakuk O, Birati EY, Shacham Y, Milman A, Topaz G, Flint N, Keren G, Rogowski O","doi":"10.1002/clc.22586","id":"chorin-2016","pmid":"27701750","source":"Clin Cardiol. 2016;39(11):636-639","title":"Assessment of respiratory distress by the Roth score","url":"https://doi.org/10.1002/clc.22586"},"formula_expression":"echo max_count (integer 1-30) and counting_time_seconds (Equation.round_at 1 decimal); Chorin 2016 Table 2/discussion flags max_count <10, counting_time <7 s, max_count <7, counting_time <5 s; not a hypoxia class","purpose":"Echo Chorin 2016 Roth-score measurements (highest number reached counting 1 to 30 in one breath, and elapsed counting time) plus Table 2/discussion threshold flags.","markdown_url":"https://magentlab.com/docs/roth.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"roth"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"max_count","type":"integer","description":"Highest number reached, integer 1-30"},{"name":"counting_time_seconds","type":"number","description":"Elapsed counting time in seconds, 1 decimal"},{"name":"max_count_lt_10","type":"boolean","description":"true iff max_count < 10 (Chorin 2016 Table 2 / discussion; 91% sensitivity for room-air pulse oximetry <95%). Not a hypoxia class."},{"name":"counting_time_lt_7_seconds","type":"boolean","description":"true iff counting_time_seconds < 7 (Chorin 2016 Table 2 / discussion; 83% sensitivity for room-air pulse oximetry <95%). Not a hypoxia class."},{"name":"max_count_lt_7","type":"boolean","description":"true iff max_count < 7 (Chorin 2016 Table 2 / discussion; 87% sensitivity for room-air pulse oximetry <90%). Not a hypoxia class."},{"name":"counting_time_lt_5_seconds","type":"boolean","description":"true iff counting_time_seconds < 5 (Chorin 2016 Table 2 / discussion; 82% sensitivity for room-air pulse oximetry <90%). Not a hypoxia class."},{"name":"citation","type":"object","description":"Chorin 2016 Clin Cardiol citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"counting_time_seconds":"12","max_count":"30"},{"counting_time_seconds":"12","max_count":"30"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/roth","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/roth?max_count=30&counting_time_seconds=12","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/roth","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/cstat","description":"Static respiratory-system compliance (Cstat) as in ARDS Network 2000 methods: Cstat (mL/cm H2O) = tidal_volume_ml / (pplat_cm_h2o - peep_cm_h2o). Caller supplies the three measured terms. Rejects Pplat less than or equal to PEEP. Does not invent ARDS severity bands from Cstat (Murray 1988 compliance bands are a different tool). Not a ventilator order or medical device. magent does not read the ventilator.","parameters":[{"in":"query","name":"tidal_volume_ml","type":"number","description":"Expired tidal volume in mL (50-2000, magent clamp). Caller supplies the measured term. magent does not read the ventilator.","required":true,"example":"500"},{"in":"query","name":"pplat_cm_h2o","type":"number","description":"End-inspiratory plateau pressure in cm H2O (5-80, magent clamp). Must be greater than PEEP. magent does not read the ventilator.","required":true,"example":"20"},{"in":"query","name":"peep_cm_h2o","type":"number","description":"Positive end-expiratory pressure in cm H2O (0-40, magent clamp). Must be less than plateau pressure. magent does not read the ventilator.","required":true,"example":"5"}],"errors":[{"code":"invalid_cstat","message":"Static compliance needs tidal_volume_ml, pplat_cm_h2o greater than peep_cm_h2o, as used in the ARDS Network 2000 methods. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/cstat","citation":{"authors":"Acute Respiratory Distress Syndrome Network; Brower RG, Matthay MA, Morris A, Schoenfeld D, Thompson BT, Wheeler A","doi":"10.1056/NEJM200005043421801","id":"ardsnet-2000","pmid":"10793162","source":"N Engl J Med. 2000;342(18):1301-1308","title":"Ventilation with lower tidal volumes as compared with traditional tidal volumes for acute lung injury and the acute respiratory distress syndrome","url":"https://doi.org/10.1056/NEJM200005043421801"},"formula_expression":"cstat_ml_cm_h2o = tidal_volume_ml / (pplat_cm_h2o - peep_cm_h2o)","purpose":"Compute static respiratory-system compliance in mL/cm H2O as tidal volume divided by plateau pressure minus PEEP, as used in the ARDS Network 2000 methods.","markdown_url":"https://magentlab.com/docs/cstat.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"cstat"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"tidal_volume_ml","type":"number","description":"Tidal volume used, mL"},{"name":"pplat_cm_h2o","type":"number","description":"Plateau pressure used, cm H2O"},{"name":"peep_cm_h2o","type":"number","description":"PEEP used, cm H2O"},{"name":"driving_pressure_cm_h2o","type":"number","description":"Pplat minus PEEP in cm H2O, 1 decimal"},{"name":"cstat_ml_cm_h2o","type":"number","description":"Static respiratory-system compliance in mL/cm H2O, 1 decimal"},{"name":"citation","type":"object","description":"ARDS Network 2000 NEJM citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"peep_cm_h2o":"5","pplat_cm_h2o":"20","tidal_volume_ml":"500"},{"peep_cm_h2o":"5","pplat_cm_h2o":"20","tidal_volume_ml":"500"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/cstat","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/cstat?tidal_volume_ml=500&pplat_cm_h2o=20&peep_cm_h2o=5","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/cstat","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/pack-years","description":"NCI pack-year smoking exposure: pack_years = packs_per_day x years_smoked. One pack per day for one year is one pack-year; two packs per day for 0.5 year is the same. Provide packs_per_day (0-10) or cigarettes_per_day (0-200; 20 cigarettes = 1 pack), not both, plus years_smoked (0-80). magent does not take a smoking history interview. Not a lung-cancer screening order, COPD diagnosis, or medical device.","parameters":[{"in":"query","name":"packs_per_day","type":"number","description":"Cigarette packs smoked per day (0-10, magent clamp; NCI does not publish an input band). Provide this or cigarettes_per_day, not both. NCI: 1 pack/day for 1 year = 1 pack-year.","required":false,"example":"1"},{"in":"query","name":"cigarettes_per_day","type":"number","description":"Cigarettes smoked per day (0-200, magent clamp). Converted as packs_per_day = cigarettes_per_day / 20. Provide this or packs_per_day, not both.","required":false,"example":"10"},{"in":"query","name":"years_smoked","type":"number","description":"Years smoked (0-80, magent clamp; NCI does not publish an input band). NCI: 2 packs/day for 0.5 year = 1 pack-year. magent does not take a smoking history interview.","required":true,"example":"1"}],"errors":[{"code":"invalid_pack_years","message":"Pack-years need packs_per_day (or cigarettes_per_day) and years_smoked as non-negative numbers. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/pack-years","citation":{"authors":"National Cancer Institute","id":"nci-pack-year","source":"NCI Dictionaries","title":"NCI Dictionary of Cancer Terms: pack year","url":"https://www.cancer.gov/publications/dictionaries/cancer-terms/def/pack-year"},"formula_expression":"pack_years = packs_per_day × years_smoked","purpose":"Compute NCI pack-year smoking exposure as packs_per_day × years_smoked. Caller supplies packs per day or cigarettes per day (20 cigarettes = 1 pack) and years smoked.","markdown_url":"https://magentlab.com/docs/pack-years.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"pack_years"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"packs_per_day","type":"number","description":"Packs per day used (cigarettes_per_day inputs converted /20)"},{"name":"years_smoked","type":"number","description":"Years smoked used"},{"name":"pack_years","type":"number","description":"NCI pack-years, 1 decimal"},{"name":"citation","type":"object","description":"NCI pack-year dictionary citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"packs_per_day":"1","years_smoked":"1"},{"packs_per_day":"1","years_smoked":"1"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/pack-years","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/pack-years?packs_per_day=1&years_smoked=1","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/pack-years","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/resp","description":"Schmidt 2014 RESP Table 3 (-22 to 15): age 18-49 0, 50-59 -2, >=60 -3; immunocompromised -2; MV lt_48h +3, h48_to_7d +1, gt_7d 0; one diagnosis (viral/bacterial pneumonia +3, asthma +11, trauma_burn +3, aspiration_pneumonitis +5, other acute +1, nonrespiratory 0); CNS -7; nonpulmonary infection -3; NMB +1; NO -1; bicarbonate -2; arrest -2; PaCO2 >=75 -1; PIP >=42 -1. Class I >=6 92%, II 3-5 76%, III -1 to 2 57%, IV -5 to -2 33%, V <=-6 18%. Not an ECMO order.","parameters":[{"in":"query","name":"age_years","type":"integer","description":"Age in years, integer 18-120, as assigned before ECMO (Schmidt 2014 Table 3). 18-49 → 0; 50-59 → -2; ≥60 → -3.","required":true,"example":"40"},{"in":"query","name":"immunocompromised","type":"boolean","description":"Immunocompromised status as assigned by the caller (Schmidt 2014: malignancy, solid organ transplant, HIV, or cirrhosis). true or false. true scores -2.","required":true,"example":"false"},{"in":"query","name":"mechanical_ventilation_before_ecmo","type":"string","enum":["lt_48h","h48_to_7d","gt_7d"],"description":"Duration of mechanical ventilation before ECMO as one token (Schmidt 2014 Table 3). lt_48h → +3; h48_to_7d → +1; gt_7d → 0. magent does not subtract timestamps.","required":true,"example":"lt_48h"},{"in":"query","name":"diagnosis","type":"string","enum":["viral_pneumonia","bacterial_pneumonia","asthma","trauma_burn","aspiration_pneumonitis","other_acute_respiratory","nonrespiratory_or_chronic_respiratory"],"description":"One acute respiratory diagnosis group (Schmidt 2014 Table 3). viral_pneumonia → +3; bacterial_pneumonia → +3; asthma → +11; trauma_burn → +3; aspiration_pneumonitis → +5; other_acute_respiratory → +1; nonrespiratory_or_chronic_respiratory → 0. Select one token. magent does not diagnose.","required":true,"example":"viral_pneumonia"},{"in":"query","name":"cns_dysfunction","type":"boolean","description":"Central nervous system dysfunction as assigned by the caller (Schmidt 2014: neurotrauma, stroke, encephalopathy, cerebral embolism, or seizure). true or false. true scores -7. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"acute_nonpulmonary_infection","type":"boolean","description":"Acute associated (nonpulmonary) infection as assigned by the caller (Schmidt 2014: bacteremia, pneumonia diagnosed >48 h before ECMO, or infected burns). true or false. true scores -3.","required":true,"example":"false"},{"in":"query","name":"neuromuscular_blockade_before_ecmo","type":"boolean","description":"Neuromuscular blockade agents before ECMO as assigned by the caller (Schmidt 2014 Table 3). true or false. true scores +1.","required":true,"example":"false"},{"in":"query","name":"nitric_oxide_before_ecmo","type":"boolean","description":"Nitric oxide use before ECMO as assigned by the caller (Schmidt 2014 Table 3). true or false. true scores -1.","required":true,"example":"false"},{"in":"query","name":"bicarbonate_infusion_before_ecmo","type":"boolean","description":"Bicarbonate infusion before ECMO as assigned by the caller (Schmidt 2014 Table 3). true or false. true scores -2.","required":true,"example":"false"},{"in":"query","name":"cardiac_arrest_before_ecmo","type":"boolean","description":"Cardiac arrest before ECMO as assigned by the caller (Schmidt 2014 Table 3). true or false. true scores -2.","required":true,"example":"false"},{"in":"query","name":"paco2_mm_hg","type":"number","description":"Arterial PaCO2 in mm Hg (8-200) as assigned before ECMO. ≥75 scores -1 (Schmidt 2014 Table 3; the paper also states ≥10 kPa). magent does not convert kPa and does not read an ABG.","required":true,"example":"40"},{"in":"query","name":"peak_inspiratory_pressure_cm_h2o","type":"number","description":"Peak inspiratory pressure in cm H2O (5-80) as assigned before ECMO. ≥42 scores -1 (Schmidt 2014 Table 3). magent does not read a ventilator.","required":true,"example":"30"}],"errors":[{"code":"invalid_resp","message":"RESP needs Schmidt 2014 pre-ECMO respiratory-failure predictors in published ranges. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/resp","citation":{"authors":"Schmidt M, Bailey M, Sheldrake J, et al.","doi":"10.1164/rccm.201311-2023OC","id":"schmidt-2014","pmid":"24693864","source":"Am J Respir Crit Care Med. 2014;189(11):1374-1382","title":"Predicting Survival after Extracorporeal Membrane Oxygenation for Severe Acute Respiratory Failure. The Respiratory Extracorporeal Membrane Oxygenation Survival Prediction (RESP) Score","url":"https://doi.org/10.1164/rccm.201311-2023OC"},"formula_expression":"RESP = age_years (18-49 → 0, 50-59 → -2, ≥60 → -3) + immunocompromised (-2) + mechanical_ventilation_before_ecmo (lt_48h → 3, h48_to_7d → 1, gt_7d → 0) + diagnosis (viral_pneumonia → 3, bacterial_pneumonia → 3, asthma → 11, trauma_burn → 3, aspiration_pneumonitis → 5, other_acute_respiratory → 1, nonrespiratory_or_chronic_respiratory → 0) + cns_dysfunction (-7) + acute_nonpulmonary_infection (-3) + neuromuscular_blockade_before_ecmo (1) + nitric_oxide_before_ecmo (-1) + bicarbonate_infusion_before_ecmo (-2) + cardiac_arrest_before_ecmo (-2) + (paco2_mm_hg ≥75 → -1) + (peak_inspiratory_pressure_cm_h2o ≥42 → -1); Schmidt 2014 Table 3; range -22 to 15; class I ≥6 (92%), II 3 to 5 (76%), III -1 to 2 (57%), IV -5 to -2 (33%), V ≤-6 (18%) hospital survival","purpose":"Sum Schmidt 2014 Table 3 RESP points from caller-assigned pre-ECMO predictors and return class I–V with published hospital survival percents.","markdown_url":"https://magentlab.com/docs/resp.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"resp"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Schmidt 2014 Table 3 RESP points, theoretical range -22 to 15"},{"name":"min_score","type":"integer","description":"-22"},{"name":"max_score","type":"integer","description":"15"},{"name":"resp_class","type":"string","description":"Schmidt 2014 risk class I (≥6), II (3 to 5), III (-1 to 2), IV (-5 to -2), or V (≤-6). A class, not an ECMO order."},{"name":"hospital_survival_percent","type":"integer","description":"Published hospital survival percent for the class: I 92, II 76, III 57, IV 33, V 18. Not a continuous logit."},{"name":"age_years","type":"integer","description":"Age in years used for Table 3 age points"},{"name":"diagnosis","type":"string","description":"Diagnosis token used (one Table 3 group)"},{"name":"mechanical_ventilation_before_ecmo","type":"string","description":"Mechanical-ventilation duration token used"},{"name":"paco2_mm_hg","type":"number","description":"Arterial PaCO2 in mm Hg used for the ≥75 cutoff"},{"name":"peak_inspiratory_pressure_cm_h2o","type":"number","description":"Peak inspiratory pressure in cm H2O used for the ≥42 cutoff"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Schmidt et al. Am J Respir Crit Care Med 2014 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"acute_nonpulmonary_infection":"false","age_years":"40","bicarbonate_infusion_before_ecmo":"false","cardiac_arrest_before_ecmo":"false","cns_dysfunction":"false","diagnosis":"viral_pneumonia","immunocompromised":"false","mechanical_ventilation_before_ecmo":"lt_48h","neuromuscular_blockade_before_ecmo":"false","nitric_oxide_before_ecmo":"false","paco2_mm_hg":"40","peak_inspiratory_pressure_cm_h2o":"30"},{"acute_nonpulmonary_infection":"false","age_years":"40","bicarbonate_infusion_before_ecmo":"false","cardiac_arrest_before_ecmo":"false","cns_dysfunction":"false","diagnosis":"viral_pneumonia","immunocompromised":"false","mechanical_ventilation_before_ecmo":"lt_48h","neuromuscular_blockade_before_ecmo":"false","nitric_oxide_before_ecmo":"false","paco2_mm_hg":"40","peak_inspiratory_pressure_cm_h2o":"30"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/resp","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/resp?age_years=40&immunocompromised=false&mechanical_ventilation_before_ecmo=lt_48h&diagnosis=viral_pneumonia&cns_dysfunction=false&acute_nonpulmonary_infection=false&neuromuscular_blockade_before_ecmo=false&nitric_oxide_before_ecmo=false&bicarbonate_infusion_before_ecmo=false&cardiac_arrest_before_ecmo=false&paco2_mm_hg=40&peak_inspiratory_pressure_cm_h2o=30","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/resp","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/preset","description":"Hilder 2017 PRESET-Score: five Table 4 items (MAP mm Hg, lactate mmol/L, arterial pH, platelets k/uL, hospital days pre-ECMO) summed 0-15. Returns class I (0-5, 26% ICU mortality), II (6-9, 68%), or III (10-15, 93%) from the derivation cohort. Deterministic published arithmetic with citation; not a cannulation order; magent does not assay labs. Not RESP or SAVE.","parameters":[{"in":"query","name":"mean_arterial_pressure_mm_hg","type":"number","description":"Mean arterial pressure in mm Hg (20-250). Hilder 2017 Table 4: >100 → 0, 91-100 → 1, 81-90 → 2, 71-80 → 3, ≤70 → 4. magent does not measure blood pressure.","required":true,"example":"110"},{"in":"query","name":"lactate_mmol_l","type":"number","description":"Lactate in mmol/L (0.0-30.0). Hilder 2017 Table 4: ≤1.50 → 0, 1.51-3.00 → 1, 3.01-6.00 → 2, 6.01-10.00 → 3, >10.00 → 4. magent does not assay labs.","required":true,"example":"1.0"},{"in":"query","name":"arterial_ph","type":"number","description":"Arterial pH (6.5-8.0). Hilder 2017 Table 4: >7.300 → 0, 7.201-7.300 → 1, 7.101-7.200 → 2, ≤7.100 → 3. magent does not assay blood gas.","required":true,"example":"7.40"},{"in":"query","name":"platelets_k_ul","type":"number","description":"Platelet concentration ×1000/µL (1-2000). Hilder 2017 Table 4: >200 → 0, 101-200 → 1, ≤100 → 2. magent does not assay labs.","required":true,"example":"250"},{"in":"query","name":"hospital_days_pre_ecmo","type":"integer","description":"Hospital days before ECMO initiation (integer 0-365). Hilder 2017 Table 4: ≤2 → 0, 3-7 → 1, >7 → 2. Not a cannulation order.","required":true,"example":"1"}],"errors":[{"code":"invalid_preset","message":"PRESET needs Hilder 2017 MAP, lactate, pH, platelets, and pre-ECMO hospital days in published ranges. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/preset","citation":{"authors":"Hilder M, Herbstreit F, Adamzik M, et al.","doi":"10.1186/s13054-017-1888-6","id":"hilder-2017","pmid":"29233160","source":"Crit Care. 2017;21(1):301","title":"Comparison of mortality prediction models in acute respiratory distress syndrome undergoing extracorporeal membrane oxygenation and development of a novel prediction score: the PREdiction of Survival on ECMO Therapy-Score (PRESET-Score)","url":"https://doi.org/10.1186/s13054-017-1888-6"},"formula_expression":"PRESET = map_points + lactate_points + ph_points + platelet_points + hospital_days_points; Hilder 2017 Table 4; MAP >100 → 0, 91-100 → 1, 81-90 → 2, 71-80 → 3, ≤70 → 4; lactate ≤1.50 → 0, 1.51-3.00 → 1, 3.01-6.00 → 2, 6.01-10.00 → 3, >10.00 → 4; arterial pH >7.300 → 0, 7.201-7.300 → 1, 7.101-7.200 → 2, ≤7.100 → 3; platelets >200 → 0, 101-200 → 1, ≤100 → 2; hospital days pre-ECMO ≤2 → 0, 3-7 → 1, >7 → 2; max 15; class I 0-5 (26%), II 6-9 (68%), III 10-15 (93%) derivation ICU mortality","purpose":"Sum the five Hilder 2017 PRESET-Score items and return class I–III with derivation ICU mortality.","markdown_url":"https://magentlab.com/docs/preset.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"preset"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"PRESET-Score points 0-15"},{"name":"max_score","type":"integer","description":"Always 15"},{"name":"preset_class","type":"string","description":"Hilder 2017 derivation risk class I (0-5), II (6-9), or III (10-15). Not a 0-3 / 4-5 website split."},{"name":"icu_mortality_percent","type":"integer","description":"Derivation-cohort ICU mortality for that class: 26 (I), 68 (II), or 93 (III)."},{"name":"mean_arterial_pressure_mm_hg","type":"number","description":"MAP used, mm Hg"},{"name":"lactate_mmol_l","type":"number","description":"Lactate used, mmol/L"},{"name":"arterial_ph","type":"number","description":"Arterial pH used"},{"name":"platelets_k_ul","type":"number","description":"Platelets used, ×1000/µL"},{"name":"hospital_days_pre_ecmo","type":"integer","description":"Hospital days before ECMO used"},{"name":"components","type":"array","description":"Per-item points"},{"name":"citation","type":"object","description":"Hilder et al. Crit Care 2017 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"arterial_ph":"7.40","hospital_days_pre_ecmo":"1","lactate_mmol_l":"1.0","mean_arterial_pressure_mm_hg":"110","platelets_k_ul":"250"},{"arterial_ph":"7.40","hospital_days_pre_ecmo":"1","lactate_mmol_l":"1.0","mean_arterial_pressure_mm_hg":"110","platelets_k_ul":"250"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/preset","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/preset?mean_arterial_pressure_mm_hg=110&lactate_mmol_l=1.0&arterial_ph=7.40&platelets_k_ul=250&hospital_days_pre_ecmo=1","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/preset","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/egfr","description":"Returns CKD-EPI 2021 race-free creatinine eGFR in mL/min/1.73 m² (Inker 2021).","parameters":[{"in":"query","name":"creatinine_mg_dl","type":"number","description":"Serum creatinine in mg/dL. Provide this or creatinine_umol_l.","required":false,"example":"1.1"},{"in":"query","name":"creatinine_umol_l","type":"number","description":"Serum creatinine in µmol/L. Converted as mg/dL = µmol/L / 88.42.","required":false,"example":"97.2"},{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). CKD-EPI 2021 is validated in adults.","required":true,"example":"65"},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"Sex used by the published equation. female or male.","required":true,"example":"female"}],"errors":[{"code":"invalid_creatinine","message":"creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/egfr","citation":{"authors":"Inker LA, Eneanya ND, Coresh J, et al.","doi":"10.1056/NEJMoa2102953","id":"inker-2021","source":"N Engl J Med. 2021;385(19):1737-1749","title":"New Creatinine- and Cystatin C-Based Equations to Estimate GFR without Race","url":"https://doi.org/10.1056/NEJMoa2102953"},"formula_expression":"142 * min(Scr/κ,1)^α * max(Scr/κ,1)^(-1.200) * 0.9938^age * (1.012 if female)","purpose":"Returns eGFR (mL/min/1.73 m²) computed with the CKD-EPI 2021 race-free creatinine equation; cites Inker et al., NEJM 2021.","markdown_url":"https://magentlab.com/docs/egfr.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"ckd_epi_2021_creatinine"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"creatinine_mg_dl","type":"number","description":"Normalized creatinine"},{"name":"age_years","type":"integer","description":"Age used in the equation"},{"name":"sex","type":"string","description":"female or male"},{"name":"egfr_ml_min_1_73m2","type":"number","description":"Estimated GFR, 1 decimal place"},{"name":"units","type":"string","description":"mL/min/1.73m2"},{"name":"citation","type":"object","description":"NEJM 2021 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"65","creatinine_mg_dl":"1.1","sex":"female"},{"age":"65","creatinine_mg_dl":"1.1","sex":"female"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/egfr","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/egfr?creatinine_mg_dl=1.1&age=65&sex=female","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/egfr","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/mdrd","description":"IDMS 4-variable MDRD eGFR (Levey 2006) from standardized creatinine, adult age, sex, and caller-assigned Black. magent does not assign race. Deterministic published formula with citation; not CKD-EPI 2021 and not a dosing recommendation.","parameters":[{"in":"query","name":"creatinine_mg_dl","type":"number","description":"Serum creatinine in mg/dL (0.1-20). Provide this or creatinine_umol_l.","required":false,"example":1.1},{"in":"query","name":"creatinine_umol_l","type":"number","description":"Serum creatinine in µmol/L. Converted as mg/dL = µmol/L / 88.42. IDMS-traceable standardized creatinine as in Levey 2006.","required":false,"example":97.262},{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). MDRD is for adults.","required":true,"example":65},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"Sex used by the published equation. female applies 0.742; male does not.","required":true,"example":"female"},{"in":"query","name":"black","type":"boolean","description":"Caller-assigned Black as used in Levey 2006; magent does not assign race. true applies 1.212.","required":true,"example":false}],"errors":[{"code":"invalid_creatinine","message":"creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_mdrd","message":"MDRD needs IDMS creatinine, adult age, sex, and caller-assigned black as used in Levey 2006. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/mdrd","citation":{"authors":"Levey AS, Coresh J, Greene T, Stevens LA, Zhang YL, Hendriksen S, Kusek JW, Van Lente F","doi":"10.7326/0003-4819-145-4-200608150-00004","id":"levey-2006-mdrd","pmid":"16908915","source":"Ann Intern Med. 2006;145(4):247-254","title":"Using Standardized Serum Creatinine Values in the Modification of Diet in Renal Disease Study Equation for Estimating Glomerular Filtration Rate","url":"https://doi.org/10.7326/0003-4819-145-4-200608150-00004"},"formula_expression":"egfr = 175 * scr_mg_dl ** -1.154 * age ** -0.203 * sex_factor * black_factor; sex_factor = 0.742 if female else 1.0; black_factor = 1.212 if black else 1.0; IDMS-traceable 4-variable MDRD; GFR mL/min/1.73m2; Scr mg/dL","purpose":"Compute IDMS-traceable 4-variable MDRD eGFR in mL/min/1.73m2 from standardized creatinine, adult age, sex, and caller-assigned Black as used in Levey 2006.","markdown_url":"https://magentlab.com/docs/mdrd.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"mdrd_idms_4var"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"creatinine_mg_dl","type":"number","description":"Normalized creatinine in mg/dL"},{"name":"age_years","type":"integer","description":"Age used in the equation"},{"name":"sex","type":"string","description":"female or male"},{"name":"black","type":"boolean","description":"Caller-assigned Black as used in Levey 2006; magent does not assign race"},{"name":"egfr_ml_min_1_73m2","type":"number","description":"Estimated GFR, 1 decimal place"},{"name":"units","type":"string","description":"mL/min/1.73m2"},{"name":"citation","type":"object","description":"Levey 2006 Ann Intern Med citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"65","black":"false","creatinine_mg_dl":"1.1","sex":"female"},{"age":"65","black":"false","creatinine_mg_dl":"1.1","sex":"female"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/mdrd","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/mdrd?creatinine_mg_dl=1.1&age=65&sex=female&black=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/mdrd","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/crcl","description":"Returns Cockcroft–Gault creatinine clearance in mL/min from total body weight.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120).","required":true,"example":"65"},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"female applies the published 0.85 factor; male does not.","required":true,"example":"female"},{"in":"query","name":"weight_kg","type":"number","description":"Total body weight in kilograms. Provide weight_kg or weight_lb.","required":false,"example":"70"},{"in":"query","name":"weight_lb","type":"number","description":"Total body weight in pounds. Converted as kg = lb * 0.45359237.","required":false,"example":"154"},{"in":"query","name":"creatinine_mg_dl","type":"number","description":"Serum creatinine in mg/dL. Provide this or creatinine_umol_l.","required":false,"example":"1.1"},{"in":"query","name":"creatinine_umol_l","type":"number","description":"Serum creatinine in µmol/L. Converted as mg/dL = µmol/L / 88.42.","required":false,"example":"97.2"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_weight","message":"weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_creatinine","message":"creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/crcl","citation":{"authors":"Cockcroft DW, Gault MH","doi":"10.1159/000180580","id":"cockcroft-1976","source":"Nephron. 1976;16(1):31-41","title":"Prediction of creatinine clearance from serum creatinine","url":"https://doi.org/10.1159/000180580"},"formula_expression":"CrCl_mL_min = ((140 - age) * weight_kg * (0.85 if female else 1)) / (72 * Scr_mg_dL)","purpose":"Returns creatinine clearance (mL/min) computed with the Cockcroft–Gault equation using total body weight; cites Cockcroft and Gault, Nephron 1976.","markdown_url":"https://magentlab.com/docs/crcl.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"cockcroft_gault"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"age_years","type":"integer","description":"Age used in the equation"},{"name":"sex","type":"string","description":"female or male"},{"name":"weight_kg","type":"number","description":"Total body weight in kg"},{"name":"creatinine_mg_dl","type":"number","description":"Normalized creatinine"},{"name":"crcl_ml_min","type":"number","description":"Creatinine clearance in mL/min, 1 decimal place"},{"name":"units","type":"string","description":"mL/min"},{"name":"weight_basis","type":"string","description":"Always total_body_weight. Ideal/adjusted body weight is not applied."},{"name":"citation","type":"object","description":"Nephron 1976 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"65","creatinine_mg_dl":"1.1","sex":"female","weight_kg":"70"},{"age":"65","creatinine_mg_dl":"1.1","sex":"female","weight_kg":"70"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/crcl","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/crcl?age=65&sex=female&weight_kg=70&creatinine_mg_dl=1.1","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/crcl","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/kfre","description":"Tangri 2011 4-variable Kidney Failure Risk Equation: 2- and 5-year risk of dialysis or transplant from age, male, eGFR, and urine ACR (mg/g). Risk = 1 - S0^exp(LP) with that paper's 4-variable coefficients. Caller supplies eGFR; magent does not compute CKD-EPI or assay ACR. Not the 8-variable model, not Tangri 2016 country S0, no race. Not a dialysis or transplant order. Not a medical device.","parameters":[{"in":"query","name":"age_years","type":"integer","description":"Age in years (18-90, magent clamp). Tangri 2011 4-variable model uses age as a continuous predictor (per 10 years, centered at 7.036). Adult CKD 3-5 derivation.","required":true,"example":55},{"in":"query","name":"male","type":"boolean","description":"true if male, false if female. Enters the linear predictor as 1 or 0 (centered at 0.5642). No race coefficient.","required":true,"example":true},{"in":"query","name":"egfr_ml_min","type":"number","description":"Caller-supplied eGFR in mL/min/1.73 m2 (1-150, magent clamp; must be positive). Tangri 2011 derivation was CKD stages 3-5. magent does not compute CKD-EPI eGFR and does not assay creatinine.","required":true,"example":30},{"in":"query","name":"acr_mg_g","type":"number","description":"Urine albumin-to-creatinine ratio in mg/g (0.1-10000, magent clamp; must be positive). Enters as natural log, centered at 5.137. magent does not assay ACR and does not convert from mg/mmol.","required":true,"example":300}],"errors":[{"code":"invalid_kfre","message":"Kidney failure risk inputs must be numeric age, eGFR, and urine ACR with a binary sex as used in Tangri 2011. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/kfre","citation":{"authors":"Tangri N, Stevens LA, Griffith J, Tighiouart H, Djurdjev O, Naimark D, Levin A, Levey AS","doi":"10.1001/jama.2011.451","id":"tangri-2011","pmid":"21482743","source":"JAMA. 2011;305(15):1553-1559","title":"A predictive model for progression of chronic kidney disease to kidney failure","url":"https://doi.org/10.1001/jama.2011.451"},"formula_expression":"LP = -0.2201*(age_years/10 - 7.036) + 0.2467*(male - 0.5642) - 0.5567*(egfr_ml_min/5 - 7.222) + 0.4510*(ln(acr_mg_g) - 5.137); 2-year risk = 1 - 0.9750^exp(LP); 5-year risk = 1 - 0.9240^exp(LP); Tangri 2011 4-variable only; male is 1 if true else 0; ACR mg/g natural log; caller supplies eGFR; not 8-variable; not Tangri 2016 country S0; no race","purpose":"Compute 2-year and 5-year risk of kidney failure (dialysis or preemptive transplant) from the Tangri 2011 4-variable Kidney Failure Risk Equation (age, sex, eGFR, urine ACR).","markdown_url":"https://magentlab.com/docs/kfre.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"kfre"},{"name":"formula_expression","type":"string","description":"Tangri 2011 4-variable LP and 2-year/5-year S0"},{"name":"age_years","type":"integer","description":"Age in years used (18-90)"},{"name":"male","type":"boolean","description":"Caller-assigned male flag used"},{"name":"egfr_ml_min","type":"number","description":"Caller-supplied eGFR used, mL/min/1.73 m2"},{"name":"acr_mg_g","type":"number","description":"Urine ACR used, mg/g"},{"name":"linear_predictor","type":"number","description":"Tangri 2011 4-variable centered LP, 4 decimals"},{"name":"two_year_risk_percent","type":"number","description":"2-year kidney-failure risk percent, 1 decimal (1 - 0.9750^exp(LP))"},{"name":"five_year_risk_percent","type":"number","description":"5-year kidney-failure risk percent, 1 decimal (1 - 0.9240^exp(LP))"},{"name":"s0_2_year","type":"number","description":"Tangri 2011 4-variable 2-year baseline survival (0.9750)"},{"name":"s0_5_year","type":"number","description":"Tangri 2011 4-variable 5-year baseline survival (0.9240)"},{"name":"citation","type":"object","description":"Tangri et al. JAMA 2011 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"acr_mg_g":"300","age_years":"55","egfr_ml_min":"30","male":"true"},{"acr_mg_g":"300","age_years":"55","egfr_ml_min":"30","male":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/kfre","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/kfre?age_years=55&male=true&egfr_ml_min=30&acr_mg_g=300","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/kfre","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/kegfr","description":"Chen 2013 kinetic eGFR (KeGFR) from two plasma creatinines, hours between them, caller-assigned steady-state creatinine and corresponding eGFR/CrCl, and required max_delta_pcr_mg_dl_day (Chen usual default 1.5). KeGFR = (SSPCr * CrCl / MeanPCr) * (1 - 24*dPCr / (dTime_hours * MaxdPCr/Day)), clamped at 0 when that (1 - ratio) term is negative. Creatinine mg/dL only. Not a CKD-EPI result. Not a dialysis prescription. magent does not compute MDRD or CKD-EPI.","parameters":[{"in":"query","name":"creatinine_1_mg_dl","type":"number","description":"First plasma creatinine in mg/dL (0.1-20). mg/dL only.","required":true,"example":"1"},{"in":"query","name":"creatinine_2_mg_dl","type":"number","description":"Second plasma creatinine in mg/dL (0.1-20). mg/dL only.","required":true,"example":"1"},{"in":"query","name":"delta_hours","type":"number","description":"Hours between creatinine_1 and creatinine_2 (1-72). Chen: endpoints <48-72 h apart.","required":true,"example":"24"},{"in":"query","name":"steady_state_creatinine_mg_dl","type":"number","description":"Steady-state plasma creatinine in mg/dL (0.1-20) corresponding to steady_state_egfr. mg/dL only.","required":true,"example":"1"},{"in":"query","name":"steady_state_egfr","type":"number","description":"Caller-assigned eGFR/CrCl in mL/min corresponding to steady_state_creatinine_mg_dl (5-200). magent does not compute MDRD or CKD-EPI.","required":true,"example":"90"},{"in":"query","name":"max_delta_pcr_mg_dl_day","type":"number","description":"Maximum creatinine rise per day in mg/dL (0.5-3). Chen usual default 1.5. Required; magent does not omit it.","required":true,"example":"1.5"}],"errors":[{"code":"invalid_kegfr","message":"creatinine_1_mg_dl and creatinine_2_mg_dl must be 0.1-20, delta_hours 1-72, and max_delta_pcr_mg_dl_day 0.5-3 (Chen 2013 KeGFR). Returned before settlement; you are not charged.","status":400},{"code":"invalid_egfr","message":"egfr_ml_min_1_73m2 must be a number from 5 to 200 (caller-assigned eGFR; magent does not compute MDRD or CKD-EPI). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/kegfr","citation":{"authors":"Chen S","doi":"10.1681/ASN.2012070653","id":"chen-2013","pmid":"23704286","source":"J Am Soc Nephrol. 2013;24(6):877-888","title":"Retooling the Creatinine Clearance Equation to Estimate Kinetic GFR when the Plasma Creatinine Is Changing Acutely","url":"https://doi.org/10.1681/ASN.2012070653"},"formula_expression":"kegfr_ml_min = (steady_state_creatinine_mg_dl * steady_state_egfr / mean_pcr_mg_dl) * (1 - (24 * delta_pcr_mg_dl) / (delta_hours * max_delta_pcr_mg_dl_day)); mean_pcr_mg_dl = (creatinine_1_mg_dl + creatinine_2_mg_dl) / 2; delta_pcr_mg_dl = creatinine_2_mg_dl - creatinine_1_mg_dl; clamp kegfr_ml_min at 0 when (1 - ratio) is negative (Chen 2013)","purpose":"Compute Chen 2013 kinetic eGFR (KeGFR) from two plasma creatinines, the hours between them, a caller-assigned steady-state creatinine and corresponding eGFR/CrCl, and MaxΔPCr/Day. magent does not compute MDRD or CKD-EPI.","markdown_url":"https://magentlab.com/docs/kegfr.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"kegfr"},{"name":"formula_expression","type":"string","description":"Exact Chen 2013 KeGFR expression, including mean, signed delta, and clamp"},{"name":"creatinine_1_mg_dl","type":"number","description":"First plasma creatinine in mg/dL"},{"name":"creatinine_2_mg_dl","type":"number","description":"Second plasma creatinine in mg/dL"},{"name":"delta_hours","type":"number","description":"Hours between the two creatinines"},{"name":"steady_state_creatinine_mg_dl","type":"number","description":"Steady-state plasma creatinine in mg/dL"},{"name":"steady_state_egfr","type":"number","description":"Caller-assigned corresponding eGFR/CrCl in mL/min"},{"name":"max_delta_pcr_mg_dl_day","type":"number","description":"Maximum creatinine rise per day in mg/dL"},{"name":"mean_pcr_mg_dl","type":"number","description":"Arithmetic mean of creatinine_1_mg_dl and creatinine_2_mg_dl"},{"name":"delta_pcr_mg_dl","type":"number","description":"Signed creatinine_2_mg_dl minus creatinine_1_mg_dl"},{"name":"kegfr_ml_min","type":"number","description":"Kinetic eGFR in mL/min, 1 decimal. Clamped at 0. Not a CKD-EPI result."},{"name":"units","type":"string","description":"mL/min"},{"name":"citation","type":"object","description":"Chen J Am Soc Nephrol 2013 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"creatinine_1_mg_dl":"1","creatinine_2_mg_dl":"1","delta_hours":"24","max_delta_pcr_mg_dl_day":"1.5","steady_state_creatinine_mg_dl":"1","steady_state_egfr":"90"},{"creatinine_1_mg_dl":"1","creatinine_2_mg_dl":"1","delta_hours":"24","max_delta_pcr_mg_dl_day":"1.5","steady_state_creatinine_mg_dl":"1","steady_state_egfr":"90"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/kegfr","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/kegfr?creatinine_1_mg_dl=1&creatinine_2_mg_dl=1&delta_hours=24&steady_state_creatinine_mg_dl=1&steady_state_egfr=90&max_delta_pcr_mg_dl_day=1.5","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/kegfr","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/igan-predict","description":"Barbour 2019 race-free full IgAN model: 5-year risk of 50% eGFR decline or ESKD from age, eGFR, MAP, proteinuria g/day, Oxford MEST, RAS blockade, and immunosuppression at biopsy. Risk = 1 - S0(60)^exp(LP) with eTable 3 coefficients. Caller supplies eGFR; magent does not compute CKD-EPI or score the biopsy. Not the race/ethnicity model. Not KFRE. Not a diagnosis or treatment order. Not a medical device.","parameters":[{"in":"query","name":"age_years","type":"integer","description":"Age at biopsy in years (integer 18-120). Barbour 2019 derivation was adults 18 years or older. Enters the linear predictor as age_years - 38.","required":true,"example":38},{"in":"query","name":"egfr_ml_min_1_73m2","type":"number","description":"Caller-supplied eGFR in mL/min/1.73 m2 (5-200). Enters as sqrt(eGFR) centered at 8.8. Derivation used CKD-EPI and excluded ESKD at biopsy. magent does not compute CKD-EPI and does not assay creatinine.","required":true,"example":77},{"in":"query","name":"map_mm_hg","type":"number","description":"Mean arterial pressure at biopsy in mm Hg (30-180). Enters centered at 97 and in the proteinuria×MAP interaction.","required":true,"example":97},{"in":"query","name":"proteinuria_g_day","type":"number","description":"Proteinuria at biopsy in g/day (0.01-20). Enters as natural log, centered at 0.09, plus interactions with MAP, T, and RASB. magent does not assay urine protein.","required":true,"example":1.1},{"in":"query","name":"mest_m","type":"integer","enum":[0,1],"description":"Oxford MEST mesangial hypercellularity at biopsy. 0 = M0, 1 = M1. magent does not score the biopsy.","required":true,"example":1},{"in":"query","name":"mest_e","type":"integer","enum":[0,1],"description":"Oxford MEST endocapillary hypercellularity at biopsy. 0 = E0, 1 = E1. magent does not score the biopsy.","required":true,"example":0},{"in":"query","name":"mest_s","type":"integer","enum":[0,1],"description":"Oxford MEST segmental sclerosis at biopsy. 0 = S0, 1 = S1. magent does not score the biopsy.","required":true,"example":1},{"in":"query","name":"mest_t","type":"integer","enum":[0,1,2],"description":"Oxford MEST tubular atrophy/interstitial fibrosis at biopsy. 0 = T0, 1 = T1, 2 = T2. T1 and T2 have main-effect and proteinuria-interaction terms. magent does not score the biopsy.","required":true,"example":0},{"in":"query","name":"rasb_at_biopsy","type":"boolean","description":"true if renin-angiotensin system blockade (ACE inhibitor or ARB) was in use at biopsy. Enters as 1 or 0 plus a RASB×proteinuria term. magent does not prescribe RAS blockade.","required":true,"example":true},{"in":"query","name":"immunosuppression_at_biopsy","type":"boolean","description":"true if immunosuppression was in use at biopsy. Enters as 1 or 0. magent does not prescribe immunosuppression.","required":true,"example":false}],"errors":[{"code":"invalid_igan","message":"IgAN prediction needs eGFR, MAP, proteinuria, age, MEST, RASB, and immunosuppression as in Barbour 2019 without race. Returned before settlement; you are not charged.","status":400},{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_egfr","message":"egfr_ml_min_1_73m2 must be a number from 5 to 200 (caller-assigned eGFR; magent does not compute MDRD or CKD-EPI). Returned before settlement; you are not charged.","status":400},{"code":"invalid_map_mm_hg","message":"map_mm_hg must be a number from 30 to 180. Returned before settlement; you are not charged.","status":400},{"code":"invalid_proteinuria_g_day","message":"proteinuria_g_day must be a positive number in g/day. Returned before settlement; you are not charged.","status":400},{"code":"invalid_mest","message":"Oxford MEST M/E/S must be 0 or 1 and T must be 0, 1, or 2. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/igan-predict","citation":{"authors":"Barbour SJ, Coppo R, Zhang H, Liu ZH, Suzuki Y, Matsuzaki K, Katafuchi R, Er L, Espino-Hernandez G, Kim SJ, Reich HN, Cattran DC, Feehally J; International IgA Nephropathy Network","doi":"10.1001/jamainternmed.2019.0600","id":"barbour-2019-igan","pmid":"30980653","source":"JAMA Intern Med. 2019;179(7):942-952","title":"Evaluating a new international risk-prediction tool in IgA nephropathy","url":"https://doi.org/10.1001/jamainternmed.2019.0600"},"formula_expression":"LP = -0.320*(sqrt(egfr_ml_min_1_73m2) - 8.8) + 0.002*(map_mm_hg - 97) - 0.035*(ln(proteinuria_g_day) - 0.09) + 0.004*(map_mm_hg*ln(proteinuria_g_day) - 8.73) + 0.201*M1 - 0.035*E1 + 0.084*S1 + 0.700*T1 + 1.237*T2 + 0.101*T1*ln(proteinuria_g_day) - 0.321*T2*ln(proteinuria_g_day) - 0.017*(age_years - 38) + 0.118*RASB + 0.166*RASB*ln(proteinuria_g_day) - 0.266*immunosuppression; S0(t) = 1.0003754 - 0.1131641*u^2 + 0.0964763*u^2*ln(u), u = (t + 0.1)/100, t months; 5-year risk = 1 - S0(60)^exp(LP); Barbour 2019 eTable 3 full model without race/ethnicity only; M/E/S/T1/T2 RASB and immunosuppression are 0 or 1; natural log; caller supplies eGFR; not the race model; not KFRE","purpose":"Compute 5-year risk of a 50% decline in eGFR or ESKD after kidney biopsy from the Barbour 2019 full International IgAN prediction model that does not use race or ethnicity.","markdown_url":"https://magentlab.com/docs/igan-predict.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"igan_predict"},{"name":"formula_expression","type":"string","description":"Barbour 2019 eTable 3 race-free full-model LP and S0(t)"},{"name":"age_years","type":"integer","description":"Age at biopsy in years used (18-120)"},{"name":"egfr_ml_min_1_73m2","type":"number","description":"Caller-supplied eGFR used, mL/min/1.73 m2"},{"name":"map_mm_hg","type":"number","description":"MAP at biopsy used, mm Hg"},{"name":"proteinuria_g_day","type":"number","description":"Proteinuria at biopsy used, g/day"},{"name":"mest_m","type":"integer","description":"Oxford M 0 or 1 used"},{"name":"mest_e","type":"integer","description":"Oxford E 0 or 1 used"},{"name":"mest_s","type":"integer","description":"Oxford S 0 or 1 used"},{"name":"mest_t","type":"integer","description":"Oxford T 0, 1, or 2 used"},{"name":"rasb_at_biopsy","type":"boolean","description":"RAS blockade at biopsy flag used"},{"name":"immunosuppression_at_biopsy","type":"boolean","description":"Immunosuppression at biopsy flag used"},{"name":"linear_predictor","type":"number","description":"Barbour 2019 race-free full-model centered LP, 4 decimals"},{"name":"five_year_risk_percent","type":"number","description":"5-year risk of 50% eGFR decline or ESKD, 1 decimal (1 - S0(60)^exp(LP))"},{"name":"s0_5_year","type":"number","description":"Barbour 2019 race-free S0 at 60 months, 5 decimals"},{"name":"horizon_months","type":"integer","description":"Prediction horizon in months (60)"},{"name":"citation","type":"object","description":"Barbour et al. JAMA Intern Med 2019 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age_years":"38","egfr_ml_min_1_73m2":"77","immunosuppression_at_biopsy":"false","map_mm_hg":"97","mest_e":"0","mest_m":"1","mest_s":"1","mest_t":"0","proteinuria_g_day":"1.1","rasb_at_biopsy":"true"},{"age_years":"38","egfr_ml_min_1_73m2":"77","immunosuppression_at_biopsy":"false","map_mm_hg":"97","mest_e":"0","mest_m":"1","mest_s":"1","mest_t":"0","proteinuria_g_day":"1.1","rasb_at_biopsy":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/igan-predict","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/igan-predict?age_years=38&egfr_ml_min_1_73m2=77&map_mm_hg=97&proteinuria_g_day=1.1&mest_m=1&mest_e=0&mest_s=1&mest_t=0&rasb_at_biopsy=true&immunosuppression_at_biopsy=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/igan-predict","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/akin","description":"AKIN 2007 (Mehta Table 2) stage 0-3 from baseline and current creatinine in mg/dL and a caller-assigned urine-output category. Stage is the worse of the two limbs; RRT is stage 3. magent does not assay creatinine, measure urine, or collect weight. Not a medical device, not a diagnosis, not KDIGO 2012, and not RIFLE.","parameters":[{"in":"query","name":"baseline_creatinine_mg_dl","type":"number","description":"Baseline serum creatinine in mg/dL (0.1-20). Staging uses the unrounded value. µmol/L is not accepted on this tool. magent does not assay creatinine.","required":true,"example":"1.0"},{"in":"query","name":"current_creatinine_mg_dl","type":"number","description":"Current serum creatinine in mg/dL (0.1-20). Staging uses the unrounded value. µmol/L is not accepted on this tool. magent does not assay creatinine.","required":true,"example":"1.0"},{"in":"query","name":"urine_output","type":"string","enum":["none","oliguria_gt_6h","oliguria_gt_12h","oliguria_24h_or_anuria_12h"],"description":"Caller-assigned AKIN urine-output category (Mehta 2007 Table 2): none (no oliguria or anuria criterion); oliguria_gt_6h (<0.5 mL/kg/h for >6 hours); oliguria_gt_12h (<0.5 mL/kg/h for >12 hours); oliguria_24h_or_anuria_12h (<0.3 mL/kg/h for 24 hours or anuria for 12 hours). Case-insensitive. magent does not collect weight or measure urine.","required":true,"example":"none"},{"in":"query","name":"rrt","type":"boolean","description":"Renal replacement therapy initiated as assigned by the caller. true maps to AKIN stage 3 irrespective of creatinine or urine stage (Mehta 2007). true or false.","required":true,"example":"false"}],"errors":[{"code":"invalid_creatinine","message":"creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_akin","message":"each AKIN 2007 staging input must be a published value for that field. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/akin","citation":{"authors":"Mehta RL, Kellum JA, Shah SV, et al","doi":"10.1186/cc5713","id":"mehta-2007","pmid":"17331245","source":"Crit Care. 2007;11(2):R31","title":"Acute Kidney Injury Network: report of an initiative to improve outcomes in acute kidney injury","url":"https://doi.org/10.1186/cc5713"},"formula_expression":"AKIN stage = max(creatinine_stage, urine_stage); RRT maps to stage 3. Creatinine vs baseline (unrounded mg/dL): stage 1 if increase ≥0.3 mg/dL or ratio 1.5–2.0; stage 2 if ratio >2.0 and ≤3.0; stage 3 if ratio >3.0 or (current ≥4.0 mg/dL and increase ≥0.5 mg/dL). Urine (caller-assigned): none → 0; oliguria_gt_6h → 1; oliguria_gt_12h → 2; oliguria_24h_or_anuria_12h → 3. Stage 0 if neither criterion and RRT is false (Mehta 2007 Table 2)","purpose":"Apply Mehta 2007 Table 2 AKIN staging and return stage 0-3 as the worse of the creatinine and urine-output limbs, with initiated renal replacement therapy mapping to stage 3.","markdown_url":"https://magentlab.com/docs/akin.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"akin"},{"name":"formula_expression","type":"string","description":"Published Mehta 2007 Table 2 AKIN staging rule"},{"name":"baseline_creatinine_mg_dl","type":"number","description":"Echo of baseline creatinine in mg/dL"},{"name":"current_creatinine_mg_dl","type":"number","description":"Echo of current creatinine in mg/dL"},{"name":"urine_output","type":"string","description":"Canonical urine-output token: none, oliguria_gt_6h, oliguria_gt_12h, or oliguria_24h_or_anuria_12h"},{"name":"rrt","type":"boolean","description":"Echo of the caller-assigned RRT flag"},{"name":"creat_stage","type":"integer","description":"AKIN creatinine limb stage 0-3 before RRT override"},{"name":"uo_stage","type":"integer","description":"AKIN urine-output limb stage 0-3 before RRT override"},{"name":"stage","type":"integer","description":"Final AKIN stage 0-3: max(creat_stage, uo_stage), or 3 when rrt is true. 0 is no AKI by AKIN. Not a diagnosis."},{"name":"components","type":"array","description":"Rows for creat_stage and uo_stage with factor, met, and value (the limb stage)"},{"name":"citation","type":"object","description":"Mehta 2007 Crit Care citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"baseline_creatinine_mg_dl":"1.0","current_creatinine_mg_dl":"1.0","rrt":"false","urine_output":"none"},{"baseline_creatinine_mg_dl":"1.0","current_creatinine_mg_dl":"1.0","rrt":"false","urine_output":"none"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/akin","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/akin?baseline_creatinine_mg_dl=1.0&current_creatinine_mg_dl=1.0&urine_output=none&rrt=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/akin","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/kdigo-aki","description":"KDIGO 2012 Table 2 AKI stage 0-3 from baseline and current creatinine in mg/dL and a caller-assigned urine-output category. Stage is the worse of the two limbs; RRT or a caller pediatric eGFR <35 flag is stage 3. magent does not assay creatinine, measure urine, collect weight, or compute eGFR (no MDRD). Not a medical device, not a diagnosis, not AKIN 2007, and not RIFLE.","parameters":[{"in":"query","name":"baseline_creatinine_mg_dl","type":"number","description":"Baseline serum creatinine in mg/dL (0.1-20). Staging uses the unrounded value. µmol/L is not accepted on this tool. magent does not assay creatinine.","required":true,"example":"1.0"},{"in":"query","name":"current_creatinine_mg_dl","type":"number","description":"Current serum creatinine in mg/dL (0.1-20). Staging uses the unrounded value. µmol/L is not accepted on this tool. magent does not assay creatinine.","required":true,"example":"1.0"},{"in":"query","name":"urine_output","type":"string","enum":["none","oliguria_6_to_12h","oliguria_ge_12h","oliguria_24h_or_anuria_12h"],"description":"Caller-assigned KDIGO urine-output category (KDIGO 2012 Table 2): none (no oliguria or anuria criterion); oliguria_6_to_12h (<0.5 mL/kg/h for 6–12 hours); oliguria_ge_12h (<0.5 mL/kg/h for ≥12 hours); oliguria_24h_or_anuria_12h (<0.3 mL/kg/h for ≥24 hours or anuria for ≥12 hours). Case-insensitive. magent does not collect weight or measure urine.","required":true,"example":"none"},{"in":"query","name":"rrt","type":"boolean","description":"Renal replacement therapy initiated as assigned by the caller. true maps to KDIGO stage 3 irrespective of creatinine or urine stage (KDIGO 2012 Table 2). true or false.","required":true,"example":"false"},{"in":"query","name":"pediatric_egfr_lt_35","type":"boolean","description":"Caller-assigned KDIGO Table 2 pediatric limb: patients <18 years with a decrease in eGFR to <35 mL/min/1.73 m². true maps to stage 3 irrespective of creatinine or urine stage. magent does not compute eGFR and does not use MDRD. true or false.","required":true,"example":"false"}],"errors":[{"code":"invalid_kdigo_aki","message":"KDIGO AKI inputs must match the 2012 Table 2 creatinine, urine-output category, RRT flag, and optional pediatric eGFR flag from that guideline. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/kdigo-aki","citation":{"authors":"Kidney Disease: Improving Global Outcomes (KDIGO) Acute Kidney Injury Work Group","doi":"10.1038/kisup.2012.1","id":"kdigo-aki-2012","source":"Kidney Int Suppl. 2012;2:1-138","title":"KDIGO Clinical Practice Guideline for Acute Kidney Injury","url":"https://doi.org/10.1038/kisup.2012.1"},"formula_expression":"KDIGO stage = max(creatinine_stage, urine_stage); RRT or pediatric_egfr_lt_35 maps to stage 3. Creatinine vs baseline (unrounded mg/dL): stage 1 if increase ≥0.3 mg/dL or ratio 1.5–1.9× baseline; stage 2 if ratio 2.0–2.9× baseline; stage 3 if ratio ≥3.0× baseline or current ≥4.0 mg/dL. Urine (caller-assigned): none → 0; oliguria_6_to_12h → 1; oliguria_ge_12h → 2; oliguria_24h_or_anuria_12h → 3. Stage 0 if neither criterion and both flags are false (KDIGO 2012 Table 2)","purpose":"Apply KDIGO 2012 Table 2 AKI staging and return stage 0-3 as the worse of the creatinine and urine-output limbs, with initiated renal replacement therapy or a caller pediatric eGFR <35 flag mapping to stage 3.","markdown_url":"https://magentlab.com/docs/kdigo-aki.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"kdigo_aki"},{"name":"formula_expression","type":"string","description":"Published KDIGO 2012 Table 2 AKI staging rule"},{"name":"baseline_creatinine_mg_dl","type":"number","description":"Echo of baseline creatinine in mg/dL"},{"name":"current_creatinine_mg_dl","type":"number","description":"Echo of current creatinine in mg/dL"},{"name":"urine_output","type":"string","description":"Canonical urine-output token: none, oliguria_6_to_12h, oliguria_ge_12h, or oliguria_24h_or_anuria_12h"},{"name":"rrt","type":"boolean","description":"Echo of the caller-assigned RRT flag"},{"name":"pediatric_egfr_lt_35","type":"boolean","description":"Echo of the caller-assigned pediatric eGFR <35 flag"},{"name":"creat_stage","type":"integer","description":"KDIGO creatinine limb stage 0-3 before RRT or pediatric override"},{"name":"uo_stage","type":"integer","description":"KDIGO urine-output limb stage 0-3 before RRT or pediatric override"},{"name":"stage","type":"integer","description":"Final KDIGO stage 0-3: max(creat_stage, uo_stage), or 3 when rrt or pediatric_egfr_lt_35 is true. 0 is no AKI by KDIGO Table 2. Not a diagnosis."},{"name":"components","type":"array","description":"Rows for creat_stage and uo_stage with factor, met, and value (the limb stage)"},{"name":"citation","type":"object","description":"KDIGO 2012 Kidney Int Suppl citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"baseline_creatinine_mg_dl":"1.0","current_creatinine_mg_dl":"1.0","pediatric_egfr_lt_35":"false","rrt":"false","urine_output":"none"},{"baseline_creatinine_mg_dl":"1.0","current_creatinine_mg_dl":"1.0","pediatric_egfr_lt_35":"false","rrt":"false","urine_output":"none"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/kdigo-aki","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/kdigo-aki?baseline_creatinine_mg_dl=1.0&current_creatinine_mg_dl=1.0&urine_output=none&rrt=false&pediatric_egfr_lt_35=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/kdigo-aki","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/licurse","description":"Licurse 2010 AKI hydronephrosis points: history of hydronephrosis +4; nonblack (black=false) +1; recurrent UTI +1; obstruction-consistent diagnosis (mass, BPH, pelvic surgery, or neurogenic bladder) +1; absence of inpatient nephrotoxins, CHF, and prerenal AKI (pressor or sepsis) +1 each. Score 0-10. 2010 split only: <=2 low (HN 3.1%, HNRI 0.4%), >=3 higher (HN 15.7%, HNRI 4.7%). Not an imaging order. magent does not assign race or perform ultrasound.","parameters":[{"in":"query","name":"history_hydronephrosis","type":"boolean","description":"History of hydronephrosis as assigned by the caller (Licurse 2010). true scores 4. magent does not read imaging or perform ultrasound.","required":true,"example":false},{"in":"query","name":"black","type":"boolean","description":"Caller-assigned Black as used in Licurse 2010; magent does not assign race. Nonblack race (false) scores 1. true or false.","required":true,"example":true},{"in":"query","name":"recurrent_uti","type":"boolean","description":"Recurrent urinary tract infections as assigned by the caller (Licurse 2010). true scores 1. magent does not take a culture history.","required":true,"example":false},{"in":"query","name":"obstruction_diagnosis","type":"boolean","description":"Diagnosis consistent with possible obstruction (abdominal or pelvic mass, BPH, pelvic surgery, or neurogenic bladder) as one caller-assigned flag (Licurse 2010). true scores 1. magent does not examine the patient.","required":true,"example":false},{"in":"query","name":"nephrotoxins","type":"boolean","description":"Inpatient nephrotoxic exposure as assigned by the caller (Licurse 2010). Absence (false) scores 1. magent does not identify medications.","required":true,"example":true},{"in":"query","name":"chf","type":"boolean","description":"Congestive heart failure as assigned by the caller (Licurse 2010). Absence (false) scores 1. magent does not diagnose heart failure.","required":true,"example":true},{"in":"query","name":"prerenal_aki","type":"boolean","description":"Prerenal AKI (pressor use or sepsis) as assigned by the caller (Licurse 2010). Absence (false) scores 1. magent does not diagnose sepsis or read pressor use.","required":true,"example":true}],"errors":[{"code":"invalid_licurse","message":"Licurse inputs must match the 2010 hydronephrosis flags including caller-assigned black and the six other Table factors. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/licurse","citation":{"authors":"Licurse A, Kim MC, Dziura J, Forman HP, Formica RN, Makarov DV, Parikh CR, Gross CP","doi":"10.1001/archinternmed.2010.419","id":"licurse-2010","pmid":"21098348","source":"Arch Intern Med. 2010;170(21):1900-1907","title":"Renal Ultrasonography in the Evaluation of Acute Kidney Injury: Developing a Risk Stratification Framework","url":"https://doi.org/10.1001/archinternmed.2010.419"},"formula_expression":"Licurse = 4 if history_hydronephrosis + 1 if not black (nonblack race) + 1 if recurrent_uti + 1 if obstruction_diagnosis + 1 if not nephrotoxins + 1 if not chf + 1 if not prerenal_aki; integer points as used for the 2010 validation split; score 0-10; low iff score<=2 (validation HN 3.1%, HNRI 0.4%); higher iff score>=3 (validation HN 15.7%, HNRI 4.7%)","purpose":"Sum the Licurse 2010 seven-factor integer points used for that paper's low versus higher-risk hydronephrosis split in AKI (history of hydronephrosis 4; each of the other six factors 1).","markdown_url":"https://magentlab.com/docs/licurse.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"licurse"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Total points 0-10"},{"name":"max_score","type":"integer","description":"Always 10 (4+1+1+1+1+1+1)"},{"name":"risk_band","type":"string","description":"Licurse 2010 validation split only: low when score is 0-2, higher when 3-10. Not a three-level medium band. Not an imaging order."},{"name":"validation_hn_percent","type":"number","description":"Licurse 2010 validation hydronephrosis rate for this band (low 3.1, higher 15.7). Cohort rate, not an individual probability."},{"name":"validation_hnri_percent","type":"number","description":"Licurse 2010 validation hydronephrosis-requiring-intervention rate for this band (low 0.4, higher 4.7). Cohort rate, not an individual probability."},{"name":"history_hydronephrosis","type":"boolean","description":"Caller-assigned history of hydronephrosis used"},{"name":"black","type":"boolean","description":"Caller-assigned Black as used in Licurse 2010; magent does not assign race"},{"name":"recurrent_uti","type":"boolean","description":"Caller-assigned recurrent UTI flag used"},{"name":"obstruction_diagnosis","type":"boolean","description":"Caller-assigned obstruction-consistent diagnosis flag used"},{"name":"nephrotoxins","type":"boolean","description":"Caller-assigned inpatient nephrotoxic exposure flag used"},{"name":"chf","type":"boolean","description":"Caller-assigned congestive heart failure flag used"},{"name":"prerenal_aki","type":"boolean","description":"Caller-assigned prerenal AKI (pressor use or sepsis) flag used"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Licurse 2010 Arch Intern Med citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"black":"true","chf":"true","history_hydronephrosis":"false","nephrotoxins":"true","obstruction_diagnosis":"false","prerenal_aki":"true","recurrent_uti":"false"},{"black":"true","chf":"true","history_hydronephrosis":"false","nephrotoxins":"true","obstruction_diagnosis":"false","prerenal_aki":"true","recurrent_uti":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/licurse","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/licurse?history_hydronephrosis=false&black=true&recurrent_uti=false&obstruction_diagnosis=false&nephrotoxins=true&chf=true&prerenal_aki=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/licurse","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/irae-nephritis","description":"ASCO 2018 (Brahmer) irAE nephritis grade from creatinine vs baseline (mg/dL). First-match: 4 if dialysis or life-threatening; 3 if fold >3, creatinine >=4.0, or hospitalization; 2 if fold >2; 1 if fold >=1.5 or delta >=0.3; else 0. ICI action continue (0), consider_hold (1), hold (2), permanently_discontinue (3-4). Not a medical device, not a diagnosis, not KDIGO/AKIN, not a steroid dose; magent does not assay creatinine.","parameters":[{"in":"query","name":"creatinine_mg_dl","type":"number","description":"Current serum creatinine in mg/dL (0.1-20). Used with baseline_creatinine_mg_dl for fold and delta (Brahmer 2018 Table 6.1). magent does not assay creatinine.","required":true,"example":"1.6"},{"in":"query","name":"baseline_creatinine_mg_dl","type":"number","description":"Baseline serum creatinine in mg/dL (0.1-20). µmol/L is not accepted. magent does not assay creatinine.","required":true,"example":"1.0"},{"in":"query","name":"hospitalization_indicated","type":"boolean","description":"Hospitalization indicated as assigned by the caller (Brahmer 2018 Table 6.1 grade 3). true or false. When true and neither dialysis_indicated nor life_threatening is true, grade is 3. magent does not admit the patient.","required":true,"example":"false"},{"in":"query","name":"dialysis_indicated","type":"boolean","description":"Dialysis indicated as assigned by the caller (Brahmer 2018 Table 6.1 grade 4). true or false. When true, grade is 4 regardless of fold. magent does not start dialysis.","required":true,"example":"false"},{"in":"query","name":"life_threatening","type":"boolean","description":"Life-threatening consequences as assigned by the caller (Brahmer 2018 Table 6.1 grade 4). true or false. When true, grade is 4 regardless of fold. magent does not examine the patient.","required":true,"example":"false"}],"errors":[{"code":"invalid_creatinine","message":"creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_baseline_creatinine","message":"baseline_creatinine_mg_dl must be a number from 0.1 to 20 (Brahmer 2018 baseline creatinine mg/dL). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/irae-nephritis","citation":{"authors":"Brahmer JR, Lacchetti C, Schneider BJ, Atkins MB, Brassil KJ, Caterino JM, Chau I, Ernstoff MS, Gardner JM, Ginex P, Hallmeyer S, Holter Chakrabarty J, Leighl NB, Mammen JS, McDermott DF, Naing A, Nastoupil LJ, Phillips T, Porter LD, Puzanov I, Reichner CA, Santomasso BD, Seigel C, Spira A, Suarez-Almazor ME, Wang Y, Weber JS, Wolchok JD, Thompson JA","doi":"10.1200/JCO.2017.77.6385","id":"brahmer-2018","pmid":"29442540","source":"J Clin Oncol. 2018;36(17):1714-1768","title":"Management of Immune-Related Adverse Events in Patients Treated With Immune Checkpoint Inhibitor Therapy: American Society of Clinical Oncology Clinical Practice Guideline","url":"https://doi.org/10.1200/JCO.2017.77.6385"},"formula_expression":"irae_nephritis first-match worst-wins (Brahmer 2018 Table 6.1): fold = creatinine_mg_dl / baseline_creatinine_mg_dl; delta = creatinine_mg_dl - baseline_creatinine_mg_dl. Grade 4 if dialysis_indicated or life_threatening; else grade 3 if fold > 3 or creatinine_mg_dl >= 4.0 or hospitalization_indicated; else grade 2 if fold > 2; else grade 1 if fold >= 1.5 or delta >= 0.3; else grade 0. icpi_action: 0 continue, 1 consider_hold, 2 hold, 3-4 permanently_discontinue. mg/dL only. Not KDIGO/AKIN. magent does not assay creatinine. Not a diagnosis. Not a steroid dose","purpose":"Apply Brahmer 2018 ASCO Table 6.1 immune-related nephritis bands (creatinine fold and delta versus baseline, plus caller-assigned hospitalization, dialysis, and life-threatening flags) and return grade 0–4 plus ICI action.","markdown_url":"https://magentlab.com/docs/irae-nephritis.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"irae_nephritis"},{"name":"formula_expression","type":"string","description":"Brahmer 2018 Table 6.1 nephritis first-match worst-wins grade and ICPi action"},{"name":"grade","type":"integer","description":"0-4. First-match: dialysis_indicated or life_threatening → 4; else fold > 3 or creatinine >= 4.0 mg/dL or hospitalization_indicated → 3; else fold > 2 → 2; else fold >= 1.5 or delta >= 0.3 → 1; else 0. Not a diagnosis."},{"name":"icpi_action","type":"string","description":"continue (grade 0), consider_hold (grade 1), hold (grade 2), or permanently_discontinue (grade 3 or 4). Not a steroid dose."},{"name":"fold","type":"number","description":"creatinine_mg_dl / baseline_creatinine_mg_dl, 4 decimal places"},{"name":"delta","type":"number","description":"creatinine_mg_dl - baseline_creatinine_mg_dl (mg/dL), 4 decimal places"},{"name":"creatinine_mg_dl","type":"number","description":"Current serum creatinine in mg/dL"},{"name":"baseline_creatinine_mg_dl","type":"number","description":"Baseline serum creatinine in mg/dL"},{"name":"hospitalization_indicated","type":"boolean","description":"Caller-assigned hospitalization-indicated flag"},{"name":"dialysis_indicated","type":"boolean","description":"Caller-assigned dialysis-indicated flag"},{"name":"life_threatening","type":"boolean","description":"Caller-assigned life-threatening flag"},{"name":"criteria","type":"array","description":"Per-factor Tree rows with factor and met for dialysis_indicated, life_threatening, fold_gt_3, creatinine_ge_4, hospitalization_indicated, fold_gt_2, fold_ge_1_5, and delta_ge_0_3 (first-match worst-wins); fold and creatinine/delta rows include value"},{"name":"citation","type":"object","description":"Brahmer 2018 J Clin Oncol citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"baseline_creatinine_mg_dl":"1.0","creatinine_mg_dl":"1.6","dialysis_indicated":"false","hospitalization_indicated":"false","life_threatening":"false"},{"baseline_creatinine_mg_dl":"1.0","creatinine_mg_dl":"1.6","dialysis_indicated":"false","hospitalization_indicated":"false","life_threatening":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/irae-nephritis","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/irae-nephritis?creatinine_mg_dl=1.6&baseline_creatinine_mg_dl=1.0&hospitalization_indicated=false&dialysis_indicated=false&life_threatening=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/irae-nephritis","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/ain-risk","description":"Moledina 2022 development-model logistic probability of biopsy-proven acute interstitial nephritis from serum creatinine, BUN:creatinine ratio, urine dipstick specific gravity, and dipstick protein (0 or 1+ versus 2+ or higher, caller-assigned). Returns logit and estimated_probability_percent. Not a medical device, not a diagnosis, and not a kidney biopsy. Does not include urine IL-9 or TNF-α. Moledina 2022 publishes no named low/high cutoff.","parameters":[{"in":"query","name":"creatinine_mg_dl","type":"number","description":"Serum creatinine in mg/dL (0.1-20). Moledina 2022 Table 4: +0.8367518 per natural log. µmol/L is not accepted on this tool. magent does not assay creatinine.","required":true,"example":"2.1"},{"in":"query","name":"bun_cr_ratio","type":"number","description":"BUN:creatinine ratio (mg/dL : mg/dL, 0.5-200) as computed by the caller. Moledina 2022 Table 4: -0.9181938 per natural log. magent does not compute BUN from other labs.","required":true,"example":"15"},{"in":"query","name":"specific_gravity","type":"number","description":"Urine dipstick specific gravity (1.000-1.050) as assigned by the caller, e.g. 1.015. Moledina 2022 Table 4: -0.0501203 per 0.001 unit. magent does not read the dipstick.","required":true,"example":"1.015"},{"in":"query","name":"protein","type":"string","enum":["le_1","ge_2"],"description":"Moledina 2022 dipstick protein category as assigned by the caller: le_1 (0 or 1+, +0.9360127) or ge_2 (2+ or higher, reference, 0). magent does not interpret the dipstick.","required":true,"example":"le_1"}],"errors":[{"code":"invalid_ain_risk","message":"AIN risk needs Moledina 2022 creatinine, BUN:creatinine, urine specific gravity, and dipstick protein in published ranges. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/ain-risk","citation":{"authors":"Moledina DG, Eadon MT, Calderon F, et al.","doi":"10.1093/ndt/gfab346","id":"moledina-2022","pmid":"34865148","source":"Nephrol Dial Transplant. 2022;37(11):2214-2222","title":"Development and external validation of a diagnostic model for biopsy-proven acute interstitial nephritis using electronic health record data","url":"https://doi.org/10.1093/ndt/gfab346"},"formula_expression":"L = 0.770398 + 0.8367518*ln(creatinine_mg_dl) - 0.9181938*ln(bun_cr_ratio) - 0.0501203*1000*(specific_gravity - 1) + protein (Moledina 2022 development model; Table 4 aORs / supplement weights); protein le_1 (0 or 1+) 0.9360127, ge_2 (2+ or higher, reference) 0; estimated_probability_percent = 100 * exp(L) / (1 + exp(L))","purpose":"Compute the Moledina 2022 development-model logistic probability of biopsy-proven acute interstitial nephritis from serum creatinine, BUN:creatinine ratio, urine dipstick specific gravity, and dipstick protein.","markdown_url":"https://magentlab.com/docs/ain-risk.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"ain_risk"},{"name":"formula_expression","type":"string","description":"Moledina 2022 development-model logistic expression"},{"name":"creatinine_mg_dl","type":"number","description":"Input serum creatinine in mg/dL"},{"name":"bun_cr_ratio","type":"number","description":"Input BUN:creatinine ratio (mg/dL : mg/dL)"},{"name":"specific_gravity","type":"number","description":"Input urine dipstick specific gravity"},{"name":"protein","type":"string","description":"le_1 (0 or 1+) or ge_2 (2+ or higher)"},{"name":"logit","type":"number","description":"Moledina 2022 development-model linear predictor L, 4 decimal places"},{"name":"estimated_probability_percent","type":"number","description":"100 * exp(L) / (1 + exp(L)) from the unrounded logit, 2 decimal places. A probability, not a biopsy and not a diagnosis."},{"name":"citation","type":"object","description":"Moledina et al. Nephrol Dial Transplant 2022 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"bun_cr_ratio":"15","creatinine_mg_dl":"2.1","protein":"le_1","specific_gravity":"1.015"},{"bun_cr_ratio":"15","creatinine_mg_dl":"2.1","protein":"le_1","specific_gravity":"1.015"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/ain-risk","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/ain-risk?creatinine_mg_dl=2.1&bun_cr_ratio=15&specific_gravity=1.015&protein=le_1","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/ain-risk","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rifle","description":"RIFLE 2004 (Bellomo Fig. 1) class from baseline and current creatinine in mg/dL and a caller-assigned urine-output category. Class is the worse of the two limbs; persistent ARF >4 weeks is Loss and >3 months is ESRD. magent does not assay creatinine, measure urine, or estimate baseline with MDRD. Not a medical device, not a diagnosis, not AKIN 2007, and not KDIGO 2012.","parameters":[{"in":"query","name":"baseline_creatinine_mg_dl","type":"number","description":"Baseline serum creatinine in mg/dL (0.1-20). Classification uses the unrounded value. µmol/L is not accepted on this tool. magent does not assay creatinine.","required":true,"example":"1.0"},{"in":"query","name":"current_creatinine_mg_dl","type":"number","description":"Current serum creatinine in mg/dL (0.1-20). Classification uses the unrounded value. µmol/L is not accepted on this tool. magent does not assay creatinine.","required":true,"example":"1.0"},{"in":"query","name":"urine_output","type":"string","enum":["none","oliguria_gt_6h","oliguria_gt_12h","oliguria_24h_or_anuria_12h"],"description":"Caller-assigned RIFLE urine-output category (Bellomo 2004 Fig. 1): none (no oliguria or anuria criterion); oliguria_gt_6h (<0.5 mL/kg/h for 6 hours); oliguria_gt_12h (<0.5 mL/kg/h for 12 hours); oliguria_24h_or_anuria_12h (<0.3 mL/kg/h for 24 hours or anuria for 12 hours). Case-insensitive. magent does not collect weight or measure urine.","required":true,"example":"none"},{"in":"query","name":"persistent_arf_gt_4_weeks","type":"boolean","description":"Persistent complete loss of kidney function for more than 4 weeks as assigned by the caller (Bellomo 2004 Loss). true maps to rifle_class loss unless esrd_gt_3_months is true. true or false.","required":true,"example":"false"},{"in":"query","name":"esrd_gt_3_months","type":"boolean","description":"End-stage kidney disease for more than 3 months as assigned by the caller (Bellomo 2004 ESRD). true maps to rifle_class esrd irrespective of creatinine, urine, or Loss. true or false.","required":true,"example":"false"}],"errors":[{"code":"invalid_creatinine","message":"creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_rifle_urine","message":"urine_output must be none, oliguria_gt_6h, oliguria_gt_12h, or oliguria_24h_or_anuria_12h (Bellomo 2004). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rifle","citation":{"authors":"Bellomo R, Ronco C, Kellum JA, Mehta RL, Palevsky P, and the ADQI workgroup","doi":"10.1186/cc2872","id":"bellomo-2004","pmid":"15312219","source":"Crit Care. 2004;8(4):R204-R212","title":"Acute renal failure - definition, outcome measures, animal models, fluid therapy and information technology needs: the Second International Consensus Conference of the Acute Dialysis Quality Initiative (ADQI) Group","url":"https://doi.org/10.1186/cc2872"},"formula_expression":"RIFLE class = esrd if ESRD >3 months, else loss if persistent ARF >4 weeks, else worse of creatinine vs urine (none < risk < injury < failure). Creatinine vs baseline (unrounded mg/dL): Failure if ratio ≥3.0 or (current ≥4.0 mg/dL and increase ≥0.5 mg/dL); Injury if ratio ≥2.0; Risk if ratio ≥1.5. GFR % decrease (Risk >25%, Injury >50%, Failure >75%) is equivalent to those creatinine multiples. Urine (caller-assigned): none → none; oliguria_gt_6h → Risk; oliguria_gt_12h → Injury; oliguria_24h_or_anuria_12h → Failure (Bellomo 2004 Fig. 1)","purpose":"Apply Bellomo 2004 Fig. 1 RIFLE classification and return the worse of the creatinine and urine-output limbs (none, risk, injury, failure), with persistent ARF beyond 4 weeks mapping to loss and ESRD beyond 3 months mapping to esrd.","markdown_url":"https://magentlab.com/docs/rifle.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rifle"},{"name":"formula_expression","type":"string","description":"Published Bellomo 2004 Fig. 1 RIFLE classification rule"},{"name":"baseline_creatinine_mg_dl","type":"number","description":"Echo of baseline creatinine in mg/dL"},{"name":"current_creatinine_mg_dl","type":"number","description":"Echo of current creatinine in mg/dL"},{"name":"urine_output","type":"string","description":"Canonical urine-output token: none, oliguria_gt_6h, oliguria_gt_12h, or oliguria_24h_or_anuria_12h"},{"name":"persistent_arf_gt_4_weeks","type":"boolean","description":"Echo of the caller-assigned persistent ARF >4 weeks flag"},{"name":"esrd_gt_3_months","type":"boolean","description":"Echo of the caller-assigned ESRD >3 months flag"},{"name":"creat_class","type":"string","description":"RIFLE creatinine limb class: none, risk, injury, or failure (before Loss/ESRD)"},{"name":"uo_class","type":"string","description":"RIFLE urine-output limb class: none, risk, injury, or failure (before Loss/ESRD)"},{"name":"rifle_class","type":"string","description":"Final RIFLE class: esrd if esrd_gt_3_months, else loss if persistent_arf_gt_4_weeks, else the worse of creat_class and uo_class (none, risk, injury, or failure). Not a diagnosis."},{"name":"components","type":"array","description":"Rows for creat_class and uo_class with factor, met, and value (the limb class)"},{"name":"citation","type":"object","description":"Bellomo 2004 Crit Care citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"baseline_creatinine_mg_dl":"1.0","current_creatinine_mg_dl":"1.0","esrd_gt_3_months":"false","persistent_arf_gt_4_weeks":"false","urine_output":"none"},{"baseline_creatinine_mg_dl":"1.0","current_creatinine_mg_dl":"1.0","esrd_gt_3_months":"false","persistent_arf_gt_4_weeks":"false","urine_output":"none"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rifle","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rifle?baseline_creatinine_mg_dl=1.0&current_creatinine_mg_dl=1.0&urine_output=none&persistent_arf_gt_4_weeks=false&esrd_gt_3_months=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rifle","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/fena","description":"Fractional excretion of sodium (FENa) from plasma and urine sodium and creatinine. Espinel 1976 oliguric ARF strata. Deterministic published formula with citation; not a diagnosis.","parameters":[{"in":"query","name":"sodium_mmol_l","type":"number","description":"Plasma or serum sodium in mmol/L (110-160).","required":true,"example":"140"},{"in":"query","name":"creatinine_mg_dl","type":"number","description":"Plasma creatinine in mg/dL (0.1-20). Provide this or creatinine_umol_l.","required":false,"example":"2.0"},{"in":"query","name":"creatinine_umol_l","type":"number","description":"Plasma creatinine in µmol/L (9-1768). Converted as mg/dL = µmol/L / 88.42.","required":false,"example":"176.84"},{"in":"query","name":"urine_sodium_mmol_l","type":"number","description":"Urine sodium in mmol/L (1-300).","required":true,"example":"20"},{"in":"query","name":"urine_creatinine_mg_dl","type":"number","description":"Urine creatinine in mg/dL (1-500). Provide this or urine_creatinine_umol_l.","required":false,"example":"100"},{"in":"query","name":"urine_creatinine_umol_l","type":"number","description":"Urine creatinine in µmol/L (88-44210). Converted as mg/dL = µmol/L / 88.42.","required":false,"example":"8842"}],"errors":[{"code":"invalid_sodium","message":"sodium_mmol_l must be a number from 110 to 160 Returned before settlement; you are not charged.","status":400},{"code":"invalid_creatinine","message":"creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_urine_sodium","message":"urine_sodium_mmol_l must be a number from 1 to 300. Returned before settlement; you are not charged.","status":400},{"code":"invalid_urine_creatinine","message":"urine_creatinine_mg_dl (1-500) or urine_creatinine_umol_l (88-44210) is required. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/fena","citation":{"authors":"Espinel CH","doi":"10.1001/jama.1976.03270060029022","id":"espinel-1976","source":"JAMA. 1976;236(6):579-581","title":"The FENa test. Use in the differential diagnosis of acute renal failure","url":"https://doi.org/10.1001/jama.1976.03270060029022"},"formula_expression":"FENa_percent = 100 * (urine_sodium_mmol_l * plasma_creatinine_mg_dl) / (plasma_sodium_mmol_l * urine_creatinine_mg_dl)","purpose":"Compute fractional excretion of sodium from plasma and urine sodium and creatinine using Espinel 1976.","markdown_url":"https://magentlab.com/docs/fena.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"fena"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"sodium_mmol_l","type":"number","description":"Plasma sodium in mmol/L"},{"name":"creatinine_mg_dl","type":"number","description":"Normalized plasma creatinine"},{"name":"urine_sodium_mmol_l","type":"number","description":"Urine sodium in mmol/L"},{"name":"urine_creatinine_mg_dl","type":"number","description":"Normalized urine creatinine in mg/dL"},{"name":"fena_percent","type":"number","description":"FENa in percent, 2 decimal places"},{"name":"espinel_stratum","type":"string","description":"Espinel 1976 oliguric ARF strata: prerenal (FENa <1), indeterminate (1-3), atn (FENa >3). Not a diagnosis."},{"name":"citation","type":"object","description":"JAMA 1976 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"creatinine_mg_dl":"2.0","sodium_mmol_l":"140","urine_creatinine_mg_dl":"100","urine_sodium_mmol_l":"20"},{"creatinine_mg_dl":"2.0","sodium_mmol_l":"140","urine_creatinine_mg_dl":"100","urine_sodium_mmol_l":"20"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/fena","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/fena?sodium_mmol_l=140&creatinine_mg_dl=2.0&urine_sodium_mmol_l=20&urine_creatinine_mg_dl=100","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/fena","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/feurea","description":"Returns Carvounis FEUrea from BUN, urine urea, and plasma/urine creatinine.","parameters":[{"in":"query","name":"bun_mg_dl","type":"number","description":"Blood urea nitrogen in mg/dL (1-200). Same units as urine urea nitrogen.","required":true,"example":"20"},{"in":"query","name":"urine_urea_mg_dl","type":"number","description":"Urine urea nitrogen in mg/dL (1-2000). Same units as BUN.","required":true,"example":"200"},{"in":"query","name":"creatinine_mg_dl","type":"number","description":"Plasma creatinine in mg/dL. Provide this or creatinine_umol_l.","required":false,"example":"2"},{"in":"query","name":"creatinine_umol_l","type":"number","description":"Plasma creatinine in µmol/L. Converted as mg/dL = µmol/L / 88.42.","required":false,"example":"176.84"},{"in":"query","name":"urine_creatinine_mg_dl","type":"number","description":"Urine creatinine in mg/dL (1-500). Provide this or urine_creatinine_umol_l.","required":false,"example":"100"},{"in":"query","name":"urine_creatinine_umol_l","type":"number","description":"Urine creatinine in µmol/L (88-44210). Converted as mg/dL = µmol/L / 88.42.","required":false,"example":"8842"}],"errors":[{"code":"invalid_creatinine","message":"creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_bun","message":"bun_mg_dl must be a number from 1 to 200. Returned before settlement; you are not charged.","status":400},{"code":"invalid_urine_urea","message":"urine_urea_mg_dl must be a number from 1 to 2000. Returned before settlement; you are not charged.","status":400},{"code":"invalid_urine_creatinine","message":"urine_creatinine_mg_dl (1-500) or urine_creatinine_umol_l (88-44210) is required. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/feurea","citation":{"authors":"Carvounis CP, Nisar S, Guro-Razuman S","doi":"10.1046/j.1523-1755.2002.00683.x","id":"carvounis-2002","source":"Kidney Int. 2002;62(6):2223-2229","title":"Significance of the fractional excretion of urea in the differential diagnosis of acute renal failure","url":"https://doi.org/10.1046/j.1523-1755.2002.00683.x"},"formula_expression":"FEUrea_percent = 100 * (urine_urea_mg_dl * plasma_creatinine_mg_dl) / (bun_mg_dl * urine_creatinine_mg_dl)","purpose":"Compute fractional excretion of urea (FEUN) from BUN, urine urea nitrogen, plasma creatinine, and urine creatinine.","markdown_url":"https://magentlab.com/docs/feurea.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"carvounis"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"bun_mg_dl","type":"number","description":"BUN used in the equation"},{"name":"urine_urea_mg_dl","type":"number","description":"Urine urea nitrogen used"},{"name":"creatinine_mg_dl","type":"number","description":"Normalized plasma creatinine"},{"name":"urine_creatinine_mg_dl","type":"number","description":"Normalized urine creatinine"},{"name":"feurea_percent","type":"number","description":"Fractional excretion of urea in percent, 2 decimal places"},{"name":"carvounis_band","type":"string","description":"Published Carvounis 2002 FEUN cut-point: low (≤35) or high (>35). Not a diagnosis."},{"name":"units","type":"string","description":"%"},{"name":"citation","type":"object","description":"Kidney Int 2002 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"bun_mg_dl":"20","creatinine_mg_dl":"2","urine_creatinine_mg_dl":"100","urine_urea_mg_dl":"200"},{"bun_mg_dl":"20","creatinine_mg_dl":"2","urine_creatinine_mg_dl":"100","urine_urea_mg_dl":"200"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/feurea","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/feurea?bun_mg_dl=20&urine_urea_mg_dl=200&creatinine_mg_dl=2&urine_creatinine_mg_dl=100","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/feurea","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/urine-pcr","description":"Urine protein/creatinine ratio (mg/mg) from spot urine protein and creatinine (Ginsberg 1983). Also returns estimated_g_day equal to the rounded ratio as a numeric estimate of 24-h protein. Bands: <0.2 within normal limits, >3.5 nephrotic-range. Not ACR. Not a 24-h collection. Deterministic published formula with citation; not a diagnosis.","parameters":[{"in":"query","name":"urine_protein_mg_dl","type":"number","description":"Urine total protein in mg/dL (0.1-2000). Total protein, not albumin.","required":true,"example":"100"},{"in":"query","name":"urine_creatinine_mg_dl","type":"number","description":"Urine creatinine in mg/dL (1-500). Provide this or urine_creatinine_umol_l.","required":false,"example":"100"},{"in":"query","name":"urine_creatinine_umol_l","type":"number","description":"Urine creatinine in µmol/L (88-44210). Converted as mg/dL = µmol/L / 88.42.","required":false,"example":"8842"}],"errors":[{"code":"invalid_urine_pcr","message":"urine_protein_mg_dl must be a number from 0.1 to 2000 (Ginsberg 1983 protein/creatinine ratio). Returned before settlement; you are not charged.","status":400},{"code":"invalid_urine_creatinine","message":"urine_creatinine_mg_dl (1-500) or urine_creatinine_umol_l (88-44210) is required. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/urine-pcr","citation":{"authors":"Ginsberg JM, Chang BS, Matarese RA, Garella S","doi":"10.1056/nejm198312223092503","id":"ginsberg-1983","pmid":"6656849","source":"N Engl J Med. 1983;309(25):1543-1546","title":"Use of single voided urine samples to estimate quantitative proteinuria","url":"https://doi.org/10.1056/nejm198312223092503"},"formula_expression":"protein_creatinine_ratio = urine_protein_mg_dl / urine_creatinine_mg_dl","purpose":"Compute the Ginsberg 1983 urine protein/creatinine ratio (mg/mg) from a single-void urine protein and urine creatinine, and return that rounded ratio as estimated_g_day (numeric estimate of 24-h protein g/day).","markdown_url":"https://magentlab.com/docs/urine-pcr.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"ginsberg"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"urine_protein_mg_dl","type":"number","description":"Urine total protein in mg/dL"},{"name":"urine_creatinine_mg_dl","type":"number","description":"Normalized urine creatinine in mg/dL"},{"name":"protein_creatinine_ratio","type":"number","description":"Protein/creatinine ratio in mg/mg, 2 decimal places"},{"name":"estimated_g_day","type":"number","description":"Numeric estimate of 24-h protein g/day, equal to the rounded ratio (Ginsberg 1983). Not a measured 24-h collection."},{"name":"ginsberg_band","type":"string","description":"Ginsberg 1983 bands: lt_0_2 (ratio <0.2, within normal limits), gt_3_5 (ratio >3.5, nephrotic-range), or 0_2_to_3_5. Exact 0.2 and 3.5 are mid. Not a diagnosis."},{"name":"citation","type":"object","description":"NEJM 1983 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"urine_creatinine_mg_dl":"100","urine_protein_mg_dl":"100"},{"urine_creatinine_mg_dl":"100","urine_protein_mg_dl":"100"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/urine-pcr","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/urine-pcr?urine_protein_mg_dl=100&urine_creatinine_mg_dl=100","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/urine-pcr","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/vurx","description":"Kirsch 2014 VURx for children <2 years with primary vesicoureteral reflux. Caller-assigned vur_timing (voiding 1, late filling 2, early- or mid-filling 3), female (1), high_grade grade IV-V (1), and ureteral_anomaly (complete duplication or periureteral diverticulum, 1). Score 1-6. Improvement or resolution: 1 → 89%, 2 → 69%, 3 → 53%, 4 → 16%, 5-6 → 11%. magent does not read a VCUG. Not a medical device. Not a surgery order.","parameters":[{"in":"query","name":"female","type":"boolean","description":"Female sex (Kirsch 2014: 1 point). false for male (0 points). true or false. magent does not assign sex from a chart.","required":true,"example":"false"},{"in":"query","name":"vur_timing","type":"string","enum":["voiding","late_filling","early_mid_filling"],"description":"Caller-assigned VUR timing on VCUG (Kirsch 2014): voiding (1; voiding only), late_filling (2), or early_mid_filling (3; early- or mid-filling). magent does not read a VCUG.","required":true,"example":"voiding"},{"in":"query","name":"high_grade","type":"boolean","description":"Whether VUR grade is IV or V (Kirsch 2014: 1 point). false for grades I-III (0 points). true or false. magent does not assign grade from images.","required":true,"example":"false"},{"in":"query","name":"ureteral_anomaly","type":"boolean","description":"Complete ureteral duplication or periureteral diverticulum (Kirsch 2014: 1 point). true or false. magent does not read a VCUG.","required":true,"example":"false"}],"errors":[{"code":"invalid_vurx","message":"VURx inputs must match Kirsch 2014 gender, reflux timing, grade, and ureteral-anomaly factors from that paper. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/vurx","citation":{"authors":"Kirsch AJ, Arlen AM, Leong T, et al","doi":"10.1016/j.jpurol.2014.06.019","id":"kirsch-2014","pmid":"25511573","source":"J Pediatr Urol. 2014;10(6):1249-1254","title":"Vesicoureteral reflux index (VURx): a novel tool to predict primary reflux improvement and resolution in children less than 2 years of age","url":"https://doi.org/10.1016/j.jpurol.2014.06.019"},"formula_expression":"VURx = vur_timing (voiding 1, late_filling 2, early_mid_filling 3) + female (1) + high_grade (grade IV-V 1) + ureteral_anomaly (complete ureteral duplication or periureteral diverticulum 1); min 1, max 6; Kirsch 2014 children <2 years; improvement or resolution: 1 → 89%, 2 → 69%, 3 → 53%, 4 → 16%, 5-6 → 11%","purpose":"Sum the Kirsch 2014 VURx factors (VUR timing 1-3, female sex, grade IV-V, complete ureteral duplication or periureteral diverticulum) and return score 1-6 with that derivation paper's improvement or resolution percent.","markdown_url":"https://magentlab.com/docs/vurx.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"vurx"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Kirsch 2014 VURx points 1-6"},{"name":"max_score","type":"integer","description":"Always 6"},{"name":"improvement_or_resolution_percent","type":"integer","description":"Kirsch 2014 derivation improvement or resolution percent: 89 (score 1), 69 (2), 53 (3), 16 (4), or 11 (5-6). Not later validation percents."},{"name":"female","type":"boolean","description":"Echo of the caller-assigned female flag"},{"name":"vur_timing","type":"string","description":"Echo of caller-assigned timing: voiding, late_filling, or early_mid_filling"},{"name":"high_grade","type":"boolean","description":"Echo of the caller-assigned grade IV-V flag"},{"name":"ureteral_anomaly","type":"boolean","description":"Echo of the caller-assigned complete ureteral duplication or periureteral diverticulum flag"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Kirsch et al. J Pediatr Urol 2014 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"female":"false","high_grade":"false","ureteral_anomaly":"false","vur_timing":"voiding"},{"female":"false","high_grade":"false","ureteral_anomaly":"false","vur_timing":"voiding"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/vurx","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/vurx?female=false&vur_timing=voiding&high_grade=false&ureteral_anomaly=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/vurx","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/stone-nephrolithometry","description":"Okhunov 2013 STONE nephrolithometry for kidney calculi (PCNL). Caller-assigned published item points: size 0_399 1 / 400_799 2 / 800_1599 3 / ge_1600 4 (mm²); tract le_100 1 / gt_100 2 (skin-to-stone mm); obstruction none_or_mild 1 / moderate_or_severe 2 (hydronephrosis); calyces 1_or_2 1 / 3 2 / staghorn 3; essence le_950 1 / gt_950 2 (HU). Sum 5-13. No published SFR bands. Not the Moore 2014 ureteral STONE score. magent does not measure CT. Not a medical device. Not a PCNL order.","parameters":[{"in":"query","name":"size","type":"string","enum":["0_399","400_799","800_1599","ge_1600"],"description":"Caller-assigned stone size in mm² (Okhunov 2013). 0_399 (0–399 mm²) scores 1; 400_799 (400–799 mm²) scores 2; 800_1599 (800–1599 mm²) scores 3; ge_1600 (≥1600 mm²) scores 4. magent does not measure stone size or CT.","required":true,"example":"0_399"},{"in":"query","name":"tract","type":"string","enum":["le_100","gt_100"],"description":"Caller-assigned tract length in mm, skin-to-stone (Okhunov 2013). le_100 (≤100 mm) scores 1; gt_100 (>100 mm) scores 2. magent does not measure tract length or CT.","required":true,"example":"le_100"},{"in":"query","name":"obstruction","type":"string","enum":["none_or_mild","moderate_or_severe"],"description":"Caller-assigned hydronephrosis / obstruction (Okhunov 2013). none_or_mild scores 1; moderate_or_severe scores 2. magent does not measure hydronephrosis or CT.","required":true,"example":"none_or_mild"},{"in":"query","name":"calyces","type":"string","enum":["1_or_2","3","staghorn"],"description":"Caller-assigned number of involved calyces or staghorn (Okhunov 2013). 1_or_2 scores 1; 3 scores 2; staghorn scores 3. magent does not count calyces or read CT.","required":true,"example":"1_or_2"},{"in":"query","name":"essence","type":"string","enum":["le_950","gt_950"],"description":"Caller-assigned stone density in Hounsfield units (Okhunov 2013 essence). le_950 (≤950 HU) scores 1; gt_950 (>950 HU) scores 2. magent does not measure HU or CT.","required":true,"example":"le_950"}],"errors":[{"code":"invalid_stone_nephrolithometry","message":"size must be 0_399, 400_799, 800_1599, or ge_1600; tract must be le_100 or gt_100; obstruction must be none_or_mild or moderate_or_severe; calyces must be 1_or_2, 3, or staghorn; essence must be le_950 or gt_950 (Okhunov 2013 STONE nephrolithometry). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/stone-nephrolithometry","citation":{"authors":"Okhunov Z, Friedlander JI, George AK, Duty BD, Moreira DM, Srinivasan AK, Hillelsohn J, Smith AD, Okeke Z","doi":"10.1016/j.urology.2012.10.083","id":"okhunov-2013","pmid":"23540858","source":"Urology. 2013;81(6):1154-1159","title":"S.T.O.N.E. nephrolithometry: novel surgical classification system for kidney calculi","url":"https://doi.org/10.1016/j.urology.2012.10.083"},"formula_expression":"STONE = size (0_399 1, 400_799 2, 800_1599 3, ge_1600 4) + tract (le_100 1, gt_100 2) + obstruction (none_or_mild 1, moderate_or_severe 2) + calyces (1_or_2 1, 3 2, staghorn 3) + essence (le_950 1, gt_950 2); Okhunov 2013 STONE nephrolithometry; sum 5-13; no published SFR bands","purpose":"Sum the Okhunov 2013 STONE nephrolithometry score for kidney calculi (PCNL) from five caller-assigned published item points and return the integer total (5–13). Does not return stone-free-rate bands.","markdown_url":"https://magentlab.com/docs/stone-nephrolithometry.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"stone_nephrolithometry"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Okhunov 2013 STONE nephrolithometry integer sum 5-13. Not a PCNL order. No published SFR band."},{"name":"max_score","type":"integer","description":"13"},{"name":"size","type":"string","description":"Caller-assigned size used (0_399, 400_799, 800_1599, or ge_1600)"},{"name":"tract","type":"string","description":"Caller-assigned tract used (le_100 or gt_100)"},{"name":"obstruction","type":"string","description":"Caller-assigned obstruction used (none_or_mild or moderate_or_severe)"},{"name":"calyces","type":"string","description":"Caller-assigned calyces used (1_or_2, 3, or staghorn)"},{"name":"essence","type":"string","description":"Caller-assigned essence used (le_950 or gt_950)"},{"name":"components","type":"array","description":"Per-item Okhunov 2013 points"},{"name":"citation","type":"object","description":"Okhunov et al. Urology 2013 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"calyces":"1_or_2","essence":"le_950","obstruction":"none_or_mild","size":"0_399","tract":"le_100"},{"calyces":"1_or_2","essence":"le_950","obstruction":"none_or_mild","size":"0_399","tract":"le_100"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/stone-nephrolithometry","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/stone-nephrolithometry?size=0_399&tract=le_100&obstruction=none_or_mild&calyces=1_or_2&essence=le_950","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/stone-nephrolithometry","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/renal-nephrometry","description":"Kutikov 2009 R.E.N.A.L. nephrometry. Caller-assigned radius le_4 1 / gt_4_lt_7 2 / ge_7 3 (cm); exophytic ge_50 1 / lt_50 2 / entirely_endophytic 3; nearness ge_7 1 / gt_4_lt_7 2 / le_4 3 (mm); location entirely_polar 1 / crosses_polar 2 / gt_50_midline_or_between 3. Anterior a|p|x and hilar suffix h are descriptors, not points. Sum 4-12. No published complexity bands. Not PADUA. Not STONE nephrolithometry. magent does not read CT. Not a medical device. Not a nephrectomy order.","parameters":[{"in":"query","name":"radius","type":"string","enum":["le_4","gt_4_lt_7","ge_7"],"description":"Caller-assigned maximal diameter in cm (Kutikov 2009 R, radius). le_4 (≤4 cm) scores 1; gt_4_lt_7 (>4 but <7 cm) scores 2; ge_7 (≥7 cm) scores 3. magent does not measure diameter or read CT.","required":true,"example":"le_4"},{"in":"query","name":"exophytic","type":"string","enum":["ge_50","lt_50","entirely_endophytic"],"description":"Caller-assigned exophytic/endophytic properties (Kutikov 2009 E). ge_50 (≥50% exophytic) scores 1; lt_50 (<50% exophytic) scores 2; entirely_endophytic (completely endophytic) scores 3. magent does not read CT.","required":true,"example":"ge_50"},{"in":"query","name":"nearness","type":"string","enum":["ge_7","gt_4_lt_7","le_4"],"description":"Caller-assigned nearness of the deepest portion of the mass to the collecting system or sinus in mm (Kutikov 2009 N). ge_7 (≥7 mm) scores 1; gt_4_lt_7 (>4 but <7 mm) scores 2; le_4 (≤4 mm) scores 3. magent does not measure nearness or read CT.","required":true,"example":"ge_7"},{"in":"query","name":"anterior","type":"string","enum":["a","p","x"],"description":"Caller-assigned anterior/posterior descriptor (Kutikov 2009 A). a (anterior), p (posterior), or x (indeterminate). 0 points; echoed as anterior. magent does not read CT.","required":true,"example":"a"},{"in":"query","name":"location","type":"string","enum":["entirely_polar","crosses_polar","gt_50_midline_or_between"],"description":"Caller-assigned location relative to polar lines (Kutikov 2009 L). entirely_polar (entirely above the upper polar line or entirely below the lower polar line) scores 1; crosses_polar (mass crosses a polar line) scores 2; gt_50_midline_or_between (>50% of the mass is across a polar line, or the mass crosses the axial renal midline, or the mass is entirely between the polar lines) scores 3. magent does not read CT.","required":true,"example":"entirely_polar"},{"in":"query","name":"hilar","type":"boolean","description":"Caller-assigned hilar suffix (Kutikov 2009). true means the mass abuts the main renal artery or vein (suffix h). Boolean, not points. magent does not read CT.","required":true,"example":"false"}],"errors":[{"code":"invalid_renal_nephrometry","message":"radius must be le_4, gt_4_lt_7, or ge_7; exophytic must be ge_50, lt_50, or entirely_endophytic; nearness must be ge_7, gt_4_lt_7, or le_4; anterior must be a, p, or x; location must be entirely_polar, crosses_polar, or gt_50_midline_or_between (Kutikov 2009 R.E.N.A.L.). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/renal-nephrometry","citation":{"authors":"Kutikov A, Uzzo RG","doi":"10.1016/j.juro.2009.05.035","id":"kutikov-2009","pmid":"19616235","source":"J Urol. 2009;182(3):844-853","title":"The R.E.N.A.L. Nephrometry Score: A Comprehensive Standardized System for Quantitating Renal Tumor Size, Location and Depth","url":"https://doi.org/10.1016/j.juro.2009.05.035"},"formula_expression":"RENAL = radius (le_4 1, gt_4_lt_7 2, ge_7 3) + exophytic (ge_50 1, lt_50 2, entirely_endophytic 3) + nearness (ge_7 1, gt_4_lt_7 2, le_4 3) + location (entirely_polar 1, crosses_polar 2, gt_50_midline_or_between 3); anterior a|p|x 0 points; hilar suffix h boolean 0 points; Kutikov 2009 R.E.N.A.L. Nephrometry; sum 4-12; no published complexity bands","purpose":"Sum the Kutikov 2009 R.E.N.A.L. nephrometry score for a renal mass from four caller-assigned published item points (radius, exophytic/endophytic, nearness, location) and return the integer total (4–12) plus anterior and hilar descriptors. Does not return complexity bands.","markdown_url":"https://magentlab.com/docs/renal-nephrometry.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"renal_nephrometry"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Kutikov 2009 R.E.N.A.L. nephrometry integer sum 4-12 (R+E+N+L). Anterior and hilar are not added. Not a nephrectomy order. No published complexity band."},{"name":"max_score","type":"integer","description":"12"},{"name":"r","type":"integer","description":"Radius points 1-3 (Kutikov 2009 R)"},{"name":"e","type":"integer","description":"Exophytic/endophytic points 1-3 (Kutikov 2009 E)"},{"name":"n","type":"integer","description":"Nearness points 1-3 (Kutikov 2009 N)"},{"name":"l","type":"integer","description":"Location points 1-3 (Kutikov 2009 L)"},{"name":"radius","type":"string","description":"Caller-assigned radius used (le_4, gt_4_lt_7, or ge_7)"},{"name":"exophytic","type":"string","description":"Caller-assigned exophytic used (ge_50, lt_50, or entirely_endophytic)"},{"name":"nearness","type":"string","description":"Caller-assigned nearness used (ge_7, gt_4_lt_7, or le_4)"},{"name":"anterior","type":"string","description":"Caller-assigned anterior descriptor used (a, p, or x). 0 points."},{"name":"location","type":"string","description":"Caller-assigned location used (entirely_polar, crosses_polar, or gt_50_midline_or_between)"},{"name":"hilar","type":"boolean","description":"true when the mass abuts the main renal artery or vein (suffix h). Not scored."},{"name":"renal_string","type":"string","description":"Kutikov 2009 notation: {score}{anterior} plus h if hilar (for example 4a or 12xh)"},{"name":"components","type":"array","description":"Per-item Kutikov 2009 R, E, N, L points"},{"name":"citation","type":"object","description":"Kutikov and Uzzo J Urol 2009 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"anterior":"a","exophytic":"ge_50","hilar":"false","location":"entirely_polar","nearness":"ge_7","radius":"le_4"},{"anterior":"a","exophytic":"ge_50","hilar":"false","location":"entirely_polar","nearness":"ge_7","radius":"le_4"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/renal-nephrometry","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/renal-nephrometry?radius=le_4&exophytic=ge_50&nearness=ge_7&anterior=a&location=entirely_polar&hilar=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/renal-nephrometry","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/fuhrman","description":"Fuhrman 1982 nuclear grade for renal cell carcinoma as assigned by the caller (grades 1-4). Returns the grade and the published nuclear-feature description. magent does not read slides. Not WHO/ISUP 2016. Not an RCC diagnosis. Not a medical device.","parameters":[{"in":"query","name":"fuhrman_grade","type":"integer","description":"Fuhrman 1982 nuclear grade 1-4 as assigned by the caller (1 small ~10 μm round uniform nuclei, nucleoli absent or inconspicuous; 2 larger ~15 μm nuclei with outline irregularities, nucleoli visible at ×400; 3 even larger ~20 μm with obvious irregular outline, nucleoli prominent at ×100; 4 as for grade 3 with bizarre often multilobed nuclei ± spindle cells). Integer 1-4 only; reject 0, 5, 1.5, and roman I. Not WHO/ISUP 2016. magent does not read slides.","required":true,"example":"1"}],"errors":[{"code":"invalid_fuhrman","message":"fuhrman_grade must be 1, 2, 3, or 4 (Fuhrman 1982 nuclear grade). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/fuhrman","citation":{"authors":"Fuhrman SA, Lasky LC, Limas C","doi":"10.1097/00000478-198210000-00007","id":"fuhrman-1982","pmid":"7180965","source":"Am J Surg Pathol. 1982;6(7):655-663","title":"Prognostic significance of morphologic parameters in renal cell carcinoma","url":"https://doi.org/10.1097/00000478-198210000-00007"},"formula_expression":"fuhrman_grade in {1, 2, 3, 4} as assigned by the caller (Fuhrman 1982 four nuclear grades in order of increasing nuclear size, irregularity, and nucleolar prominence). Not WHO/ISUP 2016. magent does not read slides.","purpose":"Echo the caller-assigned Fuhrman 1982 nuclear grade (1-4) with the published nuclear-feature description. magent does not read slides. Not WHO/ISUP 2016.","markdown_url":"https://magentlab.com/docs/fuhrman.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"fuhrman"},{"name":"formula_expression","type":"string","description":"Published Fuhrman 1982 nuclear-grade rule"},{"name":"fuhrman_grade","type":"integer","description":"Caller-assigned Fuhrman 1982 nuclear grade 1-4"},{"name":"description","type":"string","description":"Fuhrman 1982 nuclear-feature wording for that grade"},{"name":"components","type":"array","description":"Per-grade Tree rows grade_1, grade_2, grade_3, grade_4 with factor and met; exactly one is met"},{"name":"citation","type":"object","description":"Fuhrman 1982 Am J Surg Pathol citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"fuhrman_grade":"1"},{"fuhrman_grade":"1"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/fuhrman","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/fuhrman?fuhrman_grade=1","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/fuhrman","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/gleason","description":"Gleason 1974 prostatic adenocarcinoma score from caller-assigned primary pattern 1-5 plus secondary pattern 1-5. Score equals primary plus secondary (range 2-10). magent does not read slides. Not ISUP/Epstein 2016 Grade Groups. Not 2005 ISUP modified pattern rules. Not a diagnosis or treatment recommendation. Not a medical device.","parameters":[{"in":"query","name":"primary","type":"integer","description":"Caller-assigned Gleason 1974 primary (predominant) histologic pattern. Integer 1-5 only; reject 0, 6, 1.5, and roman I. magent does not read slides or apply 2005 ISUP modified pattern rules.","required":true,"example":"3"},{"in":"query","name":"secondary","type":"integer","description":"Caller-assigned Gleason 1974 secondary histologic pattern. Integer 1-5 only; reject 0, 6, 1.5, and roman I. magent does not read slides or apply 2005 ISUP modified pattern rules.","required":true,"example":"3"}],"errors":[{"code":"invalid_gleason","message":"Gleason score inputs must be caller-assigned pattern integers 1-5 for the two patterns summed in Gleason 1974. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/gleason","citation":{"authors":"Gleason DF, Mellinger GT","doi":"10.1016/S0022-5347(17)59889-4","id":"gleason-1974","pmid":"4813554","source":"J Urol. 1974;111(1):58-64","title":"Prediction of prognosis for prostatic adenocarcinoma by combined histological grading and clinical staging","url":"https://doi.org/10.1016/S0022-5347(17)59889-4"},"formula_expression":"Gleason score = primary + secondary; each pattern 1-5 as assigned by the caller (Gleason 1974); range 2-10. magent does not read slides. Not ISUP/Epstein 2016 Grade Groups. Not 2005 ISUP modified pattern rules.","purpose":"Sum caller-assigned Gleason 1974 primary and secondary histologic patterns (each 1-5) and return score 2-10. magent does not read slides. Not ISUP/Epstein 2016 Grade Groups.","markdown_url":"https://magentlab.com/docs/gleason.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"gleason"},{"name":"formula_expression","type":"string","description":"Published Gleason 1974 primary-plus-secondary sum"},{"name":"primary","type":"integer","description":"Caller-assigned Gleason 1974 primary pattern 1-5"},{"name":"secondary","type":"integer","description":"Caller-assigned Gleason 1974 secondary pattern 1-5"},{"name":"score","type":"integer","description":"primary + secondary (range 2-10)"},{"name":"max_score","type":"integer","description":"10"},{"name":"components","type":"array","description":"Per-pattern Points rows primary and secondary; points equal the integer itself"},{"name":"citation","type":"object","description":"Gleason 1974 J Urol citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"primary":"3","secondary":"3"},{"primary":"3","secondary":"3"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/gleason","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/gleason?primary=3&secondary=3","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/gleason","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/ssign","description":"Frank 2002 SSIGN (stage, size, grade, necrosis) for clear cell RCC after radical nephrectomy. 1997 TNM: pT1 0, pT2 1, pT3 2, pT4 0; N0/Nx 0, N1/N2 2; M0 0, M1 4; size ≥5 cm 2; nuclear grade 1–2 0, 3 1, 4 3; coagulative necrosis 2; max 15. Returns the published CSS row. Not 2002/2010 TNM. magent does not stage or read pathology. Not a diagnosis. Not a medical device.","parameters":[{"in":"query","name":"t_1997","type":"string","enum":["t1","t2","t3","t3a","t3b","t3c","t4"],"description":"1997 pathologic T as assigned by the caller (Frank 2002 SSIGN). t1 scores 0; t2 scores 1; t3, t3a, t3b, or t3c scores 2; t4 scores 0 (published 1997 weight). Not 2002/2010 T1a/T1b. magent does not stage the tumor.","required":true,"example":"t1"},{"in":"query","name":"n_1997","type":"string","enum":["n0","nx","n1","n2"],"description":"1997 pathologic N as assigned by the caller (Frank 2002 SSIGN). n0 or nx scores 0; n1 or n2 scores 2. magent does not stage nodes.","required":true,"example":"n0"},{"in":"query","name":"m_1997","type":"string","enum":["m0","m1"],"description":"1997 pathologic M as assigned by the caller (Frank 2002 SSIGN). m0 scores 0; m1 scores 4. magent does not assign M.","required":true,"example":"m0"},{"in":"query","name":"tumor_size_cm","type":"number","description":"Maximum tumor size in cm as assigned by the caller (Frank 2002). Unrounded; 5.0 cm or greater scores 2. Magent clamp 0.1-40, not a published range. magent does not measure the tumor.","required":true,"example":"3"},{"in":"query","name":"fuhrman","type":"integer","description":"Nuclear grade 1-4 as assigned by the caller (Frank 2002 SSIGN). 1-2 score 0; 3 scores 1; 4 scores 3. Integer 1-4 only; reject 0, 5, 1.5, and roman I. magent does not read slides.","required":true,"example":"1"},{"in":"query","name":"necrosis","type":"boolean","description":"Coagulative tumor necrosis as assigned by the caller (Frank 2002). true scores 2. magent does not read slides.","required":true,"example":"false"}],"errors":[{"code":"invalid_ssign","message":"t_1997, n_1997, m_1997, tumor_size_cm, fuhrman, and necrosis must match Frank 2002 SSIGN 1997 TNM weights (not later TNM editions). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/ssign","citation":{"authors":"Frank I, Blute ML, Cheville JC, Lohse CM, Weaver AL, Zincke H","doi":"10.1016/s0022-5347(05)64153-5","id":"frank-2002","pmid":"12441925","source":"J Urol. 2002;168(6):2395-2400","title":"An outcome prediction model for patients with clear cell renal cell carcinoma treated with radical nephrectomy based on tumor stage, size, grade and necrosis: the SSIGN score","url":"https://doi.org/10.1016/s0022-5347(05)64153-5"},"formula_expression":"SSIGN = t_1997 (t1 0, t2 1, t3/t3a/t3b/t3c 2, t4 0) + n_1997 (n0/nx 0, n1/n2 2) + m_1997 (m0 0, m1 4) + tumor_size_cm >=5 2 + fuhrman (1-2 0, 3 1, 4 3) + necrosis 2; Frank 2002 1997 TNM only; max 15; CSS rows 0-1, 2, 3, 4, 5, 6, 7, 8, 9, ge_10","purpose":"Sum the Frank 2002 SSIGN score from caller-assigned 1997 TNM, tumor size, nuclear grade, and coagulative necrosis, and return the published cancer-specific survival row.","markdown_url":"https://magentlab.com/docs/ssign.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"ssign"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Frank 2002 SSIGN integer sum 0-15. Not an RCC diagnosis."},{"name":"max_score","type":"integer","description":"15"},{"name":"css_band","type":"string","description":"Frank 2002 CSS row key: 0-1, 2, 3, 4, 5, 6, 7, 8, 9, or ge_10. Historical cohort row, not an individualized prediction."},{"name":"css_1_year_percent","type":"number","description":"Frank 2002 estimated 1-year cancer-specific survival percent for this row"},{"name":"css_3_year_percent","type":"number","description":"Frank 2002 estimated 3-year cancer-specific survival percent for this row"},{"name":"css_5_year_percent","type":"number","description":"Frank 2002 estimated 5-year cancer-specific survival percent for this row"},{"name":"css_7_year_percent","type":"number","description":"Frank 2002 estimated 7-year cancer-specific survival percent for this row"},{"name":"css_10_year_percent","type":"number","description":"Frank 2002 estimated 10-year cancer-specific survival percent for this row"},{"name":"t_1997","type":"string","description":"Caller-assigned 1997 T used (t1, t2, t3, t3a, t3b, t3c, or t4)"},{"name":"n_1997","type":"string","description":"Caller-assigned 1997 N used (n0, nx, n1, or n2)"},{"name":"m_1997","type":"string","description":"Caller-assigned 1997 M used (m0 or m1)"},{"name":"tumor_size_cm","type":"number","description":"Caller-assigned tumor size in cm used (unrounded at the 5 cm boundary)"},{"name":"fuhrman","type":"integer","description":"Caller-assigned nuclear grade 1-4 used"},{"name":"necrosis","type":"boolean","description":"Caller-assigned coagulative necrosis flag used"},{"name":"components","type":"array","description":"Per-factor Frank 2002 SSIGN points"},{"name":"citation","type":"object","description":"Frank et al. J Urol 2002 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"fuhrman":"1","m_1997":"m0","n_1997":"n0","necrosis":"false","t_1997":"t1","tumor_size_cm":"3"},{"fuhrman":"1","m_1997":"m0","n_1997":"n0","necrosis":"false","t_1997":"t1","tumor_size_cm":"3"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/ssign","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/ssign?t_1997=t1&n_1997=n0&m_1997=m0&tumor_size_cm=3&fuhrman=1&necrosis=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/ssign","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/leibovich-2018","description":"Leibovich 2018 histology-specific RCC models after surgery. Required histology clear_cell, papillary, or chromophobe. ccRCC PFS points (2010 TNM): t1a/t1b/t2a 0, t2b 2, t3a-t3c 3, t4 4; nx/n0 0, n1 2; size ≥10 cm 1; grade 1-2 0, 3 1, 4 3; necrosis 2; max 12; risk low 0-2, intermediate 3-5, high ≥6. Papillary and chromophobe return the 2018 three PFS groups (score 0-2). Not SSIGN. Not Leibovich 2003. magent does not stage or read pathology. Not a diagnosis. Not a medical device.","parameters":[{"in":"query","name":"histology","type":"string","enum":["clear_cell","papillary","chromophobe"],"description":"Surgical histology as assigned by the caller (Leibovich 2018). clear_cell, papillary, or chromophobe. Not collecting-duct or unclassified. magent does not read slides.","required":true,"example":"clear_cell"},{"in":"query","name":"t_stage","type":"string","enum":["t1a","t1b","t2a","t2b","t3a","t3b","t3c","t4"],"description":"2010 pathologic T as assigned by the caller (Leibovich 2018). t1a, t1b, t2a, t2b, t3a, t3b, t3c, or t4. Not 1997/2002 T without a/b substages. magent does not stage the tumor.","required":true,"example":"t1a"},{"in":"query","name":"n_stage","type":"string","enum":["nx","n0","n1"],"description":"2010 pathologic N as assigned by the caller (Leibovich 2018). nx or n0 scores 0 on ccRCC; n1 scores 2. Not n2 (2002 N). magent does not stage nodes.","required":true,"example":"n0"},{"in":"query","name":"tumor_size_cm","type":"number","description":"Maximum tumor size in cm as assigned by the caller (Leibovich 2018). Unrounded; 10.0 cm or greater scores 1 on ccRCC. Magent clamp 0.1-30, not a published range. magent does not measure the tumor.","required":true,"example":"3"},{"in":"query","name":"nuclear_grade","type":"integer","description":"Nuclear grade 1-4 as assigned by the caller (Leibovich 2018). On ccRCC, 1-2 score 0; 3 scores 1; 4 scores 3. Integer 1-4 only; reject 0, 5, 1.5, and roman I. magent does not read slides.","required":true,"example":"2"},{"in":"query","name":"necrosis","type":"boolean","description":"Histologic tumor necrosis as assigned by the caller (Leibovich 2018). true scores 2 on ccRCC. magent does not read slides.","required":true,"example":"false"}],"errors":[{"code":"invalid_rcc_histology","message":"histology must be clear_cell, papillary, or chromophobe (Leibovich 2018). Returned before settlement; you are not charged.","status":400},{"code":"invalid_t_stage","message":"t_stage must be a pathologic T token from the cited paper (Leibovich 2018). Returned before settlement; you are not charged.","status":400},{"code":"invalid_n_stage","message":"n_stage must be nx, n0, or n1 (Leibovich 2018). Returned before settlement; you are not charged.","status":400},{"code":"invalid_nuclear_grade","message":"nuclear_grade must be an integer from 1 to 4 (Leibovich 2018). Returned before settlement; you are not charged.","status":400},{"code":"invalid_tumor_size_cm","message":"tumor_size_cm must be a number from 0.1 to 30 (Leibovich 2018 tumor size cm). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/leibovich-2018","citation":{"authors":"Leibovich BC, Lohse CM, Cheville JC, Zaid HB, Boorjian SA, Frank I, Thompson RH, Parker WP","doi":"10.1016/j.eururo.2018.01.005","id":"leibovich-2018","pmid":"29398265","source":"Eur Urol. 2018;73(5):772-780","title":"Predicting Oncologic Outcomes in Renal Cell Carcinoma After Surgery","url":"https://doi.org/10.1016/j.eururo.2018.01.005"},"formula_expression":"ccRCC PFS (Leibovich 2018, 2010 TNM): t_stage (t1a/t1b/t2a 0, t2b 2, t3a/t3b/t3c 3, t4 4) + n_stage (nx/n0 0, n1 2) + tumor_size_cm >=10 1 + nuclear_grade (1-2 0, 3 1, 4 3) + necrosis 2; max 12; risk low 0-2, intermediate 3-5, high >=6. papillary PFS groups: low grade 1-2 and t1-t2; intermediate grade 3 and t1-t2; high grade 4 or t3a-t4 (fat or thrombus). chromophobe PFS groups: low t1-t2 and nx/n0; intermediate t3a-t4 and nx/n0 (fat); high n1. Not Frank 2002 SSIGN. Not Leibovich 2003. No chromophobe CSS model.","purpose":"Sum the Leibovich 2018 progression-free score from caller-assigned histology, 2010 T and N, tumor size, nuclear grade, and necrosis, and return the published risk grouping for that histology.","markdown_url":"https://magentlab.com/docs/leibovich-2018.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"leibovich_2018"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"histology","type":"string","description":"Caller-assigned histology used (clear_cell, papillary, or chromophobe)"},{"name":"t_stage","type":"string","description":"Caller-assigned 2010 T used (t1a, t1b, t2a, t2b, t3a, t3b, t3c, or t4)"},{"name":"n_stage","type":"string","description":"Caller-assigned 2010 N used (nx, n0, or n1)"},{"name":"tumor_size_cm","type":"number","description":"Caller-assigned tumor size in cm used (unrounded at the 10 cm boundary)"},{"name":"nuclear_grade","type":"integer","description":"Caller-assigned nuclear grade 1-4 used"},{"name":"necrosis","type":"boolean","description":"Caller-assigned histologic necrosis flag used"},{"name":"score","type":"integer","description":"Leibovich 2018 PFS integer: ccRCC 0-12 additive points; papillary and chromophobe 0-2 group index. Not an RCC diagnosis."},{"name":"max_score","type":"integer","description":"12 for clear_cell; 2 for papillary and chromophobe"},{"name":"risk","type":"string","description":"low, intermediate, or high. ccRCC uses 0-2 / 3-5 / >=6 on the 2018 weights. papillary and chromophobe use the 2018 three groups. Historical grouping, not an individualized prediction."},{"name":"components","type":"array","description":"Per-factor Leibovich 2018 PFS points"},{"name":"citation","type":"object","description":"Leibovich et al. Eur Urol 2018 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"histology":"clear_cell","n_stage":"n0","necrosis":"false","nuclear_grade":"2","t_stage":"t1a","tumor_size_cm":"3"},{"histology":"clear_cell","n_stage":"n0","necrosis":"false","nuclear_grade":"2","t_stage":"t1a","tumor_size_cm":"3"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/leibovich-2018","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/leibovich-2018?histology=clear_cell&t_stage=t1a&n_stage=n0&tumor_size_cm=3&nuclear_grade=2&necrosis=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/leibovich-2018","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/cp-aki","description":"Gupta 2024 Figure 2 simple CP-AKI score after first IV cisplatin: age, hypertension, diabetes, current or former smoking, hemoglobin g/L, WBC, albumin g/L, magnesium mmol/L, and cisplatin dose mg. Max 22.5. Low / moderate / high / very_high. Not a diagnosis or chemo order. magent does not assay labs or dose cisplatin.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (integer 18-120). Gupta 2024 Figure 2: ≤45 scores 0; 46-60 scores 2.5; 61-70 scores 3.5; >70 scores 4.5.","required":true,"example":"40"},{"in":"query","name":"hypertension","type":"boolean","description":"Caller-assigned hypertension (Gupta 2024 Figure 2). true scores 1. magent does not diagnose hypertension.","required":true,"example":"false"},{"in":"query","name":"diabetes","type":"boolean","description":"Caller-assigned diabetes mellitus (Gupta 2024 Figure 2). true scores 1. magent does not diagnose diabetes.","required":true,"example":"false"},{"in":"query","name":"current_or_former_smoker","type":"boolean","description":"Caller-assigned current or former smoker (Gupta 2024 Figure 2 simple score; BMJ 2024;385:q1207). true scores 1. magent does not take a smoking history.","required":true,"example":"false"},{"in":"query","name":"hemoglobin_g_l","type":"number","description":"Hemoglobin in g/L (30-220), Gupta 2024 units. Provide this or hemoglobin_g_dl, not both. ≥120 scores 0; 110-119 scores 1; <110 scores 1.5. magent does not assay hemoglobin.","required":false,"example":"130"},{"in":"query","name":"hemoglobin_g_dl","type":"number","description":"Hemoglobin in g/dL (3-22). Converted as hemoglobin_g_l = hemoglobin_g_dl × 10. Provide this or hemoglobin_g_l, not both.","required":false,"example":"13"},{"in":"query","name":"wbc_k_ul","type":"number","description":"White blood cell count in 10^9/L (0.01-500), same as k/µL. Provide this or wbc_ul, not both. ≤12.0 scores 0; >12.0 scores 1.5 (Gupta 2024 Figure 2). magent does not assay WBC.","required":false,"example":"8"},{"in":"query","name":"wbc_ul","type":"number","description":"White blood cell count per µL (10-500000). Converted as wbc_10e9_l = wbc_ul / 1000. Provide this or wbc_k_ul, not both.","required":false,"example":"8000"},{"in":"query","name":"albumin_g_l","type":"number","description":"Serum albumin in g/L (10-60), Gupta 2024 units. Provide this or albumin_g_dl, not both. >38 scores 0; 33-38 scores 1; <33 scores 1.5. magent does not assay albumin.","required":false,"example":"42"},{"in":"query","name":"albumin_g_dl","type":"number","description":"Serum albumin in g/dL (1-6). Converted as albumin_g_l = albumin_g_dl × 10. Provide this or albumin_g_l, not both.","required":false,"example":"4.2"},{"in":"query","name":"magnesium_mmol_l","type":"number","description":"Serum magnesium in mmol/L (0.2-2.5), Gupta 2024 units. ≥0.82 scores 0; <0.82 scores 1. magent does not assay magnesium.","required":true,"example":"0.90"},{"in":"query","name":"cisplatin_dose_mg","type":"number","description":"First intravenous cisplatin dose in mg (1-500), Gupta 2024 Figure 2. ≤50 scores 0; 51-75 scores 2; 76-100 scores 2.5; 101-125 scores 3; 126-150 scores 5; 151-200 scores 7.5; >200 scores 9.5. magent does not dose cisplatin.","required":true,"example":"50"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_hemoglobin","message":"hemoglobin_g_l (30-220) or hemoglobin_g_dl (3-22) is required, not both. Returned before settlement; you are not charged.","status":400},{"code":"invalid_wbc","message":"wbc_k_ul (0.01-500) or wbc_ul (10-500000) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_albumin","message":"albumin_g_dl (1-6) or albumin_g_l (10-60) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_magnesium_mmol","message":"magnesium_mmol_l must be a number from 0.2 to 2.5 (Gupta 2024 CP-AKI serum magnesium mmol/L). Returned before settlement; you are not charged.","status":400},{"code":"invalid_cisplatin_dose_mg","message":"cisplatin_dose_mg must be a number from 1 to 500 (Gupta 2024 CP-AKI first intravenous cisplatin dose mg). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/cp-aki","citation":{"authors":"Gupta S, et al.","doi":"10.1136/bmj-2023-077169","id":"gupta-2024","pmid":"38538012","source":"BMJ. 2024;384:e077169","title":"Derivation and external validation of a simple risk score for predicting severe acute kidney injury after intravenous cisplatin: cohort study","url":"https://doi.org/10.1136/bmj-2023-077169"},"formula_expression":"CP-AKI simple = age (≤45 0; 46-60 2.5; 61-70 3.5; >70 4.5) + hypertension 1 + diabetes 1 + current_or_former_smoker 1 + hemoglobin_g_l (≥120 0; 110-119 1; <110 1.5) + wbc_10e9_l (≤12.0 0; >12.0 1.5) + albumin_g_l (>38 0; 33-38 1; <33 1.5) + magnesium_mmol_l (≥0.82 0; <0.82 1) + cisplatin_dose_mg (≤50 0; 51-75 2; 76-100 2.5; 101-125 3; 126-150 5; 151-200 7.5; >200 9.5); Gupta 2024 Figure 2 odds-ratio points; max 22.5; no creatinine; no platelets; low 0-5.5 / moderate 6-9.5 / high 10-15.5 / very_high ≥16","purpose":"Sum the Gupta 2024 Figure 2 simple integer/half-integer points for severe CP-AKI after a first intravenous cisplatin dose and return low, moderate, high, or very_high.","markdown_url":"https://magentlab.com/docs/cp-aki.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"cp_aki"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"number","description":"Gupta 2024 Figure 2 points 0-22.5 (half-integers allowed)"},{"name":"max_score","type":"number","description":"22.5"},{"name":"risk_group","type":"string","description":"Figure 3 groups: low (0-5.5), moderate (6-9.5), high (10-15.5), very_high (≥16). A group, not a diagnosis or chemo order."},{"name":"age","type":"integer","description":"Age in years used for Figure 2 age bands"},{"name":"hemoglobin_g_l","type":"number","description":"Hemoglobin in g/L used for Figure 2 bands (g/dL inputs converted ×10)"},{"name":"wbc_10e9_l","type":"number","description":"WBC in 10^9/L used for the ≤12.0 / >12.0 Figure 2 cut-off"},{"name":"albumin_g_l","type":"number","description":"Albumin in g/L used for Figure 2 bands (g/dL inputs converted ×10)"},{"name":"magnesium_mmol_l","type":"number","description":"Magnesium in mmol/L used for the ≥0.82 / <0.82 Figure 2 cut-off"},{"name":"cisplatin_dose_mg","type":"number","description":"First intravenous cisplatin dose in mg used for Figure 2 dose bands"},{"name":"components","type":"array","description":"Per-factor Figure 2 points"},{"name":"citation","type":"object","description":"Gupta et al. BMJ 2024 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"40","albumin_g_l":"42","cisplatin_dose_mg":"50","current_or_former_smoker":"false","diabetes":"false","hemoglobin_g_l":"130","hypertension":"false","magnesium_mmol_l":"0.90","wbc_k_ul":"8"},{"age":"40","albumin_g_l":"42","cisplatin_dose_mg":"50","current_or_former_smoker":"false","diabetes":"false","hemoglobin_g_l":"130","hypertension":"false","magnesium_mmol_l":"0.90","wbc_k_ul":"8"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/cp-aki","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/cp-aki?age=40&hypertension=false&diabetes=false&current_or_former_smoker=false&hemoglobin_g_l=130&wbc_k_ul=8&albumin_g_l=42&magnesium_mmol_l=0.90&cisplatin_dose_mg=50","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/cp-aki","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/uiss","description":"Zisman 2002 localized N0M0 UISS for surgically resected unilateral RCC. Caller-assigned 1997 pathological T (t1-t4), Fuhrman 1-4, ECOG 0-4, and n0_m0 true. Returns low_risk (T1, Fuhrman 1-2, ECOG 0), high_risk (T3 with Fuhrman 2-4 and ECOG ≥1, or any T4), or intermediate_risk (every other N0M0 combination). Not 2001 I-V. Not metastatic UISS. Not SSIGN. magent does not assign TNM or read slides. Not a diagnosis. Not a medical device.","parameters":[{"in":"query","name":"t_stage","type":"string","enum":["t1","t2","t3","t4"],"description":"1997 pathological T as assigned by the caller (Zisman 2002 localized UISS). t1, t2, t3, or t4. Caller maps T1a/T1b to t1. magent does not assign TNM or read slides.","required":true,"example":"t1"},{"in":"query","name":"n0_m0","type":"boolean","description":"Must be true: surgically resected unilateral RCC that is node-negative and metastasis-negative (Zisman 2002 localized N0M0 UISS). N-positive or M-positive disease is out of scope. Not metastatic UISS.","required":true,"example":"true"},{"in":"query","name":"fuhrman_grade","type":"integer","description":"Fuhrman 1982 nuclear grade 1-4 as assigned by the caller (same parsing as Fuhrman). Integer 1-4 only; reject 0, 5, 1.5, and roman I. magent does not read slides.","required":true,"example":"1"},{"in":"query","name":"ecog","type":"integer","description":"Oken 1982 ECOG performance status 0-4 as assigned by the caller. Grade 5 (dead) is not scored. magent does not observe the patient.","required":true,"example":"0"}],"errors":[{"code":"invalid_uiss","message":"t_stage must be t1, t2, t3, or t4 (1997 TNM); n0_m0 must be true (Zisman 2002 localized N0M0 UISS). Not for N-positive or M-positive disease. Returned before settlement; you are not charged.","status":400},{"code":"invalid_fuhrman","message":"fuhrman_grade must be 1, 2, 3, or 4 (Fuhrman 1982 nuclear grade). Returned before settlement; you are not charged.","status":400},{"code":"invalid_ecog_ps","message":"ecog must be an integer from 0 to 4 (Oken 1982). Grade 5 (dead) is not scored. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/uiss","citation":{"authors":"Zisman A, Pantuck AJ, Wieder J, Chao DH, Dorey F, Said JW, deKernion JB, Figlin RA, Belldegrun AS","doi":"10.1200/JCO.2002.05.111","id":"zisman-2002","pmid":"12454113","source":"J Clin Oncol. 2002;20(23):4559-4566","title":"Risk group assessment and clinical outcome algorithm to predict the natural history of patients with surgically resected renal cell carcinoma","url":"https://doi.org/10.1200/JCO.2002.05.111"},"formula_expression":"UISS localized N0M0 (Zisman 2002): low_risk if t_stage t1 AND fuhrman_grade in {1, 2} AND ecog 0; high_risk if (t_stage t3 AND fuhrman_grade in {2, 3, 4} AND ecog >= 1) OR t_stage t4; else intermediate_risk. Requires surgically resected unilateral RCC with 1997 pathological T and explicit N0M0. Not 2001 five-group I-V. Not metastatic UISS. Not SSIGN.","purpose":"Apply the Zisman 2002 localized N0M0 three-group UISS algorithm to caller-assigned 1997 pathological T, Fuhrman grade, and ECOG PS and return low_risk, intermediate_risk, or high_risk. Does not compute a predicted 5-year disease-specific survival.","markdown_url":"https://magentlab.com/docs/uiss.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"uiss"},{"name":"formula_expression","type":"string","description":"Published Zisman 2002 localized N0M0 three-group rule"},{"name":"t_stage","type":"string","description":"Caller-assigned 1997 pathological T used (t1, t2, t3, or t4)"},{"name":"n0_m0","type":"boolean","description":"true; N-positive or M-positive is rejected before scoring"},{"name":"fuhrman_grade","type":"integer","description":"Caller-assigned Fuhrman 1982 nuclear grade 1-4"},{"name":"ecog","type":"integer","description":"Caller-assigned Oken 1982 ECOG grade 0-4"},{"name":"uiss_group","type":"string","description":"low_risk, intermediate_risk, or high_risk (Zisman 2002 localized N0M0). Not a 5-year DSS prediction. Not 2001 I-V. Not SSIGN."},{"name":"components","type":"array","description":"Tree rows for t_stage, n0_m0, fuhrman_grade, ecog, and exclusive low_risk, intermediate_risk, high_risk with factor and met"},{"name":"citation","type":"object","description":"Zisman 2002 J Clin Oncol citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"ecog":"0","fuhrman_grade":"1","n0_m0":"true","t_stage":"t1"},{"ecog":"0","fuhrman_grade":"1","n0_m0":"true","t_stage":"t1"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/uiss","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/uiss?t_stage=t1&n0_m0=true&fuhrman_grade=1&ecog=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/uiss","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/capra","description":"Cooperberg 2005 UCSF CAPRA preoperative score (Table 1). Caller-assigned PSA (>=2.1-6 0, >6-10 1, >10-20 2, >20-30 3, >30 4), Gleason 1-3/1-3 0, 1-3/4-5 1, primary 4-5 3, clinical T t1/t2 0 or t3a 1, percent positive biopsies <34 0 or >=34 1, age <50 0 or >=50 1. Score 0-10. Table 4 bands 0_1, 2, 3, 4, 5, 6, ge_7 with 5-year RFS 85/81/66/59/60/34/8. Not Kattan. Not D'Amico. Not CAPRA-S. magent does not assay PSA or read biopsies. Not a diagnosis. Not a medical device.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120, Params.age). Cooperberg 2005 Table 1: <50 scores 0; >=50 scores 1.","required":true,"example":"62"},{"in":"query","name":"psa_ng_ml","type":"number","description":"Preoperative PSA in ng/mL as assigned by the caller (2.1-500). Cooperberg 2005 Table 1: >=2.1 and <=6.0 scores 0; >6.0 and <=10.0 scores 1; >10.0 and <=20.0 scores 2; >20.0 and <=30.0 scores 3; >30 scores 4. PSA <2.1 is invalid (paper excluded PSA <2). magent does not assay PSA.","required":true,"example":"5.0"},{"in":"query","name":"gleason_primary","type":"integer","description":"Primary Gleason pattern 1-5 as assigned by the caller (Cooperberg 2005 Table 1). Integer 1-5 only. Combined with gleason_secondary: 1-3/1-3 scores 0; 1-3/4-5 scores 1; primary 4-5 scores 3. magent does not read biopsies.","required":true,"example":"3"},{"in":"query","name":"gleason_secondary","type":"integer","description":"Secondary Gleason pattern 1-5 as assigned by the caller (Cooperberg 2005 Table 1). Integer 1-5 only. Combined with gleason_primary as above. magent does not read biopsies.","required":true,"example":"3"},{"in":"query","name":"t_stage","type":"string","enum":["t1","t2","t3a"],"description":"Clinical T as assigned by the caller (Cooperberg 2005 Table 1). t1 or t2 scores 0; t3a scores 1. Other stages are invalid. Not CAPRA-S pathologic T. magent does not assign TNM.","required":true,"example":"t1"},{"in":"query","name":"percent_positive_biopsies","type":"number","description":"Percent of biopsy cores positive (0-100) as assigned by the caller (Cooperberg 2005 Table 1). <34 scores 0; >=34 scores 1. magent does not read biopsies.","required":true,"example":"20"}],"errors":[{"code":"invalid_capra","message":"psa_ng_ml must be ≥2.1; gleason_primary and gleason_secondary integers 1–5; t_stage t1, t2, or t3a; percent_positive_biopsies 0–100 (Cooperberg 2005 CAPRA Table 1). Returned before settlement; you are not charged.","status":400},{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/capra","citation":{"authors":"Cooperberg MR, Pasta DJ, Elkin EP, Litwin MS, Latini DM, Du Chane J, Carroll PR","doi":"10.1097/01.ju.0000158155.33890.e7","id":"cooperberg-2005","pmid":"15879786","source":"J Urol. 2005;173(6):1938-1942","title":"The University of California, San Francisco Cancer of the Prostate Risk Assessment score: a straightforward and reliable preoperative predictor of disease recurrence after radical prostatectomy","url":"https://doi.org/10.1097/01.ju.0000158155.33890.e7"},"formula_expression":"CAPRA (Cooperberg 2005 Table 1) = psa_ng_ml (>=2.1 and <=6.0 0, >6.0 and <=10.0 1, >10.0 and <=20.0 2, >20.0 and <=30.0 3, >30 4; PSA <2.1 excluded) + gleason (primary/secondary 1-3/1-3 0, 1-3/4-5 1, primary 4-5 3) + t_stage (t1 or t2 0, t3a 1) + percent_positive_biopsies (<34 0, >=34 1) + age (<50 0, >=50 1); score 0-10; Table 4 Kaplan-Meier bands 0_1 / 2 / 3 / 4 / 5 / 6 / ge_7 with 5-year RFS 85 / 81 / 66 / 59 / 60 / 34 / 8. Not Kattan nomogram. Not D'Amico groups. Not CAPRA-S","purpose":"Apply Cooperberg 2005 Table 1 CAPRA points from caller-assigned preoperative PSA, Gleason primary/secondary, clinical T (t1/t2/t3a), percent positive biopsies, and age, and return the 0-10 score, Table 4 Kaplan-Meier band, and Table 4 5-year recurrence-free survival point estimate. Not a diagnosis.","markdown_url":"https://magentlab.com/docs/capra.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"capra"},{"name":"formula_expression","type":"string","description":"Cooperberg 2005 Table 1 CAPRA expression"},{"name":"score","type":"integer","description":"CAPRA points 0-10 (Cooperberg 2005 Table 1)"},{"name":"max_score","type":"integer","description":"10"},{"name":"band","type":"string","description":"Cooperberg 2005 Table 4 Kaplan-Meier group: 0_1 (score 0-1), 2, 3, 4, 5, 6, or ge_7 (score >=7). Not Kattan. Not D'Amico. Not CAPRA-S."},{"name":"rfs_5y_percent","type":"integer","description":"Cooperberg 2005 Table 4 5-year recurrence-free survival point estimate: 0-1 → 85; 2 → 81; 3 → 66; 4 → 59; 5 → 60; 6 → 34; >=7 → 8. A published cohort percent, not a computed Kaplan-Meier."},{"name":"age_years","type":"integer","description":"Age used for Table 1 age points"},{"name":"psa_ng_ml","type":"number","description":"Caller-assigned preoperative PSA used for Table 1 PSA points"},{"name":"gleason_primary","type":"integer","description":"Caller-assigned primary Gleason pattern 1-5"},{"name":"gleason_secondary","type":"integer","description":"Caller-assigned secondary Gleason pattern 1-5"},{"name":"t_stage","type":"string","description":"Caller-assigned clinical T used (t1, t2, or t3a)"},{"name":"percent_positive_biopsies","type":"number","description":"Caller-assigned percent of biopsy cores positive (0-100)"},{"name":"components","type":"array","description":"Per-factor Cooperberg 2005 Table 1 points"},{"name":"citation","type":"object","description":"Cooperberg 2005 J Urol citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"62","gleason_primary":"3","gleason_secondary":"3","percent_positive_biopsies":"20","psa_ng_ml":"5.0","t_stage":"t1"},{"age":"62","gleason_primary":"3","gleason_secondary":"3","percent_positive_biopsies":"20","psa_ng_ml":"5.0","t_stage":"t1"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/capra","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/capra?age=62&psa_ng_ml=5.0&gleason_primary=3&gleason_secondary=3&t_stage=t1&percent_positive_biopsies=20","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/capra","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/damico","description":"D'Amico 1998 JAMA clinically localized prostate-cancer groups from caller-assigned T (t1c, t2a, t2b, t2c), Gleason 2-10, and PSA ng/mL (0.1-200). Returns low, intermediate, or high. High if T2c or PSA > 20 or Gleason ≥ 8; else intermediate if T2b or Gleason 7 or PSA > 10 and ≤ 20; else low if T1c/T2a and PSA ≤ 10 and Gleason ≤ 6. Not CAPRA. Not NCCN. magent does not assay PSA or assign Gleason. Not a diagnosis. Not a medical device.","parameters":[{"in":"query","name":"t_stage","type":"string","enum":["t1c","t2a","t2b","t2c"],"description":"Clinical T as assigned by the caller (D'Amico 1998 clinically localized groups). t1c, t2a, t2b, or t2c. T1a, T1b, and T3+ are out of scope. magent does not assign TNM or read staging studies.","required":true,"example":"t1c"},{"in":"query","name":"gleason_score","type":"integer","description":"Gleason sum 2-10 as assigned by the caller (D'Amico 1998). Integer 2-10 only; reject 1, 11, and 6.5. Not Grade Group / ISUP 2014. magent does not assign Gleason or read slides.","required":true,"example":"6"},{"in":"query","name":"psa_ng_ml","type":"number","description":"Serum PSA in ng/mL as assayed by the caller (0.1-200). D'Amico 1998 uses ≤10, >10 and ≤20, and >20. magent does not assay PSA.","required":true,"example":"5"}],"errors":[{"code":"invalid_damico","message":"t_stage must be t1c, t2a, t2b, or t2c; gleason_score an integer 2–10; psa_ng_ml a number from 0.1 to 200 (D'Amico 1998 clinically localized groups). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/damico","citation":{"authors":"D'Amico AV, Whittington R, Malkowicz SB, Schultz D, Blank K, Broderick GA, Tomaszewski JE, Renshaw AA, Kaplan I, Beard CJ, Wein A","doi":"10.1001/jama.280.11.969","id":"damico-1998","pmid":"9749478","source":"JAMA. 1998;280(11):969-974","title":"Biochemical outcome after radical prostatectomy, external beam radiation therapy, or interstitial radiation therapy for clinically localized prostate cancer","url":"https://doi.org/10.1001/jama.280.11.969"},"formula_expression":"D'Amico 1998 JAMA clinically localized groups: high if t_stage t2c OR psa_ng_ml > 20 OR gleason_score ≥ 8; else intermediate if t_stage t2b OR gleason_score == 7 OR (psa_ng_ml > 10 AND psa_ng_ml ≤ 20); else low if t_stage in {t1c, t2a} AND psa_ng_ml ≤ 10 AND gleason_score ≤ 6. Not CAPRA. Not NCCN. magent does not assay PSA or assign Gleason.","purpose":"Apply the D'Amico 1998 JAMA clinically localized three-group rule to caller-assigned clinical T (t1c, t2a, t2b, t2c), Gleason sum 2-10, and PSA ng/mL, and return risk low, intermediate, or high. Does not assay PSA, assign Gleason, or compute CAPRA or NCCN groups.","markdown_url":"https://magentlab.com/docs/damico.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"damico"},{"name":"formula_expression","type":"string","description":"Published D'Amico 1998 JAMA clinically localized three-group rule"},{"name":"t_stage","type":"string","description":"Caller-assigned clinical T used (t1c, t2a, t2b, or t2c)"},{"name":"gleason_score","type":"integer","description":"Caller-assigned Gleason sum 2-10"},{"name":"psa_ng_ml","type":"number","description":"Caller-assigned serum PSA in ng/mL"},{"name":"risk","type":"string","description":"low, intermediate, or high (D'Amico 1998). High beats intermediate beats low. Not CAPRA. Not NCCN. Not a Grade Group."},{"name":"components","type":"array","description":"Tree rows for t_stage, gleason_score, psa_ng_ml, and exclusive low, intermediate, high with factor and met"},{"name":"citation","type":"object","description":"D'Amico 1998 JAMA citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"gleason_score":"6","psa_ng_ml":"5","t_stage":"t1c"},{"gleason_score":"6","psa_ng_ml":"5","t_stage":"t1c"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/damico","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/damico?t_stage=t1c&psa_ng_ml=5&gleason_score=6","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/damico","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/prevail","description":"Armstrong 2018 PREVAIL Cox linear predictor for overall survival in chemotherapy-naïve metastatic castration-resistant prostate cancer from albumin, ALP versus ULN, bone metastases under 10, hemoglobin, LDH versus ULN, NLR under 2.5, pain 0-1, liver metastases, ln(PSA), months from diagnosis, and enzalutamide versus placebo. Table 1 HRs as ln(HR). Not a 1-/2-/3-year OS percent (no published S0). magent does not read bone scans. Not a dose or treatment order.","parameters":[{"in":"query","name":"albumin_g_dl","type":"number","description":"Serum albumin in g/dL (1.0-6.5). Armstrong 2018 Table 1: continuous, HR 0.71 per g/dL. magent does not assay albumin.","required":true,"example":4.0},{"in":"query","name":"alp_below_uln","type":"boolean","description":"Alkaline phosphatase below the institutional ULN as assigned by the caller (true or false). Table 1: true (<ULN versus ≥ULN) has HR 0.79. magent does not assay ALP or apply ULN.","required":true,"example":true},{"in":"query","name":"bone_mets_lt_10","type":"boolean","description":"Fewer than 10 bone metastases as assigned by the caller (true or false). Table 1: true (<10 versus ≥10) has HR 0.68. magent does not read bone scans.","required":true,"example":true},{"in":"query","name":"hemoglobin_g_dl","type":"number","description":"Hemoglobin in g/dL (3.0-22.0). Table 1: continuous, HR 0.85 per g/dL. magent does not assay hemoglobin.","required":true,"example":13.0},{"in":"query","name":"ldh_below_uln","type":"boolean","description":"Lactate dehydrogenase below the institutional ULN as assigned by the caller (true or false). Table 1: true (<ULN versus ≥1×ULN) has HR 0.67. magent does not assay LDH or apply ULN.","required":true,"example":true},{"in":"query","name":"nlr_lt_2_5","type":"boolean","description":"Neutrophil-to-lymphocyte ratio <2.5 as assigned by the caller (true or false). Table 1: true (<2.5 versus ≥2.5) has HR 0.69. magent does not compute NLR from counts.","required":true,"example":true},{"in":"query","name":"pain_0_to_1","type":"boolean","description":"Pain score 0-1 versus ≥2 on the paper's linear scale, as assigned by the caller (true or false). Table 1: true (0-1 versus ≥2) has HR 0.77. magent does not assign pain scores.","required":true,"example":true},{"in":"query","name":"no_liver_metastases","type":"boolean","description":"No liver metastases as assigned by the caller (true or false). Table 1 pattern of spread: true (no liver metastases versus any liver metastases) has HR 0.49. magent does not read imaging.","required":true,"example":true},{"in":"query","name":"psa_ng_ml","type":"number","description":"Baseline PSA in ng/mL (0.1-10000). Table 1: continuous log_e PSA, HR 1.23 per ln(ng/mL). magent does not assay PSA.","required":true,"example":20.0},{"in":"query","name":"months_since_diagnosis","type":"number","description":"Time from diagnosis to randomization in months (0-720). Table 1: continuous, HR 0.997 per month. magent does not date the interval.","required":true,"example":60},{"in":"query","name":"treatment_enzalutamide","type":"boolean","description":"true if the PREVAIL treatment term is enzalutamide, false if placebo. Table 1: true (enzalutamide versus placebo) has HR 0.68. Not a dose or treatment order.","required":true,"example":true}],"errors":[{"code":"invalid_prevail","message":"PREVAIL survival-model inputs must match Armstrong 2018 albumin, ALP vs ULN, hemoglobin, LDH vs ULN, NLR, bone metastases, pain, liver metastases, PSA, time from diagnosis, and enzalutamide vs placebo. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/prevail","citation":{"authors":"Armstrong AJ, Lin P, Higano CS, et al.","doi":"10.1093/annonc/mdy406","id":"armstrong-2018-prevail","pmid":"30202945","source":"Ann Oncol. 2018;29(11):2200-2209","title":"Development and validation of a prognostic model for overall survival in chemotherapy-naïve men with metastatic castration-resistant prostate cancer","url":"https://doi.org/10.1093/annonc/mdy406"},"formula_expression":"lp = ln(0.71)*albumin_g_dl + ln(0.79)*alp_below_uln + ln(0.68)*bone_mets_lt_10 + ln(0.85)*hemoglobin_g_dl + ln(0.67)*ldh_below_uln + ln(0.69)*nlr_lt_2_5 + ln(0.77)*pain_0_to_1 + ln(0.49)*no_liver_metastases + ln(1.23)*ln(psa_ng_ml) + ln(0.997)*months_since_diagnosis + ln(0.68)*treatment_enzalutamide; Armstrong 2018 Table 1 multivariable HRs, β = ln(HR); A versus B codes A as 1; booleans contribute β when true else 0; no printed S0; not 1-/2-/3-year OS percents; not nomogram points; training-set tertiles unpublished as numeric cutoffs; chemotherapy-naïve mCRPC PREVAIL; magent does not read bone scans","purpose":"Compute the Armstrong 2018 PREVAIL multivariable Cox linear predictor for overall survival in chemotherapy-naïve men with metastatic castration-resistant prostate cancer from albumin, ALP versus ULN, bone-metastasis count, hemoglobin, LDH versus ULN, NLR, pain score, liver metastases, PSA, time from diagnosis, and enzalutamide versus placebo.","markdown_url":"https://magentlab.com/docs/prevail.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"prevail"},{"name":"formula_expression","type":"string","description":"Armstrong 2018 Table 1 Cox linear predictor from ln(HR)"},{"name":"albumin_g_dl","type":"number","description":"Input albumin g/dL"},{"name":"alp_below_uln","type":"boolean","description":"Caller-assigned ALP below ULN"},{"name":"bone_mets_lt_10","type":"boolean","description":"Caller-assigned bone metastases <10"},{"name":"hemoglobin_g_dl","type":"number","description":"Input hemoglobin g/dL"},{"name":"ldh_below_uln","type":"boolean","description":"Caller-assigned LDH below ULN"},{"name":"nlr_lt_2_5","type":"boolean","description":"Caller-assigned NLR <2.5"},{"name":"pain_0_to_1","type":"boolean","description":"Caller-assigned pain score 0-1"},{"name":"no_liver_metastases","type":"boolean","description":"Caller-assigned no liver metastases"},{"name":"psa_ng_ml","type":"number","description":"Input PSA ng/mL"},{"name":"months_since_diagnosis","type":"number","description":"Input months from diagnosis to randomization"},{"name":"treatment_enzalutamide","type":"boolean","description":"Caller-assigned enzalutamide versus placebo"},{"name":"linear_predictor","type":"number","description":"Unrounded Armstrong 2018 Table 1 Cox linear predictor, 6 decimals. Not a survival percent."},{"name":"risk_score","type":"number","description":"Same value as linear_predictor (unscaled Cox LP). Not a tertile band; those cut-points were not printed."},{"name":"citation","type":"object","description":"Armstrong 2018 PREVAIL citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"albumin_g_dl":"4.0","alp_below_uln":"true","bone_mets_lt_10":"true","hemoglobin_g_dl":"13.0","ldh_below_uln":"true","months_since_diagnosis":"60","nlr_lt_2_5":"true","no_liver_metastases":"true","pain_0_to_1":"true","psa_ng_ml":"20.0","treatment_enzalutamide":"true"},{"albumin_g_dl":"4.0","alp_below_uln":"true","bone_mets_lt_10":"true","hemoglobin_g_dl":"13.0","ldh_below_uln":"true","months_since_diagnosis":"60","nlr_lt_2_5":"true","no_liver_metastases":"true","pain_0_to_1":"true","psa_ng_ml":"20.0","treatment_enzalutamide":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/prevail","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/prevail?albumin_g_dl=4.0&alp_below_uln=true&bone_mets_lt_10=true&hemoglobin_g_dl=13.0&ldh_below_uln=true&nlr_lt_2_5=true&pain_0_to_1=true&no_liver_metastases=true&psa_ng_ml=20.0&months_since_diagnosis=60&treatment_enzalutamide=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/prevail","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/psad","description":"Benson 1992 PSA density: psa_ng_ml / prostate volume (ml). Volume is length_cm × width_cm × depth_cm × 0.5 (D1×D2×D3×1/2), not π/6. Provide PSA with prostate_volume_ml (1-500) or three dimensions (1-20 cm each), not both. Reports dimensionless psad to 3 decimals and retrospective bands <=0.05, 0.05-0.10, >=0.10. magent does not measure the gland or diagnose cancer. Not a medical device.","parameters":[{"in":"query","name":"psa_ng_ml","type":"number","description":"Serum prostate-specific antigen in ng/ml (0.01-10000, magent clamp). magent does not assay PSA.","required":true,"example":"4"},{"in":"query","name":"prostate_volume_ml","type":"number","description":"Caller-supplied prostate volume in ml (1-500). Provide this or length_cm, width_cm, and depth_cm, not both. magent does not measure the gland.","required":false,"example":"40"},{"in":"query","name":"length_cm","type":"number","description":"Prostate length (D1) in cm (1-20). Required with width_cm and depth_cm when prostate_volume_ml is omitted. Benson volume = L×W×D×0.5.","required":false,"example":"4"},{"in":"query","name":"width_cm","type":"number","description":"Prostate width (D2) in cm (1-20). Required with length_cm and depth_cm when prostate_volume_ml is omitted.","required":false,"example":"4"},{"in":"query","name":"depth_cm","type":"number","description":"Prostate depth (D3) in cm (1-20). Required with length_cm and width_cm when prostate_volume_ml is omitted.","required":false,"example":"4"}],"errors":[{"code":"invalid_psad","message":"PSA density needs PSA (ng/ml) and either prostate_volume_ml or three dimensions as used in Benson 1992 (volume = L×W×D×0.5). Returned before settlement; you are not charged.","status":400},{"code":"invalid_psa","message":"psa_ng_ml must be a number from 0.01 to 10000. Returned before settlement; you are not charged.","status":400},{"code":"invalid_prostate_dimension","message":"Prostate length, width, and depth in cm must each be a number from 1 to 20, or provide prostate_volume_ml (1-500). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/psad","citation":{"authors":"Benson MC, Whang IS, Pantuck A, Ring K, Kaplan SA, Olsson CA, Cooner WH","doi":"10.1016/s0022-5347(17)37393-7","id":"benson-1992-psad","pmid":"1371554","source":"J Urol. 1992;147(3 Pt 2):815-816","title":"Prostate specific antigen density: a means of distinguishing benign prostatic hypertrophy and prostate cancer","url":"https://doi.org/10.1016/s0022-5347(17)37393-7"},"formula_expression":"volume_ml = length_cm × width_cm × depth_cm × 0.5 (Benson: D1×D2×D3×1/2, not π/6); psad = psa_ng_ml / volume_ml","purpose":"Compute Benson 1992 prostate-specific antigen density as serum PSA (ng/ml) divided by prostate volume (ml). Volume is length × width × depth × 0.5, or a caller-supplied volume.","markdown_url":"https://magentlab.com/docs/psad.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"psad"},{"name":"formula_expression","type":"string","description":"Exact Benson 1992 expressions used"},{"name":"psa_ng_ml","type":"number","description":"Serum PSA used, ng/ml"},{"name":"prostate_volume_ml","type":"number","description":"Prostate volume used, ml (caller-supplied or length × width × depth × 0.5), 3 decimals when computed"},{"name":"length_cm","type":"number","description":"Length D1 used, cm. Omitted on the prostate_volume_ml path."},{"name":"width_cm","type":"number","description":"Width D2 used, cm. Omitted on the prostate_volume_ml path."},{"name":"depth_cm","type":"number","description":"Depth D3 used, cm. Omitted on the prostate_volume_ml path."},{"name":"psad","type":"number","description":"PSA density (ng/ml per ml), dimensionless, 3 decimals"},{"name":"benson_band","type":"string","description":"Benson 1992 retrospective category: <=0.05, 0.05-0.10 (open interval), or >=0.10"},{"name":"citation","type":"object","description":"Benson 1992 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"depth_cm":"4","length_cm":"4","psa_ng_ml":"4","width_cm":"4"},{"depth_cm":"4","length_cm":"4","psa_ng_ml":"4","width_cm":"4"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/psad","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/psad?psa_ng_ml=4&length_cm=4&width_cm=4&depth_cm=4","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/psad","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/psadt","description":"Pound 1999 PSA doubling time from two rising PSA values: psadt_months = ln(2) x interval_months / ln(psa2_ng_ml / psa1_ng_ml), 1 decimal. PSA each 0.2-10000 ng/mL; psa2 must exceed psa1; interval_months 0.25-120. Reports the Pound split <=10 vs >10 months (exactly 10.0 is <=10). Two-point first-order kinetics only. magent does not measure PSA. Not a medical device.","parameters":[{"in":"query","name":"psa1_ng_ml","type":"number","description":"Earlier serum PSA in ng/mL (0.2-10000). Pound biochemical recurrence used detectable PSA ≥0.2 ng/mL. magent does not measure PSA.","required":true,"example":"0.4"},{"in":"query","name":"psa2_ng_ml","type":"number","description":"Later serum PSA in ng/mL (0.2-10000). Must be greater than psa1_ng_ml (rising). magent does not measure PSA.","required":true,"example":"0.8"},{"in":"query","name":"interval_months","type":"number","description":"Months between the two PSA values (0.25-120, magent clamp). Pound 1999 does not publish an input band for this two-point tool.","required":true,"example":"10"}],"errors":[{"code":"invalid_psadt","message":"PSADT needs two rising PSA values (each 0.2-10000 ng/mL) and interval_months (0.25-120). Returned before settlement; you are not charged.","status":400},{"code":"invalid_psa_interval","message":"interval_months must be a number from 0.25 to 120. Returned before settlement; you are not charged.","status":400},{"code":"invalid_rising_psa","message":"psa2_ng_ml must be greater than psa1_ng_ml (rising PSA; Pound 1999). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/psadt","citation":{"authors":"Pound CR, Partin AW, Eisenberger MA, Chan DW, Pearson JD, Walsh PC","doi":"10.1001/jama.281.17.1591","id":"pound-1999","pmid":"10235151","source":"JAMA. 1999;281(17):1591-1597","title":"Natural history of progression after PSA elevation following radical prostatectomy","url":"https://doi.org/10.1001/jama.281.17.1591"},"formula_expression":"psadt_months = ln(2) × interval_months / ln(psa2_ng_ml / psa1_ng_ml)","purpose":"Compute Pound 1999 PSA doubling time from two rising PSA values and the months between them using two-point first-order kinetics, and report the 10-month prognostic split.","markdown_url":"https://magentlab.com/docs/psadt.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"psadt"},{"name":"formula_expression","type":"string","description":"Exact two-point first-order expression used"},{"name":"psa1_ng_ml","type":"number","description":"Earlier PSA used, ng/mL"},{"name":"psa2_ng_ml","type":"number","description":"Later PSA used, ng/mL"},{"name":"interval_months","type":"number","description":"Months between the two PSA values"},{"name":"psadt_months","type":"number","description":"PSA doubling time in months, 1 decimal"},{"name":"pound_psadt_band","type":"string","description":"Pound 1999 split: <=10 or >10 months. Exactly 10.0 is <=10."},{"name":"citation","type":"object","description":"Pound 1999 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"interval_months":"10","psa1_ng_ml":"0.4","psa2_ng_ml":"0.8"},{"interval_months":"10","psa1_ng_ml":"0.4","psa2_ng_ml":"0.8"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/psadt","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/psadt?psa1_ng_ml=0.4&psa2_ng_ml=0.8&interval_months=10","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/psadt","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/schwartz-gfr","description":"Schwartz 2009 bedside eGFR for children with CKD (CKiD): 0.413 × height in cm divided by serum creatinine in mg/dL, rounded to one decimal as mL/min/1.73m2. Height may be centimeters or inches; creatinine may be mg/dL or µmol/L. Not a dosing recommendation, not CKD-EPI, not Cockcroft–Gault, and not the 1976 Schwartz k=0.55 formula. Does not assign CKD stages.","parameters":[{"in":"query","name":"height_cm","type":"number","description":"Height in centimeters (50-250). Provide height_cm or height_in.","required":false,"example":"140"},{"in":"query","name":"height_in","type":"number","description":"Height in inches (20-98). Converted as cm = in * 2.54.","required":false,"example":"60"},{"in":"query","name":"creatinine_mg_dl","type":"number","description":"Serum creatinine in mg/dL (0.1-20). Provide this or creatinine_umol_l.","required":false,"example":"1.0"},{"in":"query","name":"creatinine_umol_l","type":"number","description":"Serum creatinine in µmol/L (9-1768). Converted as mg/dL = µmol/L / 88.42.","required":false,"example":"88.42"}],"errors":[{"code":"invalid_height","message":"height_cm (50-250) or height_in (20-98) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_creatinine","message":"creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/schwartz-gfr","citation":{"authors":"Schwartz GJ, Muñoz A, Schneider MF, et al.","doi":"10.1681/ASN.2008030287","id":"schwartz-2009","source":"J Am Soc Nephrol. 2009;20(3):629-637","title":"New equations to estimate GFR in children with CKD","url":"https://doi.org/10.1681/ASN.2008030287"},"formula_expression":"egfr_ml_min_1_73m2 = 0.413 * height_cm / creatinine_mg_dl","purpose":"Compute the 2009 Schwartz bedside CKiD eGFR in mL/min/1.73m2 from height and serum creatinine.","markdown_url":"https://magentlab.com/docs/schwartz-gfr.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"schwartz_2009"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"height_cm","type":"number","description":"Normalized height in cm"},{"name":"creatinine_mg_dl","type":"number","description":"Normalized creatinine in mg/dL"},{"name":"egfr_ml_min_1_73m2","type":"number","description":"Bedside CKiD eGFR, 1 decimal place"},{"name":"units","type":"string","description":"mL/min/1.73m2"},{"name":"citation","type":"object","description":"Schwartz 2009 JASN citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"creatinine_mg_dl":"1.0","height_cm":"140"},{"creatinine_mg_dl":"1.0","height_cm":"140"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/schwartz-gfr","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/schwartz-gfr?height_cm=140&creatinine_mg_dl=1.0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/schwartz-gfr","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/ckid-u25","description":"CKiD U25 eGFR (Pierce 2021) for ages 1-25: age- and sex-dependent K times height in meters over creatinine (mg/dL), or K over cystatin C (mg/L), or the average of both when both markers are given. Height may be cm or inches; creatinine may be mg/dL or µmol/L. Not the Schwartz 2009 bedside 0.413 formula, not a drug dose, and not a CKD stage. Not a medical device.","parameters":[{"in":"query","name":"age_years","type":"number","description":"Age in years (1-25, fractional ages allowed). Pierce 2021 CKiD U25 age-dependent K is evaluated at that age. Not the adult 18-120 clamp.","required":true,"example":"10"},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"Sex used by Pierce 2021 Table 2 K. female or male.","required":true,"example":"male"},{"in":"query","name":"height_cm","type":"number","description":"Height in centimeters (50-250). Required with creatinine for the creatinine or combined path. Converted to meters in the equation. Provide height_cm or height_in. Not required for cystatin-only.","required":false,"example":"140"},{"in":"query","name":"height_in","type":"number","description":"Height in inches (20-98). Converted as cm = in * 2.54.","required":false,"example":"55.1181"},{"in":"query","name":"creatinine_mg_dl","type":"number","description":"Serum creatinine in mg/dL (0.1-20). Required with height for the creatinine or combined path. Provide this or creatinine_umol_l.","required":false,"example":"1.0"},{"in":"query","name":"creatinine_umol_l","type":"number","description":"Serum creatinine in µmol/L (9-1768). Converted as mg/dL = µmol/L / 88.42.","required":false,"example":"88.42"},{"in":"query","name":"cystatin_c_mg_l","type":"number","description":"Serum cystatin C in mg/L (0.2-10). Required for the cystatin-only or combined path. Height is not required when this is the only marker.","required":false,"example":"1.0"}],"errors":[{"code":"invalid_ckid_u25","message":"CKiD U25 needs age 1-25, sex, and either height plus creatinine, cystatin C, or both, as used in Pierce 2021. Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_height","message":"height_cm (50-250) or height_in (20-98) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_creatinine","message":"creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_cystatin_c","message":"cystatin_c_mg_l must be a number from 0.2 to 10. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/ckid-u25","citation":{"authors":"Pierce CB, Muñoz A, Ng DK, Warady BA, Furth SL, Schwartz GJ","doi":"10.1016/j.kint.2020.10.047","id":"pierce-2021-ckid-u25","pmid":"33301749","source":"Kidney Int. 2021;99(4):948-956","title":"Age- and sex-dependent clinical equations to estimate glomerular filtration rates in children and young adults with chronic kidney disease","url":"https://doi.org/10.1016/j.kint.2020.10.047"},"formula_expression":"egfr_cr = K_cr * (height_m / creatinine_mg_dl); egfr_cys = K_cys * (1 / cystatin_c_mg_l); combined = (egfr_cr + egfr_cys) / 2 when both markers; K_cr and K_cys are Pierce 2021 Table 2 age-dependent (not constant-K models); height in meters; ages 1-25","purpose":"Compute Pierce 2021 CKiD U25 eGFR in mL/min/1.73m2 from age-dependent K with height and creatinine, cystatin C, or both.","markdown_url":"https://magentlab.com/docs/ckid-u25.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"ckid_u25_cr, ckid_u25_cys, or ckid_u25_cr_cys"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"age_years","type":"number","description":"Age in years used for K"},{"name":"sex","type":"string","description":"female or male"},{"name":"height_cm","type":"number","description":"Normalized height in cm. Omitted on the cystatin-only path."},{"name":"creatinine_mg_dl","type":"number","description":"Normalized creatinine in mg/dL. Omitted on the cystatin-only path."},{"name":"cystatin_c_mg_l","type":"number","description":"Cystatin C in mg/L. Omitted on the creatinine-only path."},{"name":"k_cr","type":"number","description":"Pierce 2021 Table 2 age-dependent K_cr, 4 decimals. Omitted when unused."},{"name":"k_cys","type":"number","description":"Pierce 2021 Table 2 age-dependent K_cys, 4 decimals. Omitted when unused."},{"name":"egfr_ml_min_1_73m2","type":"number","description":"CKiD U25 eGFR, 1 decimal place"},{"name":"units","type":"string","description":"mL/min/1.73m2"},{"name":"citation","type":"object","description":"Pierce 2021 Kidney International citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age_years":"10","creatinine_mg_dl":"1.0","height_cm":"140","sex":"male"},{"age_years":"10","creatinine_mg_dl":"1.0","height_cm":"140","sex":"male"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/ckid-u25","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/ckid-u25?age_years=10&sex=male&height_cm=140&creatinine_mg_dl=1.0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/ckid-u25","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/kt-v","description":"Daugirdas 1993 second-generation single-pool variable-volume Kt/V. Kt/V = -ln(R - 0.008 * t) + (4 - 3.5 * R) * UF / W, with R = post_bun_mg_dl / pre_bun_mg_dl. Numeric Kt/V to 2 decimals. Not a dialysis prescription, not equilibrated eKt/V, not stdKt/V, and not a urea-reduction-ratio tool. magent does not assign KDOQI or other adequacy targets.","parameters":[{"in":"query","name":"pre_bun_mg_dl","type":"number","description":"Predialysis blood urea nitrogen in mg/dL (1-200). Required with post_bun_mg_dl.","required":true,"example":"80"},{"in":"query","name":"post_bun_mg_dl","type":"number","description":"Postdialysis blood urea nitrogen in mg/dL (1-200). Required with pre_bun_mg_dl.","required":true,"example":"24"},{"in":"query","name":"session_hours","type":"number","description":"Hemodialysis session length in hours (1.0-8.0). Daugirdas 1993 t.","required":true,"example":"4"},{"in":"query","name":"uf_l","type":"number","description":"Ultrafiltration volume in litres (0-15). Daugirdas 1993 UF.","required":true,"example":"2"},{"in":"query","name":"weight_kg","type":"number","description":"Post-dialysis body weight in kilograms (1-500). Provide weight_kg or weight_lb, not both.","required":false,"example":"70"},{"in":"query","name":"weight_lb","type":"number","description":"Post-dialysis body weight in pounds (2-1100). Converted as kg = lb × 0.45359237. Provide weight_kg or weight_lb, not both.","required":false,"example":"154.32"}],"errors":[{"code":"invalid_bun","message":"bun_mg_dl must be a number from 1 to 200. Returned before settlement; you are not charged.","status":400},{"code":"invalid_dialysis_hours","message":"session_hours must be a number from 1.0 to 8.0 (Daugirdas 1993). Returned before settlement; you are not charged.","status":400},{"code":"invalid_ultrafiltration","message":"uf_l must be a number from 0 to 15 (Daugirdas 1993 ultrafiltration volume in litres). Returned before settlement; you are not charged.","status":400},{"code":"invalid_weight","message":"weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_urea_ratio","message":"post_bun_mg_dl must be < pre_bun_mg_dl and R - 0.008 * t must be > 0 (Daugirdas 1993). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/kt-v","citation":{"authors":"Daugirdas JT","doi":"10.1681/ASN.V451205","id":"daugirdas-1993","pmid":"8305648","source":"J Am Soc Nephrol. 1993;4(5):1205-1213","title":"Second generation logarithmic estimates of single-pool variable volume Kt/V: an analysis of error","url":"https://doi.org/10.1681/ASN.V451205"},"formula_expression":"Kt/V = -ln(R - 0.008 * t) + (4 - 3.5 * R) * UF / W","purpose":"Compute the Daugirdas 1993 second-generation logarithmic single-pool variable-volume Kt/V from pre- and post-dialysis BUN, session length, ultrafiltration volume, and post-dialysis weight.","markdown_url":"https://magentlab.com/docs/kt-v.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"daugirdas_1993"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"pre_bun_mg_dl","type":"number","description":"Predialysis BUN used in mg/dL"},{"name":"post_bun_mg_dl","type":"number","description":"Postdialysis BUN used in mg/dL"},{"name":"session_hours","type":"number","description":"Session length used in hours"},{"name":"uf_l","type":"number","description":"Ultrafiltration volume used in litres"},{"name":"weight_kg","type":"number","description":"Post-dialysis body weight used in kg (after conversion)"},{"name":"kt_v","type":"number","description":"Daugirdas 1993 single-pool variable-volume Kt/V, 2 decimals"},{"name":"citation","type":"object","description":"Daugirdas 1993 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"post_bun_mg_dl":"24","pre_bun_mg_dl":"80","session_hours":"4","uf_l":"2","weight_kg":"70"},{"post_bun_mg_dl":"24","pre_bun_mg_dl":"80","session_hours":"4","uf_l":"2","weight_kg":"70"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/kt-v","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/kt-v?pre_bun_mg_dl=80&post_bun_mg_dl=24&session_hours=4&uf_l=2&weight_kg=70","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/kt-v","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/ttkg","description":"Transtubular potassium gradient (TTKG) from plasma potassium, urine potassium, plasma osmolality, and urine osmolality (Ethier JH et al., Am J Kidney Dis 1990). TTKG = (urine_k / potassium) / (urine_osm / plasma_osm), 1 decimal. Not valid when urine osmolality is not greater than plasma osmolality (water diuresis). Numeric TTKG only; not a potassium-disorder diagnosis or medical device.","parameters":[{"in":"query","name":"potassium_mmol_l","type":"number","description":"Plasma potassium in mmol/L (1.5-8.0).","required":true,"example":"4.0"},{"in":"query","name":"urine_k_mmol_l","type":"number","description":"Urine potassium in mmol/L (1-200).","required":true,"example":"40"},{"in":"query","name":"plasma_osm_mosm_kg","type":"number","description":"Plasma osmolality in mOsm/kg (240-400).","required":true,"example":"300"},{"in":"query","name":"urine_osm_mosm_kg","type":"number","description":"Urine osmolality in mOsm/kg (50-1400). Must be greater than plasma_osm_mosm_kg.","required":true,"example":"600"}],"errors":[{"code":"invalid_potassium","message":"potassium_mmol_l must be a number from 1.5 to 8.0. Returned before settlement; you are not charged.","status":400},{"code":"invalid_urine_k","message":"urine_k_mmol_l must be a number from 1 to 200 (Ethier 1990 TTKG). Returned before settlement; you are not charged.","status":400},{"code":"invalid_osmolality","message":"plasma_osm_mosm_kg must be a number from 240 to 400 (Ethier 1990 TTKG). Returned before settlement; you are not charged.","status":400},{"code":"invalid_urine_osmolality","message":"urine_osm_mosm_kg must be a number from 50 to 1400 (Ethier 1990 TTKG). Returned before settlement; you are not charged.","status":400},{"code":"invalid_ttkg_osmoles","message":"urine_osm_mosm_kg must be greater than plasma_osm_mosm_kg (Ethier 1990; TTKG is not valid during water diuresis). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/ttkg","citation":{"authors":"Ethier JH, Kamel KS, Magner PO, Lemann J Jr, Halperin ML","doi":"10.1016/S0272-6386(12)80076-X","id":"ethier-1990","pmid":"2321642","source":"Am J Kidney Dis. 1990;15(4):309-315","title":"The transtubular potassium concentration in patients with hypokalemia and hyperkalemia","url":"https://doi.org/10.1016/S0272-6386(12)80076-X"},"formula_expression":"ttkg = (urine_k_mmol_l / potassium_mmol_l) / (urine_osm_mosm_kg / plasma_osm_mosm_kg)","purpose":"Compute the transtubular potassium gradient (TTKG) from plasma potassium, urine potassium, plasma osmolality, and urine osmolality using Ethier et al. 1990.","markdown_url":"https://magentlab.com/docs/ttkg.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"ethier"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"potassium_mmol_l","type":"number","description":"Plasma potassium used in mmol/L"},{"name":"urine_k_mmol_l","type":"number","description":"Urine potassium used in mmol/L"},{"name":"plasma_osm_mosm_kg","type":"number","description":"Plasma osmolality used in mOsm/kg"},{"name":"urine_osm_mosm_kg","type":"number","description":"Urine osmolality used in mOsm/kg"},{"name":"ttkg","type":"number","description":"Transtubular potassium gradient, 1 decimal. Numeric value only."},{"name":"citation","type":"object","description":"Ethier 1990 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"plasma_osm_mosm_kg":"300","potassium_mmol_l":"4.0","urine_k_mmol_l":"40","urine_osm_mosm_kg":"600"},{"plasma_osm_mosm_kg":"300","potassium_mmol_l":"4.0","urine_k_mmol_l":"40","urine_osm_mosm_kg":"600"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/ttkg","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/ttkg?potassium_mmol_l=4.0&urine_k_mmol_l=40&plasma_osm_mosm_kg=300&urine_osm_mosm_kg=600","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/ttkg","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/mcmahon","description":"McMahon 2013 Table 3 rhabdomyolysis score: age ≤50→0, >50–≤70→1.5, >70–≤80→2.5, >80→3; female 1; Cr <1.4→0, 1.4–2.2→1.5, >2.2→3; Ca <7.5→2; CPK >40000→2; origin not seizure/syncope/exercise/statin/myositis→3; PO4 <4.0→0, 4.0–5.4→1.5, >5.4→3; HCO3 <19→2. Max 19. Caller-supplied labs and origin. Numeric total only; not a dialysis order.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (integer 18-120). McMahon 2013 Table 3: ≤50 → 0, >50 to ≤70 → 1.5, >70 to ≤80 → 2.5, >80 → 3. magent does not assign age.","required":true,"example":"40"},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"Caller-assigned sex. Female scores 1 (McMahon 2013 Table 3). magent does not assign sex.","required":true,"example":"male"},{"in":"query","name":"creatinine_mg_dl","type":"number","description":"Initial serum creatinine in mg/dL (0.1-20). Provide this or creatinine_umol_l. McMahon 2013 Table 3: <1.4 → 0, 1.4 to 2.2 inclusive → 1.5, >2.2 → 3. magent does not assay creatinine.","required":false,"example":"1.0"},{"in":"query","name":"creatinine_umol_l","type":"number","description":"Initial serum creatinine in µmol/L (9-1768). Converted as mg/dL = µmol/L / 88.42. magent does not assay creatinine.","required":false,"example":"88.4"},{"in":"query","name":"calcium_mg_dl","type":"number","description":"Initial calcium in mg/dL (4-16). McMahon 2013 Table 3: <7.5 → 2. 7.5 is not <7.5. magent does not assay calcium.","required":true,"example":"9.0"},{"in":"query","name":"cpk_u_l","type":"number","description":"Initial CPK in U/L (1-500000). McMahon 2013 Table 3: >40000 → 2. 40000 is not >40000. magent does not assay CPK.","required":true,"example":"2000"},{"in":"query","name":"low_risk_origin","type":"boolean","description":"true when the cause is seizure, syncope, exercise, statin, or myositis (0 points). false otherwise (3 points; McMahon 2013 Table 3 origin not those causes). magent does not assign etiology.","required":true,"example":"true"},{"in":"query","name":"phosphate_mg_dl","type":"number","description":"Initial phosphate in mg/dL (0.5-20). McMahon 2013 Table 3: <4.0 → 0, 4.0 to 5.4 inclusive → 1.5, >5.4 → 3. magent does not assay phosphate.","required":true,"example":"3.5"},{"in":"query","name":"bicarbonate_mmol_l","type":"number","description":"Initial bicarbonate in mEq/L or mmol/L (2-45). McMahon 2013 Table 3: <19 → 2. 19 is not <19. magent does not assay bicarbonate.","required":true,"example":"24"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_creatinine","message":"creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_mcmahon_calcium","message":"calcium_mg_dl must be a number from 4 to 16. Returned before settlement; you are not charged.","status":400},{"code":"invalid_cpk","message":"cpk_u_l must be a number from 1 to 500000 (McMahon 2013). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_phosphate","message":"phosphate_mg_dl must be a number from 0.5 to 20 (McMahon 2013). Returned before settlement; you are not charged.","status":400},{"code":"invalid_bicarbonate","message":"bicarbonate_mmol_l must be a number from 2 to 45. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/mcmahon","citation":{"authors":"McMahon GM, Zeng X, Waikar SS","doi":"10.1001/jamainternmed.2013.9774","id":"mcmahon-2013","pmid":"24000014","source":"JAMA Intern Med. 2013;173(19):1821-1828","title":"A risk prediction score for kidney failure or mortality in rhabdomyolysis","url":"https://doi.org/10.1001/jamainternmed.2013.9774"},"formula_expression":"McMahon = age(≤50→0, >50–≤70→1.5, >70–≤80→2.5, >80→3) + female(1) + Cr_mg_dL(<1.4→0, 1.4–2.2→1.5, >2.2→3) + Ca_mg_dL(<7.5→2) + CPK_U_L(>40000→2) + origin_not_seizure_syncope_exercise_statin_myositis(3) + PO4_mg_dL(<4.0→0, 4.0–5.4→1.5, >5.4→3) + HCO3_mEq_L(<19→2); McMahon 2013 Table 3 derivation; max 19","purpose":"Sum McMahon 2013 Table 3 derivation points from age, sex, initial creatinine, calcium, CPK, etiology, phosphate, and bicarbonate and return the numeric total (max 19).","markdown_url":"https://magentlab.com/docs/mcmahon.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"mcmahon"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"number","description":"McMahon 2013 Table 3 points (half-points allowed; 0-19)"},{"name":"max_score","type":"integer","description":"Always 19 (sum of published maxima)"},{"name":"age","type":"integer","description":"Age used, years"},{"name":"sex","type":"string","description":"female or male"},{"name":"creatinine_mg_dl","type":"number","description":"Initial creatinine used, mg/dL"},{"name":"calcium_mg_dl","type":"number","description":"Initial calcium used, mg/dL"},{"name":"cpk_u_l","type":"number","description":"Initial CPK used, U/L"},{"name":"low_risk_origin","type":"boolean","description":"true when origin is seizure, syncope, exercise, statin, or myositis (0 origin points)"},{"name":"phosphate_mg_dl","type":"number","description":"Initial phosphate used, mg/dL"},{"name":"bicarbonate_mmol_l","type":"number","description":"Initial bicarbonate used, mEq/L"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"McMahon et al. JAMA Intern Med 2013 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"40","bicarbonate_mmol_l":"24","calcium_mg_dl":"9.0","cpk_u_l":"2000","creatinine_mg_dl":"1.0","low_risk_origin":"true","phosphate_mg_dl":"3.5","sex":"male"},{"age":"40","bicarbonate_mmol_l":"24","calcium_mg_dl":"9.0","cpk_u_l":"2000","creatinine_mg_dl":"1.0","low_risk_origin":"true","phosphate_mg_dl":"3.5","sex":"male"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/mcmahon","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/mcmahon?age=40&sex=male&creatinine_mg_dl=1.0&calcium_mg_dl=9.0&cpk_u_l=2000&low_risk_origin=true&phosphate_mg_dl=3.5&bicarbonate_mmol_l=24","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/mcmahon","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/mehran","description":"Mehran 2004 contrast-induced nephropathy risk score after PCI (eGFR model B). Points from hypotension, IABP, CHF, age >75, anemia, diabetes, contrast volume (1 per 100 mL), and caller eGFR. Returns integer score (max 41), risk group (low ≤5 through very_high ≥16), and development-set CIN percent. Not a CKD diagnosis; magent does not measure contrast or compute eGFR.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Age >75 scores 4 (Mehran 2004 Table 3 model B). Age 75 scores 0.","required":true,"example":"60"},{"in":"query","name":"hypotension","type":"boolean","description":"Hypotension as assigned by the caller: SBP <80 mm Hg for ≥1 h requiring inotropes or IABP within 24 h (Mehran 2004). true scores 5. true or false. magent does not measure blood pressure.","required":true,"example":"false"},{"in":"query","name":"iabp","type":"boolean","description":"Intra-aortic balloon pump use as assigned by the caller (Mehran 2004 Table 3). true scores 5. Independent of the hypotension flag. true or false.","required":true,"example":"false"},{"in":"query","name":"chf","type":"boolean","description":"CHF as assigned by the caller: NYHA III/IV and/or pulmonary edema (Mehran 2004). true scores 5. true or false. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"anemia","type":"boolean","description":"Anemia as assigned by the caller using WHO hematocrit <39% (men) or <36% (women) (Mehran 2004). true scores 3. Flag only; do not send a hematocrit number. magent does not assay hematocrit.","required":true,"example":"false"},{"in":"query","name":"diabetes","type":"boolean","description":"Diabetes mellitus as assigned by the caller (Mehran 2004 Table 3). true scores 3. true or false.","required":true,"example":"false"},{"in":"query","name":"contrast_ml","type":"integer","description":"Contrast volume in mL (integer 10-1000). Scores 1 per 100 mL: floor(contrast_ml/100) (Mehran 2004). 100 scores 1; 199 scores 1; 200 scores 2. magent does not measure contrast.","required":true,"example":"100"},{"in":"query","name":"egfr_ml_min","type":"number","description":"Caller-assigned eGFR in mL/min/1.73m² (5-150). Mehran 2004 Table 3 model B: ≥60 scores 0; 40 to <60 scores 2; 20 to <40 scores 4; <20 scores 6. magent does not compute eGFR and does not use race-based MDRD. Do not send serum creatinine; creatinine >1.5 is the alternate model A and would double-count.","required":true,"example":"90"}],"errors":[{"code":"invalid_mehran","message":"contrast_ml 10-1000 and egfr_ml_min 5-150 (Mehran 2004; magent clamps). Returned before settlement; you are not charged.","status":400},{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/mehran","citation":{"authors":"Mehran R, Aymong ED, Nikolsky E, et al.","doi":"10.1016/j.jacc.2004.06.068","id":"mehran-2004","pmid":"15464318","source":"J Am Coll Cardiol. 2004;44(7):1393-1399","title":"A simple risk score for prediction of contrast-induced nephropathy after percutaneous coronary intervention: development and initial validation","url":"https://doi.org/10.1016/j.jacc.2004.06.068"},"formula_expression":"Mehran 2004 model B = hypotension(5) + iabp(5) + chf(5) + age>75(4) + anemia(3) + diabetes(3) + floor(contrast_ml/100) + eGFR (>=60: 0, 40 to <60: 2, 20 to <40: 4, <20: 6); max 41 with contrast_ml 10-1000; risk_group low <=5, moderate 6-10, high 11-15, very_high >=16; development CIN 7.5% / 14.0% / 26.1% / 57.3%","purpose":"Sum the Mehran 2004 eGFR model B integer score for contrast-induced nephropathy after PCI and return low (≤5), moderate (6–10), high (11–15), or very_high (≥16) with the development-set CIN percent.","markdown_url":"https://magentlab.com/docs/mehran.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"mehran"},{"name":"formula_expression","type":"string","description":"Mehran 2004 Table 3 eGFR model B integer score"},{"name":"score","type":"integer","description":"Mehran points (max 41 with contrast_ml 10-1000)"},{"name":"max_score","type":"integer","description":"Always 41 (5+5+5+4+3+3+10+6) with the magent contrast_ml clamp"},{"name":"risk_group","type":"string","description":"low (≤5), moderate (6-10), high (11-15), or very_high (≥16). Mehran 2004 development-set four groups. Score 16 is very_high, not high. Not a CKD or CIN diagnosis."},{"name":"cin_percent","type":"number","description":"Development-set CIN percent for the risk group: 7.5, 14.0, 26.1, or 57.3 (Mehran 2004). Not a dialysis or mortality percent."},{"name":"age_years","type":"integer","description":"Age used for the >75 criterion"},{"name":"hypotension","type":"boolean","description":"Caller-assigned hypotension flag used"},{"name":"iabp","type":"boolean","description":"Caller-assigned IABP flag used"},{"name":"chf","type":"boolean","description":"Caller-assigned CHF (NYHA III/IV and/or pulmonary edema) flag used"},{"name":"anemia","type":"boolean","description":"Caller-assigned WHO anemia flag used"},{"name":"diabetes","type":"boolean","description":"Caller-assigned diabetes flag used"},{"name":"contrast_ml","type":"integer","description":"Contrast volume in mL used for floor(contrast_ml/100)"},{"name":"egfr_ml_min","type":"number","description":"Caller-assigned eGFR in mL/min/1.73m² used for the model B band"},{"name":"components","type":"array","description":"Per-factor Mehran 2004 points"},{"name":"citation","type":"object","description":"Mehran 2004 JACC citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"60","anemia":"false","chf":"false","contrast_ml":"100","diabetes":"false","egfr_ml_min":"90","hypotension":"false","iabp":"false"},{"age":"60","anemia":"false","chf":"false","contrast_ml":"100","diabetes":"false","egfr_ml_min":"90","hypotension":"false","iabp":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/mehran","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/mehran?age=60&hypotension=false&iabp=false&chf=false&anemia=false&diabetes=false&contrast_ml=100&egfr_ml_min=90","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/mehran","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/thakar","description":"Thakar 2005 clinical score for acute renal failure requiring dialysis after open-heart surgery. Points from sex, CHF, LVEF <35%, preoperative IABP, COPD, insulin-requiring diabetes, previous cardiac surgery, emergency surgery, procedure type (CABG / valve / CABG+valve / other), and preoperative creatinine (<1.2 / 1.2 to <2.1 / >=2.1 mg/dL). Returns integer score (max 17) and category 0–2 / 3–5 / 6–8 / 9–13. Not a dialysis order; not AKIN or RIFLE staging.","parameters":[{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"female or male (Thakar 2005). Female scores 1. Male scores 0. Assigned by the caller.","required":true,"example":"male"},{"in":"query","name":"surgery_type","type":"string","enum":["cabg","valve","cabg_valve","other"],"description":"cabg (CABG only, reference, 0), valve (valve only, +1), cabg_valve (CABG + valve, +2), or other (other cardiac surgeries such as ventricular aneurysm repair or pericardiectomy, +2). Thakar 2005. Assigned by the caller.","required":true,"example":"cabg"},{"in":"query","name":"creatinine_mg_dl","type":"number","description":"Preoperative serum creatinine in mg/dL (0.1-20). Provide this or creatinine_umol_l, not both. Thakar 2005 scoring table: <1.2 scores 0; 1.2 to <2.1 scores 2; >=2.1 scores 5. 2.0 mg/dL scores 2. magent does not assay creatinine.","required":false,"example":"1.0"},{"in":"query","name":"creatinine_umol_l","type":"number","description":"Preoperative serum creatinine in µmol/L (9-1768). Converted as mg/dL = µmol/L / 88.42.","required":false,"example":"88.42"},{"in":"query","name":"congestive_heart_failure","type":"boolean","description":"Congestive heart failure as assigned by the caller (Thakar 2005). true scores 1. true or false. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"lvef_lt_35","type":"boolean","description":"Left-ventricular ejection fraction <35% as assigned by the caller (Thakar 2005). true scores 1. Flag only; do not send an LVEF number. magent does not measure ejection fraction.","required":true,"example":"false"},{"in":"query","name":"preoperative_iabp","type":"boolean","description":"Preoperative intra-aortic balloon pump as assigned by the caller (Thakar 2005). true scores 2. true or false.","required":true,"example":"false"},{"in":"query","name":"copd","type":"boolean","description":"COPD requiring medical therapy as assigned by the caller (Thakar 2005). true scores 1. true or false.","required":true,"example":"false"},{"in":"query","name":"insulin_diabetes","type":"boolean","description":"Insulin-requiring diabetes as assigned by the caller (Thakar 2005). true scores 1. true or false.","required":true,"example":"false"},{"in":"query","name":"previous_cardiac_surgery","type":"boolean","description":"Previous cardiac surgery as assigned by the caller (Thakar 2005). true scores 1. true or false.","required":true,"example":"false"},{"in":"query","name":"emergency_surgery","type":"boolean","description":"Emergency surgery as assigned by the caller (Thakar 2005). true scores 2. true or false.","required":true,"example":"false"}],"errors":[{"code":"invalid_thakar_surgery","message":"surgery_type must be cabg, valve, cabg_valve, or other (Thakar 2005; CABG-only is the reference). Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_creatinine","message":"creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/thakar","citation":{"authors":"Thakar CV, Arrigain S, Worley S, Yared JP, Paganini EP","doi":"10.1681/ASN.2004040331","id":"thakar-2005","pmid":"15563569","source":"J Am Soc Nephrol. 2005;16(1):162-168","title":"A clinical score to predict acute renal failure after cardiac surgery","url":"https://doi.org/10.1681/ASN.2004040331"},"formula_expression":"Thakar 2005 = female(1) + congestive_heart_failure(1) + lvef_lt_35(1) + preoperative_iabp(2) + copd(1) + insulin_diabetes(1) + previous_cardiac_surgery(1) + emergency_surgery(2) + surgery_type(cabg 0, valve 1, cabg_valve 2, other 2) + creatinine_mg_dl(<1.2: 0, 1.2 to <2.1: 2, >=2.1: 5); max 17; categories 0-2 / 3-5 / 6-8 / 9-13","purpose":"Sum the Thakar 2005 preoperative points for dialysis-requiring acute renal failure after open-heart surgery and return the integer score (max 17) and published category (0–2 / 3–5 / 6–8 / 9–13).","markdown_url":"https://magentlab.com/docs/thakar.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"thakar"},{"name":"formula_expression","type":"string","description":"Thakar 2005 scoring-table integer expression"},{"name":"score","type":"integer","description":"Thakar points 0-17"},{"name":"max_score","type":"integer","description":"17"},{"name":"thakar_category","type":"string","description":"Published Thakar 2005 risk category: 0_to_2, 3_to_5, 6_to_8, or 9_to_13. Scores >=9 map to 9_to_13. Not a dialysis order."},{"name":"sex","type":"string","description":"female or male used"},{"name":"surgery_type","type":"string","description":"cabg, valve, cabg_valve, or other used"},{"name":"creatinine_mg_dl","type":"number","description":"Preoperative serum creatinine used in mg/dL (after conversion)"},{"name":"components","type":"array","description":"Per-factor Thakar 2005 points"},{"name":"citation","type":"object","description":"Thakar 2005 JASN citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"congestive_heart_failure":"false","copd":"false","creatinine_mg_dl":"1.0","emergency_surgery":"false","insulin_diabetes":"false","lvef_lt_35":"false","preoperative_iabp":"false","previous_cardiac_surgery":"false","sex":"male","surgery_type":"cabg"},{"congestive_heart_failure":"false","copd":"false","creatinine_mg_dl":"1.0","emergency_surgery":"false","insulin_diabetes":"false","lvef_lt_35":"false","preoperative_iabp":"false","previous_cardiac_surgery":"false","sex":"male","surgery_type":"cabg"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/thakar","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/thakar?sex=male&surgery_type=cabg&creatinine_mg_dl=1.0&congestive_heart_failure=false&lvef_lt_35=false&preoperative_iabp=false&copd=false&insulin_diabetes=false&previous_cardiac_surgery=false&emergency_surgery=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/thakar","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/nrpe","description":"Rao 2021 natriuretic response prediction equation from caller-assigned eGFR and BSA, serum and urine creatinine, and urine sodium on a spot sample ~2 h after IV loop diuretic. Na_output_mmol = eGFR*(BSA/1.73)*(SerumCr/UrineCr)*60*3.25*(UrineNa/1000). Poor <50 mmol; suboptimal <100 mmol (includes poor); excellent >150 mmol. magent does not compute eGFR or BSA and does not order a diuretic.","parameters":[{"in":"query","name":"egfr_ml_min_1_73m2","type":"number","description":"Caller-assigned eGFR in mL/min/1.73m² (5-200). magent does not compute CKD-EPI (including race-based 2009 CKD-EPI).","required":true,"example":"80"},{"in":"query","name":"bsa_m2","type":"number","description":"Caller-assigned body surface area in m² (0.4-3.5). Paper used Du Bois. magent does not compute BSA.","required":true,"example":"1.73"},{"in":"query","name":"creatinine_mg_dl","type":"number","description":"Serum creatinine in mg/dL (0.1-20). Provide this or creatinine_umol_l, not both.","required":false,"example":"1.0"},{"in":"query","name":"creatinine_umol_l","type":"number","description":"Serum creatinine in µmol/L (9-1768). Converted as mg/dL = µmol/L / 88.42. Provide this or creatinine_mg_dl, not both.","required":false,"example":"88.42"},{"in":"query","name":"urine_creatinine_mg_dl","type":"number","description":"Urine creatinine in mg/dL (1-500). Provide this or urine_creatinine_umol_l, not both.","required":false,"example":"25"},{"in":"query","name":"urine_creatinine_umol_l","type":"number","description":"Urine creatinine in µmol/L (88-44210). Converted as mg/dL = µmol/L / 88.42. Provide this or urine_creatinine_mg_dl, not both.","required":false,"example":"2210.5"},{"in":"query","name":"urine_sodium_mmol_l","type":"number","description":"Spot urine sodium in mmol/L (1-300), ~2 h after IV loop diuretic.","required":true,"example":"90"}],"errors":[{"code":"invalid_egfr","message":"egfr_ml_min_1_73m2 must be a number from 5 to 200 (caller-assigned eGFR; magent does not compute MDRD or CKD-EPI). Returned before settlement; you are not charged.","status":400},{"code":"invalid_bsa","message":"bsa_m2 must be a number from 0.4 to 3.5 (caller-assigned Du Bois BSA). Returned before settlement; you are not charged.","status":400},{"code":"invalid_creatinine","message":"creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_urine_creatinine","message":"urine_creatinine_mg_dl (1-500) or urine_creatinine_umol_l (88-44210) is required. Returned before settlement; you are not charged.","status":400},{"code":"invalid_urine_sodium","message":"urine_sodium_mmol_l must be a number from 1 to 300. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/nrpe","citation":{"authors":"Rao VS, Ivey-Miranda JB, Cox ZL, et al.","doi":"10.1016/j.jacc.2020.12.022","id":"rao-2021","pmid":"33573739","source":"J Am Coll Cardiol. 2021;77(6):695-708","title":"Natriuretic Equation to Predict Loop Diuretic Response in Patients With Heart Failure","url":"https://doi.org/10.1016/j.jacc.2020.12.022"},"formula_expression":"na_output_mmol = egfr_ml_min_1_73m2 * (bsa_m2 / 1.73) * (creatinine_mg_dl / urine_creatinine_mg_dl) * 60 * 3.25 * (urine_sodium_mmol_l / 1000); urine_output_ml = egfr_ml_min_1_73m2 * (bsa_m2 / 1.73) * (creatinine_mg_dl / urine_creatinine_mg_dl) * 60 * 3.25","purpose":"Compute the Rao 2021 natriuretic response prediction equation from a spot urine sample ~2 h after IV loop diuretic using caller-assigned eGFR and BSA, serum and urine creatinine, and urine sodium.","markdown_url":"https://magentlab.com/docs/nrpe.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"nrpe"},{"name":"formula_expression","type":"string","description":"Exact Rao 2021 spot-urine natriuretic and urine-output expressions"},{"name":"egfr_ml_min_1_73m2","type":"number","description":"Caller-assigned eGFR in mL/min/1.73m²"},{"name":"bsa_m2","type":"number","description":"Caller-assigned BSA in m²"},{"name":"creatinine_mg_dl","type":"number","description":"Normalized serum creatinine in mg/dL"},{"name":"urine_creatinine_mg_dl","type":"number","description":"Normalized urine creatinine in mg/dL"},{"name":"urine_sodium_mmol_l","type":"number","description":"Urine sodium in mmol/L"},{"name":"na_output_mmol","type":"number","description":"Predicted Na output in mmol, 1 decimal (Rao 2021)"},{"name":"urine_output_ml","type":"number","description":"Predicted urine output in mL, 1 decimal (Rao 2021)"},{"name":"poor_response","type":"boolean","description":"true iff rounded na_output_mmol < 50 (Rao 2021 Methods)"},{"name":"suboptimal_response","type":"boolean","description":"true iff rounded na_output_mmol < 100 (Rao 2021 Methods; includes poor_response)"},{"name":"excellent_response","type":"boolean","description":"true iff rounded na_output_mmol > 150 (Rao 2021 Methods)"},{"name":"citation","type":"object","description":"Rao J Am Coll Cardiol 2021 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"bsa_m2":"1.73","creatinine_mg_dl":"1.0","egfr_ml_min_1_73m2":"80","urine_creatinine_mg_dl":"25","urine_sodium_mmol_l":"90"},{"bsa_m2":"1.73","creatinine_mg_dl":"1.0","egfr_ml_min_1_73m2":"80","urine_creatinine_mg_dl":"25","urine_sodium_mmol_l":"90"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/nrpe","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/nrpe?egfr_ml_min_1_73m2=80&bsa_m2=1.73&creatinine_mg_dl=1.0&urine_creatinine_mg_dl=25&urine_sodium_mmol_l=90","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/nrpe","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/dad-ckd","description":"Mocroft 2015 D:A:D full CKD risk score (Table 2 integer points only): IDU, hepatitis C, age, caller-assigned eGFR >60, sex, nadir CD4, hypertension, prior CVD, and diabetes. Bands low <0, medium 0–4, high ≥5. Not the short score, not the Poisson probability model, not NNTH, and not an ART start order. Race is not an input.","parameters":[{"in":"query","name":"ivdu","type":"boolean","description":"Caller-assigned injecting drug use (Mocroft 2015 Table 2). true scores 2. magent does not diagnose injecting drug use.","required":true,"example":"false"},{"in":"query","name":"hepatitis_c","type":"boolean","description":"Caller-assigned hepatitis C co-infection (Mocroft 2015 Table 2). true scores 1. magent does not diagnose hepatitis C.","required":true,"example":"false"},{"in":"query","name":"age_years","type":"integer","description":"Age in years (integer 16-120). Mocroft 2015 Table 2: ≤35 scores 0; >35 and ≤50 scores 4; >50 and ≤60 scores 7; >60 scores 10.","required":true,"example":"38"},{"in":"query","name":"egfr_ml_min","type":"number","description":"Caller-assigned eGFR in mL/min (0.1-250, must be >60). Mocroft 2015 Table 2: >90 scores −6; >70 and ≤90 scores 0; >60 and ≤70 scores 6. eGFR ≤60 is outside the derivation population. magent does not compute eGFR.","required":true,"example":"68"},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"Sex (Mocroft 2015 Table 2). female scores 1; male scores 0.","required":true,"example":"female"},{"in":"query","name":"nadir_cd4_cells_mm3","type":"integer","description":"Nadir CD4 count in cells/mm³ (integer 0-3000). Mocroft 2015 Table 2: ≤200 scores 0; >200 scores −1. magent does not assay CD4.","required":true,"example":"250"},{"in":"query","name":"hypertension","type":"boolean","description":"Caller-assigned hypertension (Mocroft 2015 Table 2). true scores 1. magent does not diagnose hypertension.","required":true,"example":"false"},{"in":"query","name":"prior_cvd","type":"boolean","description":"Caller-assigned prior cardiovascular disease (Mocroft 2015 Table 2). true scores 1. magent does not diagnose CVD.","required":true,"example":"false"},{"in":"query","name":"diabetes","type":"boolean","description":"Caller-assigned diabetes (Mocroft 2015 Table 2). true scores 2. magent does not diagnose diabetes.","required":true,"example":"true"}],"errors":[{"code":"invalid_dad_ckd","message":"D:A:D CKD score inputs must match Mocroft 2015 age, eGFR, CD4 nadir, and flag categories from that paper. Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/dad-ckd","citation":{"authors":"Mocroft A, Lundgren JD, Ross M, Law M, Reiss P, Kirk O, et al.","doi":"10.1371/journal.pmed.1001809","id":"mocroft-2015","pmid":"25826420","source":"PLoS Med. 2015;12(3):e1001809","title":"Development and Validation of a Risk Score for Chronic Kidney Disease in HIV Infection Using Prospective Cohort Data from the D:A:D Study","url":"https://doi.org/10.1371/journal.pmed.1001809"},"formula_expression":"D:A:D full CKD = ivdu 2 + hepatitis_c 1 + age (≤35 0; >35 and ≤50 4; >50 and ≤60 7; >60 10) + egfr (>90 −6; >70 and ≤90 0; >60 and ≤70 6) + female 1 + nadir_cd4 (>200 −1; ≤200 0) + hypertension 1 + prior_cvd 1 + diabetes 2; Mocroft 2015 Table 2; max 24; bands low <0, medium 0–4, high ≥5","purpose":"Sum the Mocroft 2015 D:A:D Table 2 full integer CKD risk score from injecting drug use, hepatitis C, age, caller-assigned eGFR >60, sex, nadir CD4, hypertension, prior CVD, and diabetes.","markdown_url":"https://magentlab.com/docs/dad-ckd.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"dad_ckd"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Mocroft 2015 Table 2 full-score points"},{"name":"max_score","type":"integer","description":"24"},{"name":"risk_band","type":"string","description":"Mocroft 2015 band: low (score < 0), medium (0–4), or high (≥5). A band, not a CKD diagnosis."},{"name":"age_years","type":"integer","description":"Age in years used for Table 2 age bands"},{"name":"egfr_ml_min","type":"number","description":"Caller-assigned eGFR used for Table 2 eGFR bands"},{"name":"sex","type":"string","description":"female or male"},{"name":"nadir_cd4_cells_mm3","type":"integer","description":"Nadir CD4 cells/mm³ used for Table 2 nadir bands"},{"name":"ivdu","type":"boolean","description":"Caller-assigned injecting drug use flag"},{"name":"hepatitis_c","type":"boolean","description":"Caller-assigned hepatitis C flag"},{"name":"hypertension","type":"boolean","description":"Caller-assigned hypertension flag"},{"name":"prior_cvd","type":"boolean","description":"Caller-assigned prior CVD flag"},{"name":"diabetes","type":"boolean","description":"Caller-assigned diabetes flag"},{"name":"components","type":"array","description":"Per-factor Table 2 points"},{"name":"citation","type":"object","description":"Mocroft et al. PLoS Med 2015 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age_years":"38","diabetes":"true","egfr_ml_min":"68","hepatitis_c":"false","hypertension":"false","ivdu":"false","nadir_cd4_cells_mm3":"250","prior_cvd":"false","sex":"female"},{"age_years":"38","diabetes":"true","egfr_ml_min":"68","hepatitis_c":"false","hypertension":"false","ivdu":"false","nadir_cd4_cells_mm3":"250","prior_cvd":"false","sex":"female"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/dad-ckd","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/dad-ckd?ivdu=false&hepatitis_c=false&age_years=38&egfr_ml_min=68&sex=female&nadir_cd4_cells_mm3=250&hypertension=false&prior_cvd=false&diabetes=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/dad-ckd","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/cha2ds2-vasc","description":"Returns Lip 2010 CHA2DS2-VASc from discrete clinical flags.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). ≥75 scores 2; 65-74 scores 1.","required":true,"example":"78"},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"female scores 1 (Sc); male scores 0.","required":true,"example":"female"},{"in":"query","name":"chf","type":"boolean","description":"Congestive heart failure or LV dysfunction. true or false.","required":true,"example":"false"},{"in":"query","name":"hypertension","type":"boolean","description":"Hypertension history. true or false.","required":true,"example":"true"},{"in":"query","name":"diabetes","type":"boolean","description":"Diabetes mellitus. true or false.","required":true,"example":"true"},{"in":"query","name":"stroke_tia","type":"boolean","description":"Prior stroke, TIA, or thromboembolism. true or false (2 points).","required":true,"example":"false"},{"in":"query","name":"vascular_disease","type":"boolean","description":"Prior MI, peripheral artery disease, or aortic plaque. true or false.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/cha2ds2-vasc","citation":{"authors":"Lip GYH, Nieuwlaat R, Pisters R, Lane DA, Crijns HJ","doi":"10.1378/chest.09-1584","id":"lip-2010","source":"Chest. 2010;137(2):263-272","title":"Refining clinical risk stratification for predicting stroke and thromboembolism in atrial fibrillation using a novel risk factor-based approach: the euro heart survey on atrial fibrillation","url":"https://doi.org/10.1378/chest.09-1584"},"formula_expression":"CHA2DS2-VASc = CHF 1 + HTN 1 + Age≥75 2 (or 65-74 1) + diabetes 1 + stroke/TIA 2 + vascular 1 + female 1; max 9","purpose":"Returns the Lip 2010 CHA2DS2-VASc stroke-risk score from discrete clinical flags; cites Lip et al., Chest 2010.","markdown_url":"https://magentlab.com/docs/cha2ds2-vasc.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"cha2ds2_vasc"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Total points 0-9"},{"name":"max_score","type":"integer","description":"Always 9"},{"name":"sex","type":"string","description":"female or male"},{"name":"age_years","type":"integer","description":"Age used for A2/A scoring"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Chest 2010 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"78","chf":"false","diabetes":"true","hypertension":"true","sex":"female","stroke_tia":"false","vascular_disease":"false"},{"age":"78","chf":"false","diabetes":"true","hypertension":"true","sex":"female","stroke_tia":"false","vascular_disease":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/cha2ds2-vasc","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/cha2ds2-vasc?age=78&sex=female&chf=false&hypertension=true&diabetes=true&stroke_tia=false&vascular_disease=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/cha2ds2-vasc","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/cha2ds2-va","description":"ESC 2024 CHA2DS2-VA stroke-risk score from age and discrete flags (CHF, hypertension, diabetes, prior stroke/TIA, vascular disease). No sex category (not CHA2DS2-VASc). Score 0 none, 1 consider OAC, ≥2 OAC recommended. Deterministic published arithmetic with citation; not an anticoagulation order.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). ≥75 scores 2; 65-74 scores 1.","required":true,"example":"78"},{"in":"query","name":"chf","type":"boolean","description":"Congestive heart failure or LV dysfunction. true or false.","required":true,"example":"false"},{"in":"query","name":"hypertension","type":"boolean","description":"Hypertension history. true or false.","required":true,"example":"false"},{"in":"query","name":"diabetes","type":"boolean","description":"Diabetes mellitus. true or false.","required":true,"example":"false"},{"in":"query","name":"stroke_tia","type":"boolean","description":"Prior stroke, TIA, or arterial thromboembolism. true or false (2 points).","required":true,"example":"false"},{"in":"query","name":"vascular_disease","type":"boolean","description":"Prior MI, peripheral artery disease, or aortic plaque. true or false.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/cha2ds2-va","citation":{"authors":"Van Gelder IC, Rienstra M, Bunting KV, et al.","doi":"10.1093/eurheartj/ehae176","id":"van-gelder-2024","pmid":"39210723","source":"Eur Heart J. 2024;45(36):3314-3414","title":"2024 ESC Guidelines for the management of atrial fibrillation developed in collaboration with the European Association for Cardio-Thoracic Surgery (EACTS)","url":"https://doi.org/10.1093/eurheartj/ehae176"},"formula_expression":"CHA2DS2-VA = CHF 1 + HTN 1 + Age≥75 2 (or 65-74 1) + diabetes 1 + stroke/TIA 2 + vascular 1; no sex; max 8; OAC none (0) consider (1) recommended (≥2) (ESC 2024)","purpose":"Compute the ESC 2024 CHA2DS2-VA stroke-risk score from age and discrete clinical flags, without a sex category.","markdown_url":"https://magentlab.com/docs/cha2ds2-va.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"cha2ds2_va"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Total points 0-8"},{"name":"max_score","type":"integer","description":"Always 8"},{"name":"oac","type":"string","description":"ESC 2024 oral-anticoagulation band: none (score 0), consider (score 1), or recommended (score ≥2). Not an order."},{"name":"category","type":"string","description":"Same ESC 2024 band as oac: none, consider, or recommended. Not an order."},{"name":"age_years","type":"integer","description":"Age used for A2/A scoring"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"ESC 2024 Eur Heart J citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"78","chf":"false","diabetes":"false","hypertension":"false","stroke_tia":"false","vascular_disease":"false"},{"age":"78","chf":"false","diabetes":"false","hypertension":"false","stroke_tia":"false","vascular_disease":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/cha2ds2-va","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/cha2ds2-va?age=78&chf=false&hypertension=false&diabetes=false&stroke_tia=false&vascular_disease=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/cha2ds2-va","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/has-bled","description":"HAS-BLED score from discrete clinical flags. Use for bleeding-risk arithmetic in atrial fibrillation. Deterministic published score with citation.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Age >65 scores 1 (E).","required":true,"example":"78"},{"in":"query","name":"hypertension","type":"boolean","description":"Uncontrolled hypertension (H). true or false.","required":true,"example":"true"},{"in":"query","name":"abnormal_renal","type":"boolean","description":"Abnormal renal function (A). true or false.","required":true,"example":"false"},{"in":"query","name":"abnormal_liver","type":"boolean","description":"Abnormal liver function (A). true or false. Renal and liver each score 1.","required":true,"example":"false"},{"in":"query","name":"stroke","type":"boolean","description":"Prior stroke (S). true or false.","required":true,"example":"false"},{"in":"query","name":"bleeding","type":"boolean","description":"Bleeding history or predisposition (B). true or false.","required":true,"example":"false"},{"in":"query","name":"labile_inr","type":"boolean","description":"Labile INR (L). true or false.","required":true,"example":"false"},{"in":"query","name":"drugs","type":"boolean","description":"Concomitant antiplatelet or NSAID (D). true or false.","required":true,"example":"false"},{"in":"query","name":"alcohol","type":"boolean","description":"Alcohol excess (D). true or false. Drugs and alcohol each score 1.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/has-bled","citation":{"authors":"Pisters R, Lane DA, Nieuwlaat R, de Vos CB, Crijns HJ, Lip GYH","doi":"10.1378/chest.10-0134","id":"pisters-2010","source":"Chest. 2010;138(5):1093-1100","title":"A novel user-friendly score (HAS-BLED) to assess 1-year risk of major bleeding in patients with atrial fibrillation: the Euro Heart Survey","url":"https://doi.org/10.1378/chest.10-0134"},"formula_expression":"HAS-BLED = hypertension + abnormal_renal + abnormal_liver + stroke + bleeding + labile_inr + elderly(age>65) + drugs + alcohol; max 9","purpose":"Compute the HAS-BLED bleeding-risk score from discrete clinical flags.","markdown_url":"https://magentlab.com/docs/has-bled.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"has_bled"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Total points 0-9"},{"name":"max_score","type":"integer","description":"Always 9"},{"name":"age_years","type":"integer","description":"Age used for the E criterion"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Chest 2010 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"abnormal_liver":"false","abnormal_renal":"false","age":"78","alcohol":"false","bleeding":"false","drugs":"false","hypertension":"true","labile_inr":"false","stroke":"false"},{"abnormal_liver":"false","abnormal_renal":"false","age":"78","alcohol":"false","bleeding":"false","drugs":"false","hypertension":"true","labile_inr":"false","stroke":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/has-bled","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/has-bled?age=78&hypertension=true&abnormal_renal=false&abnormal_liver=false&stroke=false&bleeding=false&labile_inr=false&drugs=false&alcohol=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/has-bled","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/orbit","description":"ORBIT 2015 (O'Brien) AF bleeding score: age >=75 scores 1; anemia caller flag 2; bleeding history 2; insufficient kidney (paper eGFR <60) caller flag 1; antiplatelet 1. Max 7. Score 0-2 low, 3 intermediate, >=4 high. Not a diagnosis. Not HAS-BLED. magent does not take hemoglobin or compute eGFR.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). ≥75 scores 1 (75 scores; 74 does not).","required":true,"example":"70"},{"in":"query","name":"anemia","type":"boolean","description":"Anemia as assigned by the caller. true or false. Scores 2. magent does not take hemoglobin.","required":true,"example":"false"},{"in":"query","name":"bleeding_history","type":"boolean","description":"Bleeding history as assigned by the caller. true or false. Scores 2.","required":true,"example":"false"},{"in":"query","name":"insufficient_kidney","type":"boolean","description":"Insufficient kidney function as assigned by the caller (paper eGFR <60). true or false. Scores 1. magent does not compute eGFR.","required":true,"example":"false"},{"in":"query","name":"antiplatelet","type":"boolean","description":"Antiplatelet therapy as assigned by the caller. true or false. Scores 1.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/orbit","citation":{"authors":"O'Brien EC, Simon DN, Thomas LE, et al.","doi":"10.1093/eurheartj/ehv476","id":"obrien-2015","source":"Eur Heart J. 2015;36(46):3258-3264","title":"The ORBIT bleeding score: a simple bedside score to assess bleeding risk in atrial fibrillation","url":"https://doi.org/10.1093/eurheartj/ehv476"},"formula_expression":"ORBIT = age_ge_75 (1) + anemia (2) + bleeding_history (2) + insufficient_kidney (1) + antiplatelet (1); max 7; 0-2 low, 3 intermediate, >=4 high","purpose":"Compute the O'Brien 2015 ORBIT bleeding score from age and caller-assigned anemia, bleeding history, insufficient kidney, and antiplatelet flags.","markdown_url":"https://magentlab.com/docs/orbit.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"orbit"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Total points 0-7"},{"name":"max_score","type":"integer","description":"Always 7"},{"name":"orbit_risk","type":"string","description":"low when score is 0-2; intermediate when 3; high when ≥4. Not a diagnosis."},{"name":"age_years","type":"integer","description":"Age used for the ≥75 criterion"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"O'Brien 2015 Eur Heart J citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"70","anemia":"false","antiplatelet":"false","bleeding_history":"false","insufficient_kidney":"false"},{"age":"70","anemia":"false","antiplatelet":"false","bleeding_history":"false","insufficient_kidney":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/orbit","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/orbit?age=70&anemia=false&bleeding_history=false&insufficient_kidney=false&antiplatelet=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/orbit","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/chads2","description":"CHADS2 score from discrete clinical flags. Use for the 2001 Gage atrial-fibrillation stroke-risk arithmetic. Deterministic published score with citation; not an anticoagulation order.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). ≥75 scores 1.","required":true,"example":"78"},{"in":"query","name":"chf","type":"boolean","description":"Congestive heart failure or LV dysfunction. true or false.","required":true,"example":"false"},{"in":"query","name":"hypertension","type":"boolean","description":"Hypertension history. true or false.","required":true,"example":"true"},{"in":"query","name":"diabetes","type":"boolean","description":"Diabetes mellitus. true or false.","required":true,"example":"true"},{"in":"query","name":"stroke_tia","type":"boolean","description":"Prior stroke or TIA. true or false (2 points).","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/chads2","citation":{"authors":"Gage BF, Waterman AD, Shannon W, Boechler M, Rich MW, Radford MJ","doi":"10.1001/jama.285.22.2864","id":"gage-2001","source":"JAMA. 2001;285(22):2864-2870","title":"Validation of clinical classification schemes for predicting stroke: results from the National Registry of Atrial Fibrillation","url":"https://doi.org/10.1001/jama.285.22.2864"},"formula_expression":"CHADS2 = CHF 1 + hypertension 1 + age≥75 1 + diabetes 1 + stroke/TIA 2; max 6","purpose":"Compute the CHADS2 stroke-risk score from discrete clinical flags.","markdown_url":"https://magentlab.com/docs/chads2.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"chads2"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Total points 0-6"},{"name":"max_score","type":"integer","description":"Always 6"},{"name":"age_years","type":"integer","description":"Age used for the ≥75 criterion"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"JAMA 2001 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"78","chf":"false","diabetes":"true","hypertension":"true","stroke_tia":"false"},{"age":"78","chf":"false","diabetes":"true","hypertension":"true","stroke_tia":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/chads2","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/chads2?age=78&chf=false&hypertension=true&diabetes=true&stroke_tia=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/chads2","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/atria","description":"Fang 2011 ATRIA hemorrhage score: anemia caller flag 3 (paper Hb <13 g/dL men or <12 g/dL women); severe renal disease (eGFR <30 or dialysis) caller flag 3; age >=75 scores 2; prior hemorrhage 1; diagnosed hypertension 1. Max 10. Score 0-3 low, 4 intermediate, 5-10 high. Not a diagnosis. Not a warfarin order. Not HAS-BLED. magent does not measure hemoglobin or compute eGFR.","parameters":[{"in":"query","name":"anemia","type":"boolean","description":"Anemia as assigned by the caller (paper: hemoglobin <13 g/dL in men or <12 g/dL in women). true or false. Scores 3. magent does not measure hemoglobin.","required":true,"example":"false"},{"in":"query","name":"severe_renal_disease","type":"boolean","description":"Severe renal disease as assigned by the caller (paper: eGFR <30 or dialysis). true or false. Scores 3. magent does not compute eGFR.","required":true,"example":"false"},{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). ≥75 scores 2 (75 scores; 74 does not).","required":true,"example":"60"},{"in":"query","name":"prior_hemorrhage","type":"boolean","description":"Any prior hemorrhage diagnosis as assigned by the caller. true or false. Scores 1.","required":true,"example":"false"},{"in":"query","name":"hypertension","type":"boolean","description":"Diagnosed hypertension as assigned by the caller. true or false. Scores 1.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/atria","citation":{"authors":"Fang MC, Go AS, Chang Y, et al.","doi":"10.1016/j.jacc.2011.03.031","id":"fang-2011","pmid":"21757117","source":"J Am Coll Cardiol. 2011;58(4):395-401","title":"A new risk scheme to predict warfarin-associated hemorrhage: the ATRIA (Anticoagulation and Risk Factors in Atrial Fibrillation) Study","url":"https://doi.org/10.1016/j.jacc.2011.03.031"},"formula_expression":"ATRIA = anemia (3) + severe_renal_disease (3) + age_ge_75 (2) + prior_hemorrhage (1) + hypertension (1); max 10; 0-3 low, 4 intermediate, 5-10 high","purpose":"Compute the Fang 2011 ATRIA hemorrhage score from caller-assigned anemia, severe renal disease, age, prior hemorrhage, and hypertension flags.","markdown_url":"https://magentlab.com/docs/atria.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"atria"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Total points 0-10"},{"name":"max_score","type":"integer","description":"Always 10"},{"name":"risk_band","type":"string","description":"low when score is 0-3; intermediate when 4; high when 5-10. Not a diagnosis."},{"name":"age_years","type":"integer","description":"Age used for the ≥75 criterion"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Fang 2011 J Am Coll Cardiol citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"60","anemia":"false","hypertension":"false","prior_hemorrhage":"false","severe_renal_disease":"false"},{"age":"60","anemia":"false","hypertension":"false","prior_hemorrhage":"false","severe_renal_disease":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/atria","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/atria?anemia=false&severe_renal_disease=false&age=60&prior_hemorrhage=false&hypertension=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/atria","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/atria-stroke","description":"Singer 2013 ATRIA stroke risk score (not Fang 2011 ATRIA bleed). Age x prior stroke Table 3: <65 0/8, 65-74 3/7, 75-84 5/7, >=85 6/9 without/with prior stroke. Plus 1 each: female, diabetes, heart failure, hypertension, proteinuria, eGFR<45 or ESRD. Max 15 (12 without prior stroke). 0-5 low, 6 moderate, 7-15 high. Not a stroke diagnosis or anticoagulation order. Not CHA2DS2-VASc. magent does not assay eGFR or urine.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Singer 2013 Table 3 without prior stroke: <65 scores 0, 65-74 scores 3, 75-84 scores 5, ≥85 scores 6. With prior stroke: <65 scores 8, 65-74 scores 7, 75-84 scores 7, ≥85 scores 9.","required":true,"example":"50"},{"in":"query","name":"prior_stroke","type":"boolean","description":"Prior ischemic stroke as assigned by the caller. true or false. Selects the Table 3 age column. Not a stroke diagnosis.","required":true,"example":"false"},{"in":"query","name":"female","type":"boolean","description":"Female sex as assigned by the caller. true or false. Scores 1.","required":true,"example":"false"},{"in":"query","name":"diabetes","type":"boolean","description":"Diabetes as assigned by the caller. true or false. Scores 1.","required":true,"example":"false"},{"in":"query","name":"heart_failure","type":"boolean","description":"Congestive heart failure as assigned by the caller (paper CHF). true or false. Scores 1.","required":true,"example":"false"},{"in":"query","name":"hypertension","type":"boolean","description":"Diagnosed hypertension as assigned by the caller. true or false. Scores 1.","required":true,"example":"false"},{"in":"query","name":"proteinuria","type":"boolean","description":"Proteinuria as assigned by the caller. true or false. Scores 1. magent does not assay urine.","required":true,"example":"false"},{"in":"query","name":"egfr_lt_45_or_esrd","type":"boolean","description":"eGFR <45 or ESRD as assigned by the caller. true or false. Scores 1. magent does not assay eGFR.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/atria-stroke","citation":{"authors":"Singer DE, Chang Y, Borowsky LH, Fang MC, Pomernacki NK, Udaltsova N, Reynolds K, Go AS.","doi":"10.1161/JAHA.113.000250","id":"singer-2013","pmid":"23782923","source":"J Am Heart Assoc. 2013;2(3):e000250","title":"A new risk scheme to predict ischemic stroke and other thromboembolism in atrial fibrillation: the ATRIA study stroke risk score","url":"https://doi.org/10.1161/JAHA.113.000250"},"formula_expression":"ATRIA stroke = age_prior_stroke (Singer 2013 Table 3: <65 0/8, 65-74 3/7, 75-84 5/7, >=85 6/9 without/with prior stroke) + female 1 + diabetes 1 + heart_failure 1 + hypertension 1 + proteinuria 1 + egfr_lt_45_or_esrd 1; max 15 (12 without prior stroke); 0-5 low, 6 moderate, 7-15 high","purpose":"Compute the Singer 2013 ATRIA stroke risk score from age, prior stroke, and caller-assigned female, diabetes, heart failure, hypertension, proteinuria, and eGFR <45 or ESRD flags.","markdown_url":"https://magentlab.com/docs/atria-stroke.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"atria_stroke"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Total points 0-15"},{"name":"max_score","type":"integer","description":"Always 15"},{"name":"atria_stroke_band","type":"string","description":"Singer 2013 three-category scheme: low when score is 0-5; moderate when 6; high when 7-15. Not a diagnosis."},{"name":"age_years","type":"integer","description":"Age used for the Table 3 age column"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Singer 2013 J Am Heart Assoc citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"50","diabetes":"false","egfr_lt_45_or_esrd":"false","female":"false","heart_failure":"false","hypertension":"false","prior_stroke":"false","proteinuria":"false"},{"age":"50","diabetes":"false","egfr_lt_45_or_esrd":"false","female":"false","heart_failure":"false","hypertension":"false","prior_stroke":"false","proteinuria":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/atria-stroke","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/atria-stroke?age=50&prior_stroke=false&female=false&diabetes=false&heart_failure=false&hypertension=false&proteinuria=false&egfr_lt_45_or_esrd=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/atria-stroke","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/hemorr2hages","description":"Gage 2006 HEMORR2HAGES (NRAF) AF major-bleed score: prior bleed 2; hepatic or renal, ethanol, malignancy, age >75, reduced platelet count or function, uncontrolled hypertension, anemia, genetic factors, excessive fall risk, and stroke each 1. Max 12. Warfarin major bleed per 100 patient-years: 0→1.9, 1→2.5, 2→5.3, 3→8.4, 4→10.4, ≥5→12.3. Not a medical device. Not a decision to start or stop anticoagulation. Not HAS-BLED, ORBIT, or ATRIA.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Age >75 scores 1 (76 scores; 75 does not).","required":true,"example":"60"},{"in":"query","name":"prior_bleed","type":"boolean","description":"Prior bleed / rebleeding as assigned by the caller. true or false. Scores 2 (the 2 in HEMORR2HAGES).","required":true,"example":"false"},{"in":"query","name":"hepatic_or_renal","type":"boolean","description":"Hepatic or renal disease as assigned by the caller. true or false. Scores 1 as a single flag.","required":true,"example":"false"},{"in":"query","name":"ethanol","type":"boolean","description":"Ethanol abuse as assigned by the caller. true or false. Scores 1.","required":true,"example":"false"},{"in":"query","name":"malignancy","type":"boolean","description":"Malignancy as assigned by the caller. true or false. Scores 1.","required":true,"example":"false"},{"in":"query","name":"reduced_platelet","type":"boolean","description":"Reduced platelet count or function as assigned by the caller. true or false. Scores 1. magent does not take a platelet count.","required":true,"example":"false"},{"in":"query","name":"uncontrolled_hypertension","type":"boolean","description":"Uncontrolled hypertension as assigned by the caller. true or false. Scores 1.","required":true,"example":"false"},{"in":"query","name":"anemia","type":"boolean","description":"Anemia as assigned by the caller. true or false. Scores 1. magent does not take hemoglobin.","required":true,"example":"false"},{"in":"query","name":"genetic_factors","type":"boolean","description":"Genetic factors as assigned by the caller (paper: CYP2C9). true or false. Scores 1. magent does not genotype.","required":true,"example":"false"},{"in":"query","name":"excessive_fall_risk","type":"boolean","description":"Excessive fall risk as assigned by the caller. true or false. Scores 1.","required":true,"example":"false"},{"in":"query","name":"stroke","type":"boolean","description":"Prior stroke as assigned by the caller. true or false. Scores 1.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/hemorr2hages","citation":{"authors":"Gage BF, Yan Y, Milligan PE, et al.","doi":"10.1016/j.ahj.2005.04.017","id":"gage-2006","pmid":"16504638","source":"Am Heart J. 2006;151(3):713-719","title":"Clinical classification schemes for predicting hemorrhage: results from the National Registry of Atrial Fibrillation (NRAF)","url":"https://doi.org/10.1016/j.ahj.2005.04.017"},"formula_expression":"HEMORR2HAGES = prior_bleed (2) + hepatic_or_renal (1) + ethanol (1) + malignancy (1) + age_gt_75 (1) + reduced_platelet (1) + uncontrolled_hypertension (1) + anemia (1) + genetic_factors (1) + excessive_fall_risk (1) + stroke (1); max 12; warfarin major bleed per 100 pt-years: 0=1.9, 1=2.5, 2=5.3, 3=8.4, 4=10.4, >=5=12.3","purpose":"Compute the Gage 2006 HEMORR2HAGES bleeding-risk score from age and caller-assigned clinical flags, with published warfarin major-bleed rates per 100 patient-years.","markdown_url":"https://magentlab.com/docs/hemorr2hages.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"hemorr2hages"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Total points 0-12"},{"name":"max_score","type":"integer","description":"Always 12"},{"name":"bleed_rate_per_100_pt_years","type":"number","description":"Gage 2006 warfarin major bleed rate per 100 patient-years: 1.9 (0), 2.5 (1), 5.3 (2), 8.4 (3), 10.4 (4), 12.3 (≥5). Not a diagnosis."},{"name":"age_years","type":"integer","description":"Age used for the >75 criterion"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Gage 2006 Am Heart J citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"60","anemia":"false","ethanol":"false","excessive_fall_risk":"false","genetic_factors":"false","hepatic_or_renal":"false","malignancy":"false","prior_bleed":"false","reduced_platelet":"false","stroke":"false","uncontrolled_hypertension":"false"},{"age":"60","anemia":"false","ethanol":"false","excessive_fall_risk":"false","genetic_factors":"false","hepatic_or_renal":"false","malignancy":"false","prior_bleed":"false","reduced_platelet":"false","stroke":"false","uncontrolled_hypertension":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/hemorr2hages","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/hemorr2hages?age=60&prior_bleed=false&hepatic_or_renal=false&ethanol=false&malignancy=false&reduced_platelet=false&uncontrolled_hypertension=false&anemia=false&genetic_factors=false&excessive_fall_risk=false&stroke=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/hemorr2hages","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/chads-65","description":"CCS 2014 CHADS-65 algorithm for nonvalvular AF/AFL stroke-prevention discussion. Oral anticoagulant if age ≥65 or CHF, hypertension, diabetes, or prior stroke/TIA. Else aspirin if coronary, aortic, or peripheral arterial disease. Else none. Not CHADS2, not CHA2DS2-VASc, not HAS-BLED, and not an anticoagulation order. magent does not examine the patient.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). ≥65 indicates oral anticoagulant (OAC). Age ≥75 is subsumed by ≥65; there is no separate age≥75 input. 64 does not indicate OAC on age alone.","required":true,"example":"70"},{"in":"query","name":"chf","type":"boolean","description":"Congestive heart failure as assigned by the caller. true or false. Any true CHADS2 factor other than age≥75 (CHF, hypertension, diabetes, prior stroke/TIA) indicates OAC.","required":true,"example":"false"},{"in":"query","name":"hypertension","type":"boolean","description":"Hypertension history as assigned by the caller. true or false. Indicates OAC when true.","required":true,"example":"false"},{"in":"query","name":"diabetes","type":"boolean","description":"Diabetes mellitus as assigned by the caller. true or false. Indicates OAC when true.","required":true,"example":"false"},{"in":"query","name":"stroke_tia","type":"boolean","description":"Prior stroke or TIA as assigned by the caller. true or false. Indicates OAC when true.","required":true,"example":"false"},{"in":"query","name":"vascular_disease","type":"boolean","description":"Coronary, aortic, or peripheral arterial disease as assigned by the caller. true or false. Indicates ASA only when OAC is not indicated.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/chads-65","citation":{"authors":"Verma A, Cairns JA, Mitchell LB, Macle L, Stiell IG, Gladstone D, McMurtry MS, Connolly S, Cox JL, Dorian P, Ivers N, Leblanc K, Nattel S, Healey JS","doi":"10.1016/j.cjca.2014.08.001","id":"verma-2014","pmid":"25262857","source":"Can J Cardiol. 2014;30(10):1114-1130","title":"2014 focused update of the Canadian Cardiovascular Society Guidelines for the management of atrial fibrillation","url":"https://doi.org/10.1016/j.cjca.2014.08.001"},"formula_expression":"OAC if age ≥ 65 or CHF or hypertension or diabetes or prior stroke/TIA; else ASA if vascular disease (coronary, aortic, or peripheral arterial); else none (CCS 2014 CHADS-65)","purpose":"Apply the CCS 2014 CHADS-65 algorithm and return oac, asa, or none from age and caller-assigned CHF, hypertension, diabetes, prior stroke/TIA, and vascular disease.","markdown_url":"https://magentlab.com/docs/chads-65.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"chads_65"},{"name":"formula_expression","type":"string","description":"CCS 2014 CHADS-65 OAC then ASA then none tree"},{"name":"recommendation","type":"string","description":"oac, asa, or none. Not an anticoagulation order."},{"name":"oac_indicated","type":"boolean","description":"true when age ≥ 65 or CHF, hypertension, diabetes, or prior stroke/TIA is present"},{"name":"criteria","type":"array","description":"Per-factor rows (age_ge_65, chf, hypertension, diabetes, stroke_tia, vascular_disease) with factor, met, and age value on age_ge_65"},{"name":"citation","type":"object","description":"Verma 2014 Can J Cardiol citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"70","chf":"false","diabetes":"false","hypertension":"false","stroke_tia":"false","vascular_disease":"false"},{"age":"70","chf":"false","diabetes":"false","hypertension":"false","stroke_tia":"false","vascular_disease":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/chads-65","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/chads-65?age=70&chf=false&hypertension=false&diabetes=false&stroke_tia=false&vascular_disease=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/chads-65","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/doac-score","description":"Aggarwal 2023 DOAC Score (Circulation Table 2) for AF on DOACs: age 65-69 2 / 70-74 3 / 75-79 4 / >=80 5 (<65 0); CrCl/eGFR 30-60 inclusive 1, <30 2; underweight caller BMI <18.5 flag 1; stroke/TIA/embolism 1; diabetes 1; hypertension 1; antiplatelet none 0, aspirin 2, dual 3; NSAID 1; bleeding history 3; liver disease 2. Score min(raw, 10). Bands 0-3 very_low, 4-5 low, 6-7 moderate, 8-9 high, 10 very_high. Not HAS-BLED. Not DOAC dosing. Not warfarin.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Table 2: 65-69 scores 2; 70-74 scores 3; 75-79 scores 4; ≥80 scores 5; age <65 scores 0 and is accepted.","required":true,"example":"65"},{"in":"query","name":"crcl_or_egfr_ml_min","type":"number","description":"Creatinine clearance or eGFR in mL/min (5-200). Table 2: 30-60 inclusive scores 1; <30 scores 2; >60 scores 0. Exactly 30 and exactly 60 score 1.","required":true,"example":"70"},{"in":"query","name":"underweight","type":"boolean","description":"Caller-assigned BMI <18.5 kg/m² (Table 2 underweight). true or false. Scores 1. magent does not compute BMI.","required":true,"example":"false"},{"in":"query","name":"stroke_tia_embolism_history","type":"boolean","description":"History of stroke, TIA, or embolism as assigned by the caller. true or false. Scores 1.","required":true,"example":"false"},{"in":"query","name":"diabetes","type":"boolean","description":"Diabetes as assigned by the caller. true or false. Scores 1.","required":true,"example":"false"},{"in":"query","name":"hypertension","type":"boolean","description":"Hypertension as assigned by the caller. true or false. Scores 1.","required":true,"example":"false"},{"in":"query","name":"antiplatelet","type":"string","enum":["none","aspirin","dual"],"description":"Antiplatelet use: none (0), aspirin (2), or dual (aspirin + P2Y12; 3). Table 2.","required":true,"example":"none"},{"in":"query","name":"nsaid_use","type":"boolean","description":"NSAID use as assigned by the caller. true or false. Scores 1.","required":true,"example":"false"},{"in":"query","name":"bleeding_history","type":"boolean","description":"Bleeding history as assigned by the caller. true or false. Scores 3.","required":true,"example":"false"},{"in":"query","name":"liver_disease","type":"boolean","description":"Liver disease as assigned by the caller (Table 2 footnote: AST, ALT, or ALP ≥3× ULN, ALP ≥2× ULN, or cirrhosis). true or false. Scores 2. magent does not assay labs or assign Child-Pugh.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_doac","message":"antiplatelet must be none, aspirin, or dual; crcl_or_egfr_ml_min must be a number from 5 to 200 (Aggarwal 2023 DOAC Score Table 2). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/doac-score","citation":{"authors":"Aggarwal R, Ruff CT, Virdone S, Perreault S, Kakkar AK, Palazzolo MG, Dorais M, Kayani G, Singer DE, Secemsky E, Piccini J, Tahir UA, Shen C, Yeh RW","doi":"10.1161/CIRCULATIONAHA.123.064556","id":"aggarwal-2023","pmid":"37621213","source":"Circulation. 2023;148(12):936-946","title":"Development and Validation of the DOAC Score: A Novel Bleeding Risk Prediction Tool for Patients With Atrial Fibrillation on Direct-Acting Oral Anticoagulants","url":"https://doi.org/10.1161/CIRCULATIONAHA.123.064556"},"formula_expression":"DOAC Score (Aggarwal 2023 Circulation Table 2) = age (65-69 2, 70-74 3, 75-79 4, >=80 5; <65 0) + crcl_or_egfr_ml_min (30-60 inclusive 1, <30 2, >60 0) + underweight 1 + stroke_tia_embolism_history 1 + diabetes 1 + hypertension 1 + antiplatelet (none 0, aspirin 2, dual 3) + nsaid_use 1 + bleeding_history 3 + liver_disease 2; score = min(raw_sum, 10); bands 0-3 very_low, 4-5 low, 6-7 moderate, 8-9 high, 10 very_high; not HAS-BLED; not DOAC dosing; not warfarin","purpose":"Compute the Aggarwal 2023 DOAC Score from age, CrCl or eGFR, and caller-assigned Table 2 flags for patients with atrial fibrillation on a DOAC.","markdown_url":"https://magentlab.com/docs/doac-score.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"doac_score"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Capped Table 2 total (min of raw_sum and 10)"},{"name":"uncapped_sum","type":"integer","description":"Uncapped factor sum before the Table 2 maximum of 10"},{"name":"max_score","type":"integer","description":"Always 10"},{"name":"band","type":"string","description":"Aggarwal clinical risk group: very_low (0-3), low (4-5), moderate (6-7), high (8-9), very_high (10). Not a diagnosis."},{"name":"age_years","type":"integer","description":"Age used for the Table 2 age points"},{"name":"crcl_or_egfr_ml_min","type":"number","description":"CrCl or eGFR used for the Table 2 kidney points"},{"name":"antiplatelet","type":"string","description":"none, aspirin, or dual as parsed"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Aggarwal 2023 Circulation citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"65","antiplatelet":"none","bleeding_history":"false","crcl_or_egfr_ml_min":"70","diabetes":"false","hypertension":"false","liver_disease":"false","nsaid_use":"false","stroke_tia_embolism_history":"false","underweight":"false"},{"age":"65","antiplatelet":"none","bleeding_history":"false","crcl_or_egfr_ml_min":"70","diabetes":"false","hypertension":"false","liver_disease":"false","nsaid_use":"false","stroke_tia_embolism_history":"false","underweight":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/doac-score","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/doac-score?age=65&crcl_or_egfr_ml_min=70&underweight=false&stroke_tia_embolism_history=false&diabetes=false&hypertension=false&antiplatelet=none&nsaid_use=false&bleeding_history=false&liver_disease=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/doac-score","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/garfield-af","description":"Fox 2017 GARFIELD-AF 1-year all-cause mortality, ischaemic stroke/systemic embolism, and major bleed from age, sex, weight, pulse, diastolic BP, comorbidities, smoking, caller-assigned ethnicity (White/Caucasian reference; Hispanic/Latino, Asian, Black/Mixed/Other), oral anticoagulant class (none, NOAC, VKA), carotid occlusive disease, and antiplatelet therapy. Published 1-year equations. magent does not assign race or ethnicity. Not a diagnosis or anticoagulation order.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (integer 18-120). Fox 2017 / GARFIELD-AF: mortality uses 0.031050027*(age-65) when age<=65 and 0.064594824*(age-65) when age>65. Stroke and bleed use 0.039138147*(age-65) and 0.043476276*(age-65) with no knot.","required":true,"example":65},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"Sex as recorded (female or male). Fox 2017 female sex adds 0.306202287 to the mortality linear predictor. Stroke and bleed equations have no sex term.","required":true,"example":"male"},{"in":"query","name":"weight_kg","type":"number","description":"Weight in kg (20-300). Mortality: -0.021535182*(weight_kg-75) when weight_kg<=75; 0 when weight_kg>75. magent does not convert lb.","required":true,"example":75},{"in":"query","name":"pulse","type":"number","description":"Pulse in beats per minute (30-250). Mortality: 0.007678035*(pulse-120) when pulse<=120; 0 when pulse>120. Bleed uses 0.004167103*(pulse-120) with no truncation.","required":true,"example":70},{"in":"query","name":"diastolic_bp_mm_hg","type":"number","description":"Diastolic blood pressure in mm Hg (30-150). Mortality: -0.019304333*(dbp-80) when dbp<=80; 0 when dbp>80. Stroke: 0.01590016*(dbp-80) when dbp>80; 0 when dbp<=80.","required":true,"example":80},{"in":"query","name":"heart_failure","type":"boolean","description":"Caller-assigned heart failure (true or false). Mortality +0.693789082; stroke +0.233182644. magent does not diagnose heart failure.","required":true,"example":false},{"in":"query","name":"vascular_disease","type":"boolean","description":"Caller-assigned vascular disease (true or false). Mortality +0.306120964; stroke +0.197919709; bleed +0.168950627.","required":true,"example":false},{"in":"query","name":"prior_stroke","type":"boolean","description":"Caller-assigned prior stroke (true or false). Mortality +0.26585298; stroke +0.800863063.","required":true,"example":false},{"in":"query","name":"history_of_bleeding","type":"boolean","description":"Caller-assigned history of bleeding (true or false). Mortality +0.385407386; stroke +0.29883967; bleed +0.782237771.","required":true,"example":false},{"in":"query","name":"diabetes","type":"boolean","description":"Caller-assigned diabetes (true or false). Mortality +0.280133213; stroke +0.211995445; bleed +0.176898047.","required":true,"example":false},{"in":"query","name":"moderate_to_severe_ckd","type":"boolean","description":"Caller-assigned moderate-to-severe chronic kidney disease (true or false). Mortality +0.377903886; stroke +0.349516938; bleed +0.498686574. magent does not compute eGFR.","required":true,"example":false},{"in":"query","name":"dementia","type":"boolean","description":"Caller-assigned dementia (true or false). Mortality +0.489453313; stroke +0.513221391.","required":true,"example":false},{"in":"query","name":"current_smoking","type":"boolean","description":"Caller-assigned current smoking (true or false). Mortality +0.345481149; stroke +0.478831506.","required":true,"example":false},{"in":"query","name":"oac","type":"string","enum":["none","noac","vka"],"description":"Caller-assigned oral anticoagulant class: none, noac, or vka (mutually exclusive). NOAC and VKA enter as separate Fox 2017 terms. magent does not choose an anticoagulant.","required":true,"example":"none"},{"in":"query","name":"ethnicity","type":"string","enum":["white","hispanic_latino","asian","black_mixed_other"],"description":"Caller-assigned ethnicity using Fox 2017 / GARFIELD-AF terms. white (White/Caucasian) is the mortality reference (0); hispanic_latino +0.157023564; asian -0.609609055; black_mixed_other +0.375675102. Stroke and bleed have no ethnicity term. magent does not assign race or ethnicity.","required":true,"example":"white"},{"in":"query","name":"carotid_occlusive_disease","type":"boolean","description":"Caller-assigned carotid occlusive disease (true or false). Bleed +0.316245771. Mortality and stroke have no carotid term.","required":true,"example":false},{"in":"query","name":"antiplatelet","type":"boolean","description":"Caller-assigned antiplatelet therapy (true or false). Bleed +0.236620846. Mortality and stroke have no antiplatelet term. magent does not order antiplatelet therapy.","required":true,"example":false}],"errors":[{"code":"invalid_garfield_af","message":"GARFIELD-AF inputs must match Fox 2017 age, sex, weight, pulse, diastolic blood pressure, comorbidities, caller-assigned ethnicity, smoking, and oral anticoagulant class. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/garfield-af","citation":{"authors":"Fox KAA, Lucas JE, Pieper KS, et al.","doi":"10.1136/bmjopen-2017-017157","id":"fox-2017-garfield-af","pmid":"29273652","source":"BMJ Open. 2017;7(12):e017157","title":"Improved risk stratification of patients with atrial fibrillation: an integrated GARFIELD-AF tool for the prediction of mortality, stroke and bleed in patients with and without anticoagulation","url":"https://doi.org/10.1136/bmjopen-2017-017157"},"formula_expression":"mortality_1y_percent = 100*(1-0.962450119**exp(lp_mort)); lp_mort = 0.306202287*female + 0.693789082*heart_failure + 0.306120964*vascular_disease + 0.26585298*prior_stroke + 0.385407386*history_of_bleeding + 0.280133213*diabetes + 0.377903886*moderate_to_severe_ckd + 0.489453313*dementia + 0.345481149*current_smoking - 0.414591263*oac_noac - 0.18593561*oac_vka + 0.157023564*ethnicity_hispanic_latino - 0.609609055*ethnicity_asian + 0.375675102*ethnicity_black_mixed_other + 0.031050027*(age-65) if age<=65 + 0.064594824*(age-65) if age>65 - 0.021535182*(weight_kg-75) if weight_kg<=75 + 0.007678035*(pulse-120) if pulse<=120 - 0.019304333*(dbp-80) if dbp<=80; stroke_1y_percent = 100*(1-0.987574311**exp(lp_stroke)); lp_stroke = 0.233182644*heart_failure + 0.197919709*vascular_disease + 0.800863063*prior_stroke + 0.29883967*history_of_bleeding + 0.211995445*diabetes + 0.349516938*moderate_to_severe_ckd + 0.513221391*dementia + 0.478831506*current_smoking - 0.572199357*oac_noac - 0.352373263*oac_vka + 0.039138147*(age-65) + 0.01590016*(dbp-80) if dbp>80; bleed_1y_percent = 100*(1-0.991720115**exp(lp_bleed)); lp_bleed = 0.168950627*vascular_disease + 0.782237771*history_of_bleeding + 0.316245771*carotid_occlusive_disease + 0.498686574*moderate_to_severe_ckd + 0.24232543*oac_noac + 0.609713354*oac_vka + 0.236620846*antiplatelet + 0.176898047*diabetes + 0.043476276*(age-65) + 0.004167103*(pulse-120); Fox 2017 / GARFIELD-AF 1-year equations; White/Caucasian ethnicity reference 0; magent does not assign race or ethnicity","purpose":"Compute the Fox 2017 GARFIELD-AF 1-year all-cause mortality, ischaemic stroke/systemic embolism, and major bleed percents from age, sex, weight, pulse, diastolic blood pressure, comorbidities, smoking, caller-assigned ethnicity, oral anticoagulant class, carotid occlusive disease, and antiplatelet therapy.","markdown_url":"https://magentlab.com/docs/garfield-af.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"garfield_af"},{"name":"formula_expression","type":"string","description":"Fox 2017 / GARFIELD-AF 1-year mortality, stroke, and bleed equations"},{"name":"age","type":"integer","description":"Input age in years"},{"name":"sex","type":"string","description":"female or male used"},{"name":"weight_kg","type":"number","description":"Input weight in kg"},{"name":"pulse","type":"number","description":"Input pulse in beats per minute"},{"name":"diastolic_bp_mm_hg","type":"number","description":"Input diastolic blood pressure in mm Hg"},{"name":"heart_failure","type":"boolean","description":"Caller-assigned heart failure"},{"name":"vascular_disease","type":"boolean","description":"Caller-assigned vascular disease"},{"name":"prior_stroke","type":"boolean","description":"Caller-assigned prior stroke"},{"name":"history_of_bleeding","type":"boolean","description":"Caller-assigned history of bleeding"},{"name":"diabetes","type":"boolean","description":"Caller-assigned diabetes"},{"name":"moderate_to_severe_ckd","type":"boolean","description":"Caller-assigned moderate-to-severe CKD"},{"name":"dementia","type":"boolean","description":"Caller-assigned dementia"},{"name":"current_smoking","type":"boolean","description":"Caller-assigned current smoking"},{"name":"oac","type":"string","description":"none, noac, or vka used"},{"name":"ethnicity","type":"string","description":"Caller-assigned Fox 2017 ethnicity token used"},{"name":"carotid_occlusive_disease","type":"boolean","description":"Caller-assigned carotid occlusive disease"},{"name":"antiplatelet","type":"boolean","description":"Caller-assigned antiplatelet therapy"},{"name":"mortality_lp","type":"number","description":"Unrounded all-cause mortality linear predictor, 8 decimals"},{"name":"mortality_1y_percent","type":"number","description":"1-year all-cause mortality percent from the unrounded LP and S0=0.962450119, 1 decimal. Not an anticoagulation order."},{"name":"stroke_lp","type":"number","description":"Unrounded ischaemic stroke/SE linear predictor, 8 decimals"},{"name":"stroke_1y_percent","type":"number","description":"1-year ischaemic stroke/systemic embolism percent from S0=0.987574311, 1 decimal. Not CHA2DS2-VASc."},{"name":"bleed_lp","type":"number","description":"Unrounded major-bleed linear predictor, 8 decimals"},{"name":"bleed_1y_percent","type":"number","description":"1-year major bleed (including haemorrhagic stroke) percent from S0=0.991720115, 1 decimal. Not HAS-BLED."},{"name":"citation","type":"object","description":"Fox 2017 GARFIELD-AF citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"65","antiplatelet":"false","carotid_occlusive_disease":"false","current_smoking":"false","dementia":"false","diabetes":"false","diastolic_bp_mm_hg":"80","ethnicity":"white","heart_failure":"false","history_of_bleeding":"false","moderate_to_severe_ckd":"false","oac":"none","prior_stroke":"false","pulse":"70","sex":"male","vascular_disease":"false","weight_kg":"75"},{"age":"65","antiplatelet":"false","carotid_occlusive_disease":"false","current_smoking":"false","dementia":"false","diabetes":"false","diastolic_bp_mm_hg":"80","ethnicity":"white","heart_failure":"false","history_of_bleeding":"false","moderate_to_severe_ckd":"false","oac":"none","prior_stroke":"false","pulse":"70","sex":"male","vascular_disease":"false","weight_kg":"75"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/garfield-af","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/garfield-af?age=65&sex=male&weight_kg=75&pulse=70&diastolic_bp_mm_hg=80&heart_failure=false&vascular_disease=false&prior_stroke=false&history_of_bleeding=false&diabetes=false&moderate_to_severe_ckd=false&dementia=false&current_smoking=false&oac=none&ethnicity=white&carotid_occlusive_disease=false&antiplatelet=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/garfield-af","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/timi-stemi","description":"TIMI risk score for ST-elevation MI from age, diabetes/hypertension/angina, systolic BP, heart rate, Killip class, weight, anterior STE or LBBB, and time to treatment. Returns a 0-14 point total with components. Deterministic published score with citation; not a reperfusion or fibrinolytic protocol.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). 65-74 scores 2; ≥75 scores 3. Bands are exclusive.","required":true,"example":"50"},{"in":"query","name":"diabetes","type":"boolean","description":"Diabetes mellitus. true or false. Diabetes, hypertension, or angina scores 1 if any is true.","required":true,"example":"false"},{"in":"query","name":"hypertension","type":"boolean","description":"Hypertension history. true or false.","required":true,"example":"false"},{"in":"query","name":"angina","type":"boolean","description":"Angina history. true or false.","required":true,"example":"false"},{"in":"query","name":"systolic_mm_hg","type":"number","description":"Systolic BP in mm Hg (50-250). Scores 3 when <100; 100 is negative.","required":true,"example":"120"},{"in":"query","name":"heart_rate_bpm","type":"integer","description":"Heart rate in beats per minute (integer 30-220). Scores 2 when >100; 100 is negative.","required":true,"example":"70"},{"in":"query","name":"killip_class","type":"integer","description":"Killip class 1-4. Classes II-IV score 2; class I scores 0. Caller-assigned.","required":true,"example":"1"},{"in":"query","name":"weight_kg","type":"number","description":"Weight in kilograms. Provide weight_kg or weight_lb. Scores 1 when <67 kg; 67 is negative.","required":false,"example":"80"},{"in":"query","name":"weight_lb","type":"number","description":"Weight in pounds. Converted to kg; the <67 kg cutoff is applied in kg.","required":false,"example":"176"},{"in":"query","name":"anterior_ste_or_lbbb","type":"boolean","description":"Anterior ST elevation or LBBB. true or false. Caller-assigned; magent does not read tracings.","required":true,"example":"false"},{"in":"query","name":"time_to_treatment_gt_4h","type":"boolean","description":"Time to treatment >4 hours. true or false. Caller-assigned; magent does not parse timestamps.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_systolic_bp","message":"systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.","status":400},{"code":"invalid_heart_rate","message":"heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.","status":400},{"code":"invalid_killip_class","message":"killip_class must be 1, 2, 3, or 4. Returned before settlement; you are not charged.","status":400},{"code":"invalid_weight","message":"weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/timi-stemi","citation":{"authors":"Morrow DA, Antman EM, Charlesworth A, Cairns R, Murphy SA, de Lemos JA, Giugliano RP, McCabe CH, Braunwald E","doi":"10.1161/01.CIR.102.17.2031","id":"morrow-2000","source":"Circulation. 2000;102(17):2031-2037","title":"TIMI risk score for ST-elevation myocardial infarction: A convenient, bedside, clinical score for risk assessment at presentation","url":"https://doi.org/10.1161/01.CIR.102.17.2031"},"formula_expression":"TIMI STEMI = age 65-74 (2) or age >=75 (3) + diabetes/hypertension/angina (1) + SBP<100 (3) + HR>100 (2) + Killip II-IV (2) + weight<67 kg (1) + anterior STE or LBBB (1) + time to treatment >4 h (1); max 14","purpose":"Compute the TIMI risk score for ST-elevation myocardial infarction from published bedside factors at presentation.","markdown_url":"https://magentlab.com/docs/timi-stemi.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"timi_stemi"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Total points 0-14"},{"name":"max_score","type":"integer","description":"Always 14"},{"name":"age_years","type":"integer","description":"Age used for the 65-74 and ≥75 bands"},{"name":"diabetes","type":"boolean","description":"Diabetes flag used"},{"name":"hypertension","type":"boolean","description":"Hypertension flag used"},{"name":"angina","type":"boolean","description":"Angina flag used"},{"name":"history_cad_risk","type":"boolean","description":"true when diabetes, hypertension, or angina is true"},{"name":"systolic_mm_hg","type":"number","description":"Systolic BP used for the <100 cutoff"},{"name":"heart_rate_bpm","type":"integer","description":"Heart rate used for the >100 cutoff"},{"name":"killip_class","type":"integer","description":"Killip class 1-4 used"},{"name":"weight_kg","type":"number","description":"Normalized weight in kg"},{"name":"anterior_ste_or_lbbb","type":"boolean","description":"Anterior STE or LBBB flag used"},{"name":"time_to_treatment_gt_4h","type":"boolean","description":"Time to treatment >4 hours flag used"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Circulation 2000 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"50","angina":"false","anterior_ste_or_lbbb":"false","diabetes":"false","heart_rate_bpm":"70","hypertension":"false","killip_class":"1","systolic_mm_hg":"120","time_to_treatment_gt_4h":"false","weight_kg":"80"},{"age":"50","angina":"false","anterior_ste_or_lbbb":"false","diabetes":"false","heart_rate_bpm":"70","hypertension":"false","killip_class":"1","systolic_mm_hg":"120","time_to_treatment_gt_4h":"false","weight_kg":"80"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/timi-stemi","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/timi-stemi?age=50&diabetes=false&hypertension=false&angina=false&systolic_mm_hg=120&heart_rate_bpm=70&killip_class=1&weight_kg=80&anterior_ste_or_lbbb=false&time_to_treatment_gt_4h=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/timi-stemi","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/timi-ua-nstemi","description":"TIMI risk score for unstable angina / NSTEMI from age and six caller-assigned flags. Returns the 0-7 point total and components. Deterministic published score with citation; not an invasive-strategy protocol.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Age ≥65 scores 1.","required":true,"example":"50"},{"in":"query","name":"cad_risk_factors_ge_3","type":"boolean","description":"≥3 CAD risk factors as assigned by the caller. true or false. magent does not expand smoking, hypertension, family history, diabetes, or cholesterol.","required":true,"example":"false"},{"in":"query","name":"known_cad","type":"boolean","description":"Known CAD (stenosis ≥50%). true or false.","required":true,"example":"false"},{"in":"query","name":"aspirin_last_7d","type":"boolean","description":"Aspirin use in the last 7 days. true or false.","required":true,"example":"false"},{"in":"query","name":"severe_angina","type":"boolean","description":"Severe angina (≥2 episodes in 24 hours). true or false.","required":true,"example":"false"},{"in":"query","name":"st_deviation","type":"boolean","description":"ST deviation ≥0.5 mm as assigned by the caller. true or false. magent does not read ECGs.","required":true,"example":"false"},{"in":"query","name":"elevated_markers","type":"boolean","description":"Elevated cardiac markers as assigned by the caller. true or false.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/timi-ua-nstemi","citation":{"authors":"Antman EM, Cohen M, Bernink PJLM, et al.","doi":"10.1001/jama.284.7.835","id":"antman-2000","source":"JAMA. 2000;284(7):835-842","title":"The TIMI risk score for unstable angina/non–ST elevation MI: A method for prognostication and therapeutic decision making","url":"https://doi.org/10.1001/jama.284.7.835"},"formula_expression":"TIMI UA/NSTEMI = age_ge_65 + cad_risk_factors_ge_3 + known_cad + aspirin_last_7d + severe_angina + st_deviation + elevated_markers; each 1 if present; max 7","purpose":"Compute the TIMI risk score for unstable angina / NSTEMI from age and six caller-assigned flags.","markdown_url":"https://magentlab.com/docs/timi-ua-nstemi.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"timi_ua_nstemi"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Total points 0-7"},{"name":"max_score","type":"integer","description":"Always 7"},{"name":"age_years","type":"integer","description":"Age used for the ≥65 criterion"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"JAMA 2000 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"50","aspirin_last_7d":"false","cad_risk_factors_ge_3":"false","elevated_markers":"false","known_cad":"false","severe_angina":"false","st_deviation":"false"},{"age":"50","aspirin_last_7d":"false","cad_risk_factors_ge_3":"false","elevated_markers":"false","known_cad":"false","severe_angina":"false","st_deviation":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/timi-ua-nstemi","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/timi-ua-nstemi?age=50&cad_risk_factors_ge_3=false&known_cad=false&aspirin_last_7d=false&severe_angina=false&st_deviation=false&elevated_markers=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/timi-ua-nstemi","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/heart","description":"HEART score for emergency chest pain from age and caller-assigned history, ECG, risk factors, and troponin (each 0-2, max 10). Bands 0-3, 4-6, and 7-10 from Six 2008. Deterministic published score with citation; not a diagnosis or discharge protocol. magent does not read an ECG.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Younger than 45 scores 0; 45-64 scores 1; 65 or older scores 2.","required":true,"example":"40"},{"in":"query","name":"history","type":"integer","description":"Caller-assigned history. 0 nonspecific, 1 moderately suspicious, 2 highly suspicious. magent does not interpret the history.","required":true,"example":"0"},{"in":"query","name":"ecg","type":"integer","description":"Caller-assigned ECG. 0 normal; 1 repolarization without significant ST depression (including BBB, LVH, digoxin, or known unchanged); 2 significant ST depression or elevation without those confounders. magent does not read an ECG.","required":true,"example":"0"},{"in":"query","name":"risk_factors","type":"integer","description":"Caller-assigned risk-factor points. 0 none, 1 = 1-2 risk factors, 2 = ≥3 or atherosclerotic disease. magent does not count diabetes, smoking, or other factors.","required":true,"example":"0"},{"in":"query","name":"troponin","type":"integer","description":"Caller-assigned troponin. 0 ≤ULN, 1 = 1-2× ULN, 2 = >2× ULN (Six 2008). magent does not interpret assays.","required":true,"example":"0"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_heart_component","message":"history, ecg, risk_factors, and troponin must each be 0, 1, or 2. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/heart","citation":{"authors":"Six AJ, Backus BE, Kelder JC","doi":"10.1007/BF03086144","id":"six-2008","source":"Neth Heart J. 2008;16(6):191-196","title":"Chest pain in the emergency room: value of the HEART score","url":"https://doi.org/10.1007/BF03086144"},"formula_expression":"HEART = history + ECG + age + risk_factors + troponin; each 0-2; age <45 0, 45-64 1, >=65 2; bands 0-3 / 4-6 / 7-10; max 10","purpose":"Compute the HEART score as age points plus caller-assigned history, ECG, risk factors, and troponin (each 0-2).","markdown_url":"https://magentlab.com/docs/heart.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"heart"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Total points 0-10"},{"name":"max_score","type":"integer","description":"Always 10"},{"name":"heart_band","type":"string","description":"0-3, 4-6, or 7-10 (Six 2008)"},{"name":"age_years","type":"integer","description":"Age used for the <45 / 45-64 / ≥65 bands"},{"name":"components","type":"array","description":"Per-factor 0-2 points"},{"name":"citation","type":"object","description":"Six 2008 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"40","ecg":"0","history":"0","risk_factors":"0","troponin":"0"},{"age":"40","ecg":"0","history":"0","risk_factors":"0","troponin":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/heart","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/heart?age=40&history=0&ecg=0&risk_factors=0&troponin=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/heart","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/hear","description":"HEAR score for emergency chest pain from age and caller-assigned history, ECG, and risk factors (each 0-2, max 8). No troponin. Smith 2020 very-low-risk group is scores 0 and 1 (MACE ~0.9% in that paper). Deterministic published score with citation; not a diagnosis or discharge protocol. magent does not interpret history, count risk factors, or read an ECG.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Younger than 45 scores 0; 45-64 scores 1; 65 or older scores 2 (same cuts as Six 2008 HEART).","required":true,"example":"40"},{"in":"query","name":"history","type":"integer","description":"Caller-assigned history. 0 nonspecific, 1 moderately suspicious, 2 highly suspicious. magent does not interpret the history.","required":true,"example":"0"},{"in":"query","name":"ecg","type":"integer","description":"Caller-assigned ECG. 0 normal; 1 repolarization without significant ST depression (including BBB, LVH, digoxin, or known unchanged); 2 significant ST depression or elevation without those confounders. magent does not read an ECG.","required":true,"example":"0"},{"in":"query","name":"risk_factors","type":"integer","description":"Caller-assigned risk-factor points. 0 none, 1 = 1-2 risk factors, 2 = ≥3 or atherosclerotic disease. magent does not count diabetes, smoking, or other factors.","required":true,"example":"0"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_hear","message":"HEAR inputs must match Smith 2020 history, ECG, age, and risk-factor components from that paper. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/hear","citation":{"authors":"Smith LM, Ashburn NP, Snavely AC, Mahler SA","doi":"10.1136/emermed-2020-209698","id":"smith-2020","pmid":"32753395","source":"Emerg Med J. 2020;37(11):690-695","title":"Identification of very low-risk acute chest pain patients without troponin testing","url":"https://doi.org/10.1136/emermed-2020-209698"},"formula_expression":"HEAR = history + ECG + age_points + risk_factors; each 0-2; age <45 0, 45-64 1, >=65 2; very_low_risk iff score 0 or 1 (Smith 2020); max 8","purpose":"Compute the HEAR score as age points plus caller-assigned history, ECG, and risk factors (each 0-2). No troponin.","markdown_url":"https://magentlab.com/docs/hear.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"hear"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Total points 0-8"},{"name":"max_score","type":"integer","description":"Always 8"},{"name":"very_low_risk","type":"boolean","description":"true when score is 0 or 1 (Smith 2020 very-low-risk group; MACE ~0.9% in that paper). false when score is 2-8. Not HEART bands 0-3 / 4-6 / 7-10."},{"name":"age_years","type":"integer","description":"Age used for the <45 / 45-64 / ≥65 bands"},{"name":"components","type":"array","description":"Per-factor 0-2 points"},{"name":"citation","type":"object","description":"Smith 2020 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"40","ecg":"0","history":"0","risk_factors":"0"},{"age":"40","ecg":"0","history":"0","risk_factors":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/hear","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/hear?age=40&history=0&ecg=0&risk_factors=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/hear","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/heart-pathway","description":"Mahler 2015 HEART Pathway for emergency chest pain. early_discharge_candidate is true only when the caller-assigned HEART score is 0-3 and both 0-hour and 3-hour troponin flags are not elevated (above the 99th percentile). HEART items are not assigned here. magent does not read an ECG or assay a troponin. Does not order a stress test or angiogram. High-risk features do not mandate a test. Not a medical device and not a diagnosis.","parameters":[{"in":"query","name":"heart_score","type":"integer","description":"Caller-assigned HEART score integer 0-10 (Six 2008 components already summed by the caller). magent does not assign history, ECG, age, risk-factor, or troponin HEART items. Early discharge requires 0-3 when both serial troponin flags are false.","required":true,"example":"2"},{"in":"query","name":"troponin_0_elevated","type":"boolean","description":"0-hour troponin above the 99th percentile threshold as assigned by the caller. true or false. true blocks early discharge. magent does not assay a troponin.","required":true,"example":"false"},{"in":"query","name":"troponin_3h_elevated","type":"boolean","description":"3-hour troponin above the 99th percentile threshold as assigned by the caller. true or false. true blocks early discharge. magent does not assay a troponin.","required":true,"example":"false"}],"errors":[{"code":"invalid_heart_score","message":"heart_score must be an integer from 0 to 10. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/heart-pathway","citation":{"authors":"Mahler SA, Riley RF, Hiestand BC, Russell GB, Hoekstra JW, Lefebvre CW, Nicks BA, Cline DM, Askew KL, Elliott SB, Herrington DM, Burke GL, Miller CD","doi":"10.1161/CIRCOUTCOMES.114.001384","id":"mahler-2015","pmid":"25737484","source":"Circ Cardiovasc Qual Outcomes. 2015;8(2):195-203","title":"The HEART Pathway randomized trial: identifying emergency department patients with acute chest pain for early discharge","url":"https://doi.org/10.1161/CIRCOUTCOMES.114.001384"},"formula_expression":"early_discharge_candidate iff heart_score <= 3 and troponin_0_elevated is false and troponin_3h_elevated is false; heart_score is the caller-assigned Six 2008 HEART total 0-10; troponin flags are caller-assigned above the 99th percentile at 0 and 3 hours (Mahler 2015)","purpose":"Apply the Mahler 2015 HEART Pathway and return whether a caller-assigned HEART score plus 0-hour and 3-hour troponin flags meet the published early-discharge rule.","markdown_url":"https://magentlab.com/docs/heart-pathway.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"heart_pathway"},{"name":"formula_expression","type":"string","description":"Mahler 2015 HEART Pathway early-discharge rule"},{"name":"heart_score","type":"integer","description":"Echo of the caller-assigned HEART total 0-10"},{"name":"troponin_0_elevated","type":"boolean","description":"Echo of the caller-assigned 0-hour 99th-percentile flag"},{"name":"troponin_3h_elevated","type":"boolean","description":"Echo of the caller-assigned 3-hour 99th-percentile flag"},{"name":"early_discharge_candidate","type":"boolean","description":"true only when heart_score is 0-3 and both serial troponin flags are false. Not a discharge order or diagnosis."},{"name":"components","type":"array","description":"Rows for heart_score_le_3, trop0_not_elevated, and trop3h_not_elevated with factor, met, and value"},{"name":"citation","type":"object","description":"Mahler 2015 Circ Cardiovasc Qual Outcomes citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"heart_score":"2","troponin_0_elevated":"false","troponin_3h_elevated":"false"},{"heart_score":"2","troponin_0_elevated":"false","troponin_3h_elevated":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/heart-pathway","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/heart-pathway?heart_score=2&troponin_0_elevated=false&troponin_3h_elevated=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/heart-pathway","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/adapt","description":"Than 2012 ADAPT 2-hour accelerated diagnostic protocol for emergency chest pain. low_risk is true only when the caller-assigned TIMI UA/NSTEMI score is 0, new ischemic ECG changes are absent, and both 0-hour and 2-hour (not 3-hour) troponin flags are not elevated. magent does not assign TIMI items, read an ECG, or assay troponin. Not HEART Pathway. Not a discharge order, ACS diagnosis, or stress-test order. Not a medical device.","parameters":[{"in":"query","name":"timi_score","type":"integer","description":"Caller-assigned TIMI UA/NSTEMI score integer 0-7 (Antman 2000 components already summed by the caller). magent does not assign TIMI items. Low-risk (ADP-negative) requires 0 when the ECG and both 2-hour serial troponin flags are false.","required":true,"example":"0"},{"in":"query","name":"new_ischemic_ecg","type":"boolean","description":"New ischemic changes on the initial ECG (not known to be pre-existing), as assigned by the caller. true or false. true blocks low-risk. magent does not read an ECG.","required":true,"example":"false"},{"in":"query","name":"troponin_0_elevated","type":"boolean","description":"0-hour cTnI at or above the institutional cutoff as assigned by the caller. true or false. true blocks low-risk. magent does not assay troponin.","required":true,"example":"false"},{"in":"query","name":"troponin_2h_elevated","type":"boolean","description":"2-hour (not 3-hour) troponin at or above the institutional cutoff as assigned by the caller. true or false. true blocks low-risk. magent does not assay troponin.","required":true,"example":"false"}],"errors":[{"code":"invalid_timi_score","message":"timi_score must be an integer from 0 to 7 (caller-assigned Antman 2000 TIMI UA/NSTEMI total as used in Than 2012 ADAPT). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/adapt","citation":{"authors":"Than M, Cullen L, Aldous S, Parsonage WA, Reid CM, Greenslade J, et al.","doi":"10.1016/j.jacc.2012.02.035","id":"than-2012","pmid":"22578923","source":"J Am Coll Cardiol. 2012;59(23):2091-2098","title":"2-Hour accelerated diagnostic protocol to assess patients with chest pain symptoms using contemporary troponins as the only biomarker: the ADAPT trial","url":"https://doi.org/10.1016/j.jacc.2012.02.035"},"formula_expression":"low_risk iff timi_score == 0 and new_ischemic_ecg is false and troponin_0_elevated is false and troponin_2h_elevated is false; timi_score is the caller-assigned Antman 2000 TIMI UA/NSTEMI total 0-7; ECG and troponin flags are caller-assigned (Than 2012 ADAPT Table 1)","purpose":"Apply the Than 2012 ADAPT 2-hour accelerated diagnostic protocol and return whether a caller-assigned TIMI UA/NSTEMI score plus initial ECG and 0-hour/2-hour troponin flags meet the published ADP-negative (low-risk) rule.","markdown_url":"https://magentlab.com/docs/adapt.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"adapt"},{"name":"formula_expression","type":"string","description":"Than 2012 ADAPT 2-hour accelerated diagnostic protocol"},{"name":"timi_score","type":"integer","description":"Echo of the caller-assigned TIMI UA/NSTEMI total 0-7"},{"name":"new_ischemic_ecg","type":"boolean","description":"Echo of the caller-assigned new ischemic ECG flag"},{"name":"troponin_0_elevated","type":"boolean","description":"Echo of the caller-assigned 0-hour institutional-cutoff flag"},{"name":"troponin_2h_elevated","type":"boolean","description":"Echo of the caller-assigned 2-hour institutional-cutoff flag"},{"name":"low_risk","type":"boolean","description":"true only when timi_score is 0, new_ischemic_ecg is false, and both 0-hour and 2-hour troponin flags are false. Not a discharge order or diagnosis."},{"name":"components","type":"array","description":"Rows for timi_score_eq_0, no_new_ischemic_ecg, trop0_not_elevated, and trop2h_not_elevated with factor, met, and value"},{"name":"citation","type":"object","description":"Than 2012 J Am Coll Cardiol citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"new_ischemic_ecg":"false","timi_score":"0","troponin_0_elevated":"false","troponin_2h_elevated":"false"},{"new_ischemic_ecg":"false","timi_score":"0","troponin_0_elevated":"false","troponin_2h_elevated":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/adapt","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/adapt?timi_score=0&new_ischemic_ecg=false&troponin_0_elevated=false&troponin_2h_elevated=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/adapt","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/vancouver-chest-pain","description":"Christenson 2006 Vancouver Chest Pain Rule. early_discharge_eligible is true when the initial ECG is not abnormal, 2-hour troponin is not elevated, there is no prior ACS or nitrate use, and either palpation reproduces pain or age is under 40 without radiation to neck, arm, or jaw. Age 40 is not the age-history path. magent does not interpret ECGs or assay troponin. Not the 2014 age-50 variant. Not a medical device and not a discharge order.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (integer 18-120). The 2006 age-history path requires age under 40 when palpation does not reproduce pain. Age 40 is not that path (Christenson 2006; not the later age-50 cutoff).","required":true,"example":"35"},{"in":"query","name":"abnormal_initial_ecg","type":"boolean","description":"Caller-assigned abnormal initial ECG as used in Christenson 2006 (true blocks early discharge). T-wave flattening was the only acceptable ST-T abnormality in that paper. true or false. magent does not interpret an ECG.","required":true,"example":"false"},{"in":"query","name":"troponin_2h_elevated","type":"boolean","description":"Caller-assigned 2-hour troponin at or above the institutional cutoff. true or false. true blocks early discharge. magent does not assay troponin or CK-MB.","required":true,"example":"false"},{"in":"query","name":"prior_acs_or_nitrate","type":"boolean","description":"Prior ACS (MI or angina) or nitrate use as assigned by the caller (Christenson 2006 prior ischemic chest pain / nitroglycerin node). true or false. true blocks early discharge.","required":true,"example":"false"},{"in":"query","name":"palpation_reproduces_pain","type":"boolean","description":"Chest pain reproduced by palpation as assigned by the caller. true or false. When ECG, 2-hour troponin, and prior ACS/nitrate are clear, true is early-discharge eligible regardless of age or radiation. magent does not palpate the chest.","required":true,"example":"false"},{"in":"query","name":"pain_radiates_neck_jaw_arm","type":"boolean","description":"Pain radiates to neck, arm, or jaw as assigned by the caller (Christenson 2006). true or false. On the age-history path (palpation false), true blocks early discharge. magent does not take a pain history.","required":true,"example":"false"}],"errors":[{"code":"invalid_vancouver_chest_pain","message":"Vancouver Chest Pain Rule inputs must match Christenson 2006 early-discharge tree nodes from that paper only. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/vancouver-chest-pain","citation":{"authors":"Christenson J, Innes G, McKnight D, et al.","doi":"10.1016/j.annemergmed.2005.08.007","id":"christenson-2006","pmid":"16387209","source":"Ann Emerg Med. 2006;47(1):1-10","title":"A clinical prediction rule for early discharge of patients with chest pain","url":"https://doi.org/10.1016/j.annemergmed.2005.08.007"},"formula_expression":"early_discharge_eligible iff not abnormal_initial_ecg and not troponin_2h_elevated and not prior_acs_or_nitrate and (palpation_reproduces_pain or (age < 40 and not pain_radiates_neck_jaw_arm)); age 40 is not the age-history path (Christenson 2006 derivation tree; not Cullen 2014 / Scheuermeyer 2014 age 50)","purpose":"Apply the Christenson 2006 Vancouver Chest Pain Rule derivation tree and return whether caller-assigned ECG, 2-hour troponin, prior ACS or nitrate, palpation, age, and radiation nodes are early-discharge eligible.","markdown_url":"https://magentlab.com/docs/vancouver-chest-pain.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"vancouver_chest_pain"},{"name":"formula_expression","type":"string","description":"Christenson 2006 Vancouver Chest Pain Rule derivation tree"},{"name":"early_discharge_eligible","type":"boolean","description":"true when the 2006 tree is early-discharge eligible. Not a discharge order or ACS diagnosis."},{"name":"age_years","type":"integer","description":"Age in years used for the age < 40 age-history path"},{"name":"abnormal_initial_ecg","type":"boolean","description":"Echo of the caller-assigned abnormal initial ECG flag"},{"name":"troponin_2h_elevated","type":"boolean","description":"Echo of the caller-assigned 2-hour troponin flag"},{"name":"prior_acs_or_nitrate","type":"boolean","description":"Echo of the caller-assigned prior ACS or nitrate flag"},{"name":"palpation_reproduces_pain","type":"boolean","description":"Echo of the caller-assigned palpation-reproduces-pain flag"},{"name":"pain_radiates_neck_jaw_arm","type":"boolean","description":"Echo of the caller-assigned radiation-to-neck-arm-or-jaw flag"},{"name":"criteria","type":"array","description":"Rows for normal_initial_ecg, troponin_2h_not_elevated, no_prior_acs_or_nitrate, and palpation_or_age_history with factor, met, and value. early_discharge_eligible iff all are met."},{"name":"citation","type":"object","description":"Christenson et al. Ann Emerg Med 2006 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"abnormal_initial_ecg":"false","age":"35","pain_radiates_neck_jaw_arm":"false","palpation_reproduces_pain":"false","prior_acs_or_nitrate":"false","troponin_2h_elevated":"false"},{"abnormal_initial_ecg":"false","age":"35","pain_radiates_neck_jaw_arm":"false","palpation_reproduces_pain":"false","prior_acs_or_nitrate":"false","troponin_2h_elevated":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/vancouver-chest-pain","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/vancouver-chest-pain?age=35&abnormal_initial_ecg=false&troponin_2h_elevated=false&prior_acs_or_nitrate=false&palpation_reproduces_pain=false&pain_radiates_neck_jaw_arm=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/vancouver-chest-pain","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/t-macs","description":"Body 2016 T-MACS logistic ACS probability from caller-assigned ECG ischaemia, worsening angina, right-arm radiation, vomiting, observed sweating, hypotension (SBP <100), and Roche Elecsys hs-cTnT ng/L. Uses that paper's rounded coefficients. Bands p<0.02 very_low, 0.02<=p<0.05 low, 0.05<=p<0.95 moderate, p>=0.95 high. magent does not interpret ECG or assay troponin. Not original MACS, HEART, EDACS, or Vancouver. Not a diagnosis or medical device.","parameters":[{"in":"query","name":"ecg_ischaemia","type":"boolean","description":"Caller-assigned ECG ischaemia as used in Body 2016 (E; 1 if true, 0 if false). magent does not interpret an ECG.","required":true,"example":"false"},{"in":"query","name":"worsening_angina","type":"boolean","description":"Worsening or crescendo angina as assigned by the caller (A): anginal pain with increasing frequency, occurring with less exertion, or becoming more prolonged (Body 2016). true or false.","required":true,"example":"false"},{"in":"query","name":"pain_radiation_right_arm_or_shoulder","type":"boolean","description":"Pain radiating to the right arm or shoulder as assigned by the caller (R; Body 2016). true or false. magent does not take a pain history.","required":true,"example":"false"},{"in":"query","name":"vomiting","type":"boolean","description":"Vomiting in association with the presenting symptoms as assigned by the caller (V; Body 2016). true or false.","required":true,"example":"false"},{"in":"query","name":"sweating_observed","type":"boolean","description":"Sweating observed by the treating clinician as assigned by the caller (S; Body 2016). true or false. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"hypotension","type":"boolean","description":"Hypotension as assigned by the caller (H): systolic BP <100 mm Hg on arrival (Body 2016, dichotomised as in that paper). true or false.","required":true,"example":"false"},{"in":"query","name":"hs_ctnt_ng_l","type":"number","description":"Roche Diagnostics Elecsys high-sensitivity cardiac troponin T on arrival in ng/L (T; 0-100000, implementation clamp). Continuous linear predictor in Body 2016. magent does not convert units or assay troponin.","required":true,"example":"3"}],"errors":[{"code":"invalid_t_macs","message":"T-MACS inputs must match Body 2016 dichotomous predictors and Roche hs-cTnT ng/L from that paper. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/t-macs","citation":{"authors":"Body R, Carlton E, Sperrin M, et al.","doi":"10.1136/emermed-2016-205983","id":"body-2016","pmid":"27565197","source":"Emerg Med J. 2017;34(6):349-356","title":"Troponin-only Manchester Acute Coronary Syndromes (T-MACS) decision aid: single biomarker re-derivation and external validation in three cohorts","url":"https://doi.org/10.1136/emermed-2016-205983"},"formula_expression":"p = 1/(1+e^(-λ)); λ = 1.713*E + 0.847*A + 0.607*R + 1.417*V + 2.058*S + 1.208*H + 0.089*T - 4.766; E ECG ischaemia 0/1; A worsening/crescendo angina 0/1; R right-arm/shoulder radiation 0/1; V vomiting 0/1; S sweating observed 0/1; H hypotension SBP<100 0/1; T Roche Elecsys hs-cTnT ng/L; very_low p<0.02, low 0.02<=p<0.05, moderate 0.05<=p<0.95, high p>=0.95 (Body 2016 rounded coefficients; paper writes 0.02<p<0.05 and 0.05<p<0.95)","purpose":"Compute the Body 2016 Troponin-only Manchester Acute Coronary Syndromes (T-MACS) logistic probability of ACS from caller-assigned ECG ischaemia, worsening angina, right-arm or shoulder radiation, vomiting, observed sweating, hypotension, and Roche Elecsys hs-cTnT in ng/L.","markdown_url":"https://magentlab.com/docs/t-macs.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"t_macs"},{"name":"formula_expression","type":"string","description":"Body 2016 rounded T-MACS logistic expression"},{"name":"ecg_ischaemia","type":"boolean","description":"Caller-assigned ECG ischaemia used as E"},{"name":"worsening_angina","type":"boolean","description":"Caller-assigned worsening/crescendo angina used as A"},{"name":"pain_radiation_right_arm_or_shoulder","type":"boolean","description":"Caller-assigned right-arm or shoulder radiation used as R"},{"name":"vomiting","type":"boolean","description":"Caller-assigned vomiting used as V"},{"name":"sweating_observed","type":"boolean","description":"Caller-assigned observed sweating used as S"},{"name":"hypotension","type":"boolean","description":"Caller-assigned hypotension (SBP <100 mm Hg) used as H"},{"name":"hs_ctnt_ng_l","type":"number","description":"Roche Elecsys hs-cTnT used as T, in ng/L"},{"name":"linear_predictor","type":"number","description":"Body 2016 λ from the rounded coefficients, 4 decimals"},{"name":"probability","type":"number","description":"p = 1/(1+e^(-λ)) on 0-1, 4 decimals. Banded on unrounded p."},{"name":"t_macs_band","type":"string","description":"very_low (p<0.02, ACS ruled out in that paper), low (0.02≤p<0.05), moderate (0.05≤p<0.95), or high (p≥0.95, ACS ruled in). Not a diagnosis."},{"name":"citation","type":"object","description":"Body 2016/2017 EMJ citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"ecg_ischaemia":"false","hs_ctnt_ng_l":"3","hypotension":"false","pain_radiation_right_arm_or_shoulder":"false","sweating_observed":"false","vomiting":"false","worsening_angina":"false"},{"ecg_ischaemia":"false","hs_ctnt_ng_l":"3","hypotension":"false","pain_radiation_right_arm_or_shoulder":"false","sweating_observed":"false","vomiting":"false","worsening_angina":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/t-macs","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/t-macs?ecg_ischaemia=false&worsening_angina=false&pain_radiation_right_arm_or_shoulder=false&vomiting=false&sweating_observed=false&hypotension=false&hs_ctnt_ng_l=3","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/t-macs","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/macs","description":"Body 2014 MACS ACS probability from caller-assigned ECG ischaemia, worsening angina, right-arm radiation, vomiting, observed sweating, hypotension (SBP <100), Roche hs-cTnT ng/L, and ELISA H-FABP ng/mL. Table 2 rounded coefficients. Bands p<0.02 very_low, 0.02<=p<0.05 low, 0.05<=p<0.95 moderate, p>=0.95 high. magent does not interpret ECG or assay biomarkers. Not T-MACS, HEART, or EDACS. Not a diagnosis.","parameters":[{"in":"query","name":"ecg_ischaemia","type":"boolean","description":"Caller-assigned ECG ischaemia as used in Body 2014 (c; 1 if true, 0 if false). magent does not interpret an ECG.","required":true,"example":"false"},{"in":"query","name":"worsening_angina","type":"boolean","description":"Worsening or crescendo angina as assigned by the caller (g): anginal pain with increasing frequency, occurring with less exertion, or becoming more prolonged (Body 2014). true or false.","required":true,"example":"false"},{"in":"query","name":"pain_radiation_right_arm_or_shoulder","type":"boolean","description":"Pain radiating to the right arm or shoulder as assigned by the caller (h; Body 2014). true or false. magent does not take a pain history.","required":true,"example":"false"},{"in":"query","name":"vomiting","type":"boolean","description":"Vomiting in association with the presenting symptoms as assigned by the caller (e; Body 2014). true or false.","required":true,"example":"false"},{"in":"query","name":"sweating_observed","type":"boolean","description":"Sweating observed by the treating clinician as assigned by the caller (d; Body 2014). true or false. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"hypotension","type":"boolean","description":"Hypotension as assigned by the caller (f): systolic BP <100 mm Hg on arrival (Body 2014, dichotomised as in that paper). true or false.","required":true,"example":"false"},{"in":"query","name":"hs_ctnt_ng_l","type":"number","description":"Roche Diagnostics Elecsys high-sensitivity cardiac troponin T on arrival in ng/L (a; 0-100000, implementation clamp). Continuous linear predictor in Body 2014 Table 2. magent does not convert units or assay troponin.","required":true,"example":"3"},{"in":"query","name":"h_fabp_ng_ml","type":"number","description":"Heart-type fatty acid-binding protein by ELISA in ng/mL as in Body 2014 (b; 0-200, implementation clamp). Continuous linear predictor. magent does not convert units, assay H-FABP, or apply the later immunoturbidimetric transform.","required":true,"example":"1"}],"errors":[{"code":"invalid_macs","message":"MACS inputs must match Body 2014 dichotomous predictors, Roche hs-cTnT ng/L, and H-FABP ng/mL from that paper. Returned before settlement; you are not charged.","status":400},{"code":"invalid_hfabp","message":"h_fabp_ng_ml must be a number from 0 to 200 (Body 2014 MACS heart-type fatty acid binding protein ng/mL). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/macs","citation":{"authors":"Body R, Carley S, McDowell G, et al.","doi":"10.1136/heartjnl-2014-305564","id":"body-2014","pmid":"24780911","source":"Heart. 2014;100(18):1462-1468","title":"The Manchester Acute Coronary Syndromes (MACS) decision rule for suspected cardiac chest pain: derivation and external validation","url":"https://doi.org/10.1136/heartjnl-2014-305564"},"formula_expression":"p = 1/(1+e^(-λ)); λ = 0.068*a + 0.17*b + 1.75*c + 1.85*d + 1.72*e + 1.46*f + 0.92*g + 0.87*h - 4.83; a Roche Elecsys hs-cTnT ng/L; b ELISA H-FABP ng/mL; c ECG ischaemia 0/1; d sweating observed 0/1; e vomiting 0/1; f hypotension SBP<100 0/1; g worsening angina 0/1; h right-arm/shoulder radiation 0/1; very_low p<0.02, low 0.02<=p<0.05, moderate 0.05<=p<0.95, high p>=0.95 (Body 2014 Table 2 rounded values)","purpose":"Compute the Body 2014 Manchester Acute Coronary Syndromes (MACS) logistic probability of ACS from caller-assigned ECG ischaemia, worsening angina, right-arm or shoulder radiation, vomiting, observed sweating, hypotension, Roche Elecsys hs-cTnT in ng/L, and ELISA heart-type fatty acid-binding protein in ng/mL.","markdown_url":"https://magentlab.com/docs/macs.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"macs"},{"name":"formula_expression","type":"string","description":"Body 2014 Table 2 rounded MACS logistic expression"},{"name":"ecg_ischaemia","type":"boolean","description":"Caller-assigned ECG ischaemia used as c"},{"name":"worsening_angina","type":"boolean","description":"Caller-assigned worsening/crescendo angina used as g"},{"name":"pain_radiation_right_arm_or_shoulder","type":"boolean","description":"Caller-assigned right-arm or shoulder radiation used as h"},{"name":"vomiting","type":"boolean","description":"Caller-assigned vomiting used as e"},{"name":"sweating_observed","type":"boolean","description":"Caller-assigned observed sweating used as d"},{"name":"hypotension","type":"boolean","description":"Caller-assigned hypotension (SBP <100 mm Hg) used as f"},{"name":"hs_ctnt_ng_l","type":"number","description":"Roche Elecsys hs-cTnT used as a, in ng/L"},{"name":"h_fabp_ng_ml","type":"number","description":"ELISA H-FABP used as b, in ng/mL as in Body 2014"},{"name":"linear_predictor","type":"number","description":"Body 2014 Table 2 λ from the rounded coefficients, 4 decimals"},{"name":"probability","type":"number","description":"p = 1/(1+e^(-λ)) on 0-1, 4 decimals. Banded on unrounded p."},{"name":"macs_band","type":"string","description":"very_low (p<0.02), low (0.02≤p<0.05), moderate (0.05≤p<0.95), or high (p≥0.95). Figure 2 bands. Not a diagnosis."},{"name":"citation","type":"object","description":"Body 2014 Heart citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"ecg_ischaemia":"false","h_fabp_ng_ml":"1","hs_ctnt_ng_l":"3","hypotension":"false","pain_radiation_right_arm_or_shoulder":"false","sweating_observed":"false","vomiting":"false","worsening_angina":"false"},{"ecg_ischaemia":"false","h_fabp_ng_ml":"1","hs_ctnt_ng_l":"3","hypotension":"false","pain_radiation_right_arm_or_shoulder":"false","sweating_observed":"false","vomiting":"false","worsening_angina":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/macs","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/macs?ecg_ischaemia=false&worsening_angina=false&pain_radiation_right_arm_or_shoulder=false&vomiting=false&sweating_observed=false&hypotension=false&hs_ctnt_ng_l=3&h_fabp_ng_ml=1","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/macs","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/he-macs","description":"Alghamdi 2019 HE-MACS ACS probability from age, sex, caller-assigned observed sweating, acute ECG ischaemia, right-arm or shoulder radiation, vomiting, hypotension (SBP <100), and current smoking. Table 2 printed coefficients. Returns probability only; four-group ROC thresholds are in that paper's supplement and are not restated here. magent does not interpret ECG or take a history. Not MACS (Body 2014 biomarkers) or T-MACS. Not a diagnosis.","parameters":[{"in":"query","name":"age","type":"number","description":"Age in years as a continuous linear predictor (g; 18-100, implementation clamp). Alghamdi 2019 Table 2. magent does not read an identity document.","required":true,"example":40},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"Sex used as h in Alghamdi 2019 Table 2 (male = 1, female = 0). male or female, case-insensitive. magent does not examine the patient.","required":true,"example":"female"},{"in":"query","name":"sweating_observed","type":"boolean","description":"Sweating observed by the treating clinician as assigned by the caller (a; 1 if true, 0 if false). true or false. magent does not examine the patient.","required":true,"example":false},{"in":"query","name":"acute_ecg_ischaemia","type":"boolean","description":"Caller-assigned acute ECG ischaemia as used in Alghamdi 2019 (b): ST-deviation or abnormal T inversion (1 if true, 0 if false). magent does not interpret an ECG.","required":true,"example":false},{"in":"query","name":"pain_radiation_right_arm_or_shoulder","type":"boolean","description":"Pain radiating to the right arm or shoulder as assigned by the caller (c; Alghamdi 2019). true or false. magent does not take a pain history.","required":true,"example":false},{"in":"query","name":"vomiting","type":"boolean","description":"Vomiting associated with the pain as assigned by the caller (d; Alghamdi 2019). true or false.","required":true,"example":false},{"in":"query","name":"hypotension","type":"boolean","description":"Hypotension as assigned by the caller (e): systolic BP <100 mm Hg (Alghamdi 2019, dichotomised as in that paper). true or false.","required":true,"example":false},{"in":"query","name":"current_smoker","type":"boolean","description":"Current tobacco smoker as assigned by the caller (f; Alghamdi 2019). true or false. magent does not take a smoking history.","required":true,"example":false}],"errors":[{"code":"invalid_he_macs","message":"HE-MACS inputs must match Alghamdi 2019 age, sex, and the six dichotomous history/ECG predictors from that paper. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/he-macs","citation":{"authors":"Alghamdi A, Howard L, Reynard C, et al.","doi":"10.1097/MEJ.0000000000000575","id":"alghamdi-2019","pmid":"30289775","source":"Eur J Emerg Med. 2019;26(5):356-361","title":"Enhanced triage for patients with suspected cardiac chest pain: the History and Electrocardiogram-only Manchester Acute Coronary Syndromes decision aid","url":"https://doi.org/10.1097/MEJ.0000000000000575"},"formula_expression":"p = 1/(1+e^(-λ)); λ = 1.426*a + 1.838*b + 0.734*c + 0.996*d + 1.353*e + 0.675*f + 0.024*g + 0.462*h - 4.416; a sweating observed 0/1; b acute ECG ischaemia 0/1; c pain radiating to right arm or shoulder 0/1; d vomiting associated with pain 0/1; e systolic BP <100 mmHg 0/1; f current tobacco smoker 0/1; g age in years (continuous); h male sex 1, female 0 (Alghamdi 2019 Table 2 printed values)","purpose":"Compute the Alghamdi 2019 History and Electrocardiogram-only Manchester Acute Coronary Syndromes (HE-MACS) logistic probability of ACS from age, sex, and caller-assigned observed sweating, acute ECG ischaemia, right-arm or shoulder radiation, vomiting, hypotension (SBP <100 mm Hg), and current tobacco smoking.","markdown_url":"https://magentlab.com/docs/he-macs.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"he_macs"},{"name":"formula_expression","type":"string","description":"Alghamdi 2019 Table 2 printed HE-MACS logistic expression"},{"name":"age","type":"number","description":"Age in years used as g"},{"name":"sex","type":"string","description":"female or male used as h"},{"name":"sweating_observed","type":"boolean","description":"Caller-assigned observed sweating used as a"},{"name":"acute_ecg_ischaemia","type":"boolean","description":"Caller-assigned acute ECG ischaemia used as b"},{"name":"pain_radiation_right_arm_or_shoulder","type":"boolean","description":"Caller-assigned right-arm or shoulder radiation used as c"},{"name":"vomiting","type":"boolean","description":"Caller-assigned vomiting used as d"},{"name":"hypotension","type":"boolean","description":"Caller-assigned hypotension (SBP <100 mm Hg) used as e"},{"name":"current_smoker","type":"boolean","description":"Caller-assigned current tobacco smoking used as f"},{"name":"linear_predictor","type":"number","description":"Alghamdi 2019 Table 2 λ from the printed coefficients, 4 decimals"},{"name":"probability","type":"number","description":"p = 1/(1+e^(-λ)) on 0-1, 4 decimals. Probability only; no risk band."},{"name":"citation","type":"object","description":"Alghamdi 2019 Eur J Emerg Med citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"acute_ecg_ischaemia":"false","age":"40","current_smoker":"false","hypotension":"false","pain_radiation_right_arm_or_shoulder":"false","sex":"female","sweating_observed":"false","vomiting":"false"},{"acute_ecg_ischaemia":"false","age":"40","current_smoker":"false","hypotension":"false","pain_radiation_right_arm_or_shoulder":"false","sex":"female","sweating_observed":"false","vomiting":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/he-macs","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/he-macs?age=40&sex=female&sweating_observed=false&acute_ecg_ischaemia=false&pain_radiation_right_arm_or_shoulder=false&vomiting=false&hypotension=false&current_smoker=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/he-macs","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/timi-risk-index","description":"Morrow InTIME-II TIMI risk index: heart rate × (age/10)^2 / systolic BP, with the five published groups (≤12.5, >12.5–17.5, >17.5–22.5, >22.5–30, >30). Deterministic published arithmetic with citation; not a reperfusion decision.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120).","required":true,"example":"65"},{"in":"query","name":"heart_rate_bpm","type":"integer","description":"Admission heart rate in beats per minute (integer 30-220). Morrow 2001 excluded HR <50 or >150 from derivation; magent still computes the index.","required":true,"example":"80"},{"in":"query","name":"systolic_mm_hg","type":"number","description":"Admission systolic blood pressure in mm Hg (50-250). Morrow 2001 excluded SBP <60 or >200 from derivation; magent still computes the index.","required":true,"example":"120"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_heart_rate","message":"heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.","status":400},{"code":"invalid_systolic_bp","message":"systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/timi-risk-index","citation":{"authors":"Morrow DA, Antman EM, Giugliano RP, et al.","doi":"10.1016/S0140-6736(01)06649-1","id":"morrow-2001","source":"Lancet. 2001;358(9293):1571-1575","title":"A simple risk index for rapid initial triage of patients with ST-elevation myocardial infarction: an InTIME II substudy","url":"https://doi.org/10.1016/S0140-6736(01)06649-1"},"formula_expression":"timi_risk_index = heart_rate_bpm * (age_years / 10)^2 / systolic_mm_hg","purpose":"Compute the Morrow 2001 TIMI risk index HR × (age/10)^2 / SBP and the InTIME-II five-group cutpoints.","markdown_url":"https://magentlab.com/docs/timi-risk-index.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"timi_risk_index"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"age_years","type":"integer","description":"Age used"},{"name":"heart_rate_bpm","type":"integer","description":"Heart rate used, bpm"},{"name":"systolic_mm_hg","type":"number","description":"Systolic pressure used, mm Hg"},{"name":"timi_risk_index","type":"number","description":"HR × (age/10)^2 / SBP, 1 decimal"},{"name":"risk_group","type":"integer","description":"Morrow 2001 InTIME-II group: 1 if ≤12.5; 2 if >12.5–17.5; 3 if >17.5–22.5; 4 if >22.5–30; 5 if >30. A band, not a reperfusion order."},{"name":"citation","type":"object","description":"Morrow et al. Lancet 2001 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"65","heart_rate_bpm":"80","systolic_mm_hg":"120"},{"age":"65","heart_rate_bpm":"80","systolic_mm_hg":"120"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/timi-risk-index","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/timi-risk-index?age=65&heart_rate_bpm=80&systolic_mm_hg=120","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/timi-risk-index","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/sgarbossa","description":"Sgarbossa 1996 GUSTO-1 criteria for evolving AMI in left bundle-branch block: caller-assigned concordant ST elevation ≥1 mm (5), concordant ST depression ≥1 mm in V1–V3 (3), and discordant ST elevation ≥5 mm (2). Max 10. Score ≥3 had ~90% specificity in the derivation. Deterministic published score with citation; not a diagnosis, not the Smith modification, and magent does not read the tracing.","parameters":[{"in":"query","name":"concordant_st_elevation_1mm","type":"boolean","description":"Concordant ST elevation ≥1 mm in a lead with a positive QRS (Sgarbossa 1996, 5 points). true or false as assigned by the caller. magent does not measure the ECG.","required":true,"example":"false"},{"in":"query","name":"concordant_st_depression_v1_v3","type":"boolean","description":"Concordant ST depression ≥1 mm in V1, V2, or V3 (Sgarbossa 1996, 3 points). true or false as assigned by the caller. magent does not measure the ECG.","required":true,"example":"false"},{"in":"query","name":"discordant_st_elevation_5mm","type":"boolean","description":"Discordant ST elevation ≥5 mm (ST opposite QRS; Sgarbossa 1996, 2 points). true or false as assigned by the caller. magent does not measure the ECG. Not the Smith ST/S ratio.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/sgarbossa","citation":{"authors":"Sgarbossa EB, Pinski SL, Barbagelata A, et al.","doi":"10.1056/NEJM199602223340801","id":"sgarbossa-1996","pmid":"8559200","source":"N Engl J Med. 1996;334(8):481-487","title":"Electrocardiographic diagnosis of evolving acute myocardial infarction in the presence of left bundle-branch block","url":"https://doi.org/10.1056/NEJM199602223340801"},"formula_expression":"Sgarbossa = 5*concordant_st_elevation_1mm + 3*concordant_st_depression_v1_v3 + 2*discordant_st_elevation_5mm; max 10; score_ge_3 iff total >= 3","purpose":"Sum the three Sgarbossa 1996 GUSTO-1 ECG criteria in left bundle-branch block and return whether the total is ≥3.","markdown_url":"https://magentlab.com/docs/sgarbossa.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"sgarbossa"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Sgarbossa 1996 points 0-10"},{"name":"max_score","type":"integer","description":"10"},{"name":"score_ge_3","type":"boolean","description":"true iff score ≥ 3 (Sgarbossa 1996: specificity ~90% at this cutoff). Not a diagnosis."},{"name":"components","type":"array","description":"Per-criterion points"},{"name":"citation","type":"object","description":"Sgarbossa et al. NEJM 1996 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"concordant_st_depression_v1_v3":"false","concordant_st_elevation_1mm":"false","discordant_st_elevation_5mm":"false"},{"concordant_st_depression_v1_v3":"false","concordant_st_elevation_1mm":"false","discordant_st_elevation_5mm":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/sgarbossa","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/sgarbossa?concordant_st_elevation_1mm=false&concordant_st_depression_v1_v3=false&discordant_st_elevation_5mm=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/sgarbossa","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/modified-sgarbossa","description":"Smith 2012 unweighted modified Sgarbossa for STEMI equivalent in LBBB. Positive if ANY of three caller-assigned flags is true: concordant ST elevation ≥1 mm in a lead with positive QRS, concordant ST depression ≥1 mm in V1–V3, or ≥1 mm discordant STE with ST/S ratio ≤ −0.25 (STE ≥25% of the preceding S-wave). Not the original Sgarbossa 1996 5/3/2 points score. Not a 5 mm discordant rule. magent does not measure the ECG. Not a diagnosis.","parameters":[{"in":"query","name":"concordant_st_elevation_1mm","type":"boolean","description":"Concordant ST elevation ≥1 mm in a lead with a positive QRS as assigned by the caller (Smith 2012). true or false. magent does not measure the ECG.","required":true,"example":"false"},{"in":"query","name":"concordant_st_depression_v1_v3","type":"boolean","description":"Concordant ST depression ≥1 mm in V1, V2, or V3 as assigned by the caller (Smith 2012). true or false. magent does not measure the ECG.","required":true,"example":"false"},{"in":"query","name":"excessive_discordant_ste_st_s_ge_0_25","type":"boolean","description":"≥1 mm discordant ST elevation with ST/S ratio ≤ −0.25 (STE ≥25% of the preceding S-wave depth) as assigned by the caller (Smith 2012). true or false. magent does not measure the ECG. Not the original Sgarbossa 1996 5 mm discordant rule.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/modified-sgarbossa","citation":{"authors":"Smith SW, Dodd KW, Henry TD, Dvorak DM, Pearce LA","doi":"10.1016/j.annemergmed.2012.07.119","id":"smith-2012","pmid":"22939607","source":"Ann Emerg Med. 2012;60(6):766-776","title":"Diagnosis of ST-elevation myocardial infarction in the presence of left bundle branch block with the ST-elevation to S-wave ratio in a modified Sgarbossa rule","url":"https://doi.org/10.1016/j.annemergmed.2012.07.119"},"formula_expression":"modified_sgarbossa iff concordant_st_elevation_1mm or concordant_st_depression_v1_v3 or excessive_discordant_ste_st_s_ge_0_25 (Smith 2012 unweighted modified Sgarbossa; not Sgarbossa 1996 5/3/2 points; not a 5 mm discordant rule)","purpose":"Apply the Smith 2012 unweighted modified Sgarbossa rule from three caller-assigned ECG flags and return whether any criterion is met.","markdown_url":"https://magentlab.com/docs/modified-sgarbossa.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"modified_sgarbossa"},{"name":"formula_expression","type":"string","description":"Smith 2012 unweighted modified Sgarbossa: positive if any of the three caller-assigned flags"},{"name":"modified_sgarbossa","type":"boolean","description":"true iff any of concordant_st_elevation_1mm, concordant_st_depression_v1_v3, or excessive_discordant_ste_st_s_ge_0_25 is true. Not a diagnosis. Not a weighted score."},{"name":"criteria","type":"array","description":"Per-flag rows plus modified_sgarbossa_any (met iff any of the three flags is true)"},{"name":"citation","type":"object","description":"Smith 2012 Annals of Emergency Medicine citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"concordant_st_depression_v1_v3":"false","concordant_st_elevation_1mm":"false","excessive_discordant_ste_st_s_ge_0_25":"false"},{"concordant_st_depression_v1_v3":"false","concordant_st_elevation_1mm":"false","excessive_discordant_ste_st_s_ge_0_25":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/modified-sgarbossa","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/modified-sgarbossa?concordant_st_elevation_1mm=false&concordant_st_depression_v1_v3=false&excessive_discordant_ste_st_s_ge_0_25=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/modified-sgarbossa","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/edacs","description":"Than 2014 EDACS from age bands, male sex, known CAD or three risk factors (age 18-50 only), diaphoresis, radiation, inspiration (−4), and palpation (−6). Returns the point total (may be negative) and whether the score is <16. The paper ADP also requires ECG and 0/2h troponin, which magent does not take. Not a diagnosis or discharge order. Deterministic published arithmetic with citation.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). 18-45 scores 2; then +2 per 5-year band through 81-85 (18); ≥86 scores 20.","required":true,"example":"40"},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"male scores 6; female scores 0.","required":true,"example":"female"},{"in":"query","name":"known_cad_or_three_risk_factors","type":"boolean","description":"Caller-assigned known CAD or ≥3 risk factors (Than 2014). Scores +4 only when age is 18-50; required even when age >50 (then 0). magent does not count risk factors. true or false.","required":true,"example":"false"},{"in":"query","name":"diaphoresis","type":"boolean","description":"Diaphoresis with the pain. true scores +3.","required":true,"example":"false"},{"in":"query","name":"pain_radiates_arm_shoulder_neck_jaw","type":"boolean","description":"Pain radiates to arm, shoulder, neck, or jaw. true scores +5. magent does not interpret the history.","required":true,"example":"false"},{"in":"query","name":"pain_with_inspiration","type":"boolean","description":"Pain occurred or worsened with inspiration. true scores −4.","required":true,"example":"false"},{"in":"query","name":"pain_reproduced_by_palpation","type":"boolean","description":"Pain reproduced by palpation. true scores −6.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/edacs","citation":{"authors":"Than M, Flaws D, Sanders S, et al.","doi":"10.1111/1742-6723.12164","id":"than-2014","pmid":"24428678","source":"Emerg Med Australas. 2014;26(1):34-44","title":"Development and validation of the Emergency Department Assessment of Chest pain Score and 2 h accelerated diagnostic protocol","url":"https://doi.org/10.1111/1742-6723.12164"},"formula_expression":"EDACS = age (18-45:2, 46-50:4, 51-55:6, 56-60:8, 61-65:10, 66-70:12, 71-75:14, 76-80:16, 81-85:18, >=86:20) + male 6 + known_cad_or_three_risk_factors 4 if age 18-50 else 0 + diaphoresis 3 + pain_radiates_arm_shoulder_neck_jaw 5 + pain_with_inspiration -4 + pain_reproduced_by_palpation -6; score may be negative; paper ADP uses EDACS < 16 plus ECG and 0/2h troponin","purpose":"Compute the Than 2014 Emergency Department Assessment of Chest pain Score from age, sex, and caller-assigned flags.","markdown_url":"https://magentlab.com/docs/edacs.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"edacs"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Total EDACS points; may be negative"},{"name":"score_lt_16","type":"boolean","description":"true when score < 16 (Than 2014 ADP threshold). Not a discharge flag; ADP also needs ECG and 0/2h troponin."},{"name":"sex","type":"string","description":"female or male"},{"name":"age_years","type":"integer","description":"Age used for the 5-year bands and the CAD term gate"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Than et al. EMA 2014 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"40","diaphoresis":"false","known_cad_or_three_risk_factors":"false","pain_radiates_arm_shoulder_neck_jaw":"false","pain_reproduced_by_palpation":"false","pain_with_inspiration":"false","sex":"female"},{"age":"40","diaphoresis":"false","known_cad_or_three_risk_factors":"false","pain_radiates_arm_shoulder_neck_jaw":"false","pain_reproduced_by_palpation":"false","pain_with_inspiration":"false","sex":"female"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/edacs","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/edacs?age=40&sex=female&known_cad_or_three_risk_factors=false&diaphoresis=false&pain_radiates_arm_shoulder_neck_jaw=false&pain_with_inspiration=false&pain_reproduced_by_palpation=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/edacs","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/killip","description":"Killip and Kimball 1967 myocardial-infarction heart-failure class 1-4 as assigned by the caller. Returns the published class, description (no heart failure; S3 and basilar rales; pulmonary edema; cardiogenic shock), and 1967 CCU hospital mortality (6%, 17%, 38%, 81%). Not a diagnosis; magent does not examine the patient. Not GRACE or contemporary registry mortality.","parameters":[{"in":"query","name":"killip_class","type":"integer","description":"Killip and Kimball 1967 class 1-4 as assigned by the caller (1 no heart failure; 2 heart failure with S3 and basilar rales; 3 pulmonary edema; 4 cardiogenic shock). magent does not examine the patient.","required":true,"example":"1"}],"errors":[{"code":"invalid_killip_class","message":"killip_class must be 1, 2, 3, or 4. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/killip","citation":{"authors":"Killip T 3rd, Kimball JT","doi":"10.1016/0002-9149(67)90023-9","id":"killip-1967","pmid":"6059183","source":"Am J Cardiol. 1967;20(4):457-464","title":"Treatment of myocardial infarction in a coronary care unit. A two year experience with 250 patients","url":"https://doi.org/10.1016/0002-9149(67)90023-9"},"formula_expression":"Killip class 1-4 as assigned by the caller; 1967 CCU hospital mortality 6/17/38/81 percent (Killip and Kimball 1967)","purpose":"Return the Killip and Kimball 1967 myocardial-infarction heart-failure class 1-4 from a caller-assigned integer, with the published class description and 1967 CCU hospital mortality.","markdown_url":"https://magentlab.com/docs/killip.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"killip"},{"name":"formula_expression","type":"string","description":"Published class rule"},{"name":"killip_class","type":"integer","description":"Caller-assigned class 1-4"},{"name":"score","type":"integer","description":"Same as killip_class"},{"name":"max_score","type":"integer","description":"4"},{"name":"description","type":"string","description":"1967 wording for that class"},{"name":"hospital_mortality_percent","type":"integer","description":"1967 CCU hospital mortality for that class (6, 17, 38, or 81)"},{"name":"components","type":"array","description":"Killip-class component"},{"name":"citation","type":"object","description":"Killip and Kimball 1967"},{"name":"disclaimer","type":"string","description":"Not a medical device"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"killip_class":"1"},{"killip_class":"1"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/killip","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/killip?killip_class=1","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/killip","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/grace","description":"Granger 2003 in-hospital GRACE 1.0: integer nomogram points from age, heart rate, systolic BP, creatinine (mg/dL or µmol/L), Killip class 1-4, cardiac arrest, ST-segment deviation, and elevated initial enzymes. Total 1-372. In-hospital mortality percent is that paper's printed score readout. Not GRACE 2.0, not Fox 2006 6-month, not ESC 108/140 cutoffs. Not a medical device and not a cath-lab order.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Granger 2003 nomogram: <30 scores 0; 30-39 scores 8; 40-49 scores 25; 50-59 scores 41; 60-69 scores 58; 70-79 scores 75; 80-89 scores 91; ≥90 scores 100.","required":true,"example":65},{"in":"query","name":"heart_rate_bpm","type":"integer","description":"Heart rate in beats/min (20-300). Granger 2003 nomogram: <50 scores 0; 50-69 scores 3; 70-89 scores 9; 90-109 scores 15; 110-149 scores 24; 150-199 scores 38; ≥200 scores 46.","required":true,"example":80},{"in":"query","name":"sbp_mm_hg","type":"integer","description":"Systolic blood pressure in mm Hg (40-300). Granger 2003 nomogram, inverse: <80 scores 58; 80-99 scores 53; 100-119 scores 43; 120-139 scores 34; 140-159 scores 24; 160-199 scores 10; ≥200 scores 0.","required":true,"example":130},{"in":"query","name":"creatinine_mg_dl","type":"number","description":"Initial serum creatinine in mg/dL (0.1-20). Provide this or creatinine_umol_l. If both are sent, creatinine_mg_dl is scored. Granger 2003 nomogram: 0.0-0.39 scores 1; 0.4-0.79 scores 4; 0.8-1.19 scores 7; 1.2-1.59 scores 10; 1.6-1.99 scores 13; 2.0-3.99 scores 21; ≥4.0 scores 28.","required":false,"example":1.0},{"in":"query","name":"creatinine_umol_l","type":"number","description":"Initial serum creatinine in µmol/L (9-1768). Converted as mg/dL = µmol/L / 88.42. Alternate to creatinine_mg_dl. Ignored when creatinine_mg_dl is present.","required":false,"example":88.42},{"in":"query","name":"killip_class","type":"integer","description":"Killip class 1-4 as assigned by the caller (1 no heart failure scores 0; 2 rales or elevated venous pressure scores 20; 3 pulmonary edema scores 39; 4 cardiogenic shock scores 59). magent does not examine the patient.","required":true,"example":1},{"in":"query","name":"cardiac_arrest","type":"boolean","description":"Cardiac arrest at presentation as assigned by the caller (Granger 2003). true scores 39. magent does not read the chart. true or false.","required":true,"example":false},{"in":"query","name":"st_deviation","type":"boolean","description":"ST-segment deviation on the presenting ECG as assigned by the caller (Granger 2003). true scores 28. magent does not interpret the ECG. true or false.","required":true,"example":false},{"in":"query","name":"elevated_enzymes","type":"boolean","description":"Elevated initial cardiac enzymes as assigned by the caller (Granger 2003). true scores 14. magent does not read the laboratory. true or false.","required":true,"example":false}],"errors":[{"code":"invalid_grace","message":"GRACE in-hospital inputs must match Granger 2003 age, heart rate, SBP, creatinine, Killip class, cardiac arrest, ST deviation, and enzyme flags. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/grace","citation":{"authors":"Granger CB, Goldberg RJ, Dabbous O, Pieper KS, Eagle KA, Cannon CP, Van De Werf F, Avezum A, Goodman SG, Flather MD, Fox KA; Global Registry of Acute Coronary Events Investigators","doi":"10.1001/archinte.163.19.2345","id":"granger-2003-grace","pmid":"14581255","source":"Arch Intern Med. 2003;163(19):2345-2353","title":"Predictors of hospital mortality in the global registry of acute coronary events","url":"https://doi.org/10.1001/archinte.163.19.2345"},"formula_expression":"GRACE = age_points(<30:0, 30-39:8, 40-49:25, 50-59:41, 60-69:58, 70-79:75, 80-89:91, >=90:100) + heart_rate_points(<50:0, 50-69:3, 70-89:9, 90-109:15, 110-149:24, 150-199:38, >=200:46) + sbp_points(<80:58, 80-99:53, 100-119:43, 120-139:34, 140-159:24, 160-199:10, >=200:0) + creatinine_mg_dl_points(0-0.39:1, 0.4-0.79:4, 0.8-1.19:7, 1.2-1.59:10, 1.6-1.99:13, 2.0-3.99:21, >=4:28) + killip(1:0, 2:20, 3:39, 4:59) + 39 if cardiac_arrest + 28 if st_deviation + 14 if elevated_enzymes; Granger 2003 in-hospital GRACE 1.0 nomogram; max 372; in_hospital_mortality_percent is that paper's printed score readout (score<=60 → 0.2; then the labeled 70-240 percents at or below the total; score>=250 → 52); not ESC 108/140 cutoffs, not GRACE 2.0, not Fox 2006 6-month","purpose":"Sum the Granger 2003 in-hospital GRACE 1.0 nomogram points from eight admission predictors and return that paper's printed in-hospital mortality readout.","markdown_url":"https://magentlab.com/docs/grace.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"grace"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Total Granger 2003 nomogram points 1-372"},{"name":"max_score","type":"integer","description":"372 (100+46+58+28+59+39+28+14)"},{"name":"in_hospital_mortality_percent","type":"number","description":"Granger 2003 printed in-hospital mortality percent for this total (≤60 → 0.2; labeled 70-240 ticks at or below the score; ≥250 → 52). Not an ESC 108/140 band and not an individual prognosis."},{"name":"age_years","type":"integer","description":"Age used"},{"name":"heart_rate_bpm","type":"integer","description":"Heart rate used"},{"name":"sbp_mm_hg","type":"integer","description":"Systolic BP used"},{"name":"creatinine_mg_dl","type":"number","description":"Serum creatinine used in mg/dL (after µmol/L conversion when that unit is sent)"},{"name":"killip_class","type":"integer","description":"Caller-assigned Killip class 1-4 used"},{"name":"cardiac_arrest","type":"boolean","description":"Caller-assigned cardiac arrest at presentation used"},{"name":"st_deviation","type":"boolean","description":"Caller-assigned ST-segment deviation used"},{"name":"elevated_enzymes","type":"boolean","description":"Caller-assigned elevated initial enzymes used"},{"name":"components","type":"array","description":"Per-predictor nomogram points"},{"name":"citation","type":"object","description":"Granger 2003 Arch Intern Med citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"65","cardiac_arrest":"false","creatinine_mg_dl":"1.0","elevated_enzymes":"false","heart_rate_bpm":"80","killip_class":"1","sbp_mm_hg":"130","st_deviation":"false"},{"age":"65","cardiac_arrest":"false","creatinine_mg_dl":"1.0","elevated_enzymes":"false","heart_rate_bpm":"80","killip_class":"1","sbp_mm_hg":"130","st_deviation":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/grace","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/grace?age=65&heart_rate_bpm=80&sbp_mm_hg=130&creatinine_mg_dl=1.0&killip_class=1&cardiac_arrest=false&st_deviation=false&elevated_enzymes=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/grace","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/orbi","description":"Auffret 2018 ORBI integer score for in-hospital cardiogenic shock after STEMI treated by primary PCI. Rounded adjusted-OR points (max 36) from age >70, prior stroke/TIA, cardiac arrest, anterior STEMI, FMC-to-PPCI >90 min, Killip I-III, heart rate >90, SBP <125 with pulse pressure <45, glucose >10 mmol/L, left-main culprit, and post-PPCI TIMI <3. Derivation-cohort class I-IV percents. Not a medical device, not a cath-lab or shock-treatment order, and not the ORBIT bleeding score.","parameters":[{"in":"query","name":"age_years","type":"integer","description":"Age in years (18-120). Auffret 2018: older than 70 scores 2; 70 or younger scores 0.","required":true,"example":"60"},{"in":"query","name":"prior_stroke_tia","type":"boolean","description":"Prior stroke or TIA (Auffret 2018: 2 points). true or false.","required":true,"example":"false"},{"in":"query","name":"cardiac_arrest_on_admission","type":"boolean","description":"Cardiac arrest on admission (Auffret 2018: 3 points). true or false.","required":true,"example":"false"},{"in":"query","name":"anterior_stemi","type":"boolean","description":"Anterior ST-elevation myocardial infarction (Auffret 2018: 1 point). Caller-assigned. magent does not read the ECG.","required":true,"example":"false"},{"in":"query","name":"fmc_to_ppci_gt_90_min","type":"boolean","description":"First medical contact to primary PCI greater than 90 minutes (Auffret 2018: 2 points). true or false. magent does not compute timestamps.","required":true,"example":"false"},{"in":"query","name":"killip_class","type":"string","enum":["i","ii","iii"],"description":"Caller-assigned Killip class after STEMI (Auffret 2018): i (0), ii (2), or iii (6). Killip IV is rejected because the derivation excluded cardiogenic shock on admission. magent does not examine the patient.","required":true,"example":"i"},{"in":"query","name":"heart_rate","type":"integer","description":"Heart rate in beats per minute (integer 30-220). Auffret 2018: greater than 90 scores 3.","required":true,"example":"70"},{"in":"query","name":"sbp_lt_125_and_pp_lt_45","type":"boolean","description":"Whether systolic BP is <125 mm Hg and pulse pressure is <45 mm Hg together (Auffret 2018: 4 points). Single caller-assigned boolean; magent does not take separate SBP or pulse-pressure numbers.","required":true,"example":"false"},{"in":"query","name":"glucose_gt_10_mmol_l","type":"boolean","description":"Admission glucose >10 mmol/L (Auffret 2018: 3 points). true or false. magent does not convert units.","required":true,"example":"false"},{"in":"query","name":"left_main_culprit","type":"boolean","description":"Whether the culprit lesion is the left main coronary artery (Auffret 2018: 5 points). Caller-assigned. magent does not read the angiogram.","required":true,"example":"false"},{"in":"query","name":"post_ppci_timi_lt_3","type":"boolean","description":"Whether post-primary-PCI TIMI flow is <3 (Auffret 2018: 5 points). Caller-assigned. magent does not assign TIMI flow.","required":true,"example":"false"}],"errors":[{"code":"invalid_orbi","message":"ORBI needs Auffret 2018 STEMI shock predictors (Killip I–III, hemodynamics, lesion, TIMI) in published ranges. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/orbi","citation":{"authors":"Auffret V, Cottin Y, Leurent G, et al.","doi":"10.1093/eurheartj/ehy127","id":"auffret-2018","pmid":"29554243","source":"Eur Heart J. 2018;39(22):2090-2102","title":"Predicting the development of in-hospital cardiogenic shock in patients with ST-segment elevation myocardial infarction treated by primary percutaneous coronary intervention: the ORBI risk score","url":"https://doi.org/10.1093/eurheartj/ehy127"},"formula_expression":"ORBI = age_years>70 (2) + prior_stroke_tia (2) + cardiac_arrest_on_admission (3) + anterior_stemi (1) + fmc_to_ppci_gt_90_min (2) + killip_class (i:0, ii:2, iii:6; iv rejected) + heart_rate>90 (3) + sbp_lt_125_and_pp_lt_45 (4) + glucose_gt_10_mmol_l (3) + left_main_culprit (5) + post_ppci_timi_lt_3 (5); Auffret 2018 rounded adjusted ORs; max 36; derivation in-hospital CS class I 0-7 1.3%, II 8-10 6.6%, III 11-12 11.7%, IV >=13 31.8%","purpose":"Sum the Auffret 2018 ORBI predictors after STEMI primary PCI and return the integer score (0-36), class I-IV, and derivation-cohort in-hospital cardiogenic-shock percent.","markdown_url":"https://magentlab.com/docs/orbi.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"orbi"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"ORBI points 0-36"},{"name":"max_score","type":"integer","description":"36"},{"name":"orbi_class","type":"string","description":"Auffret 2018 class I (0-7), II (8-10), III (11-12), or IV (>=13)"},{"name":"in_hospital_cs_percent","type":"number","description":"Derivation-cohort observed in-hospital cardiogenic-shock percent: 1.3, 6.6, 11.7, or 31.8"},{"name":"age_years","type":"integer","description":"Age in years used"},{"name":"killip_class","type":"string","description":"Caller-assigned Killip i, ii, or iii"},{"name":"heart_rate","type":"integer","description":"Heart rate used, beats per minute"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Auffret et al. Eur Heart J 2018 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age_years":"60","anterior_stemi":"false","cardiac_arrest_on_admission":"false","fmc_to_ppci_gt_90_min":"false","glucose_gt_10_mmol_l":"false","heart_rate":"70","killip_class":"i","left_main_culprit":"false","post_ppci_timi_lt_3":"false","prior_stroke_tia":"false","sbp_lt_125_and_pp_lt_45":"false"},{"age_years":"60","anterior_stemi":"false","cardiac_arrest_on_admission":"false","fmc_to_ppci_gt_90_min":"false","glucose_gt_10_mmol_l":"false","heart_rate":"70","killip_class":"i","left_main_culprit":"false","post_ppci_timi_lt_3":"false","prior_stroke_tia":"false","sbp_lt_125_and_pp_lt_45":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/orbi","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/orbi?age_years=60&prior_stroke_tia=false&cardiac_arrest_on_admission=false&anterior_stemi=false&fmc_to_ppci_gt_90_min=false&killip_class=i&heart_rate=70&sbp_lt_125_and_pp_lt_45=false&glucose_gt_10_mmol_l=false&left_main_culprit=false&post_ppci_timi_lt_3=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/orbi","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/sex-shock","description":"Wang 2024 SEX-SHOCK Supplementary Table S13 sex-specific integer nomogram for in-hospital cardiogenic shock after ACS PCI. ORBI-like clinical flags plus ST-segment elevation, LVEF bands, and log-transformed creatinine and CRP levels as printed. Sum points; S13 Pr(CS) conversion. Not a medical device, not a cath-lab or shock-treatment order, and not ORBI.","parameters":[{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"Caller-assigned sex for the Wang 2024 S13 female or male nomogram. female or male. magent does not assign sex.","required":true,"example":"female"},{"in":"query","name":"post_pci_timi_lt_3","type":"boolean","description":"Post-PCI TIMI flow <3 (Wang 2024 S13: female No 49 / Yes 67; male No 49 / Yes 61). Caller-assigned. magent does not assign TIMI flow.","required":true,"example":"false"},{"in":"query","name":"left_main_culprit","type":"boolean","description":"Culprit lesion of the left main (Wang 2024 S13: female No 49 / Yes 65; male No 49 / Yes 71). Caller-assigned. magent does not read the angiogram.","required":true,"example":"false"},{"in":"query","name":"glucose_gt_10_mmol_l","type":"boolean","description":"Admission glycaemia >10 mmol/L (Wang 2024 S13: female No 49 / Yes 59; male No 49 / Yes 69). true or false. magent does not convert units.","required":true,"example":"false"},{"in":"query","name":"sbp_lt_125_and_pp_lt_45","type":"boolean","description":"Systolic BP <125 mm Hg and pulse pressure <45 mm Hg together (Wang 2024 S13: female No 49 / Yes 70; male No 49 / Yes 66). Single caller-assigned boolean.","required":true,"example":"false"},{"in":"query","name":"heart_rate_gt_90","type":"boolean","description":"Heart rate >90/min (Wang 2024 S13: female No 49 / Yes 55; male No 49 / Yes 62). true or false.","required":true,"example":"false"},{"in":"query","name":"killip_class_iii","type":"boolean","description":"Killip class III (Wang 2024 S13: female No 49 / Yes 76; male No 49 / Yes 66). Killip I and II score as No. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"cardiac_arrest_on_admission","type":"boolean","description":"Presentation as cardiac arrest (Wang 2024 S13: female No 49 / Yes 81; male No 49 / Yes 77). true or false.","required":true,"example":"false"},{"in":"query","name":"age_years","type":"integer","description":"Age in years (18-120). Wang 2024 S13 levels: <70 scores 49; >=70 scores 54 (female) or 55 (male).","required":true,"example":"65"},{"in":"query","name":"lvef_band","type":"string","enum":["lt_35","35_to_50","gt_50"],"description":"Caller-assigned LVEF band (Wang 2024 S13): lt_35 (49), 35_to_50 (female 22, male 18), or gt_50 (0). magent does not measure LVEF.","required":true,"example":"gt_50"},{"in":"query","name":"st_segment_elevation","type":"boolean","description":"ST-segment elevation (Wang 2024 S13: female No 49 / Yes 50; male No 49 / Yes 68). Caller-assigned. magent does not read the ECG.","required":true,"example":"true"},{"in":"query","name":"creatinine_log","type":"number","description":"Wang 2024 S13 log-transformed creatinine nomogram level (Figure 6 axis), not raw µmol/L. Female printed ticks 4-9; male 4.5-9.5. magent does not convert units or invent cutoffs.","required":true,"example":"4"},{"in":"query","name":"crp_log","type":"number","description":"Wang 2024 S13 log-transformed CRP nomogram level (Figure 6 axis), not raw mg/L. Female printed ticks 0, 4, 8; male 0, 6, 10. magent does not assay CRP or invent cutoffs.","required":true,"example":"0"}],"errors":[{"code":"invalid_sex_shock","message":"SEX-SHOCK inputs must match Wang 2024 Supplementary Table S13 sex-specific predictors including CRP, creatinine, LVEF, and ST-segment elevation. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/sex-shock","citation":{"authors":"Wang Y, Zeller M, Auffret V, Georgiopoulos G, Räber L, Roffi M, Templin C, Muller O, Liberale L, Ministrini S, Stamatelopoulos K, Stellos K, Camici GG, Montecucco F, Rickli H, Maza M, Radovanovic D, Cottin Y, Chague F, Niederseer D, Lüscher TF, Kraler S; AMIS-Plus, SPUM-ACS and RICO investigators","doi":"10.1093/eurheartj/ehae593","id":"wang-2024-sex-shock","pmid":"39217456","source":"Eur Heart J. 2024;45(43):4564-4578","title":"Sex-specific prediction of cardiogenic shock after acute coronary syndromes: the SEX-SHOCK score","url":"https://doi.org/10.1093/eurheartj/ehae593"},"formula_expression":"SEX-SHOCK = S13 sex-specific nomogram points (female|male): post_pci_timi_lt_3 (F 49/67, M 49/61) + left_main_culprit (F 49/65, M 49/71) + glucose_gt_10_mmol_l (F 49/59, M 49/69) + sbp_lt_125_and_pp_lt_45 (F 49/70, M 49/66) + heart_rate_gt_90 (F 49/55, M 49/62) + killip_class_iii (F 49/76, M 49/66) + cardiac_arrest_on_admission (F 49/81, M 49/77) + age_years (<70: 49; >=70 F 54 M 55) + lvef_band (gt_50: 0; 35_to_50 F 22 M 18; lt_35: 49) + st_segment_elevation (F 49/50, M 49/68) + creatinine_log ticks (F 4:15 5:31 6:46 7:62 8:77 9:92; M 4.5:21 5.5:35 6.5:50 7.5:65 8.5:80 9.5:94; linear interpolate, round) + crp_log ticks (F 0:43 4:52 8:61; M 0:45 6:55 10:61; linear interpolate, round); sum; in_hospital_cs_probability is S13 Pr(CS) at printed totals (F 500-720, M 500-740; linear between ticks; clamp outside); max F 779 M 799; Wang 2024 Table S13; not ORBI; not CS-on-admission","purpose":"Sum the Wang 2024 Supplementary Table S13 sex-specific nomogram points after ACS PCI and return the integer total and printed in-hospital cardiogenic-shock probability.","markdown_url":"https://magentlab.com/docs/sex-shock.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"sex_shock"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"S13 nomogram total points"},{"name":"max_score","type":"integer","description":"779 female or 799 male"},{"name":"in_hospital_cs_probability","type":"number","description":"Wang 2024 S13 Pr(CS) for the total (printed totals 500-720 female / 500-740 male; linear between ticks; clamp outside)"},{"name":"sex","type":"string","description":"Caller-assigned female or male"},{"name":"age_years","type":"integer","description":"Age in years used"},{"name":"lvef_band","type":"string","description":"Caller-assigned lt_35, 35_to_50, or gt_50"},{"name":"creatinine_log","type":"number","description":"S13 log-transformed creatinine level used"},{"name":"crp_log","type":"number","description":"S13 log-transformed CRP level used"},{"name":"components","type":"array","description":"Per-factor S13 points"},{"name":"citation","type":"object","description":"Wang et al. Eur Heart J 2024 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age_years":"65","cardiac_arrest_on_admission":"false","creatinine_log":"4","crp_log":"0","glucose_gt_10_mmol_l":"false","heart_rate_gt_90":"false","killip_class_iii":"false","left_main_culprit":"false","lvef_band":"gt_50","post_pci_timi_lt_3":"false","sbp_lt_125_and_pp_lt_45":"false","sex":"female","st_segment_elevation":"true"},{"age_years":"65","cardiac_arrest_on_admission":"false","creatinine_log":"4","crp_log":"0","glucose_gt_10_mmol_l":"false","heart_rate_gt_90":"false","killip_class_iii":"false","left_main_culprit":"false","lvef_band":"gt_50","post_pci_timi_lt_3":"false","sbp_lt_125_and_pp_lt_45":"false","sex":"female","st_segment_elevation":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/sex-shock","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/sex-shock?sex=female&post_pci_timi_lt_3=false&left_main_culprit=false&glucose_gt_10_mmol_l=false&sbp_lt_125_and_pp_lt_45=false&heart_rate_gt_90=false&killip_class_iii=false&cardiac_arrest_on_admission=false&age_years=65&lvef_band=gt_50&st_segment_elevation=true&creatinine_log=4&crp_log=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/sex-shock","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/readmits","description":"Nguyen 2018 first-day AMI READMITS integer score for 30-day all-cause readmission: creatinine >2 mg/dL (6), elevated BNP >=50 or NT-proBNP >=125 pg/mL (8), 1 point per decade over 18, diabetes (4), female sex (2), no PCI within 24 hours (1), SBP <100 mm Hg (3). Table 4 quintiles with mean predicted risk. Not a medical device, not a PCI or discharge order, and not the full-stay model.","parameters":[{"in":"query","name":"age_years","type":"integer","description":"Age in years (18-100). Nguyen 2018: 1 point per decade over 18, floor((age_years-18)/10).","required":true,"example":"58"},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"female or male (Nguyen 2018 nonmale sex). Female scores 2. Male scores 0. A published sex item, not race.","required":true,"example":"male"},{"in":"query","name":"creatinine_gt_2","type":"boolean","description":"Whether serum creatinine was >2 mg/dL within the first 24 hours (Nguyen 2018: 6 points). Caller-assigned. magent does not assay creatinine.","required":true,"example":"false"},{"in":"query","name":"elevated_bnp","type":"boolean","description":"Whether BNP was >=50 pg/mL or NT-proBNP was >=125 pg/mL within the first 24 hours (Nguyen 2018: 8 points). Caller-assigned. magent does not assay natriuretic peptides.","required":true,"example":"false"},{"in":"query","name":"diabetes","type":"boolean","description":"Diabetes mellitus history (Nguyen 2018: 4 points). true or false.","required":true,"example":"false"},{"in":"query","name":"pci_within_24h","type":"boolean","description":"Whether PCI occurred within the first 24 hours (Nguyen 2018: false scores 1; true scores 0). Caller-assigned. magent does not read timestamps or the angiogram.","required":true,"example":"true"},{"in":"query","name":"sbp_lt_100","type":"boolean","description":"Whether systolic blood pressure was <100 mm Hg within the first 24 hours (Nguyen 2018: 3 points). Caller-assigned boolean; magent does not take an SBP number.","required":true,"example":"false"}],"errors":[{"code":"invalid_readmits","message":"READMITS needs Nguyen 2018 first-day creatinine, natriuretic peptide, age, diabetes, sex, PCI, and systolic BP in published ranges. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/readmits","citation":{"authors":"Nguyen OK, Makam AN, Clark C, et al.","doi":"10.1161/JAHA.118.008882","id":"nguyen-2018","pmid":"29666065","source":"J Am Heart Assoc. 2018;7(8):e008882","title":"Predicting 30-Day Hospital Readmissions in Acute Myocardial Infarction: The AMI \"READMITS\" (Renal Function, Elevated Brain Natriuretic Peptide, Age, Diabetes Mellitus, Nonmale Sex, Intervention with Timely Percutaneous Coronary Intervention, and Low Systolic Blood Pressure) Score","url":"https://doi.org/10.1161/JAHA.118.008882"},"formula_expression":"READMITS = creatinine_gt_2 (6) + elevated_bnp (8) + floor((age_years-18)/10) (1 per decade >18) + diabetes (4) + female (2) + no_pci_within_24h (1) + sbp_lt_100 (3); Nguyen 2018 first-day AMI READMITS Table 2; max 32 at age 100; Table 4 quintiles <=13 extremely_low 3%, 14-15 low 7%, 16-17 moderate 11%, 18-19 high 16%, >=20 extremely_high 35%","purpose":"Sum the Nguyen 2018 first-day AMI READMITS predictors and return the integer score, Table 4 quintile, and mean predicted 30-day readmission percent.","markdown_url":"https://magentlab.com/docs/readmits.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"readmits"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"First-day READMITS points; 0-32 at the age 18-100 clamp"},{"name":"max_score","type":"integer","description":"32 (age 100 plus all other items)"},{"name":"quintile","type":"string","description":"Nguyen 2018 Table 4: extremely_low (<=13), low (14-15), moderate (16-17), high (18-19), or extremely_high (>=20)"},{"name":"predicted_readmission_percent","type":"integer","description":"Table 4 mean predicted 30-day readmission percent: 3, 7, 11, 16, or 35"},{"name":"age_years","type":"integer","description":"Age in years used"},{"name":"age_decades","type":"integer","description":"floor((age_years-18)/10) points from age"},{"name":"sex","type":"string","description":"female or male used"},{"name":"creatinine_gt_2","type":"boolean","description":"Caller-assigned creatinine >2 mg/dL flag"},{"name":"elevated_bnp","type":"boolean","description":"Caller-assigned elevated BNP or NT-proBNP flag"},{"name":"diabetes","type":"boolean","description":"Caller-assigned diabetes history flag"},{"name":"pci_within_24h","type":"boolean","description":"Caller-assigned PCI within 24 hours flag"},{"name":"sbp_lt_100","type":"boolean","description":"Caller-assigned SBP <100 mm Hg flag"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Nguyen et al. J Am Heart Assoc 2018 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age_years":"58","creatinine_gt_2":"false","diabetes":"false","elevated_bnp":"false","pci_within_24h":"true","sbp_lt_100":"false","sex":"male"},{"age_years":"58","creatinine_gt_2":"false","diabetes":"false","elevated_bnp":"false","pci_within_24h":"true","sbp_lt_100":"false","sex":"male"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/readmits","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/readmits?age_years=58&sex=male&creatinine_gt_2=false&elevated_bnp=false&diabetes=false&pci_within_24h=true&sbp_lt_100=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/readmits","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/add-rs","description":"Rogers 2011 aortic dissection detection risk score (ADD-RS). One point per high-risk category with any marker (conditions, pain features, exam features); two markers in the same category still add only 1; max 3. Bands 0 / 1 / 2-3. Deterministic published score with citation. Not an imaging order, not ADvISED D-dimer rule-out; score 0 does not exclude dissection.","parameters":[{"in":"query","name":"marfan_or_connective_tissue","type":"boolean","description":"Marfan syndrome or other connective-tissue disease (Rogers 2011 high-risk condition). true or false. Caller-assigned; magent does not diagnose a syndrome.","required":true,"example":"false"},{"in":"query","name":"family_aortic_disease","type":"boolean","description":"Family history of aortic disease (Rogers 2011 high-risk condition). true or false.","required":true,"example":"false"},{"in":"query","name":"known_aortic_valve_disease","type":"boolean","description":"Known aortic valve disease (Rogers 2011 high-risk condition). true or false.","required":true,"example":"false"},{"in":"query","name":"recent_aortic_manipulation","type":"boolean","description":"Recent aortic manipulation such as catheterization or cardiac surgery (Rogers 2011 high-risk condition). true or false.","required":true,"example":"false"},{"in":"query","name":"known_thoracic_aneurysm","type":"boolean","description":"Known thoracic aortic aneurysm (Rogers 2011 high-risk condition). true or false.","required":true,"example":"false"},{"in":"query","name":"pain_sudden","type":"boolean","description":"Chest, back, or abdominal pain of abrupt onset (Rogers 2011 high-risk pain feature). true or false.","required":true,"example":"false"},{"in":"query","name":"pain_severe","type":"boolean","description":"Chest, back, or abdominal pain of severe intensity (Rogers 2011 high-risk pain feature). true or false.","required":true,"example":"false"},{"in":"query","name":"pain_ripping_or_tearing","type":"boolean","description":"Chest, back, or abdominal pain described as ripping or tearing (Rogers 2011 high-risk pain feature). true or false.","required":true,"example":"false"},{"in":"query","name":"pulse_deficit_or_sbp_differential","type":"boolean","description":"Pulse deficit or systolic blood-pressure differential (Rogers 2011 high-risk exam feature). true or false. Caller-assigned; magent does not measure pulses.","required":true,"example":"false"},{"in":"query","name":"focal_neuro_deficit_with_pain","type":"boolean","description":"Focal neurologic deficit in conjunction with pain (Rogers 2011 high-risk exam feature). true or false.","required":true,"example":"false"},{"in":"query","name":"new_ai_murmur_with_pain","type":"boolean","description":"New murmur of aortic insufficiency in conjunction with pain (Rogers 2011 high-risk exam feature). true or false. Caller-assigned; magent does not auscultate.","required":true,"example":"false"},{"in":"query","name":"hypotension_or_shock","type":"boolean","description":"Hypotension or shock state (Rogers 2011 high-risk exam feature). true or false.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/add-rs","citation":{"authors":"Rogers AM, Hermann LK, Booher AM, et al.","doi":"10.1161/CIRCULATIONAHA.110.988568","id":"rogers-2011","pmid":"21555704","source":"Circulation. 2011;123(20):2213-2218","title":"Sensitivity of the aortic dissection detection risk score, a novel guideline-based tool for identification of acute aortic dissection at initial presentation: results from the international registry of acute aortic dissection","url":"https://doi.org/10.1161/CIRCULATIONAHA.110.988568"},"formula_expression":"ADD-RS = 1 if any high-risk condition (Marfan/connective tissue, family aortic disease, known aortic valve disease, recent aortic manipulation, known thoracic aneurysm) + 1 if any high-risk pain feature of chest/back/abdominal pain (sudden, severe, ripping/tearing) + 1 if any high-risk exam feature (pulse deficit or SBP differential, focal neurologic deficit with pain, new AI murmur with pain, hypotension or shock); two markers in the same category still add only 1; max 3; Rogers 2011 bands 0 / 1 / 2-3 (2010 ACCF/AHA high-risk markers)","purpose":"Count how many of the three Rogers 2011 ADD-RS high-risk categories have at least one marker and return the published 0 / 1 / 2-3 band.","markdown_url":"https://magentlab.com/docs/add-rs.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"add_rs"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Category count 0-3"},{"name":"max_score","type":"integer","description":"3"},{"name":"add_rs_band","type":"string","description":"Rogers 2011 band 0, 1, or 2-3. Not an imaging order."},{"name":"components","type":"array","description":"One row per high-risk category (conditions, pain, exam), 0 or 1 each"},{"name":"citation","type":"object","description":"Rogers 2011 IRAD citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"family_aortic_disease":"false","focal_neuro_deficit_with_pain":"false","hypotension_or_shock":"false","known_aortic_valve_disease":"false","known_thoracic_aneurysm":"false","marfan_or_connective_tissue":"false","new_ai_murmur_with_pain":"false","pain_ripping_or_tearing":"false","pain_severe":"false","pain_sudden":"false","pulse_deficit_or_sbp_differential":"false","recent_aortic_manipulation":"false"},{"family_aortic_disease":"false","focal_neuro_deficit_with_pain":"false","hypotension_or_shock":"false","known_aortic_valve_disease":"false","known_thoracic_aneurysm":"false","marfan_or_connective_tissue":"false","new_ai_murmur_with_pain":"false","pain_ripping_or_tearing":"false","pain_severe":"false","pain_sudden":"false","pulse_deficit_or_sbp_differential":"false","recent_aortic_manipulation":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/add-rs","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/add-rs?marfan_or_connective_tissue=false&family_aortic_disease=false&known_aortic_valve_disease=false&recent_aortic_manipulation=false&known_thoracic_aneurysm=false&pain_sudden=false&pain_severe=false&pain_ripping_or_tearing=false&pulse_deficit_or_sbp_differential=false&focal_neuro_deficit_with_pain=false&new_ai_murmur_with_pain=false&hypotension_or_shock=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/add-rs","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/crusade","description":"CRUSADE in-hospital major bleeding score (Subherwal 2009 Table 4) for NSTE-ACS / NSTEMI. Points from hematocrit, caller-assigned Cockcroft–Gault CrCl, heart rate, sex, CHF, prior vascular disease, diabetes, and systolic BP. Returns integer score (max 96), quintile band, and published in-hospital major-bleeding percent. Not a medical device; magent does not compute CrCl or examine the patient.","parameters":[{"in":"query","name":"hematocrit_percent","type":"number","description":"Hematocrit percent (10-70). Subherwal 2009 Table 4: <31 → 9; 31–<34 → 7; 34–<37 → 3; 37–<40 → 2; ≥40 → 0.","required":true,"example":"42"},{"in":"query","name":"crcl_ml_min","type":"number","description":"Creatinine clearance in mL/min (1-300), Cockcroft–Gault as assigned by the caller. magent does not compute Cockcroft–Gault. Table 4: ≤15 → 39; >15–30 → 35; >30–60 → 28; >60–90 → 17; >90–120 → 7; >120 → 0.","required":true,"example":"130"},{"in":"query","name":"heart_rate_bpm","type":"integer","description":"Heart rate in beats per minute (integer 30-220). Table 4: ≤70 → 0; 71–80 → 1; 81–90 → 3; 91–100 → 6; 101–110 → 8; 111–120 → 10; ≥121 → 11.","required":true,"example":"65"},{"in":"query","name":"sex","type":"string","description":"Sex (female or male). Female scores 8; male scores 0.","required":true,"example":"male"},{"in":"query","name":"signs_of_chf","type":"boolean","description":"Signs of CHF at presentation as assigned by the caller. true or false. 7 points if true. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"prior_vascular_disease","type":"boolean","description":"Prior vascular disease (PAD or prior stroke) as assigned by the caller. true or false. 6 points if true.","required":true,"example":"false"},{"in":"query","name":"diabetes","type":"boolean","description":"Diabetes mellitus as assigned by the caller. true or false. 6 points if true.","required":true,"example":"false"},{"in":"query","name":"systolic_mm_hg","type":"number","description":"Systolic blood pressure in mm Hg (50-250). Table 4 is non-monotonic: ≤90 → 10; 91–100 → 8; 101–120 → 5; 121–180 → 1; 181–200 → 3; ≥201 → 5.","required":true,"example":"140"}],"errors":[{"code":"invalid_hematocrit","message":"hematocrit_percent must be a number from 10 to 70. Returned before settlement; you are not charged.","status":400},{"code":"invalid_crcl","message":"crcl_ml_min must be a number from 1 to 300 (Cockcroft-Gault mL/min as assigned by the caller). Returned before settlement; you are not charged.","status":400},{"code":"invalid_heart_rate","message":"heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_systolic_bp","message":"systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/crusade","citation":{"authors":"Subherwal S, Bach RG, Chen AY, et al.","doi":"10.1161/CIRCULATIONAHA.108.828541","id":"subherwal-2009","pmid":"19332461","source":"Circulation. 2009;119(14):1873-1882","title":"Baseline risk of major bleeding in non–ST-segment-elevation myocardial infarction: the CRUSADE Bleeding Score","url":"https://doi.org/10.1161/CIRCULATIONAHA.108.828541"},"formula_expression":"CRUSADE = hematocrit(<31:9, 31-<34:7, 34-<37:3, 37-<40:2, >=40:0) + crcl_ml_min(<=15:39, >15-30:35, >30-60:28, >60-90:17, >90-120:7, >120:0) + heart_rate(<=70:0, 71-80:1, 81-90:3, 91-100:6, 101-110:8, 111-120:10, >=121:11) + female(8) + signs_of_chf(7) + prior_vascular_disease(6) + diabetes(6) + systolic(<=90:10, 91-100:8, 101-120:5, 121-180:1, 181-200:3, >=201:5); Subherwal 2009 Table 4; quintiles <=20 3.1%, 21-30 5.5%, 31-40 8.6%, 41-50 11.9%, >50 19.5%; max 96","purpose":"Compute the CRUSADE in-hospital major bleeding score from hematocrit, caller-assigned Cockcroft–Gault creatinine clearance, heart rate, sex, signs of CHF, prior vascular disease, diabetes, and systolic BP (Subherwal 2009 Table 4).","markdown_url":"https://magentlab.com/docs/crusade.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"crusade"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Table 4 point total (integer, max 96)"},{"name":"max_score","type":"integer","description":"Always 96 (sum of Table 4 maxima)"},{"name":"crusade_band","type":"string","description":"very_low (≤20), low (21-30), moderate (31-40), high (41-50), or very_high (>50)"},{"name":"in_hospital_major_bleeding_percent","type":"number","description":"Published in-hospital major bleeding percent for the quintile: 3.1, 5.5, 8.6, 11.9, or 19.5"},{"name":"hematocrit_percent","type":"number","description":"Hematocrit percent used"},{"name":"crcl_ml_min","type":"number","description":"Caller-assigned Cockcroft–Gault creatinine clearance, mL/min"},{"name":"heart_rate_bpm","type":"integer","description":"Heart rate used, beats per minute"},{"name":"sex","type":"string","description":"female or male"},{"name":"signs_of_chf","type":"boolean","description":"Caller-assigned signs of CHF at presentation"},{"name":"prior_vascular_disease","type":"boolean","description":"Caller-assigned prior vascular disease (PAD or prior stroke)"},{"name":"diabetes","type":"boolean","description":"Caller-assigned diabetes mellitus"},{"name":"systolic_mm_hg","type":"number","description":"Systolic BP used, mm Hg"},{"name":"components","type":"array","description":"Per-factor Table 4 points"},{"name":"citation","type":"object","description":"Subherwal 2009 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"crcl_ml_min":"130","diabetes":"false","heart_rate_bpm":"65","hematocrit_percent":"42","prior_vascular_disease":"false","sex":"male","signs_of_chf":"false","systolic_mm_hg":"140"},{"crcl_ml_min":"130","diabetes":"false","heart_rate_bpm":"65","hematocrit_percent":"42","prior_vascular_disease":"false","sex":"male","signs_of_chf":"false","systolic_mm_hg":"140"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/crusade","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/crusade?hematocrit_percent=42&crcl_ml_min=130&heart_rate_bpm=65&sex=male&signs_of_chf=false&prior_vascular_disease=false&diabetes=false&systolic_mm_hg=140","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/crusade","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/dapt","description":"Yeh 2016 DAPT prediction rule after PCI: exclusive age (<65: 0; 65 to younger than 75: -1; 75 or older: -2) plus MI at presentation, prior MI or PCI, diabetes, stent diameter <3 mm, smoking (current or within past year), and paclitaxel-eluting stent (1 each); CHF or LVEF <30% and vein-graft intervention (2 each). Max 10. Score >=2 high, <2 low. Not a duration order. Not a diagnosis.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Yeh 2016 exclusive bands: younger than 65 scores 0; 65 to younger than 75 scores -1; 75 or older scores -2. Age 75 is -2, not -1.","required":true,"example":"60"},{"in":"query","name":"myocardial_infarction_at_presentation","type":"boolean","description":"Myocardial infarction at presentation as assigned by the caller (Yeh 2016). true scores 1. magent does not diagnose MI.","required":true,"example":"false"},{"in":"query","name":"prior_mi_or_pci","type":"boolean","description":"Prior myocardial infarction or prior PCI as assigned by the caller (Yeh 2016). true scores 1.","required":true,"example":"false"},{"in":"query","name":"diabetes","type":"boolean","description":"Diabetes mellitus as assigned by the caller (Yeh 2016). true scores 1.","required":true,"example":"false"},{"in":"query","name":"stent_diameter_lt_3mm","type":"boolean","description":"Stent diameter <3 mm as assigned by the caller (Yeh 2016). true scores 1. magent does not measure the stent.","required":true,"example":"false"},{"in":"query","name":"smoking","type":"boolean","description":"Current cigarette smoking or smoking within the past year as assigned by the caller (Yeh 2016). true scores 1.","required":true,"example":"false"},{"in":"query","name":"paclitaxel_eluting_stent","type":"boolean","description":"Paclitaxel-eluting stent as assigned by the caller (Yeh 2016). true scores 1.","required":true,"example":"false"},{"in":"query","name":"chf_or_lvef_lt_30","type":"boolean","description":"Congestive heart failure or LVEF <30% as assigned by the caller (Yeh 2016). true scores 2. magent does not measure LVEF.","required":true,"example":"false"},{"in":"query","name":"vein_graft_intervention","type":"boolean","description":"Vein-graft PCI as assigned by the caller (Yeh 2016). true scores 2. magent does not interpret the angiogram.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_dapt","message":"each DAPT 2016 item must be a published value for that field. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/dapt","citation":{"authors":"Yeh RW, Secemsky EA, Kereiakes DJ, et al","doi":"10.1001/jama.2016.3775","id":"yeh-2016","pmid":"27022822","source":"JAMA. 2016;315(16):1735-1749","title":"Development and Validation of a Prediction Rule for Benefit and Harm of Dual Antiplatelet Therapy Beyond 1 Year After Percutaneous Coronary Intervention","url":"https://doi.org/10.1001/jama.2016.3775"},"formula_expression":"DAPT = exclusive age (<65: 0, 65 to <75: -1, >=75: -2) + myocardial_infarction_at_presentation 1 + prior_mi_or_pci 1 + diabetes 1 + stent_diameter_lt_3mm 1 + smoking 1 + paclitaxel_eluting_stent 1 + chf_or_lvef_lt_30 2 + vein_graft_intervention 2; max 10; >=2 high, <2 low (Yeh 2016)","purpose":"Sum the Yeh 2016 DAPT prediction rule after PCI from exclusive age bands and eight caller-assigned flags and return the published high/low band.","markdown_url":"https://magentlab.com/docs/dapt.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"dapt"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Yeh 2016 DAPT points -2 to 10"},{"name":"max_score","type":"integer","description":"10"},{"name":"risk_band","type":"string","description":"Yeh 2016 band: high if score >=2 (continued thienopyridine associated with larger ischemic-event reduction); low if score <2. A band, not a duration order or diagnosis."},{"name":"age_years","type":"integer","description":"Age used for the exclusive age band"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Yeh et al. JAMA 2016 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"60","chf_or_lvef_lt_30":"false","diabetes":"false","myocardial_infarction_at_presentation":"false","paclitaxel_eluting_stent":"false","prior_mi_or_pci":"false","smoking":"false","stent_diameter_lt_3mm":"false","vein_graft_intervention":"false"},{"age":"60","chf_or_lvef_lt_30":"false","diabetes":"false","myocardial_infarction_at_presentation":"false","paclitaxel_eluting_stent":"false","prior_mi_or_pci":"false","smoking":"false","stent_diameter_lt_3mm":"false","vein_graft_intervention":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/dapt","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/dapt?age=60&myocardial_infarction_at_presentation=false&prior_mi_or_pci=false&diabetes=false&stent_diameter_lt_3mm=false&smoking=false&paclitaxel_eluting_stent=false&chf_or_lvef_lt_30=false&vein_graft_intervention=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/dapt","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/precise-dapt","description":"Costa 2017 PRECISE-DAPT nomogram after coronary stenting. Truncated linear points: age (0 at <=50, 19 at >=90), caller CrCl mL/min (0 at >=100, 25 at 0), hemoglobin g/dL (0 at >=12, 15 at <=10), WBC x10^3/uL (0 at <=5, 15 at >=20), plus 26 for previous spontaneous bleeding. Integer score 0-100; high_bleeding_risk if score >=25. Not a DAPT duration order. magent does not compute Cockcroft-Gault.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Costa 2017 Table 1 truncates below 50 and above 90. Figure 1: <=50 scores 0; >=90 scores 19; linear between. Age 18 and age 50 both score 0.","required":true,"example":"50"},{"in":"query","name":"crcl_ml_min","type":"number","description":"Creatinine clearance in mL/min (0-300) as assigned by the caller. Costa 2017 Figure 1 uses CrCl, not raw creatinine. magent does not compute Cockcroft-Gault. Truncated above 100: >=100 scores 0; 0 mL/min scores 25; linear between.","required":true,"example":"100"},{"in":"query","name":"hemoglobin_g_dl","type":"number","description":"Hemoglobin in g/dL (4-22). Table 1 truncates above 12 and below 10. Figure 1: >=12.0 scores 0; <=10.0 scores 15; linear between. magent does not assay hemoglobin.","required":true,"example":"12"},{"in":"query","name":"wbc_k_ul","type":"number","description":"White-blood-cell count in x10^3 cells per uL, same as x10^9/L (0.1-100). Table 1 truncates below 5 and above 20. Figure 1: <=5 scores 0; >=20 scores 15; linear between. magent does not assay WBC.","required":true,"example":"5"},{"in":"query","name":"previous_spontaneous_bleeding","type":"boolean","description":"Previous spontaneous bleeding as assigned by the caller (Costa 2017). true scores 26; false scores 0. magent does not take a bleeding history.","required":true,"example":"false"}],"errors":[{"code":"invalid_precise_dapt","message":"PRECISE-DAPT needs Costa 2017 age, creatinine clearance, hemoglobin, WBC, and prior spontaneous bleeding in published ranges. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/precise-dapt","citation":{"authors":"Costa F, van Klaveren D, James S, et al","doi":"10.1016/S0140-6736(17)30397-5","id":"costa-2017","pmid":"28290994","source":"Lancet. 2017;389(10073):1025-1034","title":"Derivation and validation of the predicting bleeding complications in patients undergoing stent implantation and subsequent dual antiplatelet therapy (PRECISE-DAPT) score: a pooled analysis of individual-patient datasets from clinical trials","url":"https://doi.org/10.1016/S0140-6736(17)30397-5"},"formula_expression":"PRECISE-DAPT = age_points + crcl_points + hemoglobin_points + wbc_points + previous_bleed_points (Costa 2017 Figure 1 nomogram; Table 1 truncated linear terms); age years truncated 50-90 (0 at <=50, 19 at >=90); caller-assigned CrCl mL/min truncated 0-100 (0 at >=100, 25 at 0; magent does not compute Cockcroft-Gault); hemoglobin g/dL truncated 10-12 (0 at >=12, 15 at <=10); WBC x10^3 cells/uL truncated 5-20 (0 at <=5, 15 at >=20); previous spontaneous bleeding 26 if true else 0; integer score is the rounded sum (0-100); high_bleeding_risk iff score >=25","purpose":"Sum Costa 2017 Figure 1 PRECISE-DAPT nomogram points from age, caller-assigned creatinine clearance, hemoglobin, white-blood-cell count, and previous spontaneous bleeding, and return whether the total is in the published high-bleeding-risk stratum (score >=25).","markdown_url":"https://magentlab.com/docs/precise-dapt.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"precise_dapt"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Rounded Costa 2017 Figure 1 nomogram total (0-100)"},{"name":"max_score","type":"integer","description":"100"},{"name":"high_bleeding_risk","type":"boolean","description":"true iff score >=25, the Costa 2017 high-risk stratum used to compare DAPT duration. No other cutoffs."},{"name":"age_years","type":"integer","description":"Age used"},{"name":"crcl_ml_min","type":"number","description":"Caller-assigned creatinine clearance, mL/min"},{"name":"hemoglobin_g_dl","type":"number","description":"Hemoglobin used, g/dL"},{"name":"wbc_k_ul","type":"number","description":"WBC used, x10^3 cells per uL"},{"name":"previous_spontaneous_bleeding","type":"boolean","description":"Caller-assigned previous spontaneous bleeding"},{"name":"components","type":"array","description":"Per-factor Figure 1 points"},{"name":"citation","type":"object","description":"Costa et al. Lancet 2017 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"50","crcl_ml_min":"100","hemoglobin_g_dl":"12","previous_spontaneous_bleeding":"false","wbc_k_ul":"5"},{"age":"50","crcl_ml_min":"100","hemoglobin_g_dl":"12","previous_spontaneous_bleeding":"false","wbc_k_ul":"5"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/precise-dapt","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/precise-dapt?age=50&crcl_ml_min=100&hemoglobin_g_dl=12&wbc_k_ul=5&previous_spontaneous_bleeding=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/precise-dapt","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/action-icu","description":"Fanaroff 2018 ACTION ICU integer score (Table 3) for initially hemodynamically stable NSTEMI. Points from age, creatinine, heart rate, systolic BP (lower SBP scores more), troponin × ULN, HF signs, ST depression, absence of prior revascularization, and chronic lung disease. Returns integer score 0–19. Not a medical device or triage order; magent does not read an ECG or assay labs.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Fanaroff 2018 Table 3: younger than 70 scores 0; 70 or older scores 1.","required":true,"example":"66"},{"in":"query","name":"creatinine_mg_dl","type":"number","description":"Serum creatinine in mg/dL (0.1-20), or creatinine_umol_l (9-1768) converted as mg/dL = µmol/L / 88.42. Table 3: <1.1 → 0; ≥1.1 → 1. magent does not assay labs.","required":true,"example":"1.0"},{"in":"query","name":"heart_rate_bpm","type":"integer","description":"Heart rate in beats per minute (integer 30-220). Table 3 lists <85 → 0; 85–100 → 1; ≥100 → 3. The overlapping bound at 100 uses the ≥100 row (3 points).","required":true,"example":"80"},{"in":"query","name":"systolic_mm_hg","type":"number","description":"Systolic blood pressure in mm Hg (50-250). Table 3: <125 → 3; 125–145 → 1; ≥145 → 0. Lower SBP scores more. The overlapping bound at 145 uses the ≥145 row (0 points).","required":true,"example":"150"},{"in":"query","name":"troponin_x_uln","type":"number","description":"Initial troponin as a multiple of the local upper limit of normal (0-1000). Table 3: <12 → 0; ≥12 → 2. magent does not assay labs; the caller assigns the ratio.","required":true,"example":"1"},{"in":"query","name":"heart_failure","type":"boolean","description":"Signs or symptoms of heart failure on first medical contact as assigned by the caller (Fanaroff 2018 Table 3). true or false. 5 points if true. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"st_depression","type":"boolean","description":"ST-segment depression on the ECG as assigned by the caller (Fanaroff 2018 Table 3). true or false. 1 point if true. magent does not read an ECG.","required":true,"example":"false"},{"in":"query","name":"prior_revascularization","type":"boolean","description":"Prior coronary revascularization as assigned by the caller (Fanaroff 2018 Table 3). true or false. Absence of prior revascularization scores 1; presence scores 0.","required":true,"example":"true"},{"in":"query","name":"chronic_lung_disease","type":"boolean","description":"Chronic lung disease as assigned by the caller (Fanaroff 2018 Table 3). true or false. 2 points if true.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_creatinine","message":"creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_heart_rate","message":"heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.","status":400},{"code":"invalid_systolic_bp","message":"systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.","status":400},{"code":"invalid_troponin_uln","message":"troponin_x_uln must be a number from 0 to 1000 (ratio to the local ULN). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/action-icu","citation":{"authors":"Fanaroff AC, Chen AY, Thomas LE, et al","doi":"10.1161/JAHA.118.008894","id":"fanaroff-2018","pmid":"29802146","source":"J Am Heart Assoc. 2018;7(11):e008894","title":"Risk Score to Predict Need for Intensive Care in Initially Hemodynamically Stable Adults With Non–ST-Segment–Elevation Myocardial Infarction","url":"https://doi.org/10.1161/JAHA.118.008894"},"formula_expression":"ACTION ICU = age(<70:0, >=70:1) + creatinine_mg_dl(<1.1:0, >=1.1:1) + heart_rate_bpm(<85:0, 85-<100:1, >=100:3) + systolic_mm_hg(<125:3, 125-<145:1, >=145:0) + troponin_x_uln(<12:0, >=12:2) + heart_failure(5) + st_depression(1) + no_prior_revascularization(1) + chronic_lung_disease(2); Fanaroff 2018 Table 3; max 19; overlapping Table 3 bounds at HR 100 and SBP 145 use the >= row; score <=2 very low (<5% ICU-complication likelihood); <=5 <10%; >=12 >30%","purpose":"Compute the Fanaroff 2018 ACTION ICU integer score (Table 3, max 19) from age, serum creatinine, heart rate, systolic BP, initial troponin × ULN, and caller-assigned heart-failure signs, ST depression, prior revascularization, and chronic lung disease.","markdown_url":"https://magentlab.com/docs/action-icu.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"action_icu"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Fanaroff 2018 Table 3 point total (integer, max 19)"},{"name":"max_score","type":"integer","description":"Always 19 (sum of Table 3 maxima)"},{"name":"age_years","type":"integer","description":"Age used for the <70 / ≥70 bands"},{"name":"creatinine_mg_dl","type":"number","description":"Serum creatinine used, mg/dL"},{"name":"heart_rate_bpm","type":"integer","description":"Heart rate used, beats per minute"},{"name":"systolic_mm_hg","type":"number","description":"Systolic BP used, mm Hg"},{"name":"troponin_x_uln","type":"number","description":"Caller-assigned initial troponin as a multiple of local ULN"},{"name":"heart_failure","type":"boolean","description":"Caller-assigned signs or symptoms of HF"},{"name":"st_depression","type":"boolean","description":"Caller-assigned ST-segment depression"},{"name":"prior_revascularization","type":"boolean","description":"Caller-assigned prior coronary revascularization (true scores 0; false scores 1)"},{"name":"chronic_lung_disease","type":"boolean","description":"Caller-assigned chronic lung disease"},{"name":"components","type":"array","description":"Per-factor Table 3 points"},{"name":"citation","type":"object","description":"Fanaroff 2018 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"66","chronic_lung_disease":"false","creatinine_mg_dl":"1.0","heart_failure":"false","heart_rate_bpm":"80","prior_revascularization":"true","st_depression":"false","systolic_mm_hg":"150","troponin_x_uln":"1"},{"age":"66","chronic_lung_disease":"false","creatinine_mg_dl":"1.0","heart_failure":"false","heart_rate_bpm":"80","prior_revascularization":"true","st_depression":"false","systolic_mm_hg":"150","troponin_x_uln":"1"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/action-icu","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/action-icu?age=66&creatinine_mg_dl=1.0&heart_rate_bpm=80&systolic_mm_hg=150&troponin_x_uln=1&heart_failure=false&st_depression=false&prior_revascularization=true&chronic_lung_disease=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/action-icu","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/duke-treadmill","description":"Mark 1991 Duke treadmill score: duke_treadmill_score = exercise_min - (5 * st_deviation_mm) - (4 * angina_index), 1 decimal. Angina index 0 none, 1 nonlimiting, 2 exercise-limiting. High if score < -10, moderate -10 to 4, low >= 5. Not a catheterization order, CAD diagnosis, or Bruce-protocol prescription. magent does not read the ECG.","parameters":[{"in":"query","name":"exercise_min","type":"number","description":"Bruce-protocol exercise duration in minutes (number 0-21). Mark 1991. Not a Bruce-protocol prescription.","required":true,"example":"10"},{"in":"query","name":"st_deviation_mm","type":"number","description":"Maximal net ST-segment deviation during or after exercise in millimetres (number 0-10). Mark 1991. magent does not read the ECG.","required":true,"example":"1"},{"in":"query","name":"angina_index","type":"integer","enum":[0,1,2],"description":"Mark 1991 angina index: 0 no angina during exercise, 1 nonlimiting angina, 2 exercise-limiting angina. Integer 0, 1, or 2.","required":true,"example":"0"}],"errors":[{"code":"invalid_exercise_min","message":"exercise_min must be a number from 0 to 21 (Mark 1991 Bruce protocol minutes). Returned before settlement; you are not charged.","status":400},{"code":"invalid_st_deviation_mm","message":"st_deviation_mm must be a number from 0 to 10 (Mark 1991 maximal ST deviation in millimetres). Returned before settlement; you are not charged.","status":400},{"code":"invalid_angina_index","message":"angina_index must be 0 (none), 1 (nonlimiting), or 2 (exercise-limiting) (Mark 1991). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/duke-treadmill","citation":{"authors":"Mark DB, Shaw L, Harrell FE Jr, Hlatky MA, Lee KL, Bengtson JR, McCants CB, Califf RM, Pryor DB","doi":"10.1056/NEJM199109193251204","id":"mark-1991","pmid":"1875969","source":"N Engl J Med. 1991;325(12):849-853","title":"Prognostic value of a treadmill exercise score in outpatients with suspected coronary artery disease","url":"https://doi.org/10.1056/NEJM199109193251204"},"formula_expression":"duke_treadmill_score = exercise_min - (5 * st_deviation_mm) - (4 * angina_index)","purpose":"Compute the Mark 1991 Duke treadmill score from Bruce-protocol exercise duration in minutes, maximal net ST-segment deviation in millimetres, and angina index (0 none, 1 nonlimiting, 2 exercise-limiting), with the paper’s illustrative three-group cutoffs.","markdown_url":"https://magentlab.com/docs/duke-treadmill.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"duke_treadmill"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"exercise_min","type":"number","description":"Bruce-protocol exercise duration used, minutes"},{"name":"st_deviation_mm","type":"number","description":"Maximal net ST-segment deviation used, millimetres"},{"name":"angina_index","type":"integer","description":"Angina index used: 0 none, 1 nonlimiting, 2 exercise-limiting"},{"name":"duke_treadmill_score","type":"number","description":"Mark 1991 Duke treadmill score, 1 decimal"},{"name":"duke_band","type":"string","description":"Mark 1991 illustrative groups: high (score < -10), moderate (-10 ≤ score ≤ 4), low (score ≥ 5). Not a catheterization order and not a CAD diagnosis."},{"name":"citation","type":"object","description":"Mark 1991 NEJM citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"angina_index":"0","exercise_min":"10","st_deviation_mm":"1"},{"angina_index":"0","exercise_min":"10","st_deviation_mm":"1"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/duke-treadmill","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/duke-treadmill?exercise_min=10&st_deviation_mm=1&angina_index=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/duke-treadmill","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/mhs","description":"Marburg Heart Score (Bösner 2010 Table 3): five 1-point determinants (age/sex, known vascular disease, patient assumes cardiac origin, pain worse with exercise, pain not reproducible by palpation), max 5. Returns the published discrimination cut-off: positive (3-5) or negative (<=2). Primary-care chest-pain rule only; not an ED ACS rule-out, diagnosis, or admission order. magent does not interview the patient.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Combined with sex: female ≥65 or male ≥55 scores 1 (Bösner 2010 Table 3). magent computes this; do not send a precomputed flag.","required":true,"example":"40"},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"female or male. Combined with age: female ≥65 or male ≥55 scores 1 (Bösner 2010 Table 3).","required":true,"example":"female"},{"in":"query","name":"known_vascular_disease","type":"boolean","description":"Known clinical vascular disease: coronary, cerebrovascular, or peripheral (Bösner 2010). true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"assumes_cardiac_origin","type":"boolean","description":"Patient assumes the pain is of cardiac origin (Bösner 2010). true or false as assigned by the caller. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"pain_worse_exercise","type":"boolean","description":"Pain worse with exercise (Bösner 2010). true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"pain_not_reproducible","type":"boolean","description":"Pain is not reproducible by palpation (Bösner 2010). true when that published finding is present; false if pain is reproducible. Assigned by the caller.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/mhs","citation":{"authors":"Bösner S, Haasenritter J, Becker A, Karatolios K, Vaucher P, Gencer B, Herzig L, Heinzel-Gutenbrunner M, Schaefer JR, Abu Hani M, Keller H, Sönnichsen AC, Baum E, Donner-Banzhoff N","doi":"10.1503/cmaj.100212","id":"bosner-2010","pmid":"20603345","source":"CMAJ. 2010;182(12):1295-1300","title":"Ruling out coronary artery disease in primary care: development and validation of a simple prediction rule","url":"https://doi.org/10.1503/cmaj.100212"},"formula_expression":"MHS = age_sex (female ≥65 or male ≥55) + known_vascular_disease + assumes_cardiac_origin + pain_worse_exercise + pain_not_reproducible; each 1; max 5; positive 3–5, negative ≤2 (Bösner 2010 Table 3)","purpose":"Sum the five Bösner 2010 Marburg Heart Score determinants and return the published positive (3–5) or negative (≤2) cut-off.","markdown_url":"https://magentlab.com/docs/mhs.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"mhs"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"MHS points 0-5"},{"name":"max_score","type":"integer","description":"5"},{"name":"mhs_result","type":"string","description":"Published Bösner 2010 discrimination cut-off: positive (3-5) or negative (≤2). Not a diagnosis or admission order."},{"name":"sex","type":"string","description":"female or male used with age for the age/sex determinant"},{"name":"age_years","type":"integer","description":"Age used with sex for the age/sex determinant"},{"name":"components","type":"array","description":"Per-determinant points"},{"name":"citation","type":"object","description":"Bösner et al. CMAJ 2010 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"40","assumes_cardiac_origin":"false","known_vascular_disease":"false","pain_not_reproducible":"false","pain_worse_exercise":"false","sex":"female"},{"age":"40","assumes_cardiac_origin":"false","known_vascular_disease":"false","pain_not_reproducible":"false","pain_worse_exercise":"false","sex":"female"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/mhs","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/mhs?age=40&sex=female&known_vascular_disease=false&assumes_cardiac_origin=false&pain_worse_exercise=false&pain_not_reproducible=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/mhs","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/ccs-angina","description":"CCS angina of effort class 1-4 as assigned by the caller (Campeau 1976 Table 1). Returns class, score, max 4, and the published class description. Class 1-4 only; no class 0. magent does not walk the patient, interpret a treadmill, or examine the patient. Not an ACS diagnosis, not NYHA, and not a silent-ischemia screen.","parameters":[{"in":"query","name":"ccs_class","type":"integer","description":"CCS angina of effort class 1-4 as assigned by the caller (Campeau 1976 Table 1: 1 ordinary activity does not cause angina; angina with strenuous or rapid or prolonged exertion at work or recreation; 2 slight limitation of ordinary activity, including walking more than 2 blocks or climbing more than one flight of ordinary stairs at a normal pace; 3 marked limitation, walking one to two blocks or climbing one flight of stairs in normal conditions; 4 inability to carry on any physical activity without discomfort, anginal syndrome may be present at rest). magent does not examine the patient.","required":true,"example":"1"}],"errors":[{"code":"invalid_ccs_angina","message":"ccs_class must be an integer 1, 2, 3, or 4 (Campeau 1976). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/ccs-angina","citation":{"authors":"Campeau L","doi":"10.1161/circ.54.3.947585","id":"campeau-1976","pmid":"947585","source":"Circulation. 1976;54(3):522-523","title":"Grading of angina pectoris","url":"https://doi.org/10.1161/circ.54.3.947585"},"formula_expression":"CCS angina of effort class 1-4 as assigned by the caller (Campeau 1976 Table 1); not a treadmill interpretation","purpose":"Return the Campeau 1976 CCS angina of effort class 1-4 from a caller-assigned integer, with the published Table 1 class description.","markdown_url":"https://magentlab.com/docs/ccs-angina.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"ccs_angina"},{"name":"formula_expression","type":"string","description":"Published class rule"},{"name":"ccs_class","type":"integer","description":"Caller-assigned class 1-4"},{"name":"score","type":"integer","description":"Same as ccs_class"},{"name":"max_score","type":"integer","description":"4"},{"name":"description","type":"string","description":"1976 Table 1 wording for that class"},{"name":"components","type":"array","description":"CCS-class component"},{"name":"citation","type":"object","description":"Campeau 1976"},{"name":"disclaimer","type":"string","description":"Not a medical device"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"ccs_class":"1"},{"ccs_class":"1"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/ccs-angina","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/ccs-angina?ccs_class=1","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/ccs-angina","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/aub-has2","description":"Dakik 2019 AUB-HAS2 for 30-day death/MI/stroke after noncardiac surgery: six 1-point elements (history of heart disease, angina or dyspnea, age ≥75, hemoglobin <12 g/dL, vascular surgery, emergency surgery). Low 0-1, intermediate 2-3, high >3 (max 6). Derivation rates 0%, 0.5%, 2.0%, 5.6%, 15.7% by score 0/1/2/3/>3. Not a medical device, not RCRI, not ACS treatment, and not operative clearance.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Age ≥75 scores 1 (Dakik 2019). 75 scores; 74 does not.","required":true,"example":"50"},{"in":"query","name":"hemoglobin_g_dl","type":"number","description":"Hemoglobin in g/dL (3-22). Provide this or hemoglobin_g_l, not both. Dakik 2019 writes mg/dl; clinical use is g/dL. <12 g/dL scores 1 (11.9 scores; 12.0 does not). magent does not assay hemoglobin.","required":false,"example":"13"},{"in":"query","name":"hemoglobin_g_l","type":"number","description":"Hemoglobin in g/L (30-220). Converted as hemoglobin_g_dl = hemoglobin_g_l / 10. Provide this or hemoglobin_g_dl, not both.","required":false,"example":"130"},{"in":"query","name":"history_of_heart_disease","type":"boolean","description":"History of heart disease as assigned by the caller (Dakik 2019). true or false. magent does not take a cardiac history. 1 point if true.","required":true,"example":"false"},{"in":"query","name":"angina_or_dyspnea","type":"boolean","description":"Symptoms of angina or dyspnea as assigned by the caller (Dakik 2019). true or false. magent does not take a symptom history. 1 point if true.","required":true,"example":"false"},{"in":"query","name":"vascular_surgery","type":"boolean","description":"Vascular surgery as assigned by the caller (Dakik 2019). true or false. 1 point if true.","required":true,"example":"false"},{"in":"query","name":"emergency_surgery","type":"boolean","description":"Emergency surgery as assigned by the caller (Dakik 2019). true or false. 1 point if true.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_hemoglobin","message":"hemoglobin_g_l (30-220) or hemoglobin_g_dl (3-22) is required, not both. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/aub-has2","citation":{"authors":"Dakik HA, Chehab O, Eldirani M, Sbeity E, Karam C, Abou Hassan O, Msheik A, Kaspar C, Makki M, Tamim H","doi":"10.1016/j.jacc.2019.04.023","id":"dakik-2019","pmid":"31221255","source":"J Am Coll Cardiol. 2019;73(24):3067-3078","title":"A New Index for Pre-Operative Cardiovascular Evaluation","url":"https://doi.org/10.1016/j.jacc.2019.04.023"},"formula_expression":"AUB-HAS2 = history_of_heart_disease + angina_or_dyspnea + (age ≥75) + (hemoglobin <12 g/dL) + vascular_surgery + emergency_surgery; each 1; max 6; low 0-1, intermediate 2-3, high >3","purpose":"Sum the six Dakik 2019 AUB-HAS2 1-point elements and return the integer score with low / intermediate / high bands.","markdown_url":"https://magentlab.com/docs/aub-has2.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"aub_has2"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"AUB-HAS2 points 0-6"},{"name":"max_score","type":"integer","description":"Always 6"},{"name":"risk_band","type":"string","description":"low (0-1), intermediate (2-3), or high (>3 / 4-6)"},{"name":"derivation_event_rate_percent","type":"number","description":"Dakik 2019 derivation 30-day death/MI/stroke percent by integer score: 0, 0.5, 2.0, 5.6, or 15.7 (>3)"},{"name":"age_years","type":"integer","description":"Age used (years)"},{"name":"hemoglobin_g_dl","type":"number","description":"Hemoglobin used in g/dL (g/L inputs converted as g/dL = g/L / 10)"},{"name":"history_of_heart_disease","type":"boolean","description":"Caller-assigned history-of-heart-disease flag used"},{"name":"angina_or_dyspnea","type":"boolean","description":"Caller-assigned angina-or-dyspnea flag used"},{"name":"vascular_surgery","type":"boolean","description":"Caller-assigned vascular-surgery flag used"},{"name":"emergency_surgery","type":"boolean","description":"Caller-assigned emergency-surgery flag used"},{"name":"components","type":"array","description":"Per-element points"},{"name":"citation","type":"object","description":"Dakik 2019 JACC citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"50","angina_or_dyspnea":"false","emergency_surgery":"false","hemoglobin_g_dl":"13","history_of_heart_disease":"false","vascular_surgery":"false"},{"age":"50","angina_or_dyspnea":"false","emergency_surgery":"false","hemoglobin_g_dl":"13","history_of_heart_disease":"false","vascular_surgery":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/aub-has2","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/aub-has2?age=50&hemoglobin_g_dl=13&history_of_heart_disease=false&angina_or_dyspnea=false&vascular_surgery=false&emergency_surgery=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/aub-has2","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/interchest","description":"Aerts 2017 INTERCHEST: six equally weighted predictors for CAD in primary-care chest pain (age ≥55 male or ≥65 female +1; physician suspected serious +1; history of CAD +1; pain on exertion +1; pressure quality +1; pain reproducible on palpation −1). Range −1 to 5. CAD considered absent iff score <2. Published CAD probability 2.1% (95% CI 1.1–3.9) when <2 and 43.0% (35.8–50.4) when ≥2 in the 13.2% prevalence setting. Not HEART, not EDACS. magent does not examine the chest.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Combined with sex: female ≥65 or male ≥55 scores 1 (Aerts 2017). Age 54 male does not score; 55 male does. Age 64 female does not; 65 female does. magent computes this; do not send a precomputed flag.","required":true,"example":"40"},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"female or male (required). Combined with age: female ≥65 or male ≥55 scores 1 (Aerts 2017).","required":true,"example":"female"},{"in":"query","name":"physician_suspected_serious","type":"boolean","description":"Physician initially suspected a serious diagnosis (Aerts 2017). true or false as assigned by the caller. magent does not examine the chest. +1 if true.","required":true,"example":"false"},{"in":"query","name":"history_of_cad","type":"boolean","description":"History of coronary artery disease (Aerts 2017). true or false as assigned by the caller. magent does not take a cardiac history. +1 if true.","required":true,"example":"false"},{"in":"query","name":"pain_on_exertion","type":"boolean","description":"Pain related to exertion (Aerts 2017). true or false as assigned by the caller. +1 if true.","required":true,"example":"false"},{"in":"query","name":"pressure_quality","type":"boolean","description":"Pain has a pressure quality (Aerts 2017). true or false as assigned by the caller. +1 if true.","required":true,"example":"false"},{"in":"query","name":"pain_reproducible_on_palpation","type":"boolean","description":"Pain reproducible on chest-wall palpation (Aerts 2017). true or false as assigned by the caller. magent does not examine the chest. −1 if true.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/interchest","citation":{"authors":"Aerts M, Minalu G, Bösner S, Buntinx F, Burnand B, Haasenritter J, Herzig L, Knottnerus JA, Nilsson S, Renier W, Sox C, Sox H, Donner-Banzhoff N, International Working Group on Chest Pain in Primary Care (INTERCHEST)","doi":"10.1016/j.jclinepi.2016.09.011","id":"aerts-2017","pmid":"27773828","source":"J Clin Epidemiol. 2017;81:120-128","title":"Pooled individual patient data from five countries were used to derive a clinical prediction rule for coronary artery disease in primary care","url":"https://doi.org/10.1016/j.jclinepi.2016.09.011"},"formula_expression":"INTERCHEST = (age ≥55 if male or ≥65 if female) + physician_suspected_serious + history_of_cad + pain_on_exertion + pressure_quality − pain_reproducible_on_palpation; each ±1; range −1 to 5; CAD considered absent iff score <2 (Aerts 2017); CAD probability 2.1% (95% CI 1.1–3.9) when <2 and 43.0% (35.8–50.4) when ≥2 in the 13.2% prevalence setting","purpose":"Sum the six Aerts 2017 INTERCHEST predictors and return whether CAD is considered absent (score <2) with the published binary-cutoff probabilities.","markdown_url":"https://magentlab.com/docs/interchest.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"interchest"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"INTERCHEST points -1 to 5"},{"name":"max_score","type":"integer","description":"5"},{"name":"min_score","type":"integer","description":"-1"},{"name":"cad_absent","type":"boolean","description":"true iff score <2 (Aerts 2017 CAD-absent cutoff). Not a diagnosis or rule-out."},{"name":"cad_probability_percent","type":"number","description":"Aerts 2017 published CAD probability at the binary cutoff only: 2.1 when score <2, 43.0 when score ≥2, in the 13.2% prevalence setting"},{"name":"cad_probability_ci_low_percent","type":"number","description":"Lower 95% CI of that published probability: 1.1 when <2, 35.8 when ≥2"},{"name":"cad_probability_ci_high_percent","type":"number","description":"Upper 95% CI of that published probability: 3.9 when <2, 50.4 when ≥2"},{"name":"prevalence_setting_percent","type":"number","description":"Aerts 2017 pooled-data CAD prevalence setting (13.2) for those percents"},{"name":"sex","type":"string","description":"female or male used with age for the age/sex predictor"},{"name":"age_years","type":"integer","description":"Age used with sex for the age/sex predictor"},{"name":"components","type":"array","description":"Per-predictor points"},{"name":"citation","type":"object","description":"Aerts et al. J Clin Epidemiol 2017 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"40","history_of_cad":"false","pain_on_exertion":"false","pain_reproducible_on_palpation":"false","physician_suspected_serious":"false","pressure_quality":"false","sex":"female"},{"age":"40","history_of_cad":"false","pain_on_exertion":"false","pain_reproducible_on_palpation":"false","physician_suspected_serious":"false","pressure_quality":"false","sex":"female"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/interchest","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/interchest?age=40&sex=female&physician_suspected_serious=false&history_of_cad=false&pain_on_exertion=false&pressure_quality=false&pain_reproducible_on_palpation=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/interchest","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/arc-hbr","description":"ARC-HBR (Urban 2019 Table 3). High bleeding risk at PCI iff ≥1 major or ≥2 minor. Binary; no weighted point score. Caller-assigned booleans; magent does not assay labs or read NIHSS. Mutex (400): severe vs moderate CKD, Hb <11 vs mild anemia, major vs minor bleed, moderate-severe stroke <6 mo vs any other ischemic stroke. Not a DAPT duration. Not a medical device.","parameters":[{"in":"query","name":"anticipated_long_term_oac","type":"boolean","description":"Anticipated use of long-term oral anticoagulation as assigned by the caller (Urban 2019 Table 3 major). Paper footnote excludes vascular-protection doses; that exclusion is a limitation, not a separate param. true or false. magent does not prescribe anticoagulation.","required":true,"example":"false"},{"in":"query","name":"severe_or_esrd_ckd","type":"boolean","description":"Severe or end-stage CKD (eGFR <30 mL/min) as assigned by the caller (Urban 2019 Table 3 major). Mutually exclusive with moderate_ckd. true or false. magent does not assay creatinine or compute eGFR.","required":true,"example":"false"},{"in":"query","name":"hemoglobin_lt_11","type":"boolean","description":"Hemoglobin <11 g/dL as assigned by the caller (Urban 2019 Table 3 major). Mutually exclusive with mild_anemia. true or false. magent does not assay hemoglobin.","required":true,"example":"false"},{"in":"query","name":"spontaneous_bleed_major","type":"boolean","description":"Spontaneous bleeding requiring hospitalization or transfusion in the past 6 months, or recurrent at any time, as assigned by the caller (Urban 2019 Table 3 major). Mutually exclusive with spontaneous_bleed_minor. true or false.","required":true,"example":"false"},{"in":"query","name":"thrombocytopenia_lt_100","type":"boolean","description":"Baseline platelet count <100×10^9/L before PCI as assigned by the caller (Urban 2019 Table 3 major). true or false. magent does not assay platelets.","required":true,"example":"false"},{"in":"query","name":"chronic_bleeding_diathesis","type":"boolean","description":"Chronic bleeding diathesis as assigned by the caller (Urban 2019 Table 3 major). true or false. magent does not diagnose a coagulopathy.","required":true,"example":"false"},{"in":"query","name":"cirrhosis_with_portal_hypertension","type":"boolean","description":"Liver cirrhosis with portal hypertension as assigned by the caller (Urban 2019 Table 3 major). true or false. magent does not diagnose cirrhosis.","required":true,"example":"false"},{"in":"query","name":"active_malignancy_12mo","type":"boolean","description":"Active malignancy (excluding nonmelanoma skin cancer) as assigned by the caller: diagnosis within 12 months and/or ongoing treatment (Urban 2019 Table 3 major). true or false. magent does not diagnose cancer.","required":true,"example":"false"},{"in":"query","name":"previous_spontaneous_ich","type":"boolean","description":"Previous spontaneous intracranial hemorrhage at any time as assigned by the caller (Urban 2019 Table 3 major). true or false. magent does not read imaging.","required":true,"example":"false"},{"in":"query","name":"traumatic_ich_12mo","type":"boolean","description":"Previous traumatic intracranial hemorrhage within the past 12 months as assigned by the caller (Urban 2019 Table 3 major). true or false. magent does not read imaging.","required":true,"example":"false"},{"in":"query","name":"bavm","type":"boolean","description":"Brain arteriovenous malformation as assigned by the caller (Urban 2019 Table 3 major). true or false. magent does not read imaging.","required":true,"example":"false"},{"in":"query","name":"moderate_severe_ischemic_stroke_6mo","type":"boolean","description":"Moderate or severe ischemic stroke (NIHSS ≥5 on presentation) within the past 6 months as assigned by the caller (Urban 2019 Table 3 major). Mutually exclusive with any_ischemic_stroke_not_major. true or false. magent does not assign NIHSS.","required":true,"example":"false"},{"in":"query","name":"nondeferrable_major_surgery_dapt","type":"boolean","description":"Nondeferrable major surgery on DAPT as assigned by the caller (Urban 2019 Table 3 major). true or false. magent does not schedule surgery.","required":true,"example":"false"},{"in":"query","name":"recent_major_surgery_or_trauma_30d","type":"boolean","description":"Recent major surgery or major trauma within 30 days before PCI as assigned by the caller (Urban 2019 Table 3 major). true or false. magent does not date the event.","required":true,"example":"false"},{"in":"query","name":"age_ge_75","type":"boolean","description":"Age ≥75 years as assigned by the caller (Urban 2019 Table 3 minor). true or false. magent does not take a numeric age.","required":true,"example":"true"},{"in":"query","name":"moderate_ckd","type":"boolean","description":"Moderate CKD (eGFR 30–59 mL/min) as assigned by the caller (Urban 2019 Table 3 minor). Mutually exclusive with severe_or_esrd_ckd. true or false. magent does not assay creatinine or compute eGFR.","required":true,"example":"false"},{"in":"query","name":"mild_anemia","type":"boolean","description":"Mild anemia (hemoglobin 11–12.9 g/dL in men or 11–11.9 g/dL in women) as assigned by the caller (Urban 2019 Table 3 minor). Mutually exclusive with hemoglobin_lt_11. true or false. magent does not take sex or hemoglobin numbers.","required":true,"example":"false"},{"in":"query","name":"spontaneous_bleed_minor","type":"boolean","description":"Spontaneous bleeding requiring hospitalization or transfusion within the past 12 months that does not meet the major criterion, as assigned by the caller (Urban 2019 Table 3 minor). Mutually exclusive with spontaneous_bleed_major. true or false.","required":true,"example":"false"},{"in":"query","name":"long_term_nsaid_or_steroid","type":"boolean","description":"Long-term oral NSAID or steroid use (planned daily intake ≥4 days per week) as assigned by the caller (Urban 2019 Table 3 minor). true or false. magent does not prescribe NSAIDs or steroids.","required":true,"example":"false"},{"in":"query","name":"any_ischemic_stroke_not_major","type":"boolean","description":"Any ischemic stroke at any time that does not meet the major stroke criterion, as assigned by the caller (Urban 2019 Table 3 minor). Mutually exclusive with moderate_severe_ischemic_stroke_6mo. true or false. magent does not assign NIHSS.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_arc_hbr","message":"major and minor pairs cannot both be true for CKD, anemia, spontaneous bleeding, or ischemic stroke (Urban 2019 ARC-HBR Table 3). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/arc-hbr","citation":{"authors":"Urban P, Mehran R, Colleran R, Angiolillo DJ, Byrne RA, Capodanno D, Cuisset T, Cutlip D, Eerdmans P, Eikelboom J, Farb A, Gibson CM, Gregson J, Haude M, James SK, Kim HS, Kimura T, Konishi A, Laschinger J, Leon MB, Magee PFA, Price MJ, Salett E, Schulz C, Valgimigli M, Varenne O, Yeh RW, Krucoff MW","doi":"10.1161/CIRCULATIONAHA.119.040167","id":"urban-2019","pmid":"31116032","source":"Circulation. 2019;140(3):240-261","title":"Defining High Bleeding Risk in Patients Undergoing Percutaneous Coronary Intervention: A Consensus Document From the Academic Research Consortium for High Bleeding Risk","url":"https://doi.org/10.1161/CIRCULATIONAHA.119.040167"},"formula_expression":"high_bleeding_risk iff major_count >= 1 or minor_count >= 2 (Urban 2019 Table 3). Binary HBR; not a weighted point score. Majors: anticipated_long_term_oac, severe_or_esrd_ckd, hemoglobin_lt_11, spontaneous_bleed_major, thrombocytopenia_lt_100, chronic_bleeding_diathesis, cirrhosis_with_portal_hypertension, active_malignancy_12mo, previous_spontaneous_ich, traumatic_ich_12mo, bavm, moderate_severe_ischemic_stroke_6mo, nondeferrable_major_surgery_dapt, recent_major_surgery_or_trauma_30d. Minors: age_ge_75, moderate_ckd, mild_anemia, spontaneous_bleed_minor, long_term_nsaid_or_steroid, any_ischemic_stroke_not_major","purpose":"Apply Urban 2019 Academic Research Consortium high bleeding risk (ARC-HBR) Table 3 and return whether caller-assigned major and minor criteria meet high bleeding risk at PCI (≥1 major or ≥2 minor).","markdown_url":"https://magentlab.com/docs/arc-hbr.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"arc_hbr"},{"name":"formula_expression","type":"string","description":"Urban 2019 Table 3 binary ARC-HBR rule (≥1 major or ≥2 minor)"},{"name":"high_bleeding_risk","type":"boolean","description":"true iff major_count >= 1 or minor_count >= 2. Binary HBR at PCI. Not a weighted point score and not a BARC 3 or 5 percentage."},{"name":"major_count","type":"integer","description":"Count of true Urban 2019 Table 3 major criteria (0-14)"},{"name":"minor_count","type":"integer","description":"Count of true Urban 2019 Table 3 minor criteria (0-6)"},{"name":"criteria","type":"array","description":"Per-criterion rows with factor and met for the 14 majors then 6 minors; met is true when that Table 3 finding is present"},{"name":"citation","type":"object","description":"Urban 2019 Circulation ARC-HBR citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"active_malignancy_12mo":"false","age_ge_75":"true","anticipated_long_term_oac":"false","any_ischemic_stroke_not_major":"false","bavm":"false","chronic_bleeding_diathesis":"false","cirrhosis_with_portal_hypertension":"false","hemoglobin_lt_11":"false","long_term_nsaid_or_steroid":"false","mild_anemia":"false","moderate_ckd":"false","moderate_severe_ischemic_stroke_6mo":"false","nondeferrable_major_surgery_dapt":"false","previous_spontaneous_ich":"false","recent_major_surgery_or_trauma_30d":"false","severe_or_esrd_ckd":"false","spontaneous_bleed_major":"false","spontaneous_bleed_minor":"false","thrombocytopenia_lt_100":"false","traumatic_ich_12mo":"false"},{"active_malignancy_12mo":"false","age_ge_75":"true","anticipated_long_term_oac":"false","any_ischemic_stroke_not_major":"false","bavm":"false","chronic_bleeding_diathesis":"false","cirrhosis_with_portal_hypertension":"false","hemoglobin_lt_11":"false","long_term_nsaid_or_steroid":"false","mild_anemia":"false","moderate_ckd":"false","moderate_severe_ischemic_stroke_6mo":"false","nondeferrable_major_surgery_dapt":"false","previous_spontaneous_ich":"false","recent_major_surgery_or_trauma_30d":"false","severe_or_esrd_ckd":"false","spontaneous_bleed_major":"false","spontaneous_bleed_minor":"false","thrombocytopenia_lt_100":"false","traumatic_ich_12mo":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/arc-hbr","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/arc-hbr?anticipated_long_term_oac=false&severe_or_esrd_ckd=false&hemoglobin_lt_11=false&spontaneous_bleed_major=false&thrombocytopenia_lt_100=false&chronic_bleeding_diathesis=false&cirrhosis_with_portal_hypertension=false&active_malignancy_12mo=false&previous_spontaneous_ich=false&traumatic_ich_12mo=false&bavm=false&moderate_severe_ischemic_stroke_6mo=false&nondeferrable_major_surgery_dapt=false&recent_major_surgery_or_trauma_30d=false&age_ge_75=true&moderate_ckd=false&mild_anemia=false&spontaneous_bleed_minor=false&long_term_nsaid_or_steroid=false&any_ischemic_stroke_not_major=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/arc-hbr","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/fib4","description":"Returns the Sterling 2006 FIB-4 index from age, AST, ALT, and platelets.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120).","required":true,"example":"50"},{"in":"query","name":"ast_u_l","type":"number","description":"Aspartate aminotransferase in U/L (1-10000).","required":true,"example":"100"},{"in":"query","name":"alt_u_l","type":"number","description":"Alanine aminotransferase in U/L (1-10000).","required":true,"example":"40"},{"in":"query","name":"platelets_10e9_l","type":"number","description":"Platelet count in 10^9/L (1-2000).","required":true,"example":"200"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_ast","message":"ast_u_l must be a number from 1 to 10000 Returned before settlement; you are not charged.","status":400},{"code":"invalid_alt","message":"alt_u_l must be a number from 1 to 10000 Returned before settlement; you are not charged.","status":400},{"code":"invalid_platelets","message":"platelets_10e9_l must be a number from 1 to 2000 Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/fib4","citation":{"authors":"Sterling RK, Lissen E, Clumeck N, et al.","doi":"10.1002/hep.21178","id":"sterling-2006","source":"Hepatology. 2006;43(6):1317-1325","title":"Development of a simple noninvasive index to predict significant fibrosis in patients with HIV/HCV coinfection","url":"https://doi.org/10.1002/hep.21178"},"formula_expression":"FIB-4 = (age_years * AST_U_L) / (platelets_10e9_L * sqrt(ALT_U_L))","purpose":"Returns the Sterling 2006 FIB-4 fibrosis index from age, AST, ALT, and platelets; cites Sterling et al., Hepatology 2006.","markdown_url":"https://magentlab.com/docs/fib4.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"fib4"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"age_years","type":"integer","description":"Age used in the equation"},{"name":"ast_u_l","type":"number","description":"AST in U/L"},{"name":"alt_u_l","type":"number","description":"ALT in U/L"},{"name":"platelets_10e9_l","type":"number","description":"Platelets in 10^9/L"},{"name":"fib4","type":"number","description":"FIB-4 index, 2 decimal places"},{"name":"sterling_band","type":"string","description":"Published Sterling 2006 cut-points: low (<1.45), indeterminate (1.45-3.25), high (>3.25). Not a diagnosis."},{"name":"citation","type":"object","description":"Hepatology 2006 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"50","alt_u_l":"40","ast_u_l":"100","platelets_10e9_l":"200"},{"age":"50","alt_u_l":"40","ast_u_l":"100","platelets_10e9_l":"200"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/fib4","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/fib4?age=50&ast_u_l=100&alt_u_l=40&platelets_10e9_l=200","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/fib4","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/reach-b","description":"Yang 2011 REACH-B 17-point HCC risk (non-cirrhotic REVEAL-HBV). Sex female 0, male 2; age 30-65 (30-34 0 through 60-65 6); ALT U/L <15 0, 15-44 1, >=45 2; HBeAg positive 2; HBV DNA copies/mL <10000 0, 10000-99999 3, 100000-999999 5, >=1000000 4. Returns score 0-17 and published 3/5/10-year percents. Not a diagnosis, not a biopsy, not for cirrhosis. magent does not assay ALT or HBV DNA.","parameters":[{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"female or male. Yang 2011: female scores 0; male scores 2.","required":true,"example":"female"},{"in":"query","name":"age","type":"integer","description":"Age in years. Yang 2011 derivation 30-65 only: 30-34 scores 0; 35-39 scores 1; 40-44 scores 2; 45-49 scores 3; 50-54 scores 4; 55-59 scores 5; 60-65 scores 6. Age 34 scores 0; 35 scores 1; 65 scores 6. Age outside 30-65 is rejected. This tool does not score age >=65 as 7.","required":true,"example":"30"},{"in":"query","name":"alt_u_l","type":"number","description":"Alanine aminotransferase in U/L (1-10000). Caller-assigned; magent does not assay ALT. Yang 2011: <15 scores 0; 15-44 scores 1; >=45 scores 2. ALT 14 scores 0; 15 and 44 score 1; 45 scores 2.","required":true,"example":"14"},{"in":"query","name":"hbeag_positive","type":"boolean","description":"HBeAg positive as assigned by the caller (Yang 2011). true scores 2; false scores 0. magent does not assay HBeAg.","required":true,"example":"false"},{"in":"query","name":"hbv_dna_copies_per_ml","type":"integer","description":"HBV DNA in copies/mL (integer 0-10000000000). Yang 2011 uses copies/mL, not IU/mL. magent does not assay HBV DNA and does not convert units. <300 scores 0; 300-9999 scores 0; 10000-99999 scores 3; 100000-999999 scores 5; >=1000000 scores 4 (non-monotonic: 10^6 scores 4, 10^5 to 10^6-1 scores 5).","required":true,"example":"200"}],"errors":[{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_alt","message":"alt_u_l must be a number from 1 to 10000 Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_hbv_dna","message":"hbv_dna_copies_per_ml must be an integer from 0 to 10000000000 (Yang 2011 copies/mL). Returned before settlement; you are not charged.","status":400},{"code":"invalid_reach_b","message":"age must be 30-65, and each other REACH-B 2011 item must be a published category. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/reach-b","citation":{"authors":"Yang HI, Yuen MF, Chan HL, et al","doi":"10.1016/S1470-2045(11)70077-8","id":"yang-2011","pmid":"21497551","source":"Lancet Oncol. 2011;12(6):568-574","title":"Risk estimation for hepatocellular carcinoma in chronic hepatitis B (REACH-B): development and validation of a predictive score","url":"https://doi.org/10.1016/S1470-2045(11)70077-8"},"formula_expression":"REACH-B = sex + age + ALT + HBeAg + HBV DNA copies/mL; female 0, male 2; age 30-34 -> 0, 35-39 -> 1, 40-44 -> 2, 45-49 -> 3, 50-54 -> 4, 55-59 -> 5, 60-65 -> 6; ALT <15 -> 0, 15-44 -> 1, >=45 -> 2; HBeAg positive 2; HBV DNA copies/mL <300 -> 0, 300-9999 -> 0, 10000-99999 -> 3, 100000-999999 -> 5, >=1000000 -> 4; max 17; 3/5/10-year HCC percent from Yang 2011 score table","purpose":"Sum the Yang 2011 REACH-B 17-point score (sex, age 30-65, ALT, HBeAg, HBV DNA copies/mL) and return the published 3-, 5-, and 10-year HCC risk percents.","markdown_url":"https://magentlab.com/docs/reach-b.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"reach_b"},{"name":"formula_expression","type":"string","description":"Exact Yang 2011 17-point expression"},{"name":"score","type":"integer","description":"REACH-B points; published range 0-17"},{"name":"max_score","type":"integer","description":"17 (2+6+2+2+5; DNA max is 5, not 4)"},{"name":"risk_3y_percent","type":"number","description":"Published 3-year HCC percent for this score (Yang 2011 table). Not a diagnosis."},{"name":"risk_5y_percent","type":"number","description":"Published 5-year HCC percent for this score (Yang 2011 table). Not a diagnosis."},{"name":"risk_10y_percent","type":"number","description":"Published 10-year HCC percent for this score (Yang 2011 table). Not a diagnosis."},{"name":"sex","type":"string","description":"female or male used for the sex points"},{"name":"age_years","type":"integer","description":"Age in years used for the age band"},{"name":"alt_u_l","type":"number","description":"Caller-assigned ALT in U/L used"},{"name":"hbeag_positive","type":"boolean","description":"Caller-assigned HBeAg flag used"},{"name":"hbv_dna_copies_per_ml","type":"integer","description":"Caller-assigned HBV DNA in copies/mL used"},{"name":"components","type":"array","description":"Per-factor Yang 2011 points"},{"name":"citation","type":"object","description":"Yang 2011 Lancet Oncol citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"30","alt_u_l":"14","hbeag_positive":"false","hbv_dna_copies_per_ml":"200","sex":"female"},{"age":"30","alt_u_l":"14","hbeag_positive":"false","hbv_dna_copies_per_ml":"200","sex":"female"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/reach-b","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/reach-b?sex=female&age=30&alt_u_l=14&hbeag_positive=false&hbv_dna_copies_per_ml=200","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/reach-b","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/meld-na","description":"Returns the OPTN/UNOS 2016 MELD-Na score from labs, sodium, and dialysis.","parameters":[{"in":"query","name":"creatinine_mg_dl","type":"number","description":"Serum creatinine in mg/dL. Provide this or creatinine_umol_l. OPTN floors at 1 and caps at 4.","required":false,"example":"1.9"},{"in":"query","name":"creatinine_umol_l","type":"number","description":"Serum creatinine in µmol/L.","required":false,"example":"168"},{"in":"query","name":"bilirubin_mg_dl","type":"number","description":"Total bilirubin in mg/dL (0.1-40). Provide this or bilirubin_umol_l. OPTN floors at 1.","required":false,"example":"4.2"},{"in":"query","name":"bilirubin_umol_l","type":"number","description":"Total bilirubin in µmol/L. Converted as mg/dL = µmol/L / 17.1.","required":false,"example":"72"},{"in":"query","name":"inr","type":"number","description":"INR (0.8-10). OPTN floors at 1.","required":true,"example":"1.2"},{"in":"query","name":"sodium_mmol_l","type":"number","description":"Serum sodium in mmol/L (110-160). OPTN clamps 125-137. Applied only when MELD > 11.","required":true,"example":"128"},{"in":"query","name":"dialysis","type":"boolean","description":"Dialysis twice in the last week. true sets creatinine used to 4.0.","required":true,"example":"false"}],"errors":[{"code":"invalid_creatinine","message":"creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_bilirubin","message":"bilirubin_mg_dl (0.1-40) or bilirubin_umol_l (2-684) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_inr","message":"inr must be a number from 0.8 to 10 Returned before settlement; you are not charged.","status":400},{"code":"invalid_sodium","message":"sodium_mmol_l must be a number from 110 to 160 Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/meld-na","citation":{"authors":"Biggins SW, Kim WR, Terrault NA, et al.; OPTN/UNOS","doi":"10.1053/j.gastro.2006.02.010","id":"optn-meld-na-2016","pmid":"16697729","source":"Gastroenterology. 2006;130(6):1652-1660; OPTN Policy 9 (2016)","title":"Evidence-based incorporation of serum sodium concentration into MELD; OPTN Policy 9 MELD-Na bounds","url":"https://doi.org/10.1053/j.gastro.2006.02.010"},"formula_expression":"MELD = round(10 * (0.957*ln(Cr) + 0.378*ln(bili) + 1.120*ln(INR) + 0.643)); if MELD > 11, MELD-Na = round(MELD + 1.32*(137-Na) - 0.033*MELD*(137-Na))","purpose":"Returns the OPTN/UNOS 2016 MELD-Na score from creatinine, bilirubin, INR, sodium, and dialysis; cites Biggins et al. and OPTN Policy 9.","markdown_url":"https://magentlab.com/docs/meld-na.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"optn_meld_na_2016"},{"name":"formula_expression","type":"string","description":"Exact expressions used"},{"name":"creatinine_mg_dl","type":"number","description":"Input creatinine in mg/dL"},{"name":"bilirubin_mg_dl","type":"number","description":"Input bilirubin in mg/dL"},{"name":"inr","type":"number","description":"Input INR"},{"name":"sodium_mmol_l","type":"number","description":"Input sodium"},{"name":"dialysis","type":"boolean","description":"Dialysis flag"},{"name":"creatinine_used_mg_dl","type":"number","description":"Creatinine after OPTN bounds"},{"name":"bilirubin_used_mg_dl","type":"number","description":"Bilirubin after OPTN floor"},{"name":"inr_used","type":"number","description":"INR after OPTN floor"},{"name":"sodium_used_mmol_l","type":"number","description":"Sodium after OPTN clamp"},{"name":"meld","type":"integer","description":"MELD without sodium, nearest integer"},{"name":"meld_na","type":"integer","description":"MELD-Na, nearest integer"},{"name":"citation","type":"object","description":"Biggins 2006 + OPTN Policy 9"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"bilirubin_mg_dl":"4.2","creatinine_mg_dl":"1.9","dialysis":"false","inr":"1.2","sodium_mmol_l":"128"},{"bilirubin_mg_dl":"4.2","creatinine_mg_dl":"1.9","dialysis":"false","inr":"1.2","sodium_mmol_l":"128"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/meld-na","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/meld-na?creatinine_mg_dl=1.9&bilirubin_mg_dl=4.2&inr=1.2&sodium_mmol_l=128&dialysis=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/meld-na","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/kim-meldna","description":"Kim 2008 NEJM MELD-Na from creatinine, bilirubin, INR, sodium, and dialysis. Then-current UNOS MELD: dialysis sets creatinine 4.0 else clamp 1.0-4.0; bilirubin and INR floor 1.0. Sodium bound 125-140. MELDNa = MELD - Na - 0.025*MELD*(140-Na) + 140. Not OPTN 2016 MELD-Na (Na 125-137 only if MELD>11). Not Kim 2021 MELD 3.0. Not a transplant listing or allocation order.","parameters":[{"in":"query","name":"creatinine_mg_dl","type":"number","description":"Serum creatinine in mg/dL (0.1-20). Provide this or creatinine_umol_l. Dialysis sets used creatinine to 4.0; otherwise clamp 1.0-4.0 (then-current UNOS, Kim 2008).","required":false,"example":1.2},{"in":"query","name":"creatinine_umol_l","type":"number","description":"Serum creatinine in µmol/L. Converted as mg/dL = µmol/L / 88.42.","required":false,"example":106},{"in":"query","name":"bilirubin_mg_dl","type":"number","description":"Total bilirubin in mg/dL (0.1-40). Provide this or bilirubin_umol_l. Floored at 1.0.","required":false,"example":1.1},{"in":"query","name":"bilirubin_umol_l","type":"number","description":"Total bilirubin in µmol/L. Converted as mg/dL = µmol/L / 17.1.","required":false,"example":19},{"in":"query","name":"inr","type":"number","description":"INR (0.8-10). Floored at 1.0.","required":true,"example":1.1},{"in":"query","name":"sodium_mmol_l","type":"number","description":"Serum sodium in mmol/L (110-160). Kim 2008 bounds the sodium term at 125-140. Applied at every MELD (not only MELD>11).","required":true,"example":125},{"in":"query","name":"dialysis","type":"boolean","description":"Dialysis twice in the last week. true sets creatinine used to 4.0.","required":true,"example":false}],"errors":[{"code":"invalid_kim_meldna","message":"Kim 2008 MELD-Na needs bilirubin, INR, creatinine, sodium, and dialysis as in the NEJM formula. Returned before settlement; you are not charged.","status":400},{"code":"invalid_creatinine","message":"creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_bilirubin","message":"bilirubin_mg_dl (0.1-40) or bilirubin_umol_l (2-684) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_inr","message":"inr must be a number from 0.8 to 10 Returned before settlement; you are not charged.","status":400},{"code":"invalid_sodium","message":"sodium_mmol_l must be a number from 110 to 160 Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/kim-meldna","citation":{"authors":"Kim WR, Biggins SW, Kremers WK, Wiesner RH, Kamath PS, Benson JT, Edwards E, Therneau TM","doi":"10.1056/NEJMoa0801209","id":"kim-2008-meldna","pmid":"18768945","source":"N Engl J Med. 2008;359(10):1018-1026","title":"Hyponatremia and mortality among patients on the liver-transplant waiting list","url":"https://doi.org/10.1056/NEJMoa0801209"},"formula_expression":"MELD = round(10 * (0.957*ln(Cr) + 0.378*ln(bili) + 1.120*ln(INR) + 0.643)); MELDNa = round(MELD - Na - 0.025*MELD*(140 - Na) + 140); dialysis sets Cr 4.0 else Cr clamp 1.0-4.0; bili and INR floor 1.0; Na bound 125-140. Kim 2008 NEJM, not OPTN 2016, not MELD 3.0","purpose":"Compute Kim 2008 NEJM MELD and MELD-Na from creatinine, bilirubin, INR, sodium, and dialysis using then-current UNOS lab bounds and sodium 125–140.","markdown_url":"https://magentlab.com/docs/kim-meldna.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"kim_meldna_2008"},{"name":"formula_expression","type":"string","description":"Exact expressions used"},{"name":"creatinine_mg_dl","type":"number","description":"Input creatinine in mg/dL"},{"name":"bilirubin_mg_dl","type":"number","description":"Input bilirubin in mg/dL"},{"name":"inr","type":"number","description":"Input INR"},{"name":"sodium_mmol_l","type":"number","description":"Input sodium"},{"name":"dialysis","type":"boolean","description":"Dialysis flag"},{"name":"creatinine_used_mg_dl","type":"number","description":"Creatinine after UNOS 1.0-4.0 bounds; dialysis forces 4.0"},{"name":"bilirubin_used_mg_dl","type":"number","description":"Bilirubin after floor of 1.0"},{"name":"inr_used","type":"number","description":"INR after floor of 1.0"},{"name":"sodium_used_mmol_l","type":"number","description":"Sodium after Kim 2008 125-140 bound"},{"name":"meld","type":"integer","description":"Then-current UNOS MELD, nearest integer"},{"name":"meld_na","type":"integer","description":"Kim 2008 MELD-Na, nearest integer"},{"name":"citation","type":"object","description":"Kim 2008 NEJM citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"bilirubin_mg_dl":"1.1","creatinine_mg_dl":"1.2","dialysis":"false","inr":"1.1","sodium_mmol_l":"125"},{"bilirubin_mg_dl":"1.1","creatinine_mg_dl":"1.2","dialysis":"false","inr":"1.1","sodium_mmol_l":"125"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/kim-meldna","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/kim-meldna?creatinine_mg_dl=1.2&bilirubin_mg_dl=1.1&inr=1.1&sodium_mmol_l=125&dialysis=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/kim-meldna","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/meld","description":"Kamath 2001 model for end-stage liver disease (MELD) from creatinine, bilirubin, INR, and etiology. meld = round(3.8*ln(bilirubin_mg_dL) + 11.2*ln(INR) + 9.6*ln(creatinine_mg_dL) + 6.4*etiology). etiology is 0 if cholestatic or alcoholic, else 1. Does not floor labs at 1.0 and does not include dialysis (later UNOS/OPTN). Not MELD-Na. Not a transplant listing or allocation order.","parameters":[{"in":"query","name":"creatinine_mg_dl","type":"number","description":"Serum creatinine in mg/dL (0.1-20). Provide this or creatinine_umol_l, not both. Kamath 2001 does not floor creatinine at 1.0 and does not include dialysis.","required":false,"example":"1.9"},{"in":"query","name":"creatinine_umol_l","type":"number","description":"Serum creatinine in µmol/L (9-1768). Converted as mg/dL = µmol/L / 88.42.","required":false,"example":"168"},{"in":"query","name":"bilirubin_mg_dl","type":"number","description":"Total bilirubin in mg/dL (0.1-40). Provide this or bilirubin_umol_l. Kamath 2001 tables include bilirubin 0.8; magent does not floor at 1.0.","required":false,"example":"4.2"},{"in":"query","name":"bilirubin_umol_l","type":"number","description":"Total bilirubin in µmol/L (2-684). Converted as mg/dL = µmol/L / 17.1.","required":false,"example":"71.82"},{"in":"query","name":"inr","type":"number","description":"International normalized ratio (0.8-10). Kamath 2001 does not floor INR at 1.0.","required":true,"example":"1.2"},{"in":"query","name":"cholestatic_or_alcoholic","type":"boolean","description":"true if the liver disease is cholestatic or alcoholic (etiology 0); false otherwise (etiology 1).","required":true,"example":"true"}],"errors":[{"code":"invalid_creatinine","message":"creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_bilirubin","message":"bilirubin_mg_dl (0.1-40) or bilirubin_umol_l (2-684) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_inr","message":"inr must be a number from 0.8 to 10 Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/meld","citation":{"authors":"Kamath PS, Wiesner RH, Malinchoc M, Kremers W, Therneau TM, Kosberg CL, D'Amico G, Dickson ER, Kim WR","doi":"10.1053/jhep.2001.22172","id":"kamath-2001","pmid":"11172350","source":"Hepatology. 2001;33(2):464-470","title":"A model to predict survival in patients with end-stage liver disease","url":"https://doi.org/10.1053/jhep.2001.22172"},"formula_expression":"meld = round(3.8 * ln(bilirubin_mg_dL) + 11.2 * ln(INR) + 9.6 * ln(creatinine_mg_dL) + 6.4 * etiology)","purpose":"Compute the Kamath 2001 model for end-stage liver disease (MELD) integer from creatinine, bilirubin, INR, and cholestatic or alcoholic etiology.","markdown_url":"https://magentlab.com/docs/meld.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"kamath_meld_2001"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"creatinine_mg_dl","type":"number","description":"Serum creatinine used in mg/dL (after conversion)"},{"name":"bilirubin_mg_dl","type":"number","description":"Total bilirubin used in mg/dL (after conversion). Not floored at 1.0."},{"name":"inr","type":"number","description":"INR used. Not floored at 1.0."},{"name":"cholestatic_or_alcoholic","type":"boolean","description":"true if cholestatic or alcoholic disease"},{"name":"etiology","type":"integer","description":"0 if cholestatic_or_alcoholic is true, otherwise 1"},{"name":"meld","type":"integer","description":"Kamath 2001 MELD, nearest integer. No UNOS lab floors or dialysis."},{"name":"citation","type":"object","description":"Kamath 2001 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"bilirubin_mg_dl":"4.2","cholestatic_or_alcoholic":"true","creatinine_mg_dl":"1.9","inr":"1.2"},{"bilirubin_mg_dl":"4.2","cholestatic_or_alcoholic":"true","creatinine_mg_dl":"1.9","inr":"1.2"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/meld","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/meld?creatinine_mg_dl=1.9&bilirubin_mg_dl=4.2&inr=1.2&cholestatic_or_alcoholic=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/meld","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/meld-3","description":"Kim 2021 MELD 3.0 from sex, bilirubin, INR, creatinine, sodium, albumin, and dialysis. meld_3 = round(1.33*(female) + 4.56*ln(bilirubin) + 0.82*(137-Na) - 0.24*(137-Na)*ln(bilirubin) + 9.09*ln(INR) + 11.14*ln(creatinine) + 1.85*(3.5-albumin) - 1.83*(3.5-albumin)*ln(creatinine) + 6). Creatinine 1.0-3.0 (dialysis 3.0); bilirubin and INR floor 1.0; sodium 125-137; albumin 1.5-3.5. Not original MELD or MELD-Na. Not a transplant listing or allocation order.","parameters":[{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"Sex used in the Kim 2021 female term (female adds 1.33).","required":true,"example":"male"},{"in":"query","name":"bilirubin_mg_dl","type":"number","description":"Total bilirubin in mg/dL (0.1-40). Provide this or bilirubin_umol_l. Kim 2021 floors at 1.0.","required":false,"example":"1"},{"in":"query","name":"bilirubin_umol_l","type":"number","description":"Total bilirubin in µmol/L (2-684). Converted as mg/dL = µmol/L / 17.1.","required":false,"example":"17.1"},{"in":"query","name":"inr","type":"number","description":"INR (0.8-10). Kim 2021 floors at 1.0.","required":true,"example":"1"},{"in":"query","name":"creatinine_mg_dl","type":"number","description":"Serum creatinine in mg/dL (0.1-20). Provide this or creatinine_umol_l. Kim 2021 floors at 1.0 and caps at 3.0.","required":false,"example":"1"},{"in":"query","name":"creatinine_umol_l","type":"number","description":"Serum creatinine in µmol/L (9-1768). Converted as mg/dL = µmol/L / 88.42.","required":false,"example":"88.42"},{"in":"query","name":"sodium_mmol_l","type":"number","description":"Serum sodium in mmol/L (110-160). Kim 2021 clamps 125-137.","required":true,"example":"137"},{"in":"query","name":"albumin_g_dl","type":"number","description":"Serum albumin in g/dL (1.0-6.0). Provide this or albumin_g_l. Kim 2021 clamps 1.5-3.5.","required":false,"example":"3.5"},{"in":"query","name":"albumin_g_l","type":"number","description":"Serum albumin in g/L (10-60). Converted as g/dL = g/L / 10.","required":false,"example":"35"},{"in":"query","name":"dialysis","type":"boolean","description":"Dialysis twice in the prior week. true sets creatinine used to 3.0 (Kim 2021 ceiling).","required":true,"example":"false"}],"errors":[{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_bilirubin","message":"bilirubin_mg_dl (0.1-40) or bilirubin_umol_l (2-684) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_inr","message":"inr must be a number from 0.8 to 10 Returned before settlement; you are not charged.","status":400},{"code":"invalid_creatinine","message":"creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_sodium","message":"sodium_mmol_l must be a number from 110 to 160 Returned before settlement; you are not charged.","status":400},{"code":"invalid_albumin","message":"albumin_g_dl (1-6) or albumin_g_l (10-60) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/meld-3","citation":{"authors":"Kim WR, Mannalithara A, Heimbach JK, Kamath PS, Asrani SK, Biggins SW, et al.","doi":"10.1053/j.gastro.2021.08.050","id":"kim-2021","pmid":"34481845","source":"Gastroenterology. 2021;161(6):1887-1895.e4","title":"MELD 3.0: The Model for End-Stage Liver Disease Updated for the Modern Era","url":"https://doi.org/10.1053/j.gastro.2021.08.050"},"formula_expression":"meld_3 = round(1.33*(female) + 4.56*ln(bilirubin) + 0.82*(137 - Na) - 0.24*(137 - Na)*ln(bilirubin) + 9.09*ln(INR) + 11.14*ln(creatinine) + 1.85*(3.5 - albumin) - 1.83*(3.5 - albumin)*ln(creatinine) + 6)","purpose":"Compute the Kim 2021 MELD 3.0 integer from sex, bilirubin, INR, creatinine, sodium, albumin, and dialysis.","markdown_url":"https://magentlab.com/docs/meld-3.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"kim_meld_3_2021"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"sex","type":"string","description":"female or male"},{"name":"female","type":"boolean","description":"true when the Kim 2021 female term applies"},{"name":"bilirubin_mg_dl","type":"number","description":"Input bilirubin in mg/dL"},{"name":"inr","type":"number","description":"Input INR"},{"name":"creatinine_mg_dl","type":"number","description":"Input creatinine in mg/dL"},{"name":"sodium_mmol_l","type":"number","description":"Input sodium"},{"name":"albumin_g_dl","type":"number","description":"Input albumin in g/dL"},{"name":"dialysis","type":"boolean","description":"Dialysis flag"},{"name":"bilirubin_used_mg_dl","type":"number","description":"Bilirubin after Kim 2021 floor of 1.0"},{"name":"inr_used","type":"number","description":"INR after Kim 2021 floor of 1.0"},{"name":"creatinine_used_mg_dl","type":"number","description":"Creatinine after Kim 2021 1.0-3.0 bounds; dialysis forces 3.0"},{"name":"sodium_used_mmol_l","type":"number","description":"Sodium after Kim 2021 125-137 clamp"},{"name":"albumin_used_g_dl","type":"number","description":"Albumin after Kim 2021 1.5-3.5 clamp"},{"name":"meld_3","type":"integer","description":"Kim 2021 MELD 3.0, nearest integer"},{"name":"citation","type":"object","description":"Kim 2021 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"albumin_g_dl":"3.5","bilirubin_mg_dl":"1","creatinine_mg_dl":"1","dialysis":"false","inr":"1","sex":"male","sodium_mmol_l":"137"},{"albumin_g_dl":"3.5","bilirubin_mg_dl":"1","creatinine_mg_dl":"1","dialysis":"false","inr":"1","sex":"male","sodium_mmol_l":"137"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/meld-3","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/meld-3?sex=male&bilirubin_mg_dl=1&inr=1&creatinine_mg_dl=1&sodium_mmol_l=137&albumin_g_dl=3.5&dialysis=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/meld-3","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/psc-revised","description":"Kim 2000 revised natural history model for primary sclerosing cholangitis (no histologic stage). R = 0.03*age_years + 0.54*ln(bilirubin_mg_dL) + 0.54*ln(AST_U_L) + 1.24*variceal_bleeding - 0.84*albumin_g_dL. Natural log. Returns R only; does not look up unpublished survival percents or invent risk bands. Not a transplant listing, biopsy order, PSC diagnosis, or lab assay. Not the original Mayo PSC biopsy model.","parameters":[{"in":"query","name":"age_years","type":"integer","description":"Age in whole years (18-120, magent clamp). Kim 2000 uses age in years in the R equation.","required":true,"example":"55"},{"in":"query","name":"bilirubin_mg_dl","type":"number","description":"Total bilirubin in mg/dL (0.1-40, magent clamp). Must be positive; natural log is undefined at 0. Kim 2000 uses mg/dL. magent does not assay bilirubin.","required":true,"example":"5"},{"in":"query","name":"ast_u_l","type":"number","description":"Aspartate aminotransferase in U/L (1-10000, magent clamp). Must be positive. magent does not assay AST.","required":true,"example":"120"},{"in":"query","name":"albumin_g_dl","type":"number","description":"Serum albumin in g/dL (1.0-6.0, magent clamp). Must be positive. Kim 2000 uses g/dL. magent does not assay albumin.","required":true,"example":"3.0"},{"in":"query","name":"variceal_bleeding","type":"boolean","description":"History of variceal bleeding as assigned by the caller (Kim 2000): true (1) or false (0). magent does not diagnose bleeding.","required":true,"example":"true"}],"errors":[{"code":"invalid_psc_revised","message":"Revised PSC model inputs must be numeric age, bilirubin, AST, and albumin plus variceal-bleeding as used in Kim 2000. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/psc-revised","citation":{"authors":"Kim WR, Therneau TM, Wiesner RH, Poterucha JJ, Benson JT, Malinchoc M, LaRusso NF, Lindor KD, Dickson ER","doi":"10.4065/75.7.688","id":"kim-2000","pmid":"10907383","source":"Mayo Clin Proc. 2000;75(7):688-694","title":"A revised natural history model for primary sclerosing cholangitis","url":"https://doi.org/10.4065/75.7.688"},"formula_expression":"R = 0.03 * age_years + 0.54 * ln(bilirubin_mg_dl) + 0.54 * ln(ast_u_l) + 1.24 * variceal_bleeding - 0.84 * albumin_g_dl","purpose":"Compute the Kim 2000 revised natural history model R for primary sclerosing cholangitis from age, bilirubin, AST, albumin, and variceal bleeding (no histologic stage).","markdown_url":"https://magentlab.com/docs/psc-revised.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"kim_psc_revised_2000"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"age_years","type":"integer","description":"Age used, whole years"},{"name":"bilirubin_mg_dl","type":"number","description":"Total bilirubin used in mg/dL"},{"name":"ast_u_l","type":"number","description":"AST used in U/L"},{"name":"albumin_g_dl","type":"number","description":"Albumin used in g/dL"},{"name":"variceal_bleeding","type":"boolean","description":"true if variceal bleeding history is present (coefficient 1.24)"},{"name":"r","type":"number","description":"Kim 2000 revised PSC R, 2 decimals. Natural log. No survival-table lookup and no invented risk bands."},{"name":"citation","type":"object","description":"Kim 2000 Mayo Clin Proc citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age_years":"55","albumin_g_dl":"3.0","ast_u_l":"120","bilirubin_mg_dl":"5","variceal_bleeding":"true"},{"age_years":"55","albumin_g_dl":"3.0","ast_u_l":"120","bilirubin_mg_dl":"5","variceal_bleeding":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/psc-revised","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/psc-revised?age_years=55&bilirubin_mg_dl=5&ast_u_l=120&albumin_g_dl=3.0&variceal_bleeding=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/psc-revised","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/maddrey","description":"Maddrey discriminant function (1978) from patient and control prothrombin time in seconds plus bilirubin. Deterministic published formula with citation; not a diagnosis or steroid order.","parameters":[{"in":"query","name":"pt_patient_sec","type":"number","description":"Patient prothrombin time in seconds (8-120). INR is not accepted.","required":true,"example":"20"},{"in":"query","name":"pt_control_sec","type":"number","description":"Laboratory control prothrombin time in seconds (8-20). INR is not accepted.","required":true,"example":"12"},{"in":"query","name":"bilirubin_mg_dl","type":"number","description":"Total bilirubin in mg/dL (0.1-40). Provide this or bilirubin_umol_l.","required":false,"example":"8"},{"in":"query","name":"bilirubin_umol_l","type":"number","description":"Total bilirubin in µmol/L (2-684). Converted as mg/dL = µmol/L / 17.1.","required":false,"example":"136.8"}],"errors":[{"code":"invalid_prothrombin_time","message":"pt_sec (8-120) is required, or pt_patient_sec (8-120) and pt_control_sec (8-20) are required. Returned before settlement; you are not charged.","status":400},{"code":"invalid_bilirubin","message":"bilirubin_mg_dl (0.1-40) or bilirubin_umol_l (2-684) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/maddrey","citation":{"authors":"Maddrey WC, Boitnott JK, Bedine MS, Weber FL Jr, Mezey E, White RI Jr","doi":"10.1016/0016-5085(78)90401-8","id":"maddrey-1978","source":"Gastroenterology. 1978;75(2):193-199","title":"Corticosteroid therapy of alcoholic hepatitis","url":"https://doi.org/10.1016/0016-5085(78)90401-8"},"formula_expression":"DF = 4.6 * (pt_patient_sec - pt_control_sec) + bilirubin_mg_dl","purpose":"Compute the 1978 Maddrey discriminant function from patient PT, control PT, and bilirubin.","markdown_url":"https://magentlab.com/docs/maddrey.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"maddrey_1978"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"pt_patient_sec","type":"number","description":"Patient PT in seconds"},{"name":"pt_control_sec","type":"number","description":"Control PT in seconds"},{"name":"bilirubin_mg_dl","type":"number","description":"Normalized bilirubin in mg/dL"},{"name":"df","type":"number","description":"Maddrey discriminant function, 1 decimal place"},{"name":"citation","type":"object","description":"Gastroenterology 1978 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"bilirubin_mg_dl":"8","pt_control_sec":"12","pt_patient_sec":"20"},{"bilirubin_mg_dl":"8","pt_control_sec":"12","pt_patient_sec":"20"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/maddrey","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/maddrey?pt_patient_sec=20&pt_control_sec=12&bilirubin_mg_dl=8","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/maddrey","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/child-pugh","description":"Child–Pugh (Child–Turcotte–Pugh) cirrhosis severity from bilirubin, albumin, INR, caller-assigned encephalopathy, and ascites. Deterministic published score with citation; not a transplant listing protocol.","parameters":[{"in":"query","name":"bilirubin_mg_dl","type":"number","description":"Total bilirubin in mg/dL (0.1-40). Provide this or bilirubin_umol_l. <2.0 scores 1; 2.0-3.0 scores 2; >3.0 scores 3.","required":false,"example":"1.0"},{"in":"query","name":"bilirubin_umol_l","type":"number","description":"Total bilirubin in µmol/L. Converted as mg/dL = µmol/L / 17.1.","required":false,"example":"17.1"},{"in":"query","name":"albumin_g_dl","type":"number","description":"Albumin in g/dL (1-6). Provide this or albumin_g_l. >3.5 scores 1; 2.8-3.5 scores 2; <2.8 scores 3.","required":false,"example":"4.0"},{"in":"query","name":"albumin_g_l","type":"number","description":"Albumin in g/L. Converted as g/dL = g/L / 10.","required":false,"example":"40"},{"in":"query","name":"inr","type":"number","description":"INR (0.8-10). Contemporary substitute for Pugh PT-prolongation seconds. <1.70 scores 1; 1.70-2.30 scores 2; >2.30 scores 3.","required":true,"example":"1.2"},{"in":"query","name":"encephalopathy","type":"string","enum":["none","grade_1_2","grade_3_4"],"description":"Caller-assigned encephalopathy grade. none scores 1; grade_1_2 scores 2; grade_3_4 scores 3. magent does not examine the patient.","required":true,"example":"none"},{"in":"query","name":"ascites","type":"string","enum":["none","slight","moderate"],"description":"Caller-assigned ascites. none scores 1; slight scores 2; moderate scores 3. magent does not examine the patient.","required":true,"example":"none"}],"errors":[{"code":"invalid_bilirubin","message":"bilirubin_mg_dl (0.1-40) or bilirubin_umol_l (2-684) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_albumin","message":"albumin_g_dl (1-6) or albumin_g_l (10-60) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_inr","message":"inr must be a number from 0.8 to 10 Returned before settlement; you are not charged.","status":400},{"code":"invalid_encephalopathy","message":"encephalopathy must be none, grade_1_2, or grade_3_4. Returned before settlement; you are not charged.","status":400},{"code":"invalid_ascites","message":"ascites must be none, slight, or moderate. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/child-pugh","citation":{"authors":"Pugh RNH, Murray-Lyon IM, Dawson JL, Pietroni MC, Williams R","doi":"10.1002/bjs.1800600817","id":"pugh-1973","source":"Br J Surg. 1973;60(8):646-649","title":"Transection of the oesophagus for bleeding oesophageal varices","url":"https://doi.org/10.1002/bjs.1800600817"},"formula_expression":"Child-Pugh = bilirubin + albumin + INR + encephalopathy + ascites; each 1-3; class A 5-6, B 7-9, C 10-15; max 15","purpose":"Compute the Child–Turcotte–Pugh cirrhosis severity score from bilirubin, albumin, INR, encephalopathy, and ascites.","markdown_url":"https://magentlab.com/docs/child-pugh.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"child_pugh"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Total points 5-15"},{"name":"max_score","type":"integer","description":"Always 15"},{"name":"child_pugh_class","type":"string","description":"A (5-6), B (7-9), or C (10-15)"},{"name":"bilirubin_mg_dl","type":"number","description":"Normalized bilirubin in mg/dL"},{"name":"albumin_g_dl","type":"number","description":"Normalized albumin in g/dL"},{"name":"inr","type":"number","description":"Input INR"},{"name":"encephalopathy","type":"string","description":"Caller-assigned none, grade_1_2, or grade_3_4"},{"name":"ascites","type":"string","description":"Caller-assigned none, slight, or moderate"},{"name":"components","type":"array","description":"Per-factor 1-3 points"},{"name":"citation","type":"object","description":"Pugh 1973 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"albumin_g_dl":"4.0","ascites":"none","bilirubin_mg_dl":"1.0","encephalopathy":"none","inr":"1.2"},{"albumin_g_dl":"4.0","ascites":"none","bilirubin_mg_dl":"1.0","encephalopathy":"none","inr":"1.2"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/child-pugh","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/child-pugh?bilirubin_mg_dl=1.0&albumin_g_dl=4.0&inr=1.2&encephalopathy=none&ascites=none","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/child-pugh","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/vocal-penn","description":"Mahmud 2021 VOCAL-Penn 30-day postoperative mortality logistic for cirrhosis. log_odds = -5.472096 + 1.061725*ASA + 0.927904*emergency + surgery dummies (laparoscopic abdominal reference) + Stata 3-knot RCS albumin (2.7, 3.7, 4.4) and platelets (75, 152, 271) + 0.1448936*bilirubin - 0.7541669*obesity + 0.8268748*NAFLD. Percent to 1 decimal. Not a surgical order. magent does not assign ASA or read labs.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). The Mahmud 2021 Supplement Appendix 30-day linear predictor does not retain age (age is in the 90- and 180-day models). Required because the published tool asks for it.","required":true,"example":"60"},{"in":"query","name":"albumin_g_dl","type":"number","description":"Preoperative albumin in g/dL (1.0-6.0). Provide this or albumin_g_l. Restricted cubic spline knots 2.7, 3.7, 4.4 (Supplemental Table 2). magent does not read the laboratory.","required":false,"example":"3.5"},{"in":"query","name":"albumin_g_l","type":"number","description":"Preoperative albumin in g/L (10-60). Converted as g/dL = g/L / 10.","required":false,"example":"35"},{"in":"query","name":"bilirubin_mg_dl","type":"number","description":"Preoperative total bilirubin in mg/dL (0.1-40). Provide this or bilirubin_umol_l. Linear in the 30-day Appendix model. magent does not read the laboratory.","required":false,"example":"1.2"},{"in":"query","name":"bilirubin_umol_l","type":"number","description":"Preoperative total bilirubin in µmol/L (2-684). Converted as mg/dL = µmol/L / 17.1.","required":false,"example":"20.52"},{"in":"query","name":"platelets_10e9_l","type":"number","description":"Preoperative platelet count in 10^9/L (10-800), equal to 1,000/µL. Spline knots 75, 152, 271 (Supplemental Table 2). magent does not read the laboratory.","required":true,"example":"150"},{"in":"query","name":"obesity","type":"boolean","description":"Caller-assigned BMI ≥30 kg/m² (true/false). Protective in the 30-day model. magent does not compute BMI.","required":true,"example":"false"},{"in":"query","name":"fatty_liver_disease","type":"boolean","description":"Caller-assigned NAFLD as the etiology of cirrhosis (true/false). magent does not assign etiology.","required":true,"example":"false"},{"in":"query","name":"asa_class","type":"integer","enum":[2,3,4],"description":"Caller-assigned ASA physical status 2, 3, or 4 (ordinal in the Appendix). The derivation cohort had no ASA 1 and excluded ASA 5. magent does not assign ASA class.","required":true,"example":3},{"in":"query","name":"emergency","type":"boolean","description":"Caller-assigned emergency indication (true/false). magent does not classify urgency.","required":true,"example":"false"},{"in":"query","name":"surgery_category","type":"string","enum":["abdominal_laparoscopic","abdominal","abdominal_wall","vascular","orthopedic","chest","cardiac"],"description":"Mahmud 2021 Appendix surgery dummy as assigned by the caller. abdominal_laparoscopic is the reference (0). abdominal is open abdominal. chest and cardiac share the printed chest/cardiac coefficient. magent does not classify a CPT code.","required":true,"example":"abdominal_wall"}],"errors":[{"code":"invalid_vocal_penn","message":"VOCAL-Penn inputs must match Mahmud 2021 age, albumin, bilirubin, platelets, obesity, fatty liver disease, ASA class, emergency indication, and surgery category. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/vocal-penn","citation":{"authors":"Mahmud N, Fricker Z, Hubbard RA, Ioannou GN, Lewis JD, Taddei TH, Rothstein KD, Serper M, Goldberg DS, Kaplan DE","doi":"10.1002/hep.31558","id":"mahmud-2021-vocal-penn","pmid":"32939786","source":"Hepatology. 2021;73(1):204-218","title":"Risk Prediction Models for Post-Operative Mortality in Patients With Cirrhosis","url":"https://doi.org/10.1002/hep.31558"},"formula_expression":"log_odds = -5.472096 + 1.061725*ASA + 0.927904*emergency + 1.56071*abdominal_open + 0.7418021*abdominal_wall + 0.9165415*vascular + 1.464183*orthopedic + 1.893621*chest_cardiac - 0.0075185*platelets_sp1 + 0.0036657*platelets_sp2 - 0.5181509*albumin_sp1 - 1.000672*albumin_sp2 + 0.1448936*bilirubin_mg_dl - 0.7541669*obesity + 0.8268748*NAFLD; laparoscopic abdominal is the surgery reference; sp1 = x; sp2 = Stata mkspline 3-knot restricted cubic spline / (k3-k1)^2; albumin knots 2.7, 3.7, 4.4 g/dL; platelets knots 75, 152, 271 x10^9/L; mortality_30d_percent = 100*exp(log_odds)/(1+exp(log_odds)), 1 decimal","purpose":"Compute the Mahmud 2021 VOCAL-Penn 30-day postoperative mortality percent for cirrhosis from caller-assigned ASA class, surgery category, emergency indication, NAFLD, obesity, albumin, bilirubin, and platelet count.","markdown_url":"https://magentlab.com/docs/vocal-penn.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"mahmud_vocal_penn_30d_2021"},{"name":"formula_expression","type":"string","description":"Mahmud 2021 Supplement Appendix 30-day log-odds expression"},{"name":"age_years","type":"integer","description":"Input age in years; not a term in the 30-day Appendix linear predictor"},{"name":"albumin_g_dl","type":"number","description":"Input albumin in g/dL"},{"name":"bilirubin_mg_dl","type":"number","description":"Input bilirubin in mg/dL"},{"name":"platelets_10e9_l","type":"number","description":"Input platelet count in 10^9/L"},{"name":"obesity","type":"boolean","description":"Caller-assigned BMI ≥30"},{"name":"fatty_liver_disease","type":"boolean","description":"Caller-assigned NAFLD etiology"},{"name":"asa_class","type":"integer","description":"Caller-assigned ASA class 2, 3, or 4"},{"name":"emergency","type":"boolean","description":"Caller-assigned emergency indication"},{"name":"surgery_category","type":"string","description":"Appendix surgery dummy used in the linear predictor"},{"name":"logit","type":"number","description":"Appendix 30-day log-odds, 4 decimal places"},{"name":"mortality_30d_percent","type":"number","description":"100 * exp(log_odds) / (1 + exp(log_odds)) from the unrounded logit, 1 decimal. A probability, not a surgical order."},{"name":"citation","type":"object","description":"Mahmud 2021 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"60","albumin_g_dl":"3.5","asa_class":"3","bilirubin_mg_dl":"1.2","emergency":"false","fatty_liver_disease":"false","obesity":"false","platelets_10e9_l":"150","surgery_category":"abdominal_wall"},{"age":"60","albumin_g_dl":"3.5","asa_class":"3","bilirubin_mg_dl":"1.2","emergency":"false","fatty_liver_disease":"false","obesity":"false","platelets_10e9_l":"150","surgery_category":"abdominal_wall"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/vocal-penn","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/vocal-penn?age=60&albumin_g_dl=3.5&bilirubin_mg_dl=1.2&platelets_10e9_l=150&obesity=false&fatty_liver_disease=false&asa_class=3&emergency=false&surgery_category=abdominal_wall","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/vocal-penn","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/mumtaz","description":"Mumtaz 2019 integer score for 30-day all-cause readmission after decompensated-cirrhosis index admission. Age, payer, caller-assigned Elixhauser >=3, nonalcoholic etiology, ascites, encephalopathy, variceal bleeding (-7), HCC, paracentesis, hemodialysis, and disposition. Range -11 to 49. Returns estimated_readmission_percent and readmission_band (low <20%, medium 20-30%, high >30%). Not a discharge order. magent does not compute Elixhauser.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Mumtaz 2019: 18-39 → +7; 40-64 → +4; ≥65 → 0. Adult derivation.","required":true,"example":"70"},{"in":"query","name":"primary_payer","type":"string","description":"Primary payer (Mumtaz 2019). medicare → +4; medicaid → +5; private → 0; self_pay → -3; other → -1. Caller-assigned; magent does not read insurance.","required":true,"example":"private"},{"in":"query","name":"elixhauser_ge_3","type":"boolean","description":"Caller-assigned Elixhauser comorbidity index ≥3 (Mumtaz 2019). true → +2; false → 0. magent does not compute Elixhauser.","required":true,"example":"false"},{"in":"query","name":"non_alcoholic_etiology","type":"boolean","description":"Caller-assigned nonalcoholic etiology of cirrhosis (Mumtaz 2019). true → +2; false → 0. magent does not assign etiology.","required":true,"example":"false"},{"in":"query","name":"ascites","type":"boolean","description":"Caller-assigned ascites on the index admission (Mumtaz 2019). true → +5; false → 0. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"hepatic_encephalopathy","type":"boolean","description":"Caller-assigned hepatic encephalopathy on the index admission (Mumtaz 2019). true → +4; false → 0. magent does not grade encephalopathy.","required":true,"example":"false"},{"in":"query","name":"variceal_bleeding","type":"boolean","description":"Caller-assigned variceal bleeding on the index admission (Mumtaz 2019). true → -7; false → 0. magent does not diagnose bleeding.","required":true,"example":"false"},{"in":"query","name":"hepatocellular_carcinoma","type":"boolean","description":"Caller-assigned hepatocellular carcinoma (Mumtaz 2019). true → +3; false → 0. magent does not read imaging.","required":true,"example":"false"},{"in":"query","name":"paracentesis","type":"boolean","description":"Caller-assigned paracentesis during the index admission (Mumtaz 2019). true → +4; false → 0. magent does not record procedures.","required":true,"example":"false"},{"in":"query","name":"hemodialysis","type":"boolean","description":"Caller-assigned hemodialysis during the index admission (Mumtaz 2019). true → +7; false → 0. magent does not order dialysis.","required":true,"example":"false"},{"in":"query","name":"disposition","type":"string","description":"Discharge disposition (Mumtaz 2019). routine → 0; transfer → -1; home_health → +1; ama → +10. Caller-assigned; not a discharge order.","required":true,"example":"routine"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_mumtaz_payer","message":"primary_payer must be medicare, medicaid, private, self_pay, or other (Mumtaz 2019). Returned before settlement; you are not charged.","status":400},{"code":"invalid_mumtaz_disposition","message":"disposition must be routine, transfer, home_health, or ama (Mumtaz 2019). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/mumtaz","citation":{"authors":"Mumtaz K, Issak A, Porter K, et al.","doi":"10.1002/hep.30274","id":"mumtaz-2019","pmid":"30218583","source":"Hepatology. 2019;70(2):630-639","title":"Validation of Risk Score in Predicting Early Readmissions in Decompensated Cirrhotic Patients: A Model Based on the Administrative Database","url":"https://doi.org/10.1002/hep.30274"},"formula_expression":"Mumtaz = age_points + primary_payer_points + elixhauser_ge_3(2) + non_alcoholic_etiology(2) + ascites(5) + hepatic_encephalopathy(4) + variceal_bleeding(-7) + hepatocellular_carcinoma(3) + paracentesis(4) + hemodialysis(7) + disposition_points; Mumtaz 2019; age 18-39 7, 40-64 4, >=65 0; medicare 4, medicaid 5, private 0, self_pay -3, other -1; disposition routine 0, transfer -1, home_health 1, ama 10; range -11 to 49; estimated_readmission_percent is the published score-to-probability mapping; readmission_band low <20% (score -11 to 6), medium 20-30% (7 to 17), high >30% (18 to 49)","purpose":"Sum Mumtaz 2019 index-admission integer points and return the published predicted 30-day all-cause readmission percent and low/medium/high band.","markdown_url":"https://magentlab.com/docs/mumtaz.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"mumtaz"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Mumtaz 2019 integer points. Published range -11 to 49."},{"name":"min_score","type":"integer","description":"-11"},{"name":"max_score","type":"integer","description":"49"},{"name":"age_years","type":"integer","description":"Age in years used for age points"},{"name":"primary_payer","type":"string","description":"medicare, medicaid, private, self_pay, or other"},{"name":"disposition","type":"string","description":"routine, transfer, home_health, or ama"},{"name":"estimated_readmission_percent","type":"number","description":"Published predicted 30-day all-cause readmission percent for this integer score. A population probability, not an individual outcome."},{"name":"readmission_band","type":"string","description":"Mumtaz 2019 predicted 30-day readmission strata: low <20%, medium 20-30%, high >30%. Not a discharge order."},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Mumtaz et al. Hepatology 2019 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"70","ascites":"false","disposition":"routine","elixhauser_ge_3":"false","hemodialysis":"false","hepatic_encephalopathy":"false","hepatocellular_carcinoma":"false","non_alcoholic_etiology":"false","paracentesis":"false","primary_payer":"private","variceal_bleeding":"false"},{"age":"70","ascites":"false","disposition":"routine","elixhauser_ge_3":"false","hemodialysis":"false","hepatic_encephalopathy":"false","hepatocellular_carcinoma":"false","non_alcoholic_etiology":"false","paracentesis":"false","primary_payer":"private","variceal_bleeding":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/mumtaz","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/mumtaz?age=70&primary_payer=private&elixhauser_ge_3=false&non_alcoholic_etiology=false&ascites=false&hepatic_encephalopathy=false&variceal_bleeding=false&hepatocellular_carcinoma=false&paracentesis=false&hemodialysis=false&disposition=routine","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/mumtaz","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/evendo","description":"Dong 2019 EVendo score for screening high-risk esophageal varices. A = (8.5 * INR) + (AST/35); B = (platelets/150) + (BUN/20) + (hemoglobin/15); score = A/B + 1 if ascites. US conventional units. Round to 2 decimals. Published cutoff strictly below 3.90. magent clamps: INR 0.8-4.0, AST 5-4000 U/L, platelets 10-800 k/uL, BUN 2-150 mg/dL, hemoglobin 4-20 g/dL. Not a varices diagnosis or endoscopy order. magent does not assay labs. Not a medical device.","parameters":[{"in":"query","name":"inr","type":"number","description":"International normalized ratio (0.8-4.0, magent clamp). Dong 2019 uses INR. Rejects non-positive INR. magent does not assay coagulation.","required":true,"example":"1.0"},{"in":"query","name":"ast_u_l","type":"number","description":"Aspartate aminotransferase in U/L (5-4000, magent clamp). US conventional units as in Dong 2019. Rejects non-positive AST. magent does not assay AST.","required":true,"example":"35"},{"in":"query","name":"platelets_k_ul","type":"number","description":"Platelet count in 10^3/µL (10-800, magent clamp), the same unit as 10^9/L. US conventional units as in Dong 2019. Rejects non-positive platelets. magent does not assay platelets.","required":true,"example":"150"},{"in":"query","name":"bun_mg_dl","type":"number","description":"Blood urea nitrogen in mg/dL (2-150, magent clamp). US conventional units as in Dong 2019. Rejects non-positive BUN. magent does not assay BUN.","required":true,"example":"20"},{"in":"query","name":"hemoglobin_g_dl","type":"number","description":"Hemoglobin in g/dL (4-20, magent clamp). US conventional units as in Dong 2019. Rejects non-positive hemoglobin. magent does not assay hemoglobin.","required":true,"example":"15"},{"in":"query","name":"ascites","type":"boolean","description":"Clinically evident ascites as assigned by the caller (Dong 2019). true adds 1 to the score; false adds 0. true or false. magent does not examine the abdomen.","required":true,"example":"false"}],"errors":[{"code":"invalid_evendo","message":"EVendo inputs must be numeric INR, AST, platelets, BUN, and hemoglobin plus ascites as used in Dong 2019. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/evendo","citation":{"authors":"Dong TS, Kalani A, Aby ES, Le L, Luu K, Hauer M, Kamath R, Lindor KD, Tabibian JH","doi":"10.1016/j.cgh.2019.01.025","id":"dong-2019","pmid":"30708109","source":"Clin Gastroenterol Hepatol. 2019;17(9):1894-1901.e1","title":"Machine learning-based development and validation of a scoring system for screening high-risk esophageal varices","url":"https://doi.org/10.1016/j.cgh.2019.01.025"},"formula_expression":"A = (8.5 * inr) + (ast_u_l / 35); B = (platelets_k_ul / 150) + (bun_mg_dl / 20) + (hemoglobin_g_dl / 15); evendo = A / B + (1 if ascites else 0); cutoff strictly below 3.90 (Dong 2019)","purpose":"Compute the Dong 2019 EVendo score from INR, AST, platelet count, BUN, hemoglobin, and ascites in US conventional units, rounded to 2 decimals, and whether that score is strictly below the published 3.90 cutoff.","markdown_url":"https://magentlab.com/docs/evendo.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"evendo"},{"name":"formula_expression","type":"string","description":"Exact Dong 2019 expression"},{"name":"inr","type":"number","description":"INR used in A"},{"name":"ast_u_l","type":"number","description":"AST in U/L used in A"},{"name":"platelets_k_ul","type":"number","description":"Platelets in 10^3/µL used in B"},{"name":"bun_mg_dl","type":"number","description":"BUN in mg/dL used in B"},{"name":"hemoglobin_g_dl","type":"number","description":"Hemoglobin in g/dL used in B"},{"name":"ascites","type":"boolean","description":"Caller-assigned ascites used as the +1 term"},{"name":"evendo","type":"number","description":"Dong 2019 EVendo score, 2 decimals. Not a varices diagnosis."},{"name":"below_cutoff_3_90","type":"boolean","description":"true when the rounded EVendo score is strictly below 3.90 (Dong 2019: an EVendo score below 3.90 would have spared EGDs). Not an endoscopy order."},{"name":"citation","type":"object","description":"Dong 2019 Clin Gastroenterol Hepatol citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"ascites":"false","ast_u_l":"35","bun_mg_dl":"20","hemoglobin_g_dl":"15","inr":"1.0","platelets_k_ul":"150"},{"ascites":"false","ast_u_l":"35","bun_mg_dl":"20","hemoglobin_g_dl":"15","inr":"1.0","platelets_k_ul":"150"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/evendo","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/evendo?inr=1.0&ast_u_l=35&platelets_k_ul=150&bun_mg_dl=20&hemoglobin_g_dl=15&ascites=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/evendo","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/clif-c-aclf","description":"Jalan 2014 CLIF-C ACLF (CANONIC) from caller-assigned CLIF-C OF (integer 6-18), age, and WBC in 10^9/L. Score = 10 × (0.33 × CLIF-C OF + 0.04 × age + 0.63 × ln(WBC) − 2), rounded to 1 decimal then clamped 0-100. magent does not score the six organs or compute CLIF-C OF. Not MELD, MELD-Na, Child-Pugh, CLIF-SOFA, or a transplant listing protocol. Not a medical device.","parameters":[{"in":"query","name":"clif_c_of","type":"integer","description":"Caller-assigned CLIF-C organ-failure score, integer 6-18 (Jalan 2014). magent does not score the six organs or compute CLIF-C OF.","required":true,"example":"6"},{"in":"query","name":"age","type":"integer","description":"Age in years (18-120).","required":true,"example":"50"},{"in":"query","name":"wbc_10e9_l","type":"number","description":"White-cell count in 10^9/L (0.1-200). Natural log in the equation.","required":true,"example":"5"}],"errors":[{"code":"invalid_clif_aclf","message":"clif_c_of must be an integer 6-18 and wbc_10e9_l a number from 0.1 to 200 (Jalan 2014 CLIF-C ACLF; caller-assigned CLIF-C OF). Returned before settlement; you are not charged.","status":400},{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/clif-c-aclf","citation":{"authors":"Jalan R, Saliba F, Pavesi M, et al.","doi":"10.1016/j.jhep.2014.06.012","id":"jalan-2014","pmid":"24950482","source":"J Hepatol. 2014;61(5):1038-1047","title":"Development and validation of a prognostic score to predict mortality in patients with acute-on-chronic liver failure.","url":"https://doi.org/10.1016/j.jhep.2014.06.012"},"formula_expression":"clif_c_aclf = 10 * (0.33 * clif_c_of + 0.04 * age + 0.63 * ln(wbc_10e9_l) - 2); caller-assigned CLIF-C OF 6-18; round 1 decimal then clamp 0-100 (Jalan 2014 CANONIC)","purpose":"Compute the Jalan 2014 CLIF-C ACLF score from a caller-assigned CLIF-C OF (integer 6-18), age, and white-cell count in 10^9/L. magent does not score the six organs.","markdown_url":"https://magentlab.com/docs/clif-c-aclf.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"clif_c_aclf"},{"name":"formula_expression","type":"string","description":"Exact Jalan 2014 CLIF-C ACLF expression, including 1-decimal round and 0-100 clamp"},{"name":"clif_c_of","type":"integer","description":"Caller-assigned CLIF-C OF used (6-18). Not scored from organs."},{"name":"age_years","type":"integer","description":"Age in years used"},{"name":"wbc_10e9_l","type":"number","description":"White-cell count in 10^9/L"},{"name":"clif_c_aclf","type":"number","description":"CLIF-C ACLF score, 1 decimal, clamped 0-100. Not MELD or Child-Pugh."},{"name":"citation","type":"object","description":"Jalan J Hepatol 2014 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"50","clif_c_of":"6","wbc_10e9_l":"5"},{"age":"50","clif_c_of":"6","wbc_10e9_l":"5"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/clif-c-aclf","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/clif-c-aclf?clif_c_of=6&age=50&wbc_10e9_l=5","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/clif-c-aclf","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/albi","description":"Johnson 2015 albumin-bilirubin (ALBI) grade from total bilirubin and albumin. xb = 0.66*log10(bilirubin umol/L) + albumin_g_l*(-0.085). Grade 1 if xb <= -2.60, grade 2 if xb <= -1.39, else 3. Returns albi_score (4 decimals) and albi_grade. Not a listing protocol, Child-Pugh, survival estimate, mALBI, PALBI, or EZ-ALBI.","parameters":[{"in":"query","name":"bilirubin_umol_l","type":"number","description":"Total bilirubin in µmol/L (2-684). Provide this or bilirubin_mg_dl, not both. Johnson 2015 uses µmol/L in log10.","required":false,"example":"10"},{"in":"query","name":"bilirubin_mg_dl","type":"number","description":"Total bilirubin in mg/dL (0.1-40). Converted as µmol/L = mg/dL × 17.1. Provide this or bilirubin_umol_l, not both.","required":false,"example":"1.0"},{"in":"query","name":"albumin_g_l","type":"number","description":"Albumin in g/L (10-60). Provide this or albumin_g_dl, not both. Johnson 2015 uses g/L.","required":false,"example":"40"},{"in":"query","name":"albumin_g_dl","type":"number","description":"Albumin in g/dL (1-6). Converted as g/L = g/dL × 10. Provide this or albumin_g_l, not both.","required":false,"example":"4.0"}],"errors":[{"code":"invalid_bilirubin","message":"bilirubin_mg_dl (0.1-40) or bilirubin_umol_l (2-684) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_albumin","message":"albumin_g_dl (1-6) or albumin_g_l (10-60) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/albi","citation":{"authors":"Johnson PJ, Berhane S, Kagebayashi C, et al.","doi":"10.1200/JCO.2014.57.9151","id":"johnson-2015","pmid":"25512453","source":"J Clin Oncol. 2015;33(6):550-558","title":"Assessment of liver function in patients with hepatocellular carcinoma: a new evidence-based approach-the ALBI grade","url":"https://doi.org/10.1200/JCO.2014.57.9151"},"formula_expression":"albi_score = (log10(bilirubin_umol_l) * 0.66) + (albumin_g_l * -0.085)","purpose":"Compute the Johnson 2015 albumin-bilirubin (ALBI) linear predictor and grade from total bilirubin and albumin.","markdown_url":"https://magentlab.com/docs/albi.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"albi"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"bilirubin_umol_l","type":"number","description":"Total bilirubin used in µmol/L (after conversion)"},{"name":"albumin_g_l","type":"number","description":"Albumin used in g/L (after conversion)"},{"name":"albi_score","type":"number","description":"Johnson 2015 linear predictor, 4 decimal places"},{"name":"albi_grade","type":"integer","description":"1 if unrounded xb <= -2.60, 2 if unrounded xb <= -1.39, else 3. Equality at -2.60 is 1; equality at -1.39 is 2."},{"name":"citation","type":"object","description":"Johnson 2015 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"albumin_g_l":"40","bilirubin_umol_l":"10"},{"albumin_g_l":"40","bilirubin_umol_l":"10"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/albi","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/albi?bilirubin_umol_l=10&albumin_g_l=40","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/albi","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/simplified-aih","description":"Hennes 2008 simplified AIH (Table 2): caller-assigned autoantibody points 0-2 (max 2 across ANA/SMA/LKM/SLA), IgG points 0-2 (≤ULN / >ULN / >1.10×ULN), histology none 0 / compatible 1 / typical 2, viral hepatitis absent true 2. Max 8. Score <6 not_aih, 6 probable, ≥7 definite. Not a diagnosis and not the original 1999 IAHG score. magent does not titer autoantibodies, assay IgG vs ULN, or read liver histology.","parameters":[{"in":"query","name":"autoantibody_points","type":"integer","enum":[0,1,2],"description":"Caller-assigned Hennes 2008 Table 2 autoantibody points (0, 1, or 2; max 2 across ANA/SMA/LKM/SLA). 0: not scoring. 1: ANA or SMA ≥1:40. 2: ANA or SMA ≥1:80 or LKM ≥1:40 or SLA positive. magent does not titer autoantibodies.","required":true,"example":"2"},{"in":"query","name":"igg_points","type":"integer","enum":[0,1,2],"description":"Caller-assigned Hennes 2008 Table 2 IgG points (0, 1, or 2). 0: IgG ≤ULN. 1: IgG >ULN. 2: IgG >1.10×ULN. magent does not assay IgG vs ULN.","required":true,"example":"2"},{"in":"query","name":"histology","type":"string","enum":["none","compatible","typical"],"description":"Caller-assigned Hennes 2008 Table 2 liver histology. none scores 0 (hepatitis is required for histology points). compatible scores 1. typical scores 2. magent does not read liver histology.","required":true,"example":"typical"},{"in":"query","name":"viral_hepatitis_absent","type":"boolean","description":"Caller-assigned Hennes 2008 Table 2 viral hepatitis absence. true scores 2; false scores 0. magent does not interpret viral serology.","required":true,"example":"true"}],"errors":[{"code":"invalid_aih_autoantibody","message":"autoantibody_points must be 0, 1, or 2 (Hennes 2008 Table 2; max 2 across ANA/SMA/LKM/SLA). Returned before settlement; you are not charged.","status":400},{"code":"invalid_aih_igg","message":"igg_points must be 0, 1, or 2 (Hennes 2008: 0 ≤ULN, 1 >ULN, 2 >1.10×ULN). Returned before settlement; you are not charged.","status":400},{"code":"invalid_aih_histology","message":"histology must be none, compatible, or typical (Hennes 2008; hepatitis is required for histology points). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/simplified-aih","citation":{"authors":"Hennes EM, Zeniya M, Czaja AJ, Parés A, Dalekos GN, Krawitt EL, Bittencourt PL, Porta G, Boberg KM, Hofer H, Francesconi F, Dufour JF, Vergani D, Lohse AW; International Autoimmune Hepatitis Group","doi":"10.1002/hep.22322","id":"hennes-2008","pmid":"18537184","source":"Hepatology. 2008;48(1):169-176","title":"Simplified criteria for the diagnosis of autoimmune hepatitis","url":"https://doi.org/10.1002/hep.22322"},"formula_expression":"simplified AIH = autoantibody_points (0-2) + igg_points (0-2) + histology (none 0, compatible 1, typical 2) + viral_hepatitis_absent (true 2); Hennes 2008 Table 2; max 8; <6 not_aih, 6 probable, ≥7 definite","purpose":"Sum the Hennes 2008 simplified autoimmune-hepatitis criteria (Table 2) from caller-assigned autoantibody, IgG, histology, and viral-hepatitis points and return not_aih (<6), probable (6), or definite (≥7).","markdown_url":"https://magentlab.com/docs/simplified-aih.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"simplified_aih"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Simplified AIH points 0-8"},{"name":"max_score","type":"integer","description":"Always 8"},{"name":"aih_band","type":"string","description":"not_aih when score is <6, probable when 6, definite when ≥7 (Hennes 2008 Table 2). Not an autoimmune-hepatitis diagnosis. Not the original IAHG 1999 score."},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Hennes 2008 Hepatology citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"autoantibody_points":"2","histology":"typical","igg_points":"2","viral_hepatitis_absent":"true"},{"autoantibody_points":"2","histology":"typical","igg_points":"2","viral_hepatitis_absent":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/simplified-aih","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/simplified-aih?autoantibody_points=2&igg_points=2&histology=typical&viral_hepatitis_absent=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/simplified-aih","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/aih-original","description":"Alvarez 1999 revised original IAIHG AIH score, not Hennes 2008 simplified. Caller-assigned sex, ALP:AST/ALT ratio, globulin/IgG, ANA/SMA/LKM titer, AMA, viral markers, drugs, alcohol, additive histology, other autoimmune disease; optional HLA/other autoantibodies if seronegative and treatment response. Pretreatment definite >15 / probable 10-15; posttreatment definite >17 / probable 12-17. magent does not read histology. Not a diagnosis or immunosuppression order.","parameters":[{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"Caller-assigned sex (Alvarez 1999). female scores 2; male scores 0. magent does not examine the patient.","required":true,"example":"male"},{"in":"query","name":"alp_ratio","type":"string","enum":["lt_1_5","1_5_to_3","gt_3"],"description":"Caller-assigned ALP:(AST or ALT) ratio as multiples of ULN (Alvarez 1999 note 1). lt_1_5 (<1.5) scores 2; 1_5_to_3 (1.5–3.0) scores 0; gt_3 (>3) scores -2. magent does not take raw enzymes.","required":true,"example":"gt_3"},{"in":"query","name":"globulin_igg","type":"string","enum":["lt_1x","1_to_1_5x","1_5_to_2x","gt_2x"],"description":"Caller-assigned serum globulin or IgG as multiples of ULN (Alvarez 1999). lt_1x scores 0; 1_to_1_5x scores 1; 1_5_to_2x scores 2; gt_2x scores 3. magent does not assay globulin or IgG.","required":true,"example":"lt_1x"},{"in":"query","name":"autoantibody_titer","type":"string","enum":["lt_1_40","1_40","1_80","gt_1_80"],"description":"Caller-assigned highest ANA, SMA, or LKM-1 immunofluorescence titer (Alvarez 1999). lt_1_40 scores 0; 1_40 scores 1; 1_80 scores 2; gt_1_80 scores 3. magent does not titer autoantibodies.","required":true,"example":"lt_1_40"},{"in":"query","name":"ama_positive","type":"boolean","description":"Caller-assigned antimitochondrial antibody. true scores -4; false scores 0 (Alvarez 1999). magent does not assay AMA.","required":true,"example":"true"},{"in":"query","name":"viral_markers_positive","type":"boolean","description":"Caller-assigned hepatitis A/B/C viral markers (Alvarez 1999 note 3). true scores -3; false (negative) scores 3. magent does not interpret viral serology.","required":true,"example":"true"},{"in":"query","name":"hepatotoxic_drugs","type":"boolean","description":"Recent or current known or suspected hepatotoxic drugs (Alvarez 1999 note 4). true scores -4; false scores 1.","required":true,"example":"true"},{"in":"query","name":"alcohol_intake","type":"string","enum":["lt_25","25_to_60","gt_60"],"description":"Caller-assigned average alcohol intake (Alvarez 1999). lt_25 (<25 g/day) scores 2; 25_to_60 scores 0 (gap between the tabulated <25 and >60 cells); gt_60 (>60 g/day) scores -2.","required":true,"example":"gt_60"},{"in":"query","name":"interface_hepatitis","type":"boolean","description":"Caller-assigned interface hepatitis on liver histology. true scores 3 (Alvarez 1999; additive). magent does not read histology.","required":true,"example":"false"},{"in":"query","name":"lymphoplasmacytic_infiltrate","type":"boolean","description":"Caller-assigned predominantly lymphoplasmacytic infiltrate. true scores 1 (Alvarez 1999; additive). magent does not read histology.","required":true,"example":"false"},{"in":"query","name":"liver_cell_rosettes","type":"boolean","description":"Caller-assigned liver-cell rosettes. true scores 1 (Alvarez 1999; additive). magent does not read histology.","required":true,"example":"false"},{"in":"query","name":"biliary_changes","type":"boolean","description":"Caller-assigned biliary changes typical of PBC or PSC (Alvarez 1999 note 5). true scores -3; additive with other histology items. magent does not read histology.","required":true,"example":"true"},{"in":"query","name":"other_atypical_histology","type":"boolean","description":"Caller-assigned other prominent histologic features suggesting a different etiology (Alvarez 1999 note 6). true scores -3; additive. magent does not read histology.","required":true,"example":"true"},{"in":"query","name":"other_autoimmune_disease","type":"boolean","description":"Any other autoimmune disorder in the patient or first-degree relatives (Alvarez 1999 note 7). true scores 2; false scores 0.","required":true,"example":"false"},{"in":"query","name":"other_autoantibodies","type":"boolean","description":"Optional. Seropositivity for other defined autoantibodies (pANCA, anti-LC1, anti-SLA, anti-ASGPR, anti-LP, anti-sulfatide; Alvarez 1999 note 8). true scores 2 only when autoantibody_titer is lt_1_40; otherwise 0. Omit or false scores 0.","required":false,"example":"false"},{"in":"query","name":"hla_dr3_or_dr4","type":"boolean","description":"Optional. HLA DR3 or DR4 (Alvarez 1999 note 9). true scores 1 only when autoantibody_titer is lt_1_40; otherwise 0. Omit or false scores 0.","required":false,"example":"false"},{"in":"query","name":"treatment_response","type":"string","enum":["none","complete","relapse"],"description":"Optional. Alvarez 1999 response to therapy, added to presentation points. none or omit: pretreatment bands (definite >15, probable 10-15). complete scores 2; relapse scores 3; both use posttreatment bands (definite >17, probable 12-17). Not an immunosuppression order.","required":false,"example":"none"}],"errors":[{"code":"invalid_aih_original","message":"Revised original AIH score inputs must match Alvarez 1999 International Autoimmune Hepatitis Group criteria from that paper. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/aih-original","citation":{"authors":"Alvarez F, Berg PA, Bianchi FB, et al.","doi":"10.1016/s0168-8278(99)80297-9","id":"alvarez-1999","pmid":"10580593","source":"J Hepatol. 1999;31(5):929-938","title":"International Autoimmune Hepatitis Group Report: review of criteria for diagnosis of autoimmune hepatitis","url":"https://doi.org/10.1016/s0168-8278(99)80297-9"},"formula_expression":"revised original IAIHG AIH (Alvarez 1999) = sex (male 0, female 2) + alp_ratio (lt_1_5 2, 1_5_to_3 0, gt_3 -2) + globulin_igg (lt_1x 0, 1_to_1_5x 1, 1_5_to_2x 2, gt_2x 3) + autoantibody_titer (lt_1_40 0, 1_40 1, 1_80 2, gt_1_80 3) + ama_positive (true -4) + viral_markers (positive -3, negative 3) + hepatotoxic_drugs (true -4, false 1) + alcohol (lt_25 2, 25_to_60 0, gt_60 -2) + histology (interface 3, lymphoplasmacytic 1, rosettes 1, none of those -5, biliary -3, other atypical -3; additive) + other_autoimmune_disease (true 2) + other_autoantibodies (true 2 if titer lt_1_40) + hla_dr3_or_dr4 (true 1 if titer lt_1_40) + treatment_response (complete 2, relapse 3); max 26; pretreatment definite >15, probable 10-15; posttreatment definite >17, probable 12-17","purpose":"Sum the Alvarez 1999 revised original IAIHG autoimmune-hepatitis score from caller-assigned sex, ALP:AST or ALP:ALT ratio, globulin/IgG, ANA/SMA/LKM titer, AMA, viral markers, drugs, alcohol, additive histology, other autoimmune disease, and optional HLA/other autoantibodies and treatment response, and return pretreatment or posttreatment definite, probable, or not_aih.","markdown_url":"https://magentlab.com/docs/aih-original.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"aih_original"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Alvarez 1999 revised original IAIHG integer sum (can be negative); max 26"},{"name":"max_score","type":"integer","description":"26 including optional relapse"},{"name":"aih_band","type":"string","description":"definite, probable, or not_aih. Pretreatment: definite >15, probable 10-15. Posttreatment: definite >17, probable 12-17 (Alvarez 1999). Not a diagnosis. Not Hennes 2008 simplified AIH."},{"name":"timing","type":"string","description":"pretreatment when treatment_response is none or omitted; posttreatment when complete or relapse"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Alvarez 1999 J Hepatol citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"alcohol_intake":"gt_60","alp_ratio":"gt_3","ama_positive":"true","autoantibody_titer":"lt_1_40","biliary_changes":"true","globulin_igg":"lt_1x","hepatotoxic_drugs":"true","interface_hepatitis":"false","liver_cell_rosettes":"false","lymphoplasmacytic_infiltrate":"false","other_atypical_histology":"true","other_autoimmune_disease":"false","sex":"male","viral_markers_positive":"true"},{"alcohol_intake":"gt_60","alp_ratio":"gt_3","ama_positive":"true","autoantibody_titer":"lt_1_40","biliary_changes":"true","globulin_igg":"lt_1x","hepatotoxic_drugs":"true","interface_hepatitis":"false","liver_cell_rosettes":"false","lymphoplasmacytic_infiltrate":"false","other_atypical_histology":"true","other_autoimmune_disease":"false","sex":"male","viral_markers_positive":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/aih-original","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/aih-original?sex=male&alp_ratio=gt_3&globulin_igg=lt_1x&autoantibody_titer=lt_1_40&ama_positive=true&viral_markers_positive=true&hepatotoxic_drugs=true&alcohol_intake=gt_60&interface_hepatitis=false&lymphoplasmacytic_infiltrate=false&liver_cell_rosettes=false&biliary_changes=true&other_atypical_histology=true&other_autoimmune_disease=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/aih-original","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/saag","description":"Runyon 1992 SAAG as serum albumin minus ascites albumin in g/dL, rounded to one decimal. portal_hypertension_physiology is true when SAAG >= 1.1 g/dL. Gradient only; not Light-style exudate/transudate criteria for ascites. Not a diagnosis. magent does not diagnose portal hypertension or peritonitis. Serum and ascites albumin as g/dL or g/L.","parameters":[{"in":"query","name":"albumin_g_dl","type":"number","description":"Serum albumin in g/dL (1-6). Provide this or albumin_g_l, not both.","required":false,"example":"3.5"},{"in":"query","name":"albumin_g_l","type":"number","description":"Serum albumin in g/L (10-60). Converted as g/dL = g/L / 10. Provide this or albumin_g_dl, not both.","required":false,"example":"35"},{"in":"query","name":"ascites_albumin_g_dl","type":"number","description":"Ascites albumin in g/dL (0.1-6). Provide this or ascites_albumin_g_l, not both. May be lower than serum albumin.","required":false,"example":"2.0"},{"in":"query","name":"ascites_albumin_g_l","type":"number","description":"Ascites albumin in g/L (1-60). Converted as g/dL = g/L / 10. Provide this or ascites_albumin_g_dl, not both.","required":false,"example":"20"}],"errors":[{"code":"invalid_albumin","message":"albumin_g_dl (1-6) or albumin_g_l (10-60) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_ascites_albumin","message":"ascites_albumin_g_dl (0.1-6) or ascites_albumin_g_l (1-60) is required, not both. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/saag","citation":{"authors":"Runyon BA, Montano AA, Akriviadis EA, Antillon MR, Irving MA, McHutchison JG","doi":"10.7326/0003-4819-117-3-215","id":"runyon-1992","source":"Ann Intern Med. 1992;117(3):215-220","title":"The serum-ascites albumin gradient is superior to the exudate-transudate concept in the differential diagnosis of ascites","url":"https://doi.org/10.7326/0003-4819-117-3-215"},"formula_expression":"saag_g_dl = albumin_g_dl - ascites_albumin_g_dl","purpose":"Compute the Runyon 1992 serum-ascites albumin gradient as serum albumin minus ascites albumin in g/dL, and whether that gradient is >= 1.1 g/dL (portal-hypertension physiology).","markdown_url":"https://magentlab.com/docs/saag.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"saag"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"albumin_g_dl","type":"number","description":"Serum albumin used in g/dL (after conversion)"},{"name":"ascites_albumin_g_dl","type":"number","description":"Ascites albumin used in g/dL (after conversion)"},{"name":"saag_g_dl","type":"number","description":"Serum albumin minus ascites albumin, 1 decimal"},{"name":"portal_hypertension_physiology","type":"boolean","description":"true when saag_g_dl is >= 1.1 after 1-decimal rounding"},{"name":"citation","type":"object","description":"Runyon 1992 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"albumin_g_dl":"3.5","ascites_albumin_g_dl":"2.0"},{"albumin_g_dl":"3.5","ascites_albumin_g_dl":"2.0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/saag","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/saag?albumin_g_dl=3.5&ascites_albumin_g_dl=2.0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/saag","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/peld","description":"McDiarmid 2002 PELD from bilirubin, INR, albumin, age under 1 year, and growth failure. Deterministic published listing arithmetic with citation; not a transplant listing recommendation.","parameters":[{"in":"query","name":"age_years","type":"number","description":"Age in years (0-11 inclusive). PELD is for children under 12. Age under 1 adds 0.436 before scaling.","required":true,"example":"2"},{"in":"query","name":"bilirubin_mg_dl","type":"number","description":"Total bilirubin in mg/dL (0.1-40). Provide this or bilirubin_umol_l, not both. Floored at 1.0 before ln.","required":false,"example":"4.0"},{"in":"query","name":"bilirubin_umol_l","type":"number","description":"Total bilirubin in µmol/L. Converted as mg/dL = µmol/L / 17.1.","required":false,"example":"68.4"},{"in":"query","name":"inr","type":"number","description":"INR (0.8-10). Floored at 1.0 before ln.","required":true,"example":"1.5"},{"in":"query","name":"albumin_g_dl","type":"number","description":"Albumin in g/dL (1-6). Provide this or albumin_g_l, not both. Floored at 1.0 before ln.","required":false,"example":"2.5"},{"in":"query","name":"albumin_g_l","type":"number","description":"Albumin in g/L. Converted as g/dL = g/L / 10.","required":false,"example":"25"},{"in":"query","name":"growth_failure","type":"boolean","description":"Growth failure as assigned by the caller. true adds 0.667 before scaling.","required":true,"example":"false"}],"errors":[{"code":"invalid_peld_age","message":"age_years must be a number from 0 to 11 (PELD is for children under 12). Returned before settlement; you are not charged.","status":400},{"code":"invalid_bilirubin","message":"bilirubin_mg_dl (0.1-40) or bilirubin_umol_l (2-684) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_albumin","message":"albumin_g_dl (1-6) or albumin_g_l (10-60) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_inr","message":"inr must be a number from 0.8 to 10 Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/peld","citation":{"authors":"McDiarmid SV, Anand R, Lindblad AS; SPLIT Research Group","doi":"10.1097/00007890-200207270-00006","id":"mcdiarmid-2002","source":"Transplantation. 2002;74(2):173-181","title":"Development of a pediatric end-stage liver disease score to predict poor outcome in children awaiting liver transplantation","url":"https://doi.org/10.1097/00007890-200207270-00006"},"formula_expression":"raw = 0.480*ln(bili) + 1.857*ln(INR) - 0.687*ln(albumin) + 0.436*[age<1] + 0.667*[growth_failure]; PELD = round(10 * raw); bili, INR, and albumin floored at 1.0","purpose":"Compute the McDiarmid 2002 Pediatric End-Stage Liver Disease listing arithmetic from bilirubin, INR, albumin, age, and growth failure.","markdown_url":"https://magentlab.com/docs/peld.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"peld"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"bilirubin_mg_dl","type":"number","description":"Input bilirubin in mg/dL"},{"name":"albumin_g_dl","type":"number","description":"Input albumin in g/dL"},{"name":"inr","type":"number","description":"Input INR"},{"name":"bilirubin_used_mg_dl","type":"number","description":"Bilirubin after 1.0 floor"},{"name":"albumin_used_g_dl","type":"number","description":"Albumin after 1.0 floor"},{"name":"inr_used","type":"number","description":"INR after 1.0 floor"},{"name":"age_years","type":"number","description":"Input age in years"},{"name":"age_lt_1","type":"boolean","description":"true when age_years < 1"},{"name":"growth_failure","type":"boolean","description":"Input growth-failure flag"},{"name":"peld","type":"integer","description":"PELD, nearest integer"},{"name":"citation","type":"object","description":"McDiarmid 2002 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age_years":"2","albumin_g_dl":"2.5","bilirubin_mg_dl":"4.0","growth_failure":"false","inr":"1.5"},{"age_years":"2","albumin_g_dl":"2.5","bilirubin_mg_dl":"4.0","growth_failure":"false","inr":"1.5"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/peld","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/peld?age_years=2&bilirubin_mg_dl=4.0&inr=1.5&albumin_g_dl=2.5&growth_failure=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/peld","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/peld-cr","description":"OPTN Policy 9 Table 9-1 PELD-Cr from age, albumin, bilirubin, INR, creatinine or dialysis/CVVHD, and caller-assigned minimum CDC height or weight Z-score. PELD = (sum of Table 9-1 terms + 1.5287) × 10 + 2.82; nearest integer; minimum 6. Albumin, bilirubin, and INR floor at 1.0; creatinine 1.3 mg/dL if >1.3 or dialysis/CVVHD. Not a transplant listing order. magent does not compute CDC LMS Z from height or weight.","parameters":[{"in":"query","name":"age_years","type":"number","description":"Age in fractional calendar years (0 to under 12). Table 9-1 uses 1.0 below age 1 and 5.5 above 5.5 years. PELD-Cr is for candidates under 12.","required":true,"example":"2"},{"in":"query","name":"albumin_g_dl","type":"number","description":"Serum albumin in g/dL (0.1-6). Provide this or albumin_g_l, not both. Policy floors at 1.0; Table 9-1 uses ln(1.9) above 1.9.","required":false,"example":"2.5"},{"in":"query","name":"albumin_g_l","type":"number","description":"Serum albumin in g/L (1-60). Converted as g/dL = g/L / 10.","required":false,"example":"25"},{"in":"query","name":"bilirubin_mg_dl","type":"number","description":"Total bilirubin in mg/dL (0.1-80). Provide this or bilirubin_umol_l, not both. Policy floors at 1.0; Table 9-1 knots at 4 and 40.","required":false,"example":"4.0"},{"in":"query","name":"bilirubin_umol_l","type":"number","description":"Total bilirubin in µmol/L (2-1368). Converted as mg/dL = µmol/L / 17.1.","required":false,"example":"68.4"},{"in":"query","name":"inr","type":"number","description":"INR (0.8-20). Policy floors at 1.0; Table 9-1 knots at 2 and 10.","required":true,"example":"1.5"},{"in":"query","name":"creatinine_mg_dl","type":"number","description":"Serum creatinine in mg/dL (0.1-20). Provide this or creatinine_umol_l, not both. Table 9-1 floors at 0.2 and assigns 1.3 if >1.3 or dialysis_or_cvvhd is true.","required":false,"example":"0.4"},{"in":"query","name":"creatinine_umol_l","type":"number","description":"Serum creatinine in µmol/L (9-1768). Converted as mg/dL = µmol/L / 88.42.","required":false,"example":"35.368"},{"in":"query","name":"dialysis_or_cvvhd","type":"boolean","description":"True when the candidate had two or more dialysis treatments in the prior 7 days, or 24 hours of CVVHD in the prior 7 days. Assigns creatinine 1.3 mg/dL.","required":true,"example":"false"},{"in":"query","name":"min_cdc_z","type":"number","description":"Caller-assigned minimum of CDC 2000 height or weight Z-score (LMS). magent does not compute Z from height or weight. Table 9-1 clamps -5.0 to -2.1.","required":true,"example":"0.0"}],"errors":[{"code":"invalid_peld_cr","message":"PELD-Cr inputs must match OPTN Policy 9 age under 12, albumin, bilirubin, INR, creatinine or dialysis, and caller-assigned minimum CDC height or weight Z-score. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/peld-cr","citation":{"authors":"Organ Procurement and Transplantation Network","id":"optn-2023-peld-cr","source":"OPTN Policy 9.1.E / Table 9-1 (policy notice June 2022; implementation 13 Jul 2023)","title":"Improving Liver Allocation: MELD, PELD, Status 1A and Status 1B","url":"https://www.hrsa.gov/sites/default/files/hrsa/optn/policy-guid-change_impr-liv-alloc-meld-peld-sta-1a-sta-1b_liv.pdf"},"formula_expression":"PELD = round((sum of OPTN Policy 9 Table 9-1 terms + 1.5287)*10 + 2.82); min 6. Age (fractional years, <12): <1 → -0.1967*1; 1-5.5 → -0.1967*age; >5.5 → -0.1967*5.5. Albumin g/dL (floor 1.0): 1-1.9 → -1.842*ln(albumin); >1.9 → -1.842*ln(1.9). Bilirubin mg/dL (floor 1.0): 1-4 → 0.7854*ln(bilirubin)+0.3434*ln(4); >4-40 → 0.7854*ln(4)+0.3434*ln(bilirubin); >40 → 0.7854*ln(4)+0.3434*ln(40). INR (floor 1.0): 1-2 → 1.981*ln(INR)+0.7298*ln(2); >2-10 → 1.981*ln(2)+0.7298*ln(INR); >10 → 1.981*ln(2)+0.7298*ln(10). Min CDC height/weight Z: <-5 → -0.1807*(-5); -5 to -2.1 → -0.1807*Z; >-2.1 → -0.1807*(-2.1). Creatinine mg/dL (1.3 if >1.3 or dialysis/CVVHD): <0.2 → 1.453*ln(0.2); 0.2-1.3 → 1.453*ln(creatinine); >1.3 → 1.453*ln(1.3)","purpose":"Compute the OPTN Policy 9 Table 9-1 PELD-Cr integer from age, albumin, bilirubin, INR, creatinine or dialysis/CVVHD, and a caller-assigned minimum CDC height or weight Z-score.","markdown_url":"https://magentlab.com/docs/peld-cr.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"optn_peld_cr_2023"},{"name":"formula_expression","type":"string","description":"Exact Table 9-1 expression used"},{"name":"age_years","type":"number","description":"Input age in years"},{"name":"albumin_g_dl","type":"number","description":"Input albumin in g/dL"},{"name":"bilirubin_mg_dl","type":"number","description":"Input bilirubin in mg/dL"},{"name":"inr","type":"number","description":"Input INR"},{"name":"creatinine_mg_dl","type":"number","description":"Input creatinine in mg/dL"},{"name":"dialysis_or_cvvhd","type":"boolean","description":"Dialysis or 24h CVVHD flag"},{"name":"min_cdc_z","type":"number","description":"Caller-assigned minimum CDC height or weight Z"},{"name":"age_used_years","type":"number","description":"Age after Table 9-1 1.0-5.5 bounds"},{"name":"albumin_used_g_dl","type":"number","description":"Albumin after 1.0 floor and 1.9 Table 9-1 cap"},{"name":"bilirubin_used_mg_dl","type":"number","description":"Bilirubin after 1.0 floor and 40 cap"},{"name":"inr_used","type":"number","description":"INR after 1.0 floor and 10 cap"},{"name":"creatinine_used_mg_dl","type":"number","description":"Creatinine after 0.2 floor; 1.3 if >1.3 or dialysis/CVVHD"},{"name":"min_cdc_z_used","type":"number","description":"Minimum CDC Z after Table 9-1 -5.0 to -2.1 clamp"},{"name":"peld_cr","type":"integer","description":"OPTN Policy 9 PELD-Cr, nearest integer, minimum 6"},{"name":"citation","type":"object","description":"OPTN Policy 9 PELD-Cr citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age_years":"2","albumin_g_dl":"2.5","bilirubin_mg_dl":"4.0","creatinine_mg_dl":"0.4","dialysis_or_cvvhd":"false","inr":"1.5","min_cdc_z":"0.0"},{"age_years":"2","albumin_g_dl":"2.5","bilirubin_mg_dl":"4.0","creatinine_mg_dl":"0.4","dialysis_or_cvvhd":"false","inr":"1.5","min_cdc_z":"0.0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/peld-cr","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/peld-cr?age_years=2&albumin_g_dl=2.5&bilirubin_mg_dl=4.0&inr=1.5&creatinine_mg_dl=0.4&dialysis_or_cvvhd=false&min_cdc_z=0.0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/peld-cr","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/apri","description":"Wai 2003 AST to platelet ratio index (APRI) from AST, laboratory AST ULN, and platelet count. Returns APRI to two decimals plus published training-set cut-offs for significant fibrosis (Ishak ≥3) and cirrhosis. ULN is required; magent does not assume 40 U/L. Not a diagnosis, not FIB-4, and not a biopsy.","parameters":[{"in":"query","name":"ast_u_l","type":"number","description":"Aspartate aminotransferase in U/L (1-10000).","required":true,"example":"90"},{"in":"query","name":"ast_uln_u_l","type":"number","description":"Laboratory AST upper limit of normal in U/L (5-200). Required; magent does not assume 40.","required":true,"example":"45"},{"in":"query","name":"platelets_10e9_l","type":"number","description":"Platelet count in 10^9/L (1-2000).","required":true,"example":"120"}],"errors":[{"code":"invalid_ast","message":"ast_u_l must be a number from 1 to 10000 Returned before settlement; you are not charged.","status":400},{"code":"invalid_ast_uln","message":"ast_uln_u_l must be a number from 5 to 200. Returned before settlement; you are not charged.","status":400},{"code":"invalid_platelets","message":"platelets_10e9_l must be a number from 1 to 2000 Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/apri","citation":{"authors":"Wai CT, Greenson JK, Fontana RJ, et al.","doi":"10.1053/jhep.2003.50346","id":"wai-2003","source":"Hepatology. 2003;38(2):518-526","title":"A simple noninvasive index can predict both significant fibrosis and cirrhosis in patients with chronic hepatitis C","url":"https://doi.org/10.1053/jhep.2003.50346"},"formula_expression":"APRI = ((AST / AST_ULN) / platelet_count_10e9_L) * 100","purpose":"Compute the AST to platelet ratio index (APRI) from AST, laboratory AST ULN, and platelet count.","markdown_url":"https://magentlab.com/docs/apri.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"apri"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"ast_u_l","type":"number","description":"AST in U/L"},{"name":"ast_uln_u_l","type":"number","description":"Laboratory AST upper limit of normal in U/L"},{"name":"platelets_10e9_l","type":"number","description":"Platelets in 10^9/L"},{"name":"apri","type":"number","description":"APRI, 2 decimal places"},{"name":"wai_fibrosis_band","type":"string","description":"Wai 2003 significant fibrosis (Ishak >=3) cut-offs: low (<=0.50), indeterminate, high (>1.50). Not a diagnosis."},{"name":"wai_cirrhosis_band","type":"string","description":"Wai 2003 cirrhosis cut-offs: low (<=1.00), indeterminate, high (>2.00). Not a diagnosis."},{"name":"citation","type":"object","description":"Hepatology 2003 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"ast_u_l":"90","ast_uln_u_l":"45","platelets_10e9_l":"120"},{"ast_u_l":"90","ast_uln_u_l":"45","platelets_10e9_l":"120"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/apri","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/apri?ast_u_l=90&ast_uln_u_l=45&platelets_10e9_l=120","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/apri","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/gahs","description":"Forrest 2005 Glasgow alcoholic hepatitis score from age, WBC, urea, PT ratio, and bilirubin (range 5-12) with the published ≥9 band. Deterministic published arithmetic with citation; not a steroid order.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). <50 scores 1; ≥50 scores 2 (Forrest 2005).","required":true,"example":"40"},{"in":"query","name":"wbc_k_ul","type":"number","description":"WBC in 10^3/µL (same as 10^9/L). Provide wbc_k_ul or wbc_ul. <15 scores 1; ≥15 scores 2.","required":false,"example":"8"},{"in":"query","name":"wbc_ul","type":"number","description":"WBC in cells/µL. Converted as K/µL = cells/µL / 1000.","required":false,"example":"8000"},{"in":"query","name":"urea_mmol_l","type":"number","description":"Urea in mmol/L (1-50). Provide this or bun_mg_dl, not both. <5 scores 1; ≥5 scores 2.","required":false,"example":"4"},{"in":"query","name":"bun_mg_dl","type":"number","description":"BUN in mg/dL (3-140). Converted as urea_mmol_l = bun_mg_dl / 2.8.","required":false,"example":"11.2"},{"in":"query","name":"pt_ratio","type":"number","description":"Prothrombin-time ratio (0.8-10). <1.5 scores 1; 1.5-2.0 scores 2; >2.0 scores 3.","required":true,"example":"1.2"},{"in":"query","name":"bilirubin_umol_l","type":"number","description":"Total bilirubin in µmol/L (2-684). Provide this or bilirubin_mg_dl. <125 scores 1; 125-250 scores 2; >250 scores 3.","required":false,"example":"80"},{"in":"query","name":"bilirubin_mg_dl","type":"number","description":"Total bilirubin in mg/dL (0.1-40). Converted as µmol/L = mg/dL × 17.1.","required":false,"example":"4.7"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_wbc","message":"wbc_k_ul (0.01-500) or wbc_ul (10-500000) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_urea","message":"urea_mmol_l (1-50) or bun_mg_dl (3-140) is required, not both. Returned before settlement; you are not charged.","status":400},{"code":"invalid_gahs_pt_ratio","message":"pt_ratio must be a number from 0.8 to 10. Returned before settlement; you are not charged.","status":400},{"code":"invalid_bilirubin","message":"bilirubin_mg_dl (0.1-40) or bilirubin_umol_l (2-684) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/gahs","citation":{"authors":"Forrest EH, Evans CD, Stewart S, et al.","doi":"10.1136/gut.2004.050781","id":"forrest-2005","source":"Gut. 2005;54(8):1174-1179","title":"Analysis of factors predictive of mortality in alcoholic hepatitis and derivation and validation of the Glasgow alcoholic hepatitis score","url":"https://doi.org/10.1136/gut.2004.050781"},"formula_expression":"GAHS = age_points + wbc_points + urea_points + pt_ratio_points + bilirubin_points; range 5-12","purpose":"Compute the Forrest 2005 Glasgow alcoholic hepatitis score (5-12) and the published ≥9 band.","markdown_url":"https://magentlab.com/docs/gahs.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"gahs"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"GAHS 5-12"},{"name":"max_score","type":"integer","description":"12"},{"name":"min_score","type":"integer","description":"5"},{"name":"gahs_band","type":"string","description":"lt_9 or ge_9 (Forrest 2005 day-1 cutoff). A band, not a steroid order."},{"name":"age_years","type":"integer","description":"Age used"},{"name":"wbc_k_ul","type":"number","description":"WBC in 10^9/L used"},{"name":"urea_mmol_l","type":"number","description":"Urea in mmol/L used"},{"name":"pt_ratio","type":"number","description":"PT ratio used"},{"name":"bilirubin_umol_l","type":"number","description":"Bilirubin in µmol/L used"},{"name":"components","type":"array","description":"Per-variable points"},{"name":"citation","type":"object","description":"Forrest et al. Gut 2005 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"40","bilirubin_umol_l":"80","pt_ratio":"1.2","urea_mmol_l":"4","wbc_k_ul":"8"},{"age":"40","bilirubin_umol_l":"80","pt_ratio":"1.2","urea_mmol_l":"4","wbc_k_ul":"8"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/gahs","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/gahs?age=40&wbc_k_ul=8&urea_mmol_l=4&pt_ratio=1.2&bilirubin_umol_l=80","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/gahs","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/nafld-fibrosis","description":"Angulo 2007 NAFLD fibrosis score from age, BMI, IFG/diabetes, AST, ALT, platelets, and albumin. Deterministic published equation with citation. Not a biopsy or diagnosis. Not FIB-4, APRI, or BARD.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120).","required":true,"example":"50"},{"in":"query","name":"bmi_kg_m2","type":"number","description":"Body-mass index in kg/m^2 (10-80). Caller-supplied; magent does not compute BMI.","required":true,"example":"30"},{"in":"query","name":"ifg_or_diabetes","type":"boolean","description":"Impaired fasting glucose or diabetes as assigned by the caller (Angulo 2007 IFG/diabetes term). true or false.","required":true,"example":"true"},{"in":"query","name":"ast_u_l","type":"number","description":"Aspartate aminotransferase in U/L (1-10000).","required":true,"example":"40"},{"in":"query","name":"alt_u_l","type":"number","description":"Alanine aminotransferase in U/L (1-10000).","required":true,"example":"40"},{"in":"query","name":"platelets_10e9_l","type":"number","description":"Platelet count in 10^9/L (1-2000).","required":true,"example":"200"},{"in":"query","name":"albumin_g_dl","type":"number","description":"Albumin in g/dL (1-6). Provide albumin_g_dl or albumin_g_l, not both.","required":false,"example":"4"},{"in":"query","name":"albumin_g_l","type":"number","description":"Albumin in g/L (10-60). Converted as g/dL = g/L / 10.","required":false,"example":"40"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_bmi_kg_m2","message":"bmi_kg_m2 must be a number from 10 to 80. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_ast","message":"ast_u_l must be a number from 1 to 10000 Returned before settlement; you are not charged.","status":400},{"code":"invalid_alt","message":"alt_u_l must be a number from 1 to 10000 Returned before settlement; you are not charged.","status":400},{"code":"invalid_platelets","message":"platelets_10e9_l must be a number from 1 to 2000 Returned before settlement; you are not charged.","status":400},{"code":"invalid_albumin","message":"albumin_g_dl (1-6) or albumin_g_l (10-60) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/nafld-fibrosis","citation":{"authors":"Angulo P, Hui JM, Marchesini G, et al.","doi":"10.1002/hep.21496","id":"angulo-2007","source":"Hepatology. 2007;45(4):846-854","title":"The NAFLD fibrosis score: a noninvasive system that identifies liver fibrosis in patients with NAFLD","url":"https://doi.org/10.1002/hep.21496"},"formula_expression":"NFS = -1.675 + 0.037*age + 0.094*BMI + 1.13*IFG/diabetes + 0.99*(AST/ALT) - 0.013*platelets - 0.66*albumin","purpose":"Compute the Angulo 2007 NAFLD fibrosis score from age, BMI, IFG/diabetes, AST, ALT, platelets, and albumin.","markdown_url":"https://magentlab.com/docs/nafld-fibrosis.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"nafld_fibrosis"},{"name":"formula_expression","type":"string","description":"Exact Angulo 2007 expression"},{"name":"age_years","type":"integer","description":"Age in years used"},{"name":"bmi_kg_m2","type":"number","description":"Caller-supplied BMI in kg/m^2"},{"name":"ifg_or_diabetes","type":"boolean","description":"IFG or diabetes flag used"},{"name":"ast_u_l","type":"number","description":"AST in U/L"},{"name":"alt_u_l","type":"number","description":"ALT in U/L"},{"name":"ast_alt_ratio","type":"number","description":"AST/ALT ratio, 4 decimals"},{"name":"platelets_10e9_l","type":"number","description":"Platelets in 10^9/L"},{"name":"albumin_g_dl","type":"number","description":"Albumin in g/dL"},{"name":"nfs","type":"number","description":"NAFLD fibrosis score, 3 decimals"},{"name":"angulo_band","type":"string","description":"Published Angulo 2007 cut-points: low (<-1.455), indeterminate (-1.455 to 0.676), high (>0.676). Not a diagnosis."},{"name":"citation","type":"object","description":"Angulo Hepatology 2007 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"50","albumin_g_dl":"4","alt_u_l":"40","ast_u_l":"40","bmi_kg_m2":"30","ifg_or_diabetes":"true","platelets_10e9_l":"200"},{"age":"50","albumin_g_dl":"4","alt_u_l":"40","ast_u_l":"40","bmi_kg_m2":"30","ifg_or_diabetes":"true","platelets_10e9_l":"200"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/nafld-fibrosis","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/nafld-fibrosis?age=50&bmi_kg_m2=30&ifg_or_diabetes=true&ast_u_l=40&alt_u_l=40&platelets_10e9_l=200&albumin_g_dl=4","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/nafld-fibrosis","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/pfib-c","description":"Lefere 2025 pFIB-c logistic probability of significant (>=F2) liver fibrosis in pediatric MASLD from sex (boy/girl), hypertension, ALT (U/L), caller-assigned CDC/WHO weight Z-score, HOMA-IR, and caller-assigned Black ethnicity. Table 2 coefficients. Derivation rule-out cutoff 0.226. magent does not assign race or ethnicity and does not compute LMS Z-scores. Not a biopsy, not pFIB-6, and not a diagnosis.","parameters":[{"in":"query","name":"sex","type":"string","enum":["boy","girl"],"description":"Sex as Lefere 2025 Table 2 (boy or girl). boy adds 1.194 (sex_boy=1); girl adds 0. Paper terms.","required":true,"example":"girl"},{"in":"query","name":"hypertension","type":"boolean","description":"Hypertension as assigned by the caller (true or false). Lefere 2025 Table 2: true adds 1.636.","required":true,"example":false},{"in":"query","name":"alt_u_l","type":"number","description":"Alanine aminotransferase in U/L (5-500). Lefere 2025 Table 2: +0.019 per U/L. magent does not convert other ALT units.","required":true,"example":30},{"in":"query","name":"weight_z_score","type":"number","description":"Caller-assigned CDC or WHO weight-for-age Z-score (-5 to 8). Lefere 2025 Table 2: +0.633 per unit. magent does not compute LMS tables from height, weight, age, or sex.","required":true,"example":1.0},{"in":"query","name":"homa_ir","type":"number","description":"Caller-assigned HOMA-IR (0-50). Lefere 2025 Table 2: +0.079 per unit. magent does not compute HOMA-IR from glucose and insulin.","required":true,"example":2.0},{"in":"query","name":"black_ethnicity","type":"boolean","description":"Caller-assigned Black ethnicity as used in Lefere 2025 (true or false). Table 2: true adds -2.453. magent does not assign race or ethnicity.","required":true,"example":false}],"errors":[{"code":"invalid_pfib_c","message":"pFIB-c inputs must match Lefere 2025 sex, caller-assigned Black ethnicity, hypertension, ALT, caller-assigned weight Z-score, and HOMA-IR. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/pfib-c","citation":{"authors":"Lefere S, Dupont E, De Guchtenaere A, et al.","doi":"10.1097/hep.0000000000001016","id":"lefere-2025-pfib","pmid":"39028885","source":"Hepatology. 2025;81(4):1276-1287","title":"Development and validation of pFIB scores for exclusion of significant liver fibrosis in pediatric MASLD","url":"https://doi.org/10.1097/hep.0000000000001016"},"formula_expression":"x = -5.155 + 1.194*sex_boy + 1.636*hypertension + 0.019*alt_u_l + 0.633*weight_z_score + 0.079*homa_ir - 2.453*black_ethnicity; probability = exp(x)/(1+exp(x)); Lefere 2025 Table 2 logistic for significant (≥F2) fibrosis; sex_boy 1 if boy, 0 if girl (paper terms); black_ethnicity caller-assigned Black ethnicity; weight_z_score caller-assigned CDC/WHO weight Z; below_rule_out_cutoff iff probability < 0.226 (derivation-cohort high NPV); not pFIB-6","purpose":"Compute the Lefere 2025 pFIB-c logistic probability of significant (≥F2) liver fibrosis in pediatric MASLD from sex, hypertension, ALT, a caller-assigned weight Z-score, HOMA-IR, and caller-assigned Black ethnicity.","markdown_url":"https://magentlab.com/docs/pfib-c.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"pfib_c"},{"name":"formula_expression","type":"string","description":"Lefere 2025 Table 2 logistic linear predictor and probability"},{"name":"sex","type":"string","description":"boy or girl used"},{"name":"hypertension","type":"boolean","description":"Caller-assigned hypertension"},{"name":"alt_u_l","type":"number","description":"Input ALT in U/L"},{"name":"weight_z_score","type":"number","description":"Caller-assigned CDC or WHO weight-for-age Z-score"},{"name":"homa_ir","type":"number","description":"Caller-assigned HOMA-IR"},{"name":"black_ethnicity","type":"boolean","description":"Caller-assigned Black ethnicity as used in Lefere 2025"},{"name":"x","type":"number","description":"Unrounded linear predictor, 3 decimals"},{"name":"probability","type":"number","description":"pFIB-c probability of significant (≥F2) fibrosis from the unrounded x, 3 decimals (0-1). Not a biopsy."},{"name":"below_rule_out_cutoff","type":"boolean","description":"true iff probability < 0.226 (Lefere 2025 derivation-cohort high NPV for significant fibrosis). Not a biopsy."},{"name":"citation","type":"object","description":"Lefere 2025 pFIB-c citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"alt_u_l":"30","black_ethnicity":"false","homa_ir":"2.0","hypertension":"false","sex":"girl","weight_z_score":"1.0"},{"alt_u_l":"30","black_ethnicity":"false","homa_ir":"2.0","hypertension":"false","sex":"girl","weight_z_score":"1.0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/pfib-c","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/pfib-c?sex=girl&hypertension=false&alt_u_l=30&weight_z_score=1.0&homa_ir=2.0&black_ethnicity=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/pfib-c","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/fli","description":"Bedogni 2006 fatty liver index from caller-supplied BMI, waist, triglycerides (mg/dL or mmol/L), and GGT. FLI = logistic(L)*100 with L from loge triglycerides, BMI, loge GGT, and waist. FLI <30 rules out hepatic steatosis; FLI >=60 rules in; 30 to <60 indeterminate. Not a diagnosis, imaging substitute, hepatic steatosis index, NAFLD fibrosis score, FIB-4, or APRI.","parameters":[{"in":"query","name":"bmi_kg_m2","type":"number","description":"Body-mass index in kg/m^2 (10-80). Caller-supplied; magent does not compute BMI.","required":true,"example":"22"},{"in":"query","name":"waist_cm","type":"number","description":"Waist circumference in cm (40-200).","required":true,"example":"70"},{"in":"query","name":"ggt_u_l","type":"number","description":"Gamma-glutamyltransferase in U/L (1-2000).","required":true,"example":"20"},{"in":"query","name":"triglycerides_mg_dl","type":"number","description":"Triglycerides in mg/dL (10-2000). Italian lab units in Bedogni 2006. Provide this or triglycerides_mmol_l, not both.","required":false,"example":"80"},{"in":"query","name":"triglycerides_mmol_l","type":"number","description":"Triglycerides in mmol/L (0.11-22.6). Converted as mg/dL = mmol/L * 88.57. Provide this or triglycerides_mg_dl, not both.","required":false,"example":"0.90"}],"errors":[{"code":"invalid_bmi_kg_m2","message":"bmi_kg_m2 must be a number from 10 to 80. Returned before settlement; you are not charged.","status":400},{"code":"invalid_waist_cm","message":"waist_cm must be a number from 40 to 200 (Bedogni 2006 FLI). Returned before settlement; you are not charged.","status":400},{"code":"invalid_ggt","message":"ggt_u_l must be a number from 1 to 2000 (Bedogni 2006 FLI). Returned before settlement; you are not charged.","status":400},{"code":"invalid_fli_triglyceride","message":"triglycerides_mg_dl (10-2000) or triglycerides_mmol_l (0.11-22.6) is required, not both (Bedogni 2006 FLI; mg/dL = mmol/L * 88.57). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/fli","citation":{"authors":"Bedogni G, Bellentani S, Miglioli L, Masutti F, Passalacqua M, Castiglione A, Tiribelli C","doi":"10.1186/1471-230X-6-33","id":"bedogni-2006","pmid":"17081293","source":"BMC Gastroenterol. 2006;6:33","title":"The Fatty Liver Index: a simple and accurate predictor of hepatic steatosis in the general population","url":"https://doi.org/10.1186/1471-230X-6-33"},"formula_expression":"L = 0.953 * loge(triglycerides_mg_dl) + 0.139 * bmi_kg_m2 + 0.718 * loge(ggt_u_l) + 0.053 * waist_cm - 15.745; FLI = (e^L / (1 + e^L)) * 100","purpose":"Compute the Bedogni 2006 fatty liver index from caller-supplied BMI, waist circumference, triglycerides, and GGT as a predictor of hepatic steatosis in the general population.","markdown_url":"https://magentlab.com/docs/fli.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"fli"},{"name":"formula_expression","type":"string","description":"Exact Bedogni 2006 expression (natural log, triglycerides in mg/dL)"},{"name":"bmi_kg_m2","type":"number","description":"Caller-supplied BMI in kg/m^2"},{"name":"waist_cm","type":"number","description":"Waist circumference in cm"},{"name":"ggt_u_l","type":"number","description":"GGT in U/L"},{"name":"triglycerides_mg_dl","type":"number","description":"Triglycerides used in mg/dL (after mmol/L conversion when supplied)"},{"name":"l","type":"number","description":"Linear predictor L, 4 decimals"},{"name":"fli","type":"number","description":"Fatty liver index, 1 decimal"},{"name":"bedogni_band","type":"string","description":"Published Bedogni 2006 operating points: rule_out (FLI < 30), indeterminate (30 <= FLI < 60), rule_in (FLI >= 60). Not a diagnosis."},{"name":"citation","type":"object","description":"Bedogni BMC Gastroenterol 2006 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"bmi_kg_m2":"22","ggt_u_l":"20","triglycerides_mg_dl":"80","waist_cm":"70"},{"bmi_kg_m2":"22","ggt_u_l":"20","triglycerides_mg_dl":"80","waist_cm":"70"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/fli","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/fli?bmi_kg_m2=22&waist_cm=70&triglycerides_mg_dl=80&ggt_u_l=20","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/fli","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/west-haven","description":"West Haven / Conn hepatic encephalopathy grade 0-4 (Conn 1977). Deterministic published grade with citation. Not a diagnosis; magent does not examine the patient or apply ISHEN covert/overt or psychometric minimal-HE tests.","parameters":[{"in":"query","name":"grade","type":"integer","description":"Conn 1977 / West Haven hepatic encephalopathy grade 0-4 as assigned by the caller. magent does not examine the patient.","required":true,"example":"0"}],"errors":[{"code":"invalid_west_haven_grade","message":"grade must be an integer from 0 to 4 (Conn 1977). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/west-haven","citation":{"authors":"Conn HO, Leevy CM, Vlahcevic ZR, et al.","doi":"10.1016/S0016-5085(77)80135-2","id":"conn-1977","source":"Gastroenterology. 1977;72(4 Pt 1):573-583","title":"Comparison of lactulose and neomycin in the treatment of chronic portal-systemic encephalopathy. A double blind controlled trial","url":"https://doi.org/10.1016/S0016-5085(77)80135-2"},"formula_expression":"West Haven / Conn grade 0-4 as assigned by the caller (Conn 1977)","purpose":"Return the Conn 1977 (West Haven / Conn score) hepatic encephalopathy grade 0-4 from a caller-assigned integer.","markdown_url":"https://magentlab.com/docs/west-haven.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"west_haven"},{"name":"formula_expression","type":"string","description":"Published grade rule"},{"name":"grade","type":"integer","description":"Caller-assigned grade 0-4"},{"name":"score","type":"integer","description":"Same as grade"},{"name":"max_score","type":"integer","description":"4"},{"name":"description","type":"string","description":"Conn 1977 wording for that grade"},{"name":"components","type":"array","description":"Grade component"},{"name":"citation","type":"object","description":"Conn 1977"},{"name":"disclaimer","type":"string","description":"Not a medical device"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"grade":"0"},{"grade":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/west-haven","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/west-haven?grade=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/west-haven","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/lille","description":"Lille model (Louvet 2007) from age, albumin, bilirubin at day 0 and day 7, creatinine, and PT seconds or INR. formula=pt or formula=inr is required; magent does not swap them. Score 0-1 with the published 0.45 cutoff. Deterministic published arithmetic with citation; not a medical device or a steroid order.","parameters":[{"in":"query","name":"formula","type":"string","enum":["pt","inr"],"description":"pt (prothrombin time in seconds) or inr. Required; magent does not swap PT and INR.","required":true,"example":"pt"},{"in":"query","name":"age","type":"integer","description":"Age in years (18-120).","required":true,"example":"50"},{"in":"query","name":"albumin_g_l","type":"number","description":"Day-0 albumin in g/L (10-60). Provide this or albumin_g_dl, not both. Louvet 2007 uses g/L.","required":false,"example":"35"},{"in":"query","name":"albumin_g_dl","type":"number","description":"Day-0 albumin in g/dL (1-6). Converted as g/L = g/dL × 10.","required":false,"example":"3.5"},{"in":"query","name":"bilirubin_day0_umol_l","type":"number","description":"Day-0 total bilirubin in µmol/L (2-684). Provide this or bilirubin_day0_mg_dl.","required":false,"example":"200"},{"in":"query","name":"bilirubin_day0_mg_dl","type":"number","description":"Day-0 total bilirubin in mg/dL (0.1-40). Converted as µmol/L = mg/dL × 17.1.","required":false,"example":"11.7"},{"in":"query","name":"bilirubin_day7_umol_l","type":"number","description":"Day-7 total bilirubin in µmol/L (2-684). Provide this or bilirubin_day7_mg_dl.","required":false,"example":"150"},{"in":"query","name":"bilirubin_day7_mg_dl","type":"number","description":"Day-7 total bilirubin in mg/dL (0.1-40). Converted as µmol/L = mg/dL × 17.1.","required":false,"example":"8.8"},{"in":"query","name":"creatinine_mg_dl","type":"number","description":"Serum creatinine in mg/dL (0.1-20). Provide this or creatinine_umol_l. Renal insufficiency is 1 when > 1.3 mg/dL if this unit is used (Louvet 2007).","required":false,"example":"1.0"},{"in":"query","name":"creatinine_umol_l","type":"number","description":"Serum creatinine in µmol/L (9-1768). Provide this or creatinine_mg_dl. Renal insufficiency is 1 when > 115 µmol/L if this unit is used (Louvet 2007).","required":false,"example":"88"},{"in":"query","name":"pt_sec","type":"number","description":"Prothrombin time in seconds (8-120). Required when formula=pt. Ignored when formula=inr.","required":false,"example":"18"},{"in":"query","name":"inr","type":"number","description":"INR (0.8-10). Required when formula=inr. Ignored when formula=pt.","required":false,"example":"2.0"}],"errors":[{"code":"invalid_lille_formula","message":"formula must be pt or inr (Louvet 2007). Returned before settlement; you are not charged.","status":400},{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_albumin","message":"albumin_g_dl (1-6) or albumin_g_l (10-60) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_bilirubin","message":"bilirubin_mg_dl (0.1-40) or bilirubin_umol_l (2-684) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_creatinine","message":"creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_prothrombin_time","message":"pt_sec (8-120) is required, or pt_patient_sec (8-120) and pt_control_sec (8-20) are required. Returned before settlement; you are not charged.","status":400},{"code":"invalid_inr","message":"inr must be a number from 0.8 to 10 Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/lille","citation":{"authors":"Louvet A, Naveau S, Abdelnour M, et al.","doi":"10.1002/hep.21607","id":"louvet-2007","pmid":"17518367","source":"Hepatology. 2007;45(6):1348-1354","title":"The Lille model: a new tool for therapeutic strategy in patients with severe alcoholic hepatitis treated with steroids","url":"https://doi.org/10.1002/hep.21607"},"formula_expression":"R = 3.19 - 0.101*age + 0.147*albumin_g_l + 0.0165*evolution_bilirubin_umol_l - 0.206*renal_insufficiency - 0.0065*bilirubin_day0_umol_l - 0.0096*pt_sec; lille_score = exp(-R)/(1+exp(-R))","purpose":"Compute the Louvet 2007 Lille score from age, day-0 albumin, bilirubin on day 0 and day 7, creatinine, and PT seconds or INR. formula is required.","markdown_url":"https://magentlab.com/docs/lille.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"pt or inr"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"r","type":"number","description":"Linear predictor R, 4 decimal places"},{"name":"lille_score","type":"number","description":"Lille score 0-1, 4 decimal places"},{"name":"response","type":"string","description":"responder if score < 0.45; nonresponder if score ≥ 0.45 (Louvet 2007)"},{"name":"renal_insufficiency","type":"boolean","description":"true when creatinine > 1.3 mg/dL"},{"name":"age_years","type":"integer","description":"Age used"},{"name":"albumin_g_l","type":"number","description":"Day-0 albumin in g/L"},{"name":"bilirubin_day0_umol_l","type":"number","description":"Day-0 bilirubin in µmol/L"},{"name":"bilirubin_day7_umol_l","type":"number","description":"Day-7 bilirubin in µmol/L"},{"name":"evolution_bilirubin_umol_l","type":"number","description":"bilirubin_day0 − bilirubin_day7 in µmol/L"},{"name":"creatinine_mg_dl","type":"number","description":"Normalized creatinine in mg/dL"},{"name":"pt_sec","type":"number","description":"PT in seconds when formula=pt. Omitted when formula=inr."},{"name":"inr","type":"number","description":"INR when formula=inr. Omitted when formula=pt."},{"name":"citation","type":"object","description":"Louvet 2007 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"50","albumin_g_l":"35","bilirubin_day0_umol_l":"200","bilirubin_day7_umol_l":"150","creatinine_mg_dl":"1.0","formula":"pt","pt_sec":"18"},{"age":"50","albumin_g_l":"35","bilirubin_day0_umol_l":"200","bilirubin_day7_umol_l":"150","creatinine_mg_dl":"1.0","formula":"pt","pt_sec":"18"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/lille","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/lille?age=50&albumin_g_l=35&bilirubin_day0_umol_l=200&bilirubin_day7_umol_l=150&creatinine_mg_dl=1.0&formula=pt&pt_sec=18","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/lille","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/abic","description":"Dominguez 2008 ABIC score from age, bilirubin, creatinine, and INR. ABIC = (age * 0.1) + (bilirubin_mg_dl * 0.08) + (creatinine_mg_dl * 0.3) + (inr * 0.8). Low <6.71, intermediate 6.71–9.0, high >9.0. Not a diagnosis of alcoholic hepatitis and not a steroid or transplant order.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (integer 18-120).","required":true,"example":"50"},{"in":"query","name":"bilirubin_mg_dl","type":"number","description":"Total bilirubin in mg/dL (0.1-40). Provide this or bilirubin_umol_l, not both.","required":false,"example":"10"},{"in":"query","name":"bilirubin_umol_l","type":"number","description":"Total bilirubin in µmol/L (2-684). Converted as mg/dL = µmol/L / 17.1.","required":false,"example":"171"},{"in":"query","name":"creatinine_mg_dl","type":"number","description":"Serum creatinine in mg/dL (0.1-20). Provide this or creatinine_umol_l, not both.","required":false,"example":"1"},{"in":"query","name":"creatinine_umol_l","type":"number","description":"Serum creatinine in µmol/L (9-1768). Converted as mg/dL = µmol/L / 88.42.","required":false,"example":"88.42"},{"in":"query","name":"inr","type":"number","description":"International normalized ratio (0.8-10).","required":true,"example":"1.5"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_bilirubin","message":"bilirubin_mg_dl (0.1-40) or bilirubin_umol_l (2-684) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_creatinine","message":"creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_inr","message":"inr must be a number from 0.8 to 10 Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/abic","citation":{"authors":"Dominguez M, Rincón D, Abraldes JG, Miquel R, Colmenero J, Bellot P, García-Pagán JC, Fernández J, Marín P, Guarner C, Arroyo V, Bruguera M, Bañares R, Ginès P, Caballería J","doi":"10.1111/j.1572-0241.2008.02104.x","id":"dominguez-2008","pmid":"18721242","source":"Am J Gastroenterol. 2008;103(11):2747-2756","title":"A new scoring system for prognostic stratification of patients with alcoholic hepatitis","url":"https://doi.org/10.1111/j.1572-0241.2008.02104.x"},"formula_expression":"ABIC = (age * 0.1) + (bilirubin_mg_dl * 0.08) + (creatinine_mg_dl * 0.3) + (inr * 0.8)","purpose":"Compute the Dominguez 2008 ABIC score from age, bilirubin, creatinine, and INR for prognostic stratification of alcoholic hepatitis.","markdown_url":"https://magentlab.com/docs/abic.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"abic"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"age","type":"integer","description":"Age in years used"},{"name":"bilirubin_mg_dl","type":"number","description":"Normalized total bilirubin in mg/dL"},{"name":"creatinine_mg_dl","type":"number","description":"Normalized serum creatinine in mg/dL"},{"name":"inr","type":"number","description":"INR used"},{"name":"abic_score","type":"number","description":"Dominguez 2008 ABIC, 2 decimal places"},{"name":"abic_band","type":"string","description":"Dominguez 2008 bands on the rounded score: low (<6.71), intermediate (6.71-9.0), high (>9.0). Not a diagnosis or steroid order."},{"name":"citation","type":"object","description":"Dominguez 2008 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"50","bilirubin_mg_dl":"10","creatinine_mg_dl":"1","inr":"1.5"},{"age":"50","bilirubin_mg_dl":"10","creatinine_mg_dl":"1","inr":"1.5"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/abic","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/abic?age=50&bilirubin_mg_dl=10&creatinine_mg_dl=1&inr=1.5","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/abic","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/ukeld","description":"Barber 2011 United Kingdom end-stage liver disease (UKELD) from INR, creatinine, bilirubin, and sodium in native SI units. UKELD = 5.395*ln(INR) + 1.485*ln(creatinine_umol_l) + 3.13*ln(bilirubin_umol_l) - 81.565*ln(sodium_mmol_l) + 435, nearest integer. below_listing if <49; listing_threshold if ≥49 (UK elective-list 9% 1-year mortality cut). Not a transplant listing or allocation order. Not MELD or MELD-Na.","parameters":[{"in":"query","name":"inr","type":"number","description":"International normalized ratio (0.8-10). Barber 2011 does not floor INR at 1.","required":true,"example":"1.2"},{"in":"query","name":"creatinine_umol_l","type":"number","description":"Serum creatinine in µmol/L (9-1768). Provide this or creatinine_mg_dl, not both. Barber 2011 uses µmol/L; no MELD floor.","required":false,"example":"90"},{"in":"query","name":"creatinine_mg_dl","type":"number","description":"Serum creatinine in mg/dL (0.1-20). Converted as µmol/L = mg/dL × 88.42. Provide this or creatinine_umol_l, not both.","required":false,"example":"1.0"},{"in":"query","name":"bilirubin_umol_l","type":"number","description":"Total bilirubin in µmol/L (2-684). Provide this or bilirubin_mg_dl, not both. Barber 2011 uses µmol/L; no MELD floor.","required":false,"example":"40"},{"in":"query","name":"bilirubin_mg_dl","type":"number","description":"Total bilirubin in mg/dL (0.1-40). Converted as µmol/L = mg/dL × 17.1. Provide this or bilirubin_umol_l, not both.","required":false,"example":"2.3"},{"in":"query","name":"sodium_mmol_l","type":"number","description":"Serum sodium in mmol/L (110-160). Barber 2011 does not clamp sodium to 125–137.","required":true,"example":"135"}],"errors":[{"code":"invalid_inr","message":"inr must be a number from 0.8 to 10 Returned before settlement; you are not charged.","status":400},{"code":"invalid_creatinine","message":"creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_bilirubin","message":"bilirubin_mg_dl (0.1-40) or bilirubin_umol_l (2-684) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_sodium","message":"sodium_mmol_l must be a number from 110 to 160 Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/ukeld","citation":{"authors":"Barber K, Madden S, Allen J, Collett D, Neuberger J, Gimson A; United Kingdom Liver Transplant Selection and Allocation Working Party","doi":"10.1097/TP.0b013e318225db4d","id":"barber-2011","pmid":"21775931","source":"Transplantation. 2011;92(4):469-476","title":"Elective liver transplant list mortality: development of a United Kingdom end-stage liver disease score","url":"https://doi.org/10.1097/TP.0b013e318225db4d"},"formula_expression":"UKELD = 5.395 * ln(INR) + 1.485 * ln(creatinine_umol_l) + 3.13 * ln(bilirubin_umol_l) - 81.565 * ln(sodium_mmol_l) + 435","purpose":"Compute the Barber 2011 United Kingdom end-stage liver disease (UKELD) integer from INR, creatinine, bilirubin, and sodium, with the UK elective-list 9% 1-year mortality threshold of 49.","markdown_url":"https://magentlab.com/docs/ukeld.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"ukeld"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"inr","type":"number","description":"INR used"},{"name":"creatinine_umol_l","type":"number","description":"Serum creatinine used in µmol/L (after conversion)"},{"name":"bilirubin_umol_l","type":"number","description":"Total bilirubin used in µmol/L (after conversion)"},{"name":"sodium_mmol_l","type":"number","description":"Serum sodium used in mmol/L"},{"name":"ukeld","type":"integer","description":"Barber 2011 UKELD, nearest integer. No MELD lab floors."},{"name":"ukeld_band","type":"string","description":"below_listing if UKELD < 49; listing_threshold if UKELD ≥ 49 (UK elective-list 9% 1-year mortality cut). Not a transplant listing order."},{"name":"citation","type":"object","description":"Barber 2011 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"bilirubin_umol_l":"40","creatinine_umol_l":"90","inr":"1.2","sodium_mmol_l":"135"},{"bilirubin_umol_l":"40","creatinine_umol_l":"90","inr":"1.2","sodium_mmol_l":"135"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/ukeld","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/ukeld?inr=1.2&creatinine_umol_l=90&bilirubin_umol_l=40&sodium_mmol_l=135","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/ukeld","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/car-olt","description":"VanWagner 2017 CAR-OLT integer points (Table 3) for 1-year CVD complication after first orthotopic liver transplant: age bands, sex, caller-assigned race (white 7, black 10, other 0), work, education, atrial fibrillation 25, ventilator 13, pulmonary hypertension 9, no HCC 6, hypertension 4, diabetes 4, heart failure 7. Table 4 predicted percent. Not a listing decision. magent does not assign race.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (integer 18-120). VanWagner 2017 Table 3: <45 scores 0; 45-49 scores -6; 50-54 scores -4; 55-59 scores 2; 60-64 scores 5; ≥65 scores 8. Derivation was first OLT ages 18-75; ≥65 is the top Table 3 band.","required":true,"example":40},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"Caller-assigned sex (VanWagner 2017 Table 3). male scores 0 (referent); female scores 1. magent does not assign sex.","required":true,"example":"male"},{"in":"query","name":"race_group","type":"string","enum":["white","black","other"],"description":"Caller-assigned race as used in VanWagner 2017 Table 3. white scores 7; black scores 10; other scores 0 (referent). Hispanic and Asian map to other in this model. magent does not assign race.","required":true,"example":"other"},{"in":"query","name":"working_for_income","type":"boolean","description":"Working for income at transplant (VanWagner 2017 Table 3). true scores 0 (referent); false scores 10. magent does not assign employment.","required":true,"example":true},{"in":"query","name":"education","type":"string","enum":["high_school_or_unknown","college"],"description":"Caller-assigned education (VanWagner 2017 Table 3). college scores 0 (College+ referent); high_school_or_unknown scores 5. magent does not assign education.","required":true,"example":"college"},{"in":"query","name":"atrial_fibrillation","type":"boolean","description":"History of atrial fibrillation prior to transplant (VanWagner 2017 Table 3). true scores 25. magent does not read an ECG.","required":true,"example":false},{"in":"query","name":"ventilator_respiratory_failure","type":"boolean","description":"Respiratory failure on a ventilator at transplant (VanWagner 2017 Table 3). true scores 13. magent does not observe ventilation.","required":true,"example":false},{"in":"query","name":"pulmonary_hypertension","type":"boolean","description":"History of pulmonary hypertension prior to transplant (VanWagner 2017 Table 3). true scores 9. magent does not perform right-heart catheterization.","required":true,"example":false},{"in":"query","name":"hcc","type":"boolean","description":"History of hepatocellular carcinoma (VanWagner 2017 Table 3). true scores 0 (referent); false scores 6. No HCC is the higher-risk term. magent does not diagnose HCC.","required":true,"example":true},{"in":"query","name":"hypertension","type":"boolean","description":"History of systemic hypertension prior to transplant (VanWagner 2017 Table 3). true scores 4. magent does not measure blood pressure.","required":true,"example":false},{"in":"query","name":"diabetes","type":"boolean","description":"History of diabetes prior to transplant (VanWagner 2017 Table 3). true scores 4. magent does not assay glucose.","required":true,"example":false},{"in":"query","name":"heart_failure","type":"boolean","description":"History of heart failure prior to transplant (VanWagner 2017 Table 3). true scores 7. magent does not diagnose heart failure.","required":true,"example":false}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_car_olt","message":"CAR-OLT inputs must match VanWagner 2017 Table 3 age group, sex, race, work, education, and comorbidity flags. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/car-olt","citation":{"authors":"VanWagner LB, Ning H, Whitsett M, Levitsky J, Uttal S, Wilkins JT, Abecassis MM, Ladner DP, Skaro AI, Lloyd-Jones DM","doi":"10.1002/hep.29329","id":"vanwagner-2017-car-olt","pmid":"28703300","source":"Hepatology. 2017;66(6):1968-1979","title":"A point-based prediction model for cardiovascular risk in orthotopic liver transplantation: The CAR-OLT score","url":"https://doi.org/10.1002/hep.29329"},"formula_expression":"CAR-OLT = age (<45 0, 45-49 -6, 50-54 -4, 55-59 2, 60-64 5, >=65 8) + sex (male 0, female 1) + race_group (white 7, black 10, other 0) + not working 10 + education (high_school_or_unknown 5, college 0) + atrial_fibrillation 25 + ventilator_respiratory_failure 13 + pulmonary_hypertension 9 + no HCC 6 + hypertension 4 + diabetes 4 + heart_failure 7; VanWagner 2017 Table 3; Table 4 1-year predicted CVD %; unclamped; score 9 uses the <9 row","purpose":"Sum VanWagner 2017 Table 3 CAR-OLT integer points and return the Table 4 1-year predicted CVD complication percent.","markdown_url":"https://magentlab.com/docs/car-olt.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"car_olt"},{"name":"formula_expression","type":"string","description":"VanWagner 2017 Table 3 expression"},{"name":"score","type":"integer","description":"Unclamped Table 3 integer sum. May be negative (age 45-49 is -6). Theoretical max 102."},{"name":"max_score","type":"integer","description":"102 (sum of Table 3 maxima)"},{"name":"predicted_1yr_cvd_percent","type":"string","description":"VanWagner 2017 Table 4 1-year predicted CVD complication percent: <5%, 6%, 8%, 10%, 12%, 14%, 17%, 20%, 22%, 26%, 30%, 34%, 38%, 40%, 43%, or 45%. Score 9 uses the <9 row. Not a named low/moderate/high band."},{"name":"age_years","type":"integer","description":"Age in years used for the age band"},{"name":"sex","type":"string","description":"female or male used"},{"name":"race_group","type":"string","description":"Caller-assigned white, black, or other used"},{"name":"education","type":"string","description":"Caller-assigned high_school_or_unknown or college used"},{"name":"working_for_income","type":"boolean","description":"Working-for-income flag used"},{"name":"components","type":"array","description":"Per-factor Table 3 points"},{"name":"citation","type":"object","description":"VanWagner 2017 Hepatology citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"40","atrial_fibrillation":"false","diabetes":"false","education":"college","hcc":"true","heart_failure":"false","hypertension":"false","pulmonary_hypertension":"false","race_group":"other","sex":"male","ventilator_respiratory_failure":"false","working_for_income":"true"},{"age":"40","atrial_fibrillation":"false","diabetes":"false","education":"college","hcc":"true","heart_failure":"false","hypertension":"false","pulmonary_hypertension":"false","race_group":"other","sex":"male","ventilator_respiratory_failure":"false","working_for_income":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/car-olt","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/car-olt?age=40&sex=male&race_group=other&working_for_income=true&education=college&atrial_fibrillation=false&ventilator_respiratory_failure=false&pulmonary_hypertension=false&hcc=true&hypertension=false&diabetes=false&heart_failure=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/car-olt","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/kings-college","description":"King's College criteria (O'Grady 1989) for poor prognosis in fulminant hepatic failure. Acetaminophen: arterial pH <7.30, or PT >100 s plus creatinine >300 umol/L plus grade III/IV encephalopathy. Non-acetaminophen: PT >100 s, or any 3 of age <11 or >40, unfavorable etiology (non-A non-B or drug reaction), jaundice-to-encephalopathy >7 days, bilirubin >300 umol/L, PT >50 s. PT seconds, not INR. Not a transplant listing order.","parameters":[{"in":"query","name":"etiology","type":"string","enum":["acetaminophen","non_acetaminophen"],"description":"acetaminophen or non_acetaminophen (O'Grady 1989). Selects the paracetamol or non-paracetamol poor-prognosis tree. Required on every request.","required":true,"example":"acetaminophen"},{"in":"query","name":"arterial_ph","type":"number","description":"Arterial pH (6.80-7.80). Acetaminophen criterion met when pH < 7.30, independent of encephalopathy. Required even on the non-acetaminophen tree; not scored there.","required":true,"example":"7.40"},{"in":"query","name":"pt_sec","type":"number","description":"Prothrombin time in seconds (8-120) as published in 1989. INR is not accepted. Acetaminophen combo uses PT > 100; non-acetaminophen uses PT > 100 alone or PT > 50 as one of five factors.","required":true,"example":"20"},{"in":"query","name":"creatinine_umol_l","type":"number","description":"Serum creatinine in umol/L (9-1768). Acetaminophen combo criterion met when > 300. Required even on the non-acetaminophen tree; not scored there.","required":true,"example":"80"},{"in":"query","name":"encephalopathy_grade","type":"integer","description":"Hepatic encephalopathy grade 0-4 as assigned by the caller (Conn 1977 / West Haven). Acetaminophen combo uses grade >= 3 (grade III/IV). Required even on the non-acetaminophen tree; not scored there. magent does not examine the patient.","required":true,"example":"1"},{"in":"query","name":"age_years","type":"integer","description":"Age in years (0-120). Non-acetaminophen factor met when age < 11 or age > 40 (1989 abstract, not a later <10 restatement). Required even on the acetaminophen tree; not scored there.","required":true,"example":"30"},{"in":"query","name":"unfavorable_etiology","type":"boolean","description":"Unfavorable etiology as assigned by the caller (paper: non-A non-B hepatitis or drug reaction). true or false. Non-acetaminophen any-3 factor. Required even on the acetaminophen tree; not scored there.","required":true,"example":"false"},{"in":"query","name":"jaundice_to_encephalopathy_days","type":"integer","description":"Days from jaundice to encephalopathy (integer 0-90). Non-acetaminophen factor met when > 7. Required even on the acetaminophen tree; not scored there.","required":true,"example":"2"},{"in":"query","name":"bilirubin_umol_l","type":"number","description":"Serum bilirubin in umol/L (2-684). Non-acetaminophen factor met when > 300. Required even on the acetaminophen tree; not scored there.","required":true,"example":"50"}],"errors":[{"code":"invalid_kings_etiology","message":"etiology must be acetaminophen or non_acetaminophen (O'Grady 1989). Returned before settlement; you are not charged.","status":400},{"code":"invalid_arterial_ph","message":"arterial_ph must be a number from 6.80 to 7.80. Returned before settlement; you are not charged.","status":400},{"code":"invalid_prothrombin_time","message":"pt_sec (8-120) is required, or pt_patient_sec (8-120) and pt_control_sec (8-20) are required. Returned before settlement; you are not charged.","status":400},{"code":"invalid_creatinine","message":"creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_west_haven_grade","message":"grade must be an integer from 0 to 4 (Conn 1977). Returned before settlement; you are not charged.","status":400},{"code":"invalid_kings_age","message":"age_years must be a number from 0 to 120 (O'Grady 1989 includes children). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_jaundice_days","message":"jaundice_to_encephalopathy_days must be an integer from 0 to 90. Returned before settlement; you are not charged.","status":400},{"code":"invalid_bilirubin","message":"bilirubin_mg_dl (0.1-40) or bilirubin_umol_l (2-684) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/kings-college","citation":{"authors":"O'Grady JG, Alexander GJ, Hayllar KM, Williams R","doi":"10.1016/0016-5085(89)90081-4","id":"ogrady-1989","pmid":"2490426","source":"Gastroenterology. 1989;97(2):439-445","title":"Early indicators of prognosis in fulminant hepatic failure","url":"https://doi.org/10.1016/0016-5085(89)90081-4"},"formula_expression":"acetaminophen: arterial_ph < 7.30, or (pt_sec > 100 and creatinine_umol_l > 300 and encephalopathy_grade >= 3); non_acetaminophen: pt_sec > 100, or at least 3 of (age_years < 11 or > 40; unfavorable_etiology; jaundice_to_encephalopathy_days > 7; bilirubin_umol_l > 300; pt_sec > 50)","purpose":"Apply the O'Grady 1989 King's College poor-prognosis criteria for fulminant hepatic failure, with separate acetaminophen and non-acetaminophen trees using prothrombin time in seconds.","markdown_url":"https://magentlab.com/docs/kings-college.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"kings_college"},{"name":"formula_expression","type":"string","description":"O'Grady 1989 acetaminophen and non-acetaminophen poor-prognosis trees"},{"name":"criteria_met","type":"boolean","description":"true when the selected 1989 tree indicates poor prognosis. Not a transplant listing or organ-allocation order."},{"name":"etiology","type":"string","description":"acetaminophen or non_acetaminophen tree used"},{"name":"criteria","type":"array","description":"Selected-tree factors only, each with factor, met, and value when numeric"},{"name":"citation","type":"object","description":"O'Grady 1989 Gastroenterology citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age_years":"30","arterial_ph":"7.40","bilirubin_umol_l":"50","creatinine_umol_l":"80","encephalopathy_grade":"1","etiology":"acetaminophen","jaundice_to_encephalopathy_days":"2","pt_sec":"20","unfavorable_etiology":"false"},{"age_years":"30","arterial_ph":"7.40","bilirubin_umol_l":"50","creatinine_umol_l":"80","encephalopathy_grade":"1","etiology":"acetaminophen","jaundice_to_encephalopathy_days":"2","pt_sec":"20","unfavorable_etiology":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/kings-college","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/kings-college?etiology=acetaminophen&arterial_ph=7.40&pt_sec=20&creatinine_umol_l=80&encephalopathy_grade=1&age_years=30&unfavorable_etiology=false&jaundice_to_encephalopathy_days=2&bilirubin_umol_l=50","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/kings-college","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/r-factor","description":"CIOMS R factor from ALT, ALP, and laboratory ULNs (Bénichou 1990). R = (ALT/ALT_ULN)/(ALP/ALP_ULN), rounded to 1 decimal, then hepatocellular (R ≥ 5), cholestatic (R ≤ 2), or mixed (2 < R < 5). Deterministic published arithmetic with citation. Not a medical device, not a DILI diagnosis or RUCAM score; magent does not assay enzymes. R is the enzyme pattern only.","parameters":[{"in":"query","name":"alt_u_l","type":"number","description":"Alanine aminotransferase in U/L (1-10000).","required":true,"example":"200"},{"in":"query","name":"alp_u_l","type":"number","description":"Alkaline phosphatase in U/L (1-10000). Must be greater than 0.","required":true,"example":"100"},{"in":"query","name":"alt_uln_u_l","type":"number","description":"Laboratory ALT upper limit of normal in U/L (5-200). Required; magent does not assume 40.","required":true,"example":"40"},{"in":"query","name":"alp_uln_u_l","type":"number","description":"Laboratory ALP upper limit of normal in U/L (20-500). Required; must be greater than 0.","required":true,"example":"100"}],"errors":[{"code":"invalid_alt","message":"alt_u_l must be a number from 1 to 10000 Returned before settlement; you are not charged.","status":400},{"code":"invalid_alp","message":"alp_u_l must be a number from 1 to 10000 (Bénichou 1990). Returned before settlement; you are not charged.","status":400},{"code":"invalid_alt_uln","message":"alt_uln_u_l must be a number from 5 to 200. Returned before settlement; you are not charged.","status":400},{"code":"invalid_alp_uln","message":"alp_uln_u_l must be a number from 20 to 500. Returned before settlement; you are not charged.","status":400},{"code":"invalid_r_ratio","message":"ALP and ALP ULN must be greater than 0 so R is defined (Bénichou 1990). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/r-factor","citation":{"authors":"Bénichou C","doi":"10.1016/0168-8278(90)90124-A","id":"benichou-1990","pmid":"2254635","source":"J Hepatol. 1990;11(2):272-276","title":"Criteria of drug-induced liver disorders. Report of an international consensus meeting","url":"https://doi.org/10.1016/0168-8278(90)90124-A"},"formula_expression":"R = (ALT / ALT_ULN) / (ALP / ALP_ULN)","purpose":"Compute the Bénichou 1990 / CIOMS R ratio from ALT, ALP, and their laboratory upper limits of normal, then classify hepatocellular (R ≥ 5), cholestatic (R ≤ 2), or mixed (2 < R < 5).","markdown_url":"https://magentlab.com/docs/r-factor.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"r_factor"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"alt_u_l","type":"number","description":"ALT in U/L"},{"name":"alp_u_l","type":"number","description":"ALP in U/L"},{"name":"alt_uln_u_l","type":"number","description":"Laboratory ALT upper limit of normal in U/L"},{"name":"alp_uln_u_l","type":"number","description":"Laboratory ALP upper limit of normal in U/L"},{"name":"r_ratio","type":"number","description":"R ratio, 1 decimal"},{"name":"pattern","type":"string","description":"Bénichou 1990 / CIOMS enzyme pattern: hepatocellular (R ≥ 5), cholestatic (R ≤ 2), or mixed (2 < R < 5). Classified after rounding R to 1 decimal."},{"name":"citation","type":"object","description":"Bénichou 1990 / CIOMS citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"alp_u_l":"100","alp_uln_u_l":"100","alt_u_l":"200","alt_uln_u_l":"40"},{"alp_u_l":"100","alp_uln_u_l":"100","alt_u_l":"200","alt_uln_u_l":"40"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/r-factor","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/r-factor?alt_u_l=200&alt_uln_u_l=40&alp_u_l=100&alp_uln_u_l=100","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/r-factor","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/irae-hepatitis","description":"ASCO 2018 (Brahmer) immune-related hepatitis grade from caller AST, ALT, and total bilirubin as folds of laboratory ULN (mg/dL only). Lab grade is the max of transaminase and bilirubin Table 2.2 bands; decompensated liver upgrades to grade 4; symptomatic compensated liver dysfunction upgrades to grade 3. ICI action: continue (0-1), hold (2), or permanently discontinue (3-4). Not a medical device, not a diagnosis, not DILI/RUCAM, not R factor, not a steroid dose; magent does not assay enzymes.","parameters":[{"in":"query","name":"ast_u_l","type":"number","description":"Aspartate aminotransferase in U/L (1-10000). Used with ast_uln_u_l for the AST fold. magent does not assay enzymes.","required":true,"example":"80"},{"in":"query","name":"ast_uln_u_l","type":"number","description":"Laboratory AST upper limit of normal in U/L (5-200). Required; magent does not assume 40.","required":true,"example":"40"},{"in":"query","name":"alt_u_l","type":"number","description":"Alanine aminotransferase in U/L (1-10000). Used with alt_uln_u_l for the ALT fold. magent does not assay enzymes.","required":true,"example":"50"},{"in":"query","name":"alt_uln_u_l","type":"number","description":"Laboratory ALT upper limit of normal in U/L (5-200). Required; magent does not assume 40.","required":true,"example":"40"},{"in":"query","name":"bilirubin_mg_dl","type":"number","description":"Total bilirubin in mg/dL (0.1-40). µmol/L is not accepted. magent does not assay bilirubin.","required":true,"example":"1.0"},{"in":"query","name":"bilirubin_uln_mg_dl","type":"number","description":"Laboratory total-bilirubin upper limit of normal in mg/dL (0.1-5). Required; magent does not assume 1.0.","required":true,"example":"1.0"},{"in":"query","name":"decompensated_liver","type":"boolean","description":"Decompensated liver (ascites, encephalopathy, coagulopathy, or coma) as assigned by the caller (Brahmer 2018). true or false. When true, grade is max(lab_grade, 4). magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"symptomatic_liver_dysfunction","type":"boolean","description":"Symptomatic compensated hepatitis / liver dysfunction as assigned by the caller (Brahmer 2018). true or false. When true and decompensated_liver is false, grade is max(lab_grade, 3). magent does not examine the patient.","required":true,"example":"false"}],"errors":[{"code":"invalid_ast","message":"ast_u_l must be a number from 1 to 10000 Returned before settlement; you are not charged.","status":400},{"code":"invalid_ast_uln","message":"ast_uln_u_l must be a number from 5 to 200. Returned before settlement; you are not charged.","status":400},{"code":"invalid_alt","message":"alt_u_l must be a number from 1 to 10000 Returned before settlement; you are not charged.","status":400},{"code":"invalid_alt_uln","message":"alt_uln_u_l must be a number from 5 to 200. Returned before settlement; you are not charged.","status":400},{"code":"invalid_bilirubin","message":"bilirubin_mg_dl (0.1-40) or bilirubin_umol_l (2-684) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_bilirubin_uln","message":"bilirubin_uln_mg_dl must be a number from 0.1 to 5 (laboratory total-bilirubin ULN mg/dL). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/irae-hepatitis","citation":{"authors":"Brahmer JR, Lacchetti C, Schneider BJ, Atkins MB, Brassil KJ, Caterino JM, Chau I, Ernstoff MS, Gardner JM, Ginex P, Hallmeyer S, Holter Chakrabarty J, Leighl NB, Mammen JS, McDermott DF, Naing A, Nastoupil LJ, Phillips T, Porter LD, Puzanov I, Reichner CA, Santomasso BD, Seigel C, Spira A, Suarez-Almazor ME, Wang Y, Weber JS, Wolchok JD, Thompson JA","doi":"10.1200/JCO.2017.77.6385","id":"brahmer-2018","pmid":"29442540","source":"J Clin Oncol. 2018;36(17):1714-1768","title":"Management of Immune-Related Adverse Events in Patients Treated With Immune Checkpoint Inhibitor Therapy: American Society of Clinical Oncology Clinical Practice Guideline","url":"https://doi.org/10.1200/JCO.2017.77.6385"},"formula_expression":"lab_grade = max(transaminase_grade(max(AST/AST_ULN, ALT/ALT_ULN)), bilirubin_grade(TBili/TBili_ULN)); first-match: decompensated_liver -> max(lab_grade, 4); else symptomatic_liver_dysfunction -> max(lab_grade, 3); else lab_grade. Transaminase: <1x -> 0, ULN-3x -> 1, >3-5x -> 2, >5-20x -> 3, >20x -> 4. Bilirubin: <1x -> 0, ULN-1.5x -> 1, >1.5-3x -> 2, >3-10x -> 3, >10x -> 4 (Brahmer 2018 Table 2.2). icpi_action: 0-1 continue, 2 hold, 3-4 permanently_discontinue. mg/dL bilirubin only. Not DILI/RUCAM. Not R factor. magent does not assay enzymes. Not a diagnosis. Not a steroid dose","purpose":"Apply Brahmer 2018 ASCO Table 2.2 immune-related hepatitis lab folds (AST or ALT × ULN and total bilirubin × ULN) and return grade 0–4 plus ICI action, with caller-assigned decompensation (grade 4) and symptomatic compensated liver dysfunction (grade 3) upgrades.","markdown_url":"https://magentlab.com/docs/irae-hepatitis.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"irae_hepatitis"},{"name":"formula_expression","type":"string","description":"Brahmer 2018 Table 2.2 hepatitis lab folds plus clinical upgrades"},{"name":"grade","type":"integer","description":"0-4. Lab grade is the max of transaminase and bilirubin bands; decompensated_liver upgrades to at least 4; symptomatic_liver_dysfunction upgrades to at least 3. Not a diagnosis."},{"name":"icpi_action","type":"string","description":"continue (grade 0 or 1), hold (grade 2), or permanently_discontinue (grade 3 or 4). Not a steroid dose."},{"name":"transaminase_ratio","type":"number","description":"max(AST/AST_ULN, ALT/ALT_ULN), 4 decimal places"},{"name":"bilirubin_ratio","type":"number","description":"total bilirubin / bilirubin ULN (mg/dL), 4 decimal places"},{"name":"ast_u_l","type":"number","description":"AST in U/L"},{"name":"ast_uln_u_l","type":"number","description":"Laboratory AST upper limit of normal in U/L"},{"name":"alt_u_l","type":"number","description":"ALT in U/L"},{"name":"alt_uln_u_l","type":"number","description":"Laboratory ALT upper limit of normal in U/L"},{"name":"bilirubin_mg_dl","type":"number","description":"Total bilirubin in mg/dL"},{"name":"bilirubin_uln_mg_dl","type":"number","description":"Laboratory total-bilirubin ULN in mg/dL"},{"name":"decompensated_liver","type":"boolean","description":"Caller-assigned decompensated-liver flag"},{"name":"symptomatic_liver_dysfunction","type":"boolean","description":"Caller-assigned symptomatic compensated hepatitis / liver dysfunction flag"},{"name":"criteria","type":"array","description":"Per-factor Tree rows with factor and met for decompensated_liver then symptomatic_liver_dysfunction (first-match clinical upgrade)"},{"name":"citation","type":"object","description":"Brahmer 2018 J Clin Oncol citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"alt_u_l":"50","alt_uln_u_l":"40","ast_u_l":"80","ast_uln_u_l":"40","bilirubin_mg_dl":"1.0","bilirubin_uln_mg_dl":"1.0","decompensated_liver":"false","symptomatic_liver_dysfunction":"false"},{"alt_u_l":"50","alt_uln_u_l":"40","ast_u_l":"80","ast_uln_u_l":"40","bilirubin_mg_dl":"1.0","bilirubin_uln_mg_dl":"1.0","decompensated_liver":"false","symptomatic_liver_dysfunction":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/irae-hepatitis","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/irae-hepatitis?ast_u_l=80&ast_uln_u_l=40&alt_u_l=50&alt_uln_u_l=40&bilirubin_mg_dl=1.0&bilirubin_uln_mg_dl=1.0&decompensated_liver=false&symptomatic_liver_dysfunction=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/irae-hepatitis","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/galad","description":"Johnson 2014 GALAD linear predictor from age, sex, AFP ng/mL, AFP-L3 percent, and DCP ng/mL. galad_score = -10.08 + 0.09*age + 1.67*sex + 2.34*log10(AFP) + 0.04*AFP-L3 + 1.33*log10(DCP); sex is 1 if male else 0. Returns galad_score to 2 decimals. Not an HCC diagnosis, listing protocol, probability, or Johnson 2015 ALBI. DCP is ng/mL, not mAU/mL.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Eighteen is an implementation clamp; Johnson 2014 is adult chronic liver disease.","required":true,"example":"60"},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"Sex used in the linear predictor (male = 1, female = 0).","required":true,"example":"male"},{"in":"query","name":"afp_ng_ml","type":"number","description":"AFP in ng/mL (0.1-100000). Johnson 2014 uses log10 of ng/mL. Not a conversion from other units.","required":true,"example":"10"},{"in":"query","name":"afp_l3_percent","type":"number","description":"AFP-L3 as a raw percent of total AFP (0-100). Enters unlogged. Johnson 2014 does not take log10 of AFP-L3.","required":true,"example":"10"},{"in":"query","name":"dcp_ng_ml","type":"number","description":"DCP (des-gamma-carboxy prothrombin) in ng/mL (0.1-100000). Johnson 2014 uses log10 of ng/mL. Not mAU/mL; magent does not convert.","required":true,"example":"10"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_galad_afp","message":"afp_ng_ml must be a number from 0.1 to 100000 (Johnson 2014 GALAD log10 AFP). Returned before settlement; you are not charged.","status":400},{"code":"invalid_galad_dcp","message":"dcp_ng_ml must be a number from 0.1 to 100000 (Johnson 2014 GALAD log10 DCP). Returned before settlement; you are not charged.","status":400},{"code":"invalid_galad_afp_l3","message":"afp_l3_percent must be a number from 0 to 100 (Johnson 2014 GALAD). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/galad","citation":{"authors":"Johnson PJ, Pirrie SJ, Cox TF, Berhane S, Teng M, Palmer D, Morse J, Hull D, Patman G, Kagebayashi C, et al.","doi":"10.1158/1055-9965.EPI-13-0870","id":"johnson-2014","pmid":"24220911","source":"Cancer Epidemiol Biomarkers Prev. 2014;23(1):144-153","title":"The detection of hepatocellular carcinoma using a prospectively developed and validated model based on serological biomarkers","url":"https://doi.org/10.1158/1055-9965.EPI-13-0870"},"formula_expression":"galad_score = -10.08 + 0.09*age + 1.67*sex + 2.34*log10(afp_ng_ml) + 0.04*afp_l3_percent + 1.33*log10(dcp_ng_ml)","purpose":"Compute the Johnson 2014 GALAD linear predictor from age, sex, AFP, AFP-L3 percent, and DCP.","markdown_url":"https://magentlab.com/docs/galad.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"galad"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"age_years","type":"integer","description":"Age used in the equation"},{"name":"sex","type":"string","description":"female or male"},{"name":"afp_ng_ml","type":"number","description":"AFP used in ng/mL"},{"name":"afp_l3_percent","type":"number","description":"AFP-L3 used as a raw percent (not logged)"},{"name":"dcp_ng_ml","type":"number","description":"DCP used in ng/mL"},{"name":"galad_score","type":"number","description":"Johnson 2014 linear predictor, 2 decimal places"},{"name":"citation","type":"object","description":"Johnson 2014 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"afp_l3_percent":"10","afp_ng_ml":"10","age":"60","dcp_ng_ml":"10","sex":"male"},{"afp_l3_percent":"10","afp_ng_ml":"10","age":"60","dcp_ng_ml":"10","sex":"male"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/galad","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/galad?age=60&sex=male&afp_ng_ml=10&afp_l3_percent=10&dcp_ng_ml=10","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/galad","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/fong","description":"Fong 1999 clinical score after hepatic resection for metastatic colorectal cancer: five caller-assigned preoperative flags (node-positive primary, disease-free interval <12 months, more than one hepatic tumor, largest tumor >5 cm, CEA >200 ng/mL), 1 point each, score 0–5. favorable is true iff score ≤2. Not a resectability decision or adjuvant protocol. magent does not interpret imaging or pathology.","parameters":[{"in":"query","name":"node_positive_primary","type":"boolean","description":"Node-positive primary (Fong 1999). true or false as assigned by the caller. magent does not interpret pathology.","required":true,"example":"false"},{"in":"query","name":"dfi_lt_12_months","type":"boolean","description":"Disease-free interval from primary to metastases <12 months (Fong 1999). Caller already applied the published threshold; equality at 12 months does not meet. true or false.","required":true,"example":"false"},{"in":"query","name":"more_than_one_hepatic_tumor","type":"boolean","description":"More than one hepatic tumor (Fong 1999). true or false as assigned by the caller. magent does not interpret imaging.","required":true,"example":"false"},{"in":"query","name":"largest_tumor_gt_5_cm","type":"boolean","description":"Largest hepatic tumor >5 cm (Fong 1999). Caller already applied the published threshold; equality at 5 cm does not meet. true or false.","required":true,"example":"false"},{"in":"query","name":"cea_gt_200","type":"boolean","description":"CEA >200 ng/mL (Fong 1999). Caller already applied the published threshold; equality at 200 ng/mL does not meet. true or false.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/fong","citation":{"authors":"Fong Y, Fortner J, Sun RL, Brennan MF, Blumgart LH","doi":"10.1097/00000658-199909000-00004","id":"fong-1999","pmid":"10493478","source":"Ann Surg. 1999;230(3):309-318","title":"Clinical score for predicting recurrence after hepatic resection for metastatic colorectal cancer: analysis of 1001 consecutive cases","url":"https://doi.org/10.1097/00000658-199909000-00004"},"formula_expression":"Fong = node_positive_primary + dfi_lt_12_months + more_than_one_hepatic_tumor + largest_tumor_gt_5_cm + cea_gt_200; each 1; max 5","purpose":"Sum the five Fong 1999 preoperative criteria for colorectal liver metastases and return the 0–5 clinical score and whether it is potentially favorable (≤2).","markdown_url":"https://magentlab.com/docs/fong.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"fong"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Fong points 0-5"},{"name":"max_score","type":"integer","description":"5"},{"name":"favorable","type":"boolean","description":"true iff score ≤2 (Fong 1999: up to two criteria potentially favorable). Not a resectability decision."},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Fong et al. Ann Surg 1999 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"cea_gt_200":"false","dfi_lt_12_months":"false","largest_tumor_gt_5_cm":"false","more_than_one_hepatic_tumor":"false","node_positive_primary":"false"},{"cea_gt_200":"false","dfi_lt_12_months":"false","largest_tumor_gt_5_cm":"false","more_than_one_hepatic_tumor":"false","node_positive_primary":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/fong","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/fong?node_positive_primary=false&dfi_lt_12_months=false&more_than_one_hepatic_tumor=false&largest_tumor_gt_5_cm=false&cea_gt_200=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/fong","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/milan","description":"Mazzaferro 1996 Milan criteria for small HCC in cirrhosis: meets_milan is true iff there is no preoperative vascular invasion, no extrahepatic or lymph-node disease, and either one tumor 5 cm or less or two to three nodules each 3 cm or less. Four or more nodules fail. tumor_count and largest_cm are caller-assigned; magent does not interpret imaging. Not a medical device, not a transplant listing, and not UCSF criteria.","parameters":[{"in":"query","name":"tumor_count","type":"integer","description":"Number of HCC nodules (integer 1-20) as assigned by the caller. A single tumor may be up to 5 cm; two or three nodules must each be 3 cm or less. Four or more nodules fail Milan. magent does not interpret imaging.","required":true,"example":"1"},{"in":"query","name":"largest_cm","type":"number","description":"Largest tumor diameter in centimetres (0.1-30). Single tumor meets at 5.0 cm and fails at 5.1. Two or three nodules meet at 3.0 cm and fail at 3.1. magent does not interpret imaging.","required":true,"example":"5"},{"in":"query","name":"vascular_invasion","type":"boolean","description":"Preoperative vascular (vessel) invasion as assigned by the caller. true fails Milan (Mazzaferro 1996 excluded preoperative vessel invasion). true or false. magent does not interpret imaging.","required":true,"example":"false"},{"in":"query","name":"extrahepatic","type":"boolean","description":"Evident or suspected extrahepatic or lymph-node disease as assigned by the caller. true fails Milan (Mazzaferro 1996 excluded extrahepatic disease). true or false. magent does not interpret imaging.","required":true,"example":"false"}],"errors":[{"code":"invalid_tumor_count","message":"tumor_count must be an integer from 1 to 20 (Mazzaferro 1996). Returned before settlement; you are not charged.","status":400},{"code":"invalid_largest_cm","message":"largest_cm must be a number from 0.1 to 30 (Mazzaferro 1996). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/milan","citation":{"authors":"Mazzaferro V, Regalia E, Doci R, Andreola S, Pulvirenti A, Bozzetti F, Montalto F, Ammatuna M, Morabito A, Gennari L","doi":"10.1056/NEJM199603143341104","id":"mazzaferro-1996","pmid":"8594428","source":"N Engl J Med. 1996;334(11):693-699","title":"Liver transplantation for the treatment of small hepatocellular carcinomas in patients with cirrhosis","url":"https://doi.org/10.1056/NEJM199603143341104"},"formula_expression":"meets_milan iff no vascular_invasion and no extrahepatic and ((tumor_count == 1 and largest_cm <= 5) or (tumor_count in 2..3 and largest_cm <= 3))","purpose":"Apply Mazzaferro 1996 Milan criteria and return whether the published size, count, vascular-invasion, and extrahepatic rules all hold (meets_milan).","markdown_url":"https://magentlab.com/docs/milan.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"milan"},{"name":"formula_expression","type":"string","description":"Mazzaferro 1996: no vascular invasion, no extrahepatic disease, and single tumor <=5 cm or 2-3 nodules each <=3 cm"},{"name":"meets_milan","type":"boolean","description":"true only when all published Milan conditions hold. Not a transplant listing."},{"name":"tumor_count","type":"integer","description":"Echo of the caller-assigned nodule count (1-20)"},{"name":"largest_cm","type":"number","description":"Echo of the caller-assigned largest diameter in centimetres"},{"name":"vascular_invasion","type":"boolean","description":"Echo of the caller-assigned preoperative vascular-invasion flag"},{"name":"extrahepatic","type":"boolean","description":"Echo of the caller-assigned extrahepatic or lymph-node disease flag"},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met; met is true when that Milan condition holds"},{"name":"citation","type":"object","description":"Mazzaferro 1996 N Engl J Med citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"extrahepatic":"false","largest_cm":"5","tumor_count":"1","vascular_invasion":"false"},{"extrahepatic":"false","largest_cm":"5","tumor_count":"1","vascular_invasion":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/milan","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/milan?tumor_count=1&largest_cm=5&vascular_invasion=false&extrahepatic=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/milan","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/up-to-7","description":"Mazzaferro 2009 Up-to-seven: meets_up_to_seven is true iff tumor_count plus largest_cm is 7 or less and microvascular_invasion is false. Returns the boolean and size_number_sum, not a 5-year survival percentage. Pathology/explant-style inputs as assigned by the caller; magent does not interpret imaging or histology. Not Milan, not Metroticket 2.0 AFP criteria, not a contour calculator, not a medical device, and not a transplant listing.","parameters":[{"in":"query","name":"tumor_count","type":"integer","description":"Number of HCC nodules (integer 1-20) as assigned by the caller. Added to largest_cm as size_number_sum. The Up-to-seven ceiling is size_number_sum <= 7. magent does not interpret imaging or histology.","required":true,"example":"3"},{"in":"query","name":"largest_cm","type":"number","description":"Largest tumor diameter in centimetres (0.1-30) as assigned by the caller. Added to tumor_count as size_number_sum. Equality at 7.0 meets; 7.1 fails. magent does not interpret imaging or histology.","required":true,"example":"4"},{"in":"query","name":"microvascular_invasion","type":"boolean","description":"Microvascular invasion as assigned by the caller (pathology/explant-style). true fails Up-to-seven even when size_number_sum is 7 or less. true or false. magent does not interpret imaging or histology.","required":true,"example":"false"}],"errors":[{"code":"invalid_tumor_count","message":"tumor_count must be an integer from 1 to 20 (Mazzaferro 1996). Returned before settlement; you are not charged.","status":400},{"code":"invalid_largest_cm","message":"largest_cm must be a number from 0.1 to 30 (Mazzaferro 1996). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/up-to-7","citation":{"authors":"Mazzaferro V, Llovet JM, Miceli R, Bhoori S, Schiavo M, Mariani L, Camerini T, Roayaie S, Schwartz ME, Gonzalez FJ, et al.","doi":"10.1016/S1470-2045(08)70284-5","id":"mazzaferro-2009","pmid":"19058754","source":"Lancet Oncol. 2009;10(1):35-43","title":"Predicting survival after liver transplantation in patients with hepatocellular carcinoma beyond the Milan criteria: a retrospective, exploratory analysis","url":"https://doi.org/10.1016/S1470-2045(08)70284-5"},"formula_expression":"meets_up_to_seven iff size_number_sum <= 7 and not microvascular_invasion; size_number_sum = tumor_count + largest_cm (Mazzaferro 2009 Up-to-seven)","purpose":"Apply Mazzaferro 2009 Up-to-seven criteria and return whether tumor_count plus largest_cm is 7 or less without microvascular invasion (meets_up_to_seven).","markdown_url":"https://magentlab.com/docs/up-to-7.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"up_to_7"},{"name":"formula_expression","type":"string","description":"Mazzaferro 2009 Up-to-seven: size_number_sum <= 7 and no microvascular invasion"},{"name":"meets_up_to_seven","type":"boolean","description":"true only when size_number_sum is 7 or less and microvascular_invasion is false. Not a transplant listing. Not a survival percentage."},{"name":"size_number_sum","type":"number","description":"tumor_count + largest_cm (nodule count plus largest diameter in cm)"},{"name":"tumor_count","type":"integer","description":"Echo of the caller-assigned nodule count (1-20)"},{"name":"largest_cm","type":"number","description":"Echo of the caller-assigned largest diameter in centimetres"},{"name":"microvascular_invasion","type":"boolean","description":"Echo of the caller-assigned microvascular-invasion flag"},{"name":"criteria","type":"array","description":"Per-factor Tree rows with factor and met; met is true when that Up-to-seven condition holds"},{"name":"citation","type":"object","description":"Mazzaferro 2009 Lancet Oncol citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"largest_cm":"4","microvascular_invasion":"false","tumor_count":"3"},{"largest_cm":"4","microvascular_invasion":"false","tumor_count":"3"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/up-to-7","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/up-to-7?tumor_count=3&largest_cm=4&microvascular_invasion=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/up-to-7","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/hcc-ld","description":"Citterio 2016 JAMA Surgery hierarchic classes for liver decompensation after HCC resection from caller-assigned portal_hypertension, major_hepatectomy, and meld (integer 6-40). High if PHT and major (LD 60.0%, liver-related mortality 25.0%). Low if no PHT, minor, and MELD ≤ 9 (LD 4.9%, mortality 4.4%). Else intermediate (LD 28.6%, mortality 9.0%). magent does not compute MELD or HVPG. Not a surgical indication, transplant listing, or medical device.","parameters":[{"in":"query","name":"portal_hypertension","type":"boolean","description":"Clinically significant portal hypertension as assigned by the caller (Citterio 2016). true or false. magent does not measure HVPG or assign portal hypertension.","required":true,"example":"false"},{"in":"query","name":"major_hepatectomy","type":"boolean","description":"Planned major hepatectomy as assigned by the caller (Citterio 2016). true or false. magent does not choose extent of resection.","required":true,"example":"false"},{"in":"query","name":"meld","type":"integer","description":"Caller-assigned MELD integer 6-40 (Citterio 2016). Low requires meld ≤ 9 when portal hypertension and major hepatectomy are both false. magent does not compute MELD.","required":true,"example":"8"}],"errors":[{"code":"invalid_meld_score","message":"meld must be an integer from 6 to 40 (Citterio 2016 caller-assigned MELD; magent does not recompute MELD). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/hcc-ld","citation":{"authors":"Citterio D, Facciorusso A, Sposito C, Rota R, Bhoori S, Mazzaferro V","doi":"10.1001/jamasurg.2016.1121","id":"citterio-2016","pmid":"27248425","source":"JAMA Surg. 2016;151(9):846-853","title":"Hierarchic Interaction of Factors Associated With Liver Decompensation After Resection for Hepatocellular Carcinoma","url":"https://doi.org/10.1001/jamasurg.2016.1121"},"formula_expression":"Citterio 2016 JAMA Surgery: high if portal_hypertension and major_hepatectomy; low if not portal_hypertension and not major_hepatectomy and meld ≤ 9; else intermediate. Published LD 4.9 / 28.6 / 60.0 and liver-related mortality 4.4 / 9.0 / 25.0. Caller-assigned PHT, planned extent, and MELD. magent does not compute MELD or HVPG.","purpose":"Apply the Citterio 2016 JAMA Surgery hierarchic three-class rule to caller-assigned portal hypertension, planned major hepatectomy, and MELD, and return risk low, intermediate, or high with the published liver-decompensation and liver-related mortality percents.","markdown_url":"https://magentlab.com/docs/hcc-ld.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"hcc_ld"},{"name":"formula_expression","type":"string","description":"Published Citterio 2016 JAMA Surgery three-class hierarchic rule"},{"name":"portal_hypertension","type":"boolean","description":"Caller-assigned clinically significant portal hypertension used"},{"name":"major_hepatectomy","type":"boolean","description":"Caller-assigned planned major hepatectomy used"},{"name":"meld","type":"integer","description":"Caller-assigned MELD integer 6-40 echoed. magent does not recompute MELD."},{"name":"risk","type":"string","description":"low, intermediate, or high (Citterio 2016). High if portal hypertension and major hepatectomy. Low if neither and meld ≤ 9. Else intermediate. Not a surgical indication or transplant listing."},{"name":"ld_rate_percent","type":"number","description":"Published liver-decompensation percent: 4.9 low, 28.6 intermediate, 60.0 high"},{"name":"liver_related_mortality_percent","type":"number","description":"Published liver-related mortality percent: 4.4 low, 9.0 intermediate, 25.0 high"},{"name":"criteria","type":"array","description":"Tree rows for portal_hypertension, major_hepatectomy, meld_le_9, and exclusive low, intermediate, high with factor and met"},{"name":"citation","type":"object","description":"Citterio 2016 JAMA Surgery citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"major_hepatectomy":"false","meld":"8","portal_hypertension":"false"},{"major_hepatectomy":"false","meld":"8","portal_hypertension":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/hcc-ld","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/hcc-ld?portal_hypertension=false&major_hepatectomy=false&meld=8","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/hcc-ld","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/metroticket-2","description":"Mazzaferro 2018 Metroticket 2.0 AFP-adjusted-to-HCC-size 70% 5-year HCC-specific survival criteria. meets_70pct_hcc_specific_survival is true iff AFP <200 ng/mL and tumor_count + largest_cm <=7, or 200<=AFP<400 and sum <=5, or 400<=AFP<=1000 and sum <=4. AFP >1000 never meets. Not Milan, UCSF, Metroticket 1.0 contours, or competing-risk survival percents. magent does not interpret imaging or assay AFP. Not a medical device or transplant listing.","parameters":[{"in":"query","name":"tumor_count","type":"integer","description":"Number of HCC nodules (integer 1-20) as assigned by the caller. Added to largest_cm as size_number_sum (up-to-7 convention). magent does not interpret imaging.","required":true,"example":"1"},{"in":"query","name":"largest_cm","type":"number","description":"Largest tumor diameter in centimetres (0.1-30) as assigned by the caller. Added to tumor_count as size_number_sum. magent does not interpret imaging.","required":true,"example":"3"},{"in":"query","name":"afp_ng_ml","type":"number","description":"Serum AFP in ng/mL (1-100000) as assigned by the caller. Mazzaferro 2018 bands: <200 (sum <=7), 200 to <400 (sum <=5), 400 to 1000 (sum <=4); >1000 never meets. magent does not assay AFP.","required":true,"example":"50"}],"errors":[{"code":"invalid_tumor_count","message":"tumor_count must be an integer from 1 to 20 (Mazzaferro 1996). Returned before settlement; you are not charged.","status":400},{"code":"invalid_largest_cm","message":"largest_cm must be a number from 0.1 to 30 (Mazzaferro 1996). Returned before settlement; you are not charged.","status":400},{"code":"invalid_afp_ng_ml","message":"afp_ng_ml must be a number from 1 to 100000 (Mazzaferro 2018 AFP ng/mL). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/metroticket-2","citation":{"authors":"Mazzaferro V, Sposito C, Zhou J, Pinna AD, De Carlis L, Fan J, Cescon M, Di Sandro S, Yi-feng H, Lauterio A, Bongini M, Mariani L","doi":"10.1053/j.gastro.2017.09.025","id":"mazzaferro-2018","pmid":"28989060","source":"Gastroenterology. 2018;154(1):128-139","title":"Metroticket 2.0 Model for Analysis of Competing Risks of Death After Liver Transplantation for Hepatocellular Carcinoma","url":"https://doi.org/10.1053/j.gastro.2017.09.025"},"formula_expression":"meets_70pct_hcc_specific_survival iff (afp_ng_ml < 200 and size_number_sum <= 7) or (200 <= afp_ng_ml < 400 and size_number_sum <= 5) or (400 <= afp_ng_ml <= 1000 and size_number_sum <= 4); size_number_sum = tumor_count + largest_cm; afp_ng_ml > 1000 is always false (Mazzaferro 2018 AFP-adjusted-to-HCC-size 70% 5-year HCC-specific survival)","purpose":"Apply Mazzaferro 2018 Metroticket 2.0 AFP-adjusted-to-HCC-size criteria and return whether a published 70% 5-year HCC-specific survival band holds (meets_70pct_hcc_specific_survival).","markdown_url":"https://magentlab.com/docs/metroticket-2.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"metroticket_2"},{"name":"formula_expression","type":"string","description":"Mazzaferro 2018 AFP-adjusted-to-HCC-size 70% 5-year HCC-specific survival: AFP <200 and sum <=7, or 200<=AFP<400 and sum <=5, or 400<=AFP<=1000 and sum <=4"},{"name":"meets_70pct_hcc_specific_survival","type":"boolean","description":"true only when one published AFP-adjusted size-and-number band holds. Not a transplant listing."},{"name":"size_number_sum","type":"number","description":"tumor_count + largest_cm (nodule count plus largest diameter in cm)"},{"name":"afp_ng_ml","type":"number","description":"Echo of the caller-assigned AFP in ng/mL"},{"name":"tumor_count","type":"integer","description":"Echo of the caller-assigned nodule count (1-20)"},{"name":"largest_cm","type":"number","description":"Echo of the caller-assigned largest diameter in centimetres"},{"name":"criteria","type":"array","description":"Per-band Tree rows with factor and met for the three AFP-adjusted size-and-number bands"},{"name":"citation","type":"object","description":"Mazzaferro 2018 Gastroenterology citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"afp_ng_ml":"50","largest_cm":"3","tumor_count":"1"},{"afp_ng_ml":"50","largest_cm":"3","tumor_count":"1"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/metroticket-2","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/metroticket-2?tumor_count=1&largest_cm=3&afp_ng_ml=50","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/metroticket-2","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/bclc","description":"Reig 2022 BCLC stage 0/A/B/C/D from caller-assigned cancer-related ECOG, preserved liver function, transplant option, vascular invasion, extrahepatic disease, tumor count, and largest diameter. Returns stage and expected median survival only. Not a treatment recommendation. magent does not assign ECOG, compute Child-Pugh, or interpret imaging. Not a medical device. Not Milan or UCSF listing.","parameters":[{"in":"query","name":"ecog","type":"integer","description":"Cancer-related ECOG performance status 0-4 as assigned by the caller (Reig 2022: do not count baseline comorbidity PS). Integer 0-4. magent does not assign ECOG.","required":true,"example":"0"},{"in":"query","name":"preserved_liver_function","type":"boolean","description":"Preserved liver function as assigned by the caller (Reig 2022 abandoned Child-Pugh class for this assignment). true or false. magent does not compute Child-Pugh or ALBI.","required":true,"example":"true"},{"in":"query","name":"transplant_option","type":"boolean","description":"Option of liver transplantation when liver function is not preserved, as assigned by the caller (Reig 2022). true or false. magent does not list for transplant.","required":true,"example":"false"},{"in":"query","name":"vascular_invasion","type":"boolean","description":"Vascular (vessel) invasion as assigned by the caller. true or false. magent does not interpret imaging.","required":true,"example":"false"},{"in":"query","name":"extrahepatic","type":"boolean","description":"Extrahepatic spread as assigned by the caller. true or false. magent does not interpret imaging.","required":true,"example":"false"},{"in":"query","name":"tumor_count","type":"integer","description":"Number of HCC nodules (integer 1-20) as assigned by the caller. Stage 0 is a single tumor <=2 cm; stage A allows a solitary tumor of any size or 2-3 nodules none >3 cm; four or more nodules are stage B when otherwise 0/A/B-eligible. magent does not interpret imaging.","required":true,"example":"1"},{"in":"query","name":"largest_cm","type":"number","description":"Largest tumor diameter in centimetres (0.1-30). Stage 0 meets at 2.0 cm and is A at 2.1 when solitary. Two or three nodules meet A at 3.0 cm and are B at 3.1. magent does not interpret imaging.","required":true,"example":"1.5"}],"errors":[{"code":"invalid_ecog_ps","message":"ecog must be an integer from 0 to 4 (Oken 1982). Grade 5 (dead) is not scored. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_tumor_count","message":"tumor_count must be an integer from 1 to 20 (Mazzaferro 1996). Returned before settlement; you are not charged.","status":400},{"code":"invalid_largest_cm","message":"largest_cm must be a number from 0.1 to 30 (Mazzaferro 1996). Returned before settlement; you are not charged.","status":400},{"code":"invalid_bclc_profile","message":"ecog, preserved_liver_function, transplant_option, vascular_invasion, extrahepatic, and tumor burden do not match a Reig 2022 BCLC stage (0, A, B, C, or D). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/bclc","citation":{"authors":"Reig M, Forner A, Rimola J, Ferrer-Fàbrega J, Burrel M, Garcia-Criado Á, Kelley RK, Galle PR, Mazzaferro V, Salem R, Sangro B, Singal AG, Vogel A, Fuster J, Ayuso C, Bruix J","doi":"10.1016/j.jhep.2021.11.018","id":"reig-2022","pmid":"34801630","source":"J Hepatol. 2022;76(3):681-693","title":"BCLC strategy for prognosis prediction and treatment recommendation: The 2022 update","url":"https://doi.org/10.1016/j.jhep.2021.11.018"},"formula_expression":"bclc_stage D iff ecog > 2 or (not preserved_liver_function and not transplant_option); else C iff preserved_liver_function and ecog <= 2 and (vascular_invasion or extrahepatic or ecog >= 1); else 0 iff ecog == 0 and not vascular_invasion and not extrahepatic and (preserved_liver_function or transplant_option) and tumor_count == 1 and largest_cm <= 2; else A iff same eligibility and ((tumor_count == 1 and largest_cm > 2) or (tumor_count in 2..3 and largest_cm <= 3)); else B iff same eligibility and (tumor_count >= 4 or (tumor_count in 2..3 and largest_cm > 3)); else invalid_bclc_profile (Reig 2022)","purpose":"Apply Reig 2022 BCLC staging and return bclc_stage (0, A, B, C, or D) with the published expected median survival. Stage only. Not a treatment recommendation.","markdown_url":"https://magentlab.com/docs/bclc.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"bclc"},{"name":"formula_expression","type":"string","description":"Reig 2022 first-match BCLC stage 0/A/B/C/D (stage only)"},{"name":"bclc_stage","type":"string","description":"Reig 2022 BCLC stage 0, A, B, C, or D. Not a treatment recommendation."},{"name":"expected_median_survival","type":"string","description":"Published expected median survival: >5 years (0 and A), >2.5 years (B), >2 years (C), 3 months (D)"},{"name":"ecog","type":"integer","description":"Echo of the caller-assigned cancer-related ECOG PS (0-4)"},{"name":"preserved_liver_function","type":"boolean","description":"Echo of the caller-assigned preserved-liver-function flag"},{"name":"transplant_option","type":"boolean","description":"Echo of the caller-assigned transplant-option flag"},{"name":"vascular_invasion","type":"boolean","description":"Echo of the caller-assigned vascular-invasion flag"},{"name":"extrahepatic","type":"boolean","description":"Echo of the caller-assigned extrahepatic-spread flag"},{"name":"tumor_count","type":"integer","description":"Echo of the caller-assigned nodule count (1-20)"},{"name":"largest_cm","type":"number","description":"Echo of the caller-assigned largest diameter in centimetres"},{"name":"criteria","type":"array","description":"Per-factor Tree rows with factor and met for the Reig 2022 first-match predicates"},{"name":"citation","type":"object","description":"Reig 2022 J Hepatol citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"ecog":"0","extrahepatic":"false","largest_cm":"1.5","preserved_liver_function":"true","transplant_option":"false","tumor_count":"1","vascular_invasion":"false"},{"ecog":"0","extrahepatic":"false","largest_cm":"1.5","preserved_liver_function":"true","transplant_option":"false","tumor_count":"1","vascular_invasion":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/bclc","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/bclc?ecog=0&preserved_liver_function=true&transplant_option=false&vascular_invasion=false&extrahepatic=false&tumor_count=1&largest_cm=1.5","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/bclc","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/mrecist","description":"Lencioni 2010 mRECIST for typical intrahepatic HCC target lesions. First-match: PD if new_lesion or a 20% or greater viable-sum increase vs nadir; else CR if arterial enhancement disappeared in all targets; else PR if a 30% or greater viable-sum decrease vs baseline; else SD. Caller-assigned flags; magent does not read imaging. Not a medical device, not a diagnosis, not RECIST 1.1, not EASL necrosis-only, not the 2019 Llovet +5 mm PD refinement, and not nontarget-only overall response.","parameters":[{"in":"query","name":"new_lesion","type":"boolean","description":"One or more new lesions as assigned by the caller (Lencioni 2010 mRECIST PD). true or false. When true, mrecist is PD regardless of enhancement or viable-sum flags. magent does not read imaging.","required":true,"example":"false"},{"in":"query","name":"viable_sum_increase_ge_20","type":"boolean","description":"≥20% increase in the sum of diameters of viable (arterial-enhancing) target lesions versus nadir, as assigned by the caller (Lencioni 2010 mRECIST PD). Do not also require a 5 mm absolute increase. true or false. magent does not measure lesions.","required":true,"example":"false"},{"in":"query","name":"enhancement_disappeared","type":"boolean","description":"Disappearance of any intratumoral arterial enhancement in all target lesions, as assigned by the caller (Lencioni 2010 mRECIST CR). true or false. magent does not measure arterial-phase enhancement or read CT/MRI.","required":true,"example":"true"},{"in":"query","name":"viable_sum_reduction_ge_30","type":"boolean","description":"≥30% decrease in the sum of diameters of viable (arterial-enhancing) target lesions versus baseline, as assigned by the caller (Lencioni 2010 mRECIST PR). true or false. magent does not measure lesions.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/mrecist","citation":{"authors":"Lencioni R, Llovet JM","doi":"10.1055/s-0030-1247132","id":"lencioni-2010","pmid":"20175033","source":"Semin Liver Dis. 2010;30(1):52-60","title":"Modified RECIST (mRECIST) assessment for hepatocellular carcinoma","url":"https://doi.org/10.1055/s-0030-1247132"},"formula_expression":"mrecist first-match: PD if new_lesion or viable_sum_increase_ge_20; else CR if enhancement_disappeared; else PR if viable_sum_reduction_ge_30; else SD (Lencioni 2010 typical intrahepatic target lesions). Not RECIST 1.1. Not EASL necrosis-only. Not the 2019 Llovet +5 mm PD refinement. magent does not read imaging. Not a diagnosis","purpose":"Apply Lencioni 2010 modified RECIST (mRECIST) for hepatocellular carcinoma and return target-lesion overall response CR, PR, SD, or PD from caller-assigned viable-tumor flags.","markdown_url":"https://magentlab.com/docs/mrecist.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"mrecist"},{"name":"formula_expression","type":"string","description":"Lencioni 2010 mRECIST first-match target-lesion overall response (PD, CR, PR, or SD)"},{"name":"mrecist","type":"string","description":"CR, PR, SD, or PD. First-match on caller-assigned typical intrahepatic target-lesion flags. Not a diagnosis. Not RECIST 1.1."},{"name":"criteria","type":"array","description":"Per-factor Tree rows with factor and met for new_lesion, viable_sum_increase_ge_20, enhancement_disappeared, and viable_sum_reduction_ge_30"},{"name":"citation","type":"object","description":"Lencioni 2010 Semin Liver Dis mRECIST citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"enhancement_disappeared":"true","new_lesion":"false","viable_sum_increase_ge_20":"false","viable_sum_reduction_ge_30":"false"},{"enhancement_disappeared":"true","new_lesion":"false","viable_sum_increase_ge_20":"false","viable_sum_reduction_ge_30":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/mrecist","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/mrecist?new_lesion=false&viable_sum_increase_ge_20=false&enhancement_disappeared=true&viable_sum_reduction_ge_30=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/mrecist","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/bard","description":"Harrison 2008 BARD score for NAFLD advanced fibrosis: BMI ≥28 kg/m² (1), AST/ALT ≥0.8 (2), diabetes mellitus (1); max 4. Low 0–1, high 2–4 (paper 2–4 vs 0–1 split). Not a NASH diagnosis; magent does not interpret a biopsy or compute BMI. Not FIB-4, APRI, or the NAFLD fibrosis score.","parameters":[{"in":"query","name":"bmi","type":"number","description":"Body-mass index in kg/m^2 (10-80). >=28 scores 1 (Harrison 2008). 27.9 scores 0. Caller-supplied; magent does not compute BMI from height and weight.","required":true,"example":"25"},{"in":"query","name":"ast_u_l","type":"number","description":"Aspartate aminotransferase in U/L (1-10000). Used with ALT for the AAR.","required":true,"example":"20"},{"in":"query","name":"alt_u_l","type":"number","description":"Alanine aminotransferase in U/L (1-10000). AST/ALT >= 0.8 scores 2 (Harrison 2008). 0.799 scores 0. ALT must be >0.","required":true,"example":"40"},{"in":"query","name":"diabetes","type":"boolean","description":"Diabetes mellitus as assigned by the caller (Harrison 2008). true scores 1. magent does not diagnose diabetes.","required":true,"example":"false"}],"errors":[{"code":"invalid_bard","message":"bmi 10-80, ast_u_l 1-10000, and alt_u_l 1-10000 (Harrison 2008; magent clamps). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/bard","citation":{"authors":"Harrison SA, Oliver D, Arnold HL, Gogia S, Neuschwander-Tetri BA","doi":"10.1136/gut.2007.146019","id":"harrison-2008","pmid":"18390575","source":"Gut. 2008;57(10):1441-1447","title":"Development and validation of a simple NAFLD clinical scoring system for identifying patients without advanced disease","url":"https://doi.org/10.1136/gut.2007.146019"},"formula_expression":"BARD = 1 if BMI >= 28 + 2 if AST/ALT >= 0.8 + 1 if diabetes; Harrison 2008; max 4; risk_group low 0-1, high 2-4. Not a biopsy. Not F0-F4.","purpose":"Sum the Harrison 2008 BARD score (BMI ≥28, AST/ALT ≥0.8, diabetes) and return low (0–1) or high (2–4).","markdown_url":"https://magentlab.com/docs/bard.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"bard"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"BARD points 0-4"},{"name":"max_score","type":"integer","description":"Always 4 (1+2+1)"},{"name":"risk_group","type":"string","description":"low when score is 0-1, high when 2-4 (Harrison 2008 2-4 vs 0-1 split). Not F0-F4. Not a NASH diagnosis. magent does not interpret a biopsy."},{"name":"bmi","type":"number","description":"Caller-supplied BMI in kg/m^2"},{"name":"ast_u_l","type":"number","description":"AST in U/L"},{"name":"alt_u_l","type":"number","description":"ALT in U/L"},{"name":"ast_alt_ratio","type":"number","description":"AST/ALT ratio (AAR), 4 decimals"},{"name":"diabetes","type":"boolean","description":"Caller-assigned diabetes flag used"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Harrison Gut 2008 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"alt_u_l":"40","ast_u_l":"20","bmi":"25","diabetes":"false"},{"alt_u_l":"40","ast_u_l":"20","bmi":"25","diabetes":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/bard","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/bard?bmi=25&ast_u_l=20&alt_u_l=40&diabetes=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/bard","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/safe","description":"Sripongpun 2023 steatosis-associated fibrosis estimator (SAFE) from age, BMI (capped at 40 in the equation), diabetes, AST, ALT, globulin in g/dL, and platelets. Deterministic published equation with citation. Rule-out below 0; rule-in above 100. Not a biopsy, fibrosis stage, FIB-4, NAFLD fibrosis score, or BARD. magent does not compute BMI from height and weight.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120).","required":true,"example":"50"},{"in":"query","name":"bmi_kg_m2","type":"number","description":"Body-mass index in kg/m^2 (10-80). Caller-supplied; magent does not compute BMI from height and weight. Values above 40 are set to 40 in the formula only (Sripongpun 2023); the caller BMI is still echoed.","required":true,"example":"30"},{"in":"query","name":"diabetes","type":"boolean","description":"Diabetes as assigned by the caller (Sripongpun 2023; 0 or 1 in the equation). true or false. magent does not diagnose diabetes.","required":true,"example":"false"},{"in":"query","name":"ast_u_l","type":"number","description":"Aspartate aminotransferase in U/L (1-10000).","required":true,"example":"40"},{"in":"query","name":"alt_u_l","type":"number","description":"Alanine aminotransferase in U/L (1-10000).","required":true,"example":"40"},{"in":"query","name":"globulin_g_dl","type":"number","description":"Globulin in g/dL (0.5-8.0). Total protein minus albumin. magent does not convert g/L or split protein and albumin.","required":true,"example":"3"},{"in":"query","name":"platelets_10e9_l","type":"number","description":"Platelet count in 10^9/L (1-2000).","required":true,"example":"200"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_bmi_kg_m2","message":"bmi_kg_m2 must be a number from 10 to 80. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_ast","message":"ast_u_l must be a number from 1 to 10000 Returned before settlement; you are not charged.","status":400},{"code":"invalid_alt","message":"alt_u_l must be a number from 1 to 10000 Returned before settlement; you are not charged.","status":400},{"code":"invalid_globulin","message":"globulin_g_dl must be a number from 0.5 to 8.0 (g/dL; total protein minus albumin). Returned before settlement; you are not charged.","status":400},{"code":"invalid_platelets","message":"platelets_10e9_l must be a number from 1 to 2000 Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/safe","citation":{"authors":"Sripongpun P, Kim WR, Mannalithara A, et al.","doi":"10.1002/hep.32545","id":"sripongpun-2023","pmid":"35477908","source":"Hepatology. 2023;77(1):256-267","title":"The steatosis-associated fibrosis estimator (SAFE) score: A tool to detect low-risk NAFLD in primary care","url":"https://doi.org/10.1002/hep.32545"},"formula_expression":"SAFE = 2.97*age + 5.99*min(BMI, 40) + 154.85*ln(AST) - 58.23*ln(ALT) + 195.48*ln(globulin_g_dl) - 141.61*ln(platelets_10e9_l) + 62.85*(diabetes 0/1) - 75","purpose":"Compute the Sripongpun 2023 steatosis-associated fibrosis estimator (SAFE) from age, caller-supplied BMI, diabetes, AST, ALT, globulin in g/dL, and platelets.","markdown_url":"https://magentlab.com/docs/safe.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"safe"},{"name":"formula_expression","type":"string","description":"Exact Sripongpun 2023 expression (natural log; BMI capped at 40)"},{"name":"age_years","type":"integer","description":"Age in years used"},{"name":"bmi_kg_m2","type":"number","description":"Caller-supplied BMI in kg/m^2"},{"name":"bmi_used","type":"number","description":"BMI used in the equation (caller BMI, or 40 when caller BMI > 40)"},{"name":"diabetes","type":"boolean","description":"Diabetes flag used"},{"name":"ast_u_l","type":"number","description":"AST in U/L"},{"name":"alt_u_l","type":"number","description":"ALT in U/L"},{"name":"globulin_g_dl","type":"number","description":"Globulin in g/dL"},{"name":"platelets_10e9_l","type":"number","description":"Platelets in 10^9/L"},{"name":"safe","type":"number","description":"SAFE score, 2 decimals"},{"name":"safe_band","type":"string","description":"Published Sripongpun 2023 cut-points on the rounded score: lt_0 (rule-out / low risk; NPV at 0), 0_to_100 (indeterminate), gt_100 (rule-in / high risk). Not a diagnosis."},{"name":"citation","type":"object","description":"Sripongpun Hepatology 2023 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"50","alt_u_l":"40","ast_u_l":"40","bmi_kg_m2":"30","diabetes":"false","globulin_g_dl":"3","platelets_10e9_l":"200"},{"age":"50","alt_u_l":"40","ast_u_l":"40","bmi_kg_m2":"30","diabetes":"false","globulin_g_dl":"3","platelets_10e9_l":"200"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/safe","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/safe?age=50&bmi_kg_m2=30&diabetes=false&ast_u_l=40&alt_u_l=40&globulin_g_dl=3&platelets_10e9_l=200","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/safe","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/fni","description":"Tavaglione 2023 fibrotic NASH index (FNI) from AST, HbA1c, and HDL cholesterol. FNI = e^x/(1+e^x) with x = -10.33 + 2.54*ln(AST) + 3.86*ln(HbA1c) - 1.66*ln(HDL mg/dL). HDL may be mg/dL or mmol/L (×38.67). Rule-out ≤0.10; indeterminate between 0.10 and 0.33; rule-in ≥0.33. Not a biopsy, not FIB-4, not the NAFLD fibrosis score, not SAFE, and not BARD.","parameters":[{"in":"query","name":"ast_u_l","type":"number","description":"Aspartate aminotransferase in U/L (1-10000).","required":true,"example":"40"},{"in":"query","name":"a1c_percent","type":"number","description":"HbA1c in percent (4-15). magent does not convert from eAG.","required":true,"example":"5.5"},{"in":"query","name":"hdl_mg_dl","type":"number","description":"HDL cholesterol in mg/dL (5-150). Provide this or hdl_mmol_l, not both. Used in the natural-log term.","required":false,"example":"50"},{"in":"query","name":"hdl_mmol_l","type":"number","description":"HDL cholesterol in mmol/L (0.1-3.9). Converted as mg/dL = mmol/L * 38.67. Provide this or hdl_mg_dl, not both.","required":false,"example":"1.29"}],"errors":[{"code":"invalid_ast","message":"ast_u_l must be a number from 1 to 10000 Returned before settlement; you are not charged.","status":400},{"code":"invalid_a1c","message":"a1c_percent must be a number from 4 to 15 Returned before settlement; you are not charged.","status":400},{"code":"invalid_hdl","message":"hdl_mg_dl must be a number from 5 to 150, or hdl_mmol_l from 0.1 to 3.9, not both. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/fni","citation":{"authors":"Tavaglione F, Jamialahmadi O, De Vincentis A, et al.","doi":"10.1016/j.cgh.2022.03.044","id":"tavaglione-2023","pmid":"35421583","source":"Clin Gastroenterol Hepatol. 2023;21(6):1523-1532.e1","title":"Development and Validation of a Score for Fibrotic Nonalcoholic Steatohepatitis","url":"https://doi.org/10.1016/j.cgh.2022.03.044"},"formula_expression":"FNI = e^x / (1+e^x) where x = -10.33 + 2.54*ln(AST U/L) + 3.86*ln(HbA1c %) - 1.66*ln(HDL mg/dL) (natural log)","purpose":"Compute the Tavaglione 2023 fibrotic NASH index (FNI) from AST, HbA1c, and HDL cholesterol as a score for fibrotic nonalcoholic steatohepatitis.","markdown_url":"https://magentlab.com/docs/fni.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"fni"},{"name":"formula_expression","type":"string","description":"Exact Tavaglione 2023 expression (natural log; HDL in mg/dL)"},{"name":"ast_u_l","type":"number","description":"AST in U/L"},{"name":"a1c_percent","type":"number","description":"HbA1c in percent"},{"name":"hdl_mg_dl","type":"number","description":"HDL cholesterol used in mg/dL (after mmol/L conversion when supplied)"},{"name":"hdl_unit","type":"string","description":"Caller HDL unit used: mg_dl or mmol_l"},{"name":"x","type":"number","description":"Linear predictor x, 4 decimals"},{"name":"fni","type":"number","description":"FNI probability, 4 decimals"},{"name":"fni_band","type":"string","description":"Published Tavaglione 2023 cut-points on the rounded FNI: lte_0_10 (rule-out; FNI ≤ 0.10), gt_0_10_lt_0_33 (indeterminate; 0.10 < FNI < 0.33), gte_0_33 (rule-in; FNI ≥ 0.33). Not a biopsy."},{"name":"citation","type":"object","description":"Tavaglione Clin Gastroenterol Hepatol 2023 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"a1c_percent":"5.5","ast_u_l":"40","hdl_mg_dl":"50"},{"a1c_percent":"5.5","ast_u_l":"40","hdl_mg_dl":"50"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/fni","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/fni?ast_u_l=40&a1c_percent=5.5&hdl_mg_dl=50","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/fni","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/nafld-nas","description":"Kleiner 2005 NAFLD activity score (NAS): caller-assigned steatosis 0-3 (<5% / 5–33% / >33–66% / >66%), lobular_inflammation 0-3 (none / <2 foci per 200× / 2–4 / >4), ballooning 0-2 (none / few / many or prominent). magent sums only (max 8). Fibrosis is not in NAS. Kleiner 2005 reported NAS ≥5 correlated with NASH in that study; that is not a diagnostic algorithm. magent does not read histology and does not return NASH bands.","parameters":[{"in":"query","name":"steatosis","type":"integer","description":"Caller-assigned Kleiner 2005 steatosis points 0-3 (paper bins: 0 <5%; 1 5–33%; 2 >33–66%; 3 >66%). magent does not read histology.","required":true,"example":"0"},{"in":"query","name":"lobular_inflammation","type":"integer","description":"Caller-assigned Kleiner 2005 lobular inflammation points 0-3 (paper bins: 0 none; 1 <2 foci/200×; 2 2–4 foci/200×; 3 >4 foci/200×). magent does not read histology.","required":true,"example":"0"},{"in":"query","name":"ballooning","type":"integer","description":"Caller-assigned Kleiner 2005 hepatocellular ballooning points 0-2 (paper bins: 0 none; 1 few; 2 many/prominent). magent does not read histology.","required":true,"example":"0"}],"errors":[{"code":"invalid_nafld_nas","message":"steatosis must be an integer 0-3, lobular_inflammation an integer 0-3, and ballooning an integer 0-2 (Kleiner 2005 NAS). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/nafld-nas","citation":{"authors":"Kleiner DE, Brunt EM, Van Natta M, et al.","doi":"10.1002/hep.20701","id":"kleiner-2005","pmid":"15915461","source":"Hepatology. 2005;41(6):1313-1321","title":"Design and validation of a histological scoring system for nonalcoholic fatty liver disease","url":"https://doi.org/10.1002/hep.20701"},"formula_expression":"NAS = steatosis (integer 0-3) + lobular_inflammation (integer 0-3) + ballooning (integer 0-2); Kleiner 2005 caller-assigned; max 8; fibrosis is not in NAS; no NASH diagnostic bands","purpose":"Return the Kleiner 2005 NAFLD activity score (NAS) as the sum of three caller-assigned integer components (steatosis 0-3, lobular_inflammation 0-3, ballooning 0-2). Max 8. Does not return NASH diagnostic bands.","markdown_url":"https://magentlab.com/docs/nafld-nas.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"nafld_nas"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Kleiner 2005 NAS points 0-8"},{"name":"max_score","type":"integer","description":"Always 8"},{"name":"steatosis","type":"integer","description":"Caller-assigned steatosis points 0-3"},{"name":"lobular_inflammation","type":"integer","description":"Caller-assigned lobular inflammation points 0-3"},{"name":"ballooning","type":"integer","description":"Caller-assigned ballooning points 0-2"},{"name":"components","type":"array","description":"Per-component caller-assigned points"},{"name":"citation","type":"object","description":"Kleiner et al. Hepatology 2005 citation"},{"name":"disclaimer","type":"string","description":"Not a medical device"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"ballooning":"0","lobular_inflammation":"0","steatosis":"0"},{"ballooning":"0","lobular_inflammation":"0","steatosis":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/nafld-nas","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/nafld-nas?steatosis=0&lobular_inflammation=0&ballooning=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/nafld-nas","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/glasgow-blatchford","description":"Glasgow-Blatchford score (Blatchford 2000) for need for treatment after upper-gastrointestinal haemorrhage. Points from urea, haemoglobin (sex-specific), systolic BP, heart rate ≥100, melena, syncope, hepatic disease, and cardiac failure; max 23. Score 0 is the published low-risk screen; magent does not invent other GBS bands. Not a diagnosis, not Rockall, and not AIMS65. Urea may be mmol/L or BUN mg/dL; haemoglobin g/L or g/dL.","parameters":[{"in":"query","name":"sex","type":"string","description":"Sex (female or male). Haemoglobin points use the Blatchford 2000 sex-specific table.","required":true,"example":"male"},{"in":"query","name":"urea_mmol_l","type":"number","description":"Blood urea in mmol/L (1-50). Provide this or bun_mg_dl, not both. <6.5 scores 0; 6.5–7.9 scores 2; 8.0–9.9 scores 3; 10.0–24.9 scores 4; ≥25.0 scores 6.","required":false,"example":"5.0"},{"in":"query","name":"bun_mg_dl","type":"number","description":"BUN in mg/dL (3-140). Converted as urea_mmol_l = bun_mg_dl / 2.8. Provide this or urea_mmol_l, not both.","required":false,"example":"14"},{"in":"query","name":"hemoglobin_g_l","type":"number","description":"Haemoglobin in g/L (30-220). Provide this or hemoglobin_g_dl, not both. Men: <100 → 6; 100–119 → 3; 120–129 → 1; ≥130 → 0. Women: <100 → 6; 100–119 → 1; ≥120 → 0.","required":false,"example":"140"},{"in":"query","name":"hemoglobin_g_dl","type":"number","description":"Haemoglobin in g/dL (3-22). Converted as hemoglobin_g_l = hemoglobin_g_dl × 10. Provide this or hemoglobin_g_l, not both.","required":false,"example":"14.0"},{"in":"query","name":"systolic_mm_hg","type":"number","description":"Systolic blood pressure in mm Hg (50-250). <90 scores 3; 90–99 scores 2; 100–109 scores 1; ≥110 scores 0.","required":true,"example":"120"},{"in":"query","name":"heart_rate_bpm","type":"integer","description":"Heart rate in beats per minute (integer 30-220). Scores 1 when ≥100; 99 does not score.","required":true,"example":"80"},{"in":"query","name":"melena","type":"boolean","description":"Melena as assigned by the caller. true or false. 1 point if true.","required":true,"example":"false"},{"in":"query","name":"syncope","type":"boolean","description":"Syncope as assigned by the caller. true or false. 2 points if true.","required":true,"example":"false"},{"in":"query","name":"hepatic_disease","type":"boolean","description":"Hepatic disease as assigned by the caller. true or false. 2 points if true.","required":true,"example":"false"},{"in":"query","name":"cardiac_failure","type":"boolean","description":"Cardiac failure as assigned by the caller. true or false. 2 points if true.","required":true,"example":"false"}],"errors":[{"code":"invalid_urea","message":"urea_mmol_l (1-50) or bun_mg_dl (3-140) is required, not both. Returned before settlement; you are not charged.","status":400},{"code":"invalid_hemoglobin","message":"hemoglobin_g_l (30-220) or hemoglobin_g_dl (3-22) is required, not both. Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_systolic_bp","message":"systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.","status":400},{"code":"invalid_heart_rate","message":"heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/glasgow-blatchford","citation":{"authors":"Blatchford O, Murray WR, Blatchford M","doi":"10.1016/S0140-6736(00)02816-6","id":"blatchford-2000","source":"Lancet. 2000;356(9238):1318-1321","title":"A risk score to predict need for treatment for upper-gastrointestinal haemorrhage","url":"https://doi.org/10.1016/S0140-6736(00)02816-6"},"formula_expression":"GBS = urea_mmol_l table + haemoglobin_g_l table (sex-specific) + systolic_mm_hg table + (heart_rate_bpm >= 100) + melena + 2*syncope + 2*hepatic_disease + 2*cardiac_failure; max 23; score 0 low, else not_low","purpose":"Compute the Blatchford 2000 Glasgow-Blatchford score from urea, haemoglobin, systolic BP, heart rate, and four clinical flags.","markdown_url":"https://magentlab.com/docs/glasgow-blatchford.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"glasgow_blatchford"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Total points 0-23"},{"name":"max_score","type":"integer","description":"Always 23"},{"name":"gbs_risk","type":"string","description":"low when score is 0; not_low otherwise. Score 0 is the published low-risk screen. magent does not invent other GBS bands."},{"name":"urea_mmol_l","type":"number","description":"Urea used in mmol/L (after conversion), 1 decimal"},{"name":"hemoglobin_g_l","type":"number","description":"Haemoglobin used in g/L (after conversion), 1 decimal"},{"name":"sex","type":"string","description":"female or male"},{"name":"systolic_mm_hg","type":"number","description":"Systolic BP used, mm Hg"},{"name":"heart_rate_bpm","type":"integer","description":"Heart rate used, beats per minute"},{"name":"components","type":"array","description":"Per-item points"},{"name":"citation","type":"object","description":"Blatchford 2000 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"cardiac_failure":"false","heart_rate_bpm":"80","hemoglobin_g_l":"140","hepatic_disease":"false","melena":"false","sex":"male","syncope":"false","systolic_mm_hg":"120","urea_mmol_l":"5.0"},{"cardiac_failure":"false","heart_rate_bpm":"80","hemoglobin_g_l":"140","hepatic_disease":"false","melena":"false","sex":"male","syncope":"false","systolic_mm_hg":"120","urea_mmol_l":"5.0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/glasgow-blatchford","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/glasgow-blatchford?sex=male&urea_mmol_l=5.0&hemoglobin_g_l=140&systolic_mm_hg=120&heart_rate_bpm=80&melena=false&syncope=false&hepatic_disease=false&cardiac_failure=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/glasgow-blatchford","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/bun-creatinine-ratio","description":"Richards 1990 BUN/creatinine ratio as bun_mg_dl / creatinine_mg_dl, rounded to one decimal. A ratio of 36 or greater suggests upper gastrointestinal bleeding. A ratio below 36 is not helpful in locating the source and is not a lower-GI class. Provide creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768), not both. Not a diagnosis, endoscopy order, or Blatchford urea band. magent does not locate a bleed.","parameters":[{"in":"query","name":"bun_mg_dl","type":"number","description":"Blood urea nitrogen in mg/dL (1-200). Richards 1990 ratio uses BUN in mg/dL. Not a Glasgow-Blatchford urea band. magent does not assay BUN.","required":true,"example":"36"},{"in":"query","name":"creatinine_mg_dl","type":"number","description":"Serum creatinine in mg/dL (0.1-20). Provide this or creatinine_umol_l, not both. magent does not assay creatinine.","required":false,"example":"1"},{"in":"query","name":"creatinine_umol_l","type":"number","description":"Serum creatinine in µmol/L (9-1768). Converted as mg/dL = µmol/L / 88.42. Provide this or creatinine_mg_dl, not both.","required":false,"example":"88.42"}],"errors":[{"code":"invalid_bun","message":"bun_mg_dl must be a number from 1 to 200. Returned before settlement; you are not charged.","status":400},{"code":"invalid_creatinine","message":"creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/bun-creatinine-ratio","citation":{"authors":"Richards RJ, Donica MB, Grayer D","doi":"10.1097/00004836-199010000-00004","id":"richards-1990","pmid":"2229992","source":"J Clin Gastroenterol. 1990;12(5):500-504","title":"Can the blood urea nitrogen/creatinine ratio distinguish upper from lower gastrointestinal bleeding?","url":"https://doi.org/10.1097/00004836-199010000-00004"},"formula_expression":"bun_creatinine_ratio = bun_mg_dl / creatinine_mg_dl","purpose":"Compute the Richards 1990 blood urea nitrogen to creatinine ratio and whether that ratio is >= 36 (suggests upper gastrointestinal bleeding).","markdown_url":"https://magentlab.com/docs/bun-creatinine-ratio.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"bun_creatinine_ratio"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"bun_mg_dl","type":"number","description":"BUN used in mg/dL"},{"name":"creatinine_mg_dl","type":"number","description":"Serum creatinine used in mg/dL (after conversion)"},{"name":"bun_creatinine_ratio","type":"number","description":"BUN divided by creatinine in mg/dL, 1 decimal"},{"name":"suggests_upper_gi_bleeding","type":"boolean","description":"true when bun_creatinine_ratio is >= 36 after 1-decimal rounding"},{"name":"citation","type":"object","description":"Richards 1990 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"bun_mg_dl":"36","creatinine_mg_dl":"1"},{"bun_mg_dl":"36","creatinine_mg_dl":"1"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/bun-creatinine-ratio","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/bun-creatinine-ratio?bun_mg_dl=36&creatinine_mg_dl=1","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/bun-creatinine-ratio","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/aims65","description":"Saltzman 2011 AIMS65 for in-hospital mortality in acute upper GI bleeding: albumin <3.0 g/dL, INR >1.5, caller-assigned altered mental status, systolic BP <=90 mm Hg, and age >65; 1 point each, max 5. Albumin 3.0, INR 1.5, and age 65 do not score; SBP 90 does. Score only; no mortality percentages. Not a diagnosis. Not Glasgow-Blatchford or Rockall. magent does not assess mental status. Albumin g/dL or g/L.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Scores 1 when age >65; 65 does not score.","required":true,"example":"50"},{"in":"query","name":"albumin_g_dl","type":"number","description":"Albumin in g/dL (1-6). Provide this or albumin_g_l, not both. Scores 1 when <3.0; 3.0 does not score.","required":false,"example":"4.0"},{"in":"query","name":"albumin_g_l","type":"number","description":"Albumin in g/L (10-60). Converted as g/dL = g/L / 10. Provide this or albumin_g_dl, not both.","required":false,"example":"40"},{"in":"query","name":"inr","type":"number","description":"INR (0.8-10). Scores 1 when >1.5; 1.5 does not score.","required":true,"example":"1.0"},{"in":"query","name":"altered_mental_status","type":"boolean","description":"Altered mental status as assigned by the caller. true or false. magent does not assess mental status. 1 point if true.","required":true,"example":"false"},{"in":"query","name":"systolic_mm_hg","type":"number","description":"Cuff systolic blood pressure in mm Hg (50-250). Scores 1 when ≤90; 90 scores.","required":true,"example":"120"}],"errors":[{"code":"invalid_albumin","message":"albumin_g_dl (1-6) or albumin_g_l (10-60) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_inr","message":"inr must be a number from 0.8 to 10 Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_systolic_bp","message":"systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.","status":400},{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/aims65","citation":{"authors":"Saltzman JR, Tabak YP, Hyett BH, Sun X, Travis AC, Johannes RS","doi":"10.1016/j.gie.2011.06.024","id":"saltzman-2011","source":"Gastrointest Endosc. 2011;74(6):1215-1224","title":"A simple risk score accurately predicts in-hospital mortality, length of stay, and cost in acute upper GI bleeding","url":"https://doi.org/10.1016/j.gie.2011.06.024"},"formula_expression":"AIMS65 = (albumin_g_dl<3.0) + (inr>1.5) + altered_mental_status + (systolic_mm_hg<=90) + (age>65); each 1 if present; max 5","purpose":"Compute the Saltzman 2011 AIMS65 score for in-hospital mortality in acute upper GI bleeding from albumin, INR, caller-assigned altered mental status, systolic blood pressure, and age.","markdown_url":"https://magentlab.com/docs/aims65.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"aims65"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Total points 0-5"},{"name":"max_score","type":"integer","description":"Always 5"},{"name":"age_years","type":"integer","description":"Age used for the >65 criterion"},{"name":"albumin_g_dl","type":"number","description":"Albumin used in g/dL (after conversion)"},{"name":"inr","type":"number","description":"INR used"},{"name":"systolic_mm_hg","type":"number","description":"Systolic pressure used, mm Hg"},{"name":"components","type":"array","description":"Per-criterion points"},{"name":"citation","type":"object","description":"Saltzman 2011 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"50","albumin_g_dl":"4.0","altered_mental_status":"false","inr":"1.0","systolic_mm_hg":"120"},{"age":"50","albumin_g_dl":"4.0","altered_mental_status":"false","inr":"1.0","systolic_mm_hg":"120"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/aims65","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/aims65?age=50&albumin_g_dl=4.0&inr=1.0&altered_mental_status=false&systolic_mm_hg=120","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/aims65","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rockall-pre","description":"Rockall 1996 pre-endoscopy (admission) score after acute upper GI haemorrhage: age <60 0, 60-79 1, >=80 2; shock SBP<100 2 (hypotension; tachycardia not added), else HR>=100 1, else 0; comorbidity none 0, cardiac (failure, IHD, or any major) 2, renal/liver/metastatic 3. Max 7. Not complete Rockall, AIMS65, or GBS. Caller assigns comorbidity.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). <60 scores 0; 60-79 scores 1; ≥80 scores 2. 59 does not score; 60 scores 1; 79 scores 1; 80 scores 2.","required":true,"example":"50"},{"in":"query","name":"heart_rate_bpm","type":"integer","description":"Heart rate in beats per minute (integer 30-220). With SBP ≥100, HR ≥100 scores 1 (tachycardia); 99 does not. Not added when SBP <100.","required":true,"example":"80"},{"in":"query","name":"systolic_mm_hg","type":"number","description":"Systolic blood pressure in mm Hg (50-250). SBP <100 scores 2 (hypotension) and tachycardia is not added; 100 does not score hypotension.","required":true,"example":"120"},{"in":"query","name":"comorbidity","type":"string","description":"Caller-assigned comorbidity: none (0), cardiac (2; cardiac failure, IHD, or any major comorbidity), or renal_liver_metastatic (3; renal failure, liver failure, or disseminated malignancy). magent does not assign comorbidity.","required":true,"example":"none"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_heart_rate","message":"heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.","status":400},{"code":"invalid_systolic_bp","message":"systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.","status":400},{"code":"invalid_rockall_comorbidity","message":"comorbidity must be none, cardiac, or renal_liver_metastatic. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rockall-pre","citation":{"authors":"Rockall TA, Logan RF, Devlin HB, Northfield TC","doi":"10.1136/gut.38.3.316","id":"rockall-1996","source":"Gut. 1996;38(3):316-321","title":"Risk assessment after acute upper gastrointestinal haemorrhage","url":"https://doi.org/10.1136/gut.38.3.316"},"formula_expression":"pre-endoscopy Rockall = age (<60: 0, 60-79: 1, >=80: 2) + shock (SBP<100: 2; else HR>=100: 1; else 0) + comorbidity (none: 0, cardiac: 2, renal_liver_metastatic: 3); max 7","purpose":"Compute the Rockall 1996 pre-endoscopy (admission) score from age, heart rate, systolic blood pressure, and caller-assigned comorbidity after acute upper gastrointestinal haemorrhage.","markdown_url":"https://magentlab.com/docs/rockall-pre.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rockall_pre"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Total points 0-7"},{"name":"max_score","type":"integer","description":"Always 7"},{"name":"age_years","type":"integer","description":"Age used for the age band"},{"name":"heart_rate_bpm","type":"integer","description":"Heart rate used, bpm"},{"name":"systolic_mm_hg","type":"number","description":"Systolic pressure used, mm Hg"},{"name":"comorbidity","type":"string","description":"none, cardiac, or renal_liver_metastatic as supplied by the caller"},{"name":"components","type":"array","description":"Age, shock, and comorbidity points"},{"name":"citation","type":"object","description":"Rockall 1996 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"50","comorbidity":"none","heart_rate_bpm":"80","systolic_mm_hg":"120"},{"age":"50","comorbidity":"none","heart_rate_bpm":"80","systolic_mm_hg":"120"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rockall-pre","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rockall-pre?age=50&heart_rate_bpm=80&systolic_mm_hg=120&comorbidity=none","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rockall-pre","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rockall","description":"Rockall 1996 complete (post-endoscopy) score after acute upper GI haemorrhage: age <60 0, 60-79 1, >=80 2; shock SBP<100 2 (hypotension; tachycardia not added), else HR>=100 1, else 0; comorbidity none 0, cardiac 2, renal/liver/metastatic 3; diagnosis none or mallory_weiss 0, other 1, malignancy 2; stigmata none_or_spot 0, blood_clot_vessel 2. Max 11. Not pre-endoscopy-only Rockall, AIMS65, or GBS. Caller assigns comorbidity, diagnosis, and stigmata.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). <60 scores 0; 60-79 scores 1; ≥80 scores 2. 59 does not score; 60 scores 1; 79 scores 1; 80 scores 2.","required":true,"example":"50"},{"in":"query","name":"heart_rate_bpm","type":"integer","description":"Heart rate in beats per minute (integer 30-220). With SBP ≥100, HR ≥100 scores 1 (tachycardia); 99 does not. Not added when SBP <100.","required":true,"example":"80"},{"in":"query","name":"systolic_mm_hg","type":"number","description":"Systolic blood pressure in mm Hg (50-250). SBP <100 scores 2 (hypotension) and tachycardia is not added; 100 does not score hypotension.","required":true,"example":"120"},{"in":"query","name":"comorbidity","type":"string","description":"Caller-assigned comorbidity: none (0), cardiac (2; cardiac failure, IHD, or any major comorbidity), or renal_liver_metastatic (3; renal failure, liver failure, or disseminated malignancy). magent does not assign comorbidity.","required":true,"example":"none"},{"in":"query","name":"diagnosis","type":"string","description":"Caller-assigned diagnosis: none (0; no lesion identified and no stigmata of recent haemorrhage), mallory_weiss (0), other (1; all other diagnoses), or malignancy (2; malignancy of the upper GI tract). magent does not assign diagnosis.","required":true,"example":"none"},{"in":"query","name":"stigmata","type":"string","description":"Caller-assigned stigmata of recent haemorrhage: none_or_spot (0; none or dark spot only) or blood_clot_vessel (2; blood in the upper GI tract, adherent clot, visible or spurting vessel). magent does not assign stigmata.","required":true,"example":"none_or_spot"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_heart_rate","message":"heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.","status":400},{"code":"invalid_systolic_bp","message":"systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.","status":400},{"code":"invalid_rockall_comorbidity","message":"comorbidity must be none, cardiac, or renal_liver_metastatic. Returned before settlement; you are not charged.","status":400},{"code":"invalid_rockall_diagnosis","message":"diagnosis must be none, mallory_weiss, other, or malignancy (Rockall 1996). Returned before settlement; you are not charged.","status":400},{"code":"invalid_rockall_stigmata","message":"stigmata must be none_or_spot or blood_clot_vessel (Rockall 1996). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rockall","citation":{"authors":"Rockall TA, Logan RF, Devlin HB, Northfield TC","doi":"10.1136/gut.38.3.316","id":"rockall-1996","pmid":"8675081","source":"Gut. 1996;38(3):316-321","title":"Risk assessment after acute upper gastrointestinal haemorrhage","url":"https://doi.org/10.1136/gut.38.3.316"},"formula_expression":"Rockall = age (<60: 0, 60-79: 1, >=80: 2) + shock (SBP<100: 2; else HR>=100: 1; else 0) + comorbidity (none: 0, cardiac: 2, renal_liver_metastatic: 3) + diagnosis (none: 0, mallory_weiss: 0, other: 1, malignancy: 2) + stigmata (none_or_spot: 0, blood_clot_vessel: 2); max 11","purpose":"Compute the Rockall 1996 complete (post-endoscopy) score from age, heart rate, systolic blood pressure, caller-assigned comorbidity, diagnosis, and stigmata of recent haemorrhage after acute upper gastrointestinal haemorrhage.","markdown_url":"https://magentlab.com/docs/rockall.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rockall"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Total points 0-11"},{"name":"max_score","type":"integer","description":"Always 11"},{"name":"age_years","type":"integer","description":"Age used for the age band"},{"name":"heart_rate_bpm","type":"integer","description":"Heart rate used, bpm"},{"name":"systolic_mm_hg","type":"number","description":"Systolic pressure used, mm Hg"},{"name":"comorbidity","type":"string","description":"none, cardiac, or renal_liver_metastatic as supplied by the caller"},{"name":"diagnosis","type":"string","description":"none, mallory_weiss, other, or malignancy as supplied by the caller"},{"name":"stigmata","type":"string","description":"none_or_spot or blood_clot_vessel as supplied by the caller"},{"name":"components","type":"array","description":"Age, shock, comorbidity, diagnosis, and stigmata points"},{"name":"citation","type":"object","description":"Rockall 1996 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"50","comorbidity":"none","diagnosis":"none","heart_rate_bpm":"80","stigmata":"none_or_spot","systolic_mm_hg":"120"},{"age":"50","comorbidity":"none","diagnosis":"none","heart_rate_bpm":"80","stigmata":"none_or_spot","systolic_mm_hg":"120"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rockall","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rockall?age=50&heart_rate_bpm=80&systolic_mm_hg=120&comorbidity=none&diagnosis=none&stigmata=none_or_spot","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rockall","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/egus","description":"Brindle 2021 Edinburgh gastric ulcer score (human gastric ulcer at index OGD): age <68 → 0, 68-79 → 1, ≥80 → 2; size <1.25 cm → 0, 1.25-2.99 cm → 2, ≥3.00 cm → 3 (no 1-point size band); antral 0, non-antral 1. Total 0-6. higher_malignancy_risk iff score ≥ 3. Use only with macroscopically benign appearance and ≥6 negative biopsies. magent does not read endoscopy images. Not equine EGUS. Not a medical device.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Brindle 2021: <68 → 0; 68-79 → 1; ≥80 → 2.","required":true,"example":"50"},{"in":"query","name":"ulcer_size_cm","type":"number","description":"Endoscopist-estimated ulcer size in cm as assigned by the caller (Brindle 2021). <1.25 cm → 0; 1.25-2.99 cm → 2; ≥3.00 cm → 3. There is no 1-point size band. Magent clamp 0.1-40, not a published range. magent does not measure the ulcer.","required":true,"example":"1.0"},{"in":"query","name":"location","type":"string","enum":["antral","non-antral"],"description":"Caller-assigned ulcer location (Brindle 2021). antral (antrum or pre-pylorus) scores 0; non-antral scores 1. Case-insensitive. magent does not read endoscopy images or assign location.","required":true,"example":"antral"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_egus","message":"EGUS inputs must match Brindle 2021 age, ulcer size, and location bands from that paper. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/egus","citation":{"authors":"Brindle WM, Grant RK, Smith M, Suddaby M, Wallace A, Gillespie SL, Church NI, Noble CL, Penman ID, Plevris JN, Robertson AR, Watson EF, Selinger CP, Kalla R, Masterton GSM, EGAR (Edinburgh GI Audit and Research) Collaborative","doi":"10.1136/flgastro-2020-101759","id":"brindle-2021","pmid":"35295750","source":"Frontline Gastroenterol. 2021;13(2):111-118","title":"Risk stratifying gastric ulcers: development and validation of a scoring system","url":"https://doi.org/10.1136/flgastro-2020-101759"},"formula_expression":"EGUS = age_points + ulcer_size_points + location_points; age <68 → 0, 68-79 → 1, ≥80 → 2; size <1.25 cm → 0, 1.25-2.99 cm → 2, ≥3.00 cm → 3 (no 1-point size band); antral 0, non-antral 1; max 6; higher_malignancy_risk iff score ≥ 3 (Brindle 2021 Youden cut)","purpose":"Return the Brindle 2021 Edinburgh gastric ulcer score (age, ulcer size, and location; total 0-6) and the published Youden cut higher_malignancy_risk at score ≥ 3.","markdown_url":"https://magentlab.com/docs/egus.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"egus"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Total points 0-6"},{"name":"max_score","type":"integer","description":"Always 6"},{"name":"higher_malignancy_risk","type":"boolean","description":"true iff score ≥ 3 (Brindle 2021 Youden cut). Not a gastric-cancer diagnosis."},{"name":"components","type":"array","description":"Age, ulcer-size, and location points"},{"name":"citation","type":"object","description":"Brindle 2021 citation"},{"name":"disclaimer","type":"string","description":"Not a medical device"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"50","location":"antral","ulcer_size_cm":"1.0"},{"age":"50","location":"antral","ulcer_size_cm":"1.0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/egus","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/egus?age=50&ulcer_size_cm=1.0&location=antral","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/egus","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/oakland","description":"Oakland 2017 risk score for safe discharge after acute lower gastrointestinal bleeding. Points from age (0-2), sex (male 1), previous LGIB admission (1), caller-assigned blood on digital rectal examination (1), heart rate (0-3), systolic BP (0-5), and hemoglobin g/dL (0-22); max 35. safe_discharge when score ≤8 (derivation cutoff, not a later US validation). Not a discharge order or LGIB diagnosis. magent does not examine the rectum or assay hemoglobin. Hemoglobin g/dL or g/L.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (integer 16-120). Oakland 2017: ≤39 → 0, 40-69 → 1, ≥70 → 2.","required":true,"example":"35"},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"Sex as assigned by the caller. female scores 0; male scores 1.","required":true,"example":"female"},{"in":"query","name":"previous_lgib_admission","type":"boolean","description":"Previous admission for lower GI bleeding as assigned by the caller (Oakland 2017). true scores 1.","required":true,"example":"false"},{"in":"query","name":"dre_blood","type":"boolean","description":"Blood on digital rectal examination as assigned by the caller (Oakland 2017). true scores 1. magent does not examine the rectum.","required":true,"example":"false"},{"in":"query","name":"heart_rate_bpm","type":"integer","description":"Heart rate in beats per minute (integer 30-220). Oakland 2017: <70 → 0, 70-89 → 1, 90-109 → 2, ≥110 → 3.","required":true,"example":"65"},{"in":"query","name":"systolic_mm_hg","type":"number","description":"Systolic blood pressure in mm Hg (50-250). Oakland 2017: 50-89 → 5, 90-119 → 4, 120-129 → 3, 130-159 → 2, ≥160 → 0. magent does not read a blood pressure.","required":true,"example":"165"},{"in":"query","name":"hemoglobin_g_dl","type":"number","description":"Hemoglobin in g/dL (3-22). Provide this or hemoglobin_g_l, not both. Oakland 2017 bands start at 3.6 g/dL: 3.6-6.9 → 22, 7.0-8.9 → 17, 9.0-10.9 → 13, 11.0-12.9 → 8, 13.0-15.9 → 4, ≥16.0 → 0. Values <3.6 after conversion are rejected. magent does not assay hemoglobin.","required":false,"example":"16.5"},{"in":"query","name":"hemoglobin_g_l","type":"number","description":"Hemoglobin in g/L (30-220). Converted as hemoglobin_g_dl = hemoglobin_g_l / 10. Provide this or hemoglobin_g_dl, not both. Values <3.6 g/dL after conversion are rejected.","required":false,"example":"165"}],"errors":[{"code":"invalid_oakland_age","message":"age must be an integer from 16 to 120 (Oakland 2017 acute lower GI bleeding). Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_heart_rate","message":"heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.","status":400},{"code":"invalid_systolic_bp","message":"systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.","status":400},{"code":"invalid_hemoglobin","message":"hemoglobin_g_l (30-220) or hemoglobin_g_dl (3-22) is required, not both. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/oakland","citation":{"authors":"Oakland K, Jairath V, Uberoi R, Guy R, Ayaru L, Mortensen N, Murphy MF, Collins GS","doi":"10.1016/s2468-1253(17)30150-4","id":"oakland-2017","pmid":"28651935","source":"Lancet Gastroenterol Hepatol. 2017;2(9):635-643","title":"Derivation and validation of a novel risk score for safe discharge after acute lower gastrointestinal bleeding: a modelling study","url":"https://doi.org/10.1016/s2468-1253(17)30150-4"},"formula_expression":"Oakland = age (≤39:0, 40-69:1, ≥70:2) + male 1 + previous_lgib_admission 1 + dre_blood 1 + HR (<70:0, 70-89:1, 90-109:2, ≥110:3) + SBP (50-89:5, 90-119:4, 120-129:3, 130-159:2, ≥160:0) + Hb g/dL (3.6-6.9:22, 7.0-8.9:17, 9.0-10.9:13, 11.0-12.9:8, 13.0-15.9:4, ≥16.0:0); Oakland 2017 derivation; max 35; safe_discharge ≤8","purpose":"Sum the Oakland 2017 derivation-table weights for acute lower gastrointestinal bleeding and return safe_discharge (score ≤8) or not_safe (score >8).","markdown_url":"https://magentlab.com/docs/oakland.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"oakland"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Oakland points 0-35"},{"name":"max_score","type":"integer","description":"Always 35"},{"name":"oakland_band","type":"string","description":"safe_discharge when score ≤8, not_safe when score >8 (Oakland 2017 derivation cutoff). Not a discharge order."},{"name":"age_years","type":"integer","description":"Age used (years)"},{"name":"sex","type":"string","description":"Sex used: male or female"},{"name":"previous_lgib_admission","type":"boolean","description":"Caller-assigned previous LGIB admission flag used"},{"name":"dre_blood","type":"boolean","description":"Caller-assigned blood on digital rectal examination flag used"},{"name":"heart_rate_bpm","type":"integer","description":"Heart rate used (bpm)"},{"name":"systolic_mm_hg","type":"number","description":"Systolic blood pressure used (mm Hg)"},{"name":"hemoglobin_g_dl","type":"number","description":"Hemoglobin used in g/dL (g/L inputs converted as g/dL = g/L / 10)"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Oakland 2017 Lancet Gastroenterol Hepatol citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"35","dre_blood":"false","heart_rate_bpm":"65","hemoglobin_g_dl":"16.5","previous_lgib_admission":"false","sex":"female","systolic_mm_hg":"165"},{"age":"35","dre_blood":"false","heart_rate_bpm":"65","hemoglobin_g_dl":"16.5","previous_lgib_admission":"false","sex":"female","systolic_mm_hg":"165"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/oakland","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/oakland?age=35&sex=female&previous_lgib_admission=false&dre_blood=false&heart_rate_bpm=65&systolic_mm_hg=165&hemoglobin_g_dl=16.5","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/oakland","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/bisap","description":"Wu 2008 BISAP for early mortality prediction in acute pancreatitis: BUN >25 mg/dL, caller-assigned impaired mental status, caller-assigned SIRS, age >60, and caller-assigned pleural effusion; 1 point each, max 5. BUN 25.0 and age 60 do not score. Score only; no mortality percentages. Not a diagnosis. Not Ranson, APACHE II, or CTSI. magent does not recompute SIRS, assign mental status, or read imaging.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Scores 1 when age >60; 60 does not score.","required":true,"example":"50"},{"in":"query","name":"bun_mg_dl","type":"number","description":"Blood urea nitrogen in mg/dL (1-200). Scores 1 when >25; 25.0 does not score.","required":true,"example":"20"},{"in":"query","name":"impaired_mental_status","type":"boolean","description":"Impaired mental status as assigned by the caller (paper: GCS <15). true or false. magent does not take GCS or assign mental status. 1 point if true.","required":true,"example":"false"},{"in":"query","name":"sirs","type":"boolean","description":"SIRS present as assigned by the caller. true or false. magent does not recompute Bone SIRS from vitals. 1 point if true.","required":true,"example":"false"},{"in":"query","name":"pleural_effusion","type":"boolean","description":"Pleural effusion as assigned by the caller from imaging. true or false. magent does not read imaging. 1 point if true.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_bun","message":"bun_mg_dl must be a number from 1 to 200. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/bisap","citation":{"authors":"Wu BU, Johannes RS, Sun X, Tabak Y, Conwell DL, Banks PA","doi":"10.1136/gut.2008.152702","id":"wu-2008","pmid":"18519429","source":"Gut. 2008;57(12):1698-1703","title":"The early prediction of mortality in acute pancreatitis: a large population-based study","url":"https://doi.org/10.1136/gut.2008.152702"},"formula_expression":"BISAP = (bun_mg_dl>25) + impaired_mental_status + sirs + (age>60) + pleural_effusion; each 1 if present; max 5","purpose":"Compute the Wu 2008 BISAP score for early prediction of mortality in acute pancreatitis from BUN, caller-assigned impaired mental status, caller-assigned SIRS, age, and caller-assigned pleural effusion.","markdown_url":"https://magentlab.com/docs/bisap.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"bisap"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Total points 0-5"},{"name":"max_score","type":"integer","description":"Always 5"},{"name":"age_years","type":"integer","description":"Age used for the >60 criterion"},{"name":"bun_mg_dl","type":"number","description":"BUN used in mg/dL"},{"name":"components","type":"array","description":"Per-criterion points"},{"name":"citation","type":"object","description":"Wu 2008 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"50","bun_mg_dl":"20","impaired_mental_status":"false","pleural_effusion":"false","sirs":"false"},{"age":"50","bun_mg_dl":"20","impaired_mental_status":"false","pleural_effusion":"false","sirs":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/bisap","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/bisap?age=50&bun_mg_dl=20&impaired_mental_status=false&sirs=false&pleural_effusion=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/bisap","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/ranson","description":"Ranson 1974 pancreatitis score from eleven published signs (five at admission, six at 48 hours) as boolean flags. Returns points 0-11 and mortality band 0-2 / 3-4 / 5-6 / 7-11. Deterministic published arithmetic with citation; not an ICU order.","parameters":[{"in":"query","name":"age_gt_55","type":"boolean","description":"Admission: age >55 years (Ranson 1974). true or false.","required":true,"example":"false"},{"in":"query","name":"wbc_gt_16k","type":"boolean","description":"Admission: WBC >16 000/mm^3. true or false.","required":true,"example":"false"},{"in":"query","name":"glucose_gt_200","type":"boolean","description":"Admission: blood glucose >200 mg/dL. true or false.","required":true,"example":"false"},{"in":"query","name":"ldh_gt_350","type":"boolean","description":"Admission: LDH >350 IU/L. true or false.","required":true,"example":"false"},{"in":"query","name":"ast_gt_250","type":"boolean","description":"Admission: AST >250 U/L. true or false.","required":true,"example":"false"},{"in":"query","name":"hct_drop_gt_10","type":"boolean","description":"First 48 h: hematocrit fall >10 percentage points. true or false.","required":true,"example":"false"},{"in":"query","name":"bun_rise_gt_5","type":"boolean","description":"First 48 h: BUN rise >5 mg/dL. true or false.","required":true,"example":"false"},{"in":"query","name":"calcium_lt_8","type":"boolean","description":"First 48 h: serum calcium <8 mg/dL. true or false.","required":true,"example":"false"},{"in":"query","name":"pao2_lt_60","type":"boolean","description":"First 48 h: arterial PaO2 <60 mm Hg. true or false.","required":true,"example":"false"},{"in":"query","name":"base_deficit_gt_4","type":"boolean","description":"First 48 h: base deficit >4 mEq/L. true or false.","required":true,"example":"false"},{"in":"query","name":"fluid_seq_gt_6l","type":"boolean","description":"First 48 h: estimated fluid sequestration >6 L. true or false.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/ranson","citation":{"authors":"Ranson JH, Rifkind KM, Roses DF, Fink SD, Eng K, Spencer FC","id":"ranson-1974","pmid":"4834279","source":"Surg Gynecol Obstet. 1974;139(1):69-81","title":"Prognostic signs and the role of operative management in acute pancreatitis","url":"https://pubmed.ncbi.nlm.nih.gov/4834279"},"formula_expression":"Ranson = 5 admission signs + 6 signs during first 48 h; each 1 if present; max 11","purpose":"Sum the eleven Ranson 1974 prognostic signs (five at admission, six during the first 48 hours) and return the published mortality band.","markdown_url":"https://magentlab.com/docs/ranson.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"ranson"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Ranson points 0-11"},{"name":"max_score","type":"integer","description":"11"},{"name":"mortality_band","type":"string","description":"Published grouped mortality: 0-2, 3-4, 5-6, or 7-11. A band, not an ICU order."},{"name":"components","type":"array","description":"Per-sign points"},{"name":"citation","type":"object","description":"Ranson et al. 1974 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age_gt_55":"false","ast_gt_250":"false","base_deficit_gt_4":"false","bun_rise_gt_5":"false","calcium_lt_8":"false","fluid_seq_gt_6l":"false","glucose_gt_200":"false","hct_drop_gt_10":"false","ldh_gt_350":"false","pao2_lt_60":"false","wbc_gt_16k":"false"},{"age_gt_55":"false","ast_gt_250":"false","base_deficit_gt_4":"false","bun_rise_gt_5":"false","calcium_lt_8":"false","fluid_seq_gt_6l":"false","glucose_gt_200":"false","hct_drop_gt_10":"false","ldh_gt_350":"false","pao2_lt_60":"false","wbc_gt_16k":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/ranson","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/ranson?age_gt_55=false&wbc_gt_16k=false&glucose_gt_200=false&ldh_gt_350=false&ast_gt_250=false&hct_drop_gt_10=false&bun_rise_gt_5=false&calcium_lt_8=false&pao2_lt_60=false&base_deficit_gt_4=false&fluid_seq_gt_6l=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/ranson","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/ap-prediction","description":"Jin 2018 ED model for early diagnosis of acute pancreatitis when lipase is at least 3x ULN. Integer points: prior episodes 0/1/2/3/4, cholelithiasis +2, abdominal surgery in 2 months -2, epigastric pain +2, worsening pain +1, pain duration >=5 days -1, severity mild 0 / moderate +2 / severe +3, lipase fold +0/+1/+2. Score max 14; jin2018_high_ppv if score>=8; jin2024_accuracy_cut if score>=6. Not a diagnosis. Not an imaging order. Not Ranson, BISAP, or Glasgow-Imrie.","parameters":[{"in":"query","name":"prior_ap_episodes","type":"string","enum":["0","1","2","3","4_or_more"],"description":"Caller-assigned prior acute-pancreatitis episode token (Jin 2018). 0 scores 0; 1 scores 1; 2 scores 2; 3 scores 3; 4_or_more scores 4. magent does not take a history.","required":true,"example":"0"},{"in":"query","name":"cholelithiasis","type":"boolean","description":"Caller-assigned cholelithiasis (Jin 2018). true scores +2; false scores 0. magent does not read imaging.","required":true,"example":"false"},{"in":"query","name":"abdominal_surgery_2mo","type":"boolean","description":"Caller-assigned abdominal surgery within 2 months (Jin 2018). true scores -2; false scores 0.","required":true,"example":"false"},{"in":"query","name":"epigastric_pain","type":"boolean","description":"Caller-assigned epigastric pain (Jin 2018). true scores +2; false scores 0. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"worsening_pain","type":"boolean","description":"Caller-assigned worsening pain (Jin 2018). true scores +1; false scores 0.","required":true,"example":"false"},{"in":"query","name":"pain_duration_days","type":"string","enum":["lt_5","gte_5"],"description":"Caller-assigned pain-duration token (Jin 2018). lt_5 (<5 days) scores 0; gte_5 (≥5 days) scores -1. magent does not take a history.","required":true,"example":"lt_5"},{"in":"query","name":"pain_severity","type":"string","enum":["mild_0_3","moderate_4_6","severe_7_10"],"description":"Caller-assigned pain-severity token (Jin 2018). mild_0_3 (0-3) scores 0; moderate_4_6 (4-6) scores +2; severe_7_10 (7-10) scores +3. magent does not assign a pain scale.","required":true,"example":"mild_0_3"},{"in":"query","name":"lipase_uln_fold","type":"number","description":"Serum lipase as a fold of the laboratory ULN. Population is lipase ≥3× ULN (Jin 2018). ≥3 and <10 scores 0; ≥10 and <20 scores +1; ≥20 scores +2. Below 3 is invalid_ap_prediction.","required":true,"example":"4"}],"errors":[{"code":"invalid_ap_prediction","message":"Acute-pancreatitis prediction inputs must match Jin 2018 prior-episode, surgery, pain, and lipase-fold categories from that paper. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/ap-prediction","citation":{"authors":"Jin DX, McNabb-Baltar J, Suleiman SL, Wu BU, Khorasani R, Bollen TL, et al.","doi":"10.1097/MPA.0000000000001102","id":"jin-2018","pmid":"29975351","source":"Pancreas. 2018;47(7):871-879","title":"A Clinical Model for the Early Diagnosis of Acute Pancreatitis in the Emergency Department","url":"https://doi.org/10.1097/MPA.0000000000001102"},"formula_expression":"AP prediction = prior_ap_episodes (0→0, 1→1, 2→2, 3→3, 4_or_more→4) + cholelithiasis (true +2) + abdominal_surgery_2mo (true -2) + epigastric_pain (true +2) + worsening_pain (true +1) + pain_duration_days (lt_5 0, gte_5 -1) + pain_severity (mild_0_3 0, moderate_4_6 +2, severe_7_10 +3) + lipase_uln_fold (≥3 and <10 → 0, ≥10 and <20 → +1, ≥20 → +2); Jin 2018; max 14; jin2018_high_ppv iff score ≥ 8; jin2024_accuracy_cut iff score ≥ 6","purpose":"Sum the Jin 2018 integer-point items for ED patients with lipase ≥3× ULN and return the published ≥8 high-PPV cut and the Jin 2024 ≥6 accuracy cut.","markdown_url":"https://magentlab.com/docs/ap-prediction.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"ap_prediction"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Jin 2018 integer points (max 14)"},{"name":"max_score","type":"integer","description":"14"},{"name":"jin2018_high_ppv","type":"boolean","description":"True when score ≥ 8 (Jin 2018 diagnostic-risk cut; ≥99% estimated AP risk in that paper). Not a diagnosis."},{"name":"jin2024_accuracy_cut","type":"boolean","description":"True when score ≥ 6 (Jin 2024 prospective validation highest-accuracy cut of this same score). Not a diagnosis."},{"name":"components","type":"array","description":"Per-item Jin 2018 points"},{"name":"citation","type":"object","description":"Jin et al. Pancreas 2018 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"abdominal_surgery_2mo":"false","cholelithiasis":"false","epigastric_pain":"false","lipase_uln_fold":"4","pain_duration_days":"lt_5","pain_severity":"mild_0_3","prior_ap_episodes":"0","worsening_pain":"false"},{"abdominal_surgery_2mo":"false","cholelithiasis":"false","epigastric_pain":"false","lipase_uln_fold":"4","pain_duration_days":"lt_5","pain_severity":"mild_0_3","prior_ap_episodes":"0","worsening_pain":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/ap-prediction","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/ap-prediction?prior_ap_episodes=0&cholelithiasis=false&abdominal_surgery_2mo=false&epigastric_pain=false&worsening_pain=false&pain_duration_days=lt_5&pain_severity=mild_0_3&lipase_uln_fold=4","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/ap-prediction","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/glasgow-imrie","description":"Blamey 1984 Glasgow-Imrie eight-factor pancreatitis score: age >55, WBC >15 ×10^9/L, glucose >10 mmol/L, urea >16 mmol/L, PaO2 <60 mm Hg, calcium <2.0 mmol/L, albumin <32 g/L, LDH >600 U/L; 1 point each, max 8. Severe predicted if score ≥3. Caller-assigned flags; magent does not convert units. Not a diagnosis. Not Ranson. Transaminases omitted as in the paper.","parameters":[{"in":"query","name":"age_gt_55","type":"boolean","description":"Age >55 years (Blamey 1984). true or false.","required":true,"example":"false"},{"in":"query","name":"wbc_gt_15","type":"boolean","description":"WBC >15 ×10^9/L. true or false.","required":true,"example":"false"},{"in":"query","name":"glucose_gt_10","type":"boolean","description":"Glucose >10 mmol/L. true or false.","required":true,"example":"false"},{"in":"query","name":"urea_gt_16","type":"boolean","description":"Urea >16 mmol/L. true or false.","required":true,"example":"false"},{"in":"query","name":"pao2_lt_60","type":"boolean","description":"Arterial PaO2 <60 mm Hg. true or false.","required":true,"example":"false"},{"in":"query","name":"calcium_lt_2","type":"boolean","description":"Calcium <2.0 mmol/L. true or false.","required":true,"example":"false"},{"in":"query","name":"albumin_lt_32","type":"boolean","description":"Albumin <32 g/L. true or false.","required":true,"example":"false"},{"in":"query","name":"ldh_gt_600","type":"boolean","description":"LDH >600 U/L. true or false.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/glasgow-imrie","citation":{"authors":"Blamey SL, Imrie CW, O'Neill J, Gilmour WH, Carter DC","doi":"10.1136/gut.25.12.1340","id":"blamey-1984","pmid":"6510766","source":"Gut. 1984;25(12):1340-1346","title":"Prognostic factors in acute pancreatitis","url":"https://doi.org/10.1136/gut.25.12.1340"},"formula_expression":"Glasgow-Imrie = age_gt_55 + wbc_gt_15 + glucose_gt_10 + urea_gt_16 + pao2_lt_60 + calcium_lt_2 + albumin_lt_32 + ldh_gt_600; each 1 if present; max 8; severe_predicted if score >= 3","purpose":"Sum the eight Blamey 1984 Glasgow-Imrie factors and return whether severe pancreatitis is predicted (three or more factors).","markdown_url":"https://magentlab.com/docs/glasgow-imrie.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"glasgow_imrie"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Glasgow-Imrie points 0-8"},{"name":"max_score","type":"integer","description":"8"},{"name":"severe_predicted","type":"boolean","description":"true when score is ≥3 (Blamey 1984 predicted severe). A published threshold, not a diagnosis."},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Blamey et al. Gut 1984 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age_gt_55":"false","albumin_lt_32":"false","calcium_lt_2":"false","glucose_gt_10":"false","ldh_gt_600":"false","pao2_lt_60":"false","urea_gt_16":"false","wbc_gt_15":"false"},{"age_gt_55":"false","albumin_lt_32":"false","calcium_lt_2":"false","glucose_gt_10":"false","ldh_gt_600":"false","pao2_lt_60":"false","urea_gt_16":"false","wbc_gt_15":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/glasgow-imrie","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/glasgow-imrie?age_gt_55=false&wbc_gt_15=false&glucose_gt_10=false&urea_gt_16=false&pao2_lt_60=false&calcium_lt_2=false&albumin_lt_32=false&ldh_gt_600=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/glasgow-imrie","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/haps","description":"HAPS (Lankisch 2009). Harmless iff rebound tenderness and/or guarding is absent, hematocrit is normal, and serum creatinine is normal. The caller assigns each flag as already determined. magent does not examine the abdomen and does not measure hematocrit or creatinine. No millimetre or sex lab cutoffs. Not a medical device, not a diagnosis, and not a discharge order.","parameters":[{"in":"query","name":"rebound_or_guarding","type":"boolean","description":"Rebound tenderness and/or guarding. true means present and the harmless criterion fails. true or false as assigned by the caller. magent does not examine the abdomen.","required":true,"example":"false"},{"in":"query","name":"hematocrit_normal","type":"boolean","description":"Hematocrit is normal as assigned by the caller. true means normal and the harmless criterion holds; false means not normal. magent does not measure hematocrit and does not apply a millimetre or sex cutoff.","required":true,"example":"true"},{"in":"query","name":"creatinine_normal","type":"boolean","description":"Serum creatinine is normal as assigned by the caller. true means normal and the harmless criterion holds; false means not normal. magent does not measure creatinine and does not apply a millimetre or sex cutoff.","required":true,"example":"true"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/haps","citation":{"authors":"Lankisch PG, Weber-Dany B, Hebel K, Maisonneuve P, Lowenfels AB","doi":"10.1016/j.cgh.2009.02.020","id":"lankisch-2009","pmid":"19245846","source":"Clin Gastroenterol Hepatol. 2009;7(6):702-705","title":"The harmless acute pancreatitis score: a clinical algorithm for rapid initial stratification of nonsevere disease","url":"https://doi.org/10.1016/j.cgh.2009.02.020"},"formula_expression":"harmless iff no rebound tenderness and/or guarding and normal hematocrit and normal serum creatinine","purpose":"Apply the Lankisch 2009 harmless acute pancreatitis score and return whether the three published criteria all hold (haps_harmless).","markdown_url":"https://magentlab.com/docs/haps.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"haps"},{"name":"formula_expression","type":"string","description":"Lankisch 2009: no rebound/guarding and normal hematocrit and normal creatinine"},{"name":"haps_harmless","type":"boolean","description":"true only when all three harmless conditions hold. Not a diagnosis and not a discharge order."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met; met is true when that HAPS harmless condition holds"},{"name":"citation","type":"object","description":"Lankisch 2009 Clin Gastroenterol Hepatol citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"creatinine_normal":"true","hematocrit_normal":"true","rebound_or_guarding":"false"},{"creatinine_normal":"true","hematocrit_normal":"true","rebound_or_guarding":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/haps","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/haps?rebound_or_guarding=false&hematocrit_normal=true&creatinine_normal=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/haps","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/forrest","description":"Forrest 1974 endoscopic ulcer class as assigned by the caller: ia active spurting haemorrhage, ib active oozing, iia non-bleeding visible vessel, iib adherent clot, iic flat pigmented haematin / coffee-ground base, iii clean ulcer base. Returns the canonical class and 1974 lesion description. magent does not interpret endoscopy images or invent rebleeding percentages. Not a medical device.","parameters":[{"in":"query","name":"forrest","type":"string","description":"Forrest 1974 endoscopic lesion class as assigned by the caller: ia (active spurting hemorrhage), ib (active oozing hemorrhage), iia (non-bleeding visible vessel), iib (adherent clot), iic (flat pigmented haematin / coffee-ground base), or iii (clean ulcer base / no signs of recent hemorrhage). Case-insensitive. magent does not interpret endoscopy images.","required":true,"example":"iii"}],"errors":[{"code":"invalid_forrest","message":"forrest must be ia, ib, iia, iib, iic, or iii (Forrest 1974). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/forrest","citation":{"authors":"Forrest JA, Finlayson ND, Shearman DJ","doi":"10.1016/s0140-6736(74)91770-x","id":"forrest-1974","pmid":"4136718","source":"Lancet. 1974;2(7877):394-397","title":"Endoscopy in gastrointestinal bleeding","url":"https://doi.org/10.1016/s0140-6736(74)91770-x"},"formula_expression":"forrest in {ia, ib, iia, iib, iic, iii} as assigned by the caller (Forrest 1974); Ia active spurting, Ib active oozing, IIa non-bleeding visible vessel, IIb adherent clot, IIc flat pigmented haematin / coffee-ground base, III clean ulcer base","purpose":"Return the Forrest 1974 endoscopic lesion class (ia, ib, iia, iib, iic, or iii) and published description from a caller-assigned token.","markdown_url":"https://magentlab.com/docs/forrest.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"forrest"},{"name":"formula_expression","type":"string","description":"Published Forrest 1974 class rule"},{"name":"forrest","type":"string","description":"Canonical lowercase class: ia, ib, iia, iib, iic, or iii"},{"name":"description","type":"string","description":"1974 lesion wording for that class"},{"name":"criteria","type":"array","description":"Per-class rows with factor (ia, ib, iia, iib, iic, iii) and met; exactly one is met"},{"name":"citation","type":"object","description":"Forrest 1974 Lancet citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"forrest":"iii"},{"forrest":"iii"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/forrest","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/forrest?forrest=iii","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/forrest","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/fistula-risk","description":"Callery 2013 Fistula Risk Score after pancreatoduodenectomy: gland texture firm 0 / soft 2; pathology PDAC or pancreatitis 0 / other (ampullary, duodenal, cystic, islet cell) 1; duct mm ≥5 0, ≥4 1, ≥3 2, ≥2 3, else 4; EBL mL ≤400 0, 401–700 1, 701–1000 2, >1000 3. Max 10. Bands negligible 0, low 1–2, intermediate 3–6, high 7–10. magent does not palpate the gland or measure EBL. Not a CR-POPF diagnosis, not an ISGPS grade, not Ranson or BISAP. Not a medical device.","parameters":[{"in":"query","name":"gland_texture","type":"string","enum":["firm","soft"],"description":"Caller-assigned pancreatic gland texture at pancreatoduodenectomy (Callery 2013). firm or soft. firm scores 0; soft scores 2. magent does not palpate the gland.","required":true,"example":"firm"},{"in":"query","name":"pathology","type":"string","enum":["pdac_or_pancreatitis","other"],"description":"Caller-assigned pathology (Callery 2013). pdac_or_pancreatitis (pancreatic ductal adenocarcinoma or pancreatitis) scores 0. other (ampullary, duodenal, cystic, or islet cell) scores 1.","required":true,"example":"pdac_or_pancreatitis"},{"in":"query","name":"duct_mm","type":"number","description":"Caller-assigned pancreatic duct diameter in mm, number 0.5–20 (Callery 2013 integer-mm table). ≥5 scores 0; ≥4 scores 1; ≥3 scores 2; ≥2 scores 3; else 4 (so 4.0–4.999 scores 1; 1.5 and ≤1 score 4). magent does not measure the duct.","required":true,"example":"5"},{"in":"query","name":"ebl_ml","type":"number","description":"Caller-assigned estimated blood loss in mL, number 0–10000 (Callery 2013). ≤400 scores 0; 401–700 scores 1; 701–1000 scores 2; >1000 scores 3. magent does not measure EBL.","required":true,"example":"300"}],"errors":[{"code":"invalid_fistula_risk","message":"gland_texture must be firm or soft, pathology pdac_or_pancreatitis or other, duct_mm a number 0.5-20, and ebl_ml a number 0-10000 (Callery 2013 Fistula Risk Score). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/fistula-risk","citation":{"authors":"Callery MP, Pratt WB, Kent TS, Chaikof EL, Vollmer CM","doi":"10.1016/j.jamcollsurg.2012.09.002","id":"callery-2013","pmid":"23122535","source":"J Am Coll Surg. 2013;216(1):1-14","title":"A prospectively validated clinical risk score accurately predicts pancreatic fistula after pancreatoduodenectomy.","url":"https://doi.org/10.1016/j.jamcollsurg.2012.09.002"},"formula_expression":"FRS = gland_texture (firm 0, soft 2) + pathology (pdac_or_pancreatitis 0, other 1) + duct_mm (>=5 0, >=4 1, >=3 2, >=2 3, else 4) + ebl_ml (<=400 0, <=700 1, <=1000 2, else 3); Callery 2013; max 10; negligible 0, low 1-2, intermediate 3-6, high 7-10","purpose":"Sum the Callery 2013 Fistula Risk Score from caller-assigned gland texture, pathology, pancreatic duct diameter, and estimated blood loss, and return the published 0–10 total and fistula band.","markdown_url":"https://magentlab.com/docs/fistula-risk.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"fistula_risk"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Callery 2013 Fistula Risk Score 0-10"},{"name":"max_score","type":"integer","description":"10"},{"name":"fistula_band","type":"string","description":"Callery 2013 band: negligible (0), low (1-2), intermediate (3-6), or high (7-10). Not a CR-POPF diagnosis and not an ISGPS grade."},{"name":"gland_texture","type":"string","description":"Caller-assigned gland texture used (firm or soft)"},{"name":"pathology","type":"string","description":"Caller-assigned pathology used (pdac_or_pancreatitis or other)"},{"name":"duct_mm","type":"number","description":"Pancreatic duct diameter in mm used"},{"name":"ebl_ml","type":"number","description":"Estimated blood loss in mL used"},{"name":"components","type":"array","description":"Per-factor Callery 2013 points"},{"name":"citation","type":"object","description":"Callery et al. J Am Coll Surg 2013 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"duct_mm":"5","ebl_ml":"300","gland_texture":"firm","pathology":"pdac_or_pancreatitis"},{"duct_mm":"5","ebl_ml":"300","gland_texture":"firm","pathology":"pdac_or_pancreatitis"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/fistula-risk","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/fistula-risk?gland_texture=firm&pathology=pdac_or_pancreatitis&duct_mm=5&ebl_ml=300","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/fistula-risk","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/la-grading","description":"Lundell 1999 Table 1 Los Angeles classification. Caller-assigned flags. none if no mucosal break (not minimal changes); D if break(s) involve ≥75% of circumference; C if continuous between fold tops but <75%; B if longest break >5 mm not between fold tops; A if ≤5 mm not between fold tops. magent does not interpret images. Not Savary-Miller, GERD diagnosis, Barrett/stricture, or 1994 LA (D was fully circumferential). Not a medical device.","parameters":[{"in":"query","name":"mucosal_break","type":"boolean","description":"One or more mucosal breaks present, as assigned by the caller. Lundell 1999 defines a mucosal break as an area of slough or erythema with a discrete line of demarcation from adjacent more normal-looking mucosa. true or false. If false, la_grade is none (no LA A-D; not minimal changes). magent does not interpret endoscopy images.","required":true,"example":"false"},{"in":"query","name":"longest_break_gt_5_mm","type":"boolean","description":"Longest mucosal break more than 5 mm long, as assigned by the caller (Lundell 1999 Table 1 grade B vs A). true or false. Required even when mucosal_break is false (does not change none). magent does not measure lesions.","required":true,"example":"false"},{"in":"query","name":"continuous_between_folds","type":"boolean","description":"A mucosal break is continuous between the tops of two or more mucosal folds, as assigned by the caller (Lundell 1999 Table 1 grade C). true or false. Required even when mucosal_break is false (does not change none). magent does not interpret endoscopy images.","required":true,"example":"false"},{"in":"query","name":"circumference_ge_75_percent","type":"boolean","description":"Mucosal break(s) involve at least 75% of the oesophageal circumference, as assigned by the caller (Lundell 1999 Table 1 grade D; the 1999 revision, not the 1994 fully circumferential proposal). true or false. Required even when mucosal_break is false (does not change none). magent does not interpret endoscopy images.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/la-grading","citation":{"authors":"Lundell LR, Dent J, Bennett JR, Blum AL, Armstrong D, Galmiche JP, Johnson F, Hongo M, Richter JE, Spechler SJ, Tytgat GN, Wallin L","doi":"10.1136/gut.45.2.172","id":"lundell-1999","pmid":"10403727","source":"Gut. 1999;45(2):172-180","title":"Endoscopic assessment of oesophagitis: clinical and functional correlates and further validation of the Los Angeles classification","url":"https://doi.org/10.1136/gut.45.2.172"},"formula_expression":"la_grade is none if mucosal_break is false (no LA A-D; not minimal changes); else D if circumference_ge_75_percent (mucosal break(s) involve at least 75% of the oesophageal circumference); else C if continuous_between_folds (continuous between the tops of two or more mucosal folds but less than 75% of circumference); else B if longest_break_gt_5_mm (one or more breaks more than 5 mm that do not extend between the tops of two mucosal folds); else A (one or more breaks no longer than 5 mm that do not extend between the tops of two mucosal folds) (Lundell 1999 Table 1 Los Angeles classification)","purpose":"Apply Lundell 1999 Table 1 Los Angeles classification of oesophagitis and return la_grade (none, A, B, C, or D) from four caller-assigned endoscopic flags.","markdown_url":"https://magentlab.com/docs/la-grading.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"la_grading"},{"name":"formula_expression","type":"string","description":"Published Lundell 1999 Table 1 Los Angeles classification rule"},{"name":"la_grade","type":"string","description":"none, A, B, C, or D. none if no mucosal break; D if break(s) involve at least 75% of circumference; C if continuous between fold tops but less than 75%; B if longest break more than 5 mm and not between fold tops; A if break(s) no longer than 5 mm and not between fold tops. Not a GERD diagnosis."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met for the four caller-assigned flags and exclusive grades none, A, B, C, D; exactly one grade row is met"},{"name":"citation","type":"object","description":"Lundell 1999 Gut citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"circumference_ge_75_percent":"false","continuous_between_folds":"false","longest_break_gt_5_mm":"false","mucosal_break":"false"},{"circumference_ge_75_percent":"false","continuous_between_folds":"false","longest_break_gt_5_mm":"false","mucosal_break":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/la-grading","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/la-grading?mucosal_break=false&longest_break_gt_5_mm=false&continuous_between_folds=false&circumference_ge_75_percent=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/la-grading","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/prague","description":"Sharma 2006 Prague C and M. Caller-assigned circumferential c_cm and maximal m_cm (integers 0-20 cm above the gastroesophageal junction). Returns C{c}M{m} (for example C2M5). M must be ≥ C. C=0 is tongues only (no circumferential Barrett). Not a Barrett diagnosis; histology is required. Not Los Angeles oesophagitis grading. magent does not perform endoscopy. Not a medical device.","parameters":[{"in":"query","name":"c_cm","type":"integer","description":"Caller-assigned circumferential extent of visualized Barrett mucosa in centimetres above the gastroesophageal junction (integer 0-20). C=0 is allowed (no circumferential Barrett; tongues only). magent does not perform endoscopy.","required":true,"example":"0"},{"in":"query","name":"m_cm","type":"integer","description":"Caller-assigned maximal extent of visualized Barrett mucosa in centimetres above the gastroesophageal junction (integer 0-20). Must be greater than or equal to c_cm. magent does not perform endoscopy.","required":true,"example":"0"}],"errors":[{"code":"invalid_prague","message":"c_cm and m_cm must be integers from 0 to 20 and m_cm must be greater than or equal to c_cm (Sharma 2006 Prague C and M). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/prague","citation":{"authors":"Sharma P, Dent J, Armstrong D, et al.","doi":"10.1053/j.gastro.2006.08.032","id":"sharma-2006","pmid":"17101315","source":"Gastroenterology. 2006;131(5):1392-1399","title":"The development and validation of an endoscopic grading system for Barrett's esophagus: the Prague C & M criteria.","url":"https://doi.org/10.1053/j.gastro.2006.08.032"},"formula_expression":"prague is C{c_cm}M{m_cm} (no spaces) from caller-assigned circumferential extent c_cm (cm of visualized Barrett above the gastroesophageal junction, integer 0-20) and maximal extent m_cm (cm above GEJ, integer 0-20); m_cm must be >= c_cm; C=0 is no circumferential Barrett (tongues only); Sharma 2006 Prague C and M; not a Barrett diagnosis (histology required); magent does not perform endoscopy","purpose":"Format Sharma 2006 Prague C and M criteria as C{c}M{m} from caller-assigned circumferential (c_cm) and maximal (m_cm) extent of visualized Barrett mucosa in centimetres above the gastroesophageal junction.","markdown_url":"https://magentlab.com/docs/prague.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"prague"},{"name":"formula_expression","type":"string","description":"Published Sharma 2006 Prague C and M label format"},{"name":"prague","type":"string","description":"C{c_cm}M{m_cm} label with no spaces, for example C2M5"},{"name":"c_cm","type":"integer","description":"Caller-assigned circumferential extent in cm (0-20)"},{"name":"m_cm","type":"integer","description":"Caller-assigned maximal extent in cm (0-20); >= c_cm"},{"name":"citation","type":"object","description":"Sharma 2006 Gastroenterology citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"c_cm":"0","m_cm":"0"},{"c_cm":"0","m_cm":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/prague","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/prague?c_cm=0&m_cm=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/prague","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/pucai","description":"Turner 2007 pediatric ulcerative colitis activity index (PUCAI): six caller-assigned item points (abdominal pain, rectal bleeding, stool consistency of most stools, stools per 24 hours, nocturnal stools, activity level) using that paper's published integers. magent sums only (max 85) and returns the published activity band (<10 remission, 10-34 mild, 35-64 moderate, ≥65 severe). magent does not examine the child. Not a diagnosis and not the adult Mayo score.","parameters":[{"in":"query","name":"abdominal_pain","type":"integer","description":"Caller-assigned Turner 2007 PUCAI abdominal pain points (integer 0, 5, or 10): 0 no pain; 5 pain can be ignored; 10 pain cannot be ignored. magent does not examine the child.","required":true,"example":"0"},{"in":"query","name":"rectal_bleeding","type":"integer","description":"Caller-assigned Turner 2007 PUCAI rectal bleeding points (integer 0, 10, 20, or 30): 0 none; 10 small amount only, in less than 50% of stools; 20 small amount with most stools; 30 large amount (>50% of the stool content). magent does not examine the child.","required":true,"example":"0"},{"in":"query","name":"stool_consistency_of_most","type":"integer","description":"Caller-assigned Turner 2007 PUCAI stool consistency of most stools points (integer 0, 5, or 10): 0 formed; 5 partially formed; 10 completely unformed. magent does not examine the child.","required":true,"example":"0"},{"in":"query","name":"stools_per_24h","type":"integer","description":"Caller-assigned Turner 2007 PUCAI number of stools per 24 hours points (integer 0, 5, 10, or 15): 0 for 0-2 stools; 5 for 3-5; 10 for 6-8; 15 for >8. magent does not examine the child.","required":true,"example":"0"},{"in":"query","name":"nocturnal_stools","type":"integer","description":"Caller-assigned Turner 2007 PUCAI nocturnal stools points (integer 0 or 10): 0 no; 10 yes (any episode causing wakening). magent does not examine the child.","required":true,"example":"0"},{"in":"query","name":"activity_level","type":"integer","description":"Caller-assigned Turner 2007 PUCAI activity level points (integer 0, 5, or 10): 0 no limitation of activity; 5 occasional limitation of activity; 10 severe restricted activity. magent does not examine the child.","required":true,"example":"0"}],"errors":[{"code":"invalid_pucai","message":"each PUCAI item must be a published point value from Turner 2007. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/pucai","citation":{"authors":"Turner D, Otley AR, Mack D, et al.","doi":"10.1053/j.gastro.2007.05.029","id":"turner-2007","pmid":"17681163","source":"Gastroenterology. 2007;133(2):423-432","title":"Development, validation, and evaluation of a pediatric ulcerative colitis activity index: a prospective multicenter study","url":"https://doi.org/10.1053/j.gastro.2007.05.029"},"formula_expression":"PUCAI = abdominal_pain + rectal_bleeding + stool_consistency_of_most + stools_per_24h + nocturnal_stools + activity_level; Turner 2007 caller-assigned item points; max 85; <10 remission, 10-34 mild, 35-64 moderate, ≥65 severe","purpose":"Sum six caller-assigned Turner 2007 PUCAI item points and return the published total (max 85) with activity band.","markdown_url":"https://magentlab.com/docs/pucai.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"pucai"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"PUCAI points 0-85"},{"name":"max_score","type":"integer","description":"Always 85"},{"name":"activity_band","type":"string","description":"Turner 2007 band: remission (<10), mild (10-34), moderate (35-64), or severe (≥65). Score 10 is mild; 34 is mild; 35 is moderate; 64 is moderate; 65 is severe. Not a diagnosis and not an adult Mayo cutoff."},{"name":"abdominal_pain","type":"integer","description":"Caller-assigned abdominal pain points 0, 5, or 10"},{"name":"rectal_bleeding","type":"integer","description":"Caller-assigned rectal bleeding points 0, 10, 20, or 30"},{"name":"stool_consistency_of_most","type":"integer","description":"Caller-assigned stool consistency of most stools points 0, 5, or 10"},{"name":"stools_per_24h","type":"integer","description":"Caller-assigned stools per 24 hours points 0, 5, 10, or 15"},{"name":"nocturnal_stools","type":"integer","description":"Caller-assigned nocturnal stools points 0 or 10"},{"name":"activity_level","type":"integer","description":"Caller-assigned activity level points 0, 5, or 10"},{"name":"components","type":"array","description":"Per-item caller-assigned points"},{"name":"citation","type":"object","description":"Turner et al. Gastroenterology 2007 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"abdominal_pain":"0","activity_level":"0","nocturnal_stools":"0","rectal_bleeding":"0","stool_consistency_of_most":"0","stools_per_24h":"0"},{"abdominal_pain":"0","activity_level":"0","nocturnal_stools":"0","rectal_bleeding":"0","stool_consistency_of_most":"0","stools_per_24h":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/pucai","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/pucai?abdominal_pain=0&rectal_bleeding=0&stool_consistency_of_most=0&stools_per_24h=0&nocturnal_stools=0&activity_level=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/pucai","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/harvey-bradshaw","description":"Harvey and Bradshaw 1980 simple Crohn's-disease activity index (one-day; items 1-3 previous day). Well-being 0-4, abdominal pain 0-3, liquid stools (1 point each; magent clamp 0-30), abdominal mass 0-3, plus 1 per listed complication (arthralgia, uveitis, erythema nodosum, aphthous ulcers, pyoderma gangrenosum, anal fissure, new fistula, abscess). magent sums only (max 48) and does not return later remission cutoffs. Not a Crohn's diagnosis or Best 1976 CDAI. magent does not examine the patient.","parameters":[{"in":"query","name":"well_being","type":"integer","description":"Caller-assigned Harvey 1980 general well-being for the previous day (integer 0-4): 0 very well; 1 slightly below par; 2 poor; 3 very poor; 4 terrible. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"abdominal_pain","type":"integer","description":"Caller-assigned Harvey 1980 abdominal pain for the previous day (integer 0-3): 0 none; 1 mild; 2 moderate; 3 severe. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"liquid_stools","type":"integer","description":"Count of liquid stools that day (Harvey 1980; 1 point per stool). Integer 0-30 is a magent clamp, not a published maximum. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"abdominal_mass","type":"integer","description":"Caller-assigned Harvey 1980 abdominal mass (integer 0-3): 0 none; 1 dubious; 2 definite; 3 definite and tender. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"arthralgia","type":"boolean","description":"Arthralgia present (Harvey 1980 complications as used for the simple index). true or false. 1 point if true. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"uveitis","type":"boolean","description":"Uveitis present (Harvey 1980 complications as used for the simple index). true or false. 1 point if true. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"erythema_nodosum","type":"boolean","description":"Erythema nodosum present (Harvey 1980 complications as used for the simple index). true or false. 1 point if true. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"aphthous_ulcers","type":"boolean","description":"Aphthous ulcers present (Harvey 1980 complications as used for the simple index). true or false. 1 point if true. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"pyoderma_gangrenosum","type":"boolean","description":"Pyoderma gangrenosum present (Harvey 1980 complications as used for the simple index). true or false. 1 point if true. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"anal_fissure","type":"boolean","description":"Anal fissure present (Harvey 1980 complications as used for the simple index). true or false. 1 point if true. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"new_fistula","type":"boolean","description":"New fistula present (Harvey 1980 complications as used for the simple index). true or false. 1 point if true. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"abscess","type":"boolean","description":"Abscess present (Harvey 1980 complications as used for the simple index). true or false. 1 point if true. magent does not examine the patient.","required":true,"example":"false"}],"errors":[{"code":"invalid_hbi","message":"well_being 0-4, abdominal_pain 0-3, and abdominal_mass 0-3 (Harvey 1980). Returned before settlement; you are not charged.","status":400},{"code":"invalid_liquid_stools","message":"liquid_stools must be an integer from 0 to 30 (Harvey 1980 count; magent clamp). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/harvey-bradshaw","citation":{"authors":"Harvey RF, Bradshaw JM","doi":"10.1016/s0140-6736(80)92767-1","id":"harvey-bradshaw-1980","pmid":"6102236","source":"Lancet. 1980;1(8167):514","title":"A simple index of Crohn's-disease activity","url":"https://doi.org/10.1016/s0140-6736(80)92767-1"},"formula_expression":"HBI = well_being + abdominal_pain + liquid_stools + abdominal_mass + 1 per listed complication; Harvey 1980 previous-day items; magent max 48 (liquid_stools clamp 0-30)","purpose":"Sum Harvey 1980 simple-index items (previous-day well-being, abdominal pain, liquid stools, abdominal mass, and one point per listed complication) and return the total. Does not return later remission or activity bands.","markdown_url":"https://magentlab.com/docs/harvey-bradshaw.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"harvey_bradshaw"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Harvey 1980 simple-index points; magent clamp 0-48"},{"name":"max_score","type":"integer","description":"Always 48 (4+3+30+3+8 magent clamp). Not a published stool maximum."},{"name":"well_being","type":"integer","description":"Caller-assigned well-being 0-4"},{"name":"abdominal_pain","type":"integer","description":"Caller-assigned abdominal pain 0-3"},{"name":"liquid_stools","type":"integer","description":"Liquid stool count that day (magent clamp 0-30)"},{"name":"abdominal_mass","type":"integer","description":"Caller-assigned abdominal mass 0-3"},{"name":"arthralgia","type":"boolean","description":"Arthralgia flag; 1 point if true"},{"name":"uveitis","type":"boolean","description":"Uveitis flag; 1 point if true"},{"name":"erythema_nodosum","type":"boolean","description":"Erythema nodosum flag; 1 point if true"},{"name":"aphthous_ulcers","type":"boolean","description":"Aphthous ulcers flag; 1 point if true"},{"name":"pyoderma_gangrenosum","type":"boolean","description":"Pyoderma gangrenosum flag; 1 point if true"},{"name":"anal_fissure","type":"boolean","description":"Anal fissure flag; 1 point if true"},{"name":"new_fistula","type":"boolean","description":"New fistula flag; 1 point if true"},{"name":"abscess","type":"boolean","description":"Abscess flag; 1 point if true"},{"name":"components","type":"array","description":"Per-item points"},{"name":"citation","type":"object","description":"Harvey and Bradshaw Lancet 1980 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"abdominal_mass":"0","abdominal_pain":"0","abscess":"false","anal_fissure":"false","aphthous_ulcers":"false","arthralgia":"false","erythema_nodosum":"false","liquid_stools":"0","new_fistula":"false","pyoderma_gangrenosum":"false","uveitis":"false","well_being":"0"},{"abdominal_mass":"0","abdominal_pain":"0","abscess":"false","anal_fissure":"false","aphthous_ulcers":"false","arthralgia":"false","erythema_nodosum":"false","liquid_stools":"0","new_fistula":"false","pyoderma_gangrenosum":"false","uveitis":"false","well_being":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/harvey-bradshaw","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/harvey-bradshaw?well_being=0&abdominal_pain=0&liquid_stools=0&abdominal_mass=0&arthralgia=false&uveitis=false&erythema_nodosum=false&aphthous_ulcers=false&pyoderma_gangrenosum=false&anal_fissure=false&new_fistula=false&abscess=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/harvey-bradshaw","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/mayo-uc","description":"Schroeder 1987 ulcerative colitis disease-activity index (Mayo DAI): four caller-assigned integers 0-3 (stool frequency, rectal bleeding, endoscopy, physician global). magent sums only (max 12) and does not return later remission or activity-band cutoffs. magent does not count stools, examine the patient, or perform endoscopy. Not a diagnosis and not the Mayo SPN pulmonary-nodule model.","parameters":[{"in":"query","name":"stool_frequency","type":"integer","description":"Caller-assigned Schroeder 1987 stool frequency (integer 0-3): 0 normal number of stools for this patient; 1 = 1-2 stools/day more than normal; 2 = 3-4 more; 3 = 5 or more more than normal. magent does not count stools.","required":true,"example":"0"},{"in":"query","name":"rectal_bleeding","type":"integer","description":"Caller-assigned Schroeder 1987 rectal bleeding (integer 0-3): 0 none; 1 streaks of blood with stool less than half the time; 2 obvious blood with stool most of the time; 3 blood alone passed. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"endoscopy","type":"integer","description":"Caller-assigned Schroeder 1987 endoscopy / flexible proctosigmoidoscopy (integer 0-3): 0 normal or inactive; 1 mild (erythema, decreased vascular pattern, mild friability); 2 moderate (marked erythema, absent vascular pattern, friability, erosions); 3 severe (spontaneous bleeding, ulceration). magent does not perform endoscopy.","required":true,"example":"0"},{"in":"query","name":"physician_global","type":"integer","description":"Caller-assigned Schroeder 1987 physician's global assessment (integer 0-3): 0 normal; 1 mild; 2 moderate; 3 severe. magent does not examine the patient.","required":true,"example":"0"}],"errors":[{"code":"invalid_mayo_item","message":"stool_frequency, rectal_bleeding, endoscopy, and physician_global must each be an integer 0-3 (Schroeder 1987). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/mayo-uc","citation":{"authors":"Schroeder KW, Tremaine WJ, Ilstrup DM","doi":"10.1056/NEJM198712243172603","id":"schroeder-1987","pmid":"3317057","source":"N Engl J Med. 1987;317(26):1625-1629","title":"Coated oral 5-aminosalicylic acid therapy for mildly to moderately active ulcerative colitis. A randomized study","url":"https://doi.org/10.1056/NEJM198712243172603"},"formula_expression":"Mayo DAI = stool_frequency + rectal_bleeding + endoscopy + physician_global; Schroeder 1987 caller-assigned integers 0-3 each; max 12; no published total-score activity bands","purpose":"Sum four caller-assigned Schroeder 1987 ulcerative colitis disease-activity index items (each integer 0-3) and return the total (max 12). Does not return later remission or activity bands.","markdown_url":"https://magentlab.com/docs/mayo-uc.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"mayo_uc"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Schroeder 1987 disease-activity index points 0-12"},{"name":"max_score","type":"integer","description":"Always 12"},{"name":"stool_frequency","type":"integer","description":"Caller-assigned stool frequency 0-3"},{"name":"rectal_bleeding","type":"integer","description":"Caller-assigned rectal bleeding 0-3"},{"name":"endoscopy","type":"integer","description":"Caller-assigned endoscopy 0-3"},{"name":"physician_global","type":"integer","description":"Caller-assigned physician global 0-3"},{"name":"components","type":"array","description":"Per-item caller-assigned points"},{"name":"citation","type":"object","description":"Schroeder et al. N Engl J Med 1987 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"endoscopy":"0","physician_global":"0","rectal_bleeding":"0","stool_frequency":"0"},{"endoscopy":"0","physician_global":"0","rectal_bleeding":"0","stool_frequency":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/mayo-uc","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/mayo-uc?stool_frequency=0&rectal_bleeding=0&endoscopy=0&physician_global=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/mayo-uc","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/irae-colitis","description":"Brahmer 2018 ASCO Table 2.1 irAE colitis grade from stools_over_baseline (0-40) and four caller-assigned flags. First-match: grade 4 if life_threatening; else 3 if stools >= 7 or incontinence or hospitalization_indicated or limiting_self_care; else 2 if stools >= 4; else 1. Returns icpi_action continue, hold, hold_consider_discontinue_ctla4, or permanently_discontinue. Ostomy-output bands not implemented. magent does not count stools. Not a medical device, not a diagnosis, not a steroid dose.","parameters":[{"in":"query","name":"stools_over_baseline","type":"integer","description":"Increase of stools per day over baseline as assigned by the caller (integer 0-40; Brahmer 2018 Table 2.1 CTCAE diarrhea). Fewer than four is grade 1; four to six is grade 2; seven or more is grade 3 unless life_threatening is true. Ostomy-output increase is not an input. magent does not count stools.","required":true,"example":"2"},{"in":"query","name":"incontinence","type":"boolean","description":"Incontinence as assigned by the caller (Brahmer 2018 Table 2.1 grade 3). true or false. When true and life_threatening is false, grade is 3. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"hospitalization_indicated","type":"boolean","description":"Hospitalization indicated as assigned by the caller (Brahmer 2018 Table 2.1 grade 3). true or false. When true and life_threatening is false, grade is 3. magent does not admit the patient.","required":true,"example":"false"},{"in":"query","name":"limiting_self_care","type":"boolean","description":"Limiting self-care ADL as assigned by the caller (Brahmer 2018 Table 2.1 grade 3). true or false. When true and life_threatening is false, grade is 3. magent does not assess ADL.","required":true,"example":"false"},{"in":"query","name":"life_threatening","type":"boolean","description":"Life-threatening consequences with urgent intervention indicated, as assigned by the caller (Brahmer 2018 Table 2.1 grade 4). true or false. When true, grade is 4 regardless of stool count. magent does not examine the patient.","required":true,"example":"false"}],"errors":[{"code":"invalid_stools_over_baseline","message":"stools_over_baseline must be an integer from 0 to 40 (Brahmer 2018 CTCAE diarrhea stools per day over baseline). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/irae-colitis","citation":{"authors":"Brahmer JR, Lacchetti C, Schneider BJ, Atkins MB, Brassil KJ, Caterino JM, Chau I, Ernstoff MS, Gardner JM, Ginex P, Hallmeyer S, Holter Chakrabarty J, Leighl NB, Mammen JS, McDermott DF, Naing A, Nastoupil LJ, Phillips T, Porter LD, Puzanov I, Reichner CA, Santomasso BD, Seigel C, Spira A, Suarez-Almazor ME, Wang Y, Weber JS, Wolchok JD, Thompson JA","doi":"10.1200/JCO.2017.77.6385","id":"brahmer-2018","pmid":"29442540","source":"J Clin Oncol. 2018;36(17):1714-1768","title":"Management of Immune-Related Adverse Events in Patients Treated With Immune Checkpoint Inhibitor Therapy: American Society of Clinical Oncology Clinical Practice Guideline","url":"https://doi.org/10.1200/JCO.2017.77.6385"},"formula_expression":"irae colitis first-match (Brahmer 2018 Table 2.1 CTCAE diarrhea): grade 4 if life_threatening; else grade 3 if stools_over_baseline >= 7 or incontinence or hospitalization_indicated or limiting_self_care; else grade 2 if stools_over_baseline >= 4; else grade 1. icpi_action continue (1), hold (2), hold_consider_discontinue_ctla4 (3), permanently_discontinue (4). Ostomy-output bands not implemented. magent does not count stools. Not a diagnosis. Not a steroid dose","purpose":"Apply Brahmer 2018 ASCO Table 2.1 immune-related colitis grading (CTCAE diarrhea as used in the table) and return grade 1-4 plus icpi_action from stools_over_baseline and four caller-assigned flags.","markdown_url":"https://magentlab.com/docs/irae-colitis.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"irae_colitis"},{"name":"formula_expression","type":"string","description":"Brahmer 2018 Table 2.1 first-match colitis grade and icpi_action rule"},{"name":"grade","type":"integer","description":"Colitis grade 1, 2, 3, or 4 (Brahmer 2018 Table 2.1 CTCAE diarrhea as used in the table). First-match worst-wins. Not a diagnosis."},{"name":"icpi_action","type":"string","description":"continue (grade 1), hold (grade 2), hold_consider_discontinue_ctla4 (grade 3), or permanently_discontinue (grade 4). Not a steroid dose."},{"name":"stools_over_baseline","type":"integer","description":"Echo of the caller-assigned stool increase over baseline (0-40)"},{"name":"incontinence","type":"boolean","description":"Echo of caller-assigned incontinence (grade 3 when true)"},{"name":"hospitalization_indicated","type":"boolean","description":"Echo of caller-assigned hospitalization indicated (grade 3 when true)"},{"name":"limiting_self_care","type":"boolean","description":"Echo of caller-assigned limiting self-care ADL (grade 3 when true)"},{"name":"life_threatening","type":"boolean","description":"Echo of caller-assigned life-threatening flag (grade 4 when true)"},{"name":"criteria","type":"array","description":"Per-factor Tree rows with factor and met for life_threatening, stools_ge_7, incontinence, hospitalization_indicated, limiting_self_care, and stools_ge_4; stool rows include value"},{"name":"citation","type":"object","description":"Brahmer 2018 J Clin Oncol ASCO irAE guideline citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"hospitalization_indicated":"false","incontinence":"false","life_threatening":"false","limiting_self_care":"false","stools_over_baseline":"2"},{"hospitalization_indicated":"false","incontinence":"false","life_threatening":"false","limiting_self_care":"false","stools_over_baseline":"2"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/irae-colitis","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/irae-colitis?stools_over_baseline=2&incontinence=false&hospitalization_indicated=false&limiting_self_care=false&life_threatening=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/irae-colitis","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/uceis","description":"Travis 2013 UCEIS: caller-assigned vascular_pattern (normal 0, patchy 1, obliterated 2), bleeding (none 0, mucosal 1, luminal_mild 2, luminal_moderate_or_severe 3), erosions_ulcers (none 0, erosions 1, superficial_ulcer 2, deep_ulcer 3) at the worst-affected sigmoidoscopy segment. magent sums only (max 8; 2013 0-8 recode, not 2012 3-11) with no activity bands. magent does not perform endoscopy. Not Mayo DAI, MES, or Travis 1996 day-3. Not a diagnosis.","parameters":[{"in":"query","name":"vascular_pattern","type":"string","enum":["normal","patchy","obliterated"],"description":"Caller-assigned Travis 2013 UCEIS vascular pattern at the most severely affected flexible-sigmoidoscopy segment: normal (0; arborization of capillaries clearly defined, or blurring or patchy loss of capillary margins), patchy (1; patchy obliteration of vascular pattern), or obliterated (2; complete obliteration). Travis 2013 0-8 recode (normal 0, not Travis 2012 score 1). magent does not perform endoscopy.","required":true,"example":"normal"},{"in":"query","name":"bleeding","type":"string","enum":["none","mucosal","luminal_mild","luminal_moderate_or_severe"],"description":"Caller-assigned Travis 2013 UCEIS bleeding at the most severely affected segment, scored during insertion: none (0; no visible blood), mucosal (1; spots or streaks of coagulated blood on the mucosa ahead of the scope that can be washed away), luminal_mild (2; some free liquid blood in the lumen), or luminal_moderate_or_severe (3; frank blood in the lumen ahead of the endoscope, or visible oozing after washing, or oozing from hemorrhagic mucosa). magent does not perform endoscopy.","required":true,"example":"none"},{"in":"query","name":"erosions_ulcers","type":"string","enum":["none","erosions","superficial_ulcer","deep_ulcer"],"description":"Caller-assigned Travis 2013 UCEIS erosions and ulcers at the most severely affected segment: none (0; normal mucosa, no visible erosions or ulcers), erosions (1; tiny ≤5 mm white or yellow mucosal defects with a flat edge), superficial_ulcer (2; larger >5 mm discrete fibrin-covered superficial ulcers), or deep_ulcer (3; deeper excavated defects with a slightly raised edge). magent does not perform endoscopy.","required":true,"example":"none"}],"errors":[{"code":"invalid_uceis","message":"vascular_pattern must be normal, patchy, or obliterated; bleeding must be none, mucosal, luminal_mild, or luminal_moderate_or_severe; erosions_ulcers must be none, erosions, superficial_ulcer, or deep_ulcer (Travis 2013 UCEIS 0-8). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/uceis","citation":{"authors":"Travis SPL, Schnell D, Krzeski P, et al.","doi":"10.1053/j.gastro.2013.07.024","id":"travis-2013","pmid":"23891974","source":"Gastroenterology. 2013;145(5):987-995","title":"Reliability and Initial Validation of the Ulcerative Colitis Endoscopic Index of Severity.","url":"https://doi.org/10.1053/j.gastro.2013.07.024"},"formula_expression":"UCEIS = vascular_pattern (normal 0, patchy 1, obliterated 2) + bleeding (none 0, mucosal 1, luminal_mild 2, luminal_moderate_or_severe 3) + erosions_ulcers (none 0, erosions 1, superficial_ulcer 2, deep_ulcer 3); Travis 2013 0-8 recode (normal 0, not Travis 2012 3-11); most severely affected segment at flexible sigmoidoscopy; no published total-score activity bands","purpose":"Sum three caller-assigned Travis 2013 UCEIS descriptors (vascular_pattern 0-2, bleeding 0-3, erosions_ulcers 0-3) scored at the most severely affected flexible-sigmoidoscopy segment and return the total (max 8). Uses the 2013 0-8 recode (normal 0). Does not return activity bands.","markdown_url":"https://magentlab.com/docs/uceis.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"uceis"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Travis 2013 UCEIS points 0-8 (2013 recode; not Travis 2012 3-11)"},{"name":"max_score","type":"integer","description":"Always 8"},{"name":"vascular_pattern","type":"string","description":"Caller-assigned token: normal, patchy, or obliterated"},{"name":"bleeding","type":"string","description":"Caller-assigned token: none, mucosal, luminal_mild, or luminal_moderate_or_severe"},{"name":"erosions_ulcers","type":"string","description":"Caller-assigned token: none, erosions, superficial_ulcer, or deep_ulcer"},{"name":"components","type":"array","description":"Per-descriptor caller-assigned points"},{"name":"citation","type":"object","description":"Travis et al. Gastroenterology 2013 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"bleeding":"none","erosions_ulcers":"none","vascular_pattern":"normal"},{"bleeding":"none","erosions_ulcers":"none","vascular_pattern":"normal"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/uceis","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/uceis?vascular_pattern=normal&bleeding=none&erosions_ulcers=none","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/uceis","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/erefs","description":"Hirano 2013 modified EREFS: caller-assigned edema (absent 0, present 1), rings (none 0, mild 1, moderate 2, severe 3), exudates (none 0, mild_lt_10pct 1, severe_gt_10pct 2), furrows (absent 0, present 1; original 0-2 collapsed), stricture (absent 0, present 1). magent sums only (max 8; not later 0-9). No activity bands, inflammatory/fibrostenotic subscores, crepe-paper, or narrow-calibre. magent does not perform endoscopy. Not a diagnosis.","parameters":[{"in":"query","name":"edema","type":"string","enum":["absent","present"],"description":"Caller-assigned Hirano 2013 modified EREFS edema (oedema; loss of vascular markings): absent (0; vascular markings present) or present (1; decreased or absent vascular markings). magent does not perform endoscopy.","required":true,"example":"absent"},{"in":"query","name":"rings","type":"string","enum":["none","mild","moderate","severe"],"description":"Caller-assigned Hirano 2013 EREFS rings (fixed rings): none (0), mild (1; subtle circumferential ridges), moderate (2; distinct rings that a diagnostic adult endoscope still passes), or severe (3; cannot pass a diagnostic adult endoscope). magent does not perform endoscopy.","required":true,"example":"none"},{"in":"query","name":"exudates","type":"string","enum":["none","mild_lt_10pct","severe_gt_10pct"],"description":"Caller-assigned Hirano 2013 EREFS exudates (white plaques): none (0), mild_lt_10pct (1; lesions involving <10% of the oesophageal surface area), or severe_gt_10pct (2; lesions involving >10% of the oesophageal surface area). magent does not perform endoscopy.","required":true,"example":"none"},{"in":"query","name":"furrows","type":"string","enum":["absent","present"],"description":"Caller-assigned Hirano 2013 modified EREFS furrows (vertical lines): absent (0) or present (1). Original Hirano 2013 graded furrows 0-2 (none / mild without depth / severe with indentation); the modified good-agreement version collapses that to absent vs present. Not the later 0-9 expansion that restores furrows 0-2. magent does not perform endoscopy.","required":true,"example":"absent"},{"in":"query","name":"stricture","type":"string","enum":["absent","present"],"description":"Caller-assigned Hirano 2013 EREFS stricture: absent (0) or present (1). magent does not perform endoscopy.","required":true,"example":"absent"}],"errors":[{"code":"invalid_erefs","message":"edema must be absent or present; rings must be none, mild, moderate, or severe; exudates must be none, mild_lt_10pct, or severe_gt_10pct; furrows must be absent or present; stricture must be absent or present (Hirano 2013 modified EREFS). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/erefs","citation":{"authors":"Hirano I, Moy N, Heckman MG, Thomas CS, Gonsalves N, Achem SR","doi":"10.1136/gutjnl-2011-301817","id":"hirano-2013","pmid":"22619364","source":"Gut. 2013;62(4):489-495","title":"Endoscopic assessment of the oesophageal features of eosinophilic oesophagitis: validation of a novel classification and grading system.","url":"https://doi.org/10.1136/gutjnl-2011-301817"},"formula_expression":"EREFS = edema (absent 0, present 1; loss of vascular markings) + rings (none 0, mild 1, moderate 2, severe 3) + exudates (none 0, mild_lt_10pct 1, severe_gt_10pct 2) + furrows (absent 0, present 1; modified, original 0-2 collapsed) + stricture (absent 0, present 1); Hirano 2013 modified good-agreement version; not later 0-9 furrows 0-2; crepe-paper and narrow-calibre not scored; no published total-score activity bands","purpose":"Sum five caller-assigned Hirano 2013 modified EREFS descriptors (edema 0-1, rings 0-3, exudates 0-2, furrows 0-1 after collapsing original 0-2, stricture 0-1) and return the total (max 8). Does not return activity bands, inflammatory or fibrostenotic subscores, or later 0-9 furrows 0-2 expansions.","markdown_url":"https://magentlab.com/docs/erefs.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"erefs"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Hirano 2013 modified EREFS points 0-8 (furrows collapsed to absent/present; not later 0-9)"},{"name":"max_score","type":"integer","description":"Always 8"},{"name":"edema","type":"string","description":"Caller-assigned token: absent or present"},{"name":"rings","type":"string","description":"Caller-assigned token: none, mild, moderate, or severe"},{"name":"exudates","type":"string","description":"Caller-assigned token: none, mild_lt_10pct, or severe_gt_10pct"},{"name":"furrows","type":"string","description":"Caller-assigned token: absent or present (modified; not original 0-2)"},{"name":"stricture","type":"string","description":"Caller-assigned token: absent or present"},{"name":"components","type":"array","description":"Per-descriptor caller-assigned points"},{"name":"citation","type":"object","description":"Hirano et al. Gut 2013 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"edema":"absent","exudates":"none","furrows":"absent","rings":"none","stricture":"absent"},{"edema":"absent","exudates":"none","furrows":"absent","rings":"none","stricture":"absent"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/erefs","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/erefs?edema=absent&rings=none&exudates=none&furrows=absent&stricture=absent","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/erefs","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/i-see","description":"Dellon 2022 I-SEE Table I: symptoms 0/1/2/4, food_impaction 0/2/4, stacking complications (hospitalization 4, perforation 15, malnutrition 15, persistent_inflammation 15), inflam endoscopy 0-2, peak eos 0-2, fibro endoscopy 0/1/2/15, histologic fibrosis 2. Max 78. Bands <1 inactive, 1-6 mild, 7-14 moderate, ≥15 severe. magent does not perform endoscopy or count eos. Not EREFS. Not a diagnosis.","parameters":[{"in":"query","name":"symptoms","type":"string","enum":["none","weekly","daily","multiple_or_social"],"description":"Caller-assigned Dellon 2022 Table I symptoms: none (0), weekly (1), daily (2), or multiple_or_social (4; multiple times per day or disrupting social functioning).","required":true,"example":"daily"},{"in":"query","name":"food_impaction","type":"string","enum":["none","adult_ge_18","child_lt_18"],"description":"Caller-assigned Dellon 2022 Table I food impaction with ER visit or endoscopy: none (0), adult_ge_18 (2; patient ≥18 years), or child_lt_18 (4; patient <18 years). The caller assigns the age-specific token; magent does not take a separate age parameter.","required":true,"example":"none"},{"in":"query","name":"hospitalization_eoe","type":"boolean","description":"Caller-assigned hospitalization due to EoE (Dellon 2022 Table I complication; stacks with other selected complication features). true (4) or false (0).","required":true,"example":"false"},{"in":"query","name":"esophageal_perforation","type":"boolean","description":"Caller-assigned esophageal perforation (Dellon 2022 Table I complication; stacks). true (15) or false (0).","required":true,"example":"false"},{"in":"query","name":"malnutrition","type":"boolean","description":"Caller-assigned malnutrition with BMI <5th percentile or decreased growth trajectory (Dellon 2022 Table I complication; stacks). true (15) or false (0). The caller assigns this flag; magent does not compute BMI percentiles.","required":true,"example":"false"},{"in":"query","name":"persistent_inflammation","type":"boolean","description":"Caller-assigned persistent inflammation requiring elemental formula or systemic corticosteroid or immunomodulatory treatment (Dellon 2022 Table I complication; stacks). true (15) or false (0).","required":true,"example":"false"},{"in":"query","name":"inflam_endoscopy","type":"string","enum":["none","localized","diffuse"],"description":"Caller-assigned Dellon 2022 Table I inflammatory endoscopy (edema, furrows, and/or exudates): none (0), localized (1), or diffuse (2). magent does not perform endoscopy. Not EREFS.","required":true,"example":"localized"},{"in":"query","name":"peak_eos","type":"string","enum":["lt_15","15_60","gt_60"],"description":"Caller-assigned Dellon 2022 Table I peak eosinophils per hpf: lt_15 (0; <15), 15_60 (1; 15-60), or gt_60 (2; >60). magent does not count eosinophils.","required":true,"example":"15_60"},{"in":"query","name":"fibro_endoscopy","type":"string","enum":["none","passes_easily","dilation_or_snug","cannot_pass_or_repeated"],"description":"Caller-assigned Dellon 2022 Table I fibrostenotic endoscopy (rings, strictures): none (0), passes_easily (1; present but endoscope passes easily), dilation_or_snug (2; requires dilation or is a snug pass), or cannot_pass_or_repeated (15; cannot pass a standard endoscope; repeated dilations in an adult ≥18; or any dilation in a child <18). The caller assigns the 15-point token; magent does not take a separate age parameter. magent does not perform endoscopy.","required":true,"example":"none"},{"in":"query","name":"histologic_fibrosis","type":"boolean","description":"Caller-assigned Dellon 2022 Table I histologic fibrosis: true (2; basal zone hyperplasia or lamina propria fibrosis, or dilated intercellular spaces/surface epithelial alteration if no lamina propria) or false (0). magent does not read histology.","required":true,"example":"false"}],"errors":[{"code":"invalid_isee","message":"each I-SEE item must be a published Dellon 2022 Table I category (symptoms none/weekly/daily/multiple_or_social; food_impaction none/adult_ge_18/child_lt_18; inflam_endoscopy none/localized/diffuse; peak_eos lt_15/15_60/gt_60; fibro_endoscopy none/passes_easily/dilation_or_snug/cannot_pass_or_repeated). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/i-see","citation":{"authors":"Dellon ES, Khoury P, Muir AB, Liacouras CA, Safroneeva E, Atkins D, Collins MH, Gonsalves N, Falk GW, Spergel JM, Schoepfer AM, Menard-Katcher C, Furuta GT, Aceves S","doi":"10.1016/j.jaci.2022.03.015","id":"dellon-2022","pmid":"35606166","source":"J Allergy Clin Immunol. 2022;150(1):33-47","title":"A Clinical Severity Index for Eosinophilic Esophagitis: Development, Consensus, and Future Directions","url":"https://doi.org/10.1016/j.jaci.2022.03.015"},"formula_expression":"I-SEE = symptoms (none 0, weekly 1, daily 2, multiple_or_social 4) + food_impaction (none 0, adult_ge_18 2, child_lt_18 4) + hospitalization_eoe 4 + esophageal_perforation 15 + malnutrition 15 + persistent_inflammation 15 + inflam_endoscopy (none 0, localized 1, diffuse 2) + peak_eos (lt_15 0, 15_60 1, gt_60 2) + fibro_endoscopy (none 0, passes_easily 1, dilation_or_snug 2, cannot_pass_or_repeated 15) + histologic_fibrosis 2; Dellon 2022 Table I; complications stack (each selected feature gets points); exclusive within other rows; bands <1 inactive, 1-6 mild, 7-14 moderate, ≥15 severe; max 78; not EREFS","purpose":"Sum Dellon 2022 Table I I-SEE items (symptoms, food impaction, stacking complications, inflammatory endoscopy and peak eos, fibrostenotic endoscopy and histologic fibrosis) and return the point total (max 78) and published band (inactive, mild, moderate, or severe). Not a diagnosis of EoE and not EREFS.","markdown_url":"https://magentlab.com/docs/i-see.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"i_see"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Dellon 2022 Table I I-SEE points 0-78 (complications stack)"},{"name":"max_score","type":"integer","description":"Always 78"},{"name":"isee_band","type":"string","description":"Dellon 2022 Table I band: inactive (<1), mild (1-6), moderate (7-14), or severe (≥15). A score band, not a diagnosis of EoE."},{"name":"symptoms","type":"string","description":"Caller-assigned token: none, weekly, daily, or multiple_or_social"},{"name":"food_impaction","type":"string","description":"Caller-assigned token: none, adult_ge_18, or child_lt_18"},{"name":"hospitalization_eoe","type":"boolean","description":"Caller-assigned hospitalization due to EoE (4 if true)"},{"name":"esophageal_perforation","type":"boolean","description":"Caller-assigned esophageal perforation (15 if true)"},{"name":"malnutrition","type":"boolean","description":"Caller-assigned malnutrition flag (15 if true)"},{"name":"persistent_inflammation","type":"boolean","description":"Caller-assigned persistent-inflammation treatment flag (15 if true)"},{"name":"inflam_endoscopy","type":"string","description":"Caller-assigned token: none, localized, or diffuse"},{"name":"peak_eos","type":"string","description":"Caller-assigned token: lt_15, 15_60, or gt_60"},{"name":"fibro_endoscopy","type":"string","description":"Caller-assigned token: none, passes_easily, dilation_or_snug, or cannot_pass_or_repeated"},{"name":"histologic_fibrosis","type":"boolean","description":"Caller-assigned histologic fibrosis (2 if true)"},{"name":"components","type":"array","description":"Per-item caller-assigned points"},{"name":"citation","type":"object","description":"Dellon et al. J Allergy Clin Immunol 2022 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"esophageal_perforation":"false","fibro_endoscopy":"none","food_impaction":"none","histologic_fibrosis":"false","hospitalization_eoe":"false","inflam_endoscopy":"localized","malnutrition":"false","peak_eos":"15_60","persistent_inflammation":"false","symptoms":"daily"},{"esophageal_perforation":"false","fibro_endoscopy":"none","food_impaction":"none","histologic_fibrosis":"false","hospitalization_eoe":"false","inflam_endoscopy":"localized","malnutrition":"false","peak_eos":"15_60","persistent_inflammation":"false","symptoms":"daily"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/i-see","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/i-see?symptoms=daily&food_impaction=none&hospitalization_eoe=false&esophageal_perforation=false&malnutrition=false&persistent_inflammation=false&inflam_endoscopy=localized&peak_eos=15_60&fibro_endoscopy=none&histologic_fibrosis=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/i-see","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/cdai","description":"Best 1976 Crohn's disease activity index (CDAI): eight weighted variables (7-day liquid stools *2, abdominal-pain sum *5, well-being sum *7, extra-intestinal count *20, antidiarrheal *30, abdominal mass 0/2/5 *10, hematocrit deficit *6, caller-assigned weight-percent deviation). magent returns the rounded integer index only and does not apply later trial activity bands. magent does not examine the patient. Not a Crohn's diagnosis and not the Harvey-Bradshaw one-day index.","parameters":[{"in":"query","name":"sex","type":"string","description":"male or female. Best 1976 hematocrit standard is 47 (male) or 42 (female). magent does not examine the patient.","required":true,"example":"male"},{"in":"query","name":"liquid_stool_count_7d","type":"integer","description":"Sum of liquid or very soft stools over 7 days (Best 1976; ×2). Integer 0-70 is a magent clamp, not a published maximum. magent does not count stools.","required":true,"example":"0"},{"in":"query","name":"abdominal_pain_sum_7d","type":"integer","description":"Sum of daily Best 1976 abdominal-pain ratings over 7 days (integer 0-21; each day 0 none, 1 mild, 2 moderate, 3 severe; ×5). magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"wellbeing_sum_7d","type":"integer","description":"Sum of daily Best 1976 general well-being ratings over 7 days (integer 0-28; each day 0 generally well, 1 slightly below par, 2 poor, 3 very poor, 4 terrible; ×7). magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"extra_intestinal_count","type":"integer","description":"Caller-assigned count 0-6 of Best 1976 extra-intestinal findings (one each: arthritis/arthralgia; iritis/uveitis; erythema nodosum/pyoderma gangrenosum/aphthous ulcer; anal fissure/fistula/abscess; other fistula; fever >37.8 C in the past week; ×20). magent takes the integer count and does not enumerate those names as separate params.","required":true,"example":"0"},{"in":"query","name":"taking_antidiarrheal","type":"boolean","description":"Taking diphenoxylate/atropine (Lomotil) or opiates for diarrhea as in Best 1976. true or false. true scores 30. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"abdominal_mass","type":"integer","description":"Caller-assigned Best 1976 abdominal mass (exactly 0 none, 2 questionable, or 5 definite; ×10). Not 1, 3, or 4. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"hematocrit_percent","type":"number","description":"Hematocrit in percent (10-70). Best 1976 uses a whole-number hematocrit. Deficit is 47 minus this value (male) or 42 minus this value (female), then ×6; may be negative if above the sex standard. magent does not assay hematocrit.","required":true,"example":"47"},{"in":"query","name":"weight_percent_deviation","type":"number","description":"Caller-assigned Best 1976 weight term 100*(1 - current/standard). May be negative if current is above standard. Magent clamp -50 to 80, not a published range. magent does not look up a standard weight.","required":true,"example":"0"}],"errors":[{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_cdai_stools","message":"liquid_stool_count_7d must be an integer from 0 to 70. Returned before settlement; you are not charged.","status":400},{"code":"invalid_cdai_pain","message":"abdominal_pain_sum_7d must be an integer from 0 to 21. Returned before settlement; you are not charged.","status":400},{"code":"invalid_cdai_wellbeing","message":"wellbeing_sum_7d must be an integer from 0 to 28. Returned before settlement; you are not charged.","status":400},{"code":"invalid_cdai_complications","message":"extra_intestinal_count must be an integer from 0 to 6. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_cdai_mass","message":"abdominal_mass must be 0, 2, or 5 (Best 1976). Returned before settlement; you are not charged.","status":400},{"code":"invalid_hematocrit","message":"hematocrit_percent must be a number from 10 to 70. Returned before settlement; you are not charged.","status":400},{"code":"invalid_cdai_weight","message":"weight_percent_deviation must be a number from -50 to 80. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/cdai","citation":{"authors":"Best WR, Becktel JM, Singleton JW, Kern F Jr","doi":"10.1016/S0016-5085(76)80163-1","id":"best-1976","pmid":"1248701","source":"Gastroenterology. 1976;70(3):439-444","title":"Development of a Crohn's disease activity index. National Cooperative Crohn's Disease Study","url":"https://doi.org/10.1016/S0016-5085(76)80163-1"},"formula_expression":"CDAI = liquid_stool_count_7d*2 + abdominal_pain_sum_7d*5 + wellbeing_sum_7d*7 + extra_intestinal_count*20 + taking_antidiarrheal*30 + abdominal_mass*10 + hematocrit_deficit*6 + weight_percent_deviation; hematocrit_deficit = 47-hematocrit_percent (male) or 42-hematocrit_percent (female); Best 1976; score rounded after the weight term","purpose":"Compute the Best 1976 Crohn's disease activity index from eight caller-assigned variables and return the rounded integer score. Does not return later trial activity bands.","markdown_url":"https://magentlab.com/docs/cdai.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"cdai"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Best 1976 CDAI after rounding the sum (needed when the weight term is not an integer). No activity band."},{"name":"liquid_stool_count_7d","type":"integer","description":"7-day liquid/very-soft stool count used (×2)"},{"name":"abdominal_pain_sum_7d","type":"integer","description":"7-day abdominal-pain rating sum used (×5)"},{"name":"wellbeing_sum_7d","type":"integer","description":"7-day well-being rating sum used (×7)"},{"name":"extra_intestinal_count","type":"integer","description":"Caller-assigned extra-intestinal count 0-6 used (×20)"},{"name":"taking_antidiarrheal","type":"boolean","description":"Antidiarrheal flag used; 30 points if true"},{"name":"abdominal_mass","type":"integer","description":"Caller-assigned abdominal mass 0, 2, or 5 used (×10)"},{"name":"sex","type":"string","description":"male or female; selects the hematocrit standard"},{"name":"hematocrit_percent","type":"number","description":"Hematocrit percent used"},{"name":"hematocrit_deficit","type":"number","description":"47-hematocrit_percent (male) or 42-hematocrit_percent (female); ×6"},{"name":"weight_percent_deviation","type":"number","description":"Caller-assigned 100*(1 - current/standard) used (×1)"},{"name":"components","type":"array","description":"Per-variable weighted points"},{"name":"citation","type":"object","description":"Best et al. Gastroenterology 1976 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"abdominal_mass":"0","abdominal_pain_sum_7d":"0","extra_intestinal_count":"0","hematocrit_percent":"47","liquid_stool_count_7d":"0","sex":"male","taking_antidiarrheal":"false","weight_percent_deviation":"0","wellbeing_sum_7d":"0"},{"abdominal_mass":"0","abdominal_pain_sum_7d":"0","extra_intestinal_count":"0","hematocrit_percent":"47","liquid_stool_count_7d":"0","sex":"male","taking_antidiarrheal":"false","weight_percent_deviation":"0","wellbeing_sum_7d":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/cdai","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/cdai?sex=male&liquid_stool_count_7d=0&abdominal_pain_sum_7d=0&wellbeing_sum_7d=0&extra_intestinal_count=0&taking_antidiarrheal=false&abdominal_mass=0&hematocrit_percent=47&weight_percent_deviation=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/cdai","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/montreal-ibd","description":"Satsangi 2006 Montreal IBD phenotype (Vienna revision). Crohn: A1-A3, L1-L4, B1-B3, optional +L4 (not when isolated L4) and p. UC: E1-E3 plus S0-S3 as assigned. Compact string, no spaces. Not an activity index (not CDAI/Mayo), not Paris, not IBDU. magent does not perform endoscopy. Not a diagnosis. Not a medical device.","parameters":[{"in":"query","name":"disease","type":"string","enum":["crohn","uc"],"description":"Satsangi 2006 Montreal disease as assigned: crohn or uc. IBDU and indeterminate colitis are not encoded. magent does not diagnose IBD.","required":true,"example":"crohn"},{"in":"query","name":"age_at_diagnosis","type":"string","enum":["A1","A2","A3"],"description":"Montreal Crohn age at diagnosis as assigned (Satsangi 2006): A1 ≤16 years, A2 17-40 years, A3 >40 years. Required when disease=crohn. Omit when disease=uc. magent does not assign the A token from a chart.","required":false,"example":"A2"},{"in":"query","name":"location","type":"string","enum":["L1","L2","L3","L4"],"description":"Montreal Crohn location as assigned (Satsangi 2006): L1 ileal, L2 colonic, L3 ileocolonic, L4 isolated upper GI. Required when disease=crohn. Omit when disease=uc. magent does not perform endoscopy.","required":false,"example":"L3"},{"in":"query","name":"upper_gi","type":"boolean","description":"Concomitant upper GI disease as assigned (Satsangi 2006 L4 modifier). true adds +L4 after L1, L2, or L3. Must be false when location is isolated L4. Required when disease=crohn. Omit when disease=uc. magent does not perform endoscopy.","required":false,"example":"false"},{"in":"query","name":"behaviour","type":"string","enum":["B1","B2","B3"],"description":"Montreal Crohn behaviour as assigned (Satsangi 2006): B1 non-stricturing non-penetrating, B2 stricturing, B3 penetrating. Required when disease=crohn. Omit when disease=uc. magent does not perform endoscopy.","required":false,"example":"B1"},{"in":"query","name":"perianal","type":"boolean","description":"Concomitant perianal disease as assigned (Satsangi 2006 p modifier). true appends p after B1, B2, or B3. Required when disease=crohn. Omit when disease=uc. magent does not examine the patient.","required":false,"example":"false"},{"in":"query","name":"extent","type":"string","enum":["E1","E2","E3"],"description":"Montreal UC extent as assigned (Satsangi 2006): E1 ulcerative proctitis (distal to the rectosigmoid junction), E2 left-sided (distal to the splenic flexure), E3 extensive (proximal to the splenic flexure). Required when disease=uc. Omit when disease=crohn. magent does not perform endoscopy.","required":false,"example":"E1"},{"in":"query","name":"severity","type":"string","enum":["S0","S1","S2","S3"],"description":"Montreal UC severity as assigned (Satsangi 2006): S0 clinical remission; S1 mild (≤4 stools/day with or without blood, no systemic illness, normal ESR); S2 moderate (>4 stools/day, minimal systemic toxicity); S3 severe (≥6 bloody stools/day AND pulse ≥90 AND temperature ≥37.5°C AND haemoglobin <10.5 g/100 ml AND ESR ≥30 mm/h). The caller assigns the S token. Required when disease=uc. Omit when disease=crohn. magent does not take vitals.","required":false,"example":"S0"}],"errors":[{"code":"invalid_montreal_ibd","message":"Montreal IBD needs disease crohn or uc with the Satsangi 2006 phenotype tokens. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/montreal-ibd","citation":{"authors":"Satsangi J, Silverberg MS, Vermeire S, Colombel JF","doi":"10.1136/gut.2005.082909","id":"satsangi-2006","pmid":"16698746","source":"Gut. 2006;55(6):749-753","title":"The Montreal classification of inflammatory bowel disease: controversies, consensus, and implications","url":"https://doi.org/10.1136/gut.2005.082909"},"formula_expression":"Crohn phenotype = age_at_diagnosis (A1 ≤16 y, A2 17-40 y, A3 >40 y) + location (L1 ileal, L2 colonic, L3 ileocolonic, L4 isolated upper GI) + optional +L4 when concomitant upper GI with L1-L3 (forbidden when location is isolated L4) + behaviour (B1 non-stricturing non-penetrating, B2 stricturing, B3 penetrating) + optional p when concomitant perianal disease; UC phenotype = extent (E1 ulcerative proctitis distal to the rectosigmoid junction, E2 left-sided distal to the splenic flexure, E3 extensive proximal to the splenic flexure) + severity (S0 clinical remission, S1 mild, S2 moderate, S3 severe as assigned) (Satsangi 2006 Montreal revision of Vienna). Compact string, no spaces. Not a disease-activity score. magent does not perform endoscopy. Not Paris pediatric classification.","purpose":"Apply the Satsangi 2006 Montreal revision of the Vienna IBD classification and return the compact phenotype string for Crohn (age, location, behaviour, optional +L4 and p) or ulcerative colitis (extent and severity).","markdown_url":"https://magentlab.com/docs/montreal-ibd.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"montreal_ibd"},{"name":"formula_expression","type":"string","description":"Published Satsangi 2006 Montreal phenotype notation"},{"name":"disease","type":"string","description":"crohn or uc as assigned. IBDU is not encoded."},{"name":"phenotype","type":"string","description":"Compact Montreal phenotype with no spaces. Crohn examples: A2L3B1, A2L3+L4B1, A2L3B1p, A1L4B2, A3L1+L4B3p. UC examples: E1S0, E2S1, E3S3. Not a disease-activity score."},{"name":"criteria","type":"array","description":"Tree rows with factor and met for disease plus the exclusive Montreal tokens and Crohn modifiers used on that request"},{"name":"citation","type":"object","description":"Satsangi 2006 Gut citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age_at_diagnosis":"A2","behaviour":"B1","disease":"crohn","location":"L3","perianal":"false","upper_gi":"false"},{"age_at_diagnosis":"A2","behaviour":"B1","disease":"crohn","location":"L3","perianal":"false","upper_gi":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/montreal-ibd","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/montreal-ibd?disease=crohn&age_at_diagnosis=A2&location=L3&upper_gi=false&behaviour=B1&perianal=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/montreal-ibd","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/ses-cd","description":"Daperno 2004 simplified endoscopic activity score for Crohn's disease (SES-CD): caller-assigned integers 0-3 for ulcers, ulcerated_surface, affected_surface, and narrowings in ileum, right_colon, transverse_colon, left_colon, and rectum (20 params). magent sums only (max 60). Unexamined segments are 0 as assigned by the caller. Daperno 2004 did not publish remission or response bands; magent returns score and max_score only. magent does not perform endoscopy. Not CDEIS and not Best 1976 CDAI.","parameters":[{"in":"query","name":"ileum_ulcers","type":"integer","description":"Caller-assigned Daperno 2004 SES-CD ulcers for the ileum (integer 0-3; Table 1: 0 none / 1 aphthous 0.1–0.5 cm / 2 large 0.5–2 cm / 3 very large >2 cm). Unexamined segments are 0 as assigned by the caller. magent does not perform endoscopy.","required":true,"example":"0"},{"in":"query","name":"ileum_ulcerated_surface","type":"integer","description":"Caller-assigned Daperno 2004 SES-CD ulcerated surface for the ileum (integer 0-3; Table 1: 0 none / 1 <10% / 2 10–30% / 3 >30%). Unexamined segments are 0 as assigned by the caller. magent does not perform endoscopy.","required":true,"example":"0"},{"in":"query","name":"ileum_affected_surface","type":"integer","description":"Caller-assigned Daperno 2004 SES-CD affected surface for the ileum (integer 0-3; Table 1: 0 unaffected / 1 <50% / 2 50–75% / 3 >75%). Unexamined segments are 0 as assigned by the caller. magent does not perform endoscopy.","required":true,"example":"0"},{"in":"query","name":"ileum_narrowings","type":"integer","description":"Caller-assigned Daperno 2004 SES-CD narrowings for the ileum (integer 0-3; Table 1: 0 none / 1 single passable / 2 multiple passable / 3 cannot be passed). Unexamined segments are 0 as assigned by the caller. magent does not perform endoscopy.","required":true,"example":"0"},{"in":"query","name":"right_colon_ulcers","type":"integer","description":"Caller-assigned Daperno 2004 SES-CD ulcers for the right colon (integer 0-3; Table 1: 0 none / 1 aphthous 0.1–0.5 cm / 2 large 0.5–2 cm / 3 very large >2 cm). Unexamined segments are 0 as assigned by the caller. magent does not perform endoscopy.","required":true,"example":"0"},{"in":"query","name":"right_colon_ulcerated_surface","type":"integer","description":"Caller-assigned Daperno 2004 SES-CD ulcerated surface for the right colon (integer 0-3; Table 1: 0 none / 1 <10% / 2 10–30% / 3 >30%). Unexamined segments are 0 as assigned by the caller. magent does not perform endoscopy.","required":true,"example":"0"},{"in":"query","name":"right_colon_affected_surface","type":"integer","description":"Caller-assigned Daperno 2004 SES-CD affected surface for the right colon (integer 0-3; Table 1: 0 unaffected / 1 <50% / 2 50–75% / 3 >75%). Unexamined segments are 0 as assigned by the caller. magent does not perform endoscopy.","required":true,"example":"0"},{"in":"query","name":"right_colon_narrowings","type":"integer","description":"Caller-assigned Daperno 2004 SES-CD narrowings for the right colon (integer 0-3; Table 1: 0 none / 1 single passable / 2 multiple passable / 3 cannot be passed). Unexamined segments are 0 as assigned by the caller. magent does not perform endoscopy.","required":true,"example":"0"},{"in":"query","name":"transverse_colon_ulcers","type":"integer","description":"Caller-assigned Daperno 2004 SES-CD ulcers for the transverse colon (integer 0-3; Table 1: 0 none / 1 aphthous 0.1–0.5 cm / 2 large 0.5–2 cm / 3 very large >2 cm). Unexamined segments are 0 as assigned by the caller. magent does not perform endoscopy.","required":true,"example":"0"},{"in":"query","name":"transverse_colon_ulcerated_surface","type":"integer","description":"Caller-assigned Daperno 2004 SES-CD ulcerated surface for the transverse colon (integer 0-3; Table 1: 0 none / 1 <10% / 2 10–30% / 3 >30%). Unexamined segments are 0 as assigned by the caller. magent does not perform endoscopy.","required":true,"example":"0"},{"in":"query","name":"transverse_colon_affected_surface","type":"integer","description":"Caller-assigned Daperno 2004 SES-CD affected surface for the transverse colon (integer 0-3; Table 1: 0 unaffected / 1 <50% / 2 50–75% / 3 >75%). Unexamined segments are 0 as assigned by the caller. magent does not perform endoscopy.","required":true,"example":"0"},{"in":"query","name":"transverse_colon_narrowings","type":"integer","description":"Caller-assigned Daperno 2004 SES-CD narrowings for the transverse colon (integer 0-3; Table 1: 0 none / 1 single passable / 2 multiple passable / 3 cannot be passed). Unexamined segments are 0 as assigned by the caller. magent does not perform endoscopy.","required":true,"example":"0"},{"in":"query","name":"left_colon_ulcers","type":"integer","description":"Caller-assigned Daperno 2004 SES-CD ulcers for the left colon (integer 0-3; Table 1: 0 none / 1 aphthous 0.1–0.5 cm / 2 large 0.5–2 cm / 3 very large >2 cm). Unexamined segments are 0 as assigned by the caller. magent does not perform endoscopy.","required":true,"example":"0"},{"in":"query","name":"left_colon_ulcerated_surface","type":"integer","description":"Caller-assigned Daperno 2004 SES-CD ulcerated surface for the left colon (integer 0-3; Table 1: 0 none / 1 <10% / 2 10–30% / 3 >30%). Unexamined segments are 0 as assigned by the caller. magent does not perform endoscopy.","required":true,"example":"0"},{"in":"query","name":"left_colon_affected_surface","type":"integer","description":"Caller-assigned Daperno 2004 SES-CD affected surface for the left colon (integer 0-3; Table 1: 0 unaffected / 1 <50% / 2 50–75% / 3 >75%). Unexamined segments are 0 as assigned by the caller. magent does not perform endoscopy.","required":true,"example":"0"},{"in":"query","name":"left_colon_narrowings","type":"integer","description":"Caller-assigned Daperno 2004 SES-CD narrowings for the left colon (integer 0-3; Table 1: 0 none / 1 single passable / 2 multiple passable / 3 cannot be passed). Unexamined segments are 0 as assigned by the caller. magent does not perform endoscopy.","required":true,"example":"0"},{"in":"query","name":"rectum_ulcers","type":"integer","description":"Caller-assigned Daperno 2004 SES-CD ulcers for the rectum (integer 0-3; Table 1: 0 none / 1 aphthous 0.1–0.5 cm / 2 large 0.5–2 cm / 3 very large >2 cm). Unexamined segments are 0 as assigned by the caller. magent does not perform endoscopy.","required":true,"example":"0"},{"in":"query","name":"rectum_ulcerated_surface","type":"integer","description":"Caller-assigned Daperno 2004 SES-CD ulcerated surface for the rectum (integer 0-3; Table 1: 0 none / 1 <10% / 2 10–30% / 3 >30%). Unexamined segments are 0 as assigned by the caller. magent does not perform endoscopy.","required":true,"example":"0"},{"in":"query","name":"rectum_affected_surface","type":"integer","description":"Caller-assigned Daperno 2004 SES-CD affected surface for the rectum (integer 0-3; Table 1: 0 unaffected / 1 <50% / 2 50–75% / 3 >75%). Unexamined segments are 0 as assigned by the caller. magent does not perform endoscopy.","required":true,"example":"0"},{"in":"query","name":"rectum_narrowings","type":"integer","description":"Caller-assigned Daperno 2004 SES-CD narrowings for the rectum (integer 0-3; Table 1: 0 none / 1 single passable / 2 multiple passable / 3 cannot be passed). Unexamined segments are 0 as assigned by the caller. magent does not perform endoscopy.","required":true,"example":"0"}],"errors":[{"code":"invalid_ses_cd","message":"ulcers, ulcerated_surface, affected_surface, and narrowings in ileum, right_colon, transverse_colon, left_colon, and rectum must each be an integer 0-3 (Daperno 2004 SES-CD). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/ses-cd","citation":{"authors":"Daperno M, D'Haens G, Van Assche G, et al.","doi":"10.1016/s0016-5107(04)01878-4","id":"daperno-2004","pmid":"15472670","source":"Gastrointest Endosc. 2004;60(4):505-512","title":"Development and validation of a new, simplified endoscopic activity score for Crohn's disease: the SES-CD.","url":"https://doi.org/10.1016/s0016-5107(04)01878-4"},"formula_expression":"SES-CD = sum of ulcers, ulcerated_surface, affected_surface, and narrowings (each integer 0-3) in ileum, right_colon, transverse_colon, left_colon, and rectum; Daperno 2004 caller-assigned; max 60; unexamined segments 0 as assigned by the caller; no published activity bands","purpose":"Sum four caller-assigned Daperno 2004 SES-CD integers (ulcers, ulcerated_surface, affected_surface, narrowings; each 0-3) in each of five ileocolonic segments (ileum, right_colon, transverse_colon, left_colon, rectum) and return the total (max 60). Does not return activity bands.","markdown_url":"https://magentlab.com/docs/ses-cd.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"ses_cd"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Daperno 2004 SES-CD points 0-60"},{"name":"max_score","type":"integer","description":"Always 60"},{"name":"components","type":"array","description":"Per-item caller-assigned points"},{"name":"citation","type":"object","description":"Daperno et al. Gastrointest Endosc 2004 citation"},{"name":"disclaimer","type":"string","description":"Not a medical device"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"ileum_affected_surface":"0","ileum_narrowings":"0","ileum_ulcerated_surface":"0","ileum_ulcers":"0","left_colon_affected_surface":"0","left_colon_narrowings":"0","left_colon_ulcerated_surface":"0","left_colon_ulcers":"0","rectum_affected_surface":"0","rectum_narrowings":"0","rectum_ulcerated_surface":"0","rectum_ulcers":"0","right_colon_affected_surface":"0","right_colon_narrowings":"0","right_colon_ulcerated_surface":"0","right_colon_ulcers":"0","transverse_colon_affected_surface":"0","transverse_colon_narrowings":"0","transverse_colon_ulcerated_surface":"0","transverse_colon_ulcers":"0"},{"ileum_affected_surface":"0","ileum_narrowings":"0","ileum_ulcerated_surface":"0","ileum_ulcers":"0","left_colon_affected_surface":"0","left_colon_narrowings":"0","left_colon_ulcerated_surface":"0","left_colon_ulcers":"0","rectum_affected_surface":"0","rectum_narrowings":"0","rectum_ulcerated_surface":"0","rectum_ulcers":"0","right_colon_affected_surface":"0","right_colon_narrowings":"0","right_colon_ulcerated_surface":"0","right_colon_ulcers":"0","transverse_colon_affected_surface":"0","transverse_colon_narrowings":"0","transverse_colon_ulcerated_surface":"0","transverse_colon_ulcers":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/ses-cd","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/ses-cd?ileum_ulcers=0&ileum_ulcerated_surface=0&ileum_affected_surface=0&ileum_narrowings=0&right_colon_ulcers=0&right_colon_ulcerated_surface=0&right_colon_affected_surface=0&right_colon_narrowings=0&transverse_colon_ulcers=0&transverse_colon_ulcerated_surface=0&transverse_colon_affected_surface=0&transverse_colon_narrowings=0&left_colon_ulcers=0&left_colon_ulcerated_surface=0&left_colon_affected_surface=0&left_colon_narrowings=0&rectum_ulcers=0&rectum_ulcerated_surface=0&rectum_affected_surface=0&rectum_narrowings=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/ses-cd","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/pcdai","description":"Hyams 1991 Pediatric Crohn's Disease Activity Index (PCDAI): eleven caller-assigned item points. hematocrit and esr are 0, 2.5, or 5; the other nine are 0, 5, or 10. magent sums only (max 100) and does not return activity bands. magent does not examine the child or assign hematocrit age/sex tables. Not a diagnosis. Not CDAI, SES-CD, or PUCAI.","parameters":[{"in":"query","name":"abdominal_pain","type":"integer","description":"Caller-assigned Hyams 1991 PCDAI abdominal pain points (integer 0, 5, or 10): 0 none; 5 mild (brief, does not interfere with activities); 10 moderate/severe (daily, longer lasting, affects activities, nocturnal). magent does not examine the child.","required":true,"example":"0"},{"in":"query","name":"stools","type":"integer","description":"Caller-assigned Hyams 1991 PCDAI stools per day points (integer 0, 5, or 10): 0 for 0-1 liquid stools, no blood; 5 for up to 2 semi-formed with small blood, or 2-5 liquid; 10 for gross bleeding, or ≥6 liquid, or nocturnal diarrhea. magent does not examine the child.","required":true,"example":"0"},{"in":"query","name":"well_being","type":"integer","description":"Caller-assigned Hyams 1991 PCDAI patient functioning / general well-being points (integer 0, 5, or 10): 0 no limitation of activities, well; 5 occasional difficulty in maintaining age-appropriate activities; 10 frequent limitation of activities, very poor. magent does not examine the child.","required":true,"example":"0"},{"in":"query","name":"hematocrit","type":"number","description":"Caller-assigned Hyams 1991 PCDAI hematocrit points (number 0, 2.5, or 5). The paper's age- and sex-specific hematocrit table is applied by the caller. magent does not assign that table. magent does not examine the child.","required":true,"example":"0"},{"in":"query","name":"esr","type":"number","description":"Caller-assigned Hyams 1991 PCDAI erythrocyte sedimentation rate points (number 0, 2.5, or 5): 0 for ESR <20 mm/h; 2.5 for 20-50; 5 for >50. magent does not assay ESR. magent does not examine the child.","required":true,"example":"0"},{"in":"query","name":"albumin","type":"integer","description":"Caller-assigned Hyams 1991 PCDAI albumin points (integer 0, 5, or 10): 0 for albumin ≥3.5 g/dL; 5 for 3.1-3.4; 10 for ≤3.0. magent does not assay albumin. magent does not examine the child.","required":true,"example":"0"},{"in":"query","name":"weight","type":"integer","description":"Caller-assigned Hyams 1991 PCDAI weight points (integer 0, 5, or 10): 0 weight gain or voluntary stable/loss; 5 involuntary stable or weight loss 1-9%; 10 weight loss ≥10%. magent does not examine the child.","required":true,"example":"0"},{"in":"query","name":"height","type":"integer","description":"Caller-assigned Hyams 1991 PCDAI height points (integer 0, 5, or 10): at diagnosis 0 <1 channel decrease, 5 ≥1 and <2 channel decrease, 10 ≥2 channel decrease; at follow-up 0 height velocity ≥-1 SD, 5 <-1 SD and >-2 SD, 10 ≤-2 SD. magent does not measure height. magent does not examine the child.","required":true,"example":"0"},{"in":"query","name":"abdomen","type":"integer","description":"Caller-assigned Hyams 1991 PCDAI abdomen points (integer 0, 5, or 10): 0 no tenderness, no mass; 5 tenderness, or mass without tenderness; 10 tenderness, involuntary guarding, definite mass. magent does not examine the child.","required":true,"example":"0"},{"in":"query","name":"perirectal","type":"integer","description":"Caller-assigned Hyams 1991 PCDAI perirectal disease points (integer 0, 5, or 10): 0 none, asymptomatic tags; 5 1-2 indolent fistula, scant drainage, no tenderness; 10 active fistula, drainage, tenderness, or abscess. magent does not examine the child.","required":true,"example":"0"},{"in":"query","name":"extra_intestinal","type":"integer","description":"Caller-assigned Hyams 1991 PCDAI extra-intestinal manifestation points (integer 0, 5, or 10): 0 none; 5 one; 10 two or more (fever ≥38.5°C for 3 days over the past week, arthritis, uveitis, erythema nodosum, pyoderma gangrenosum). magent does not examine the child.","required":true,"example":"0"}],"errors":[{"code":"invalid_pcdai","message":"PCDAI items must be Hyams 1991 caller-assigned points: abdominal_pain, stools, well_being, albumin, weight, height, abdomen, perirectal, and extra_intestinal each 0, 5, or 10; hematocrit and esr each 0, 2.5, or 5. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/pcdai","citation":{"authors":"Hyams JS, Ferry GD, Mandel FS, et al.","doi":"10.1097/00005176-199105000-00005","id":"hyams-1991","pmid":"1678008","source":"J Pediatr Gastroenterol Nutr. 1991;12(4):439-447","title":"Development and validation of a pediatric Crohn's disease activity index","url":"https://doi.org/10.1097/00005176-199105000-00005"},"formula_expression":"PCDAI = abdominal_pain + stools + well_being + hematocrit + esr + albumin + weight + height + abdomen + perirectal + extra_intestinal; Hyams 1991 caller-assigned item points; hematocrit and esr 0, 2.5, or 5; remaining items 0, 5, or 10; max 100; no published activity bands","purpose":"Sum eleven caller-assigned Hyams 1991 PCDAI item points and return the published total (max 100). Does not return activity bands.","markdown_url":"https://magentlab.com/docs/pcdai.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"pcdai"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"number","description":"Hyams 1991 PCDAI points 0-100. Half-points (2.5) occur when hematocrit or esr is 2.5."},{"name":"max_score","type":"integer","description":"Always 100"},{"name":"abdominal_pain","type":"integer","description":"Caller-assigned abdominal pain points 0, 5, or 10"},{"name":"stools","type":"integer","description":"Caller-assigned stools points 0, 5, or 10"},{"name":"well_being","type":"integer","description":"Caller-assigned well-being points 0, 5, or 10"},{"name":"hematocrit","type":"number","description":"Caller-assigned hematocrit points 0, 2.5, or 5"},{"name":"esr","type":"number","description":"Caller-assigned ESR points 0, 2.5, or 5"},{"name":"albumin","type":"integer","description":"Caller-assigned albumin points 0, 5, or 10"},{"name":"weight","type":"integer","description":"Caller-assigned weight points 0, 5, or 10"},{"name":"height","type":"integer","description":"Caller-assigned height points 0, 5, or 10"},{"name":"abdomen","type":"integer","description":"Caller-assigned abdomen points 0, 5, or 10"},{"name":"perirectal","type":"integer","description":"Caller-assigned perirectal points 0, 5, or 10"},{"name":"extra_intestinal","type":"integer","description":"Caller-assigned extra-intestinal points 0, 5, or 10"},{"name":"components","type":"array","description":"Per-item caller-assigned points"},{"name":"citation","type":"object","description":"Hyams et al. J Pediatr Gastroenterol Nutr 1991 citation"},{"name":"disclaimer","type":"string","description":"Not a medical device"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"abdomen":"0","abdominal_pain":"0","albumin":"0","esr":"0","extra_intestinal":"0","height":"0","hematocrit":"0","perirectal":"0","stools":"0","weight":"0","well_being":"0"},{"abdomen":"0","abdominal_pain":"0","albumin":"0","esr":"0","extra_intestinal":"0","height":"0","hematocrit":"0","perirectal":"0","stools":"0","weight":"0","well_being":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/pcdai","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/pcdai?abdominal_pain=0&stools=0&well_being=0&hematocrit=0&esr=0&albumin=0&weight=0&height=0&abdomen=0&perirectal=0&extra_intestinal=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/pcdai","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rome-ii-ibs","description":"Thompson 1999 Rome II IBS. rome_ii_ibs is true iff at least 12 weeks (need not be consecutive) in the preceding 12 months of abdominal discomfort or pain and at least two of: relieved with defecation, onset associated with a change in stool frequency, and onset associated with a change in stool form. supporting_features_met is 0-3. Caller assigns four flags. magent does not examine the patient. Not a diagnosis, not Rome III, not Rome IV, not Manning, not IBS subtype.","parameters":[{"in":"query","name":"pain_or_discomfort_12_weeks_of_12_months","type":"boolean","description":"At least 12 weeks (need not be consecutive) in the preceding 12 months of abdominal discomfort or pain (Thompson 1999). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"true"},{"in":"query","name":"relieved_with_defecation","type":"boolean","description":"Abdominal discomfort or pain relieved with defecation (one of three supporting features; at least two required). true or false as assigned by the caller.","required":true,"example":"true"},{"in":"query","name":"onset_change_stool_frequency","type":"boolean","description":"Onset associated with a change in frequency of stool (one of three supporting features; at least two required). true or false as assigned by the caller.","required":true,"example":"true"},{"in":"query","name":"onset_change_stool_form","type":"boolean","description":"Onset associated with a change in form (appearance) of stool (one of three supporting features; at least two required). true or false as assigned by the caller.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rome-ii-ibs","citation":{"authors":"Thompson WG, Longstreth GF, Drossman DA, Heaton KW, Irvine EJ, Müller-Lissner SA","doi":"10.1136/gut.45.2008.ii43","id":"thompson-1999","pmid":"10457044","source":"Gut. 1999;45 Suppl 2:II43-II47","title":"Functional bowel disorders and functional abdominal pain","url":"https://doi.org/10.1136/gut.45.2008.ii43"},"formula_expression":"rome_ii_ibs iff pain_or_discomfort_12_weeks_of_12_months and supporting_features_met >= 2; supporting_features_met counts relieved_with_defecation, onset_change_stool_frequency, and onset_change_stool_form (Thompson 1999 Rome II IBS diagnostic criteria)","purpose":"Apply the Thompson 1999 Rome II IBS diagnostic criteria and return supporting_features_met (0-3) and whether the published IBS box holds (rome_ii_ibs).","markdown_url":"https://magentlab.com/docs/rome-ii-ibs.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rome_ii_ibs"},{"name":"formula_expression","type":"string","description":"Thompson 1999 Rome II IBS box: 12 weeks of pain/discomfort in 12 months and at least 2 of 3 supporting features"},{"name":"supporting_features_met","type":"integer","description":"Count of true supporting features among relieved with defecation, change in stool frequency, and change in stool form (0-3)"},{"name":"rome_ii_ibs","type":"boolean","description":"true only when the 12-week pain/discomfort flag and at least two supporting features all hold. Not a diagnosis."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met; supporting_features_ge_2 includes value 0-3"},{"name":"citation","type":"object","description":"Thompson 1999 Gut citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"onset_change_stool_form":"false","onset_change_stool_frequency":"true","pain_or_discomfort_12_weeks_of_12_months":"true","relieved_with_defecation":"true"},{"onset_change_stool_form":"false","onset_change_stool_frequency":"true","pain_or_discomfort_12_weeks_of_12_months":"true","relieved_with_defecation":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rome-ii-ibs","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rome-ii-ibs?pain_or_discomfort_12_weeks_of_12_months=true&relieved_with_defecation=true&onset_change_stool_frequency=true&onset_change_stool_form=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rome-ii-ibs","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rome-iii-ibs","description":"Longstreth 2006 Rome III IBS. rome_iii_ibs is true iff pain or discomfort at least 3 days per month in the last 3 months, onset at least 6 months prior, and at least two of: improvement with defecation, change in stool frequency, and change in stool form. supporting_features_met is 0-3. Caller assigns five flags. magent does not examine the patient. Not a diagnosis, not Rome IV, not IBS subtype.","parameters":[{"in":"query","name":"pain_or_discomfort_3_days_per_month_last_3_months","type":"boolean","description":"Recurrent abdominal pain or discomfort at least 3 days per month in the last 3 months (Longstreth 2006). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"true"},{"in":"query","name":"symptom_onset_at_least_6_months_prior","type":"boolean","description":"Symptom onset at least 6 months prior to diagnosis, as assigned (Longstreth 2006). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"},{"in":"query","name":"improvement_with_defecation","type":"boolean","description":"Improvement with defecation (one of three supporting features; at least two required). true or false as assigned by the caller.","required":true,"example":"true"},{"in":"query","name":"onset_change_stool_frequency","type":"boolean","description":"Onset associated with a change in frequency of stool (one of three supporting features; at least two required). true or false as assigned by the caller.","required":true,"example":"true"},{"in":"query","name":"onset_change_stool_form","type":"boolean","description":"Onset associated with a change in form (appearance) of stool (one of three supporting features; at least two required). true or false as assigned by the caller.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rome-iii-ibs","citation":{"authors":"Longstreth GF, Thompson WG, Chey WD, Houghton LA, Mearin F, Spiller RC","doi":"10.1053/j.gastro.2005.11.061","id":"longstreth-2006","pmid":"16678561","source":"Gastroenterology. 2006;130(5):1480-1491","title":"Functional bowel disorders","url":"https://doi.org/10.1053/j.gastro.2005.11.061"},"formula_expression":"rome_iii_ibs iff pain_or_discomfort_3_days_per_month_last_3_months and symptom_onset_at_least_6_months_prior and supporting_features_met >= 2; supporting_features_met counts improvement_with_defecation, onset_change_stool_frequency, and onset_change_stool_form (Longstreth 2006 Rome III IBS diagnostic criteria)","purpose":"Apply the Longstreth 2006 Rome III IBS diagnostic criteria and return supporting_features_met (0-3) and whether the published IBS box holds (rome_iii_ibs).","markdown_url":"https://magentlab.com/docs/rome-iii-ibs.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rome_iii_ibs"},{"name":"formula_expression","type":"string","description":"Longstreth 2006 Rome III IBS box: pain/discomfort 3 days/month for 3 months, onset 6 months, and at least 2 of 3 supporting features"},{"name":"supporting_features_met","type":"integer","description":"Count of true supporting features among improvement with defecation, change in stool frequency, and change in stool form (0-3)"},{"name":"rome_iii_ibs","type":"boolean","description":"true only when pain/discomfort, 6-month onset, and at least two supporting features all hold. Not a diagnosis."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met; supporting_features_ge_2 includes value 0-3"},{"name":"citation","type":"object","description":"Longstreth 2006 Gastroenterology citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"improvement_with_defecation":"true","onset_change_stool_form":"false","onset_change_stool_frequency":"true","pain_or_discomfort_3_days_per_month_last_3_months":"true","symptom_onset_at_least_6_months_prior":"true"},{"improvement_with_defecation":"true","onset_change_stool_form":"false","onset_change_stool_frequency":"true","pain_or_discomfort_3_days_per_month_last_3_months":"true","symptom_onset_at_least_6_months_prior":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rome-iii-ibs","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rome-iii-ibs?pain_or_discomfort_3_days_per_month_last_3_months=true&symptom_onset_at_least_6_months_prior=true&improvement_with_defecation=true&onset_change_stool_frequency=true&onset_change_stool_form=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rome-iii-ibs","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rome-iv-ibs","description":"Mearin 2016 Rome IV IBS. rome_iv_ibs is true iff recurrent abdominal pain at least 1 day per week in the last 3 months, onset at least 6 months prior, and at least two of: related to defecation, change in stool frequency, and change in stool form. supporting_features_met is 0-3. Caller assigns five flags. magent does not examine the patient. Not a diagnosis, not Rome III, not IBS subtype.","parameters":[{"in":"query","name":"pain_1_day_per_week_last_3_months","type":"boolean","description":"Recurrent abdominal pain on average at least 1 day per week in the last 3 months (Mearin 2016). Pain only, not discomfort. true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"true"},{"in":"query","name":"symptom_onset_at_least_6_months_prior","type":"boolean","description":"Criteria fulfilled for the last 3 months with symptom onset at least 6 months before diagnosis, as assigned (Mearin 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"},{"in":"query","name":"related_to_defecation","type":"boolean","description":"Pain related to defecation (one of three supporting features; at least two required). true or false as assigned by the caller.","required":true,"example":"true"},{"in":"query","name":"associated_change_stool_frequency","type":"boolean","description":"Pain associated with a change in frequency of stool (one of three supporting features; at least two required). true or false as assigned by the caller.","required":true,"example":"true"},{"in":"query","name":"associated_change_stool_form","type":"boolean","description":"Pain associated with a change in form (appearance) of stool (one of three supporting features; at least two required). true or false as assigned by the caller.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rome-iv-ibs","citation":{"authors":"Mearin F, Lacy BE, Chang L, Chey WD, Lembo AJ, Simren M, Spiller RC","doi":"10.1053/j.gastro.2016.02.031","id":"mearin-2016","pmid":"27144627","source":"Gastroenterology. 2016;150(6):1393-1407","title":"Bowel Disorders","url":"https://doi.org/10.1053/j.gastro.2016.02.031"},"formula_expression":"rome_iv_ibs iff pain_1_day_per_week_last_3_months and symptom_onset_at_least_6_months_prior and supporting_features_met >= 2; supporting_features_met counts related_to_defecation, associated_change_stool_frequency, and associated_change_stool_form (Mearin 2016 Rome IV IBS diagnostic criteria)","purpose":"Apply the Mearin 2016 Rome IV IBS diagnostic criteria and return supporting_features_met (0-3) and whether the published IBS box holds (rome_iv_ibs).","markdown_url":"https://magentlab.com/docs/rome-iv-ibs.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rome_iv_ibs"},{"name":"formula_expression","type":"string","description":"Mearin 2016 Rome IV IBS box: pain at least 1 day/week for 3 months, onset 6 months, and at least 2 of 3 supporting features"},{"name":"supporting_features_met","type":"integer","description":"Count of true supporting features among related to defecation, change in stool frequency, and change in stool form (0-3)"},{"name":"rome_iv_ibs","type":"boolean","description":"true only when pain, 6-month onset, and at least two supporting features all hold. Not a diagnosis."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met; supporting_features_ge_2 includes value 0-3"},{"name":"citation","type":"object","description":"Mearin 2016 Gastroenterology citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"associated_change_stool_form":"false","associated_change_stool_frequency":"true","pain_1_day_per_week_last_3_months":"true","related_to_defecation":"true","symptom_onset_at_least_6_months_prior":"true"},{"associated_change_stool_form":"false","associated_change_stool_frequency":"true","pain_1_day_per_week_last_3_months":"true","related_to_defecation":"true","symptom_onset_at_least_6_months_prior":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rome-iv-ibs","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rome-iv-ibs?pain_1_day_per_week_last_3_months=true&symptom_onset_at_least_6_months_prior=true&related_to_defecation=true&associated_change_stool_frequency=true&associated_change_stool_form=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rome-iv-ibs","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rome-iv-fd","description":"Stanghellini 2016 Rome IV B1 FD. rome_iv_fd is true iff last-3-months criteria with 6-month onset, no structural disease likely to explain symptoms, and PDS (B1a) and/or EPS (B1b). pds iff fullness and/or early satiation >=3 days/week. eps iff epigastric pain and/or burning >=1 day/week. Overlap allowed. Caller assigns six flags. magent does not examine the patient. Not a diagnosis, not Rome III dyspepsia, not Rome IV IBS.","parameters":[{"in":"query","name":"criteria_last_3_months_onset_6_months","type":"boolean","description":"Criteria fulfilled for the last 3 months with symptom onset at least 6 months prior to diagnosis, as assigned (Stanghellini 2016 B1). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"},{"in":"query","name":"no_structural_disease","type":"boolean","description":"No evidence of structural disease (including at upper endoscopy) likely to explain the symptoms, as assigned by the caller (Stanghellini 2016 B1). true or false. magent does not examine the patient or interpret endoscopy.","required":true,"example":"true"},{"in":"query","name":"bothersome_postprandial_fullness_ge_3_days_week","type":"boolean","description":"Bothersome postprandial fullness at least 3 days per week (B1a PDS item; one or both PDS items required for PDS). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"true"},{"in":"query","name":"bothersome_early_satiation_ge_3_days_week","type":"boolean","description":"Bothersome early satiation at least 3 days per week (B1a PDS item; one or both PDS items required for PDS). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"bothersome_epigastric_pain_ge_1_day_week","type":"boolean","description":"Bothersome epigastric pain at least 1 day per week (B1b EPS item; one or both EPS items required for EPS). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"bothersome_epigastric_burning_ge_1_day_week","type":"boolean","description":"Bothersome epigastric burning at least 1 day per week (B1b EPS item; one or both EPS items required for EPS). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rome-iv-fd","citation":{"authors":"Stanghellini V, Chan FKL, Hasler WL, Malagelada JR, Suzuki H, Tack J, Talley NJ","doi":"10.1053/j.gastro.2016.02.011","id":"stanghellini-2016","pmid":"27147122","source":"Gastroenterology. 2016;150(6):1380-1392","title":"Gastroduodenal Disorders","url":"https://doi.org/10.1053/j.gastro.2016.02.011"},"formula_expression":"rome_iv_fd iff criteria_last_3_months_onset_6_months and no_structural_disease and (pds or eps); pds iff bothersome_postprandial_fullness_ge_3_days_week or bothersome_early_satiation_ge_3_days_week; eps iff bothersome_epigastric_pain_ge_1_day_week or bothersome_epigastric_burning_ge_1_day_week (Stanghellini 2016 Rome IV B1 functional dyspepsia)","purpose":"Apply the Stanghellini 2016 Rome IV B1 functional dyspepsia criteria and return whether PDS (B1a), EPS (B1b), and the published FD box hold (rome_iv_fd).","markdown_url":"https://magentlab.com/docs/rome-iv-fd.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rome_iv_fd"},{"name":"formula_expression","type":"string","description":"Stanghellini 2016 Rome IV B1: last 3 months with 6-month onset, no structural disease, and PDS (B1a) and/or EPS (B1b)"},{"name":"pds","type":"boolean","description":"true when either bothersome postprandial fullness or bothersome early satiation holds at least 3 days per week (B1a). Not a diagnosis."},{"name":"eps","type":"boolean","description":"true when either bothersome epigastric pain or bothersome epigastric burning holds at least 1 day per week (B1b). Not a diagnosis."},{"name":"rome_iv_fd","type":"boolean","description":"true only when timing, no structural disease, and PDS and/or EPS all hold. Cardinal symptoms without a subtype are not enough. Not a diagnosis."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met; includes PDS items, EPS items, pds, eps, and pds_or_eps"},{"name":"citation","type":"object","description":"Stanghellini 2016 Gastroenterology citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"bothersome_early_satiation_ge_3_days_week":"false","bothersome_epigastric_burning_ge_1_day_week":"false","bothersome_epigastric_pain_ge_1_day_week":"false","bothersome_postprandial_fullness_ge_3_days_week":"true","criteria_last_3_months_onset_6_months":"true","no_structural_disease":"true"},{"bothersome_early_satiation_ge_3_days_week":"false","bothersome_epigastric_burning_ge_1_day_week":"false","bothersome_epigastric_pain_ge_1_day_week":"false","bothersome_postprandial_fullness_ge_3_days_week":"true","criteria_last_3_months_onset_6_months":"true","no_structural_disease":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rome-iv-fd","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rome-iv-fd?criteria_last_3_months_onset_6_months=true&no_structural_disease=true&bothersome_postprandial_fullness_ge_3_days_week=true&bothersome_early_satiation_ge_3_days_week=false&bothersome_epigastric_pain_ge_1_day_week=false&bothersome_epigastric_burning_ge_1_day_week=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rome-iv-fd","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rome-iv-belching","description":"Stanghellini 2016 Rome IV belching disorders (B2). rome_iv_belching is true iff bothersome (severe enough to impact usual activities) belching from the esophagus or stomach more than 3 days a week, last-3-months criteria, 6-month onset, and belching_origin supragastric (B2a) or gastric (B2b). magent does not measure impedance or take a history. Not a diagnosis, not adult aerophagia, not child H1d aerophagia, not bloating, not FD.","parameters":[{"in":"query","name":"bothersome_belching_more_than_3_days_week","type":"boolean","description":"Bothersome (severe enough to impact usual activities) belching from the esophagus or stomach more than 3 days a week (Stanghellini 2016 Rome IV B2). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"},{"in":"query","name":"fulfilled_last_3_months","type":"boolean","description":"Criteria fulfilled for the last 3 months, as assigned (Stanghellini 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"},{"in":"query","name":"onset_at_least_6_months","type":"boolean","description":"Symptom onset at least 6 months prior to diagnosis, as assigned (Stanghellini 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"},{"in":"query","name":"belching_origin","type":"string","enum":["supragastric","gastric"],"description":"Caller-assigned origin of excessive belching: supragastric (B2a, from the esophagus) or gastric (B2b, from the stomach) (Stanghellini 2016). Objective impedance distinguishes them in the paper; magent does not measure impedance.","required":true,"example":"supragastric"}],"errors":[{"code":"invalid_rome_iv_belching","message":"Rome IV belching needs the Stanghellini 2016 gastroduodenal B2 flags and belching_origin supragastric or gastric. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rome-iv-belching","citation":{"authors":"Stanghellini V, Chan FKL, Hasler WL, Malagelada JR, Suzuki H, Tack J, Talley NJ","doi":"10.1053/j.gastro.2016.02.011","id":"stanghellini-2016","pmid":"27147122","source":"Gastroenterology. 2016;150(6):1380-1392","title":"Gastroduodenal Disorders","url":"https://doi.org/10.1053/j.gastro.2016.02.011"},"formula_expression":"rome_iv_belching iff bothersome_belching_more_than_3_days_week and fulfilled_last_3_months and onset_at_least_6_months and belching_origin in (supragastric, gastric) (Stanghellini 2016 Rome IV belching disorders)","purpose":"Apply the Stanghellini 2016 Rome IV belching disorders (B2) diagnostic criteria and return whether the published B2 box holds (rome_iv_belching), with caller-assigned B2a supragastric or B2b gastric origin.","markdown_url":"https://magentlab.com/docs/rome-iv-belching.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rome_iv_belching"},{"name":"formula_expression","type":"string","description":"Stanghellini 2016 Rome IV B2: bothersome belching from the esophagus or stomach more than 3 days a week, last-3-months criteria, 6-month onset, and belching_origin supragastric (B2a) or gastric (B2b)"},{"name":"rome_iv_belching","type":"boolean","description":"true only when all three required flags hold and belching_origin is supragastric or gastric. Not a diagnosis."},{"name":"belching_origin","type":"string","description":"Caller-assigned origin: supragastric (B2a, esophagus) or gastric (B2b, stomach). magent does not measure impedance."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met for the three required flags and accepted belching_origin"},{"name":"citation","type":"object","description":"Stanghellini 2016 Gastroenterology citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"belching_origin":"supragastric","bothersome_belching_more_than_3_days_week":"true","fulfilled_last_3_months":"true","onset_at_least_6_months":"true"},{"belching_origin":"supragastric","bothersome_belching_more_than_3_days_week":"true","fulfilled_last_3_months":"true","onset_at_least_6_months":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rome-iv-belching","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rome-iv-belching?bothersome_belching_more_than_3_days_week=true&fulfilled_last_3_months=true&onset_at_least_6_months=true&belching_origin=supragastric","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rome-iv-belching","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rome-iv-fc","description":"Mearin 2016 Rome IV C2 FC. rome_iv_fc is true iff last-3-months criteria with 6-month onset, at least 2 of 6 symptoms (straining, lumpy/hard stools, incomplete evacuation, anorectal obstruction, manual maneuvers, fewer than 3 SBM/week), loose stools rare without laxatives, and insufficient IBS criteria. symptom_count is 0-6. Caller assigns nine flags. magent does not examine the patient. Not a diagnosis, not Rome IV IBS, not Manning, not opioid-induced or child constipation.","parameters":[{"in":"query","name":"criteria_last_3_months_onset_6_months","type":"boolean","description":"Criteria fulfilled for the last 3 months with symptom onset at least 6 months prior to diagnosis, as assigned (Mearin 2016 C2). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"},{"in":"query","name":"straining_gt_25_percent","type":"boolean","description":"Straining during more than 25% of defecations (one of six C2 symptom items; at least two required). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"true"},{"in":"query","name":"lumpy_or_hard_stools_gt_25_percent","type":"boolean","description":"Lumpy or hard stools (Bristol stool form types 1-2) more than 25% of defecations (one of six C2 symptom items; at least two required). true or false as assigned by the caller. magent does not inspect stool.","required":true,"example":"false"},{"in":"query","name":"incomplete_evacuation_gt_25_percent","type":"boolean","description":"Sensation of incomplete evacuation more than 25% of defecations (one of six C2 symptom items; at least two required). true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"anorectal_obstruction_gt_25_percent","type":"boolean","description":"Sensation of anorectal obstruction/blockage more than 25% of defecations (one of six C2 symptom items; at least two required). true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"manual_maneuvers_gt_25_percent","type":"boolean","description":"Manual maneuvers to facilitate more than 25% of defecations (one of six C2 symptom items; at least two required). true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"fewer_than_3_sbm_per_week","type":"boolean","description":"Fewer than three spontaneous bowel movements per week (one of six C2 symptom items; at least two required). true or false as assigned by the caller.","required":true,"example":"true"},{"in":"query","name":"loose_stools_rare_without_laxatives","type":"boolean","description":"Loose stools are rarely present without the use of laxatives, as assigned (Mearin 2016 C2). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"true"},{"in":"query","name":"insufficient_criteria_for_ibs","type":"boolean","description":"Insufficient criteria for irritable bowel syndrome, as assigned by the caller (Mearin 2016 C2 requires IBS criteria are not met). true or false. magent does not apply the IBS box.","required":true,"example":"true"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rome-iv-fc","citation":{"authors":"Mearin F, Lacy BE, Chang L, Chey WD, Lembo AJ, Simren M, Spiller RC","doi":"10.1053/j.gastro.2016.02.031","id":"mearin-2016","pmid":"27144627","source":"Gastroenterology. 2016;150(6):1393-1407","title":"Bowel Disorders","url":"https://doi.org/10.1053/j.gastro.2016.02.031"},"formula_expression":"rome_iv_fc iff criteria_last_3_months_onset_6_months and symptom_count >= 2 and loose_stools_rare_without_laxatives and insufficient_criteria_for_ibs; symptom_count counts straining_gt_25_percent, lumpy_or_hard_stools_gt_25_percent, incomplete_evacuation_gt_25_percent, anorectal_obstruction_gt_25_percent, manual_maneuvers_gt_25_percent, and fewer_than_3_sbm_per_week (Mearin 2016 Rome IV C2 functional constipation)","purpose":"Apply the Mearin 2016 Rome IV C2 functional constipation criteria and return symptom_count (0-6) and whether the published C2 box holds (rome_iv_fc).","markdown_url":"https://magentlab.com/docs/rome-iv-fc.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rome_iv_fc"},{"name":"formula_expression","type":"string","description":"Mearin 2016 Rome IV C2: last 3 months with 6-month onset, at least 2 of 6 symptoms, rare loose stools without laxatives, and insufficient IBS criteria"},{"name":"symptom_count","type":"integer","description":"Count of true C2 symptom items among straining, lumpy or hard stools, incomplete evacuation, anorectal obstruction, manual maneuvers, and fewer than 3 spontaneous bowel movements per week (0-6)"},{"name":"rome_iv_fc","type":"boolean","description":"true only when timing, at least two of six symptoms, rare loose stools without laxatives, and insufficient IBS criteria all hold. Not a diagnosis."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met; symptom_count_ge_2 includes value 0-6"},{"name":"citation","type":"object","description":"Mearin 2016 Gastroenterology citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"anorectal_obstruction_gt_25_percent":"false","criteria_last_3_months_onset_6_months":"true","fewer_than_3_sbm_per_week":"true","incomplete_evacuation_gt_25_percent":"false","insufficient_criteria_for_ibs":"true","loose_stools_rare_without_laxatives":"true","lumpy_or_hard_stools_gt_25_percent":"false","manual_maneuvers_gt_25_percent":"false","straining_gt_25_percent":"true"},{"anorectal_obstruction_gt_25_percent":"false","criteria_last_3_months_onset_6_months":"true","fewer_than_3_sbm_per_week":"true","incomplete_evacuation_gt_25_percent":"false","insufficient_criteria_for_ibs":"true","loose_stools_rare_without_laxatives":"true","lumpy_or_hard_stools_gt_25_percent":"false","manual_maneuvers_gt_25_percent":"false","straining_gt_25_percent":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rome-iv-fc","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rome-iv-fc?criteria_last_3_months_onset_6_months=true&straining_gt_25_percent=true&lumpy_or_hard_stools_gt_25_percent=false&incomplete_evacuation_gt_25_percent=false&anorectal_obstruction_gt_25_percent=false&manual_maneuvers_gt_25_percent=false&fewer_than_3_sbm_per_week=true&loose_stools_rare_without_laxatives=true&insufficient_criteria_for_ibs=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rome-iv-fc","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/wexner-constipation","description":"Agachan 1996 constipation scoring system from eight caller-assigned table bands (frequency, painful evacuation, incomplete evacuation, abdominal pain, time per attempt, assistance 0-2, unsuccessful attempts per 24 hours, duration). Total 0-30. constipation true iff score > 15. magent does not take a bowel history. Not a medical device, not a laxative order, not Jorge 1993 fecal incontinence scoring.","parameters":[{"in":"query","name":"frequency","type":"string","enum":["1_2_times_per_1_2_days","2_times_per_week","once_per_week","less_than_once_per_week","less_than_once_per_month"],"description":"Caller-assigned Agachan 1996 frequency of bowel movements. 1_2_times_per_1_2_days (1-2 times per 1-2 days) scores 0; 2_times_per_week scores 1; once_per_week scores 2; less_than_once_per_week scores 3; less_than_once_per_month scores 4. magent does not take a bowel history.","required":true,"example":"1_2_times_per_1_2_days"},{"in":"query","name":"painful_evacuation","type":"string","enum":["never","rarely","sometimes","usually","always"],"description":"Caller-assigned Agachan 1996 painful evacuation effort. never scores 0; rarely 1; sometimes 2; usually 3; always 4. magent does not take a bowel history.","required":true,"example":"never"},{"in":"query","name":"incomplete_evacuation","type":"string","enum":["never","rarely","sometimes","usually","always"],"description":"Caller-assigned Agachan 1996 feeling of incomplete evacuation. never scores 0; rarely 1; sometimes 2; usually 3; always 4. magent does not take a bowel history.","required":true,"example":"never"},{"in":"query","name":"abdominal_pain","type":"string","enum":["never","rarely","sometimes","usually","always"],"description":"Caller-assigned Agachan 1996 abdominal pain. never scores 0; rarely 1; sometimes 2; usually 3; always 4. magent does not take a bowel history.","required":true,"example":"never"},{"in":"query","name":"time_per_attempt","type":"string","enum":["less_than_5","5_10","10_20","20_30","more_than_30"],"description":"Caller-assigned Agachan 1996 minutes in lavatory per attempt. less_than_5 scores 0; 5_10 scores 1; 10_20 scores 2; 20_30 scores 3; more_than_30 scores 4. magent does not time the attempt.","required":true,"example":"less_than_5"},{"in":"query","name":"assistance","type":"string","enum":["without_assistance","stimulative_laxatives","digital_assistance_or_enema"],"description":"Caller-assigned Agachan 1996 type of assistance. without_assistance scores 0; stimulative_laxatives scores 1; digital_assistance_or_enema scores 2. This item is 0-2 in that table, not 0-4. magent does not order laxatives, enemas, or digital assistance.","required":true,"example":"without_assistance"},{"in":"query","name":"unsuccessful_attempts","type":"string","enum":["never","1_3","3_6","6_9","more_than_9"],"description":"Caller-assigned Agachan 1996 unsuccessful attempts for evacuation per 24 hours. never scores 0; 1_3 scores 1; 3_6 scores 2; 6_9 scores 3; more_than_9 scores 4. Adjacent printed ranges overlap; the caller assigns the published band. magent does not take a bowel history.","required":true,"example":"never"},{"in":"query","name":"duration","type":"string","enum":["0","1_5","5_10","10_20","more_than_20"],"description":"Caller-assigned Agachan 1996 duration of constipation in years. 0 scores 0; 1_5 scores 1; 5_10 scores 2; 10_20 scores 3; more_than_20 scores 4. Adjacent printed ranges overlap; the caller assigns the published band. magent does not take a bowel history.","required":true,"example":"0"}],"errors":[{"code":"invalid_wexner_constipation","message":"Constipation score inputs must match Agachan 1996 frequency, evacuation, pain, time, assistance, failures, and duration bands from that paper. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/wexner-constipation","citation":{"authors":"Agachan F, Chen T, Pfeifer J, Reissman P, Wexner SD","doi":"10.1007/BF02056950","id":"agachan-1996","pmid":"8646957","source":"Dis Colon Rectum. 1996;39(6):681-685","title":"A constipation scoring system to simplify evaluation and management of constipated patients","url":"https://doi.org/10.1007/BF02056950"},"formula_expression":"wexner_constipation = frequency + painful_evacuation + incomplete_evacuation + abdominal_pain + time_per_attempt + assistance + unsuccessful_attempts + duration; Agachan 1996 eight-item constipation scoring system; frequency, painful_evacuation, incomplete_evacuation, abdominal_pain, time_per_attempt, unsuccessful_attempts, and duration each 0-4; assistance 0-2; max 30; constipation iff score > 15","purpose":"Sum the eight Agachan 1996 constipation scoring system items from caller-assigned published table bands and return the 0-30 total and whether score > 15.","markdown_url":"https://magentlab.com/docs/wexner-constipation.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"wexner_constipation"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Agachan 1996 constipation scoring system points 0-30"},{"name":"max_score","type":"integer","description":"30"},{"name":"cutoff","type":"integer","description":"15. Agachan 1996 derivation patients all scored more than 15. constipation is true iff score > 15. Score 15 is not constipation by that cut."},{"name":"constipation","type":"boolean","description":"true iff score > 15 (Agachan 1996 derivation cohort). Not Rome. Not an ODS-only extra band. Not a diagnosis."},{"name":"components","type":"array","description":"Per-item Agachan 1996 points"},{"name":"citation","type":"object","description":"Agachan et al. Dis Colon Rectum 1996 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"abdominal_pain":"never","assistance":"without_assistance","duration":"0","frequency":"1_2_times_per_1_2_days","incomplete_evacuation":"never","painful_evacuation":"never","time_per_attempt":"less_than_5","unsuccessful_attempts":"never"},{"abdominal_pain":"never","assistance":"without_assistance","duration":"0","frequency":"1_2_times_per_1_2_days","incomplete_evacuation":"never","painful_evacuation":"never","time_per_attempt":"less_than_5","unsuccessful_attempts":"never"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/wexner-constipation","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/wexner-constipation?frequency=1_2_times_per_1_2_days&painful_evacuation=never&incomplete_evacuation=never&abdominal_pain=never&time_per_attempt=less_than_5&assistance=without_assistance&unsuccessful_attempts=never&duration=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/wexner-constipation","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rome-iv-diarrhea","description":"Mearin 2016 Rome IV C3 functional diarrhea. rome_iv_diarrhea is true iff last-3-months criteria with 6-month onset, loose or watery stools without predominant abdominal pain or bothersome bloating in >25% of stools, and insufficient criteria for diarrhea-predominant IBS. Caller assigns three flags. magent does not examine the patient. Not a diagnosis. Adult C3 only. Not child G5, not IBS-D, not Rome IV IBS, not Manning, not functional constipation.","parameters":[{"in":"query","name":"criteria_last_3_months_onset_6_months","type":"boolean","description":"Criteria fulfilled for the last 3 months with symptom onset at least 6 months prior to diagnosis, as assigned (Mearin 2016 C3). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"},{"in":"query","name":"loose_or_watery_stools_gt_25_percent_without_predominant_pain_or_bloating","type":"boolean","description":"Loose or watery stools, without predominant abdominal pain or bothersome bloating, occurring in more than 25% of stools (Mearin 2016 C3). true or false as assigned by the caller. magent does not inspect stool.","required":true,"example":"true"},{"in":"query","name":"insufficient_criteria_for_ibs_d","type":"boolean","description":"Insufficient criteria for diarrhea-predominant IBS, as assigned by the caller (Mearin 2016 C3 excludes patients who meet IBS-D). true or false. magent does not apply the IBS box.","required":true,"example":"true"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rome-iv-diarrhea","citation":{"authors":"Mearin F, Lacy BE, Chang L, Chey WD, Lembo AJ, Simren M, Spiller RC","doi":"10.1053/j.gastro.2016.02.031","id":"mearin-2016","pmid":"27144627","source":"Gastroenterology. 2016;150(6):1393-1407","title":"Bowel Disorders","url":"https://doi.org/10.1053/j.gastro.2016.02.031"},"formula_expression":"rome_iv_diarrhea iff criteria_last_3_months_onset_6_months and loose_or_watery_stools_gt_25_percent_without_predominant_pain_or_bloating and insufficient_criteria_for_ibs_d (Mearin 2016 Rome IV C3 functional diarrhea)","purpose":"Apply the Mearin 2016 Rome IV C3 functional diarrhea criteria and return whether the published C3 box holds (rome_iv_diarrhea).","markdown_url":"https://magentlab.com/docs/rome-iv-diarrhea.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rome_iv_diarrhea"},{"name":"formula_expression","type":"string","description":"Mearin 2016 Rome IV C3: last 3 months with 6-month onset, loose or watery stools >25% without predominant pain or bloating, and insufficient IBS-D criteria"},{"name":"rome_iv_diarrhea","type":"boolean","description":"true only when timing, loose or watery stools without predominant pain or bloating in >25% of stools, and insufficient IBS-D criteria all hold. Not a diagnosis."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met for the three C3 flags"},{"name":"citation","type":"object","description":"Mearin 2016 Gastroenterology citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"criteria_last_3_months_onset_6_months":"true","insufficient_criteria_for_ibs_d":"true","loose_or_watery_stools_gt_25_percent_without_predominant_pain_or_bloating":"true"},{"criteria_last_3_months_onset_6_months":"true","insufficient_criteria_for_ibs_d":"true","loose_or_watery_stools_gt_25_percent_without_predominant_pain_or_bloating":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rome-iv-diarrhea","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rome-iv-diarrhea?criteria_last_3_months_onset_6_months=true&loose_or_watery_stools_gt_25_percent_without_predominant_pain_or_bloating=true&insufficient_criteria_for_ibs_d=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rome-iv-diarrhea","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rome-iv-bloating","description":"Mearin 2016 Rome IV C4 bloating/distension. rome_iv_bloating is true iff last-3-months criteria with 6-month onset, recurrent bloating or distension ≥1 day/week that predominates, and insufficient criteria for IBS, functional constipation, functional diarrhea, or PDS. Caller assigns three flags. magent does not examine the patient. Not a diagnosis. Adult C4 only. Not child, not IBS, not functional constipation, not functional diarrhea, not PDS or functional dyspepsia.","parameters":[{"in":"query","name":"criteria_last_3_months_onset_6_months","type":"boolean","description":"Criteria fulfilled for the last 3 months with symptom onset at least 6 months prior to diagnosis, as assigned (Mearin 2016 C4). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"},{"in":"query","name":"recurrent_bloating_or_distension_ge_1_day_week_predominant","type":"boolean","description":"Recurrent bloating or visible distension, on average at least 1 day per week, that predominates over other bowel symptoms (Mearin 2016 C4). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"true"},{"in":"query","name":"insufficient_criteria_for_ibs_fc_diarrhea_pds","type":"boolean","description":"Insufficient criteria for IBS, functional constipation, functional diarrhea, or postprandial distress syndrome, as assigned by the caller (Mearin 2016 C4). true or false. magent does not apply those other boxes.","required":true,"example":"true"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rome-iv-bloating","citation":{"authors":"Mearin F, Lacy BE, Chang L, Chey WD, Lembo AJ, Simren M, Spiller RC","doi":"10.1053/j.gastro.2016.02.031","id":"mearin-2016","pmid":"27144627","source":"Gastroenterology. 2016;150(6):1393-1407","title":"Bowel Disorders","url":"https://doi.org/10.1053/j.gastro.2016.02.031"},"formula_expression":"rome_iv_bloating iff criteria_last_3_months_onset_6_months and recurrent_bloating_or_distension_ge_1_day_week_predominant and insufficient_criteria_for_ibs_fc_diarrhea_pds (Mearin 2016 Rome IV C4 functional abdominal bloating/distension)","purpose":"Apply the Mearin 2016 Rome IV C4 functional abdominal bloating/distension criteria and return whether the published C4 box holds (rome_iv_bloating).","markdown_url":"https://magentlab.com/docs/rome-iv-bloating.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rome_iv_bloating"},{"name":"formula_expression","type":"string","description":"Mearin 2016 Rome IV C4: last 3 months with 6-month onset, recurrent bloating or distension ≥1 day/week that predominates, and insufficient IBS, functional constipation, functional diarrhea, or PDS criteria"},{"name":"rome_iv_bloating","type":"boolean","description":"true only when timing, recurrent bloating or distension ≥1 day/week that predominates, and insufficient criteria for IBS, functional constipation, functional diarrhea, or PDS all hold. Not a diagnosis."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met for the three C4 flags"},{"name":"citation","type":"object","description":"Mearin 2016 Gastroenterology citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"criteria_last_3_months_onset_6_months":"true","insufficient_criteria_for_ibs_fc_diarrhea_pds":"true","recurrent_bloating_or_distension_ge_1_day_week_predominant":"true"},{"criteria_last_3_months_onset_6_months":"true","insufficient_criteria_for_ibs_fc_diarrhea_pds":"true","recurrent_bloating_or_distension_ge_1_day_week_predominant":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rome-iv-bloating","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rome-iv-bloating?criteria_last_3_months_onset_6_months=true&recurrent_bloating_or_distension_ge_1_day_week_predominant=true&insufficient_criteria_for_ibs_fc_diarrhea_pds=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rome-iv-bloating","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rome-iv-unspecified-bowel","description":"Mearin 2016 Rome IV C5 unspecified functional bowel. rome_iv_unspecified_bowel is true iff bowel symptoms not attributable to an organic etiology, does not meet criteria for IBS, functional constipation, functional diarrhea, or functional bloating/distension, last-3-months criteria, and 6-month onset. Caller assigns seven flags; magent does not re-score IBS/FC/diarrhea/bloating. Residual C5 only. Not a diagnosis. magent does not examine the patient.","parameters":[{"in":"query","name":"bowel_symptoms_not_attributable_to_organic_etiology","type":"boolean","description":"Bowel symptoms not attributable to an organic etiology, as assigned (Mearin 2016 Rome IV C5). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"true"},{"in":"query","name":"does_not_meet_criteria_for_ibs","type":"boolean","description":"Does not meet criteria for IBS, as assigned by the caller (Mearin 2016 C5). true or false. magent does not re-score the IBS box.","required":true,"example":"true"},{"in":"query","name":"does_not_meet_criteria_for_functional_constipation","type":"boolean","description":"Does not meet criteria for functional constipation, as assigned by the caller (Mearin 2016 C5). true or false. magent does not re-score functional constipation.","required":true,"example":"true"},{"in":"query","name":"does_not_meet_criteria_for_functional_diarrhea","type":"boolean","description":"Does not meet criteria for functional diarrhea, as assigned by the caller (Mearin 2016 C5). true or false. magent does not re-score functional diarrhea.","required":true,"example":"true"},{"in":"query","name":"does_not_meet_criteria_for_functional_bloating_distension","type":"boolean","description":"Does not meet criteria for functional abdominal bloating/distension, as assigned by the caller (Mearin 2016 C5). true or false. magent does not re-score bloating or distension.","required":true,"example":"true"},{"in":"query","name":"fulfilled_last_3_months","type":"boolean","description":"Criteria fulfilled for the last 3 months, as assigned (Mearin 2016 C5). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"},{"in":"query","name":"onset_at_least_6_months","type":"boolean","description":"Symptom onset at least 6 months prior to diagnosis, as assigned (Mearin 2016 C5). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"}],"errors":[{"code":"invalid_rome_iv_unspecified_bowel","message":"Rome IV unspecified functional bowel needs the Mearin 2016 C5 bowel-symptom and exclusion flags. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rome-iv-unspecified-bowel","citation":{"authors":"Mearin F, Lacy BE, Chang L, Chey WD, Lembo AJ, Simren M, Spiller RC","doi":"10.1053/j.gastro.2016.02.031","id":"mearin-2016","pmid":"27144627","source":"Gastroenterology. 2016;150(6):1393-1407","title":"Bowel Disorders","url":"https://doi.org/10.1053/j.gastro.2016.02.031"},"formula_expression":"rome_iv_unspecified_bowel iff bowel_symptoms_not_attributable_to_organic_etiology and does_not_meet_criteria_for_ibs and does_not_meet_criteria_for_functional_constipation and does_not_meet_criteria_for_functional_diarrhea and does_not_meet_criteria_for_functional_bloating_distension and fulfilled_last_3_months and onset_at_least_6_months (Mearin 2016 Rome IV C5 unspecified functional bowel disorder)","purpose":"Apply the Mearin 2016 Rome IV C5 unspecified functional bowel disorder criteria and return whether the published residual C5 box holds (rome_iv_unspecified_bowel).","markdown_url":"https://magentlab.com/docs/rome-iv-unspecified-bowel.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rome_iv_unspecified_bowel"},{"name":"formula_expression","type":"string","description":"Mearin 2016 Rome IV C5: bowel symptoms not attributable to an organic etiology, does not meet criteria for IBS, functional constipation, functional diarrhea, or functional bloating/distension, last-3-months criteria, and 6-month onset"},{"name":"rome_iv_unspecified_bowel","type":"boolean","description":"true only when all seven required flags hold. Residual C5 only. Not a diagnosis."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met for the seven required flags"},{"name":"citation","type":"object","description":"Mearin 2016 Gastroenterology citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"bowel_symptoms_not_attributable_to_organic_etiology":"true","does_not_meet_criteria_for_functional_bloating_distension":"true","does_not_meet_criteria_for_functional_constipation":"true","does_not_meet_criteria_for_functional_diarrhea":"true","does_not_meet_criteria_for_ibs":"true","fulfilled_last_3_months":"true","onset_at_least_6_months":"true"},{"bowel_symptoms_not_attributable_to_organic_etiology":"true","does_not_meet_criteria_for_functional_bloating_distension":"true","does_not_meet_criteria_for_functional_constipation":"true","does_not_meet_criteria_for_functional_diarrhea":"true","does_not_meet_criteria_for_ibs":"true","fulfilled_last_3_months":"true","onset_at_least_6_months":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rome-iv-unspecified-bowel","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rome-iv-unspecified-bowel?bowel_symptoms_not_attributable_to_organic_etiology=true&does_not_meet_criteria_for_ibs=true&does_not_meet_criteria_for_functional_constipation=true&does_not_meet_criteria_for_functional_diarrhea=true&does_not_meet_criteria_for_functional_bloating_distension=true&fulfilled_last_3_months=true&onset_at_least_6_months=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rome-iv-unspecified-bowel","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rome-iv-oic","description":"Mearin 2016 Rome IV C6 OIC. rome_iv_oic is true iff new or worsening constipation when initiating, changing, or increasing opioid therapy, at least 2 of 6 symptoms (straining, lumpy/hard stools, incomplete evacuation, anorectal obstruction, manual maneuvers, fewer than 3 SBM/week), and loose stools rare without laxatives. symptom_count is 0-6. Caller assigns eight flags. magent does not examine the patient or prescribe opioids. Not a diagnosis, not functional constipation C2, not IBS, not child.","parameters":[{"in":"query","name":"new_or_worsening_constipation_on_opioid_change","type":"boolean","description":"New or worsening constipation when initiating, changing, or increasing opioid therapy, as assigned (Mearin 2016 C6). true or false as assigned by the caller. magent does not take a history or prescribe opioids.","required":true,"example":"true"},{"in":"query","name":"straining_gt_25_percent","type":"boolean","description":"Straining during more than 25% of defecations (one of six C6 symptom items; at least two required). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"true"},{"in":"query","name":"lumpy_or_hard_stools_gt_25_percent","type":"boolean","description":"Lumpy or hard stools (Bristol stool form types 1-2) more than 25% of defecations (one of six C6 symptom items; at least two required). true or false as assigned by the caller. magent does not inspect stool.","required":true,"example":"false"},{"in":"query","name":"incomplete_evacuation_gt_25_percent","type":"boolean","description":"Sensation of incomplete evacuation more than 25% of defecations (one of six C6 symptom items; at least two required). true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"anorectal_obstruction_gt_25_percent","type":"boolean","description":"Sensation of anorectal obstruction/blockage more than 25% of defecations (one of six C6 symptom items; at least two required). true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"manual_maneuvers_gt_25_percent","type":"boolean","description":"Manual maneuvers to facilitate more than 25% of defecations (one of six C6 symptom items; at least two required). true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"fewer_than_3_sbm_per_week","type":"boolean","description":"Fewer than three spontaneous bowel movements per week (one of six C6 symptom items; at least two required). true or false as assigned by the caller.","required":true,"example":"true"},{"in":"query","name":"loose_stools_rare_without_laxatives","type":"boolean","description":"Loose stools are rarely present without the use of laxatives, as assigned (Mearin 2016 C6). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"true"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rome-iv-oic","citation":{"authors":"Mearin F, Lacy BE, Chang L, Chey WD, Lembo AJ, Simren M, Spiller RC","doi":"10.1053/j.gastro.2016.02.031","id":"mearin-2016","pmid":"27144627","source":"Gastroenterology. 2016;150(6):1393-1407","title":"Bowel Disorders","url":"https://doi.org/10.1053/j.gastro.2016.02.031"},"formula_expression":"rome_iv_oic iff new_or_worsening_constipation_on_opioid_change and symptom_count >= 2 and loose_stools_rare_without_laxatives; symptom_count counts straining_gt_25_percent, lumpy_or_hard_stools_gt_25_percent, incomplete_evacuation_gt_25_percent, anorectal_obstruction_gt_25_percent, manual_maneuvers_gt_25_percent, and fewer_than_3_sbm_per_week (Mearin 2016 Rome IV C6 opioid-induced constipation)","purpose":"Apply the Mearin 2016 Rome IV C6 opioid-induced constipation criteria and return symptom_count (0-6) and whether the published C6 box holds (rome_iv_oic).","markdown_url":"https://magentlab.com/docs/rome-iv-oic.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rome_iv_oic"},{"name":"formula_expression","type":"string","description":"Mearin 2016 Rome IV C6: new or worsening constipation on opioid change, at least 2 of 6 symptoms, and rare loose stools without laxatives"},{"name":"symptom_count","type":"integer","description":"Count of true C6 symptom items among straining, lumpy or hard stools, incomplete evacuation, anorectal obstruction, manual maneuvers, and fewer than 3 spontaneous bowel movements per week (0-6)"},{"name":"rome_iv_oic","type":"boolean","description":"true only when opioid-change constipation, at least two of six symptoms, and rare loose stools without laxatives all hold. Not a diagnosis."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met; symptom_count_ge_2 includes value 0-6"},{"name":"citation","type":"object","description":"Mearin 2016 Gastroenterology citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"anorectal_obstruction_gt_25_percent":"false","fewer_than_3_sbm_per_week":"true","incomplete_evacuation_gt_25_percent":"false","loose_stools_rare_without_laxatives":"true","lumpy_or_hard_stools_gt_25_percent":"false","manual_maneuvers_gt_25_percent":"false","new_or_worsening_constipation_on_opioid_change":"true","straining_gt_25_percent":"true"},{"anorectal_obstruction_gt_25_percent":"false","fewer_than_3_sbm_per_week":"true","incomplete_evacuation_gt_25_percent":"false","loose_stools_rare_without_laxatives":"true","lumpy_or_hard_stools_gt_25_percent":"false","manual_maneuvers_gt_25_percent":"false","new_or_worsening_constipation_on_opioid_change":"true","straining_gt_25_percent":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rome-iv-oic","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rome-iv-oic?new_or_worsening_constipation_on_opioid_change=true&straining_gt_25_percent=true&lumpy_or_hard_stools_gt_25_percent=false&incomplete_evacuation_gt_25_percent=false&anorectal_obstruction_gt_25_percent=false&manual_maneuvers_gt_25_percent=false&fewer_than_3_sbm_per_week=true&loose_stools_rare_without_laxatives=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rome-iv-oic","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rome-iv-globus","description":"Aziz 2016 Rome IV esophageal globus. rome_iv_globus is true iff nonpainful lump or foreign-body sensation, occurrence between meals, no dysphagia or odynophagia, no gastric inlet patch, not explained by GERD or EoE, no major esophageal motor disorder, last-3-months criteria, and 6-month onset. Caller assigns eight flags. magent does not examine the patient or read endoscopy. Not a diagnosis, not functional heartburn, not Rome IV IBS, not CHS.","parameters":[{"in":"query","name":"nonpainful_lump_or_foreign_body_sensation","type":"boolean","description":"Persistent or intermittent, nonpainful sensation of a lump or foreign body in the throat (Aziz 2016). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"true"},{"in":"query","name":"occurrence_between_meals","type":"boolean","description":"Occurrence of the sensation between meals (Aziz 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"},{"in":"query","name":"no_dysphagia_or_odynophagia","type":"boolean","description":"Absence of dysphagia or odynophagia (Aziz 2016). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"true"},{"in":"query","name":"no_gastric_inlet_patch","type":"boolean","description":"Absence of a gastric inlet patch in the proximal esophagus (Aziz 2016). true or false as assigned by the caller. magent does not read endoscopy.","required":true,"example":"true"},{"in":"query","name":"not_explained_by_gerd_or_eoe","type":"boolean","description":"Absence of evidence that gastroesophageal reflux or eosinophilic esophagitis is the cause of the symptom (Aziz 2016). true or false as assigned by the caller. magent does not read endoscopy.","required":true,"example":"true"},{"in":"query","name":"no_major_esophageal_motor_disorder","type":"boolean","description":"Absence of major esophageal motor disorders (achalasia/EGJ outflow obstruction, diffuse esophageal spasm, jackhammer esophagus, absent peristalsis) (Aziz 2016). true or false as assigned by the caller. magent does not interpret manometry.","required":true,"example":"true"},{"in":"query","name":"fulfilled_last_3_months","type":"boolean","description":"Criteria fulfilled for the last 3 months, as assigned (Aziz 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"},{"in":"query","name":"onset_at_least_6_months","type":"boolean","description":"Symptom onset at least 6 months prior to diagnosis, as assigned (Aziz 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"}],"errors":[{"code":"invalid_rome_iv_globus","message":"Rome IV globus needs the Aziz 2016 esophageal globus flags. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rome-iv-globus","citation":{"authors":"Aziz Q, Fass R, Gyawali CP, Miwa H, Pandolfino JE, Zerbib F","doi":"10.1053/j.gastro.2016.02.012","id":"aziz-2016","pmid":"27144625","source":"Gastroenterology. 2016;150(6):1368-1379","title":"Esophageal Disorders","url":"https://doi.org/10.1053/j.gastro.2016.02.012"},"formula_expression":"rome_iv_globus iff nonpainful_lump_or_foreign_body_sensation and occurrence_between_meals and no_dysphagia_or_odynophagia and no_gastric_inlet_patch and not_explained_by_gerd_or_eoe and no_major_esophageal_motor_disorder and fulfilled_last_3_months and onset_at_least_6_months (Aziz 2016 Rome IV esophageal globus)","purpose":"Apply the Aziz 2016 Rome IV esophageal globus diagnostic criteria and return whether the published globus box holds (rome_iv_globus).","markdown_url":"https://magentlab.com/docs/rome-iv-globus.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rome_iv_globus"},{"name":"formula_expression","type":"string","description":"Aziz 2016 Rome IV esophageal globus: nonpainful lump or foreign-body sensation, occurrence between meals, no dysphagia or odynophagia, no gastric inlet patch, not explained by GERD or EoE, no major esophageal motor disorder, last-3-months criteria, and 6-month onset"},{"name":"rome_iv_globus","type":"boolean","description":"true only when all eight required flags hold. Not a diagnosis."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met for the eight required flags"},{"name":"citation","type":"object","description":"Aziz 2016 Gastroenterology citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"fulfilled_last_3_months":"true","no_dysphagia_or_odynophagia":"true","no_gastric_inlet_patch":"true","no_major_esophageal_motor_disorder":"true","nonpainful_lump_or_foreign_body_sensation":"true","not_explained_by_gerd_or_eoe":"true","occurrence_between_meals":"true","onset_at_least_6_months":"true"},{"fulfilled_last_3_months":"true","no_dysphagia_or_odynophagia":"true","no_gastric_inlet_patch":"true","no_major_esophageal_motor_disorder":"true","nonpainful_lump_or_foreign_body_sensation":"true","not_explained_by_gerd_or_eoe":"true","occurrence_between_meals":"true","onset_at_least_6_months":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rome-iv-globus","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rome-iv-globus?nonpainful_lump_or_foreign_body_sensation=true&occurrence_between_meals=true&no_dysphagia_or_odynophagia=true&no_gastric_inlet_patch=true&not_explained_by_gerd_or_eoe=true&no_major_esophageal_motor_disorder=true&fulfilled_last_3_months=true&onset_at_least_6_months=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rome-iv-globus","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rome-iv-heartburn","description":"Aziz 2016 Rome IV functional heartburn. rome_iv_heartburn is true iff burning retrosternal discomfort, no relief despite optimal antisecretory therapy, not explained by GERD or eosinophilic esophagitis, no major esophageal motor disorder, last-3-months criteria, and 6-month onset. Caller assigns six flags. magent does not prescribe PPI or read pH-impedance. Not a diagnosis, not globus, not reflux hypersensitivity, not Rome IV IBS.","parameters":[{"in":"query","name":"burning_retrosternal_discomfort","type":"boolean","description":"Burning retrosternal discomfort or pain, as assigned (Aziz 2016). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"true"},{"in":"query","name":"no_relief_despite_optimal_antisecretory_therapy","type":"boolean","description":"No symptom relief despite optimal antisecretory therapy, as assigned (Aziz 2016). true or false as assigned by the caller. magent does not prescribe PPI.","required":true,"example":"true"},{"in":"query","name":"not_explained_by_gerd_or_eoe","type":"boolean","description":"Symptoms not explained by GERD or eosinophilic esophagitis, as assigned (Aziz 2016). true or false as assigned by the caller. magent does not read pH-impedance.","required":true,"example":"true"},{"in":"query","name":"no_major_esophageal_motor_disorder","type":"boolean","description":"Absence of a major esophageal motor disorder, as assigned (Aziz 2016). true or false as assigned by the caller. magent does not interpret manometry.","required":true,"example":"true"},{"in":"query","name":"fulfilled_last_3_months","type":"boolean","description":"Criteria fulfilled for the last 3 months, as assigned (Aziz 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"},{"in":"query","name":"onset_at_least_6_months","type":"boolean","description":"Symptom onset at least 6 months prior to diagnosis, as assigned (Aziz 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"}],"errors":[{"code":"invalid_rome_iv_heartburn","message":"Rome IV functional heartburn needs the Aziz 2016 esophageal heartburn flags. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rome-iv-heartburn","citation":{"authors":"Aziz Q, Fass R, Gyawali CP, Miwa H, Pandolfino JE, Zerbib F","doi":"10.1053/j.gastro.2016.02.012","id":"aziz-2016","pmid":"27144625","source":"Gastroenterology. 2016;150(6):1368-1379","title":"Esophageal Disorders","url":"https://doi.org/10.1053/j.gastro.2016.02.012"},"formula_expression":"rome_iv_heartburn iff burning_retrosternal_discomfort and no_relief_despite_optimal_antisecretory_therapy and not_explained_by_gerd_or_eoe and no_major_esophageal_motor_disorder and fulfilled_last_3_months and onset_at_least_6_months (Aziz 2016 Rome IV functional heartburn)","purpose":"Apply the Aziz 2016 Rome IV functional heartburn diagnostic criteria and return whether the published functional heartburn box holds (rome_iv_heartburn).","markdown_url":"https://magentlab.com/docs/rome-iv-heartburn.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rome_iv_heartburn"},{"name":"formula_expression","type":"string","description":"Aziz 2016 Rome IV functional heartburn: burning retrosternal discomfort, no relief despite optimal antisecretory therapy, not explained by GERD or EoE, no major esophageal motor disorder, last-3-months criteria, and 6-month onset"},{"name":"rome_iv_heartburn","type":"boolean","description":"true only when all six required flags hold. Not a diagnosis."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met for the six required flags"},{"name":"citation","type":"object","description":"Aziz 2016 Gastroenterology citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"burning_retrosternal_discomfort":"true","fulfilled_last_3_months":"true","no_major_esophageal_motor_disorder":"true","no_relief_despite_optimal_antisecretory_therapy":"true","not_explained_by_gerd_or_eoe":"true","onset_at_least_6_months":"true"},{"burning_retrosternal_discomfort":"true","fulfilled_last_3_months":"true","no_major_esophageal_motor_disorder":"true","no_relief_despite_optimal_antisecretory_therapy":"true","not_explained_by_gerd_or_eoe":"true","onset_at_least_6_months":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rome-iv-heartburn","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rome-iv-heartburn?burning_retrosternal_discomfort=true&no_relief_despite_optimal_antisecretory_therapy=true&not_explained_by_gerd_or_eoe=true&no_major_esophageal_motor_disorder=true&fulfilled_last_3_months=true&onset_at_least_6_months=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rome-iv-heartburn","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rome-iv-chest-pain","description":"Aziz 2016 Rome IV functional chest pain. rome_iv_chest_pain is true iff retrosternal chest pain or discomfort, no associated heartburn or dysphagia, not explained by GERD or eosinophilic esophagitis, no major esophageal motor disorder, last-3-months criteria, and 6-month onset. Caller assigns six flags, including cardiac rule-out. magent does not examine the patient, rule out ACS, or read manometry. Not a diagnosis, not functional heartburn, not reflux hypersensitivity, not globus.","parameters":[{"in":"query","name":"retrosternal_chest_pain_or_discomfort","type":"boolean","description":"Retrosternal chest pain or discomfort; cardiac causes ruled out by the caller (Aziz 2016). true or false as assigned by the caller. magent does not examine the patient or rule out ACS.","required":true,"example":"true"},{"in":"query","name":"no_associated_heartburn_or_dysphagia","type":"boolean","description":"Absence of associated esophageal symptoms such as heartburn and dysphagia, as assigned (Aziz 2016). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"true"},{"in":"query","name":"not_explained_by_gerd_or_eoe","type":"boolean","description":"Symptoms not explained by GERD or eosinophilic esophagitis, as assigned (Aziz 2016). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"true"},{"in":"query","name":"no_major_esophageal_motor_disorder","type":"boolean","description":"Absence of a major esophageal motor disorder, as assigned (Aziz 2016). true or false as assigned by the caller. magent does not read manometry.","required":true,"example":"true"},{"in":"query","name":"fulfilled_last_3_months","type":"boolean","description":"Criteria fulfilled for the last 3 months, as assigned (Aziz 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"},{"in":"query","name":"onset_at_least_6_months","type":"boolean","description":"Symptom onset at least 6 months prior to diagnosis, as assigned (Aziz 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"}],"errors":[{"code":"invalid_rome_iv_chest_pain","message":"Rome IV functional chest pain needs the Aziz 2016 esophageal chest-pain flags. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rome-iv-chest-pain","citation":{"authors":"Aziz Q, Fass R, Gyawali CP, Miwa H, Pandolfino JE, Zerbib F","doi":"10.1053/j.gastro.2016.02.012","id":"aziz-2016","pmid":"27144625","source":"Gastroenterology. 2016;150(6):1368-1379","title":"Esophageal Disorders","url":"https://doi.org/10.1053/j.gastro.2016.02.012"},"formula_expression":"rome_iv_chest_pain iff retrosternal_chest_pain_or_discomfort and no_associated_heartburn_or_dysphagia and not_explained_by_gerd_or_eoe and no_major_esophageal_motor_disorder and fulfilled_last_3_months and onset_at_least_6_months (Aziz 2016 Rome IV functional chest pain)","purpose":"Apply the Aziz 2016 Rome IV functional chest pain diagnostic criteria and return whether the published functional chest pain box holds (rome_iv_chest_pain).","markdown_url":"https://magentlab.com/docs/rome-iv-chest-pain.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rome_iv_chest_pain"},{"name":"formula_expression","type":"string","description":"Aziz 2016 Rome IV functional chest pain: retrosternal chest pain or discomfort, no associated heartburn or dysphagia, not explained by GERD or EoE, no major esophageal motor disorder, last-3-months criteria, and 6-month onset"},{"name":"rome_iv_chest_pain","type":"boolean","description":"true only when all six required flags hold. Not a diagnosis."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met for the six required flags"},{"name":"citation","type":"object","description":"Aziz 2016 Gastroenterology citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"fulfilled_last_3_months":"true","no_associated_heartburn_or_dysphagia":"true","no_major_esophageal_motor_disorder":"true","not_explained_by_gerd_or_eoe":"true","onset_at_least_6_months":"true","retrosternal_chest_pain_or_discomfort":"true"},{"fulfilled_last_3_months":"true","no_associated_heartburn_or_dysphagia":"true","no_major_esophageal_motor_disorder":"true","not_explained_by_gerd_or_eoe":"true","onset_at_least_6_months":"true","retrosternal_chest_pain_or_discomfort":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rome-iv-chest-pain","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rome-iv-chest-pain?retrosternal_chest_pain_or_discomfort=true&no_associated_heartburn_or_dysphagia=true&not_explained_by_gerd_or_eoe=true&no_major_esophageal_motor_disorder=true&fulfilled_last_3_months=true&onset_at_least_6_months=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rome-iv-chest-pain","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rome-iv-reflux-hypersensitivity","description":"Aziz 2016 Rome IV reflux hypersensitivity. rome_iv_reflux_hypersensitivity is true iff retrosternal heartburn or chest pain, normal endoscopy without EoE, no motor disorder, reflux-triggered despite normal acid, 3- and 6-month timing. Caller assigns six flags. magent does not read pH-impedance or endoscopy. Antisecretory response does not exclude the diagnosis and is not a required flag. Not a diagnosis, not functional heartburn, not GERD/NERD as the primary tool, not globus.","parameters":[{"in":"query","name":"retrosternal_heartburn_or_chest_pain","type":"boolean","description":"Retrosternal symptoms including heartburn and chest pain, as assigned (Aziz 2016). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"true"},{"in":"query","name":"normal_endoscopy_no_eoe","type":"boolean","description":"Normal endoscopy and absence of evidence that eosinophilic esophagitis is the cause, as assigned (Aziz 2016). true or false as assigned by the caller. magent does not read endoscopy.","required":true,"example":"true"},{"in":"query","name":"no_major_esophageal_motor_disorder","type":"boolean","description":"Absence of a major esophageal motor disorder, as assigned (Aziz 2016). true or false as assigned by the caller. magent does not interpret manometry.","required":true,"example":"true"},{"in":"query","name":"symptoms_triggered_by_reflux_despite_normal_acid_exposure","type":"boolean","description":"Evidence that symptoms are triggered by reflux events despite normal acid exposure on pH or pH-impedance, as assigned (Aziz 2016). true or false as assigned by the caller. magent does not parse traces.","required":true,"example":"true"},{"in":"query","name":"fulfilled_last_3_months","type":"boolean","description":"Criteria fulfilled for the last 3 months, as assigned (Aziz 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"},{"in":"query","name":"onset_at_least_6_months","type":"boolean","description":"Symptom onset at least 6 months prior to diagnosis, as assigned (Aziz 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"}],"errors":[{"code":"invalid_rome_iv_reflux_hypersensitivity","message":"Rome IV reflux hypersensitivity needs the Aziz 2016 esophageal reflux-hypersensitivity flags. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rome-iv-reflux-hypersensitivity","citation":{"authors":"Aziz Q, Fass R, Gyawali CP, Miwa H, Pandolfino JE, Zerbib F","doi":"10.1053/j.gastro.2016.02.012","id":"aziz-2016","pmid":"27144625","source":"Gastroenterology. 2016;150(6):1368-1379","title":"Esophageal Disorders","url":"https://doi.org/10.1053/j.gastro.2016.02.012"},"formula_expression":"rome_iv_reflux_hypersensitivity iff retrosternal_heartburn_or_chest_pain and normal_endoscopy_no_eoe and no_major_esophageal_motor_disorder and symptoms_triggered_by_reflux_despite_normal_acid_exposure and fulfilled_last_3_months and onset_at_least_6_months (Aziz 2016 Rome IV reflux hypersensitivity)","purpose":"Apply the Aziz 2016 Rome IV reflux hypersensitivity diagnostic criteria and return whether the published reflux hypersensitivity box holds (rome_iv_reflux_hypersensitivity).","markdown_url":"https://magentlab.com/docs/rome-iv-reflux-hypersensitivity.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rome_iv_reflux_hypersensitivity"},{"name":"formula_expression","type":"string","description":"Aziz 2016 Rome IV reflux hypersensitivity: retrosternal heartburn or chest pain, normal endoscopy without EoE as the cause, no major esophageal motor disorder, symptoms triggered by reflux despite normal acid exposure, last-3-months criteria, and 6-month onset"},{"name":"rome_iv_reflux_hypersensitivity","type":"boolean","description":"true only when all six required flags hold. Not a diagnosis."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met for the six required flags"},{"name":"citation","type":"object","description":"Aziz 2016 Gastroenterology citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"fulfilled_last_3_months":"true","no_major_esophageal_motor_disorder":"true","normal_endoscopy_no_eoe":"true","onset_at_least_6_months":"true","retrosternal_heartburn_or_chest_pain":"true","symptoms_triggered_by_reflux_despite_normal_acid_exposure":"true"},{"fulfilled_last_3_months":"true","no_major_esophageal_motor_disorder":"true","normal_endoscopy_no_eoe":"true","onset_at_least_6_months":"true","retrosternal_heartburn_or_chest_pain":"true","symptoms_triggered_by_reflux_despite_normal_acid_exposure":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rome-iv-reflux-hypersensitivity","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rome-iv-reflux-hypersensitivity?retrosternal_heartburn_or_chest_pain=true&normal_endoscopy_no_eoe=true&no_major_esophageal_motor_disorder=true&symptoms_triggered_by_reflux_despite_normal_acid_exposure=true&fulfilled_last_3_months=true&onset_at_least_6_months=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rome-iv-reflux-hypersensitivity","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rome-iv-functional-dysphagia","description":"Aziz 2016 Rome IV functional dysphagia. rome_iv_functional_dysphagia is true iff sense of food sticking or passing abnormally, no mucosal or structural abnormality, not explained by GERD or eosinophilic esophagitis, no major esophageal motor disorder, last-3-months criteria, and 6-month onset. Caller assigns six flags. magent does not read barium, endoscopy, or manometry. Not a diagnosis, not globus, not oropharyngeal dysphagia. Minor or borderline motor disorders remain compatible.","parameters":[{"in":"query","name":"sense_of_food_sticking_or_passing_abnormally","type":"boolean","description":"Sense of solid and/or liquid foods sticking, lodging, or passing abnormally through the esophagus, as assigned (Aziz 2016). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"true"},{"in":"query","name":"no_mucosal_or_structural_abnormality","type":"boolean","description":"Absence of evidence that esophageal mucosal or structural abnormality is the cause, as assigned (Aziz 2016). true or false as assigned by the caller. magent does not read endoscopy or barium.","required":true,"example":"true"},{"in":"query","name":"not_explained_by_gerd_or_eoe","type":"boolean","description":"Symptoms not explained by GERD or eosinophilic esophagitis, as assigned (Aziz 2016). true or false as assigned by the caller. magent does not read endoscopy.","required":true,"example":"true"},{"in":"query","name":"no_major_esophageal_motor_disorder","type":"boolean","description":"Absence of a major esophageal motor disorder, as assigned (Aziz 2016). true or false as assigned by the caller. magent does not interpret manometry. Minor or borderline motor disorders remain compatible.","required":true,"example":"true"},{"in":"query","name":"fulfilled_last_3_months","type":"boolean","description":"Criteria fulfilled for the last 3 months, as assigned (Aziz 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"},{"in":"query","name":"onset_at_least_6_months","type":"boolean","description":"Symptom onset at least 6 months prior to diagnosis, as assigned (Aziz 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"}],"errors":[{"code":"invalid_rome_iv_functional_dysphagia","message":"Rome IV functional dysphagia needs the Aziz 2016 esophageal dysphagia flags. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rome-iv-functional-dysphagia","citation":{"authors":"Aziz Q, Fass R, Gyawali CP, Miwa H, Pandolfino JE, Zerbib F","doi":"10.1053/j.gastro.2016.02.012","id":"aziz-2016","pmid":"27144625","source":"Gastroenterology. 2016;150(6):1368-1379","title":"Esophageal Disorders","url":"https://doi.org/10.1053/j.gastro.2016.02.012"},"formula_expression":"rome_iv_functional_dysphagia iff sense_of_food_sticking_or_passing_abnormally and no_mucosal_or_structural_abnormality and not_explained_by_gerd_or_eoe and no_major_esophageal_motor_disorder and fulfilled_last_3_months and onset_at_least_6_months (Aziz 2016 Rome IV functional dysphagia)","purpose":"Apply the Aziz 2016 Rome IV functional dysphagia diagnostic criteria and return whether the published functional dysphagia box holds (rome_iv_functional_dysphagia).","markdown_url":"https://magentlab.com/docs/rome-iv-functional-dysphagia.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rome_iv_functional_dysphagia"},{"name":"formula_expression","type":"string","description":"Aziz 2016 Rome IV functional dysphagia: sense of food sticking or passing abnormally, no mucosal or structural abnormality, not explained by GERD or EoE, no major esophageal motor disorder, last-3-months criteria, and 6-month onset"},{"name":"rome_iv_functional_dysphagia","type":"boolean","description":"true only when all six required flags hold. Not a diagnosis."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met for the six required flags"},{"name":"citation","type":"object","description":"Aziz 2016 Gastroenterology citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"fulfilled_last_3_months":"true","no_major_esophageal_motor_disorder":"true","no_mucosal_or_structural_abnormality":"true","not_explained_by_gerd_or_eoe":"true","onset_at_least_6_months":"true","sense_of_food_sticking_or_passing_abnormally":"true"},{"fulfilled_last_3_months":"true","no_major_esophageal_motor_disorder":"true","no_mucosal_or_structural_abnormality":"true","not_explained_by_gerd_or_eoe":"true","onset_at_least_6_months":"true","sense_of_food_sticking_or_passing_abnormally":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rome-iv-functional-dysphagia","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rome-iv-functional-dysphagia?sense_of_food_sticking_or_passing_abnormally=true&no_mucosal_or_structural_abnormality=true&not_explained_by_gerd_or_eoe=true&no_major_esophageal_motor_disorder=true&fulfilled_last_3_months=true&onset_at_least_6_months=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rome-iv-functional-dysphagia","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rome-iv-chs","description":"Stanghellini 2016 Rome IV CHS. rome_iv_chs is true iff stereotypical episodic vomiting resembling CVS, presentation after prolonged excessive cannabis use, relief with sustained cannabis cessation, criteria fulfilled for the last 3 months, and onset at least 6 months prior. pathologic_bathing is supportive and not required. Caller assigns six flags. magent does not take a cannabis history. Not a diagnosis, not cyclic vomiting syndrome.","parameters":[{"in":"query","name":"stereotypical_episodic_vomiting","type":"boolean","description":"Stereotypical episodic vomiting resembling cyclic vomiting syndrome (CVS) in onset, duration, and frequency (Stanghellini 2016). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"true"},{"in":"query","name":"after_prolonged_excessive_cannabis","type":"boolean","description":"Presentation after prolonged excessive cannabis use, as assigned (Stanghellini 2016). true or false as assigned by the caller. magent does not take a cannabis history.","required":true,"example":"true"},{"in":"query","name":"relief_with_sustained_cessation","type":"boolean","description":"Relief of vomiting episodes by sustained cessation of cannabis, as assigned (Stanghellini 2016). true or false as assigned by the caller. magent does not take a cannabis history.","required":true,"example":"true"},{"in":"query","name":"fulfilled_last_3_months","type":"boolean","description":"Criteria fulfilled for the last 3 months, as assigned (Stanghellini 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"},{"in":"query","name":"onset_at_least_6_months","type":"boolean","description":"Symptom onset at least 6 months prior to diagnosis, as assigned (Stanghellini 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"},{"in":"query","name":"pathologic_bathing","type":"boolean","description":"Pathologic bathing behavior (prolonged hot baths or showers), a supportive criterion that is not required for rome_iv_chs (Stanghellini 2016). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"true"}],"errors":[{"code":"invalid_rome_iv_chs","message":"Rome IV CHS needs stereotypical episodic vomiting, cannabis-use onset, relief after cannabis cessation, and the 3-month/6-month timing flags (Stanghellini 2016). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rome-iv-chs","citation":{"authors":"Stanghellini V, Chan FKL, Hasler WL, Malagelada JR, Suzuki H, Tack J, Talley NJ","doi":"10.1053/j.gastro.2016.02.011","id":"stanghellini-2016","pmid":"27147122","source":"Gastroenterology. 2016;150(6):1380-1392","title":"Gastroduodenal Disorders","url":"https://doi.org/10.1053/j.gastro.2016.02.011"},"formula_expression":"rome_iv_chs iff stereotypical_episodic_vomiting and after_prolonged_excessive_cannabis and relief_with_sustained_cessation and fulfilled_last_3_months and onset_at_least_6_months; pathologic_bathing is supportive and not required (Stanghellini 2016 Rome IV cannabinoid hyperemesis syndrome)","purpose":"Apply the Stanghellini 2016 Rome IV cannabinoid hyperemesis syndrome diagnostic criteria and return whether the published CHS box holds (rome_iv_chs) plus the supportive pathologic_bathing flag.","markdown_url":"https://magentlab.com/docs/rome-iv-chs.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rome_iv_chs"},{"name":"formula_expression","type":"string","description":"Stanghellini 2016 Rome IV CHS: stereotypical episodic vomiting, prolonged excessive cannabis use, relief with sustained cessation, last-3-months criteria, and 6-month onset; pathologic bathing is supportive and not required"},{"name":"pathologic_bathing","type":"boolean","description":"Caller-assigned supportive pathologic bathing flag. Reported separately; not required for rome_iv_chs."},{"name":"rome_iv_chs","type":"boolean","description":"true only when all five required flags hold. pathologic_bathing is not required. Not a diagnosis."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met for the five required flags plus supportive pathologic_bathing"},{"name":"citation","type":"object","description":"Stanghellini 2016 Gastroenterology citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"after_prolonged_excessive_cannabis":"true","fulfilled_last_3_months":"true","onset_at_least_6_months":"true","pathologic_bathing":"true","relief_with_sustained_cessation":"true","stereotypical_episodic_vomiting":"true"},{"after_prolonged_excessive_cannabis":"true","fulfilled_last_3_months":"true","onset_at_least_6_months":"true","pathologic_bathing":"true","relief_with_sustained_cessation":"true","stereotypical_episodic_vomiting":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rome-iv-chs","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rome-iv-chs?stereotypical_episodic_vomiting=true&after_prolonged_excessive_cannabis=true&relief_with_sustained_cessation=true&fulfilled_last_3_months=true&onset_at_least_6_months=true&pathologic_bathing=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rome-iv-chs","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rome-iv-cvs","description":"Stanghellini 2016 Rome IV adult CVS B3b. rome_iv_cvs is true iff stereotypical acute vomiting episodes lasting <1 week, ≥3 discrete episodes in the prior year and 2 in 6 months at least 1 week apart, absence of vomiting between episodes, last-3-months criteria, and 6-month onset. migraine_history is supportive and not required. Caller assigns eight flags. magent does not examine the patient. Not a diagnosis, not CHS, not pediatric CVS, not Rome IV IBS.","parameters":[{"in":"query","name":"stereotypical_episodes_acute_lt_1_week","type":"boolean","description":"Stereotypical episodes of vomiting regarding onset (acute) and duration (<1 week) (Stanghellini 2016 Rome IV adult B3b). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"true"},{"in":"query","name":"at_least_three_episodes_prior_year","type":"boolean","description":"At least 3 discrete vomiting episodes in the prior year, as assigned (Stanghellini 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"},{"in":"query","name":"at_least_two_episodes_past_6_months","type":"boolean","description":"At least 2 discrete vomiting episodes in the past 6 months, as assigned (Stanghellini 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"},{"in":"query","name":"episodes_at_least_1_week_apart","type":"boolean","description":"Discrete vomiting episodes occurring at least 1 week apart, as assigned (Stanghellini 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"},{"in":"query","name":"absence_of_vomiting_between_episodes","type":"boolean","description":"Absence of vomiting between episodes; milder symptoms between cycles are allowed (Stanghellini 2016). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"true"},{"in":"query","name":"fulfilled_last_3_months","type":"boolean","description":"Criteria fulfilled for the last 3 months, as assigned (Stanghellini 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"},{"in":"query","name":"onset_at_least_6_months","type":"boolean","description":"Symptom onset at least 6 months prior to diagnosis, as assigned (Stanghellini 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"},{"in":"query","name":"migraine_history","type":"boolean","description":"Personal history of migraine or family history of migraine, a supportive criterion that is not required for rome_iv_cvs (Stanghellini 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"}],"errors":[{"code":"invalid_rome_iv_cvs","message":"Rome IV cyclic vomiting needs the eight Stanghellini 2016 adult B3b flags. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rome-iv-cvs","citation":{"authors":"Stanghellini V, Chan FKL, Hasler WL, Malagelada JR, Suzuki H, Tack J, Talley NJ","doi":"10.1053/j.gastro.2016.02.011","id":"stanghellini-2016","pmid":"27147122","source":"Gastroenterology. 2016;150(6):1380-1392","title":"Gastroduodenal Disorders","url":"https://doi.org/10.1053/j.gastro.2016.02.011"},"formula_expression":"rome_iv_cvs iff stereotypical_episodes_acute_lt_1_week and at_least_three_episodes_prior_year and at_least_two_episodes_past_6_months and episodes_at_least_1_week_apart and absence_of_vomiting_between_episodes and fulfilled_last_3_months and onset_at_least_6_months; migraine_history is supportive and not required (Stanghellini 2016 Rome IV adult cyclic vomiting syndrome B3b)","purpose":"Apply the Stanghellini 2016 Rome IV adult cyclic vomiting syndrome B3b diagnostic criteria and return whether the published CVS box holds (rome_iv_cvs) plus the supportive migraine_history flag.","markdown_url":"https://magentlab.com/docs/rome-iv-cvs.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rome_iv_cvs"},{"name":"formula_expression","type":"string","description":"Stanghellini 2016 Rome IV adult CVS B3b: stereotypical acute episodes <1 week, ≥3 episodes in the prior year and 2 in 6 months at least 1 week apart, absence of vomiting between episodes, last-3-months criteria, and 6-month onset; migraine_history is supportive and not required"},{"name":"migraine_history","type":"boolean","description":"Caller-assigned supportive migraine (personal or family) flag. Reported separately; not required for rome_iv_cvs."},{"name":"rome_iv_cvs","type":"boolean","description":"true only when all seven required flags hold. migraine_history is not required. Not a diagnosis."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met for the seven required flags plus supportive migraine_history"},{"name":"citation","type":"object","description":"Stanghellini 2016 Gastroenterology citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"absence_of_vomiting_between_episodes":"true","at_least_three_episodes_prior_year":"true","at_least_two_episodes_past_6_months":"true","episodes_at_least_1_week_apart":"true","fulfilled_last_3_months":"true","migraine_history":"true","onset_at_least_6_months":"true","stereotypical_episodes_acute_lt_1_week":"true"},{"absence_of_vomiting_between_episodes":"true","at_least_three_episodes_prior_year":"true","at_least_two_episodes_past_6_months":"true","episodes_at_least_1_week_apart":"true","fulfilled_last_3_months":"true","migraine_history":"true","onset_at_least_6_months":"true","stereotypical_episodes_acute_lt_1_week":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rome-iv-cvs","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rome-iv-cvs?stereotypical_episodes_acute_lt_1_week=true&at_least_three_episodes_prior_year=true&at_least_two_episodes_past_6_months=true&episodes_at_least_1_week_apart=true&absence_of_vomiting_between_episodes=true&fulfilled_last_3_months=true&onset_at_least_6_months=true&migraine_history=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rome-iv-cvs","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rome-iv-cnvs","description":"Stanghellini 2016 Rome IV chronic nausea vomiting syndrome (CNVS, B3a). rome_iv_cnvs is true iff bothersome nausea at least 1 day per week and/or one or more vomiting episodes per week as one flag, self-induced vomiting eating disorders regurgitation and rumination excluded, no organic systemic or metabolic explanation including at upper endoscopy, last-3-months criteria, and 6-month onset. magent does not take a history or read endoscopy. Not a diagnosis, not CVS, not CHS, not rumination.","parameters":[{"in":"query","name":"bothersome_nausea_or_vomiting_weekly","type":"boolean","description":"Bothersome (severe enough to impact usual activities) nausea at least 1 day per week and/or one or more vomiting episodes per week (Stanghellini 2016 Rome IV CNVS B3a). One caller flag covering nausea and/or vomiting. true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"},{"in":"query","name":"self_induced_vomiting_eating_disorders_regurgitation_rumination_excluded","type":"boolean","description":"Self-induced vomiting, eating disorders, regurgitation, and rumination have been excluded (Stanghellini 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"},{"in":"query","name":"no_organic_systemic_metabolic_explanation","type":"boolean","description":"No evidence of organic, systemic, or metabolic disease likely to explain the symptoms on routine investigations including at upper endoscopy, as assigned (Stanghellini 2016). true or false as assigned by the caller. magent does not read endoscopy.","required":true,"example":"true"},{"in":"query","name":"fulfilled_last_3_months","type":"boolean","description":"Criteria fulfilled for the last 3 months, as assigned (Stanghellini 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"},{"in":"query","name":"onset_at_least_6_months","type":"boolean","description":"Symptom onset at least 6 months prior to diagnosis, as assigned (Stanghellini 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"}],"errors":[{"code":"invalid_rome_iv_cnvs","message":"Rome IV chronic nausea vomiting needs the Stanghellini 2016 gastroduodenal CNVS flags. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rome-iv-cnvs","citation":{"authors":"Stanghellini V, Chan FKL, Hasler WL, Malagelada JR, Suzuki H, Tack J, Talley NJ","doi":"10.1053/j.gastro.2016.02.011","id":"stanghellini-2016","pmid":"27147122","source":"Gastroenterology. 2016;150(6):1380-1392","title":"Gastroduodenal Disorders","url":"https://doi.org/10.1053/j.gastro.2016.02.011"},"formula_expression":"rome_iv_cnvs iff bothersome_nausea_or_vomiting_weekly and self_induced_vomiting_eating_disorders_regurgitation_rumination_excluded and no_organic_systemic_metabolic_explanation and fulfilled_last_3_months and onset_at_least_6_months (Stanghellini 2016 Rome IV chronic nausea vomiting syndrome)","purpose":"Apply the Stanghellini 2016 Rome IV chronic nausea vomiting syndrome (CNVS, B3a) diagnostic criteria and return whether the published CNVS box holds (rome_iv_cnvs).","markdown_url":"https://magentlab.com/docs/rome-iv-cnvs.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rome_iv_cnvs"},{"name":"formula_expression","type":"string","description":"Stanghellini 2016 Rome IV chronic nausea vomiting syndrome B3a: bothersome nausea at least 1 day per week and/or one or more vomiting episodes per week as one flag, self-induced vomiting eating disorders regurgitation and rumination excluded, no organic systemic or metabolic explanation including at upper endoscopy, last-3-months criteria, and 6-month onset"},{"name":"rome_iv_cnvs","type":"boolean","description":"true only when all five required flags hold. Not a diagnosis."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met for the five required flags"},{"name":"citation","type":"object","description":"Stanghellini 2016 Gastroenterology citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"bothersome_nausea_or_vomiting_weekly":"true","fulfilled_last_3_months":"true","no_organic_systemic_metabolic_explanation":"true","onset_at_least_6_months":"true","self_induced_vomiting_eating_disorders_regurgitation_rumination_excluded":"true"},{"bothersome_nausea_or_vomiting_weekly":"true","fulfilled_last_3_months":"true","no_organic_systemic_metabolic_explanation":"true","onset_at_least_6_months":"true","self_induced_vomiting_eating_disorders_regurgitation_rumination_excluded":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rome-iv-cnvs","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rome-iv-cnvs?bothersome_nausea_or_vomiting_weekly=true&self_induced_vomiting_eating_disorders_regurgitation_rumination_excluded=true&no_organic_systemic_metabolic_explanation=true&fulfilled_last_3_months=true&onset_at_least_6_months=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rome-iv-cnvs","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rome-iv-rumination","description":"Stanghellini 2016 Rome IV rumination syndrome. rome_iv_rumination is true iff persistent or recurrent regurgitation of recently ingested food with subsequent spitting or remastication and swallowing, regurgitation not preceded by retching, last-3-months criteria, and 6-month onset. Supportive remarks (effortless, not preceded by nausea, recognizable food, ceases when acidic) are copy-only and not parsed. magent does not observe regurgitation. Not a diagnosis, not CHS, not CVS, not GERD.","parameters":[{"in":"query","name":"persistent_or_recurrent_regurgitation_of_recently_ingested_food","type":"boolean","description":"Persistent or recurrent regurgitation of recently ingested food into the mouth with subsequent spitting or remastication and swallowing (Stanghellini 2016 Rome IV rumination syndrome B4). true or false as assigned by the caller. magent does not observe regurgitation.","required":true,"example":"true"},{"in":"query","name":"regurgitation_not_preceded_by_retching","type":"boolean","description":"Regurgitation is not preceded by retching (Stanghellini 2016). true or false as assigned by the caller. magent does not observe regurgitation.","required":true,"example":"true"},{"in":"query","name":"fulfilled_last_3_months","type":"boolean","description":"Criteria fulfilled for the last 3 months, as assigned (Stanghellini 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"},{"in":"query","name":"onset_at_least_6_months","type":"boolean","description":"Symptom onset at least 6 months prior to diagnosis, as assigned (Stanghellini 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"}],"errors":[{"code":"invalid_rome_iv_rumination","message":"Rome IV rumination needs the Stanghellini 2016 gastroduodenal rumination flags. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rome-iv-rumination","citation":{"authors":"Stanghellini V, Chan FKL, Hasler WL, Malagelada JR, Suzuki H, Tack J, Talley NJ","doi":"10.1053/j.gastro.2016.02.011","id":"stanghellini-2016","pmid":"27147122","source":"Gastroenterology. 2016;150(6):1380-1392","title":"Gastroduodenal Disorders","url":"https://doi.org/10.1053/j.gastro.2016.02.011"},"formula_expression":"rome_iv_rumination iff persistent_or_recurrent_regurgitation_of_recently_ingested_food and regurgitation_not_preceded_by_retching and fulfilled_last_3_months and onset_at_least_6_months (Stanghellini 2016 Rome IV rumination syndrome)","purpose":"Apply the Stanghellini 2016 Rome IV rumination syndrome (B4) diagnostic criteria and return whether the published rumination box holds (rome_iv_rumination).","markdown_url":"https://magentlab.com/docs/rome-iv-rumination.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rome_iv_rumination"},{"name":"formula_expression","type":"string","description":"Stanghellini 2016 Rome IV rumination syndrome B4: persistent or recurrent regurgitation of recently ingested food with subsequent spitting or remastication and swallowing, regurgitation not preceded by retching, last-3-months criteria, and 6-month onset"},{"name":"rome_iv_rumination","type":"boolean","description":"true only when all four required flags hold. Not a diagnosis."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met for the four required flags"},{"name":"citation","type":"object","description":"Stanghellini 2016 Gastroenterology citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"fulfilled_last_3_months":"true","onset_at_least_6_months":"true","persistent_or_recurrent_regurgitation_of_recently_ingested_food":"true","regurgitation_not_preceded_by_retching":"true"},{"fulfilled_last_3_months":"true","onset_at_least_6_months":"true","persistent_or_recurrent_regurgitation_of_recently_ingested_food":"true","regurgitation_not_preceded_by_retching":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rome-iv-rumination","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rome-iv-rumination?persistent_or_recurrent_regurgitation_of_recently_ingested_food=true&regurgitation_not_preceded_by_retching=true&fulfilled_last_3_months=true&onset_at_least_6_months=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rome-iv-rumination","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rome-iv-caps","description":"Keefer 2016 Rome IV CAPS (formerly FAPS). rome_iv_caps is true iff continuous or nearly continuous abdominal pain, no or only occasional relationship with eating, defecation, or menses, pain limits daily functioning, pain is not feigned, not explained by another GI or medical condition, last-3-months criteria, and 6-month onset. Psychosocial comorbidity is copy-only. magent does not examine or judge feigning beyond the caller flag. Not a diagnosis, not IBS, not narcotic bowel syndrome.","parameters":[{"in":"query","name":"continuous_or_nearly_continuous_abdominal_pain","type":"boolean","description":"Continuous or nearly continuous abdominal pain, as assigned (Keefer 2016 Rome IV CAPS / D1). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"true"},{"in":"query","name":"no_or_only_occasional_relationship_with_physiological_events","type":"boolean","description":"No or only occasional relationship of pain with physiological events (eating, defecation, or menses), as assigned (Keefer 2016). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"true"},{"in":"query","name":"pain_limits_daily_functioning","type":"boolean","description":"Pain limits some aspect of daily functioning, as assigned (Keefer 2016). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"true"},{"in":"query","name":"pain_not_feigned","type":"boolean","description":"The pain is not feigned, as assigned by the caller (Keefer 2016). true or false as assigned by the caller. magent does not judge feigning beyond this flag.","required":true,"example":"true"},{"in":"query","name":"not_explained_by_another_gi_or_medical_condition","type":"boolean","description":"Pain is not explained by another structural or functional gastrointestinal disorder or other medical condition, as assigned (Keefer 2016). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"true"},{"in":"query","name":"fulfilled_last_3_months","type":"boolean","description":"Criteria fulfilled for the last 3 months, as assigned (Keefer 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"},{"in":"query","name":"onset_at_least_6_months","type":"boolean","description":"Symptom onset at least 6 months prior to diagnosis, as assigned (Keefer 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"}],"errors":[{"code":"invalid_rome_iv_caps","message":"Rome IV CAPS needs the Keefer 2016 centrally mediated abdominal pain flags. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rome-iv-caps","citation":{"authors":"Keefer L, Drossman DA, Guthrie E, Simrén M, Tillisch K, Olden K, Whorwell PJ","doi":"10.1053/j.gastro.2016.02.034","id":"keefer-2016","pmid":"27144628","source":"Gastroenterology. 2016;150(6):1408-1419","title":"Centrally Mediated Disorders of Gastrointestinal Pain","url":"https://doi.org/10.1053/j.gastro.2016.02.034"},"formula_expression":"rome_iv_caps iff continuous_or_nearly_continuous_abdominal_pain and no_or_only_occasional_relationship_with_physiological_events and pain_limits_daily_functioning and pain_not_feigned and not_explained_by_another_gi_or_medical_condition and fulfilled_last_3_months and onset_at_least_6_months (Keefer 2016 Rome IV CAPS / D1)","purpose":"Apply the Keefer 2016 Rome IV centrally mediated abdominal pain syndrome (CAPS / D1) diagnostic criteria and return whether the published CAPS box holds (rome_iv_caps).","markdown_url":"https://magentlab.com/docs/rome-iv-caps.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rome_iv_caps"},{"name":"formula_expression","type":"string","description":"Keefer 2016 Rome IV CAPS / D1: continuous or nearly continuous abdominal pain, no or only occasional relationship with eating, defecation, or menses, pain limits daily functioning, pain is not feigned, not explained by another GI or medical condition, last-3-months criteria, and 6-month onset"},{"name":"rome_iv_caps","type":"boolean","description":"true only when all seven required flags hold. Not a diagnosis."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met for the seven required flags"},{"name":"citation","type":"object","description":"Keefer 2016 Gastroenterology citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"continuous_or_nearly_continuous_abdominal_pain":"true","fulfilled_last_3_months":"true","no_or_only_occasional_relationship_with_physiological_events":"true","not_explained_by_another_gi_or_medical_condition":"true","onset_at_least_6_months":"true","pain_limits_daily_functioning":"true","pain_not_feigned":"true"},{"continuous_or_nearly_continuous_abdominal_pain":"true","fulfilled_last_3_months":"true","no_or_only_occasional_relationship_with_physiological_events":"true","not_explained_by_another_gi_or_medical_condition":"true","onset_at_least_6_months":"true","pain_limits_daily_functioning":"true","pain_not_feigned":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rome-iv-caps","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rome-iv-caps?continuous_or_nearly_continuous_abdominal_pain=true&no_or_only_occasional_relationship_with_physiological_events=true&pain_limits_daily_functioning=true&pain_not_feigned=true&not_explained_by_another_gi_or_medical_condition=true&fulfilled_last_3_months=true&onset_at_least_6_months=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rome-iv-caps","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rome-iv-nbs","description":"Keefer 2016 Rome IV NBS (D2). rome_iv_nbs is true iff chronic or frequently recurring abdominal pain on narcotics, pain not explained by a GI diagnosis, at least two of three NBS features, last-3-months criteria, and 6-month onset. nbs_features_met is 0-3. Caller assigns seven flags. ~75 mg oral morphine equivalent is copy-only. magent does not examine the patient or judge opioid dose. Not a diagnosis, not CAPS, not opioid-induced constipation.","parameters":[{"in":"query","name":"chronic_or_frequently_recurring_abdominal_pain_on_narcotics","type":"boolean","description":"Chronic or frequently recurring abdominal pain treated with acute high-dose or chronic narcotics; pain must occur most days, as assigned (Keefer 2016 Rome IV NBS / D2). Patients often take about 75 mg oral morphine equivalent; no particular time frame or dosage is required. true or false as assigned by the caller. magent does not examine the patient or judge opioid dose.","required":true,"example":"true"},{"in":"query","name":"pain_not_explained_by_current_or_previous_gi_diagnosis","type":"boolean","description":"The nature and intensity of the pain is not explained by a current or previous GI diagnosis (a structural diagnosis may exist but is not sufficient to explain the pain), as assigned (Keefer 2016). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"true"},{"in":"query","name":"pain_worsens_or_incompletely_resolves_with_continued_or_escalating_narcotics","type":"boolean","description":"Pain worsens or incompletely resolves with continued or escalating dosages of narcotics (one of three NBS features; at least two required). true or false as assigned by the caller.","required":true,"example":"true"},{"in":"query","name":"marked_worsening_when_dose_wanes_improvement_when_reinstituted","type":"boolean","description":"Marked worsening of pain when the narcotic dose wanes and improvement when narcotics are re-instituted (soar and crash; one of three NBS features; at least two required). true or false as assigned by the caller.","required":true,"example":"true"},{"in":"query","name":"progression_of_frequency_duration_intensity_of_pain_episodes","type":"boolean","description":"Progression of the frequency, duration, and intensity of pain episodes (one of three NBS features; at least two required). true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"fulfilled_last_3_months","type":"boolean","description":"Criteria fulfilled for the last 3 months, as assigned (Keefer 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"},{"in":"query","name":"onset_at_least_6_months","type":"boolean","description":"Symptom onset at least 6 months prior to diagnosis, as assigned (Keefer 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"}],"errors":[{"code":"invalid_rome_iv_nbs","message":"Rome IV narcotic bowel needs the Keefer 2016 centrally mediated NBS flags. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rome-iv-nbs","citation":{"authors":"Keefer L, Drossman DA, Guthrie E, Simrén M, Tillisch K, Olden K, Whorwell PJ","doi":"10.1053/j.gastro.2016.02.034","id":"keefer-2016","pmid":"27144628","source":"Gastroenterology. 2016;150(6):1408-1419","title":"Centrally Mediated Disorders of Gastrointestinal Pain","url":"https://doi.org/10.1053/j.gastro.2016.02.034"},"formula_expression":"rome_iv_nbs iff chronic_or_frequently_recurring_abdominal_pain_on_narcotics and pain_not_explained_by_current_or_previous_gi_diagnosis and nbs_features_met >= 2 and fulfilled_last_3_months and onset_at_least_6_months; nbs_features_met counts pain_worsens_or_incompletely_resolves_with_continued_or_escalating_narcotics, marked_worsening_when_dose_wanes_improvement_when_reinstituted, and progression_of_frequency_duration_intensity_of_pain_episodes (Keefer 2016 Rome IV D2 Narcotic Bowel Syndrome / opioid-induced GI hyperalgesia)","purpose":"Apply the Keefer 2016 Rome IV narcotic bowel syndrome (NBS / D2) diagnostic criteria and return nbs_features_met (0-3) and whether the published NBS box holds (rome_iv_nbs).","markdown_url":"https://magentlab.com/docs/rome-iv-nbs.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rome_iv_nbs"},{"name":"formula_expression","type":"string","description":"Keefer 2016 Rome IV NBS / D2: chronic or frequently recurring abdominal pain on narcotics, pain not explained by a current or previous GI diagnosis, at least 2 of 3 NBS features, last-3-months criteria, and 6-month onset"},{"name":"nbs_features_met","type":"integer","description":"Count of true NBS features among worsening or incomplete resolution with continued or escalating narcotics, marked worsening when the dose wanes with improvement when re-instituted, and progression of frequency, duration, and intensity of pain episodes (0-3)"},{"name":"rome_iv_nbs","type":"boolean","description":"true only when chronic pain on narcotics, pain not explained by a GI diagnosis, at least two NBS features, last-3-months criteria, and 6-month onset all hold. Not a diagnosis."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met; nbs_features_ge_2 includes value 0-3"},{"name":"citation","type":"object","description":"Keefer 2016 Gastroenterology citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"chronic_or_frequently_recurring_abdominal_pain_on_narcotics":"true","fulfilled_last_3_months":"true","marked_worsening_when_dose_wanes_improvement_when_reinstituted":"true","onset_at_least_6_months":"true","pain_not_explained_by_current_or_previous_gi_diagnosis":"true","pain_worsens_or_incompletely_resolves_with_continued_or_escalating_narcotics":"true","progression_of_frequency_duration_intensity_of_pain_episodes":"false"},{"chronic_or_frequently_recurring_abdominal_pain_on_narcotics":"true","fulfilled_last_3_months":"true","marked_worsening_when_dose_wanes_improvement_when_reinstituted":"true","onset_at_least_6_months":"true","pain_not_explained_by_current_or_previous_gi_diagnosis":"true","pain_worsens_or_incompletely_resolves_with_continued_or_escalating_narcotics":"true","progression_of_frequency_duration_intensity_of_pain_episodes":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rome-iv-nbs","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rome-iv-nbs?chronic_or_frequently_recurring_abdominal_pain_on_narcotics=true&pain_not_explained_by_current_or_previous_gi_diagnosis=true&pain_worsens_or_incompletely_resolves_with_continued_or_escalating_narcotics=true&marked_worsening_when_dose_wanes_improvement_when_reinstituted=true&progression_of_frequency_duration_intensity_of_pain_episodes=false&fulfilled_last_3_months=true&onset_at_least_6_months=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rome-iv-nbs","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rome-iv-fecal-incontinence","description":"Rao 2016 Rome IV fecal incontinence. rome_iv_fecal_incontinence is true iff recurrent uncontrolled passage of fecal material, developmental age at least 4 years, last-3-months criteria, and 6-month onset. The research 2–4 episodes in 4 weeks frequency remark is copy-only and not parsed. magent does not examine the patient or read manometry. Not a diagnosis, not pediatric nonretentive fecal incontinence (H3b), not Wexner constipation score.","parameters":[{"in":"query","name":"recurrent_uncontrolled_passage_of_fecal_material","type":"boolean","description":"Recurrent uncontrolled passage of fecal material for at least 3 months in a person with developmental age at least 4 years (Rao 2016 Rome IV fecal incontinence F1 clinical definition). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"true"},{"in":"query","name":"developmental_age_at_least_4","type":"boolean","description":"Developmental age at least 4 years, as assigned (Rao 2016). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"true"},{"in":"query","name":"fulfilled_last_3_months","type":"boolean","description":"Criteria fulfilled for the last 3 months, as assigned (Rao 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"},{"in":"query","name":"onset_at_least_6_months","type":"boolean","description":"Symptom onset at least 6 months prior to diagnosis, as assigned (Rao 2016 research timing, same as other magent Rome tools). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"}],"errors":[{"code":"invalid_rome_iv_fecal_incontinence","message":"Rome IV fecal incontinence needs the Rao 2016 anorectal fecal-incontinence flags. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rome-iv-fecal-incontinence","citation":{"authors":"Rao SSC, Bharucha AE, Chiarioni G, Felt-Bersma R, Knowles C, Malcolm A, Wald A","doi":"10.1053/j.gastro.2016.02.009","id":"rao-2016","pmid":"27144630","source":"Gastroenterology. 2016;150(6):1430-1442","title":"Anorectal Disorders","url":"https://doi.org/10.1053/j.gastro.2016.02.009"},"formula_expression":"rome_iv_fecal_incontinence iff recurrent_uncontrolled_passage_of_fecal_material and developmental_age_at_least_4 and fulfilled_last_3_months and onset_at_least_6_months (Rao 2016 Rome IV fecal incontinence)","purpose":"Apply the Rao 2016 Rome IV fecal incontinence (F1) diagnostic criteria and return whether the published fecal incontinence box holds (rome_iv_fecal_incontinence).","markdown_url":"https://magentlab.com/docs/rome-iv-fecal-incontinence.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rome_iv_fecal_incontinence"},{"name":"formula_expression","type":"string","description":"Rao 2016 Rome IV fecal incontinence F1: recurrent uncontrolled passage of fecal material, developmental age at least 4 years, last-3-months criteria, and 6-month onset"},{"name":"rome_iv_fecal_incontinence","type":"boolean","description":"true only when all four required flags hold. Not a diagnosis."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met for the four required flags"},{"name":"citation","type":"object","description":"Rao 2016 Gastroenterology citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"developmental_age_at_least_4":"true","fulfilled_last_3_months":"true","onset_at_least_6_months":"true","recurrent_uncontrolled_passage_of_fecal_material":"true"},{"developmental_age_at_least_4":"true","fulfilled_last_3_months":"true","onset_at_least_6_months":"true","recurrent_uncontrolled_passage_of_fecal_material":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rome-iv-fecal-incontinence","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rome-iv-fecal-incontinence?recurrent_uncontrolled_passage_of_fecal_material=true&developmental_age_at_least_4=true&fulfilled_last_3_months=true&onset_at_least_6_months=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rome-iv-fecal-incontinence","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rome-iv-levator-ani","description":"Rao 2016 Rome IV levator ani syndrome. rome_iv_levator_ani is true iff chronic or recurrent rectal pain or aching, episodes lasting 30 minutes or longer, tenderness during puborectalis traction (caller assigns; magent does not perform traction), other causes of rectal pain excluded, last-3-months criteria, and 6-month onset. Not a diagnosis, not proctalgia fugax, not unspecified functional anorectal pain (F2b).","parameters":[{"in":"query","name":"chronic_or_recurrent_rectal_pain_or_aching","type":"boolean","description":"Chronic or recurrent rectal pain or aching (Rao 2016 Rome IV levator ani syndrome F2a). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"},{"in":"query","name":"episodes_last_30_minutes_or_longer","type":"boolean","description":"Episodes last 30 minutes or longer (Rao 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"},{"in":"query","name":"tenderness_during_puborectalis_traction","type":"boolean","description":"Tenderness during posterior traction on the puborectalis (Rao 2016 F2a). true or false as assigned by the caller. magent does not perform traction on the puborectalis.","required":true,"example":"true"},{"in":"query","name":"other_causes_of_rectal_pain_excluded","type":"boolean","description":"Other causes of rectal pain excluded (IBD, intramuscular abscess, anal fissure, thrombosed hemorrhoids, prostatitis, coccygodynia, major pelvic-floor structural alteration), as assigned (Rao 2016). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"true"},{"in":"query","name":"fulfilled_last_3_months","type":"boolean","description":"Criteria fulfilled for the last 3 months, as assigned (Rao 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"},{"in":"query","name":"onset_at_least_6_months","type":"boolean","description":"Symptom onset at least 6 months prior to diagnosis, as assigned (Rao 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"}],"errors":[{"code":"invalid_rome_iv_levator_ani","message":"Rome IV levator ani syndrome needs the Rao 2016 anorectal levator-ani flags. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rome-iv-levator-ani","citation":{"authors":"Rao SSC, Bharucha AE, Chiarioni G, Felt-Bersma R, Knowles C, Malcolm A, Wald A","doi":"10.1053/j.gastro.2016.02.009","id":"rao-2016","pmid":"27144630","source":"Gastroenterology. 2016;150(6):1430-1442","title":"Anorectal Disorders","url":"https://doi.org/10.1053/j.gastro.2016.02.009"},"formula_expression":"rome_iv_levator_ani iff chronic_or_recurrent_rectal_pain_or_aching and episodes_last_30_minutes_or_longer and tenderness_during_puborectalis_traction and other_causes_of_rectal_pain_excluded and fulfilled_last_3_months and onset_at_least_6_months (Rao 2016 Rome IV levator ani syndrome)","purpose":"Apply the Rao 2016 Rome IV levator ani syndrome (F2a) diagnostic criteria and return whether the published levator ani box holds (rome_iv_levator_ani).","markdown_url":"https://magentlab.com/docs/rome-iv-levator-ani.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rome_iv_levator_ani"},{"name":"formula_expression","type":"string","description":"Rao 2016 Rome IV levator ani syndrome F2a: chronic or recurrent rectal pain or aching lasting 30 minutes or longer, tenderness during puborectalis traction, other causes of rectal pain excluded, last-3-months criteria, and 6-month onset"},{"name":"rome_iv_levator_ani","type":"boolean","description":"true only when all six required flags hold. Not a diagnosis."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met for the six required flags"},{"name":"citation","type":"object","description":"Rao 2016 Gastroenterology citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"chronic_or_recurrent_rectal_pain_or_aching":"true","episodes_last_30_minutes_or_longer":"true","fulfilled_last_3_months":"true","onset_at_least_6_months":"true","other_causes_of_rectal_pain_excluded":"true","tenderness_during_puborectalis_traction":"true"},{"chronic_or_recurrent_rectal_pain_or_aching":"true","episodes_last_30_minutes_or_longer":"true","fulfilled_last_3_months":"true","onset_at_least_6_months":"true","other_causes_of_rectal_pain_excluded":"true","tenderness_during_puborectalis_traction":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rome-iv-levator-ani","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rome-iv-levator-ani?chronic_or_recurrent_rectal_pain_or_aching=true&episodes_last_30_minutes_or_longer=true&tenderness_during_puborectalis_traction=true&other_causes_of_rectal_pain_excluded=true&fulfilled_last_3_months=true&onset_at_least_6_months=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rome-iv-levator-ani","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rome-iv-proctalgia-fugax","description":"Rao 2016 Rome IV proctalgia fugax (F2c). rome_iv_proctalgia_fugax is true iff recurrent rectal pain unrelated to defecation, episodes seconds to minutes (max 30 min), no anorectal pain between episodes, other causes excluded, last-3-months criteria, and 6-month onset. magent does not examine the rectum. Not a diagnosis, not levator ani, not unspecified functional anorectal pain.","parameters":[{"in":"query","name":"recurrent_rectal_pain_unrelated_to_defecation","type":"boolean","description":"Recurrent episodes of rectal pain unrelated to defecation, as assigned (Rao 2016 Rome IV proctalgia fugax F2c). true or false as assigned by the caller. magent does not examine the rectum.","required":true,"example":"true"},{"in":"query","name":"episodes_seconds_to_minutes_max_30_minutes","type":"boolean","description":"Episodes last from seconds to minutes, with a maximum duration of 30 minutes, as assigned (Rao 2016 F2c). Distinguishes proctalgia fugax from levator ani syndrome (pain lasting 30 minutes or longer). true or false as assigned by the caller. magent does not examine the rectum.","required":true,"example":"true"},{"in":"query","name":"no_anorectal_pain_between_episodes","type":"boolean","description":"Absence of anorectal pain between episodes, as assigned (Rao 2016). true or false as assigned by the caller. magent does not examine the rectum.","required":true,"example":"true"},{"in":"query","name":"other_causes_of_rectal_pain_excluded","type":"boolean","description":"Other causes of rectal pain excluded as assigned: inflammatory bowel disease, intramuscular abscess, anal fissure, thrombosed hemorrhoids, prostatitis, coccygodynia, and major structural alterations of the pelvic floor (Rao 2016). true or false as assigned by the caller. magent does not examine the rectum.","required":true,"example":"true"},{"in":"query","name":"fulfilled_last_3_months","type":"boolean","description":"Criteria fulfilled for the last 3 months, as assigned (Rao 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"},{"in":"query","name":"onset_at_least_6_months","type":"boolean","description":"Symptom onset at least 6 months prior to diagnosis, as assigned (Rao 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"}],"errors":[{"code":"invalid_rome_iv_proctalgia_fugax","message":"Rome IV proctalgia fugax needs the Rao 2016 anorectal proctalgia-fugax flags. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rome-iv-proctalgia-fugax","citation":{"authors":"Rao SSC, Bharucha AE, Chiarioni G, Felt-Bersma R, Knowles C, Malcolm A, Wald A","doi":"10.1053/j.gastro.2016.02.009","id":"rao-2016","pmid":"27144630","source":"Gastroenterology. 2016;150(6):1430-1442","title":"Anorectal Disorders","url":"https://doi.org/10.1053/j.gastro.2016.02.009"},"formula_expression":"rome_iv_proctalgia_fugax iff recurrent_rectal_pain_unrelated_to_defecation and episodes_seconds_to_minutes_max_30_minutes and no_anorectal_pain_between_episodes and other_causes_of_rectal_pain_excluded and fulfilled_last_3_months and onset_at_least_6_months (Rao 2016 Rome IV proctalgia fugax)","purpose":"Apply the Rao 2016 Rome IV proctalgia fugax (F2c) diagnostic criteria and return whether the published proctalgia fugax box holds (rome_iv_proctalgia_fugax).","markdown_url":"https://magentlab.com/docs/rome-iv-proctalgia-fugax.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rome_iv_proctalgia_fugax"},{"name":"formula_expression","type":"string","description":"Rao 2016 Rome IV proctalgia fugax F2c: recurrent rectal pain unrelated to defecation, episodes lasting seconds to minutes with a maximum of 30 minutes, no anorectal pain between episodes, other causes of rectal pain excluded, last-3-months criteria, and 6-month onset"},{"name":"rome_iv_proctalgia_fugax","type":"boolean","description":"true only when all six required flags hold. Not a diagnosis."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met for the six required flags"},{"name":"citation","type":"object","description":"Rao 2016 Gastroenterology citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"episodes_seconds_to_minutes_max_30_minutes":"true","fulfilled_last_3_months":"true","no_anorectal_pain_between_episodes":"true","onset_at_least_6_months":"true","other_causes_of_rectal_pain_excluded":"true","recurrent_rectal_pain_unrelated_to_defecation":"true"},{"episodes_seconds_to_minutes_max_30_minutes":"true","fulfilled_last_3_months":"true","no_anorectal_pain_between_episodes":"true","onset_at_least_6_months":"true","other_causes_of_rectal_pain_excluded":"true","recurrent_rectal_pain_unrelated_to_defecation":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rome-iv-proctalgia-fugax","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rome-iv-proctalgia-fugax?recurrent_rectal_pain_unrelated_to_defecation=true&episodes_seconds_to_minutes_max_30_minutes=true&no_anorectal_pain_between_episodes=true&other_causes_of_rectal_pain_excluded=true&fulfilled_last_3_months=true&onset_at_least_6_months=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rome-iv-proctalgia-fugax","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rome-iv-functional-defecation","description":"Rao 2016 Rome IV F3. rome_iv_functional_defecation is true iff FC and/or IBS-C, at least two of three evacuation tests (balloon expulsion, manometry or anal surface EMG, imaging), last-3-months criteria, and 6-month onset. evacuation_tests_met is 0-3. magent does not perform those tests. Not a diagnosis. Not F3a or F3b as separate diagnoses.","parameters":[{"in":"query","name":"satisfies_fc_and_or_ibs_with_constipation","type":"boolean","description":"The patient already satisfies diagnostic criteria for functional constipation and/or IBS with constipation, as assigned (Rao 2016 F3). true or false as assigned by the caller. magent does not re-run those tools.","required":true,"example":"true"},{"in":"query","name":"abnormal_balloon_expulsion","type":"boolean","description":"Abnormal balloon expulsion test (one of three evacuation tests; at least two required). true or false as assigned by the caller. magent does not perform balloon expulsion.","required":true,"example":"true"},{"in":"query","name":"abnormal_anorectal_evacuation_pattern_manometry_or_emg","type":"boolean","description":"Abnormal anorectal evacuation pattern with manometry or anal surface EMG (one of three evacuation tests; at least two required). true or false as assigned by the caller. magent does not perform manometry or EMG.","required":true,"example":"true"},{"in":"query","name":"impaired_rectal_evacuation_by_imaging","type":"boolean","description":"Impaired rectal evacuation by imaging (one of three evacuation tests; at least two required). true or false as assigned by the caller. magent does not perform imaging.","required":true,"example":"false"},{"in":"query","name":"fulfilled_last_3_months","type":"boolean","description":"Criteria fulfilled for the last 3 months, as assigned (Rao 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"},{"in":"query","name":"onset_at_least_6_months","type":"boolean","description":"Symptom onset at least 6 months prior to diagnosis, as assigned (Rao 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"}],"errors":[{"code":"invalid_rome_iv_functional_defecation","message":"Rome IV functional defecation needs the Rao 2016 F3 constipation and evacuation-test flags. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rome-iv-functional-defecation","citation":{"authors":"Rao SSC, Bharucha AE, Chiarioni G, Felt-Bersma R, Knowles C, Malcolm A, Wald A","doi":"10.1053/j.gastro.2016.02.009","id":"rao-2016","pmid":"27144630","source":"Gastroenterology. 2016;150(6):1430-1442","title":"Anorectal Disorders","url":"https://doi.org/10.1053/j.gastro.2016.02.009"},"formula_expression":"rome_iv_functional_defecation iff satisfies_fc_and_or_ibs_with_constipation and evacuation_tests_met >= 2 and fulfilled_last_3_months and onset_at_least_6_months; evacuation_tests_met counts abnormal_balloon_expulsion, abnormal_anorectal_evacuation_pattern_manometry_or_emg, and impaired_rectal_evacuation_by_imaging (Rao 2016 Rome IV F3 functional defecation disorders)","purpose":"Apply the Rao 2016 Rome IV F3 functional defecation disorders criteria and return evacuation_tests_met (0-3) and whether the published F3 parent box holds (rome_iv_functional_defecation).","markdown_url":"https://magentlab.com/docs/rome-iv-functional-defecation.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rome_iv_functional_defecation"},{"name":"formula_expression","type":"string","description":"Rao 2016 Rome IV F3: FC and/or IBS-C, at least 2 of 3 evacuation tests, last-3-months criteria, and 6-month onset"},{"name":"evacuation_tests_met","type":"integer","description":"Count of true evacuation tests among abnormal balloon expulsion, abnormal anorectal evacuation pattern with manometry or anal surface EMG, and impaired rectal evacuation by imaging (0-3)"},{"name":"rome_iv_functional_defecation","type":"boolean","description":"true only when FC and/or IBS-C, at least two evacuation tests, last-3-months criteria, and 6-month onset all hold. Not a diagnosis."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met; evacuation_tests_ge_2 includes value 0-3"},{"name":"citation","type":"object","description":"Rao 2016 Gastroenterology citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"abnormal_anorectal_evacuation_pattern_manometry_or_emg":"true","abnormal_balloon_expulsion":"true","fulfilled_last_3_months":"true","impaired_rectal_evacuation_by_imaging":"false","onset_at_least_6_months":"true","satisfies_fc_and_or_ibs_with_constipation":"true"},{"abnormal_anorectal_evacuation_pattern_manometry_or_emg":"true","abnormal_balloon_expulsion":"true","fulfilled_last_3_months":"true","impaired_rectal_evacuation_by_imaging":"false","onset_at_least_6_months":"true","satisfies_fc_and_or_ibs_with_constipation":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rome-iv-functional-defecation","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rome-iv-functional-defecation?satisfies_fc_and_or_ibs_with_constipation=true&abnormal_balloon_expulsion=true&abnormal_anorectal_evacuation_pattern_manometry_or_emg=true&impaired_rectal_evacuation_by_imaging=false&fulfilled_last_3_months=true&onset_at_least_6_months=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rome-iv-functional-defecation","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rome-iv-biliary-pain","description":"Cotton 2016 Rome IV E1 biliary pain. rome_iv_biliary_pain is true iff epigastric or RUQ pain builds to a 30-min steady level, occurs at different intervals (not daily), interrupts activities or leads to an ED visit, and is not significantly related to bowel movements or relieved by posture or acid suppression. Supportive flags reported, not required. magent does not examine the patient or read ultrasound, HIDA, or ERCP. Not a diagnosis, not functional gallbladder, not biliary or pancreatic SOD.","parameters":[{"in":"query","name":"epigastric_or_ruq_pain","type":"boolean","description":"Pain located in the epigastrium and/or right upper quadrant (Cotton 2016 Rome IV E1 biliary pain). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"true"},{"in":"query","name":"builds_to_steady_level_lasts_30_min_or_longer","type":"boolean","description":"Pain builds up to a steady level and lasts 30 minutes or longer, as assigned (Cotton 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"},{"in":"query","name":"occurring_at_different_intervals_not_daily","type":"boolean","description":"Pain occurring at different intervals (not daily), as assigned (Cotton 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"},{"in":"query","name":"severe_enough_to_interrupt_activities_or_ed_visit","type":"boolean","description":"Pain severe enough to interrupt daily activities or lead to an emergency department visit, as assigned (Cotton 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"},{"in":"query","name":"not_significantly_related_to_bowel_movements","type":"boolean","description":"Pain not significantly (<20%) related to bowel movements, as assigned (Cotton 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"},{"in":"query","name":"not_significantly_relieved_by_postural_change_or_acid_suppression","type":"boolean","description":"Pain not significantly (<20%) relieved by postural change or acid suppression, as assigned (Cotton 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"},{"in":"query","name":"nausea_and_vomiting","type":"boolean","description":"Pain may be associated with nausea and vomiting, a supportive criterion that is not required for rome_iv_biliary_pain (Cotton 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"},{"in":"query","name":"radiation_to_back_or_right_infra_subscapular","type":"boolean","description":"Pain may radiate to the back and/or right infra subscapular region, a supportive criterion that is not required for rome_iv_biliary_pain (Cotton 2016). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"true"},{"in":"query","name":"waking_from_sleep","type":"boolean","description":"Pain may wake the patient from sleep, a supportive criterion that is not required for rome_iv_biliary_pain (Cotton 2016). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"}],"errors":[{"code":"invalid_rome_iv_biliary_pain","message":"Rome IV biliary pain needs the Cotton 2016 gallbladder and sphincter-of-Oddi pain flags. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rome-iv-biliary-pain","citation":{"authors":"Cotton PB, Elta GH, Carter CR, Pasricha PJ, Corazziari ES","doi":"10.1053/j.gastro.2016.02.033","id":"cotton-2016","pmid":"27144629","source":"Gastroenterology. 2016;150(6):1420-1429","title":"Gallbladder and Sphincter of Oddi Disorders","url":"https://doi.org/10.1053/j.gastro.2016.02.033"},"formula_expression":"rome_iv_biliary_pain iff epigastric_or_ruq_pain and builds_to_steady_level_lasts_30_min_or_longer and occurring_at_different_intervals_not_daily and severe_enough_to_interrupt_activities_or_ed_visit and not_significantly_related_to_bowel_movements and not_significantly_relieved_by_postural_change_or_acid_suppression (Cotton 2016 Rome IV E1 biliary pain). Supportive nausea_and_vomiting, radiation_to_back_or_right_infra_subscapular, waking_from_sleep are reported and not required.","purpose":"Apply the Cotton 2016 Rome IV E1 diagnostic criteria for biliary pain and return whether the published biliary-pain box holds (rome_iv_biliary_pain) plus three supportive flags.","markdown_url":"https://magentlab.com/docs/rome-iv-biliary-pain.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rome_iv_biliary_pain"},{"name":"formula_expression","type":"string","description":"Cotton 2016 Rome IV E1 biliary pain: epigastric or RUQ pain that builds to a steady level lasting 30 minutes or longer, occurs at different intervals (not daily), is severe enough to interrupt daily activities or lead to an ED visit, is not significantly related to bowel movements, and is not significantly relieved by postural change or acid suppression; nausea_and_vomiting, radiation_to_back_or_right_infra_subscapular, and waking_from_sleep are supportive and not required"},{"name":"nausea_and_vomiting","type":"boolean","description":"Caller-assigned supportive nausea and vomiting flag. Reported separately; not required for rome_iv_biliary_pain."},{"name":"radiation_to_back_or_right_infra_subscapular","type":"boolean","description":"Caller-assigned supportive radiation to the back and/or right infra subscapular region. Reported separately; not required for rome_iv_biliary_pain."},{"name":"waking_from_sleep","type":"boolean","description":"Caller-assigned supportive waking from sleep flag. Reported separately; not required for rome_iv_biliary_pain."},{"name":"rome_iv_biliary_pain","type":"boolean","description":"true only when all six required E1 flags hold. Supportive flags are not required. Not a diagnosis."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met for the six required E1 flags plus three supportive flags"},{"name":"citation","type":"object","description":"Cotton 2016 Gastroenterology citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"builds_to_steady_level_lasts_30_min_or_longer":"true","epigastric_or_ruq_pain":"true","nausea_and_vomiting":"true","not_significantly_related_to_bowel_movements":"true","not_significantly_relieved_by_postural_change_or_acid_suppression":"true","occurring_at_different_intervals_not_daily":"true","radiation_to_back_or_right_infra_subscapular":"true","severe_enough_to_interrupt_activities_or_ed_visit":"true","waking_from_sleep":"true"},{"builds_to_steady_level_lasts_30_min_or_longer":"true","epigastric_or_ruq_pain":"true","nausea_and_vomiting":"true","not_significantly_related_to_bowel_movements":"true","not_significantly_relieved_by_postural_change_or_acid_suppression":"true","occurring_at_different_intervals_not_daily":"true","radiation_to_back_or_right_infra_subscapular":"true","severe_enough_to_interrupt_activities_or_ed_visit":"true","waking_from_sleep":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rome-iv-biliary-pain","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rome-iv-biliary-pain?epigastric_or_ruq_pain=true&builds_to_steady_level_lasts_30_min_or_longer=true&occurring_at_different_intervals_not_daily=true&severe_enough_to_interrupt_activities_or_ed_visit=true&not_significantly_related_to_bowel_movements=true&not_significantly_relieved_by_postural_change_or_acid_suppression=true&nausea_and_vomiting=true&radiation_to_back_or_right_infra_subscapular=true&waking_from_sleep=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rome-iv-biliary-pain","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rome-iv-functional-gallbladder","description":"Cotton 2016 Rome IV E1a functional gallbladder disorder. rome_iv_functional_gallbladder is true iff nested E1 biliary pain and absence of gallstones or other structural pathology. low_ef_on_gallbladder_scintigraphy and normal_liver_enzymes_conjugated_bilirubin_amylase_lipase are supportive and not required. Caller assigns nine flags. magent does not read ultrasound, EUS, or HIDA or decide cholecystectomy. Not a diagnosis, not biliary SOD, not pancreatic SOD.","parameters":[{"in":"query","name":"epigastric_or_ruq_pain","type":"boolean","description":"Epigastric or right upper quadrant pain, as assigned (Cotton 2016 Rome IV E1 biliary pain). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"true"},{"in":"query","name":"builds_to_steady_level_lasts_30_min_or_longer","type":"boolean","description":"Pain builds to a steady level and lasts 30 minutes or longer, as assigned (Cotton 2016 E1). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"},{"in":"query","name":"occurring_at_different_intervals_not_daily","type":"boolean","description":"Pain occurring at different intervals (not daily), as assigned (Cotton 2016 E1). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"},{"in":"query","name":"severe_enough_to_interrupt_activities_or_ed_visit","type":"boolean","description":"Pain severe enough to interrupt usual activities or lead to an emergency department visit, as assigned (Cotton 2016 E1). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"},{"in":"query","name":"not_significantly_related_to_bowel_movements","type":"boolean","description":"Pain not significantly related to bowel movements, as assigned (Cotton 2016 E1). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"},{"in":"query","name":"not_significantly_relieved_by_postural_change_or_acid_suppression","type":"boolean","description":"Pain not significantly relieved by postural change or acid suppression, as assigned (Cotton 2016 E1). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"},{"in":"query","name":"absence_of_gallstones_or_other_structural_pathology","type":"boolean","description":"Absence of gallstones or other structural pathology, as assigned (Cotton 2016 Rome IV E1a). true or false as assigned by the caller. magent does not read ultrasound, EUS, or other imaging.","required":true,"example":"true"},{"in":"query","name":"low_ef_on_gallbladder_scintigraphy","type":"boolean","description":"Low ejection fraction on gallbladder scintigraphy, a supportive criterion that is not required for rome_iv_functional_gallbladder (Cotton 2016). true or false as assigned by the caller. magent does not read HIDA or decide cholecystectomy.","required":true,"example":"true"},{"in":"query","name":"normal_liver_enzymes_conjugated_bilirubin_amylase_lipase","type":"boolean","description":"Normal liver enzymes, conjugated bilirubin, and amylase/lipase, a supportive criterion that is not required for rome_iv_functional_gallbladder (Cotton 2016). true or false as assigned by the caller. magent does not read laboratory results.","required":true,"example":"true"}],"errors":[{"code":"invalid_rome_iv_functional_gallbladder","message":"Rome IV functional gallbladder needs the Cotton 2016 E1a biliary-pain and structural-exclusion flags. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rome-iv-functional-gallbladder","citation":{"authors":"Cotton PB, Elta GH, Carter CR, Pasricha PJ, Corazziari ES","doi":"10.1053/j.gastro.2016.02.033","id":"cotton-2016","pmid":"27144629","source":"Gastroenterology. 2016;150(6):1420-1429","title":"Gallbladder and Sphincter of Oddi Disorders","url":"https://doi.org/10.1053/j.gastro.2016.02.033"},"formula_expression":"rome_iv_functional_gallbladder iff epigastric_or_ruq_pain and builds_to_steady_level_lasts_30_min_or_longer and occurring_at_different_intervals_not_daily and severe_enough_to_interrupt_activities_or_ed_visit and not_significantly_related_to_bowel_movements and not_significantly_relieved_by_postural_change_or_acid_suppression and absence_of_gallstones_or_other_structural_pathology (Cotton 2016 Rome IV E1a). low_ef_on_gallbladder_scintigraphy and normal_liver_enzymes_conjugated_bilirubin_amylase_lipase are supportive and not required.","purpose":"Apply the Cotton 2016 Rome IV E1a functional gallbladder disorder diagnostic criteria and return whether the published E1a box holds (rome_iv_functional_gallbladder) plus the two supportive flags.","markdown_url":"https://magentlab.com/docs/rome-iv-functional-gallbladder.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rome_iv_functional_gallbladder"},{"name":"formula_expression","type":"string","description":"Cotton 2016 Rome IV E1a: nested E1 biliary pain plus absence of gallstones or other structural pathology; low_ef_on_gallbladder_scintigraphy and normal_liver_enzymes_conjugated_bilirubin_amylase_lipase are supportive and not required"},{"name":"low_ef_on_gallbladder_scintigraphy","type":"boolean","description":"Caller-assigned supportive low gallbladder ejection fraction on scintigraphy. Reported separately; not required for rome_iv_functional_gallbladder."},{"name":"normal_liver_enzymes_conjugated_bilirubin_amylase_lipase","type":"boolean","description":"Caller-assigned supportive normal liver enzymes, conjugated bilirubin, and amylase/lipase. Reported separately; not required for rome_iv_functional_gallbladder."},{"name":"rome_iv_functional_gallbladder","type":"boolean","description":"true only when all seven required flags hold. Supportive scintigraphy and enzyme flags are not required. Not a diagnosis."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met for the seven required flags plus two supportive flags"},{"name":"citation","type":"object","description":"Cotton 2016 Gastroenterology citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"absence_of_gallstones_or_other_structural_pathology":"true","builds_to_steady_level_lasts_30_min_or_longer":"true","epigastric_or_ruq_pain":"true","low_ef_on_gallbladder_scintigraphy":"true","normal_liver_enzymes_conjugated_bilirubin_amylase_lipase":"true","not_significantly_related_to_bowel_movements":"true","not_significantly_relieved_by_postural_change_or_acid_suppression":"true","occurring_at_different_intervals_not_daily":"true","severe_enough_to_interrupt_activities_or_ed_visit":"true"},{"absence_of_gallstones_or_other_structural_pathology":"true","builds_to_steady_level_lasts_30_min_or_longer":"true","epigastric_or_ruq_pain":"true","low_ef_on_gallbladder_scintigraphy":"true","normal_liver_enzymes_conjugated_bilirubin_amylase_lipase":"true","not_significantly_related_to_bowel_movements":"true","not_significantly_relieved_by_postural_change_or_acid_suppression":"true","occurring_at_different_intervals_not_daily":"true","severe_enough_to_interrupt_activities_or_ed_visit":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rome-iv-functional-gallbladder","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rome-iv-functional-gallbladder?epigastric_or_ruq_pain=true&builds_to_steady_level_lasts_30_min_or_longer=true&occurring_at_different_intervals_not_daily=true&severe_enough_to_interrupt_activities_or_ed_visit=true&not_significantly_related_to_bowel_movements=true&not_significantly_relieved_by_postural_change_or_acid_suppression=true&absence_of_gallstones_or_other_structural_pathology=true&low_ef_on_gallbladder_scintigraphy=true&normal_liver_enzymes_conjugated_bilirubin_amylase_lipase=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rome-iv-functional-gallbladder","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rome-iv-biliary-sod","description":"Cotton 2016 Rome IV E1b functional biliary SOD (former SOD type II). rome_iv_biliary_sod iff six E1 biliary-pain flags, enzymes XOR dilated bile duct, and no stones or other structural abnormalities. Type I (both findings) is organic stenosis, not this box. Type III (neither) is not this box. Supportive amylase/lipase, manometry, and scintigraphy are reported, not required. magent does not read labs, imaging, manometry, or ERCP. Not a diagnosis, not pancreatic SOD, not functional gallbladder.","parameters":[{"in":"query","name":"epigastric_or_ruq_pain","type":"boolean","description":"Episodes of pain located in the epigastrium and/or right upper quadrant (Cotton 2016 E1 biliary pain). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"true"},{"in":"query","name":"builds_to_steady_level_lasts_30_min_or_longer","type":"boolean","description":"Pain builds up to a steady level lasting 30 minutes or longer (Cotton 2016 E1 biliary pain). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"},{"in":"query","name":"occurring_at_different_intervals_not_daily","type":"boolean","description":"Episodes occurring at different intervals (not daily) (Cotton 2016 E1 biliary pain). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"},{"in":"query","name":"severe_enough_to_interrupt_activities_or_ed_visit","type":"boolean","description":"Pain severe enough to interrupt daily activities or lead to an emergency department visit (Cotton 2016 E1 biliary pain). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"true"},{"in":"query","name":"not_significantly_related_to_bowel_movements","type":"boolean","description":"Pain not significantly related to bowel movements (Cotton 2016 E1 biliary pain). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"},{"in":"query","name":"not_significantly_relieved_by_postural_change_or_acid_suppression","type":"boolean","description":"Pain not significantly relieved by postural change or acid suppression (Cotton 2016 E1 biliary pain). true or false as assigned by the caller. magent does not prescribe acid suppression.","required":true,"example":"true"},{"in":"query","name":"elevated_liver_enzymes","type":"boolean","description":"Elevated liver enzymes, as assigned (Cotton 2016 E1b). XOR with dilated_bile_duct: exactly one must be true. true or false as assigned by the caller. magent does not read labs.","required":true,"example":"true"},{"in":"query","name":"dilated_bile_duct","type":"boolean","description":"Dilated bile duct, as assigned (Cotton 2016 E1b). XOR with elevated_liver_enzymes: exactly one must be true. true or false as assigned by the caller. magent does not read imaging.","required":true,"example":"false"},{"in":"query","name":"absence_of_bile_duct_stones_or_other_structural_abnormalities","type":"boolean","description":"Absence of bile duct stones or other structural abnormalities, as assigned (Cotton 2016 E1b). This is the structural flag; there is no separate cholecystectomy boolean. true or false as assigned by the caller. magent does not read imaging or ERCP.","required":true,"example":"true"},{"in":"query","name":"normal_amylase_lipase","type":"boolean","description":"Normal amylase/lipase, a supportive criterion that is not required for rome_iv_biliary_sod (Cotton 2016 E1b). true or false as assigned by the caller. magent does not read labs.","required":true,"example":"true"},{"in":"query","name":"abnormal_sphincter_of_oddi_manometry","type":"boolean","description":"Abnormal sphincter of Oddi manometry, a supportive criterion that is not required for rome_iv_biliary_sod (Cotton 2016 E1b). true or false as assigned by the caller. magent does not read manometry.","required":true,"example":"true"},{"in":"query","name":"hepatobiliary_scintigraphy","type":"boolean","description":"Abnormal hepatobiliary scintigraphy, a supportive criterion that is not required for rome_iv_biliary_sod (Cotton 2016 E1b). true or false as assigned by the caller. magent does not read imaging.","required":true,"example":"true"}],"errors":[{"code":"invalid_rome_iv_biliary_sod","message":"Rome IV biliary SOD needs the Cotton 2016 E1b biliary-pain, enzyme-or-duct, and structural-exclusion flags. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rome-iv-biliary-sod","citation":{"authors":"Cotton PB, Elta GH, Carter CR, Pasricha PJ, Corazziari ES","doi":"10.1053/j.gastro.2016.02.033","id":"cotton-2016","pmid":"27144629","source":"Gastroenterology. 2016;150(6):1420-1429","title":"Gallbladder and Sphincter of Oddi Disorders","url":"https://doi.org/10.1053/j.gastro.2016.02.033"},"formula_expression":"rome_iv_biliary_sod iff epigastric_or_ruq_pain and builds_to_steady_level_lasts_30_min_or_longer and occurring_at_different_intervals_not_daily and severe_enough_to_interrupt_activities_or_ed_visit and not_significantly_related_to_bowel_movements and not_significantly_relieved_by_postural_change_or_acid_suppression and enzymes_xor_dilated and absence_of_bile_duct_stones_or_other_structural_abnormalities; enzymes_xor_dilated is (elevated_liver_enzymes and not dilated_bile_duct) or (dilated_bile_duct and not elevated_liver_enzymes); normal_amylase_lipase, abnormal_sphincter_of_oddi_manometry, and hepatobiliary_scintigraphy are supportive and not required (Cotton 2016 Rome IV E1b)","purpose":"Apply the Cotton 2016 Rome IV E1b functional biliary sphincter of Oddi disorder diagnostic criteria and return whether the published E1b box holds (rome_iv_biliary_sod). Elevated liver enzymes XOR dilated bile duct is required. Supportive flags are reported and not required.","markdown_url":"https://magentlab.com/docs/rome-iv-biliary-sod.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rome_iv_biliary_sod"},{"name":"formula_expression","type":"string","description":"Cotton 2016 Rome IV E1b: six E1 biliary-pain flags, elevated liver enzymes XOR dilated bile duct, and absence of bile-duct stones or other structural abnormalities; supportive amylase/lipase, manometry, and scintigraphy are reported and not required"},{"name":"elevated_liver_enzymes","type":"boolean","description":"Caller-assigned elevated liver enzymes flag. Echoed; XOR with dilated_bile_duct is required."},{"name":"dilated_bile_duct","type":"boolean","description":"Caller-assigned dilated bile duct flag. Echoed; XOR with elevated_liver_enzymes is required."},{"name":"normal_amylase_lipase","type":"boolean","description":"Caller-assigned supportive normal amylase/lipase flag. Reported separately; not required for rome_iv_biliary_sod."},{"name":"abnormal_sphincter_of_oddi_manometry","type":"boolean","description":"Caller-assigned supportive abnormal sphincter of Oddi manometry flag. Reported separately; not required for rome_iv_biliary_sod."},{"name":"hepatobiliary_scintigraphy","type":"boolean","description":"Caller-assigned supportive hepatobiliary scintigraphy flag. Reported separately; not required for rome_iv_biliary_sod."},{"name":"rome_iv_biliary_sod","type":"boolean","description":"true only when the six E1 biliary-pain flags, enzymes XOR dilated duct, and structural absence hold. Supportive flags are not required. Not a diagnosis."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met for the six E1 flags, enzymes XOR dilated duct (value echoes both booleans), structural absence, and the three supportive flags"},{"name":"citation","type":"object","description":"Cotton 2016 Gastroenterology citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"abnormal_sphincter_of_oddi_manometry":"true","absence_of_bile_duct_stones_or_other_structural_abnormalities":"true","builds_to_steady_level_lasts_30_min_or_longer":"true","dilated_bile_duct":"false","elevated_liver_enzymes":"true","epigastric_or_ruq_pain":"true","hepatobiliary_scintigraphy":"true","normal_amylase_lipase":"true","not_significantly_related_to_bowel_movements":"true","not_significantly_relieved_by_postural_change_or_acid_suppression":"true","occurring_at_different_intervals_not_daily":"true","severe_enough_to_interrupt_activities_or_ed_visit":"true"},{"abnormal_sphincter_of_oddi_manometry":"true","absence_of_bile_duct_stones_or_other_structural_abnormalities":"true","builds_to_steady_level_lasts_30_min_or_longer":"true","dilated_bile_duct":"false","elevated_liver_enzymes":"true","epigastric_or_ruq_pain":"true","hepatobiliary_scintigraphy":"true","normal_amylase_lipase":"true","not_significantly_related_to_bowel_movements":"true","not_significantly_relieved_by_postural_change_or_acid_suppression":"true","occurring_at_different_intervals_not_daily":"true","severe_enough_to_interrupt_activities_or_ed_visit":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rome-iv-biliary-sod","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rome-iv-biliary-sod?epigastric_or_ruq_pain=true&builds_to_steady_level_lasts_30_min_or_longer=true&occurring_at_different_intervals_not_daily=true&severe_enough_to_interrupt_activities_or_ed_visit=true&not_significantly_related_to_bowel_movements=true&not_significantly_relieved_by_postural_change_or_acid_suppression=true&elevated_liver_enzymes=true&dilated_bile_duct=false&absence_of_bile_duct_stones_or_other_structural_abnormalities=true&normal_amylase_lipase=true&abnormal_sphincter_of_oddi_manometry=true&hepatobiliary_scintigraphy=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rome-iv-biliary-sod","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rome-iv-pancreatic-sod","description":"Cotton 2016 Rome IV E2 pancreatic sphincter of Oddi disorder. rome_iv_pancreatic_sod is true iff documented recurrent episodes of pancreatitis, other etiologies of pancreatitis excluded, negative endoscopic ultrasound, and abnormal sphincter manometry. Caller assigns four flags. magent does not read EUS, manometry, labs, or imaging. Not a diagnosis, not biliary SOD, not functional gallbladder, not a sphincterotomy recommendation.","parameters":[{"in":"query","name":"documented_recurrent_episodes_of_pancreatitis","type":"boolean","description":"Documented recurrent episodes of pancreatitis (typical pain with amylase or lipase >3 times normal and/or imaging evidence of acute pancreatitis), as assigned (Cotton 2016 Rome IV E2). One caller flag; magent does not split amylase versus imaging. true or false as assigned by the caller. magent does not read labs or imaging.","required":true,"example":"true"},{"in":"query","name":"other_etiologies_of_pancreatitis_excluded","type":"boolean","description":"Other etiologies of pancreatitis excluded, as assigned (Cotton 2016 Rome IV E2). true or false as assigned by the caller. magent does not read labs or imaging.","required":true,"example":"true"},{"in":"query","name":"negative_endoscopic_ultrasound","type":"boolean","description":"Negative endoscopic ultrasound, as assigned (Cotton 2016 Rome IV E2). true or false as assigned by the caller. magent does not read endoscopic ultrasound.","required":true,"example":"true"},{"in":"query","name":"abnormal_sphincter_manometry","type":"boolean","description":"Abnormal sphincter manometry, as assigned (Cotton 2016 Rome IV E2). true or false as assigned by the caller. magent does not read sphincter manometry.","required":true,"example":"true"}],"errors":[{"code":"invalid_rome_iv_pancreatic_sod","message":"Rome IV pancreatic SOD needs the Cotton 2016 E2 recurrent-pancreatitis and investigation flags. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rome-iv-pancreatic-sod","citation":{"authors":"Cotton PB, Elta GH, Carter CR, Pasricha PJ, Corazziari ES","doi":"10.1053/j.gastro.2016.02.033","id":"cotton-2016","pmid":"27144629","source":"Gastroenterology. 2016;150(6):1420-1429","title":"Gallbladder and Sphincter of Oddi Disorders","url":"https://doi.org/10.1053/j.gastro.2016.02.033"},"formula_expression":"rome_iv_pancreatic_sod iff documented_recurrent_episodes_of_pancreatitis and other_etiologies_of_pancreatitis_excluded and negative_endoscopic_ultrasound and abnormal_sphincter_manometry (Cotton 2016 Rome IV E2 pancreatic sphincter of Oddi disorder)","purpose":"Apply the Cotton 2016 Rome IV E2 pancreatic sphincter of Oddi disorder diagnostic criteria and return whether the published pancreatic SOD box holds (rome_iv_pancreatic_sod).","markdown_url":"https://magentlab.com/docs/rome-iv-pancreatic-sod.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rome_iv_pancreatic_sod"},{"name":"formula_expression","type":"string","description":"Cotton 2016 Rome IV E2 pancreatic sphincter of Oddi disorder: documented recurrent episodes of pancreatitis, other etiologies of pancreatitis excluded, negative endoscopic ultrasound, and abnormal sphincter manometry"},{"name":"rome_iv_pancreatic_sod","type":"boolean","description":"true only when all four required flags hold. Not a diagnosis."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met for the four required flags"},{"name":"citation","type":"object","description":"Cotton 2016 Gastroenterology citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"abnormal_sphincter_manometry":"true","documented_recurrent_episodes_of_pancreatitis":"true","negative_endoscopic_ultrasound":"true","other_etiologies_of_pancreatitis_excluded":"true"},{"abnormal_sphincter_manometry":"true","documented_recurrent_episodes_of_pancreatitis":"true","negative_endoscopic_ultrasound":"true","other_etiologies_of_pancreatitis_excluded":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rome-iv-pancreatic-sod","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rome-iv-pancreatic-sod?documented_recurrent_episodes_of_pancreatitis=true&other_etiologies_of_pancreatitis_excluded=true&negative_endoscopic_ultrasound=true&abnormal_sphincter_manometry=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rome-iv-pancreatic-sod","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rome-iv-infant-regurgitation","description":"Benninga 2016 Rome IV G1 infant regurgitation. rome_iv_infant_regurgitation is true iff otherwise_healthy_infant_3_weeks_to_12_months, regurgitation_at_least_twice_daily_for_3_or_more_weeks, and no_retching_hematemesis_aspiration_apnea_ftt_feeding_swallowing_or_abnormal_posturing. magent does not examine the infant. Not a diagnosis, not GERD, not rumination, not child or adolescent Rome IV.","parameters":[{"in":"query","name":"otherwise_healthy_infant_3_weeks_to_12_months","type":"boolean","description":"Otherwise healthy infant 3 weeks to 12 months of age, as assigned (Benninga 2016 Rome IV G1 infant regurgitation). true or false as assigned by the caller. magent does not examine the infant.","required":true,"example":"true"},{"in":"query","name":"regurgitation_at_least_twice_daily_for_3_or_more_weeks","type":"boolean","description":"Regurgitation two or more times per day for 3 or more weeks, as assigned (Benninga 2016). true or false as assigned by the caller. magent does not examine the infant.","required":true,"example":"true"},{"in":"query","name":"no_retching_hematemesis_aspiration_apnea_ftt_feeding_swallowing_or_abnormal_posturing","type":"boolean","description":"No retching, hematemesis, aspiration, apnea, failure to thrive, feeding or swallowing difficulties, or abnormal posturing, as assigned (Benninga 2016). true or false as assigned by the caller. magent does not examine the infant.","required":true,"example":"true"}],"errors":[{"code":"invalid_rome_iv_infant_regurgitation","message":"Rome IV infant regurgitation needs the Benninga 2016 neonate/toddler G1 flags. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rome-iv-infant-regurgitation","citation":{"authors":"Benninga MA, Faure C, Hyman PE, St James Roberts I, Schechter NL, Nurko S","doi":"10.1053/j.gastro.2016.02.016","id":"benninga-2016","pmid":"27144631","source":"Gastroenterology. 2016;150(6):1443-1455","title":"Childhood Functional Gastrointestinal Disorders: Neonate/Toddler","url":"https://doi.org/10.1053/j.gastro.2016.02.016"},"formula_expression":"rome_iv_infant_regurgitation iff otherwise_healthy_infant_3_weeks_to_12_months and regurgitation_at_least_twice_daily_for_3_or_more_weeks and no_retching_hematemesis_aspiration_apnea_ftt_feeding_swallowing_or_abnormal_posturing (Benninga 2016 Rome IV G1 infant regurgitation)","purpose":"Apply the Benninga 2016 Rome IV G1 infant regurgitation diagnostic criteria and return whether the published infant-regurgitation box holds (rome_iv_infant_regurgitation).","markdown_url":"https://magentlab.com/docs/rome-iv-infant-regurgitation.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rome_iv_infant_regurgitation"},{"name":"formula_expression","type":"string","description":"Benninga 2016 Rome IV G1 infant regurgitation: otherwise healthy infant 3 weeks to 12 months, regurgitation two or more times per day for 3 or more weeks, and no retching, hematemesis, aspiration, apnea, failure to thrive, feeding or swallowing difficulties, or abnormal posturing"},{"name":"rome_iv_infant_regurgitation","type":"boolean","description":"true only when all three required flags hold. Not a diagnosis."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met for the three required flags"},{"name":"citation","type":"object","description":"Benninga 2016 Gastroenterology citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"no_retching_hematemesis_aspiration_apnea_ftt_feeding_swallowing_or_abnormal_posturing":"true","otherwise_healthy_infant_3_weeks_to_12_months":"true","regurgitation_at_least_twice_daily_for_3_or_more_weeks":"true"},{"no_retching_hematemesis_aspiration_apnea_ftt_feeding_swallowing_or_abnormal_posturing":"true","otherwise_healthy_infant_3_weeks_to_12_months":"true","regurgitation_at_least_twice_daily_for_3_or_more_weeks":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rome-iv-infant-regurgitation","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rome-iv-infant-regurgitation?otherwise_healthy_infant_3_weeks_to_12_months=true&regurgitation_at_least_twice_daily_for_3_or_more_weeks=true&no_retching_hematemesis_aspiration_apnea_ftt_feeding_swallowing_or_abnormal_posturing=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rome-iv-infant-regurgitation","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rome-iv-infant-colic","description":"Benninga 2016 Rome IV G4 infant colic (clinical). rome_iv_infant_colic is true iff the infant is less than 5 months of age when symptoms start and stop, recurrent prolonged crying, fussing, or irritability without obvious cause that caregivers cannot prevent or resolve, and no evidence of failure to thrive, fever, or illness. Research 3-hour/diary criteria are not parsed. Caller assigns three flags. magent does not examine the infant. Not a diagnosis.","parameters":[{"in":"query","name":"infant_less_than_5_months_when_symptoms_start_and_stop","type":"boolean","description":"An infant who is less than 5 months of age when the symptoms start and stop, as assigned (Benninga 2016 Rome IV G4). true or false as assigned by the caller. magent does not examine the infant.","required":true,"example":"true"},{"in":"query","name":"recurrent_prolonged_crying_fussing_or_irritability_without_obvious_cause","type":"boolean","description":"Recurrent and prolonged periods of infant crying, fussing, or irritability reported by caregivers that occur without obvious cause and cannot be prevented or resolved by caregivers, as assigned (Benninga 2016 Rome IV G4). true or false as assigned by the caller. magent does not examine the infant.","required":true,"example":"true"},{"in":"query","name":"no_failure_to_thrive_fever_or_illness","type":"boolean","description":"No evidence of infant failure to thrive, fever, or illness, as assigned (Benninga 2016 Rome IV G4). true or false as assigned by the caller. magent does not examine the infant.","required":true,"example":"true"}],"errors":[{"code":"invalid_rome_iv_infant_colic","message":"Rome IV infant colic needs the Benninga 2016 neonate/toddler G4 clinical flags. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rome-iv-infant-colic","citation":{"authors":"Benninga MA, Faure C, Hyman PE, St James Roberts I, Schechter NL, Nurko S","doi":"10.1053/j.gastro.2016.02.016","id":"benninga-2016","pmid":"27144631","source":"Gastroenterology. 2016;150(6):1443-1455","title":"Childhood Functional Gastrointestinal Disorders: Neonate/Toddler","url":"https://doi.org/10.1053/j.gastro.2016.02.016"},"formula_expression":"rome_iv_infant_colic iff infant_less_than_5_months_when_symptoms_start_and_stop and recurrent_prolonged_crying_fussing_or_irritability_without_obvious_cause and no_failure_to_thrive_fever_or_illness (Benninga 2016 Rome IV G4 infant colic, clinical criteria)","purpose":"Apply the Benninga 2016 Rome IV G4 infant colic clinical criteria and return whether the published clinical box holds (rome_iv_infant_colic).","markdown_url":"https://magentlab.com/docs/rome-iv-infant-colic.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rome_iv_infant_colic"},{"name":"formula_expression","type":"string","description":"Benninga 2016 Rome IV G4 infant colic clinical criteria: less than 5 months of age when symptoms start and stop, recurrent prolonged crying, fussing, or irritability without obvious cause, and no failure to thrive, fever, or illness"},{"name":"rome_iv_infant_colic","type":"boolean","description":"true only when all three required clinical flags hold. Not a diagnosis."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met for the three required clinical flags"},{"name":"citation","type":"object","description":"Benninga 2016 Gastroenterology citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"infant_less_than_5_months_when_symptoms_start_and_stop":"true","no_failure_to_thrive_fever_or_illness":"true","recurrent_prolonged_crying_fussing_or_irritability_without_obvious_cause":"true"},{"infant_less_than_5_months_when_symptoms_start_and_stop":"true","no_failure_to_thrive_fever_or_illness":"true","recurrent_prolonged_crying_fussing_or_irritability_without_obvious_cause":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rome-iv-infant-colic","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rome-iv-infant-colic?infant_less_than_5_months_when_symptoms_start_and_stop=true&recurrent_prolonged_crying_fussing_or_irritability_without_obvious_cause=true&no_failure_to_thrive_fever_or_illness=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rome-iv-infant-colic","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rome-iv-infant-dyschezia","description":"Benninga 2016 Rome IV G6 infant dyschezia. rome_iv_infant_dyschezia is true iff infant_less_than_9_months, straining_and_crying_at_least_10_minutes_before_soft_stools, and no_other_health_problems. Caller assigns three flags. magent does not examine the infant. Not a diagnosis, not infant functional constipation, not adult Rome IV FC.","parameters":[{"in":"query","name":"infant_less_than_9_months","type":"boolean","description":"Infant less than 9 months of age, as assigned (Benninga 2016 Rome IV G6). true or false as assigned by the caller. magent does not examine the infant.","required":true,"example":"true"},{"in":"query","name":"straining_and_crying_at_least_10_minutes_before_soft_stools","type":"boolean","description":"At least 10 minutes of straining and crying before successful or unsuccessful passage of soft stools, as assigned (Benninga 2016 Rome IV G6). true or false as assigned by the caller. magent does not examine the infant.","required":true,"example":"true"},{"in":"query","name":"no_other_health_problems","type":"boolean","description":"No other health problems, as assigned (Benninga 2016 Rome IV G6). true or false as assigned by the caller. magent does not examine the infant.","required":true,"example":"true"}],"errors":[{"code":"invalid_rome_iv_infant_dyschezia","message":"Rome IV infant dyschezia needs the Benninga 2016 neonate/toddler G6 flags. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rome-iv-infant-dyschezia","citation":{"authors":"Benninga MA, Faure C, Hyman PE, St James Roberts I, Schechter NL, Nurko S","doi":"10.1053/j.gastro.2016.02.016","id":"benninga-2016","pmid":"27144631","source":"Gastroenterology. 2016;150(6):1443-1455","title":"Childhood Functional Gastrointestinal Disorders: Neonate/Toddler","url":"https://doi.org/10.1053/j.gastro.2016.02.016"},"formula_expression":"rome_iv_infant_dyschezia iff infant_less_than_9_months and straining_and_crying_at_least_10_minutes_before_soft_stools and no_other_health_problems (Benninga 2016 Rome IV G6 infant dyschezia)","purpose":"Apply the Benninga 2016 Rome IV G6 infant dyschezia diagnostic criteria and return whether the published infant dyschezia box holds (rome_iv_infant_dyschezia).","markdown_url":"https://magentlab.com/docs/rome-iv-infant-dyschezia.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rome_iv_infant_dyschezia"},{"name":"formula_expression","type":"string","description":"Benninga 2016 Rome IV G6 infant dyschezia: infant less than 9 months, at least 10 minutes of straining and crying before successful or unsuccessful passage of soft stools, and no other health problems"},{"name":"rome_iv_infant_dyschezia","type":"boolean","description":"true only when all three required flags hold. Not a diagnosis."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met for the three required flags"},{"name":"citation","type":"object","description":"Benninga 2016 Gastroenterology citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"infant_less_than_9_months":"true","no_other_health_problems":"true","straining_and_crying_at_least_10_minutes_before_soft_stools":"true"},{"infant_less_than_9_months":"true","no_other_health_problems":"true","straining_and_crying_at_least_10_minutes_before_soft_stools":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rome-iv-infant-dyschezia","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rome-iv-infant-dyschezia?infant_less_than_9_months=true&straining_and_crying_at_least_10_minutes_before_soft_stools=true&no_other_health_problems=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rome-iv-infant-dyschezia","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rome-iv-infant-constipation","description":"Benninga 2016 Rome IV G7. rome_iv_infant_constipation is true iff duration_at_least_1_month and features_met >= 2. features_met always counts five core flags; if toilet_trained also counts incontinence after toileting and stools that may obstruct the toilet. Caller assigns flags including large_fecal_mass_in_rectum. magent does not examine the infant. Not a diagnosis, not adult Rome IV FC, not child H3a.","parameters":[{"in":"query","name":"toilet_trained","type":"boolean","description":"Toilet-trained as assigned (Benninga 2016 Rome IV G7). When true, incontinence_after_toileting_at_least_weekly and large_diameter_stools_that_may_obstruct_toilet count toward features_met. true or false as assigned by the caller. magent does not examine the infant.","required":true,"example":"false"},{"in":"query","name":"two_or_fewer_defecations_per_week","type":"boolean","description":"Two or fewer defecations per week, as assigned (Benninga 2016 Rome IV G7; one of five core features). true or false as assigned by the caller. magent does not examine the infant.","required":true,"example":"true"},{"in":"query","name":"history_of_excessive_stool_retention","type":"boolean","description":"History of excessive stool retention, as assigned (Benninga 2016 Rome IV G7; one of five core features). true or false as assigned by the caller. magent does not examine the infant.","required":true,"example":"false"},{"in":"query","name":"history_of_painful_or_hard_bowel_movements","type":"boolean","description":"History of painful or hard bowel movements, as assigned (Benninga 2016 Rome IV G7; one of five core features). true or false as assigned by the caller. magent does not examine the infant.","required":true,"example":"true"},{"in":"query","name":"history_of_large_diameter_stools","type":"boolean","description":"History of large-diameter stools, as assigned (Benninga 2016 Rome IV G7; one of five core features). true or false as assigned by the caller. magent does not examine the infant.","required":true,"example":"false"},{"in":"query","name":"large_fecal_mass_in_rectum","type":"boolean","description":"Large fecal mass in the rectum, as assigned (Benninga 2016 Rome IV G7; one of five core features). Digital rectal exam is caller-assigned. true or false as assigned by the caller. magent does not examine the infant.","required":true,"example":"false"},{"in":"query","name":"incontinence_after_toileting_at_least_weekly","type":"boolean","description":"At least one episode per week of incontinence after the acquisition of toileting skills, as assigned (Benninga 2016 Rome IV G7 extra; counted only when toilet_trained is true). true or false as assigned by the caller. magent does not examine the infant.","required":true,"example":"false"},{"in":"query","name":"large_diameter_stools_that_may_obstruct_toilet","type":"boolean","description":"History of large-diameter stools that may obstruct the toilet, as assigned (Benninga 2016 Rome IV G7 extra; counted only when toilet_trained is true). true or false as assigned by the caller. magent does not examine the infant.","required":true,"example":"false"},{"in":"query","name":"duration_at_least_1_month","type":"boolean","description":"Must include 1 month of at least 2 features, as assigned (Benninga 2016 Rome IV G7). true or false as assigned by the caller. magent does not examine the infant.","required":true,"example":"true"}],"errors":[{"code":"invalid_rome_iv_infant_constipation","message":"Rome IV infant functional constipation needs the Benninga 2016 neonate/toddler G7 flags. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rome-iv-infant-constipation","citation":{"authors":"Benninga MA, Faure C, Hyman PE, St James Roberts I, Schechter NL, Nurko S","doi":"10.1053/j.gastro.2016.02.016","id":"benninga-2016","pmid":"27144631","source":"Gastroenterology. 2016;150(6):1443-1455","title":"Childhood Functional Gastrointestinal Disorders: Neonate/Toddler","url":"https://doi.org/10.1053/j.gastro.2016.02.016"},"formula_expression":"rome_iv_infant_constipation iff duration_at_least_1_month and features_met >= 2; features_met always counts two_or_fewer_defecations_per_week, history_of_excessive_stool_retention, history_of_painful_or_hard_bowel_movements, history_of_large_diameter_stools, and large_fecal_mass_in_rectum; if toilet_trained also counts incontinence_after_toileting_at_least_weekly and large_diameter_stools_that_may_obstruct_toilet (Benninga 2016 Rome IV G7 Functional Constipation)","purpose":"Apply the Benninga 2016 Rome IV G7 functional constipation (neonate/toddler) criteria and return features_met and whether the published infant constipation box holds (rome_iv_infant_constipation).","markdown_url":"https://magentlab.com/docs/rome-iv-infant-constipation.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rome_iv_infant_constipation"},{"name":"formula_expression","type":"string","description":"Benninga 2016 Rome IV G7: duration at least 1 month and at least 2 features; extras count only when toilet-trained"},{"name":"features_met","type":"integer","description":"Count of true features among the five core flags, plus the two extras only when toilet_trained is true"},{"name":"rome_iv_infant_constipation","type":"boolean","description":"true only when duration_at_least_1_month and features_met >= 2. Not a diagnosis."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met; features_ge_2 includes value (features_met)"},{"name":"citation","type":"object","description":"Benninga 2016 Gastroenterology citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"duration_at_least_1_month":"true","history_of_excessive_stool_retention":"false","history_of_large_diameter_stools":"false","history_of_painful_or_hard_bowel_movements":"true","incontinence_after_toileting_at_least_weekly":"false","large_diameter_stools_that_may_obstruct_toilet":"false","large_fecal_mass_in_rectum":"false","toilet_trained":"false","two_or_fewer_defecations_per_week":"true"},{"duration_at_least_1_month":"true","history_of_excessive_stool_retention":"false","history_of_large_diameter_stools":"false","history_of_painful_or_hard_bowel_movements":"true","incontinence_after_toileting_at_least_weekly":"false","large_diameter_stools_that_may_obstruct_toilet":"false","large_fecal_mass_in_rectum":"false","toilet_trained":"false","two_or_fewer_defecations_per_week":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rome-iv-infant-constipation","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rome-iv-infant-constipation?toilet_trained=false&two_or_fewer_defecations_per_week=true&history_of_excessive_stool_retention=false&history_of_painful_or_hard_bowel_movements=true&history_of_large_diameter_stools=false&large_fecal_mass_in_rectum=false&incontinence_after_toileting_at_least_weekly=false&large_diameter_stools_that_may_obstruct_toilet=false&duration_at_least_1_month=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rome-iv-infant-constipation","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rome-iv-infant-diarrhea","description":"Benninga 2016 Rome IV G5 Functional Diarrhea. rome_iv_infant_diarrhea is true iff daily_painless_recurrent_4_or_more_large_unformed_stools, symptoms_last_more_than_4_weeks, onset_between_6_and_60_months, and no_failure_to_thrive_if_caloric_intake_adequate. Rome IV is 4 or more stools (not Rome III's 3). Sleep-stool criterion was dropped and is not a flag. Caller assigns four flags. magent does not examine the child. Not a diagnosis, not adult Rome IV diarrhea, not a malabsorption workup.","parameters":[{"in":"query","name":"daily_painless_recurrent_4_or_more_large_unformed_stools","type":"boolean","description":"Daily, painless, recurrent passage of 4 or more large, unformed stools, as assigned (Benninga 2016 Rome IV G5; Rome IV is 4 or more, not Rome III's 3). true or false as assigned by the caller. magent does not examine the child.","required":true,"example":"true"},{"in":"query","name":"symptoms_last_more_than_4_weeks","type":"boolean","description":"Symptoms last more than 4 weeks, as assigned (Benninga 2016 Rome IV G5). true or false as assigned by the caller. magent does not examine the child.","required":true,"example":"true"},{"in":"query","name":"onset_between_6_and_60_months","type":"boolean","description":"Onset between 6 and 60 months of age, as assigned (Benninga 2016 Rome IV G5). true or false as assigned by the caller. magent does not examine the child.","required":true,"example":"true"},{"in":"query","name":"no_failure_to_thrive_if_caloric_intake_adequate","type":"boolean","description":"No failure to thrive if caloric intake is adequate, as assigned (Benninga 2016 Rome IV G5). true or false as assigned by the caller. magent does not examine the child.","required":true,"example":"true"}],"errors":[{"code":"invalid_rome_iv_infant_diarrhea","message":"Rome IV infant functional diarrhea needs the Benninga 2016 neonate/toddler G5 flags. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rome-iv-infant-diarrhea","citation":{"authors":"Benninga MA, Faure C, Hyman PE, St James Roberts I, Schechter NL, Nurko S","doi":"10.1053/j.gastro.2016.02.016","id":"benninga-2016","pmid":"27144631","source":"Gastroenterology. 2016;150(6):1443-1455","title":"Childhood Functional Gastrointestinal Disorders: Neonate/Toddler","url":"https://doi.org/10.1053/j.gastro.2016.02.016"},"formula_expression":"rome_iv_infant_diarrhea iff daily_painless_recurrent_4_or_more_large_unformed_stools and symptoms_last_more_than_4_weeks and onset_between_6_and_60_months and no_failure_to_thrive_if_caloric_intake_adequate (Benninga 2016 Rome IV G5 Functional Diarrhea)","purpose":"Apply the Benninga 2016 Rome IV G5 Functional Diarrhea diagnostic criteria and return whether the published infant functional diarrhea box holds (rome_iv_infant_diarrhea).","markdown_url":"https://magentlab.com/docs/rome-iv-infant-diarrhea.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rome_iv_infant_diarrhea"},{"name":"formula_expression","type":"string","description":"Benninga 2016 Rome IV G5 Functional Diarrhea: daily painless recurrent 4 or more large unformed stools, symptoms last more than 4 weeks, onset between 6 and 60 months, and no failure to thrive if caloric intake is adequate"},{"name":"rome_iv_infant_diarrhea","type":"boolean","description":"true only when all four required flags hold. Not a diagnosis."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met for the four required flags"},{"name":"citation","type":"object","description":"Benninga 2016 Gastroenterology citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"daily_painless_recurrent_4_or_more_large_unformed_stools":"true","no_failure_to_thrive_if_caloric_intake_adequate":"true","onset_between_6_and_60_months":"true","symptoms_last_more_than_4_weeks":"true"},{"daily_painless_recurrent_4_or_more_large_unformed_stools":"true","no_failure_to_thrive_if_caloric_intake_adequate":"true","onset_between_6_and_60_months":"true","symptoms_last_more_than_4_weeks":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rome-iv-infant-diarrhea","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rome-iv-infant-diarrhea?daily_painless_recurrent_4_or_more_large_unformed_stools=true&symptoms_last_more_than_4_weeks=true&onset_between_6_and_60_months=true&no_failure_to_thrive_if_caloric_intake_adequate=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rome-iv-infant-diarrhea","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rome-iv-child-cvs","description":"Hyams 2016 Rome IV H1a child/adolescent cyclic vomiting. rome_iv_child_cvs is true iff two_or_more_periods_intense_nausea_paroxysmal_vomiting_hours_to_days_within_6_months, episodes_stereotypical, episodes_separated_weeks_to_months_with_return_to_baseline, and not_attributed_to_another_condition. Caller assigns four flags. magent does not examine the child. Not a diagnosis, not neonate/toddler G3, not adult Rome IV CVS, not cannabinoid hyperemesis.","parameters":[{"in":"query","name":"two_or_more_periods_intense_nausea_paroxysmal_vomiting_hours_to_days_within_6_months","type":"boolean","description":"Two or more periods of intense, unremitting nausea and paroxysmal vomiting lasting hours to days within a 6-month period, as assigned (Hyams 2016 Rome IV H1a). true or false as assigned by the caller. magent does not examine the child.","required":true,"example":"true"},{"in":"query","name":"episodes_stereotypical","type":"boolean","description":"Episodes are stereotypical in each patient, as assigned (Hyams 2016 Rome IV H1a). true or false as assigned by the caller. magent does not examine the child.","required":true,"example":"true"},{"in":"query","name":"episodes_separated_weeks_to_months_with_return_to_baseline","type":"boolean","description":"Episodes are separated by weeks to months with return to baseline health between episodes, as assigned (Hyams 2016 Rome IV H1a). true or false as assigned by the caller. magent does not examine the child.","required":true,"example":"true"},{"in":"query","name":"not_attributed_to_another_condition","type":"boolean","description":"After appropriate medical evaluation, the symptoms cannot be attributed to another condition, as assigned (Hyams 2016 Rome IV H1a). true or false as assigned by the caller. magent does not examine the child.","required":true,"example":"true"}],"errors":[{"code":"invalid_rome_iv_child_cvs","message":"Rome IV child cyclic vomiting needs the Hyams 2016 child/adolescent H1a flags. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rome-iv-child-cvs","citation":{"authors":"Hyams JS, Di Lorenzo C, Saps M, Shulman RJ, Staiano A, van Tilburg M","doi":"10.1053/j.gastro.2016.02.015","id":"hyams-2016","pmid":"27144632","source":"Gastroenterology. 2016;150(6):1456-1468","title":"Childhood Functional Gastrointestinal Disorders: Child/Adolescent","url":"https://doi.org/10.1053/j.gastro.2016.02.015"},"formula_expression":"rome_iv_child_cvs iff two_or_more_periods_intense_nausea_paroxysmal_vomiting_hours_to_days_within_6_months and episodes_stereotypical and episodes_separated_weeks_to_months_with_return_to_baseline and not_attributed_to_another_condition (Hyams 2016 Rome IV H1a Cyclic Vomiting Syndrome)","purpose":"Apply the Hyams 2016 Rome IV H1a child/adolescent cyclic vomiting syndrome diagnostic criteria and return whether the published child CVS box holds (rome_iv_child_cvs).","markdown_url":"https://magentlab.com/docs/rome-iv-child-cvs.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rome_iv_child_cvs"},{"name":"formula_expression","type":"string","description":"Hyams 2016 Rome IV H1a child/adolescent cyclic vomiting: two or more periods of intense nausea and paroxysmal vomiting lasting hours to days within 6 months, stereotypical episodes, weeks-to-months separation with return to baseline, and not attributed to another condition"},{"name":"rome_iv_child_cvs","type":"boolean","description":"true only when all four required flags hold. Not a diagnosis."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met for the four required flags"},{"name":"citation","type":"object","description":"Hyams 2016 Gastroenterology citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"episodes_separated_weeks_to_months_with_return_to_baseline":"true","episodes_stereotypical":"true","not_attributed_to_another_condition":"true","two_or_more_periods_intense_nausea_paroxysmal_vomiting_hours_to_days_within_6_months":"true"},{"episodes_separated_weeks_to_months_with_return_to_baseline":"true","episodes_stereotypical":"true","not_attributed_to_another_condition":"true","two_or_more_periods_intense_nausea_paroxysmal_vomiting_hours_to_days_within_6_months":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rome-iv-child-cvs","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rome-iv-child-cvs?two_or_more_periods_intense_nausea_paroxysmal_vomiting_hours_to_days_within_6_months=true&episodes_stereotypical=true&episodes_separated_weeks_to_months_with_return_to_baseline=true&not_attributed_to_another_condition=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rome-iv-child-cvs","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rome-iv-child-nausea-vomiting","description":"Hyams 2016 Rome IV H1b. Functional nausea iff 2-month duration plus bothersome_nausea_twice_weekly_not_meal_related, nausea_not_consistently_associated_with_vomiting, and nausea_not_explained_by_another_condition. Functional vomiting iff 2-month duration plus vomiting_at_least_weekly, no_self_induced_eating_disorder_or_rumination, and vomiting_not_explained_by_another_condition. Both may be true. magent does not examine the child. Not a diagnosis, not H1a, CNVS, H1c, or neonate/toddler.","parameters":[{"in":"query","name":"fulfilled_at_least_2_months","type":"boolean","description":"Criteria fulfilled for at least 2 months before diagnosis, as assigned (Hyams 2016 Rome IV H1b; shared duration for functional nausea and functional vomiting). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"},{"in":"query","name":"bothersome_nausea_twice_weekly_not_meal_related","type":"boolean","description":"Bothersome nausea as the predominant symptom, occurring at least twice per week, and generally not related to meals, as assigned (Hyams 2016 Rome IV H1b1). true or false as assigned by the caller. magent does not examine the child.","required":true,"example":"true"},{"in":"query","name":"nausea_not_consistently_associated_with_vomiting","type":"boolean","description":"Nausea is not consistently associated with vomiting, as assigned (Hyams 2016 Rome IV H1b1). true or false as assigned by the caller. magent does not examine the child.","required":true,"example":"true"},{"in":"query","name":"nausea_not_explained_by_another_condition","type":"boolean","description":"After appropriate evaluation, the nausea cannot be fully explained by another medical condition, as assigned (Hyams 2016 Rome IV H1b1). true or false as assigned by the caller. magent does not examine the child.","required":true,"example":"true"},{"in":"query","name":"vomiting_at_least_weekly","type":"boolean","description":"On average one or more episodes of vomiting per week, as assigned (Hyams 2016 Rome IV H1b2). true or false as assigned by the caller. magent does not examine the child.","required":true,"example":"false"},{"in":"query","name":"no_self_induced_eating_disorder_or_rumination","type":"boolean","description":"Absence of self-induced vomiting or criteria for an eating disorder or rumination, as assigned (Hyams 2016 Rome IV H1b2). true or false as assigned by the caller. magent does not examine the child.","required":true,"example":"false"},{"in":"query","name":"vomiting_not_explained_by_another_condition","type":"boolean","description":"After appropriate evaluation, the vomiting cannot be fully explained by another medical condition, as assigned (Hyams 2016 Rome IV H1b2). true or false as assigned by the caller. magent does not examine the child.","required":true,"example":"false"}],"errors":[{"code":"invalid_rome_iv_child_nausea_vomiting","message":"Rome IV child functional nausea/vomiting needs the Hyams 2016 child/adolescent H1b flags. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rome-iv-child-nausea-vomiting","citation":{"authors":"Hyams JS, Di Lorenzo C, Saps M, Shulman RJ, Staiano A, van Tilburg M","doi":"10.1053/j.gastro.2016.02.015","id":"hyams-2016","pmid":"27144632","source":"Gastroenterology. 2016;150(6):1456-1468","title":"Childhood Functional Gastrointestinal Disorders: Child/Adolescent","url":"https://doi.org/10.1053/j.gastro.2016.02.015"},"formula_expression":"rome_iv_child_functional_nausea iff fulfilled_at_least_2_months and bothersome_nausea_twice_weekly_not_meal_related and nausea_not_consistently_associated_with_vomiting and nausea_not_explained_by_another_condition; rome_iv_child_functional_vomiting iff fulfilled_at_least_2_months and vomiting_at_least_weekly and no_self_induced_eating_disorder_or_rumination and vomiting_not_explained_by_another_condition (Hyams 2016 Rome IV H1b Functional Nausea and Functional Vomiting)","purpose":"Apply the Hyams 2016 Rome IV H1b child/adolescent functional nausea (H1b1) and functional vomiting (H1b2) diagnostic criteria and return whether each published box holds (rome_iv_child_functional_nausea, rome_iv_child_functional_vomiting).","markdown_url":"https://magentlab.com/docs/rome-iv-child-nausea-vomiting.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rome_iv_child_nausea_vomiting"},{"name":"formula_expression","type":"string","description":"Hyams 2016 Rome IV H1b: functional nausea iff 2-month duration plus three H1b1 flags; functional vomiting iff 2-month duration plus three H1b2 flags; both may be true"},{"name":"rome_iv_child_functional_nausea","type":"boolean","description":"true only when duration and the three H1b1 functional nausea flags hold. Not a diagnosis."},{"name":"rome_iv_child_functional_vomiting","type":"boolean","description":"true only when duration and the three H1b2 functional vomiting flags hold. Not a diagnosis."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met for the shared duration flag and the six H1b1/H1b2 flags"},{"name":"citation","type":"object","description":"Hyams 2016 Gastroenterology citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"bothersome_nausea_twice_weekly_not_meal_related":"true","fulfilled_at_least_2_months":"true","nausea_not_consistently_associated_with_vomiting":"true","nausea_not_explained_by_another_condition":"true","no_self_induced_eating_disorder_or_rumination":"false","vomiting_at_least_weekly":"false","vomiting_not_explained_by_another_condition":"false"},{"bothersome_nausea_twice_weekly_not_meal_related":"true","fulfilled_at_least_2_months":"true","nausea_not_consistently_associated_with_vomiting":"true","nausea_not_explained_by_another_condition":"true","no_self_induced_eating_disorder_or_rumination":"false","vomiting_at_least_weekly":"false","vomiting_not_explained_by_another_condition":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rome-iv-child-nausea-vomiting","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rome-iv-child-nausea-vomiting?fulfilled_at_least_2_months=true&bothersome_nausea_twice_weekly_not_meal_related=true&nausea_not_consistently_associated_with_vomiting=true&nausea_not_explained_by_another_condition=true&vomiting_at_least_weekly=false&no_self_induced_eating_disorder_or_rumination=false&vomiting_not_explained_by_another_condition=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rome-iv-child-nausea-vomiting","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rome-iv-child-rumination","description":"Hyams 2016 Rome IV H1c child rumination. rome_iv_child_rumination is true iff repeated_regurgitation_rechewing_or_expulsion_soon_after_meals, does_not_occur_during_sleep, not_preceded_by_retching, not_explained_by_another_condition_or_eating_disorder, and fulfilled_at_least_2_months. GERD-treatment failure and weekly frequency are not required. Manometry is not parsed. Caller assigns five flags. magent does not observe regurgitation. Not a diagnosis, not adult Rome IV rumination, not neonate G2.","parameters":[{"in":"query","name":"repeated_regurgitation_rechewing_or_expulsion_soon_after_meals","type":"boolean","description":"Repeated regurgitation and rechewing or expulsion of food that begins soon after ingestion of a meal, as assigned (Hyams 2016 Rome IV H1c). The paper's 1a (begins soon after meals) is folded into this flag. true or false as assigned by the caller. magent does not observe regurgitation.","required":true,"example":"true"},{"in":"query","name":"does_not_occur_during_sleep","type":"boolean","description":"The regurgitation does not occur during sleep, as assigned (Hyams 2016 Rome IV H1c). The paper's 1b (not during sleep) is this flag. true or false as assigned by the caller. magent does not observe regurgitation.","required":true,"example":"true"},{"in":"query","name":"not_preceded_by_retching","type":"boolean","description":"Not preceded by retching, as assigned (Hyams 2016 Rome IV H1c). true or false as assigned by the caller. magent does not observe regurgitation.","required":true,"example":"true"},{"in":"query","name":"not_explained_by_another_condition_or_eating_disorder","type":"boolean","description":"After appropriate evaluation, the symptoms cannot be fully explained by another medical condition, and an eating disorder has been ruled out, as assigned (Hyams 2016 Rome IV H1c). true or false as assigned by the caller. magent does not examine the child.","required":true,"example":"true"},{"in":"query","name":"fulfilled_at_least_2_months","type":"boolean","description":"Criteria fulfilled for at least 2 months prior to diagnosis, as assigned (Hyams 2016 Rome IV H1c). true or false as assigned by the caller.","required":true,"example":"true"}],"errors":[{"code":"invalid_rome_iv_child_rumination","message":"Rome IV child rumination needs the Hyams 2016 child/adolescent H1c flags. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rome-iv-child-rumination","citation":{"authors":"Hyams JS, Di Lorenzo C, Saps M, Shulman RJ, Staiano A, van Tilburg M","doi":"10.1053/j.gastro.2016.02.015","id":"hyams-2016","pmid":"27144632","source":"Gastroenterology. 2016;150(6):1456-1468","title":"Childhood Functional Gastrointestinal Disorders: Child/Adolescent","url":"https://doi.org/10.1053/j.gastro.2016.02.015"},"formula_expression":"rome_iv_child_rumination iff repeated_regurgitation_rechewing_or_expulsion_soon_after_meals and does_not_occur_during_sleep and not_preceded_by_retching and not_explained_by_another_condition_or_eating_disorder and fulfilled_at_least_2_months (Hyams 2016 Rome IV H1c rumination syndrome)","purpose":"Apply the Hyams 2016 Rome IV H1c child/adolescent rumination syndrome diagnostic criteria and return whether the published rumination box holds (rome_iv_child_rumination).","markdown_url":"https://magentlab.com/docs/rome-iv-child-rumination.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rome_iv_child_rumination"},{"name":"formula_expression","type":"string","description":"Hyams 2016 Rome IV H1c child/adolescent rumination: repeated regurgitation and rechewing or expulsion soon after meals, not during sleep, not preceded by retching, not explained by another condition or eating disorder, and fulfilled at least 2 months"},{"name":"rome_iv_child_rumination","type":"boolean","description":"true only when all five required flags hold. Not a diagnosis."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met for the five required flags"},{"name":"citation","type":"object","description":"Hyams 2016 Gastroenterology citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"does_not_occur_during_sleep":"true","fulfilled_at_least_2_months":"true","not_explained_by_another_condition_or_eating_disorder":"true","not_preceded_by_retching":"true","repeated_regurgitation_rechewing_or_expulsion_soon_after_meals":"true"},{"does_not_occur_during_sleep":"true","fulfilled_at_least_2_months":"true","not_explained_by_another_condition_or_eating_disorder":"true","not_preceded_by_retching":"true","repeated_regurgitation_rechewing_or_expulsion_soon_after_meals":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rome-iv-child-rumination","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rome-iv-child-rumination?repeated_regurgitation_rechewing_or_expulsion_soon_after_meals=true&does_not_occur_during_sleep=true&not_preceded_by_retching=true&not_explained_by_another_condition_or_eating_disorder=true&fulfilled_at_least_2_months=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rome-iv-child-rumination","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rome-iv-child-aerophagia","description":"Hyams 2016 Rome IV H1d child aerophagia. True iff air swallowing, distention from intraluminal air that increases during the day, repetitive belching and/or increased flatus, not another condition, and 2-month duration. All three symptom criteria required. Not adult belching disorders or infant regurgitation. Caller assigns five flags. magent does not examine the patient. Not a diagnosis.","parameters":[{"in":"query","name":"excessive_air_swallowing","type":"boolean","description":"Excessive air swallowing, as assigned (Hyams 2016 Rome IV H1d). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"true"},{"in":"query","name":"abdominal_distention_intraluminal_air_increases_during_day","type":"boolean","description":"Abdominal distention due to intraluminal air that increases during the day, as assigned (Hyams 2016 Rome IV H1d). Distention and increases-during-the-day are one flag. true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"true"},{"in":"query","name":"repetitive_belching_and_or_increased_flatus","type":"boolean","description":"Repetitive belching and/or increased flatus, as assigned (Hyams 2016 Rome IV H1d). Belching or increased flatus is one caller-assigned flag. true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"true"},{"in":"query","name":"not_explained_by_another_condition","type":"boolean","description":"After appropriate evaluation, the symptoms cannot be fully explained by another medical condition, as assigned (Hyams 2016 Rome IV H1d). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"true"},{"in":"query","name":"fulfilled_at_least_2_months","type":"boolean","description":"Criteria fulfilled for at least 2 months, as assigned (Hyams 2016 Rome IV H1d). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"}],"errors":[{"code":"invalid_rome_iv_child_aerophagia","message":"Rome IV child aerophagia needs the Hyams 2016 child/adolescent H1d flags. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rome-iv-child-aerophagia","citation":{"authors":"Hyams JS, Di Lorenzo C, Saps M, Shulman RJ, Staiano A, van Tilburg M","doi":"10.1053/j.gastro.2016.02.015","id":"hyams-2016","pmid":"27144632","source":"Gastroenterology. 2016;150(6):1456-1468","title":"Childhood Functional Gastrointestinal Disorders: Child/Adolescent","url":"https://doi.org/10.1053/j.gastro.2016.02.015"},"formula_expression":"rome_iv_child_aerophagia iff excessive_air_swallowing and abdominal_distention_intraluminal_air_increases_during_day and repetitive_belching_and_or_increased_flatus and not_explained_by_another_condition and fulfilled_at_least_2_months (Hyams 2016 Rome IV H1d aerophagia)","purpose":"Apply the Hyams 2016 Rome IV H1d child/adolescent aerophagia diagnostic criteria and return whether the published aerophagia box holds (rome_iv_child_aerophagia).","markdown_url":"https://magentlab.com/docs/rome-iv-child-aerophagia.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rome_iv_child_aerophagia"},{"name":"formula_expression","type":"string","description":"Hyams 2016 Rome IV H1d aerophagia: excessive air swallowing, abdominal distention due to intraluminal air that increases during the day, repetitive belching and/or increased flatus, not explained by another condition, and fulfilled at least 2 months"},{"name":"rome_iv_child_aerophagia","type":"boolean","description":"true only when all five required flags hold. Not a diagnosis."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met for the five required flags"},{"name":"citation","type":"object","description":"Hyams 2016 Gastroenterology citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"abdominal_distention_intraluminal_air_increases_during_day":"true","excessive_air_swallowing":"true","fulfilled_at_least_2_months":"true","not_explained_by_another_condition":"true","repetitive_belching_and_or_increased_flatus":"true"},{"abdominal_distention_intraluminal_air_increases_during_day":"true","excessive_air_swallowing":"true","fulfilled_at_least_2_months":"true","not_explained_by_another_condition":"true","repetitive_belching_and_or_increased_flatus":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rome-iv-child-aerophagia","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rome-iv-child-aerophagia?excessive_air_swallowing=true&abdominal_distention_intraluminal_air_increases_during_day=true&repetitive_belching_and_or_increased_flatus=true&not_explained_by_another_condition=true&fulfilled_at_least_2_months=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rome-iv-child-aerophagia","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rome-iv-child-dyspepsia","description":"Hyams 2016 Rome IV H2a. True iff bothersome ≥4 days/month, symptoms_met ≥1 of 3 (postprandial fullness, early satiation, epigastric pain or burning not associated with defecation), exclusion, and 2-month duration. Item 4 is the exclusion, not a fourth symptom. PDS and EPS supportive features are copy-only. Caller assigns six flags. magent does not examine the child or parse EGD. Not a diagnosis. Not adult Rome IV FD.","parameters":[{"in":"query","name":"bothersome_at_least_4_days_per_month","type":"boolean","description":"Bothersome symptoms at least 4 days per month, as assigned (Hyams 2016 Rome IV H2a). true or false as assigned by the caller. magent does not examine the child.","required":true,"example":"true"},{"in":"query","name":"postprandial_fullness","type":"boolean","description":"Postprandial fullness (one of three H2a symptoms; at least one required). true or false as assigned by the caller. magent does not examine the child.","required":true,"example":"true"},{"in":"query","name":"early_satiation","type":"boolean","description":"Early satiation (one of three H2a symptoms; at least one required). true or false as assigned by the caller. magent does not examine the child.","required":true,"example":"false"},{"in":"query","name":"epigastric_pain_or_burning_not_associated_with_defecation","type":"boolean","description":"Epigastric pain or burning not associated with defecation (one of three H2a symptoms; at least one required). true or false as assigned by the caller. magent does not examine the child.","required":true,"example":"false"},{"in":"query","name":"not_explained_by_another_condition","type":"boolean","description":"After appropriate evaluation, the symptoms cannot be fully explained by another medical condition, as assigned (Hyams 2016 Rome IV H2a item 4, the exclusion, not a fourth symptom). true or false as assigned by the caller. magent does not examine the child or parse EGD.","required":true,"example":"true"},{"in":"query","name":"fulfilled_at_least_2_months","type":"boolean","description":"Criteria fulfilled for at least 2 months prior to diagnosis, as assigned (Hyams 2016 Rome IV H2a). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"}],"errors":[{"code":"invalid_rome_iv_child_dyspepsia","message":"Rome IV child functional dyspepsia needs the Hyams 2016 child/adolescent H2a flags. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rome-iv-child-dyspepsia","citation":{"authors":"Hyams JS, Di Lorenzo C, Saps M, Shulman RJ, Staiano A, van Tilburg M","doi":"10.1053/j.gastro.2016.02.015","id":"hyams-2016","pmid":"27144632","source":"Gastroenterology. 2016;150(6):1456-1468","title":"Childhood Functional Gastrointestinal Disorders: Child/Adolescent","url":"https://doi.org/10.1053/j.gastro.2016.02.015"},"formula_expression":"rome_iv_child_dyspepsia iff bothersome_at_least_4_days_per_month and symptoms_met >= 1 and not_explained_by_another_condition and fulfilled_at_least_2_months; symptoms_met counts postprandial_fullness, early_satiation, and epigastric_pain_or_burning_not_associated_with_defecation; H2a item 4 is the exclusion not_explained_by_another_condition, not a fourth symptom; PDS and EPS subtype supportive features are copy-only and are not parsed (Hyams 2016 Rome IV H2a Functional Dyspepsia)","purpose":"Apply the Hyams 2016 Rome IV H2a child/adolescent functional dyspepsia diagnostic criteria and return symptoms_met (0-3) and whether the published H2a box holds (rome_iv_child_dyspepsia).","markdown_url":"https://magentlab.com/docs/rome-iv-child-dyspepsia.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rome_iv_child_dyspepsia"},{"name":"formula_expression","type":"string","description":"Hyams 2016 Rome IV H2a: bothersome at least 4 days per month, at least 1 of 3 symptoms, exclusion (item 4, not a fourth symptom), and 2-month duration; PDS and EPS subtype supportive features are copy-only"},{"name":"symptoms_met","type":"integer","description":"Count of true H2a symptoms among postprandial fullness, early satiation, and epigastric pain or burning not associated with defecation (0-3)"},{"name":"rome_iv_child_dyspepsia","type":"boolean","description":"true only when bothersome at least 4 days per month, at least one H2a symptom, the exclusion, and 2-month duration all hold. Not a diagnosis."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met; symptoms_met_ge_1 includes value 0-3"},{"name":"citation","type":"object","description":"Hyams 2016 Gastroenterology citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"bothersome_at_least_4_days_per_month":"true","early_satiation":"false","epigastric_pain_or_burning_not_associated_with_defecation":"false","fulfilled_at_least_2_months":"true","not_explained_by_another_condition":"true","postprandial_fullness":"true"},{"bothersome_at_least_4_days_per_month":"true","early_satiation":"false","epigastric_pain_or_burning_not_associated_with_defecation":"false","fulfilled_at_least_2_months":"true","not_explained_by_another_condition":"true","postprandial_fullness":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rome-iv-child-dyspepsia","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rome-iv-child-dyspepsia?bothersome_at_least_4_days_per_month=true&postprandial_fullness=true&early_satiation=false&epigastric_pain_or_burning_not_associated_with_defecation=false&not_explained_by_another_condition=true&fulfilled_at_least_2_months=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rome-iv-child-dyspepsia","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rome-iv-child-ibs","description":"Hyams 2016 Rome IV H2b. rome_iv_child_ibs is true iff pain at least 4 days per month, stool_features_met >= 1, pain_does_not_resolve_with_constipation_treatment, not another condition, and 2-month duration. stool_features_met (0-3) counts related_to_defecation, change_in_stool_frequency, and change_in_stool_form. Caller assigns seven flags. magent does not examine the patient. Not a diagnosis. Not adult Rome IV IBS, not child functional constipation, not IBS-C/D/M/U subtype.","parameters":[{"in":"query","name":"abdominal_pain_at_least_4_days_per_month","type":"boolean","description":"Abdominal pain at least 4 days per month, as assigned (Hyams 2016 Rome IV H2b). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"true"},{"in":"query","name":"related_to_defecation","type":"boolean","description":"Pain related to defecation (one of three stool features; at least one required). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"true"},{"in":"query","name":"change_in_stool_frequency","type":"boolean","description":"Pain associated with a change in frequency of stool (one of three stool features; at least one required). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"true"},{"in":"query","name":"change_in_stool_form","type":"boolean","description":"Pain associated with a change in form (appearance) of stool (one of three stool features; at least one required). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"pain_does_not_resolve_with_constipation_treatment","type":"boolean","description":"Pain does not resolve with resolution of the constipation, as assigned (Hyams 2016 Rome IV H2b item 2). Assign true if there is no constipation, or if pain persists after treating constipation. true or false as assigned by the caller. magent does not treat constipation or examine the patient.","required":true,"example":"true"},{"in":"query","name":"not_explained_by_another_condition","type":"boolean","description":"After appropriate evaluation, the symptoms cannot be fully explained by another medical condition, as assigned (Hyams 2016 Rome IV H2b). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"true"},{"in":"query","name":"fulfilled_at_least_2_months","type":"boolean","description":"Criteria fulfilled for at least 2 months, as assigned (Hyams 2016 Rome IV H2b). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"}],"errors":[{"code":"invalid_rome_iv_child_ibs","message":"Rome IV child IBS needs the Hyams 2016 child/adolescent H2b flags. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rome-iv-child-ibs","citation":{"authors":"Hyams JS, Di Lorenzo C, Saps M, Shulman RJ, Staiano A, van Tilburg M","doi":"10.1053/j.gastro.2016.02.015","id":"hyams-2016","pmid":"27144632","source":"Gastroenterology. 2016;150(6):1456-1468","title":"Childhood Functional Gastrointestinal Disorders: Child/Adolescent","url":"https://doi.org/10.1053/j.gastro.2016.02.015"},"formula_expression":"rome_iv_child_ibs iff abdominal_pain_at_least_4_days_per_month and stool_features_met >= 1 and pain_does_not_resolve_with_constipation_treatment and not_explained_by_another_condition and fulfilled_at_least_2_months; stool_features_met counts related_to_defecation, change_in_stool_frequency, and change_in_stool_form (Hyams 2016 Rome IV H2b child/adolescent IBS)","purpose":"Apply the Hyams 2016 Rome IV H2b child/adolescent IBS diagnostic criteria and return stool_features_met (0-3) and whether the published H2b box holds (rome_iv_child_ibs).","markdown_url":"https://magentlab.com/docs/rome-iv-child-ibs.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rome_iv_child_ibs"},{"name":"formula_expression","type":"string","description":"Hyams 2016 Rome IV H2b: pain at least 4 days per month, at least 1 of 3 stool features, constipation-pain flag, not another condition, and 2-month duration"},{"name":"stool_features_met","type":"integer","description":"Count of true stool features among related to defecation, change in stool frequency, and change in stool form (0-3)"},{"name":"rome_iv_child_ibs","type":"boolean","description":"true only when pain at least 4 days per month, at least one stool feature, the constipation-pain flag, not another condition, and 2-month duration all hold. Not a diagnosis."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met; stool_features_ge_1 includes value 0-3"},{"name":"citation","type":"object","description":"Hyams 2016 Gastroenterology citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"abdominal_pain_at_least_4_days_per_month":"true","change_in_stool_form":"false","change_in_stool_frequency":"true","fulfilled_at_least_2_months":"true","not_explained_by_another_condition":"true","pain_does_not_resolve_with_constipation_treatment":"true","related_to_defecation":"true"},{"abdominal_pain_at_least_4_days_per_month":"true","change_in_stool_form":"false","change_in_stool_frequency":"true","fulfilled_at_least_2_months":"true","not_explained_by_another_condition":"true","pain_does_not_resolve_with_constipation_treatment":"true","related_to_defecation":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rome-iv-child-ibs","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rome-iv-child-ibs?abdominal_pain_at_least_4_days_per_month=true&related_to_defecation=true&change_in_stool_frequency=true&change_in_stool_form=false&pain_does_not_resolve_with_constipation_treatment=true&not_explained_by_another_condition=true&fulfilled_at_least_2_months=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rome-iv-child-ibs","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rome-iv-child-abdominal-migraine","description":"Hyams 2016 Rome IV H2c. rome_iv_child_abdominal_migraine is true iff paroxysmal intense periumbilical, midline, or diffuse pain lasting 1 hour or more, episodes weeks to months apart, incapacitating stereotypical pain, associated_features_met at least 2 (anorexia, nausea, vomiting, headache, photophobia, pallor), not explained by another condition, and 6-month fulfillment. Count 0-6. magent does not examine the child. Not a diagnosis. Not child CVS. Not adult migraine scores.","parameters":[{"in":"query","name":"paroxysmal_intense_periumbilical_midline_or_diffuse_pain_lasting_1_hour_or_more","type":"boolean","description":"Paroxysmal episodes of intense, acute periumbilical, midline, or diffuse abdominal pain lasting 1 hour or more, as assigned (Hyams 2016 Rome IV H2c). true or false as assigned by the caller. magent does not examine the child.","required":true,"example":"true"},{"in":"query","name":"episodes_separated_weeks_to_months","type":"boolean","description":"Episodes are separated by weeks to months, as assigned (Hyams 2016 Rome IV H2c). true or false as assigned by the caller. magent does not examine the child.","required":true,"example":"true"},{"in":"query","name":"pain_incapacitating","type":"boolean","description":"The pain is incapacitating and interferes with normal activities, as assigned (Hyams 2016 Rome IV H2c). true or false as assigned by the caller. magent does not examine the child.","required":true,"example":"true"},{"in":"query","name":"stereotypical_pattern","type":"boolean","description":"Stereotypical pattern and symptoms in the individual patient, as assigned (Hyams 2016 Rome IV H2c). true or false as assigned by the caller. magent does not examine the child.","required":true,"example":"true"},{"in":"query","name":"anorexia","type":"boolean","description":"Anorexia during episodes (one of six associated features; at least two required). true or false as assigned by the caller. magent does not examine the child.","required":true,"example":"true"},{"in":"query","name":"nausea","type":"boolean","description":"Nausea during episodes (one of six associated features; at least two required). true or false as assigned by the caller. magent does not examine the child.","required":true,"example":"true"},{"in":"query","name":"vomiting","type":"boolean","description":"Vomiting during episodes (one of six associated features; at least two required). true or false as assigned by the caller. magent does not examine the child.","required":true,"example":"false"},{"in":"query","name":"headache","type":"boolean","description":"Headache during episodes (one of six associated features; at least two required). true or false as assigned by the caller. magent does not examine the child.","required":true,"example":"false"},{"in":"query","name":"photophobia","type":"boolean","description":"Photophobia during episodes (one of six associated features; at least two required). true or false as assigned by the caller. magent does not examine the child.","required":true,"example":"false"},{"in":"query","name":"pallor","type":"boolean","description":"Pallor during episodes (one of six associated features; at least two required). true or false as assigned by the caller. magent does not examine the child.","required":true,"example":"false"},{"in":"query","name":"not_explained_by_another_condition","type":"boolean","description":"After appropriate evaluation, the symptoms cannot be fully explained by another medical condition, as assigned (Hyams 2016 Rome IV H2c). true or false as assigned by the caller. magent does not examine the child.","required":true,"example":"true"},{"in":"query","name":"fulfilled_at_least_6_months","type":"boolean","description":"Criteria fulfilled for at least 6 months, including that all features occurred at least twice, as assigned (Hyams 2016 Rome IV H2c). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"}],"errors":[{"code":"invalid_rome_iv_child_abdominal_migraine","message":"Rome IV child abdominal migraine needs the Hyams 2016 child/adolescent H2c flags. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rome-iv-child-abdominal-migraine","citation":{"authors":"Hyams JS, Di Lorenzo C, Saps M, Shulman RJ, Staiano A, van Tilburg M","doi":"10.1053/j.gastro.2016.02.015","id":"hyams-2016","pmid":"27144632","source":"Gastroenterology. 2016;150(6):1456-1468","title":"Childhood Functional Gastrointestinal Disorders: Child/Adolescent","url":"https://doi.org/10.1053/j.gastro.2016.02.015"},"formula_expression":"rome_iv_child_abdominal_migraine iff paroxysmal_intense_periumbilical_midline_or_diffuse_pain_lasting_1_hour_or_more and episodes_separated_weeks_to_months and pain_incapacitating and stereotypical_pattern and associated_features_met >= 2 and not_explained_by_another_condition and fulfilled_at_least_6_months; associated_features_met counts anorexia, nausea, vomiting, headache, photophobia, and pallor (Hyams 2016 Rome IV H2c Abdominal Migraine)","purpose":"Apply the Hyams 2016 Rome IV H2c child/adolescent abdominal migraine diagnostic criteria and return associated_features_met (0-6) and whether the published H2c box holds (rome_iv_child_abdominal_migraine).","markdown_url":"https://magentlab.com/docs/rome-iv-child-abdominal-migraine.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rome_iv_child_abdominal_migraine"},{"name":"formula_expression","type":"string","description":"Hyams 2016 Rome IV H2c child/adolescent abdominal migraine: paroxysmal intense periumbilical, midline, or diffuse pain lasting 1 hour or more, episodes separated by weeks to months, incapacitating stereotypical pain, at least two associated features, not explained by another condition, and fulfilled at least 6 months"},{"name":"associated_features_met","type":"integer","description":"Count of true associated features among anorexia, nausea, vomiting, headache, photophobia, and pallor (0-6)"},{"name":"rome_iv_child_abdominal_migraine","type":"boolean","description":"true only when the four core episode flags, at least two associated features, not explained by another condition, and 6-month fulfillment all hold. Not a diagnosis."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met; associated_features_ge_2 includes value 0-6"},{"name":"citation","type":"object","description":"Hyams 2016 Gastroenterology citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"anorexia":"true","episodes_separated_weeks_to_months":"true","fulfilled_at_least_6_months":"true","headache":"false","nausea":"true","not_explained_by_another_condition":"true","pain_incapacitating":"true","pallor":"false","paroxysmal_intense_periumbilical_midline_or_diffuse_pain_lasting_1_hour_or_more":"true","photophobia":"false","stereotypical_pattern":"true","vomiting":"false"},{"anorexia":"true","episodes_separated_weeks_to_months":"true","fulfilled_at_least_6_months":"true","headache":"false","nausea":"true","not_explained_by_another_condition":"true","pain_incapacitating":"true","pallor":"false","paroxysmal_intense_periumbilical_midline_or_diffuse_pain_lasting_1_hour_or_more":"true","photophobia":"false","stereotypical_pattern":"true","vomiting":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rome-iv-child-abdominal-migraine","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rome-iv-child-abdominal-migraine?paroxysmal_intense_periumbilical_midline_or_diffuse_pain_lasting_1_hour_or_more=true&episodes_separated_weeks_to_months=true&pain_incapacitating=true&stereotypical_pattern=true&anorexia=true&nausea=true&vomiting=false&headache=false&photophobia=false&pallor=false&not_explained_by_another_condition=true&fulfilled_at_least_6_months=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rome-iv-child-abdominal-migraine","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rome-iv-child-fap-nos","description":"Hyams 2016 Rome IV H2d child FAP-NOS. rome_iv_child_fap_nos is true iff episodic_or_continuous_abdominal_pain_not_solely_during_physiologic_events, pain_at_least_4_times_per_month, insufficient_criteria_for_ibs_fd_or_abdominal_migraine, not_explained_by_another_condition, and fulfilled_at_least_2_months. Caller assigns five flags including the IBS/FD/abdominal-migraine residual. magent does not re-run those tools. Not a diagnosis, not adult CAPS, not FAPS (dropped in Rome IV).","parameters":[{"in":"query","name":"episodic_or_continuous_abdominal_pain_not_solely_during_physiologic_events","type":"boolean","description":"Episodic or continuous abdominal pain that does not occur solely during physiologic events (eating, menses), as assigned (Hyams 2016 Rome IV H2d). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"true"},{"in":"query","name":"pain_at_least_4_times_per_month","type":"boolean","description":"Abdominal pain at least 4 times per month, as assigned (Hyams 2016 Rome IV H2d). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"},{"in":"query","name":"insufficient_criteria_for_ibs_fd_or_abdominal_migraine","type":"boolean","description":"Insufficient criteria for IBS, functional dyspepsia, or abdominal migraine, as assigned (Hyams 2016 Rome IV H2d). Residual flag: magent does not re-run those tools. true or false as assigned by the caller.","required":true,"example":"true"},{"in":"query","name":"not_explained_by_another_condition","type":"boolean","description":"After appropriate evaluation, the abdominal pain cannot be fully explained by another medical condition, as assigned (Hyams 2016 Rome IV H2d). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"true"},{"in":"query","name":"fulfilled_at_least_2_months","type":"boolean","description":"Criteria fulfilled for at least 2 months, as assigned (Hyams 2016 Rome IV H2d). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"true"}],"errors":[{"code":"invalid_rome_iv_child_fap_nos","message":"Rome IV child FAP-NOS needs the Hyams 2016 child/adolescent H2d flags. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rome-iv-child-fap-nos","citation":{"authors":"Hyams JS, Di Lorenzo C, Saps M, Shulman RJ, Staiano A, van Tilburg M","doi":"10.1053/j.gastro.2016.02.015","id":"hyams-2016","pmid":"27144632","source":"Gastroenterology. 2016;150(6):1456-1468","title":"Childhood Functional Gastrointestinal Disorders: Child/Adolescent","url":"https://doi.org/10.1053/j.gastro.2016.02.015"},"formula_expression":"rome_iv_child_fap_nos iff episodic_or_continuous_abdominal_pain_not_solely_during_physiologic_events and pain_at_least_4_times_per_month and insufficient_criteria_for_ibs_fd_or_abdominal_migraine and not_explained_by_another_condition and fulfilled_at_least_2_months (Hyams 2016 Rome IV H2d Functional Abdominal Pain NOS)","purpose":"Apply the Hyams 2016 Rome IV H2d child/adolescent Functional Abdominal Pain NOS diagnostic criteria and return whether the published FAP-NOS box holds (rome_iv_child_fap_nos).","markdown_url":"https://magentlab.com/docs/rome-iv-child-fap-nos.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rome_iv_child_fap_nos"},{"name":"formula_expression","type":"string","description":"Hyams 2016 Rome IV H2d Functional Abdominal Pain NOS: episodic or continuous abdominal pain not solely during physiologic events, pain at least 4 times per month, insufficient criteria for IBS, functional dyspepsia, or abdominal migraine, not explained by another condition, and fulfilled at least 2 months"},{"name":"rome_iv_child_fap_nos","type":"boolean","description":"true only when all five required flags hold. Not a diagnosis."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met for the five required flags"},{"name":"citation","type":"object","description":"Hyams 2016 Gastroenterology citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"episodic_or_continuous_abdominal_pain_not_solely_during_physiologic_events":"true","fulfilled_at_least_2_months":"true","insufficient_criteria_for_ibs_fd_or_abdominal_migraine":"true","not_explained_by_another_condition":"true","pain_at_least_4_times_per_month":"true"},{"episodic_or_continuous_abdominal_pain_not_solely_during_physiologic_events":"true","fulfilled_at_least_2_months":"true","insufficient_criteria_for_ibs_fd_or_abdominal_migraine":"true","not_explained_by_another_condition":"true","pain_at_least_4_times_per_month":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rome-iv-child-fap-nos","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rome-iv-child-fap-nos?episodic_or_continuous_abdominal_pain_not_solely_during_physiologic_events=true&pain_at_least_4_times_per_month=true&insufficient_criteria_for_ibs_fd_or_abdominal_migraine=true&not_explained_by_another_condition=true&fulfilled_at_least_2_months=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rome-iv-child-fap-nos","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rome-iv-child-constipation","description":"Hyams 2016 Rome IV H3a. rome_iv_child_constipation is true iff developmental_age_at_least_4_years, duration_at_least_1_month, features_met >= 2, insufficient_criteria_for_ibs, and not_explained_by_another_condition. features_met always counts all six H3a flags (no G7 toilet-trained extras). Weekly frequency is folded into those flags. Caller assigns flags including large_fecal_mass_in_rectum. magent does not examine the child. Not a diagnosis, not infant G7, not adult Rome IV FC.","parameters":[{"in":"query","name":"developmental_age_at_least_4_years","type":"boolean","description":"Developmental age at least 4 years, as assigned (Hyams 2016 Rome IV H3a child/adolescent). true or false as assigned by the caller. magent does not examine the child.","required":true,"example":"true"},{"in":"query","name":"two_or_fewer_defecations_in_toilet_per_week","type":"boolean","description":"Two or fewer defecations in the toilet per week, as assigned (Hyams 2016 Rome IV H3a; one of six features; weekly frequency is folded into this flag). true or false as assigned by the caller. magent does not examine the child.","required":true,"example":"true"},{"in":"query","name":"fecal_incontinence_at_least_weekly","type":"boolean","description":"At least one episode of fecal incontinence per week, as assigned (Hyams 2016 Rome IV H3a; one of six features; weekly frequency is folded into this flag). true or false as assigned by the caller. magent does not examine the child.","required":true,"example":"false"},{"in":"query","name":"retentive_posturing_or_excessive_volitional_stool_retention","type":"boolean","description":"History of retentive posturing or excessive volitional stool retention, as assigned (Hyams 2016 Rome IV H3a; one of six features; weekly frequency is folded into this flag). true or false as assigned by the caller. magent does not examine the child.","required":true,"example":"false"},{"in":"query","name":"painful_or_hard_bowel_movements","type":"boolean","description":"History of painful or hard bowel movements, as assigned (Hyams 2016 Rome IV H3a; one of six features; weekly frequency is folded into this flag). true or false as assigned by the caller. magent does not examine the child.","required":true,"example":"true"},{"in":"query","name":"large_fecal_mass_in_rectum","type":"boolean","description":"Presence of a large fecal mass in the rectum, as assigned (Hyams 2016 Rome IV H3a; one of six features; digital rectal exam is caller-assigned). true or false as assigned by the caller. magent does not examine the child.","required":true,"example":"false"},{"in":"query","name":"large_diameter_stools_that_can_obstruct_toilet","type":"boolean","description":"History of large-diameter stools that can obstruct the toilet, as assigned (Hyams 2016 Rome IV H3a; one of six features; weekly frequency is folded into this flag). true or false as assigned by the caller. magent does not examine the child.","required":true,"example":"false"},{"in":"query","name":"duration_at_least_1_month","type":"boolean","description":"Must include 1 month of at least 2 features occurring at least once per week, as assigned (Hyams 2016 Rome IV H3a). true or false as assigned by the caller. magent does not examine the child.","required":true,"example":"true"},{"in":"query","name":"insufficient_criteria_for_ibs","type":"boolean","description":"Insufficient criteria for irritable bowel syndrome, as assigned (Hyams 2016 Rome IV H3a). true or false as assigned by the caller. magent does not examine the child.","required":true,"example":"true"},{"in":"query","name":"not_explained_by_another_condition","type":"boolean","description":"After appropriate evaluation, the symptoms cannot be fully explained by another medical condition, as assigned (Hyams 2016 Rome IV H3a). true or false as assigned by the caller. magent does not examine the child.","required":true,"example":"true"}],"errors":[{"code":"invalid_rome_iv_child_constipation","message":"Rome IV child functional constipation needs the Hyams 2016 child/adolescent H3a flags. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rome-iv-child-constipation","citation":{"authors":"Hyams JS, Di Lorenzo C, Saps M, Shulman RJ, Staiano A, van Tilburg M","doi":"10.1053/j.gastro.2016.02.015","id":"hyams-2016","pmid":"27144632","source":"Gastroenterology. 2016;150(6):1456-1468","title":"Childhood Functional Gastrointestinal Disorders: Child/Adolescent","url":"https://doi.org/10.1053/j.gastro.2016.02.015"},"formula_expression":"rome_iv_child_constipation iff developmental_age_at_least_4_years and duration_at_least_1_month and features_met >= 2 and insufficient_criteria_for_ibs and not_explained_by_another_condition; features_met always counts two_or_fewer_defecations_in_toilet_per_week, fecal_incontinence_at_least_weekly, retentive_posturing_or_excessive_volitional_stool_retention, painful_or_hard_bowel_movements, large_fecal_mass_in_rectum, and large_diameter_stools_that_can_obstruct_toilet (Hyams 2016 Rome IV H3a Functional Constipation)","purpose":"Apply the Hyams 2016 Rome IV H3a functional constipation (child/adolescent) criteria and return features_met and whether the published child constipation box holds (rome_iv_child_constipation).","markdown_url":"https://magentlab.com/docs/rome-iv-child-constipation.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rome_iv_child_constipation"},{"name":"formula_expression","type":"string","description":"Hyams 2016 Rome IV H3a: developmental age at least 4 years, duration at least 1 month, at least 2 of 6 features, insufficient criteria for IBS, and not explained by another condition"},{"name":"features_met","type":"integer","description":"Count of true features among the six H3a flags. Toilet-trained extras from infant G7 are not used."},{"name":"rome_iv_child_constipation","type":"boolean","description":"true only when developmental_age_at_least_4_years, duration_at_least_1_month, features_met >= 2, insufficient_criteria_for_ibs, and not_explained_by_another_condition. Not a diagnosis."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met; features_ge_2 includes value (features_met)"},{"name":"citation","type":"object","description":"Hyams 2016 Gastroenterology citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"developmental_age_at_least_4_years":"true","duration_at_least_1_month":"true","fecal_incontinence_at_least_weekly":"false","insufficient_criteria_for_ibs":"true","large_diameter_stools_that_can_obstruct_toilet":"false","large_fecal_mass_in_rectum":"false","not_explained_by_another_condition":"true","painful_or_hard_bowel_movements":"true","retentive_posturing_or_excessive_volitional_stool_retention":"false","two_or_fewer_defecations_in_toilet_per_week":"true"},{"developmental_age_at_least_4_years":"true","duration_at_least_1_month":"true","fecal_incontinence_at_least_weekly":"false","insufficient_criteria_for_ibs":"true","large_diameter_stools_that_can_obstruct_toilet":"false","large_fecal_mass_in_rectum":"false","not_explained_by_another_condition":"true","painful_or_hard_bowel_movements":"true","retentive_posturing_or_excessive_volitional_stool_retention":"false","two_or_fewer_defecations_in_toilet_per_week":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rome-iv-child-constipation","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rome-iv-child-constipation?developmental_age_at_least_4_years=true&two_or_fewer_defecations_in_toilet_per_week=true&fecal_incontinence_at_least_weekly=false&retentive_posturing_or_excessive_volitional_stool_retention=false&painful_or_hard_bowel_movements=true&large_fecal_mass_in_rectum=false&large_diameter_stools_that_can_obstruct_toilet=false&duration_at_least_1_month=true&insufficient_criteria_for_ibs=true&not_explained_by_another_condition=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rome-iv-child-constipation","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rome-iv-child-fecal-incontinence","description":"Hyams 2016 Rome IV H3b. rome_iv_child_fecal_incontinence is true iff developmental_age_older_than_4_years, duration_at_least_1_month, defecation_into_places_inappropriate_to_sociocultural_context, no_evidence_of_fecal_retention, and not_explained_by_another_condition. Item 2 is exclusion of fecal retention, not a symptom count. Duration is 1 month. Caller assigns five flags. magent does not examine the child. Not a diagnosis, not H3a functional constipation, not adult Rao 2016 F1.","parameters":[{"in":"query","name":"developmental_age_older_than_4_years","type":"boolean","description":"Developmental age older than 4 years, as assigned (Hyams 2016 Rome IV H3b). true or false as assigned by the caller. magent does not examine the child.","required":true,"example":"true"},{"in":"query","name":"duration_at_least_1_month","type":"boolean","description":"At least a 1-month history (Rome IV shortened from 2 months), as assigned (Hyams 2016 Rome IV H3b). true or false as assigned by the caller. magent does not examine the child.","required":true,"example":"true"},{"in":"query","name":"defecation_into_places_inappropriate_to_sociocultural_context","type":"boolean","description":"Defecation into places inappropriate to the sociocultural context, as assigned (Hyams 2016 Rome IV H3b item 1). true or false as assigned by the caller. magent does not examine the child.","required":true,"example":"true"},{"in":"query","name":"no_evidence_of_fecal_retention","type":"boolean","description":"No evidence of fecal retention, as assigned (Hyams 2016 Rome IV H3b item 2; exclusion of retention, not a symptom count). true or false as assigned by the caller. magent does not examine the child.","required":true,"example":"true"},{"in":"query","name":"not_explained_by_another_condition","type":"boolean","description":"After appropriate medical evaluation, the fecal incontinence cannot be explained by another medical condition, as assigned (Hyams 2016 Rome IV H3b item 3). true or false as assigned by the caller. magent does not examine the child.","required":true,"example":"true"}],"errors":[{"code":"invalid_rome_iv_child_fecal_incontinence","message":"Rome IV child nonretentive fecal incontinence needs the Hyams 2016 child/adolescent H3b flags. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rome-iv-child-fecal-incontinence","citation":{"authors":"Hyams JS, Di Lorenzo C, Saps M, Shulman RJ, Staiano A, van Tilburg M","doi":"10.1053/j.gastro.2016.02.015","id":"hyams-2016","pmid":"27144632","source":"Gastroenterology. 2016;150(6):1456-1468","title":"Childhood Functional Gastrointestinal Disorders: Child/Adolescent","url":"https://doi.org/10.1053/j.gastro.2016.02.015"},"formula_expression":"rome_iv_child_fecal_incontinence iff developmental_age_older_than_4_years and duration_at_least_1_month and defecation_into_places_inappropriate_to_sociocultural_context and no_evidence_of_fecal_retention and not_explained_by_another_condition (Hyams 2016 Rome IV H3b Nonretentive Fecal Incontinence)","purpose":"Apply the Hyams 2016 Rome IV H3b Nonretentive Fecal Incontinence (child/adolescent) criteria and return whether the published child nonretentive fecal incontinence box holds (rome_iv_child_fecal_incontinence).","markdown_url":"https://magentlab.com/docs/rome-iv-child-fecal-incontinence.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rome_iv_child_fecal_incontinence"},{"name":"formula_expression","type":"string","description":"Hyams 2016 Rome IV H3b: developmental age older than 4 years, duration at least 1 month, defecation into places inappropriate to the sociocultural context, no evidence of fecal retention, and not explained by another condition"},{"name":"rome_iv_child_fecal_incontinence","type":"boolean","description":"true only when all five required flags hold. Item 2 is the exclusion-of-retention flag, not a symptom count. Not a diagnosis."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met for the five required flags"},{"name":"citation","type":"object","description":"Hyams 2016 Gastroenterology citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"defecation_into_places_inappropriate_to_sociocultural_context":"true","developmental_age_older_than_4_years":"true","duration_at_least_1_month":"true","no_evidence_of_fecal_retention":"true","not_explained_by_another_condition":"true"},{"defecation_into_places_inappropriate_to_sociocultural_context":"true","developmental_age_older_than_4_years":"true","duration_at_least_1_month":"true","no_evidence_of_fecal_retention":"true","not_explained_by_another_condition":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rome-iv-child-fecal-incontinence","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rome-iv-child-fecal-incontinence?developmental_age_older_than_4_years=true&duration_at_least_1_month=true&defecation_into_places_inappropriate_to_sociocultural_context=true&no_evidence_of_fecal_retention=true&not_explained_by_another_condition=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rome-iv-child-fecal-incontinence","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/bristol-stool","description":"Lewis 1997 Bristol stool form scale: caller-assigned stool_type 1-7. Returns the assigned type and the published form wording (hard lumps like nuts through watery, entirely liquid). Stool form correlates with whole-gut transit time. magent does not inspect stool. Not a diagnosis, not constipation or diarrhea bands, and not a Rome IBS subtype.","parameters":[{"in":"query","name":"stool_type","type":"integer","description":"Lewis 1997 Bristol stool form scale type 1-7 as assigned by the caller (1 separate hard lumps, like nuts; 2 sausage-shaped but lumpy; 3 like a sausage but with cracks on its surface; 4 like a sausage or snake, smooth and soft; 5 soft blobs with clear-cut edges; 6 fluffy pieces with ragged edges, a mushy stool; 7 watery, no solid pieces, entirely liquid). magent does not inspect stool.","required":true,"example":"4"}],"errors":[{"code":"invalid_bristol_type","message":"stool_type must be an integer from 1 to 7 (Lewis 1997). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/bristol-stool","citation":{"authors":"Lewis SJ, Heaton KW","doi":"10.3109/00365529709011203","id":"lewis-heaton-1997","pmid":"9299672","source":"Scand J Gastroenterol. 1997;32(9):920-924","title":"Stool form scale as a useful guide to intestinal transit time","url":"https://doi.org/10.3109/00365529709011203"},"formula_expression":"stool_type = caller-assigned integer 1-7 (Lewis 1997 Bristol stool form scale); the tool echoes stool_type; stool form correlates with whole-gut transit time; no constipation or diarrhea bands","purpose":"Return the Lewis 1997 Bristol stool form scale type 1-7 from a caller-assigned integer, with the published form wording.","markdown_url":"https://magentlab.com/docs/bristol-stool.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"bristol_stool"},{"name":"formula_expression","type":"string","description":"Published type-echo rule"},{"name":"stool_type","type":"integer","description":"Caller-assigned Bristol stool form scale type 1-7"},{"name":"score","type":"integer","description":"Same as stool_type"},{"name":"max_score","type":"integer","description":"7"},{"name":"description","type":"string","description":"Lewis 1997 form wording for that type"},{"name":"components","type":"array","description":"stool_type component"},{"name":"citation","type":"object","description":"Lewis and Heaton 1997"},{"name":"disclaimer","type":"string","description":"Not a medical device"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"stool_type":"4"},{"stool_type":"4"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/bristol-stool","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/bristol-stool?stool_type=4","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/bristol-stool","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/manning","description":"Manning 1978 IBS symptoms. Six caller-assigned flags, 1 each, max 6: visible abdominal distension, pain relief with bowel movement, more frequent stools at pain onset, looser stools at pain onset, rectal mucus, incomplete evacuation. Score is the count of true flags (0-6). More symptoms made IBS more likely; no published cutoff. Count only. Not a diagnosis, not Rome III/IV. magent does not examine the patient.","parameters":[{"in":"query","name":"visible_abdominal_distension","type":"boolean","description":"Visible abdominal distension (Manning 1978; one of four symptoms significantly more common in IBS). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"pain_relief_with_bowel_movement","type":"boolean","description":"Pain eased after bowel action (Manning 1978; one of four symptoms significantly more common in IBS). true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"more_frequent_stools_with_pain_onset","type":"boolean","description":"More frequent stools at onset of pain (Manning 1978; one of four symptoms significantly more common in IBS). true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"looser_stools_with_pain_onset","type":"boolean","description":"Looser stools at onset of pain (Manning 1978; one of four symptoms significantly more common in IBS). true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"rectal_mucus","type":"boolean","description":"Passage of mucus per rectum (Manning 1978; more common in IBS, not statistically significant in that table). true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"incomplete_evacuation","type":"boolean","description":"Feeling of incomplete evacuation (Manning 1978; more common in IBS, not statistically significant in that table). true or false as assigned by the caller.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/manning","citation":{"authors":"Manning AP, Thompson WG, Heaton KW, Morris AF","doi":"10.1136/bmj.2.6138.653","id":"manning-1978","pmid":"698649","source":"Br Med J. 1978;2(6138):653-654","title":"Towards positive diagnosis of the irritable bowel","url":"https://doi.org/10.1136/bmj.2.6138.653"},"formula_expression":"manning = visible_abdominal_distension + pain_relief_with_bowel_movement + more_frequent_stools_with_pain_onset + looser_stools_with_pain_onset + rectal_mucus + incomplete_evacuation; each 1 if true; max 6","purpose":"Count the six Manning 1978 IBS symptoms and return the integer score (0-6). Manning 1978 does not publish a diagnostic cutoff.","markdown_url":"https://magentlab.com/docs/manning.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"manning"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Count of true Manning 1978 symptoms (0-6). Not a diagnosis and not a published cutoff."},{"name":"max_score","type":"integer","description":"6"},{"name":"components","type":"array","description":"Per-symptom points"},{"name":"citation","type":"object","description":"Manning et al. Br Med J 1978 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"incomplete_evacuation":"false","looser_stools_with_pain_onset":"false","more_frequent_stools_with_pain_onset":"false","pain_relief_with_bowel_movement":"false","rectal_mucus":"false","visible_abdominal_distension":"false"},{"incomplete_evacuation":"false","looser_stools_with_pain_onset":"false","more_frequent_stools_with_pain_onset":"false","pain_relief_with_bowel_movement":"false","rectal_mucus":"false","visible_abdominal_distension":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/manning","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/manning?visible_abdominal_distension=false&pain_relief_with_bowel_movement=false&more_frequent_stools_with_pain_onset=false&looser_stools_with_pain_onset=false&rectal_mucus=false&incomplete_evacuation=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/manning","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/kruis","description":"Kruis 1984 weighted IBS versus organic score. History: pain/flatulence/irregularity triad +34, duration >2 years +16, characteristic pain descriptors +23, alternating constipation/diarrhea +14. Organic flags: abnormal physical or pathognomonic history -47, ESR >10 mm/h -13, leukocytosis -50, anemia -98, blood in stool -98. IBS iff score >= 44. Caller assigns flags. magent does not examine the patient or run labs. Not a diagnosis, not Manning, not Rome.","parameters":[{"in":"query","name":"symptom_triad","type":"boolean","description":"Abdominal pain, flatulence, and irregularities of bowel movement in the same patient (Kruis 1984 Table 4 A+B+C triad). true scores +34. true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"true"},{"in":"query","name":"duration_gt_2_years","type":"boolean","description":"Those symptoms for more than 2 years as assigned by the caller (Kruis 1984). true scores +16. magent does not take a history.","required":true,"example":"true"},{"in":"query","name":"characteristic_pain_descriptors","type":"boolean","description":"Abdominal pain described as burning, cutting, very strong, terrible, feeling of pressure, dull, boring, or not so bad (Kruis 1984 Figure 1). true scores +23. magent does not examine the patient.","required":true,"example":"true"},{"in":"query","name":"alternating_constipation_diarrhea","type":"boolean","description":"Alternating bowel movements (constipation/diarrhea) as assigned by the caller (Kruis 1984). true scores +14.","required":true,"example":"true"},{"in":"query","name":"abnormal_physical_or_pathognomonic_history","type":"boolean","description":"Abnormal physical findings and/or history pathognomonic for any diagnosis other than IBS as assigned by the caller (Kruis 1984). true scores -47. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"esr_gt_10_mm_h","type":"boolean","description":"Erythrocyte sedimentation rate >10 mm/h (>20 mm/2 h on the 1984 Westergren form) as assigned by the caller (Kruis 1984). true scores -13. magent does not run labs.","required":true,"example":"false"},{"in":"query","name":"leukocytosis","type":"boolean","description":"Leukocytosis, white-cell count >10,000/µL, as assigned by the caller (Kruis 1984). true scores -50. magent does not run labs.","required":true,"example":"false"},{"in":"query","name":"anemia","type":"boolean","description":"Anemia: hemoglobin <12 g/dL in females or <14 g/dL in males as assigned by the caller (Kruis 1984). true scores -98. magent does not run labs.","required":true,"example":"false"},{"in":"query","name":"blood_in_stool","type":"boolean","description":"History of blood in stool as assigned by the caller (Kruis 1984; retained at -98 though not independently significant in the logistic model). magent does not examine stool.","required":true,"example":"false"}],"errors":[{"code":"invalid_kruis","message":"Kruis 1984 IBS versus organic items must use the published 1984 weights and cutoff from that paper only. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/kruis","citation":{"authors":"Kruis W, Thieme C, Weinzierl M, Schüssler P, Holl J, Paulus W","doi":"10.1016/0016-5085(84)90119-7","id":"kruis-1984","pmid":"6724251","source":"Gastroenterology. 1984;87(1):1-7","title":"A diagnostic score for the irritable bowel syndrome. Its value in the exclusion of organic disease","url":"https://doi.org/10.1016/0016-5085(84)90119-7"},"formula_expression":"kruis = symptom_triad 34 + duration_gt_2_years 16 + characteristic_pain_descriptors 23 + alternating_constipation_diarrhea 14 + abnormal_physical_or_pathognomonic_history -47 + esr_gt_10_mm_h -13 + leukocytosis -50 + anemia -98 + blood_in_stool -98; IBS iff score >= 44 (Kruis 1984 minimum score 44)","purpose":"Sum the Kruis 1984 signed weights (history items plus physical and laboratory flags) and return whether the published IBS cutoff of 44 is met.","markdown_url":"https://magentlab.com/docs/kruis.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"kruis"},{"name":"formula_expression","type":"string","description":"Kruis 1984 signed-weight expression and >= 44 cutoff"},{"name":"score","type":"integer","description":"Kruis 1984 weighted total. Integer; may be negative when organic flags are present."},{"name":"max_score","type":"integer","description":"87 (sum of the four history weights)"},{"name":"cutoff","type":"integer","description":"44. Kruis 1984 minimum score to exclude organic disease with 99% accuracy (IBS iff score >= 44)."},{"name":"kruis_ibs","type":"boolean","description":"true iff score >= 44. Published 1984 operating point, not a diagnosis. magent does not examine the patient."},{"name":"band","type":"string","description":"ibs when score >= 44; organic otherwise. Not a diagnosis."},{"name":"components","type":"array","description":"Per-item Kruis 1984 signed points"},{"name":"citation","type":"object","description":"Kruis et al. Gastroenterology 1984 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"abnormal_physical_or_pathognomonic_history":"false","alternating_constipation_diarrhea":"true","anemia":"false","blood_in_stool":"false","characteristic_pain_descriptors":"true","duration_gt_2_years":"true","esr_gt_10_mm_h":"false","leukocytosis":"false","symptom_triad":"true"},{"abnormal_physical_or_pathognomonic_history":"false","alternating_constipation_diarrhea":"true","anemia":"false","blood_in_stool":"false","characteristic_pain_descriptors":"true","duration_gt_2_years":"true","esr_gt_10_mm_h":"false","leukocytosis":"false","symptom_triad":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/kruis","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/kruis?symptom_triad=true&duration_gt_2_years=true&characteristic_pain_descriptors=true&alternating_constipation_diarrhea=true&abnormal_physical_or_pathognomonic_history=false&esr_gt_10_mm_h=false&leukocytosis=false&anemia=false&blood_in_stool=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/kruis","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/truelove-witts","description":"Truelove and Witts 1955 ulcerative colitis severity. severe iff stools_per_day >= 6 with macroscopic blood and at least one of fever, tachycardia, anemia, and esr_raised; mild iff stools_per_day <= 4, macroscopic_blood false, and no systemic flags; otherwise moderately_severe. Caller assigns flags from the 1955 table (fever mean evening >37.5 C or 37.8 C on 2 of 4 days; pulse >90; Hb 75% or less; ESR >30). magent does not examine the patient. Not a diagnosis, not Mayo UC, not PUCAI.","parameters":[{"in":"query","name":"stools_per_day","type":"integer","description":"Number of stools (motions) per day as assigned by the caller (integer 0-40). The 1955 mild column is four or less; the severe column is six or more. magent does not count stools.","required":true,"example":"2"},{"in":"query","name":"macroscopic_blood","type":"boolean","description":"Macroscopic blood in stools as in the 1955 severe column (with macroscopic blood). true or false as assigned by the caller. The 1955 mild column allows no more than small amounts; assign false when blood is absent or no more than small amounts. magent does not examine the stool.","required":true,"example":"false"},{"in":"query","name":"fever","type":"boolean","description":"Fever as assigned by the caller using the 1955 definition: mean evening temperature more than 99.5 F (37.5 C), or a temperature of 100 F (37.8 C) or more on at least two days out of four. true or false. magent does not measure temperature.","required":true,"example":"false"},{"in":"query","name":"tachycardia","type":"boolean","description":"Tachycardia as assigned by the caller using the 1955 definition: mean pulse rate more than 90 per minute. true or false. magent does not measure pulse.","required":true,"example":"false"},{"in":"query","name":"anemia","type":"boolean","description":"Anaemia as assigned by the caller using the 1955 definition: haemoglobin 75% or less, allowance made for recent transfusion. true or false. Not the later 10.5 g/dL restatement. magent does not measure haemoglobin.","required":true,"example":"false"},{"in":"query","name":"esr_raised","type":"boolean","description":"E.S.R. much raised as assigned by the caller using the 1955 definition: more than 30 mm in one hour. true or false. magent does not measure ESR.","required":true,"example":"false"}],"errors":[{"code":"invalid_truelove_stools","message":"stools_per_day must be an integer from 0 to 40 (Truelove and Witts 1955). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/truelove-witts","citation":{"authors":"Truelove SC, Witts LJ","doi":"10.1136/bmj.2.4947.1041","id":"truelove-witts-1955","pmid":"13260656","source":"Br Med J. 1955;2(4947):1041-1048","title":"Cortisone in ulcerative colitis; final report on a therapeutic trial","url":"https://doi.org/10.1136/bmj.2.4947.1041"},"formula_expression":"severity severe iff stools_per_day >= 6 and macroscopic_blood and systemic_features_met >= 1; mild iff stools_per_day <= 4 and not macroscopic_blood and systemic_features_met == 0; else moderately_severe; systemic_features_met counts fever, tachycardia, anemia, and esr_raised (Truelove and Witts 1955)","purpose":"Apply the Truelove and Witts 1955 ulcerative colitis severity table and return mild, moderately_severe, or severe from stools_per_day and five caller-assigned flags.","markdown_url":"https://magentlab.com/docs/truelove-witts.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"truelove_witts"},{"name":"formula_expression","type":"string","description":"Truelove and Witts 1955 mild / moderately severe / severe classification from stools, blood, and four systemic flags"},{"name":"severity","type":"string","description":"mild, moderately_severe, or severe (1955 classification). Not Mayo. Not PUCAI. Not a treatment order."},{"name":"stools_per_day","type":"integer","description":"Echo of the caller-assigned stool count (0-40)"},{"name":"systemic_features_met","type":"integer","description":"Count of true systemic flags among fever, tachycardia, anemia, and esr_raised (0-4)"},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met; stools_le_4, stools_ge_6, frequent_bloody_stools, no_systemic, and systemic_ge_1 include value"},{"name":"citation","type":"object","description":"Truelove and Witts 1955 BMJ citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"anemia":"false","esr_raised":"false","fever":"false","macroscopic_blood":"false","stools_per_day":"2","tachycardia":"false"},{"anemia":"false","esr_raised":"false","fever":"false","macroscopic_blood":"false","stools_per_day":"2","tachycardia":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/truelove-witts","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/truelove-witts?stools_per_day=2&macroscopic_blood=false&fever=false&tachycardia=false&anemia=false&esr_raised=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/truelove-witts","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/travis","description":"Travis 1996 day-3 of intravenous steroids for severe ulcerative colitis. travis_high is true when stools_per_day > 8, or when stools_per_day is 3 to 8 inclusive and crp_mg_l > 45. Stools 8 with CRP 45 is not high. Stools 2 with high CRP is not high. Both parameters are required. Not a colectomy order, not the Ho score, and not Truelove and Witts. magent does not count stools or measure CRP.","parameters":[{"in":"query","name":"stools_per_day","type":"integer","description":"Number of stools (motions) per day as assigned by the caller (integer 0-40). Travis 1996 high is stools_per_day > 8, or stools_per_day 3 to 8 inclusive with CRP > 45 mg/L. Both parameters are required. magent does not count stools.","required":true,"example":"9"},{"in":"query","name":"crp_mg_l","type":"number","description":"C-reactive protein in mg/L (0-500), not mg/dL. Travis 1996 CRP arm is crp_mg_l > 45 when stools_per_day is 3 to 8 inclusive. CRP = 45 is not high on that arm. magent does not assay CRP.","required":true,"example":"10"}],"errors":[{"code":"invalid_stools_per_day","message":"stools_per_day must be an integer from 0 to 40. Returned before settlement; you are not charged.","status":400},{"code":"invalid_crp","message":"crp_mg_l must be a number from 0 to 500. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/travis","citation":{"authors":"Travis SPL, Farrant JM, Ricketts C, Nolan DJ, Mortensen NM, Kettlewell MGW, Jewell DP","doi":"10.1136/gut.38.6.905","id":"travis-1996","pmid":"8984031","source":"Gut. 1996;38(6):905-910","title":"Predicting outcome in severe ulcerative colitis","url":"https://doi.org/10.1136/gut.38.6.905"},"formula_expression":"travis_high iff stools_per_day > 8 or (stools_per_day in 3-8 inclusive and crp_mg_l > 45) (Travis 1996 day-3 of IV steroids for severe UC)","purpose":"Apply the Travis 1996 day-3 of intravenous corticosteroids rule for severe ulcerative colitis and return travis_high from stools_per_day and crp_mg_l.","markdown_url":"https://magentlab.com/docs/travis.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"travis"},{"name":"formula_expression","type":"string","description":"Travis 1996 day-3 IV steroid high-risk rule for severe UC"},{"name":"travis_high","type":"boolean","description":"true when stools_per_day > 8 or (stools_per_day 3-8 inclusive and crp_mg_l > 45). Not a colectomy order."},{"name":"stools_per_day","type":"integer","description":"Echo of the caller-assigned stool count (0-40)"},{"name":"crp_mg_l","type":"number","description":"C-reactive protein used in mg/L"},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met; stools_gt_8 (value is stools) and stools_3_to_8_and_crp_gt_45. travis_high is true if either is met."},{"name":"citation","type":"object","description":"Travis 1996 Gut citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"crp_mg_l":"10","stools_per_day":"9"},{"crp_mg_l":"10","stools_per_day":"9"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/travis","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/travis?stools_per_day=9&crp_mg_l=10","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/travis","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/ho-index","description":"Ho 2004 day-3 IV-steroid score for severe UC (0–9): mean stools (<4 → 0; 4 ≤ x < 6 → 1; 6 ≤ x ≤ 9 → 2; x > 9 → 4), caller-assigned colonic dilatation (+4), albumin <30 g/L (+1; 30 is not low). Failure: 0–1 → 11%, 2–3 → 43%, ≥4 → 85% (ROC ≥4). Not Travis, not Truelove and Witts, not a colectomy order. magent does not count stools, read films, or measure albumin.","parameters":[{"in":"query","name":"mean_stool_frequency","type":"number","description":"Mean stool frequency over the first 3 days of IV steroids, as assigned by the caller (number 0-40). Ho 2004: <4 scores 0; 4 ≤ x < 6 scores 1; 6 ≤ x ≤ 9 scores 2; x > 9 scores 4. Exactly 6 and exactly 9 score 2. magent does not count stools.","required":true,"example":"3"},{"in":"query","name":"colonic_dilatation","type":"boolean","description":"Caller-assigned colonic dilatation (Ho 2004). true scores 4; false scores 0. magent does not read an abdominal film and does not invent a centimetre cutoff.","required":true,"example":"false"},{"in":"query","name":"albumin_g_l","type":"number","description":"Serum albumin in g/L (10-60). Provide this or albumin_g_dl, not both. Ho 2004 hypoalbuminaemia is <30 g/L (30 is not low). magent does not assay albumin.","required":false,"example":"35"},{"in":"query","name":"albumin_g_dl","type":"number","description":"Serum albumin in g/dL (1-6). Converted as g/L = g/dL × 10. Provide this or albumin_g_l, not both.","required":false,"example":"3.5"}],"errors":[{"code":"invalid_ho_stools","message":"mean_stool_frequency must be a number from 0 to 40 (Ho 2004 three-day mean). Returned before settlement; you are not charged.","status":400},{"code":"invalid_albumin","message":"albumin_g_dl (1-6) or albumin_g_l (10-60) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/ho-index","citation":{"authors":"Ho GT, Mowat C, Goddard CJ, Fennell JM, Shah NB, Prescott RJ, Satsangi J","doi":"10.1111/j.1365-2036.2004.01945.x","id":"ho-2004","pmid":"15142197","source":"Aliment Pharmacol Ther. 2004;19(10):1079-1087","title":"Predicting the outcome of severe ulcerative colitis: development of a novel risk score to aid early selection of patients for second-line medical therapy or surgery","url":"https://doi.org/10.1111/j.1365-2036.2004.01945.x"},"formula_expression":"Ho 2004 day-3 IV-steroid severe UC: stool_points(<4 → 0; 4 ≤ mean_stool_frequency < 6 → 1; 6 ≤ x ≤ 9 → 2; x > 9 → 4) + colonic_dilatation (true → 4) + hypoalbuminaemia (albumin_g_l < 30 → 1); max 9; medical-therapy failure 0–1 → 11%, 2–3 → 43%, ≥4 → 85% (ROC operating point ≥4)","purpose":"Sum the Ho 2004 day-3 IV-steroid score for severe ulcerative colitis from mean stool frequency, colonic dilatation, and hypoalbuminaemia, and return the published medical-therapy failure bands.","markdown_url":"https://magentlab.com/docs/ho-index.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"ho_index"},{"name":"formula_expression","type":"string","description":"Ho 2004 day-3 IV-steroid severe UC point score"},{"name":"score","type":"integer","description":"Ho points 0-9"},{"name":"max_score","type":"integer","description":"9"},{"name":"risk","type":"string","description":"low (score 0-1), intermediate (2-3), or high (≥4). High is the Ho 2004 ROC operating point."},{"name":"medical_failure_percent","type":"integer","description":"Printed Ho 2004 medical-therapy failure: 11 if score 0-1, 43 if 2-3, 85 if ≥4. Not a colectomy probability."},{"name":"score_ge_4","type":"boolean","description":"true when score ≥ 4 (Ho 2004 ROC operating point). Not a treatment order."},{"name":"mean_stool_frequency","type":"number","description":"Echo of the caller-assigned three-day mean stool frequency (0-40)"},{"name":"colonic_dilatation","type":"boolean","description":"Echo of the caller-assigned colonic-dilatation flag"},{"name":"albumin_g_l","type":"number","description":"Albumin used in g/L"},{"name":"hypoalbuminaemia","type":"boolean","description":"true when albumin_g_l < 30. 30 g/L is not hypoalbuminaemia."},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Ho 2004 APT citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"albumin_g_l":"35","colonic_dilatation":"false","mean_stool_frequency":"3"},{"albumin_g_l":"35","colonic_dilatation":"false","mean_stool_frequency":"3"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/ho-index","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/ho-index?mean_stool_frequency=3&colonic_dilatation=false&albumin_g_l=35","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/ho-index","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/tokyo-cholecystitis","description":"Yokoe 2018 TG18 (=TG13) acute cholecystitis. Definite if local signs (Murphy or RUQ mass/pain/tenderness), systemic signs (fever, elevated CRP or WBC), and imaging; suspected if local and systemic without imaging; else none. Suspected/definite: Grade III if any organ dysfunction, else Grade II if any Grade II flag, else Grade I. Severity none when diagnosis is none. Not cholangitis or Alvarado/RIPASA. magent does not examine, assay, or read imaging. Not a medical device.","parameters":[{"in":"query","name":"murphy","type":"boolean","description":"Murphy's sign as assigned by the caller (Yokoe 2018 TG18 local sign of inflammation A). true or false. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"ruq_mass_pain_tenderness","type":"boolean","description":"Right upper quadrant mass, pain, or tenderness as assigned by the caller (Yokoe 2018 TG18 local sign of inflammation A). true or false. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"fever","type":"boolean","description":"Fever as assigned by the caller (Yokoe 2018 TG18 systemic sign of inflammation B). true or false. magent does not measure temperature.","required":true,"example":"false"},{"in":"query","name":"elevated_crp","type":"boolean","description":"Elevated C-reactive protein as assigned by the caller (Yokoe 2018 TG18 systemic sign of inflammation B). true or false. magent does not assay CRP.","required":true,"example":"false"},{"in":"query","name":"elevated_wbc","type":"boolean","description":"Elevated white blood cell count as assigned by the caller (Yokoe 2018 TG18 systemic sign of inflammation B). true or false. magent does not assay WBC.","required":true,"example":"false"},{"in":"query","name":"imaging_findings","type":"boolean","description":"Imaging findings characteristic of acute cholecystitis as assigned by the caller (Yokoe 2018 TG18 diagnostic criterion C). true or false. magent does not read imaging.","required":true,"example":"false"},{"in":"query","name":"hypotension_vasopressors","type":"boolean","description":"Hypotension requiring dopamine ≥5 µg/kg/min or any norepinephrine as assigned by the caller (Yokoe 2018 TG18 Grade III cardiovascular dysfunction). true or false. magent does not measure blood pressure or order vasopressors.","required":true,"example":"false"},{"in":"query","name":"decreased_consciousness","type":"boolean","description":"Decreased level of consciousness as assigned by the caller (Yokoe 2018 TG18 Grade III neurological dysfunction). true or false. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"pfr_lt_300","type":"boolean","description":"PaO2/FiO2 <300 as assigned by the caller (Yokoe 2018 TG18 Grade III respiratory dysfunction). true or false. magent does not interpret blood gas or ventilator settings.","required":true,"example":"false"},{"in":"query","name":"oliguria_or_creatinine_gt_2","type":"boolean","description":"Oliguria or creatinine >2.0 mg/dL as assigned by the caller (Yokoe 2018 TG18 Grade III renal dysfunction). true or false. magent does not assay creatinine or measure urine output.","required":true,"example":"false"},{"in":"query","name":"pt_inr_gt_1_5","type":"boolean","description":"PT-INR >1.5 as assigned by the caller (Yokoe 2018 TG18 Grade III hepatic dysfunction). true or false. magent does not interpret coagulation assays.","required":true,"example":"false"},{"in":"query","name":"platelets_lt_100k","type":"boolean","description":"Platelet count <100,000/mm³ as assigned by the caller (Yokoe 2018 TG18 Grade III hematological dysfunction). true or false. magent does not assay platelets.","required":true,"example":"false"},{"in":"query","name":"wbc_gt_18000","type":"boolean","description":"White blood cell count >18,000/mm³ as assigned by the caller (Yokoe 2018 TG18 Grade II). true or false. magent does not assay WBC.","required":true,"example":"false"},{"in":"query","name":"palpable_tender_ruq_mass","type":"boolean","description":"Palpable tender mass in the right upper quadrant as assigned by the caller (Yokoe 2018 TG18 Grade II). true or false. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"duration_gt_72h","type":"boolean","description":"Duration of complaints >72 h as assigned by the caller (Yokoe 2018 TG18 Grade II). true or false. magent does not take a history.","required":true,"example":"false"},{"in":"query","name":"marked_local_inflammation","type":"boolean","description":"Marked local inflammation (gangrenous cholecystitis, pericholecystic abscess, hepatic abscess, biliary peritonitis, or emphysematous cholecystitis) as assigned by the caller (Yokoe 2018 TG18 Grade II). true or false. magent does not interpret imaging or operative findings.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/tokyo-cholecystitis","citation":{"authors":"Yokoe M, Hata J, Takada T, et al.","doi":"10.1002/jhbp.515","id":"yokoe-2018","pmid":"29032636","source":"J Hepatobiliary Pancreat Sci. 2018;25(1):41-54","title":"Tokyo Guidelines 2018: diagnostic criteria and severity grading of acute cholecystitis (with videos).","url":"https://doi.org/10.1002/jhbp.515"},"formula_expression":"definite iff local_signs and systemic_signs and imaging_findings; suspected iff local_signs and systemic_signs without imaging_findings; else none. local_signs iff murphy or ruq_mass_pain_tenderness; systemic_signs iff fever or elevated_crp or elevated_wbc. When diagnosis is suspected or definite: grade_iii if any organ-dysfunction flag (hypotension_vasopressors, decreased_consciousness, pfr_lt_300, oliguria_or_creatinine_gt_2, pt_inr_gt_1_5, platelets_lt_100k), else grade_ii if any Grade II flag (wbc_gt_18000, palpable_tender_ruq_mass, duration_gt_72h, marked_local_inflammation), else grade_i. When diagnosis is none, severity is none (Yokoe 2018 TG18 = TG13 unmodified)","purpose":"Apply Yokoe 2018 Tokyo Guidelines 2018 diagnostic criteria and severity grading of acute cholecystitis (unchanged from TG13) and return diagnosis (definite, suspected, or none) and severity (grade_i, grade_ii, grade_iii, or none) from caller-assigned flags.","markdown_url":"https://magentlab.com/docs/tokyo-cholecystitis.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"tokyo_cholecystitis"},{"name":"formula_expression","type":"string","description":"Yokoe 2018 TG18 (=TG13) acute cholecystitis diagnostic criteria and severity grading"},{"name":"diagnosis","type":"string","description":"definite when local_signs, systemic_signs, and imaging_findings all hold; suspected when local_signs and systemic_signs hold without imaging_findings; otherwise none. Not a diagnosis that replaces imaging."},{"name":"severity","type":"string","description":"none when diagnosis is none; otherwise grade_iii if any organ-dysfunction flag, else grade_ii if any Grade II flag, else grade_i. Grade III beats Grade II. Not a cholecystectomy order."},{"name":"criteria","type":"array","description":"Rows for local_signs (A), systemic_signs (B), imaging_findings (C), grade_iii_any, grade_ii_any, then each remaining caller-assigned flag (factor and met)"},{"name":"citation","type":"object","description":"Yokoe 2018 J Hepatobiliary Pancreat Sci citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"decreased_consciousness":"false","duration_gt_72h":"false","elevated_crp":"false","elevated_wbc":"false","fever":"false","hypotension_vasopressors":"false","imaging_findings":"false","marked_local_inflammation":"false","murphy":"false","oliguria_or_creatinine_gt_2":"false","palpable_tender_ruq_mass":"false","pfr_lt_300":"false","platelets_lt_100k":"false","pt_inr_gt_1_5":"false","ruq_mass_pain_tenderness":"false","wbc_gt_18000":"false"},{"decreased_consciousness":"false","duration_gt_72h":"false","elevated_crp":"false","elevated_wbc":"false","fever":"false","hypotension_vasopressors":"false","imaging_findings":"false","marked_local_inflammation":"false","murphy":"false","oliguria_or_creatinine_gt_2":"false","palpable_tender_ruq_mass":"false","pfr_lt_300":"false","platelets_lt_100k":"false","pt_inr_gt_1_5":"false","ruq_mass_pain_tenderness":"false","wbc_gt_18000":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/tokyo-cholecystitis","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/tokyo-cholecystitis?murphy=false&ruq_mass_pain_tenderness=false&fever=false&elevated_crp=false&elevated_wbc=false&imaging_findings=false&hypotension_vasopressors=false&decreased_consciousness=false&pfr_lt_300=false&oliguria_or_creatinine_gt_2=false&pt_inr_gt_1_5=false&platelets_lt_100k=false&wbc_gt_18000=false&palpable_tender_ruq_mass=false&duration_gt_72h=false&marked_local_inflammation=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/tokyo-cholecystitis","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/tokyo-cholangitis","description":"Kiriyama 2018 TG18 (=TG13) cholangitis. Definite if one A (fever/chills or elevated WBC/CRP), one B (jaundice or abnormal LFTs), and one C (dilatation or etiology); suspected if A plus B or C; else none. Grade III if any organ dysfunction, else Grade II if any two of WBC, fever >=39C, age >=75, bilirubin >=5, or hypoalbuminemia, else Grade I. Severity none if diagnosis none. Not cholecystitis or Alvarado/RIPASA. magent does not examine, assay, or read imaging. Not a medical device.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Counts as one Kiriyama 2018 TG18 Grade II item when age ≥75. Age 75 meets; age 74 does not. magent does not examine the patient.","required":true,"example":"60"},{"in":"query","name":"fever_or_chills","type":"boolean","description":"Fever and/or shaking chills as assigned by the caller (Kiriyama 2018 TG18 A-1). true or false. magent does not measure temperature or examine the patient.","required":true,"example":"false"},{"in":"query","name":"elevated_wbc_or_crp","type":"boolean","description":"Laboratory inflammatory response (elevated WBC or CRP) as assigned by the caller (Kiriyama 2018 TG18 A-2). true or false. magent does not assay WBC or CRP.","required":true,"example":"false"},{"in":"query","name":"jaundice","type":"boolean","description":"Jaundice as assigned by the caller (Kiriyama 2018 TG18 B-1). true or false. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"abnormal_lfts","type":"boolean","description":"Increased ALP, GGT, AST, or ALT as assigned by the caller (Kiriyama 2018 TG18 B-2). true or false. magent does not assay liver tests.","required":true,"example":"false"},{"in":"query","name":"biliary_dilatation","type":"boolean","description":"Biliary dilatation as assigned by the caller (Kiriyama 2018 TG18 C-1). true or false. magent does not read imaging.","required":true,"example":"false"},{"in":"query","name":"etiology_on_imaging","type":"boolean","description":"Evidence of etiology on imaging (stricture, stone, stent, or equivalent) as assigned by the caller (Kiriyama 2018 TG18 C-2). true or false. magent does not read imaging.","required":true,"example":"false"},{"in":"query","name":"hypotension_vasopressors","type":"boolean","description":"Hypotension requiring dopamine ≥5 µg/kg/min or any norepinephrine as assigned by the caller (Kiriyama 2018 TG18 Grade III cardiovascular dysfunction). true or false. magent does not measure blood pressure or order vasopressors.","required":true,"example":"false"},{"in":"query","name":"decreased_consciousness","type":"boolean","description":"Decreased level of consciousness as assigned by the caller (Kiriyama 2018 TG18 Grade III neurological dysfunction). true or false. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"pfr_lt_300","type":"boolean","description":"PaO2/FiO2 <300 as assigned by the caller (Kiriyama 2018 TG18 Grade III respiratory dysfunction). true or false. magent does not interpret blood gas or ventilator settings.","required":true,"example":"false"},{"in":"query","name":"oliguria_or_creatinine_gt_2","type":"boolean","description":"Oliguria or creatinine >2.0 mg/dL as assigned by the caller (Kiriyama 2018 TG18 Grade III renal dysfunction). true or false. magent does not assay creatinine or measure urine output.","required":true,"example":"false"},{"in":"query","name":"pt_inr_gt_1_5","type":"boolean","description":"PT-INR >1.5 as assigned by the caller (Kiriyama 2018 TG18 Grade III hepatic dysfunction). true or false. magent does not interpret coagulation assays.","required":true,"example":"false"},{"in":"query","name":"platelets_lt_100k","type":"boolean","description":"Platelet count <100,000/mm³ as assigned by the caller (Kiriyama 2018 TG18 Grade III hematological dysfunction). true or false. magent does not assay platelets.","required":true,"example":"false"},{"in":"query","name":"wbc_gt_12k_or_lt_4k","type":"boolean","description":"White blood cell count >12,000/mm³ or <4,000/mm³ as assigned by the caller (Kiriyama 2018 TG18 Grade II). true or false. magent does not assay WBC.","required":true,"example":"false"},{"in":"query","name":"fever_ge_39","type":"boolean","description":"Fever ≥39°C as assigned by the caller (Kiriyama 2018 TG18 Grade II). true or false. magent does not measure temperature.","required":true,"example":"false"},{"in":"query","name":"bilirubin_ge_5","type":"boolean","description":"Total bilirubin ≥5 mg/dL as assigned by the caller (Kiriyama 2018 TG18 Grade II). true or false. magent does not assay bilirubin.","required":true,"example":"false"},{"in":"query","name":"hypoalbuminemia","type":"boolean","description":"Albumin <0.7× the local lower limit of normal as assigned by the caller (Kiriyama 2018 TG18 Grade II). true or false. magent does not assay albumin.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/tokyo-cholangitis","citation":{"authors":"Kiriyama S, Kozaka K, Takada T, et al.","doi":"10.1002/jhbp.512","id":"kiriyama-2018","pmid":"29032610","source":"J Hepatobiliary Pancreat Sci. 2018;25(1):17-30","title":"Tokyo Guidelines 2018: diagnostic criteria and severity grading of acute cholangitis (with videos).","url":"https://doi.org/10.1002/jhbp.512"},"formula_expression":"definite iff one A (fever_or_chills or elevated_wbc_or_crp) and one B (jaundice or abnormal_lfts) and one C (biliary_dilatation or etiology_on_imaging); suspected iff one A and one item in either B or C (not all three); else none. When diagnosis is suspected or definite: grade_iii if any organ-dysfunction flag (hypotension_vasopressors, decreased_consciousness, pfr_lt_300, oliguria_or_creatinine_gt_2, pt_inr_gt_1_5, platelets_lt_100k), else grade_ii if any two Grade II items (wbc_gt_12k_or_lt_4k, fever_ge_39, age>=75, bilirubin_ge_5, hypoalbuminemia), else grade_i. When diagnosis is none, severity is none (Kiriyama 2018 TG18 = TG13 unmodified)","purpose":"Apply Kiriyama 2018 Tokyo Guidelines 2018 diagnostic criteria and severity grading of acute cholangitis (unchanged from TG13) and return diagnosis (definite, suspected, or none) and severity (grade_i, grade_ii, grade_iii, or none) from caller-assigned flags and age.","markdown_url":"https://magentlab.com/docs/tokyo-cholangitis.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"tokyo_cholangitis"},{"name":"formula_expression","type":"string","description":"Kiriyama 2018 TG18 (=TG13) acute cholangitis diagnostic criteria and severity grading"},{"name":"diagnosis","type":"string","description":"definite when one A, one B, and one C all hold; suspected when one A holds with one B or one C (not all three); otherwise none. Not a diagnosis that replaces imaging."},{"name":"severity","type":"string","description":"none when diagnosis is none; otherwise grade_iii if any organ-dysfunction flag, else grade_ii if any two Grade II items, else grade_i. Grade III beats Grade II. Grade II is any two, not any one. Not a biliary-drainage order."},{"name":"criteria","type":"array","description":"Rows for systemic_inflammation (A), cholestasis (B), imaging (C), grade_iii_any, grade_ii_two, age_ge_75, then each caller-assigned flag (factor and met)"},{"name":"citation","type":"object","description":"Kiriyama 2018 J Hepatobiliary Pancreat Sci citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"abnormal_lfts":"false","age":"60","biliary_dilatation":"false","bilirubin_ge_5":"false","decreased_consciousness":"false","elevated_wbc_or_crp":"false","etiology_on_imaging":"false","fever_ge_39":"false","fever_or_chills":"false","hypoalbuminemia":"false","hypotension_vasopressors":"false","jaundice":"false","oliguria_or_creatinine_gt_2":"false","pfr_lt_300":"false","platelets_lt_100k":"false","pt_inr_gt_1_5":"false","wbc_gt_12k_or_lt_4k":"false"},{"abnormal_lfts":"false","age":"60","biliary_dilatation":"false","bilirubin_ge_5":"false","decreased_consciousness":"false","elevated_wbc_or_crp":"false","etiology_on_imaging":"false","fever_ge_39":"false","fever_or_chills":"false","hypoalbuminemia":"false","hypotension_vasopressors":"false","jaundice":"false","oliguria_or_creatinine_gt_2":"false","pfr_lt_300":"false","platelets_lt_100k":"false","pt_inr_gt_1_5":"false","wbc_gt_12k_or_lt_4k":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/tokyo-cholangitis","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/tokyo-cholangitis?age=60&fever_or_chills=false&elevated_wbc_or_crp=false&jaundice=false&abnormal_lfts=false&biliary_dilatation=false&etiology_on_imaging=false&hypotension_vasopressors=false&decreased_consciousness=false&pfr_lt_300=false&oliguria_or_creatinine_gt_2=false&pt_inr_gt_1_5=false&platelets_lt_100k=false&wbc_gt_12k_or_lt_4k=false&fever_ge_39=false&bilirubin_ge_5=false&hypoalbuminemia=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/tokyo-cholangitis","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/choles-score","description":"Bharamgoudar 2018 CholeS Table 3 score for elective laparoscopic cholecystectomy duration. Age, sex, indication, BMI, CBD diameter, gallbladder wall, pre-op CT, planned IOC, prior surgical admissions, ASA class. Max 20. Numeric total only; no duration bands. Not a booking, not Nassar, not Tokyo. magent does not image the gallbladder.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (integer 18-120). Bharamgoudar 2018 Table 3: <40 scores 0; ≥40 scores 1.5. Age 39 scores 0; 40 scores 1.5.","required":true,"example":"35"},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"female or male. Female scores 0; male scores 1 (Bharamgoudar 2018 Table 3).","required":true,"example":"female"},{"in":"query","name":"indication","type":"string","enum":["pancreatitis","colic_dyskinesia_polyp","cbd_stone","acalculous_cholecystitis"],"description":"Caller-assigned indication for elective laparoscopic cholecystectomy (Bharamgoudar 2018 Table 3). pancreatitis scores 0. colic_dyskinesia_polyp (biliary colic, biliary dyskinesia, or gallbladder polyp) scores 0.5. cbd_stone scores 2. acalculous_cholecystitis scores 2.5. magent does not diagnose the indication.","required":true,"example":"pancreatitis"},{"in":"query","name":"bmi_kg_m2","type":"number","description":"Body-mass index in kg/m^2 (10-80). Caller-supplied; magent does not compute BMI from height and weight. Bharamgoudar 2018 Table 3: <25 scores 0; 25-35 inclusive scores 1; >35 scores 2. 25.0 and 35.0 score 1; 36 scores 2.","required":true,"example":"24"},{"in":"query","name":"cbd_diameter","type":"string","enum":["normal","dilated"],"description":"Caller-assigned common bile duct diameter (Bharamgoudar 2018 Table 3). normal scores 0; dilated scores 2. magent does not image the gallbladder or measure the CBD.","required":true,"example":"normal"},{"in":"query","name":"gallbladder_wall","type":"string","enum":["normal","thick"],"description":"Caller-assigned gallbladder wall (Bharamgoudar 2018 Table 3). normal scores 0; thick scores 1.5. magent does not image the gallbladder.","required":true,"example":"normal"},{"in":"query","name":"pre_operative_ct","type":"boolean","description":"Pre-operative CT as assigned by the caller (Bharamgoudar 2018 Table 3). true scores 1.5. magent does not read imaging.","required":true,"example":"false"},{"in":"query","name":"planned_intraop_cholangiogram","type":"boolean","description":"Planned intraoperative cholangiogram as assigned by the caller (Bharamgoudar 2018 Table 3). true scores 3. magent does not plan the operation.","required":true,"example":"false"},{"in":"query","name":"previous_surgical_admissions","type":"integer","description":"Previous surgical admissions, integer 0-20 (Bharamgoudar 2018 Table 3). 0 scores 0; 1-2 scores 1; >2 scores 2.5.","required":true,"example":"0"},{"in":"query","name":"asa_class","type":"integer","description":"ASA physical status class, integer 1-5 (Bharamgoudar 2018 Table 3; Gupta 2011 1-5 range). 1 scores 0; 2 scores 1; 3-5 scores 2.5. magent does not assign ASA class.","required":true,"example":"1"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_bmi_kg_m2","message":"bmi_kg_m2 must be a number from 10 to 80. Returned before settlement; you are not charged.","status":400},{"code":"invalid_asa_class","message":"asa_class must be an integer from 1 to 5 (Gupta 2011 ASA physical status). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_choles","message":"indication must be pancreatitis, colic_dyskinesia_polyp, cbd_stone, or acalculous_cholecystitis; cbd_diameter normal or dilated; gallbladder_wall normal or thick; previous_surgical_admissions an integer 0-20 (Bharamgoudar 2018 CholeS Table 3). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/choles-score","citation":{"authors":"Bharamgoudar R, Sonsale A, Hodson J, Griffiths E; CholeS Study Group, West Midlands Research Collaborative","doi":"10.1007/s00464-018-6030-6","id":"bharamgoudar-2018","pmid":"29340820","source":"Surg Endosc. 2018;32(7):3149-3157","title":"The development and validation of a scoring tool to predict the operative duration of elective laparoscopic cholecystectomy","url":"https://doi.org/10.1007/s00464-018-6030-6"},"formula_expression":"CholeS = age (<40 0, >=40 1.5) + sex (female 0, male 1) + indication (pancreatitis 0, colic_dyskinesia_polyp 0.5, cbd_stone 2, acalculous_cholecystitis 2.5) + bmi_kg_m2 (<25 0, 25-35 inclusive 1, >35 2) + cbd_diameter (normal 0, dilated 2) + gallbladder_wall (normal 0, thick 1.5) + pre_operative_ct (true 1.5) + planned_intraop_cholangiogram (true 3) + previous_surgical_admissions (0 0, 1-2 1, >2 2.5) + asa_class (1 0, 2 1, 3-5 2.5); Bharamgoudar 2018 Table 3; max 20; numeric total only, no duration or risk bands","purpose":"Sum Bharamgoudar 2018 Table 3 points from caller-assigned age, sex, indication, BMI, CBD diameter, gallbladder wall, pre-operative CT, planned intraoperative cholangiogram, previous surgical admissions, and ASA class, and return the numeric total (max 20). Does not classify operative duration or risk bands.","markdown_url":"https://magentlab.com/docs/choles-score.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"choles_score"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"number","description":"Bharamgoudar 2018 Table 3 points 0-20 (half-points allowed; not integer-rounded). Numeric total only; not a duration or risk band."},{"name":"max_score","type":"integer","description":"Always 20"},{"name":"age_years","type":"integer","description":"Age used for the exclusive age band"},{"name":"sex","type":"string","description":"female or male used for the sex points"},{"name":"indication","type":"string","description":"Exclusive indication used (pancreatitis, colic_dyskinesia_polyp, cbd_stone, or acalculous_cholecystitis)"},{"name":"bmi_kg_m2","type":"number","description":"BMI in kg/m^2 used for the exclusive BMI band"},{"name":"cbd_diameter","type":"string","description":"Caller-assigned CBD diameter used (normal or dilated)"},{"name":"gallbladder_wall","type":"string","description":"Caller-assigned gallbladder wall used (normal or thick)"},{"name":"pre_operative_ct","type":"boolean","description":"Whether pre-operative CT was assigned true"},{"name":"planned_intraop_cholangiogram","type":"boolean","description":"Whether planned intraoperative cholangiogram was assigned true"},{"name":"previous_surgical_admissions","type":"integer","description":"Previous surgical admissions used (0-20)"},{"name":"asa_class","type":"integer","description":"ASA class used (1-5)"},{"name":"components","type":"array","description":"Per-factor Bharamgoudar 2018 Table 3 points"},{"name":"citation","type":"object","description":"Bharamgoudar et al. Surg Endosc 2018 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"35","asa_class":"1","bmi_kg_m2":"24","cbd_diameter":"normal","gallbladder_wall":"normal","indication":"pancreatitis","planned_intraop_cholangiogram":"false","pre_operative_ct":"false","previous_surgical_admissions":"0","sex":"female"},{"age":"35","asa_class":"1","bmi_kg_m2":"24","cbd_diameter":"normal","gallbladder_wall":"normal","indication":"pancreatitis","planned_intraop_cholangiogram":"false","pre_operative_ct":"false","previous_surgical_admissions":"0","sex":"female"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/choles-score","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/choles-score?age=35&sex=female&indication=pancreatitis&bmi_kg_m2=24&cbd_diameter=normal&gallbladder_wall=normal&pre_operative_ct=false&planned_intraop_cholangiogram=false&previous_surgical_admissions=0&asa_class=1","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/choles-score","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/corrected-calcium","description":"Albumin-corrected calcium using the simplified Payne form (0.8 mg/dL per g/dL, equivalent to 0.02 mmol/L per g/L). Payne 1973 reports coefficient 1.0. Deterministic arithmetic with citation; not a treatment recommendation.","parameters":[{"in":"query","name":"calcium_mg_dl","type":"number","description":"Total calcium in mg/dL (4-16). Provide this or calcium_mmol_l.","required":false,"example":"8.0"},{"in":"query","name":"calcium_mmol_l","type":"number","description":"Total calcium in mmol/L. Converted as mg/dL = mmol/L * 4.0.","required":false,"example":"2.0"},{"in":"query","name":"albumin_g_dl","type":"number","description":"Albumin in g/dL (1-6). Provide this or albumin_g_l.","required":false,"example":"3.0"},{"in":"query","name":"albumin_g_l","type":"number","description":"Albumin in g/L. Converted as g/dL = g/L / 10.","required":false,"example":"30"}],"errors":[{"code":"invalid_calcium","message":"calcium_mg_dl (4-16) or calcium_mmol_l (1-4) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_albumin","message":"albumin_g_dl (1-6) or albumin_g_l (10-60) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/corrected-calcium","citation":{"authors":"Payne RB, Little AJ, Williams RB, Milner JR","doi":"10.1136/bmj.4.5893.643","id":"payne-1973","source":"Br Med J. 1973;4(5893):643-646","title":"Interpretation of serum calcium in patients with abnormal serum proteins","url":"https://doi.org/10.1136/bmj.4.5893.643"},"formula_expression":"corrected_ca_mg_dl = calcium_mg_dl + 0.8 * (4.0 - albumin_g_dl). Simplified form (0.8 mg/dL per g/dL, equivalent to 0.02 mmol/L per g/L): Desgagnés N, King JA, Kline GA, Seiden-Long I, Leung AA. Use of Albumin-Adjusted Calcium Measurements in Clinical Practice. JAMA Netw Open. 2025;8(1):e2455251. DOI 10.1001/jamanetworkopen.2024.55251.","purpose":"Compute albumin-corrected calcium as calcium_mg_dl + 0.8 * (4.0 - albumin_g_dl). Payne 1973 reports an adjustment of calcium - albumin + 4.0 (coefficient 1.0). This calculator uses the simplified form (0.8 mg/dL per g/dL, equivalent to 0.02 mmol/L per g/L). Simplified form: Desgagnés N, King JA, Kline GA, Seiden-Long I, Leung AA. Use of Albumin-Adjusted Calcium Measurements in Clinical Practice. JAMA Netw Open. 2025;8(1):e2455251. DOI 10.1001/jamanetworkopen.2024.55251.","markdown_url":"https://magentlab.com/docs/corrected-calcium.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"payne (legacy label for this simplified 0.8-factor expression)"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"calcium_mg_dl","type":"number","description":"Normalized total calcium"},{"name":"albumin_g_dl","type":"number","description":"Normalized albumin"},{"name":"corrected_calcium_mg_dl","type":"number","description":"Albumin-corrected calcium, 1 decimal"},{"name":"citation","type":"object","description":"Payne 1973 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"albumin_g_dl":"3.0","calcium_mg_dl":"8.0"},{"albumin_g_dl":"3.0","calcium_mg_dl":"8.0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/corrected-calcium","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/corrected-calcium?calcium_mg_dl=8.0&albumin_g_dl=3.0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/corrected-calcium","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/a1c-eag","description":"Nathan/ADAG A1C to estimated average glucose conversion, or the reverse. Provide exactly one of a1c_percent or eAG. Deterministic published equation with citation.","parameters":[{"in":"query","name":"a1c_percent","type":"number","description":"HbA1c in percent (4-15). Provide this or an eAG, not both.","required":false,"example":"7.0"},{"in":"query","name":"eag_mg_dl","type":"number","description":"Estimated average glucose in mg/dL (50-500).","required":false,"example":"154"},{"in":"query","name":"eag_mmol_l","type":"number","description":"Estimated average glucose in mmol/L. Converted as mg/dL = mmol/L * 18.","required":false,"example":"8.6"}],"errors":[{"code":"invalid_a1c_input","message":"provide a1c_percent or eag_mg_dl/eag_mmol_l, not both Returned before settlement; you are not charged.","status":400},{"code":"invalid_a1c","message":"a1c_percent must be a number from 4 to 15 Returned before settlement; you are not charged.","status":400},{"code":"invalid_eag","message":"eag_mg_dl (50-500) or eag_mmol_l (2.8-27.8) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/a1c-eag","citation":{"authors":"Nathan DM, Kuenen J, Borg R, Zheng H, Schoenfeld D, Heine RJ","doi":"10.2337/dc08-0545","id":"nathan-2008","source":"Diabetes Care. 2008;31(8):1473-1478","title":"Translating the A1C assay into estimated average glucose values","url":"https://doi.org/10.2337/dc08-0545"},"formula_expression":"eAG_mg_dl = 28.7 * A1C_percent - 46.7","purpose":"Convert A1C percent to estimated average glucose, or the reverse, using Nathan/ADAG.","markdown_url":"https://magentlab.com/docs/a1c-eag.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"nathan_adag"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"direction","type":"string","description":"a1c_to_eag or eag_to_a1c"},{"name":"a1c_percent","type":"number","description":"A1C %, 1 decimal"},{"name":"eag_mg_dl","type":"number","description":"eAG in mg/dL, 1 decimal"},{"name":"eag_mmol_l","type":"number","description":"eAG in mmol/L (mg/dL / 18), 1 decimal"},{"name":"citation","type":"object","description":"Nathan Diabetes Care 2008"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"a1c_percent":"7.0"},{"a1c_percent":"7.0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/a1c-eag","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/a1c-eag?a1c_percent=7.0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/a1c-eag","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/homa-ir","description":"HOMA-IR as (fasting glucose in mmol/L × insulin in µU/mL) / 22.5 (Matthews et al. 1985). Provide glucose_mg_dl (50–1000) or glucose_mmol_l (2.8–55.5), not both; mg/dL converts as mmol/L = mg/dL / 18. Returns the approximation rounded to two decimals. Not HOMA-B, not the HOMA2 computer model, not a diabetes diagnosis, and not an insulin-resistance cutoff.","parameters":[{"in":"query","name":"glucose_mg_dl","type":"number","description":"Fasting plasma glucose in mg/dL (50-1000). Converted as mmol/L = mg/dL / 18. Provide this or glucose_mmol_l, not both.","required":false,"example":"90"},{"in":"query","name":"glucose_mmol_l","type":"number","description":"Fasting plasma glucose in mmol/L (2.8-55.5). Provide this or glucose_mg_dl, not both.","required":false,"example":"5.0"},{"in":"query","name":"insulin_uu_ml","type":"number","description":"Fasting insulin in µU/mL (= mU/L) (0.1-500).","required":true,"example":"10"}],"errors":[{"code":"invalid_glucose","message":"glucose_mg_dl (50-1000) or glucose_mmol_l (2.8-55.5) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_insulin","message":"insulin_uu_ml must be a number from 0.1 to 500. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/homa-ir","citation":{"authors":"Matthews DR, Hosker JP, Rudenski AS, Naylor BA, Treacher DF, Turner RC","doi":"10.1007/BF00280883","id":"matthews-1985","source":"Diabetologia. 1985;28(7):412-419","title":"Homeostasis model assessment: insulin resistance and beta-cell function from fasting plasma glucose and insulin concentrations in man","url":"https://doi.org/10.1007/BF00280883"},"formula_expression":"homa_ir = (glucose_mmol_l * insulin_uu_ml) / 22.5","purpose":"Compute the Matthews 1985 HOMA-IR approximation from fasting plasma glucose and insulin.","markdown_url":"https://magentlab.com/docs/homa-ir.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"homa_ir"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"glucose_mmol_l","type":"number","description":"Fasting glucose in mmol/L (mg/dL / 18 when supplied as mg/dL), 2 decimals"},{"name":"insulin_uu_ml","type":"number","description":"Fasting insulin in µU/mL used"},{"name":"homa_ir","type":"number","description":"Matthews 1985 HOMA-IR approximation, 2 decimals"},{"name":"citation","type":"object","description":"Matthews et al. 1985 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"glucose_mg_dl":"90","insulin_uu_ml":"10"},{"glucose_mg_dl":"90","insulin_uu_ml":"10"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/homa-ir","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/homa-ir?glucose_mg_dl=90&insulin_uu_ml=10","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/homa-ir","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/cpri","description":"Saisho 2011 CPR index: serum C-peptide (ng/mL) / plasma glucose (mg/dL) * 100, two decimals. timing fasting or postprandial (same formula; required label). below_best_cutoff true iff cpri < 2.02 (ROC for later insulin therapy; 80.8% sensitivity, 63.3% specificity). Glucose mg/dL only. Not HOMA-IR, not a diabetes diagnosis, not C-peptide alone, and not an insulin order.","parameters":[{"in":"query","name":"timing","type":"string","enum":["fasting","postprandial"],"description":"Sample timing as assigned by the caller: fasting or postprandial. Same CPR-index arithmetic; magent does not pick a formula from the clock.","required":true,"example":"postprandial"},{"in":"query","name":"c_peptide_ng_ml","type":"number","description":"Serum C-peptide in ng/mL (0-40). Saisho 2011 CPR units.","required":true,"example":"2.02"},{"in":"query","name":"glucose_mg_dl","type":"number","description":"Plasma glucose in mg/dL (50-1000). mg/dL only; magent does not convert mmol/L.","required":true,"example":"100"}],"errors":[{"code":"invalid_c_peptide","message":"c_peptide_ng_ml must be a number from 0 to 40 (Saisho 2011 CPR ng/mL). Returned before settlement; you are not charged.","status":400},{"code":"invalid_cpri_glucose","message":"glucose_mg_dl must be a number from 50 to 1000. Returned before settlement; you are not charged.","status":400},{"code":"invalid_cpri_timing","message":"timing must be fasting or postprandial (Saisho 2011 CPR index). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/cpri","citation":{"authors":"Saisho Y, Kou K, Tanaka K, Abe T, Kurosawa H, Shimada A, Meguro S, Kawai T, Itoh H","doi":"10.1507/endocrj.K10E-399","id":"saisho-2011","pmid":"21415555","source":"Endocr J. 2011;58(4):315-322","title":"Postprandial serum C-peptide to plasma glucose ratio as a predictor of subsequent insulin treatment in patients with type 2 diabetes","url":"https://doi.org/10.1507/endocrj.K10E-399"},"formula_expression":"cpri = c_peptide_ng_ml / glucose_mg_dl * 100","purpose":"Compute the Saisho 2011 C-peptide-to-plasma-glucose ratio (CPR index) from serum C-peptide in ng/mL and plasma glucose in mg/dL.","markdown_url":"https://magentlab.com/docs/cpri.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"cpri"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"cpri","type":"number","description":"Saisho 2011 CPR index, 2 decimals"},{"name":"below_best_cutoff","type":"boolean","description":"true iff cpri < 2.02 (Saisho 2011 best ROC cut-off for later insulin therapy). Not an insulin order."},{"name":"timing","type":"string","description":"fasting or postprandial as supplied by the caller"},{"name":"c_peptide_ng_ml","type":"number","description":"Serum C-peptide in ng/mL used"},{"name":"glucose_mg_dl","type":"number","description":"Plasma glucose in mg/dL used"},{"name":"citation","type":"object","description":"Saisho et al. 2011 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"c_peptide_ng_ml":"2.02","glucose_mg_dl":"100","timing":"postprandial"},{"c_peptide_ng_ml":"2.02","glucose_mg_dl":"100","timing":"postprandial"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/cpri","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/cpri?timing=postprandial&c_peptide_ng_ml=2.02&glucose_mg_dl=100","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/cpri","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/mets-ir","description":"Bello-Chavolla 2018 METS-IR: ln(2×glucose_mg_dl + triglycerides_mg_dl)×BMI / ln(HDL_mg_dl), natural log, two decimals. Supply glucose, triglycerides, and HDL each as exactly one of mg/dL or mmol/L (glucose ×18, TG ×88.57, HDL ×38.67). BMI is caller-supplied (10–80). highest_quartile_t2d is true only when METS-IR > 50.39 (derivation highest T2D-risk quartile). Not a diabetes diagnosis, not HOMA-IR/HOMA2, and not a treatment threshold.","parameters":[{"in":"query","name":"glucose_mg_dl","type":"number","description":"Fasting plasma glucose in mg/dL (50-1000). Provide this or glucose_mmol_l, not both.","required":false,"example":"90"},{"in":"query","name":"glucose_mmol_l","type":"number","description":"Fasting plasma glucose in mmol/L (2.8-55.5). Converted as mg/dL = mmol/L * 18. Provide this or glucose_mg_dl, not both.","required":false,"example":"5.0"},{"in":"query","name":"triglycerides_mg_dl","type":"number","description":"Triglycerides in mg/dL (10-2000). Provide this or triglycerides_mmol_l, not both.","required":false,"example":"100"},{"in":"query","name":"triglycerides_mmol_l","type":"number","description":"Triglycerides in mmol/L (0.11-22.6). Converted as mg/dL = mmol/L * 88.57. Provide this or triglycerides_mg_dl, not both.","required":false,"example":"1.13"},{"in":"query","name":"hdl_mg_dl","type":"number","description":"HDL cholesterol in mg/dL (5-150). Provide this or hdl_mmol_l, not both. Used in the natural-log term.","required":false,"example":"50"},{"in":"query","name":"hdl_mmol_l","type":"number","description":"HDL cholesterol in mmol/L (0.1-3.9). Converted as mg/dL = mmol/L * 38.67. Provide this or hdl_mg_dl, not both.","required":false,"example":"1.29"},{"in":"query","name":"bmi_kg_m2","type":"number","description":"Body-mass index in kg/m^2 (10-80). Caller-supplied; magent does not compute BMI.","required":true,"example":"25"}],"errors":[{"code":"invalid_glucose","message":"glucose_mg_dl (50-1000) or glucose_mmol_l (2.8-55.5) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_hdl","message":"hdl_mg_dl must be a number from 5 to 150, or hdl_mmol_l from 0.1 to 3.9, not both. Returned before settlement; you are not charged.","status":400},{"code":"invalid_bmi_kg_m2","message":"bmi_kg_m2 must be a number from 10 to 80. Returned before settlement; you are not charged.","status":400},{"code":"invalid_mets_ir_triglyceride","message":"triglycerides_mg_dl must be 10-2000, or triglycerides_mmol_l 0.11-22.6, not both. Do not use the Friedewald 400 mg/dL cap. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/mets-ir","citation":{"authors":"Bello-Chavolla OY, Almeda-Valdes P, Gomez-Velasco D, Viveros-Ruiz T, Cruz-Bautista I, Romo-Romo A, Sánchez-Lázaro D, Meza-Oviedo D, Vargas-Vázquez A, Campos OA, Sevilla-González MDR, Martagón AJ, Hernández LM, Mehta R, Caballeros-Barragán CR, Aguilar-Salinas CA","doi":"10.1530/eje-17-0883","id":"bello-chavolla-2018","pmid":"29535168","source":"Eur J Endocrinol. 2018;178(5):533-544","title":"METS-IR, a novel score to evaluate insulin sensitivity, is predictive of visceral adiposity and incident type 2 diabetes","url":"https://doi.org/10.1530/eje-17-0883"},"formula_expression":"mets_ir = ln(2 * glucose_mg_dl + triglycerides_mg_dl) * bmi_kg_m2 / ln(hdl_mg_dl)","purpose":"Compute the Bello-Chavolla 2018 METS-IR score from fasting glucose, triglycerides, caller-supplied BMI, and HDL as a marker of insulin sensitivity associated with visceral adiposity and incident type 2 diabetes.","markdown_url":"https://magentlab.com/docs/mets-ir.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"mets_ir"},{"name":"formula_expression","type":"string","description":"Exact Bello-Chavolla 2018 expression (natural log; lipids in mg/dL)"},{"name":"glucose_mg_dl","type":"number","description":"Glucose used in mg/dL (after mmol/L conversion when supplied)"},{"name":"triglycerides_mg_dl","type":"number","description":"Triglycerides used in mg/dL (after mmol/L conversion when supplied)"},{"name":"hdl_mg_dl","type":"number","description":"HDL cholesterol used in mg/dL (after mmol/L conversion when supplied)"},{"name":"bmi_kg_m2","type":"number","description":"Caller-supplied BMI in kg/m^2"},{"name":"mets_ir","type":"number","description":"Bello-Chavolla 2018 METS-IR, 2 decimals"},{"name":"highest_quartile_t2d","type":"boolean","description":"True iff mets_ir > 50.39 (derivation highest T2D-risk quartile). Equality is not highest. Not a diagnosis."},{"name":"citation","type":"object","description":"Bello-Chavolla Eur J Endocrinol 2018 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"bmi_kg_m2":"25","glucose_mg_dl":"90","hdl_mg_dl":"50","triglycerides_mg_dl":"100"},{"bmi_kg_m2":"25","glucose_mg_dl":"90","hdl_mg_dl":"50","triglycerides_mg_dl":"100"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/mets-ir","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/mets-ir?glucose_mg_dl=90&triglycerides_mg_dl=100&bmi_kg_m2=25&hdl_mg_dl=50","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/mets-ir","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/findrisc","description":"Lindström 2003 Finnish diabetes risk score (FINDRISC). Original seven-item 0–20 score, cutoff ≥9: age (<45 → 0, 45–54 → 2, 55–64 → 3, ≥65 → 4); BMI (<25 → 0, 25–30 → 1, >30 → 3); sex-specific waist; BP medication 2; high-glucose history 5; daily 30-min activity 0 else 2; daily vegetables 0 else 1. Returns score and at_risk. Not a diabetes diagnosis and not the later family-history revision.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Lindström 2003: <45 scores 0; 45-54 scores 2; 55-64 scores 3; ≥65 scores 4. Age 45 and 54 score 2; 55 and 64 score 3; 65 scores 4.","required":true,"example":"40"},{"in":"query","name":"bmi_kg_m2","type":"number","description":"Body-mass index in kg/m^2 (10-80). Caller-supplied; magent does not compute BMI from height and weight. Lindström 2003: <25 scores 0; 25-30 scores 1; >30 scores 3. 25.0 and 30.0 score 1; 30.1 scores 3.","required":true,"example":"22"},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"female or male. Selects the Lindström 2003 waist bands.","required":true,"example":"male"},{"in":"query","name":"waist_cm","type":"number","description":"Waist circumference in cm (40-200). Lindström 2003 men: <94 scores 0; 94-102 scores 3; >102 scores 4. Women: <80 scores 0; 80-88 scores 3; >88 scores 4. 94 and 102 (men) and 80 and 88 (women) score 3.","required":true,"example":"80"},{"in":"query","name":"bp_medication","type":"boolean","description":"History of antihypertensive drug treatment (Lindström 2003). true scores 2; false scores 0.","required":true,"example":"false"},{"in":"query","name":"history_high_glucose","type":"boolean","description":"History of high blood glucose (health examination, illness, or pregnancy) (Lindström 2003). Caller-assigned; magent does not assay glucose. true scores 5; false scores 0.","required":true,"example":"false"},{"in":"query","name":"activity_30min","type":"boolean","description":"Usually at least 30 minutes of physical activity daily at work and/or leisure, including normal daily activity (Lindström 2003). true scores 0; false scores 2.","required":true,"example":"true"},{"in":"query","name":"daily_vegetables","type":"boolean","description":"Daily consumption of vegetables, fruit, or berries (Lindström 2003). true scores 0; false scores 1.","required":true,"example":"true"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_bmi_kg_m2","message":"bmi_kg_m2 must be a number from 10 to 80. Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_waist_range","message":"waist_cm must be a number from 40 to 200. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/findrisc","citation":{"authors":"Lindström J, Tuomilehto J","doi":"10.2337/diacare.26.3.725","id":"lindstrom-2003","pmid":"12610029","source":"Diabetes Care. 2003;26(3):725-731","title":"The diabetes risk score: a practical tool to predict type 2 diabetes risk","url":"https://doi.org/10.2337/diacare.26.3.725"},"formula_expression":"FINDRISC = age + bmi + waist + bp_medication + history_high_glucose + inactivity + no_daily_vegetables; age <45 -> 0, 45-54 -> 2, 55-64 -> 3, >=65 -> 4; BMI <25 -> 0, 25-30 -> 1, >30 -> 3; waist men <94 -> 0, 94-102 -> 3, >102 -> 4; women <80 -> 0, 80-88 -> 3, >88 -> 4; bp_medication 2; history_high_glucose 5; activity_30min false -> 2; daily_vegetables false -> 1; max 20; at_risk iff score>=9","purpose":"Sum the original Lindström 2003 seven-item Finnish diabetes risk score (FINDRISC, 0–20) and return at_risk when the total is ≥9.","markdown_url":"https://magentlab.com/docs/findrisc.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"findrisc"},{"name":"formula_expression","type":"string","description":"Exact Lindström 2003 expression"},{"name":"score","type":"integer","description":"FINDRISC points; published range 0-20"},{"name":"max_score","type":"integer","description":"20 (Lindström 2003 published maximum)"},{"name":"at_risk","type":"boolean","description":"true iff score ≥9 (Lindström 2003 cutoff). Not a type 2 diabetes diagnosis and not a 10-year probability."},{"name":"age_years","type":"integer","description":"Age in years used for the age band"},{"name":"bmi_kg_m2","type":"number","description":"Caller-supplied BMI in kg/m^2 used for the BMI band"},{"name":"sex","type":"string","description":"female or male, used for the waist bands"},{"name":"waist_cm","type":"number","description":"Waist circumference in cm used"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Lindström 2003 Diabetes Care citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"activity_30min":"true","age":"40","bmi_kg_m2":"22","bp_medication":"false","daily_vegetables":"true","history_high_glucose":"false","sex":"male","waist_cm":"80"},{"activity_30min":"true","age":"40","bmi_kg_m2":"22","bp_medication":"false","daily_vegetables":"true","history_high_glucose":"false","sex":"male","waist_cm":"80"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/findrisc","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/findrisc?age=40&bmi_kg_m2=22&sex=male&waist_cm=80&bp_medication=false&history_high_glucose=false&activity_30min=true&daily_vegetables=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/findrisc","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/ausdrisk","description":"Chen 2010 AUSDRISK Box 3 waist model (not BMI). Male 3; age 18-34 0, 35-44 2, 45-54 4, 55-64 6, >=65 8; ancestry atsi_or_asian or southern_european_or_pacific 2 (caller-assigned); parental diabetes 3; high glucose 6; antihypertensives 2; current smoker 2; physically inactive 2; waist cat1/2/3 = 0/4/7 (ATSI/Asian vs other cutoffs). Max 35. at_risk iff score>=12. Not a diagnosis. Not FINDRISC.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Chen 2010: 25-34 scores 0; magent scores 18-34 as 0 and does not reject 18-24. 35-44 scores 2; 45-54 scores 4; 55-64 scores 6; ≥65 scores 8. Age 34 scores 0; 35 and 44 score 2; 45 and 54 score 4; 55 and 64 score 6; 65 scores 8.","required":true,"example":30},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"female or male. Chen 2010: male scores 3; female scores 0.","required":true,"example":"female"},{"in":"query","name":"ancestry","type":"string","enum":["atsi_or_asian","southern_european_or_pacific","other"],"description":"Caller-assigned ancestry as used in Chen 2010. atsi_or_asian (Aboriginal and Torres Strait Islander or Asian) or southern_european_or_pacific (Southern European or Pacific Islander) scores 2; other scores 0. magent does not assign ancestry. Waist cutoffs for atsi_or_asian follow the paper footnote; southern_european_or_pacific uses the otherwise cutoffs.","required":true,"example":"other"},{"in":"query","name":"parental_diabetes","type":"boolean","description":"Parent with diabetes (Chen 2010). true scores 3; false scores 0.","required":true,"example":false},{"in":"query","name":"history_high_glucose","type":"boolean","description":"History of high blood glucose including during illness or pregnancy (Chen 2010). Caller-assigned; magent does not assay glucose. true scores 6; false scores 0.","required":true,"example":false},{"in":"query","name":"antihypertensive","type":"boolean","description":"Currently taking antihypertensive medication (Chen 2010). true scores 2; false scores 0.","required":true,"example":false},{"in":"query","name":"current_smoker","type":"boolean","description":"Currently smokes (Chen 2010). true scores 2; false scores 0.","required":true,"example":false},{"in":"query","name":"physically_inactive","type":"boolean","description":"Not doing at least 2.5 hours of physical activity per week (Chen 2010). true scores 2; false scores 0. Caller-assigned; magent does not measure activity.","required":true,"example":false},{"in":"query","name":"waist_cm","type":"number","description":"Waist circumference in cm (40-200). Chen 2010 Box 3 footnote, not BMI. If ancestry is atsi_or_asian: men cat1 <90, cat2 ≥90 and <100, cat3 ≥100; women cat1 <80, cat2 ≥80 and <90, cat3 ≥90. Otherwise (including southern_european_or_pacific and other): men cat1 <102, cat2 ≥102 and <110, cat3 ≥110; women cat1 <88, cat2 ≥88 and <100, cat3 ≥100. cat1 scores 0; cat2 scores 4; cat3 scores 7. 90 and 100 (atsi_or_asian men) and 80 and 90 (atsi_or_asian women) are the published boundaries.","required":true,"example":80}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_ausdrisk","message":"AUSDRISK inputs must match Chen 2010 age, sex, ancestry, parental diabetes, high glucose, antihypertensives, smoking, inactivity, and waist. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/ausdrisk","citation":{"authors":"Chen L, Magliano DJ, Balkau B, Colagiuri S, Zimmet PZ, Tonkin AM, Mitchell P, Phillips PJ, Shaw JE","doi":"10.5694/j.1326-5377.2010.tb03506.x","id":"chen-2010-ausdrisk","pmid":"20170456","source":"Med J Aust. 2010;192(4):197-202","title":"AUSDRISK: an Australian Type 2 Diabetes Risk Assessment Tool based on demographic, lifestyle and simple anthropometric measures","url":"https://doi.org/10.5694/j.1326-5377.2010.tb03506.x"},"formula_expression":"AUSDRISK = sex + age + ancestry + parental_diabetes + history_high_glucose + antihypertensive + current_smoker + physically_inactive + waist; male 3; age 18-34 -> 0, 35-44 -> 2, 45-54 -> 4, 55-64 -> 6, >=65 -> 8; ancestry atsi_or_asian or southern_european_or_pacific 2 else 0; parental_diabetes 3; history_high_glucose 6; antihypertensive 2; current_smoker 2; physically_inactive 2; waist cat1 0 cat2 4 cat3 7 (atsi_or_asian men <90 / >=90 and <100 / >=100, women <80 / >=80 and <90 / >=90; otherwise including southern_european_or_pacific men <102 / >=102 and <110 / >=110, women <88 / >=88 and <100 / >=100); max 35; at_risk iff score>=12; Chen 2010 Box 3 waist model not BMI","purpose":"Sum the Chen 2010 AUSDRISK Box 3 questionnaire points (waist model) and return at_risk when the total is ≥12.","markdown_url":"https://magentlab.com/docs/ausdrisk.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"ausdrisk"},{"name":"formula_expression","type":"string","description":"Exact Chen 2010 Box 3 waist-model expression"},{"name":"score","type":"integer","description":"AUSDRISK points; published range 0-35"},{"name":"max_score","type":"integer","description":"35 (Chen 2010 published maximum)"},{"name":"at_risk","type":"boolean","description":"true iff score ≥12 (Chen 2010 ROC cutoff). Not a type 2 diabetes diagnosis and not a 1-in-N 5-year government risk statement."},{"name":"age_years","type":"integer","description":"Age in years used for the age band"},{"name":"sex","type":"string","description":"female or male, used for sex points and waist"},{"name":"ancestry","type":"string","description":"atsi_or_asian, southern_european_or_pacific, or other"},{"name":"waist_cm","type":"number","description":"Waist circumference in cm used"},{"name":"waist_category","type":"string","description":"cat1 (0), cat2 (4), or cat3 (7) from sex, ancestry, and waist_cm"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Chen 2010 Medical Journal of Australia citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"30","ancestry":"other","antihypertensive":"false","current_smoker":"false","history_high_glucose":"false","parental_diabetes":"false","physically_inactive":"false","sex":"female","waist_cm":"80"},{"age":"30","ancestry":"other","antihypertensive":"false","current_smoker":"false","history_high_glucose":"false","parental_diabetes":"false","physically_inactive":"false","sex":"female","waist_cm":"80"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/ausdrisk","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/ausdrisk?age=30&sex=female&ancestry=other&parental_diabetes=false&history_high_glucose=false&antihypertensive=false&current_smoker=false&physically_inactive=false&waist_cm=80","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/ausdrisk","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/canrisk","description":"Robinson 2011 Table 3 pCANRISK (not eCANRISK). Age 0/7/13/15; male 6; BMI 0/4/9/14; waist 0/4/6 by sex; inactivity 1; no daily fruit/veg 2; high BP 4; high glucose 14; macrosomia 1 (women); family first-degree categories ×2; caller-assigned ethnicity White 0 Aboriginal 3 Black 5 East Asian 10 South Asian 11; education 5/1/0. Max 81 F/86 M. Cutoffs 21, 29, 32, 33, 43. Not a diagnosis.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Robinson 2011 Table 3 pCANRISK: 19-44 scores 0; magent scores 18-44 as 0. 45-54 scores 7; 55-64 scores 13; 65-78 scores 15; magent scores ≥65 as 15. Age 44 scores 0; 45 and 54 score 7; 55 and 64 score 13; 65 scores 15.","required":true,"example":40},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"female or male. Robinson 2011 Table 3: female scores 0; male scores 6. Selects the sex-specific waist bands. Macrosomia is N/A for male (0).","required":true,"example":"female"},{"in":"query","name":"bmi_kg_m2","type":"number","description":"Body-mass index in kg/m^2 (10-80). Caller-supplied; magent does not compute BMI from height and weight. Robinson 2011 Table 3: <25 scores 0; 25-29.9 scores 4; 30-34.9 scores 9; ≥35 scores 14. 25.0 and 29.9 score 4; 30.0 and 34.9 score 9; 35.0 scores 14.","required":true,"example":22},{"in":"query","name":"waist_cm","type":"number","description":"Waist circumference in cm (40-200). Robinson 2011 Table 3 men: <94 scores 0; 94-102 scores 4; >102 scores 6. Women: <80 scores 0; 80-88 scores 4; >88 scores 6. 94 and 102 (men) and 80 and 88 (women) score 4.","required":true,"example":80},{"in":"query","name":"activity_30min","type":"boolean","description":"Usually at least 30 minutes of physical activity daily (Robinson 2011 Table 3). true scores 0; false scores 1. Caller-assigned; magent does not measure activity.","required":true,"example":true},{"in":"query","name":"daily_fruit_veg","type":"boolean","description":"Eats fruit or vegetables every day (Robinson 2011 Table 3). true scores 0; false scores 2.","required":true,"example":true},{"in":"query","name":"high_bp","type":"boolean","description":"History of high blood pressure (Robinson 2011 Table 3). true scores 4; false scores 0. magent does not measure blood pressure.","required":true,"example":false},{"in":"query","name":"high_glucose","type":"boolean","description":"History of high blood glucose (Robinson 2011 Table 3). Caller-assigned; magent does not assay glucose. true scores 14; false scores 0.","required":true,"example":false},{"in":"query","name":"macrosomia","type":"boolean","description":"Gave birth to a baby weighing 4.1 kg or more (Robinson 2011 Table 3 macrosomia, women). true scores 1 for female; false or male (N/A) scores 0.","required":true,"example":false},{"in":"query","name":"family_history_count","type":"integer","description":"Count of first-degree relative categories with diabetes: mother, father, sibling, child (Robinson 2011 Table 3 footnote g). Integer 0-4. Each category scores 2 (0, 2, 4, 6, or 8). Not second-degree relatives. magent does not take named relatives.","required":true,"example":0},{"in":"query","name":"ethnicity","type":"string","enum":["white","aboriginal","black","east_asian","south_asian","latin_american","other"],"description":"Caller-assigned ethnicity using Robinson 2011 Table 3 terms. white scores 0; aboriginal 3; black 5; east_asian 10; south_asian 11. latin_american and other score 0 (Table 3 assigned no pCANRISK points; both were statistically insignificant). magent does not assign ethnicity.","required":true,"example":"white"},{"in":"query","name":"education","type":"string","enum":["less_than_high_school","high_school","some_college","university"],"description":"Highest education completed (Robinson 2011 Table 3). less_than_high_school scores 5; high_school scores 1; some_college or university scores 0.","required":true,"example":"university"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_canrisk","message":"CANRISK inputs must match Robinson 2011 pCANRISK age, sex, BMI, waist, activity, diet, BP, glucose, macrosomia, family history, ethnicity, and education. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/canrisk","citation":{"authors":"Robinson CA, Agarwal G, Nerenberg K","doi":"10.24095/hpcdp.32.1.04","id":"robinson-2011-canrisk","pmid":"22153173","source":"Chronic Dis Inj Can. 2011;32(1):19-31","title":"Validating the CANRISK prognostic model for assessing diabetes risk in Canada's multi-ethnic population","url":"https://doi.org/10.24095/hpcdp.32.1.04"},"formula_expression":"pCANRISK = age + sex + bmi + waist + inactivity + no_daily_fruit_veg + high_bp + high_glucose + macrosomia + family_history + ethnicity + education; age <45 -> 0, 45-54 -> 7, 55-64 -> 13, >=65 -> 15; male 6; BMI <25 -> 0, 25-29.9 -> 4, 30-34.9 -> 9, >=35 -> 14; waist men <94 -> 0, 94-102 -> 4, >102 -> 6; women <80 -> 0, 80-88 -> 4, >88 -> 6; inactivity 1; no daily fruit/veg 2; high_bp 4; high_glucose 14; macrosomia women 1 else N/A 0; family_history_count 0-4 first-degree categories * 2; ethnicity white 0 aboriginal 3 black 5 east_asian 10 south_asian 11 latin_american 0 other 0 (caller-assigned; Table 3 assigned no pCANRISK points to Latin American or Other); education less_than_high_school 5 high_school 1 some_college or university 0; max 81 female / 86 male; Robinson 2011 Table 3 pCANRISK not eCANRISK; published cutoffs score>=21 29 32 33 43","purpose":"Sum the Robinson 2011 Table 3 paper-based CANRISK (pCANRISK) integer points and return the published screening thresholds at scores 21, 29, 32, 33, and 43.","markdown_url":"https://magentlab.com/docs/canrisk.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"canrisk"},{"name":"formula_expression","type":"string","description":"Exact Robinson 2011 Table 3 pCANRISK expression"},{"name":"score","type":"integer","description":"pCANRISK points; published maxima 81 female / 86 male"},{"name":"max_score","type":"integer","description":"81 if female, 86 if male (Robinson 2011 published maxima)"},{"name":"score_ge_21","type":"boolean","description":"true iff score ≥21 (Table 5 / Figure 4 slightly elevated vs FINDRISC). Screening threshold, not an exclusive band and not a diabetes diagnosis."},{"name":"score_ge_29","type":"boolean","description":"true iff score ≥29 (Table 5 / Figure 4 moderate vs FINDRISC). Screening threshold, not an exclusive band."},{"name":"score_ge_32","type":"boolean","description":"true iff score ≥32 (Table 5 balanced / optimal cutoff). Screening threshold, not a diabetes diagnosis."},{"name":"score_ge_33","type":"boolean","description":"true iff score ≥33 (Table 5 / Figure 4 high vs FINDRISC). Screening threshold, not an exclusive band."},{"name":"score_ge_43","type":"boolean","description":"true iff score ≥43 (Table 5 / Figure 4 very high vs FINDRISC). Screening threshold, not an exclusive band."},{"name":"age_years","type":"integer","description":"Age in years used for the age band"},{"name":"sex","type":"string","description":"female or male, used for sex points and waist"},{"name":"bmi_kg_m2","type":"number","description":"Caller-supplied BMI in kg/m^2 used for the BMI band"},{"name":"waist_cm","type":"number","description":"Waist circumference in cm used"},{"name":"ethnicity","type":"string","description":"white, aboriginal, black, east_asian, south_asian, latin_american, or other"},{"name":"education","type":"string","description":"less_than_high_school, high_school, some_college, or university"},{"name":"family_history_count","type":"integer","description":"Count of first-degree relative categories (0-4) used"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Robinson 2011 Chronic Diseases and Injuries in Canada citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"activity_30min":"true","age":"40","bmi_kg_m2":"22","daily_fruit_veg":"true","education":"university","ethnicity":"white","family_history_count":"0","high_bp":"false","high_glucose":"false","macrosomia":"false","sex":"female","waist_cm":"80"},{"activity_30min":"true","age":"40","bmi_kg_m2":"22","daily_fruit_veg":"true","education":"university","ethnicity":"white","family_history_count":"0","high_bp":"false","high_glucose":"false","macrosomia":"false","sex":"female","waist_cm":"80"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/canrisk","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/canrisk?age=40&sex=female&bmi_kg_m2=22&waist_cm=80&activity_30min=true&daily_fruit_veg=true&high_bp=false&high_glucose=false&macrosomia=false&family_history_count=0&ethnicity=white&education=university","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/canrisk","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/cambridge-diabetes","description":"Griffin 2000 Cambridge logistic risk of undetected type 2 diabetes. p = 1/(1+e^(-λ)); λ = -6.322 - 0.879 if female + 1.222 antihypertensive + 2.191 steroids + 0.063×age + BMI band (<25 0; 25 to <27.5 0.699; 27.5 to <30 1.97; ≥30 2.518) + family (parent or sibling 0.728; parent and sibling 0.753) + smoking (former -0.218; current 0.855). Age 40-64. Probability 0-1. Not FINDRISC, not ADA, not a glucose assay, not a diagnosis.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years. Griffin 2000 derivation was ages 40-64; magent accepts that published range only. Continuous linear predictor at 0.063 per year.","required":true,"example":50},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"female or male. Griffin 2000 female coefficient is -0.879; male is the reference (0).","required":true,"example":"male"},{"in":"query","name":"bmi_kg_m2","type":"number","description":"Body-mass index in kg/m^2 (10-80, magent clamp). Caller-supplied; magent does not compute BMI from height and weight. Griffin 2000: <25 -> 0; >=25 and <27.5 -> 0.699; >=27.5 and <30 -> 1.97; >=30 -> 2.518.","required":true,"example":24},{"in":"query","name":"antihypertensive","type":"boolean","description":"Prescribed antihypertensive medication as assigned by the caller (Griffin 2000). true adds 1.222; false adds 0. magent does not read a medication list.","required":true,"example":false},{"in":"query","name":"steroids","type":"boolean","description":"Prescribed steroids as assigned by the caller (Griffin 2000). true adds 2.191; false adds 0. magent does not read a medication list.","required":true,"example":false},{"in":"query","name":"family_history","type":"string","enum":["none","parent_or_sibling","parent_and_sibling"],"description":"First-degree family history of diabetes (Griffin 2000). none 0; parent_or_sibling 0.728 (parent or sibling, not both); parent_and_sibling 0.753 (parent and sibling). magent does not take a pedigree.","required":true,"example":"none"},{"in":"query","name":"smoking","type":"string","enum":["never","former","current"],"description":"Smoking history (Griffin 2000). never (nonsmoker) 0; former (ex-smoker) -0.218; current 0.855. magent does not take a smoking history.","required":true,"example":"never"}],"errors":[{"code":"invalid_cambridge_diabetes","message":"Cambridge diabetes risk inputs must match Griffin 2000 age, sex, BMI, medications, family history, and smoking. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/cambridge-diabetes","citation":{"authors":"Griffin SJ, Little PS, Hales CN, Kinmonth AL, Wareham NJ","doi":"10.1002/1520-7560(200005/06)16:3<164::AID-DMRR103>3.0.CO;2-R","id":"griffin-2000","pmid":"10867715","source":"Diabetes Metab Res Rev. 2000;16(3):164-171","title":"Diabetes risk score: towards earlier detection of type 2 diabetes in general practice","url":"https://doi.org/10.1002/1520-7560(200005/06)16:3<164::AID-DMRR103>3.0.CO;2-R"},"formula_expression":"p = 1/(1+e^(-λ)); λ = -6.322 -0.879*(sex=female) + 1.222*antihypertensive + 2.191*steroids + 0.063*age + bmi + family + smoking; BMI <25 -> 0, >=25 and <27.5 -> 0.699, >=27.5 and <30 -> 1.97, >=30 -> 2.518; family none 0, parent_or_sibling 0.728, parent_and_sibling 0.753; smoking never 0, former -0.218, current 0.855; Griffin 2000 logistic risk of undetected type 2 diabetes; age 40-64","purpose":"Compute the Griffin 2000 Cambridge logistic probability of undetected type 2 diabetes from age, sex, BMI, prescribed antihypertensive medication, prescribed steroids, first-degree family history, and smoking.","markdown_url":"https://magentlab.com/docs/cambridge-diabetes.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"cambridge_diabetes"},{"name":"formula_expression","type":"string","description":"Griffin 2000 logistic expression with intercept -6.322"},{"name":"age_years","type":"integer","description":"Age in years used (40-64)"},{"name":"sex","type":"string","description":"female or male used"},{"name":"bmi_kg_m2","type":"number","description":"Caller-supplied BMI in kg/m^2 used for the BMI band"},{"name":"antihypertensive","type":"boolean","description":"Caller-assigned prescribed antihypertensive medication"},{"name":"steroids","type":"boolean","description":"Caller-assigned prescribed steroids"},{"name":"family_history","type":"string","description":"none, parent_or_sibling, or parent_and_sibling"},{"name":"smoking","type":"string","description":"never, former, or current"},{"name":"linear_predictor","type":"number","description":"Griffin 2000 λ (intercept -6.322), 4 decimals"},{"name":"probability","type":"number","description":"p = 1/(1+e^(-λ)) on 0-1, 4 decimals. Logistic risk of undetected type 2 diabetes. Not a screening cutoff and not a diagnosis."},{"name":"citation","type":"object","description":"Griffin 2000 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"50","antihypertensive":"false","bmi_kg_m2":"24","family_history":"none","sex":"male","smoking":"never","steroids":"false"},{"age":"50","antihypertensive":"false","bmi_kg_m2":"24","family_history":"none","sex":"male","smoking":"never","steroids":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/cambridge-diabetes","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/cambridge-diabetes?age=50&sex=male&bmi_kg_m2=24&antihypertensive=false&steroids=false&family_history=none&smoking=never","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/cambridge-diabetes","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/ada-diabetes","description":"Bang 2009 Table 2 development screening score for undiagnosed diabetes. Age (<40 → 0, 40–49 → 1, 50–59 → 2, ≥60 → 3); male 1; family history of diabetes 1; hypertension 1; BMI (≥40 extremely obese 3; 30–<40 obese 2; 25–<30 overweight 1; else 0); physically active −1. Returns score and high_risk (true iff score ≥ 5). BMI-only, no waist. Not Appendix ARIC/CHS, not a diagnosis.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (20-120). Bang 2009 Table 2: <40 scores 0; 40-49 scores 1; 50-59 scores 2; ≥60 scores 3. Age 40 and 49 score 1; 50 and 59 score 2; 60 scores 3.","required":true,"example":"40"},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"female or male. Bang 2009 Table 2: female scores 0; male scores 1.","required":true,"example":"female"},{"in":"query","name":"bmi_kg_m2","type":"number","description":"Body-mass index in kg/m^2 (10-80). Caller-supplied; magent does not compute BMI from height and weight. Bang 2009 Table 2 obesity from BMI only (no waist): ≥40 extremely obese scores 3; 30 ≤ BMI < 40 obese scores 2; 25 ≤ BMI < 30 overweight scores 1; else 0. 25.0 scores 1; 30.0 scores 2; 40.0 scores 3.","required":true,"example":"22"},{"in":"query","name":"family_history_diabetes","type":"boolean","description":"Family history of diabetes (Bang 2009 Table 2). true scores 1; false scores 0.","required":true,"example":"false"},{"in":"query","name":"hypertension","type":"boolean","description":"History of hypertension (Bang 2009 Table 2). true scores 1; false scores 0. magent does not read a medication list or measure blood pressure.","required":true,"example":"false"},{"in":"query","name":"physically_active","type":"boolean","description":"Physically active (Bang 2009 Table 2). true scores −1; false scores 0. The total may be −1.","required":true,"example":"true"}],"errors":[{"code":"invalid_ada_diabetes","message":"ADA diabetes screening-score inputs must be numeric age 20-120, sex, BMI, and the Bang 2009 family-history, hypertension, and physical-activity flags. Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_bmi_kg_m2","message":"bmi_kg_m2 must be a number from 10 to 80. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/ada-diabetes","citation":{"authors":"Bang H, Edwards AM, Bomback AS, Ballantyne CM, Brillon D, Callahan MA, Teutsch SM, Mushlin AI, Kern LM","doi":"10.7326/0003-4819-151-11-200912010-00005","id":"bang-2009","pmid":"19949143","source":"Ann Intern Med. 2009;151(11):775-783","title":"Development and validation of a patient self-assessment score for diabetes risk","url":"https://doi.org/10.7326/0003-4819-151-11-200912010-00005"},"formula_expression":"score = age + sex + family_history_diabetes + hypertension + obesity + physically_active; age <40 -> 0, 40-49 -> 1, 50-59 -> 2, >=60 -> 3; female 0, male 1; family history yes 1; hypertension yes 1; BMI >=40 -> 3, 30 <= BMI < 40 -> 2, 25 <= BMI < 30 -> 1, else 0; physically_active yes -> -1; high_risk iff score>=5; Bang 2009 Table 2 development scores","purpose":"Sum the Bang 2009 Table 2 development screening score for undiagnosed diabetes and return high_risk when the total is ≥5.","markdown_url":"https://magentlab.com/docs/ada-diabetes.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"ada_diabetes"},{"name":"formula_expression","type":"string","description":"Exact Bang 2009 Table 2 development expression"},{"name":"score","type":"integer","description":"Bang 2009 Table 2 points; published range -1 to 9"},{"name":"max_score","type":"integer","description":"9 (sum of positive Table 2 maxima)"},{"name":"high_risk","type":"boolean","description":"true iff score ≥5 (Bang 2009 chosen cutpoint for undiagnosed diabetes). Not a diabetes diagnosis. A prediabetes cutpoint of 4 is not implemented."},{"name":"age_years","type":"integer","description":"Age in years used for the age band"},{"name":"bmi_kg_m2","type":"number","description":"Caller-supplied BMI in kg/m^2 used for the obesity band"},{"name":"sex","type":"string","description":"female or male, used for the sex points"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Bang 2009 Annals of Internal Medicine citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"40","bmi_kg_m2":"22","family_history_diabetes":"false","hypertension":"false","physically_active":"true","sex":"female"},{"age":"40","bmi_kg_m2":"22","family_history_diabetes":"false","hypertension":"false","physically_active":"true","sex":"female"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/ada-diabetes","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/ada-diabetes?age=40&sex=female&bmi_kg_m2=22&family_history_diabetes=false&hypertension=false&physically_active=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/ada-diabetes","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/irae-diabetes","description":"Brahmer 2018 ASCO Table 4.4 irAE diabetes from glucose_mg_dl (50-1000, mg/dL only) plus caller ketosis, t1dm, severe_unable_adl, and life_threatening. First-match: G4 if life_threatening or glucose >500; else G3 if severe_unable_adl or glucose >250; else G2 if ketosis or t1dm or glucose >160; else G1 if glucose >99; else G0. ICI continue (0-1), hold_until_control (2), hold_admit (3-4). Not DKA diagnostic criteria. magent does not assay glucose. Not a diagnosis. Not an insulin dose.","parameters":[{"in":"query","name":"glucose_mg_dl","type":"number","description":"Fasting glucose in mg/dL (50-1000). Brahmer 2018 Table 4.4 bands: >500 grade 4; >250 grade 3; >160 grade 2; >99 grade 1; else grade 0 unless a flag upgrades. mmol/L is not accepted. magent does not assay glucose.","required":true,"example":"140"},{"in":"query","name":"ketosis","type":"boolean","description":"Ketosis as assigned by the caller (Brahmer 2018 Table 4.4 grade 2; ketosis at any glucose). true or false. When true and grade 4/3 criteria are not met, grade is 2. magent does not assay ketones.","required":true,"example":"false"},{"in":"query","name":"t1dm","type":"boolean","description":"Evidence of type 1 diabetes as assigned by the caller (Brahmer 2018 Table 4.4 grade 2; T1DM at any glucose). true or false. When true and grade 4/3 criteria are not met, grade is 2. magent does not diagnose diabetes.","required":true,"example":"false"},{"in":"query","name":"life_threatening","type":"boolean","description":"Life-threatening consequences as assigned by the caller (Brahmer 2018 Table 4.4 grade 4). true or false. When true, grade is 4 regardless of glucose. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"severe_unable_adl","type":"boolean","description":"Severe symptoms limiting self-care ADL as assigned by the caller (Brahmer 2018 Table 4.4 grade 3). true or false. When true and life_threatening is false and glucose is not >500, grade is 3. magent does not assess ADL.","required":true,"example":"false"}],"errors":[{"code":"invalid_glucose","message":"glucose_mg_dl (50-1000) or glucose_mmol_l (2.8-55.5) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/irae-diabetes","citation":{"authors":"Brahmer JR, Lacchetti C, Schneider BJ, Atkins MB, Brassil KJ, Caterino JM, Chau I, Ernstoff MS, Gardner JM, Ginex P, Hallmeyer S, Holter Chakrabarty J, Leighl NB, Mammen JS, McDermott DF, Naing A, Nastoupil LJ, Phillips T, Porter LD, Puzanov I, Reichner CA, Santomasso BD, Seigel C, Spira A, Suarez-Almazor ME, Wang Y, Weber JS, Wolchok JD, Thompson JA","doi":"10.1200/JCO.2017.77.6385","id":"brahmer-2018","pmid":"29442540","source":"J Clin Oncol. 2018;36(17):1714-1768","title":"Management of Immune-Related Adverse Events in Patients Treated With Immune Checkpoint Inhibitor Therapy: American Society of Clinical Oncology Clinical Practice Guideline","url":"https://doi.org/10.1200/JCO.2017.77.6385"},"formula_expression":"irae_diabetes first-match worst-wins (Brahmer 2018 Table 4.4 fasting glucose mg/dL): grade 4 if life_threatening or glucose_mg_dl > 500; else grade 3 if severe_unable_adl or glucose_mg_dl > 250; else grade 2 if ketosis or t1dm or glucose_mg_dl > 160; else grade 1 if glucose_mg_dl > 99; else grade 0. icpi_action continue (0-1), hold_until_control (2), hold_admit (3-4). mg/dL only. Not DKA diagnostic criteria as a separate instrument. magent does not assay glucose. Not a diagnosis. Not an insulin dose","purpose":"Apply Brahmer 2018 ASCO Table 4.4 immune-related diabetes fasting-glucose bands and return grade 0–4 plus icpi_action from glucose_mg_dl and caller-assigned ketosis, t1dm, severe_unable_adl, and life_threatening flags.","markdown_url":"https://magentlab.com/docs/irae-diabetes.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"irae_diabetes"},{"name":"formula_expression","type":"string","description":"Brahmer 2018 Table 4.4 first-match diabetes grade and icpi_action rule"},{"name":"grade","type":"integer","description":"0-4. First-match worst-wins on fasting glucose_mg_dl and caller-assigned ketosis, t1dm, severe_unable_adl, and life_threatening (Brahmer 2018 Table 4.4). Not a diagnosis."},{"name":"icpi_action","type":"string","description":"continue (grade 0 or 1), hold_until_control (grade 2), or hold_admit (grade 3 or 4). Not an insulin dose."},{"name":"glucose_mg_dl","type":"number","description":"Echo of fasting glucose in mg/dL"},{"name":"ketosis","type":"boolean","description":"Echo of caller-assigned ketosis (grade 2 when true unless a worse match)"},{"name":"t1dm","type":"boolean","description":"Echo of caller-assigned evidence of type 1 diabetes (grade 2 when true unless a worse match)"},{"name":"life_threatening","type":"boolean","description":"Echo of caller-assigned life-threatening flag (grade 4 when true)"},{"name":"severe_unable_adl","type":"boolean","description":"Echo of caller-assigned severe symptoms limiting self-care ADL (grade 3 when true unless a worse match)"},{"name":"criteria","type":"array","description":"Per-factor Tree rows with factor and met for life_threatening, glucose_gt_500, severe_unable_adl, glucose_gt_250, ketosis, t1dm, glucose_gt_160, and glucose_gt_99; glucose rows include value"},{"name":"citation","type":"object","description":"Brahmer 2018 J Clin Oncol ASCO irAE guideline citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"glucose_mg_dl":"140","ketosis":"false","life_threatening":"false","severe_unable_adl":"false","t1dm":"false"},{"glucose_mg_dl":"140","ketosis":"false","life_threatening":"false","severe_unable_adl":"false","t1dm":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/irae-diabetes","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/irae-diabetes?glucose_mg_dl=140&ketosis=false&t1dm=false&life_threatening=false&severe_unable_adl=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/irae-diabetes","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/hypoglycemia-risk-score","description":"Karter 2017 Figure 2 T2D 12-month hypoglycemia-related ED/hospital-use risk from prior_hypo_ed_hospital_count (0-20), ed_visits_12mo (0-50), insulin, sulfonylurea, severe_or_esrd (dialysis or CKD 4-5, eGFR <=29), and age_lt_77. First-match 6 options: >=3 prior or 1-2 plus insulin = high (>5%); remaining rows intermediate (1-5%) or low (<1%). Not a points sum. magent does not assay glucose. Not a diagnosis. Not an insulin dose.","parameters":[{"in":"query","name":"prior_hypo_ed_hospital_count","type":"integer","description":"Count of prior hypoglycemia-related ED visits or hospitalizations (integer 0-20). Karter 2017 Figure 2 bands: 0, 1-2, or >=3. >=3 is high regardless of other inputs. magent does not read claims.","required":true,"example":"3"},{"in":"query","name":"ed_visits_12mo","type":"integer","description":"ED encounters for any reason in the prior 12 months (integer 0-50). Karter 2017 Figure 2 bands: <2 vs >=2. magent does not count visits.","required":true,"example":"0"},{"in":"query","name":"insulin","type":"boolean","description":"Current insulin use as assigned by the caller (Karter 2017 Figure 2). true or false. With 1-2 prior hypoglycemia-related ED or hospital episodes, insulin is high; with 0 prior episodes, insulin plus ED visits >=2, severe_or_esrd, or age not <77 is intermediate. Not an insulin dose.","required":true,"example":"false"},{"in":"query","name":"sulfonylurea","type":"boolean","description":"Current sulfonylurea use as assigned by the caller (Karter 2017 Figure 2). true or false. With 0 prior episodes and no insulin, sulfonylurea plus ED visits >=2 or severe_or_esrd is intermediate. magent does not dispense medication.","required":true,"example":"false"},{"in":"query","name":"severe_or_esrd","type":"boolean","description":"Severe or end-stage kidney disease as assigned by the caller (Karter 2017: dialysis or CKD stage 4-5, eGFR <=29 mL/min/1.73 m2). true or false. magent does not compute eGFR.","required":true,"example":"false"},{"in":"query","name":"age_lt_77","type":"boolean","description":"Age younger than 77 years as assigned by the caller (Karter 2017 Figure 2). true or false. When prior episodes are 0 and insulin is true, age not <77 (with ED visits <2 and severe_or_esrd false) is intermediate. magent does not compute age.","required":true,"example":"true"}],"errors":[{"code":"invalid_prior_hypo_count","message":"prior_hypo_ed_hospital_count must be an integer from 0 to 20 (Karter 2017 prior hypoglycemia-related ED or hospital episodes). Returned before settlement; you are not charged.","status":400},{"code":"invalid_ed_visits_12mo","message":"ed_visits_12mo must be an integer from 0 to 50 (Karter 2017 ED encounters for any reason in the prior 12 months). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/hypoglycemia-risk-score","citation":{"authors":"Karter AJ, Warton EM, Lipska KJ, Ralston JD, Moffet HH, Jackson GG, Huang ES, Miller DR","doi":"10.1001/jamainternmed.2017.3844","id":"karter-2017","pmid":"28828479","source":"JAMA Intern Med. 2017;177(10):1461-1470","title":"Development and Validation of a Tool to Identify Patients With Type 2 Diabetes at High Risk of Hypoglycemia-Related Emergency Department or Hospital Use","url":"https://doi.org/10.1001/jamainternmed.2017.3844"},"formula_expression":"hypoglycemia_risk_score first-match Karter 2017 Figure 2 (6 mutually exclusive options; eTable 2 source): (1) prior_hypo_ed_hospital_count >= 3 -> high; (2) prior 1-2 and insulin -> high; (3) prior 1-2 and not insulin -> intermediate; (4) prior 0 and insulin and (ed_visits_12mo >= 2 or severe_or_esrd or not age_lt_77) -> intermediate; (5) prior 0 and not insulin and sulfonylurea and (ed_visits_12mo >= 2 or severe_or_esrd) -> intermediate; (6) else -> low. high >5%, intermediate 1-5%, low <1% 12-month hypoglycemia-related ED/hospital use. T2D only. Not a points sum. magent does not assay glucose. Not a diagnosis. Not an insulin dose","purpose":"Apply Karter 2017 Figure 2 first-match checklist to six EMR inputs and return high, intermediate, or low 12-month risk of hypoglycemia-related ED or hospital use in type 2 diabetes.","markdown_url":"https://magentlab.com/docs/hypoglycemia-risk-score.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"hypoglycemia_risk_score"},{"name":"formula_expression","type":"string","description":"Karter 2017 Figure 2 first-match six-option hypoglycemia risk rule"},{"name":"risk","type":"string","description":"high, intermediate, or low 12-month hypoglycemia-related ED/hospital use (Karter 2017 Figure 2). Not a diagnosis."},{"name":"rate_band","type":"string","description":">5% (high), 1-5% (intermediate), or <1% (low) as published"},{"name":"figure2_option","type":"integer","description":"1-6. First-match Figure 2 row: 1-5 unique combinations, 6 after ruling out the others"},{"name":"prior_hypo_ed_hospital_count","type":"integer","description":"Echo of prior hypoglycemia-related ED or hospital episode count"},{"name":"prior_hypo_band","type":"string","description":"0, 1-2, or ge_3 (Karter 2017 prior-utilization bands)"},{"name":"ed_visits_12mo","type":"integer","description":"Echo of prior-12-month all-cause ED encounter count"},{"name":"ed_visits_band","type":"string","description":"lt_2 or ge_2 (Karter 2017 ED-visit bands)"},{"name":"insulin","type":"boolean","description":"Echo of caller-assigned insulin use"},{"name":"sulfonylurea","type":"boolean","description":"Echo of caller-assigned sulfonylurea use"},{"name":"severe_or_esrd","type":"boolean","description":"Echo of caller-assigned severe or end-stage kidney disease"},{"name":"age_lt_77","type":"boolean","description":"Echo of caller-assigned age younger than 77 years"},{"name":"criteria","type":"array","description":"Per-factor Tree rows with factor and met for prior_hypo_ge_3, prior_hypo_1_or_2, insulin, sulfonylurea, ed_visits_ge_2, severe_or_esrd, and age_lt_77; count rows include value"},{"name":"citation","type":"object","description":"Karter 2017 JAMA Intern Med hypoglycemia risk tool citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age_lt_77":"true","ed_visits_12mo":"0","insulin":"false","prior_hypo_ed_hospital_count":"3","severe_or_esrd":"false","sulfonylurea":"false"},{"age_lt_77":"true","ed_visits_12mo":"0","insulin":"false","prior_hypo_ed_hospital_count":"3","severe_or_esrd":"false","sulfonylurea":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/hypoglycemia-risk-score","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/hypoglycemia-risk-score?prior_hypo_ed_hospital_count=3&ed_visits_12mo=0&insulin=false&sulfonylurea=false&severe_or_esrd=false&age_lt_77=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/hypoglycemia-risk-score","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/idf-dar","description":"Hassanein 2021 IDF-DAR fasting risk table: type 1 scores 1; duration ≥10 scores 1; hypoglycemia 0/1/3.5/5.5/6.5; HbA1c band 0/1/2; treatment 0/0.5/1/1.5/2/2.5/3; SMBG 0/1/2; DKA/HONC 0/1/2/3; MVD 0/2/6.5; eGFR band 0/2/4/6.5; pregnancy 0/3.5/6.5; frailty 0/3.5/6.5; labour 0/2/4; prior negative Ramadan 1; fasting ≥16 h 1. Low 0–3, moderate 3.5–6, high >6. Caller-assigned; not a fasting order or insulin dose.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (integer 18-120). Hassanein 2021 frailty band: age >70 with no home support scores 3.5 unless impaired_cognition_or_frail is true (6.5). Age 70 does not enter that band. magent does not read a chart.","required":true,"example":"50"},{"in":"query","name":"type_1_diabetes","type":"boolean","description":"Caller-assigned diabetes type (Hassanein 2021). true is type 1 and scores 1; false is type 2 and scores 0. magent does not diagnose diabetes.","required":true,"example":"false"},{"in":"query","name":"duration_ge_10","type":"boolean","description":"Caller-assigned diabetes duration ≥10 years (Hassanein 2021). true scores 1; false (<10 years) scores 0.","required":true,"example":"false"},{"in":"query","name":"hypoglycemia","type":"string","enum":["none","lt_weekly","multiple_weekly","recent_severe","unawareness"],"description":"Caller-assigned hypoglycemia history (Hassanein 2021; highest applicable). none 0; lt_weekly (less than once per week) 1; multiple_weekly 3.5; recent_severe 5.5; unawareness 6.5. magent does not assay glucose.","required":true,"example":"none"},{"in":"query","name":"glycaemic_control","type":"string","enum":["lt_7_5","7_5_to_9","gt_9"],"description":"Caller-assigned HbA1c band (Hassanein 2021). lt_7_5 (<7.5%) scores 0; 7_5_to_9 (7.5–9%) scores 1; gt_9 (>9%) scores 2. magent does not assay glucose or HbA1c.","required":true,"example":"lt_7_5"},{"in":"query","name":"treatment","type":"string","enum":["other","gliclazide_class","glibenclamide","basal_insulin","once_daily_mixed","basal_bolus_pump","multiple_daily_mixed"],"description":"Caller-assigned treatment (Hassanein 2021). other (diet or metformin-class, no SU or insulin) 0; gliclazide_class (gliclazide/MR, glimepiride, or repaglinide) 0.5; glibenclamide 1; basal_insulin 1.5; once_daily_mixed 2; basal_bolus_pump 2.5; multiple_daily_mixed 3. Not an insulin dose.","required":true,"example":"other"},{"in":"query","name":"smbg","type":"string","enum":["as_indicated","suboptimal","not_conducted"],"description":"Caller-assigned self-monitoring of blood glucose (Hassanein 2021). as_indicated 0; suboptimal 1; not_conducted 2. magent does not assay glucose.","required":true,"example":"as_indicated"},{"in":"query","name":"acute_complication","type":"string","enum":["none","last_12_months","last_6_months","last_3_months"],"description":"Caller-assigned DKA or HONC recency (Hassanein 2021). none 0; last_12_months 1; last_6_months 2; last_3_months 3.","required":true,"example":"none"},{"in":"query","name":"mvd","type":"string","enum":["none","stable","unstable"],"description":"Caller-assigned macrovascular disease (Hassanein 2021). none 0; stable 2; unstable 6.5.","required":true,"example":"none"},{"in":"query","name":"renal","type":"string","enum":["egfr_gt_60","egfr_45_to_60","egfr_30_to_45","egfr_lt_30"],"description":"Caller-assigned eGFR band in mL/min (Hassanein 2021). egfr_gt_60 (>60) 0; egfr_45_to_60 (45–60) 2; egfr_30_to_45 (30–45) 4; egfr_lt_30 (<30) 6.5. magent does not compute eGFR.","required":true,"example":"egfr_gt_60"},{"in":"query","name":"pregnancy","type":"string","enum":["not_pregnant","within_targets","not_within_targets"],"description":"Caller-assigned pregnancy band (Hassanein 2021). not_pregnant 0; within_targets 3.5; not_within_targets 6.5. magent does not advise fasting.","required":true,"example":"not_pregnant"},{"in":"query","name":"impaired_cognition_or_frail","type":"boolean","description":"Caller-assigned impaired cognitive function or frailty (Hassanein 2021). true scores 6.5 and supersedes the age>70 / no-home-support band.","required":true,"example":"false"},{"in":"query","name":"home_support","type":"boolean","description":"Caller-assigned home support (Hassanein 2021). When age >70 and this is false and impaired_cognition_or_frail is false, frailty scores 3.5. true or false.","required":true,"example":"true"},{"in":"query","name":"physical_labor","type":"string","enum":["none","moderate","high"],"description":"Caller-assigned physical labour (Hassanein 2021). none 0; moderate 2; high 4.","required":true,"example":"none"},{"in":"query","name":"previous_ramadan_negative","type":"boolean","description":"Caller-assigned overall negative previous Ramadan experience (Hassanein 2021). true scores 1; false scores 0.","required":true,"example":"false"},{"in":"query","name":"fasting_hours_ge_16","type":"boolean","description":"Caller-assigned fasting hours ≥16 (location; Hassanein 2021). true scores 1; false (<16 hours) scores 0. magent does not advise fasting.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/idf-dar","citation":{"authors":"Hassanein M, Afandi B, Yakoob Ahmedani M, et al.","doi":"10.1016/j.diabres.2021.109185","id":"hassanein-2021","pmid":"35016991","source":"Diabetes Res Clin Pract. 2022;185:109185","title":"Diabetes and Ramadan: Practical guidelines 2021","url":"https://doi.org/10.1016/j.diabres.2021.109185"},"formula_expression":"IDF-DAR 2021 = type1 1 / type2 0 + duration>=10 1 + hypoglycemia (unawareness 6.5, recent_severe 5.5, multiple_weekly 3.5, lt_weekly 1, none 0) + hba1c_band (>9% 2, 7.5-9% 1, <7.5% 0) + treatment (multiple_daily_mixed 3, basal_bolus_pump 2.5, once_daily_mixed 2, basal_insulin 1.5, glibenclamide 1, gliclazide_class 0.5, other 0) + smbg (not_conducted 2, suboptimal 1, as_indicated 0) + dka_honc (3mo 3, 6mo 2, 12mo 1, none 0) + mvd (unstable 6.5, stable 2, none 0) + egfr (<30 6.5, 30-45 4, 45-60 2, >60 0) + pregnancy (not_within_targets 6.5, within_targets 3.5, not_pregnant 0) + frailty (impaired_or_frail 6.5, age>70_no_home_support 3.5, none 0) + labor (high 4, moderate 2, none 0) + prior_ramadan_negative 1 + fasting>=16h 1; low 0-3, moderate 3.5-6, high >6; Hassanein 2021 table","purpose":"Sum the Hassanein 2021 IDF-DAR fasting risk table and return low (0–3), moderate (3.5–6), or high (>6).","markdown_url":"https://magentlab.com/docs/idf-dar.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"idf_dar"},{"name":"formula_expression","type":"string","description":"Exact Hassanein 2021 table expression"},{"name":"score","type":"number","description":"IDF-DAR 2021 points; half-points allowed; published range 0 to 50.5"},{"name":"max_score","type":"number","description":"50.5 (sum of each element's published maximum)"},{"name":"risk","type":"string","description":"low when score is 0–3, moderate when 3.5–6, high when >6 (Hassanein 2021). A band, not a fasting order."},{"name":"age_years","type":"integer","description":"Age in years used for the frailty band"},{"name":"components","type":"array","description":"Per-element points"},{"name":"citation","type":"object","description":"Hassanein 2021 Diabetes Res Clin Pract citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"acute_complication":"none","age":"50","duration_ge_10":"false","fasting_hours_ge_16":"false","glycaemic_control":"lt_7_5","home_support":"true","hypoglycemia":"none","impaired_cognition_or_frail":"false","mvd":"none","physical_labor":"none","pregnancy":"not_pregnant","previous_ramadan_negative":"false","renal":"egfr_gt_60","smbg":"as_indicated","treatment":"other","type_1_diabetes":"false"},{"acute_complication":"none","age":"50","duration_ge_10":"false","fasting_hours_ge_16":"false","glycaemic_control":"lt_7_5","home_support":"true","hypoglycemia":"none","impaired_cognition_or_frail":"false","mvd":"none","physical_labor":"none","pregnancy":"not_pregnant","previous_ramadan_negative":"false","renal":"egfr_gt_60","smbg":"as_indicated","treatment":"other","type_1_diabetes":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/idf-dar","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/idf-dar?age=50&type_1_diabetes=false&duration_ge_10=false&hypoglycemia=none&glycaemic_control=lt_7_5&treatment=other&smbg=as_indicated&acute_complication=none&mvd=none&renal=egfr_gt_60&pregnancy=not_pregnant&impaired_cognition_or_frail=false&home_support=true&physical_labor=none&previous_ramadan_negative=false&fasting_hours_ge_16=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/idf-dar","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/beam","description":"BeAM (bedtime minus pre-breakfast glucose) in mg/dL from Zisman 2016. Provide bedtime_glucose_mg_dl or bedtime_glucose_mmol_l independently of AM, and am_glucose_mg_dl or am_glucose_mmol_l. mmol/L converts as mg/dL = mmol/L × 18. Returns beam_mg_dl (1 decimal) and the published analysis band (<0, 0-50, >50). 0 and 50 are 0-50. Does not use a 45 or 55 cutoff, order prandial insulin, or diagnose diabetes.","parameters":[{"in":"query","name":"bedtime_glucose_mg_dl","type":"number","description":"Bedtime glucose in mg/dL (40-600). Provide this or bedtime_glucose_mmol_l, not both. Independent of the AM unit.","required":false,"example":"180"},{"in":"query","name":"bedtime_glucose_mmol_l","type":"number","description":"Bedtime glucose in mmol/L (2.2-33.3). Converted as mg/dL = mmol/L × 18 (same factor as HOMA-IR). Provide this or bedtime_glucose_mg_dl, not both.","required":false,"example":"10.0"},{"in":"query","name":"am_glucose_mg_dl","type":"number","description":"Pre-breakfast (AM) glucose in mg/dL (40-600). Provide this or am_glucose_mmol_l, not both. Independent of the bedtime unit.","required":false,"example":"120"},{"in":"query","name":"am_glucose_mmol_l","type":"number","description":"Pre-breakfast (AM) glucose in mmol/L (2.2-33.3). Converted as mg/dL = mmol/L × 18. Provide this or am_glucose_mg_dl, not both.","required":false,"example":"6.67"}],"errors":[{"code":"invalid_beam","message":"BeAM needs bedtime and pre-breakfast glucose (each as mg/dL or mmol/L), as used in Zisman 2016. Returned before settlement; you are not charged.","status":400},{"code":"invalid_bedtime_glucose","message":"bedtime_glucose_mg_dl (40-600) or bedtime_glucose_mmol_l (2.2-33.3) is required. Returned before settlement; you are not charged.","status":400},{"code":"invalid_am_glucose","message":"am_glucose_mg_dl (40-600) or am_glucose_mmol_l (2.2-33.3) is required. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/beam","citation":{"authors":"Zisman A, Morales F, Stewart J, Stuhr A, Vlajnic A, Zhou R","doi":"10.1136/bmjdrc-2015-000171","id":"zisman-2016","pmid":"27110368","source":"BMJ Open Diabetes Res Care. 2016;4(1):e000171","title":"BeAM value: an indicator of the need to initiate and intensify prandial therapy in patients with type 2 diabetes mellitus receiving basal insulin","url":"https://doi.org/10.1136/bmjdrc-2015-000171"},"formula_expression":"beam_mg_dl = bedtime_glucose_mg_dl - am_glucose_mg_dl; mmol/L × 18 → mg/dL; band <0 if beam_mg_dl < 0, 0-50 if 0 <= beam_mg_dl <= 50, >50 if beam_mg_dl > 50","purpose":"Compute BeAM as bedtime glucose minus pre-breakfast (AM) glucose in mg/dL and return the Zisman 2016 analysis category (<0, 0-50, or >50).","markdown_url":"https://magentlab.com/docs/beam.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"beam"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"bedtime_glucose_mg_dl","type":"number","description":"Bedtime glucose in mg/dL (mmol/L × 18 when supplied as mmol/L), 1 decimal"},{"name":"am_glucose_mg_dl","type":"number","description":"Pre-breakfast glucose in mg/dL (mmol/L × 18 when supplied as mmol/L), 1 decimal"},{"name":"beam_mg_dl","type":"number","description":"BeAM in mg/dL (bedtime minus AM), 1 decimal"},{"name":"beam_band","type":"string","description":"Zisman 2016 analysis category: <0, 0-50, or >50 mg/dL. 0 and 50 are 0-50. Not a 45 or 55 cutoff."},{"name":"citation","type":"object","description":"Zisman et al. 2016 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"am_glucose_mg_dl":"120","bedtime_glucose_mg_dl":"180"},{"am_glucose_mg_dl":"120","bedtime_glucose_mg_dl":"180"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/beam","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/beam?bedtime_glucose_mg_dl=180&am_glucose_mg_dl=120","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/beam","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/bicarbonate-deficit","description":"Bicarbonate deficit from weight and measured HCO3 using Adrogué–Madias 50 percent body-weight space. Deterministic published arithmetic with citation; not a dosing protocol.","parameters":[{"in":"query","name":"weight_kg","type":"number","description":"Weight in kilograms. Provide weight_kg or weight_lb.","required":false,"example":"70"},{"in":"query","name":"weight_lb","type":"number","description":"Weight in pounds. Converted as kg = lb * 0.45359237.","required":false,"example":"154.3236"},{"in":"query","name":"bicarbonate_mmol_l","type":"number","description":"Measured plasma bicarbonate in mmol/L (same as mEq/L). Range 2-45.","required":true,"example":"4"},{"in":"query","name":"desired_hco3_mmol_l","type":"number","description":"Target plasma bicarbonate in mmol/L (8-30), must exceed measured HCO3. Omitted uses 24.","required":false,"example":"8"}],"errors":[{"code":"invalid_weight","message":"weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_bicarbonate","message":"bicarbonate_mmol_l must be a number from 2 to 45. Returned before settlement; you are not charged.","status":400},{"code":"invalid_desired_bicarbonate","message":"desired_hco3_mmol_l must be a number from 8 to 30 greater than bicarbonate_mmol_l. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/bicarbonate-deficit","citation":{"authors":"Adrogué HJ, Madias NE","doi":"10.1056/NEJM199801013380106","id":"adrogue-madias-1998","source":"N Engl J Med. 1998;338(1):26-34","title":"Management of life-threatening acid-base disorders. First of two parts","url":"https://doi.org/10.1056/NEJM199801013380106"},"formula_expression":"bicarbonate_space_L = 0.5 * weight_kg; deficit_mEq = bicarbonate_space_L * (desired_hco3 - measured_hco3)","purpose":"Estimate bicarbonate deficit from weight and measured plasma HCO3 using a 50 percent body-weight apparent space.","markdown_url":"https://magentlab.com/docs/bicarbonate-deficit.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"adrogue_madias"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"weight_kg","type":"number","description":"Normalized weight in kg"},{"name":"bicarbonate_mmol_l","type":"number","description":"Measured plasma bicarbonate used"},{"name":"desired_hco3_mmol_l","type":"number","description":"Target plasma bicarbonate (24 when omitted)"},{"name":"bicarbonate_space_l","type":"number","description":"Apparent bicarbonate space, 0.5 * weight_kg, 1 decimal"},{"name":"deficit_meq","type":"number","description":"Estimated bicarbonate deficit in mEq (mmol), 1 decimal"},{"name":"citation","type":"object","description":"Adrogué and Madias NEJM 1998 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"bicarbonate_mmol_l":"4","desired_hco3_mmol_l":"8","weight_kg":"70"},{"bicarbonate_mmol_l":"4","desired_hco3_mmol_l":"8","weight_kg":"70"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/bicarbonate-deficit","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/bicarbonate-deficit?weight_kg=70&bicarbonate_mmol_l=4&desired_hco3_mmol_l=8","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/bicarbonate-deficit","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/corrected-sodium","description":"Sodium correction for hyperglycemia (Katz 1.6 or Hillier 2.4). formula is required; magent does not pick one silently. Deterministic published correction with citation; not a treatment recommendation.","parameters":[{"in":"query","name":"sodium_mmol_l","type":"number","description":"Measured serum sodium in mmol/L (110-160).","required":true,"example":"125"},{"in":"query","name":"glucose_mg_dl","type":"number","description":"Plasma glucose in mg/dL (50-1000). Provide this or glucose_mmol_l.","required":false,"example":"400"},{"in":"query","name":"glucose_mmol_l","type":"number","description":"Plasma glucose in mmol/L (2.8-55.5). Converted as mg/dL = mmol/L * 18.015.","required":false,"example":"20.0"},{"in":"query","name":"formula","type":"string","enum":["katz","hillier"],"description":"Correction factor. Required; magent does not pick one silently.","required":true,"example":"katz"}],"errors":[{"code":"invalid_sodium","message":"sodium_mmol_l must be a number from 110 to 160 Returned before settlement; you are not charged.","status":400},{"code":"invalid_glucose","message":"glucose_mg_dl (50-1000) or glucose_mmol_l (2.8-55.5) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_sodium_formula","message":"formula must be katz or hillier Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/corrected-sodium","citation":{"authors":"Katz MA","doi":"10.1056/NEJM197310182891607","id":"katz-1973","source":"N Engl J Med. 1973;289(16):843-844","title":"Hyperglycemia-induced hyponatremia — calculation of expected serum sodium depression","url":"https://doi.org/10.1056/NEJM197310182891607"},"formula_expression":"katz (1.6): corrected_na_mmol_l = sodium_mmol_l + 1.6 * (glucose_mg_dl - 100) / 100. hillier (2.4): corrected_na_mmol_l = sodium_mmol_l + 2.4 * (glucose_mg_dl - 100) / 100. Hillier TA, Abbott RD, Barrett EJ. Hyponatremia: evaluating the correction factor for hyperglycemia. Am J Med. 1999;106(4):399-403. DOI 10.1016/S0002-9343(99)00055-8.","purpose":"Compute expected sodium in hyperglycemia using Katz 1.6 or Hillier 2.4. The formula argument is required. Hillier 2.4 is Hillier TA, Abbott RD, Barrett EJ. Hyponatremia: evaluating the correction factor for hyperglycemia. Am J Med. 1999;106(4):399-403. DOI 10.1016/S0002-9343(99)00055-8.","markdown_url":"https://magentlab.com/docs/corrected-sodium.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"katz or hillier"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"sodium_mmol_l","type":"number","description":"Input sodium in mmol/L"},{"name":"glucose_mg_dl","type":"number","description":"Normalized glucose in mg/dL"},{"name":"factor","type":"number","description":"Published factor: 1.6 (Katz) or 2.4 (Hillier)"},{"name":"corrected_sodium_mmol_l","type":"number","description":"Corrected sodium in mmol/L, 1 decimal"},{"name":"citation","type":"object","description":"Katz 1973 or Hillier 1999"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"formula":"katz","glucose_mg_dl":"400","sodium_mmol_l":"125"},{"formula":"katz","glucose_mg_dl":"400","sodium_mmol_l":"125"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/corrected-sodium","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/corrected-sodium?sodium_mmol_l=125&glucose_mg_dl=400&formula=katz","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/corrected-sodium","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/serum-osmolality","description":"Worthley 1987 calculated serum osmolality: 2×Na + glucose/18 + BUN/2.8. Optional osmolar gap when a measured osm is supplied. Deterministic published arithmetic with citation; not a measured freezing-point osmometer or a diagnosis.","parameters":[{"in":"query","name":"sodium_mmol_l","type":"number","description":"Serum sodium in mmol/L (110-160).","required":true,"example":"140"},{"in":"query","name":"glucose_mg_dl","type":"number","description":"Plasma glucose in mg/dL (50-1000). Provide this or glucose_mmol_l.","required":false,"example":"90"},{"in":"query","name":"glucose_mmol_l","type":"number","description":"Plasma glucose in mmol/L (2.8-55.5). Converted as mg/dL = mmol/L * 18.015.","required":false,"example":"5.0"},{"in":"query","name":"bun_mg_dl","type":"number","description":"Blood urea nitrogen in mg/dL (1-200).","required":true,"example":"14"},{"in":"query","name":"measured_osm_mosm_kg","type":"number","description":"Measured serum osmolality in mOsm/kg (200-400). When supplied, osm_gap_mosm_kg is returned.","required":false,"example":"305"}],"errors":[{"code":"invalid_sodium","message":"sodium_mmol_l must be a number from 110 to 160 Returned before settlement; you are not charged.","status":400},{"code":"invalid_glucose","message":"glucose_mg_dl (50-1000) or glucose_mmol_l (2.8-55.5) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_bun","message":"bun_mg_dl must be a number from 1 to 200. Returned before settlement; you are not charged.","status":400},{"code":"invalid_measured_osmolality","message":"measured_osm_mosm_kg must be a number from 200 to 400. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/serum-osmolality","citation":{"authors":"Worthley LI, Guerin M, Pain RW","doi":"10.1177/0310057X8701500214","id":"worthley-1987","source":"Anaesth Intensive Care. 1987;15(2):199-202","title":"For calculating osmolality, the simplest formula is the best","url":"https://doi.org/10.1177/0310057X8701500214"},"formula_expression":"calculated_osm_mosm_kg = 2 * sodium_mmol_l + glucose_mg_dl / 18 + bun_mg_dl / 2.8","purpose":"Compute Worthley calculated serum osmolality from sodium, glucose, and BUN, plus an optional osmolar gap when a measured osm is supplied.","markdown_url":"https://magentlab.com/docs/serum-osmolality.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"worthley"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"sodium_mmol_l","type":"number","description":"Input sodium in mmol/L"},{"name":"glucose_mg_dl","type":"number","description":"Normalized glucose in mg/dL"},{"name":"bun_mg_dl","type":"number","description":"Input BUN in mg/dL"},{"name":"calculated_osm_mosm_kg","type":"number","description":"Worthley calculated osmolality in mOsm/kg, 1 decimal"},{"name":"osm_gap_mosm_kg","type":"number","description":"measured_osm_mosm_kg minus calculated_osm_mosm_kg, 1 decimal. Omitted when measured osm is not supplied."},{"name":"citation","type":"object","description":"Worthley 1987 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"bun_mg_dl":"14","glucose_mg_dl":"90","sodium_mmol_l":"140"},{"bun_mg_dl":"14","glucose_mg_dl":"90","sodium_mmol_l":"140"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/serum-osmolality","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/serum-osmolality?sodium_mmol_l=140&glucose_mg_dl=90&bun_mg_dl=14","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/serum-osmolality","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/sodium-deficit","description":"Sodium deficit from weight, sex, and measured Na using Adrogué–Madias TBW (0.6 male / 0.5 female). Deterministic published arithmetic with citation; not a sodium infusion protocol.","parameters":[{"in":"query","name":"weight_kg","type":"number","description":"Weight in kilograms. Provide weight_kg or weight_lb.","required":false,"example":"70"},{"in":"query","name":"weight_lb","type":"number","description":"Weight in pounds. Converted as kg = lb * 0.45359237.","required":false,"example":"154.3236"},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"Sex used for TBW: 0.6 × weight (male) or 0.5 × weight (female).","required":true,"example":"male"},{"in":"query","name":"sodium_mmol_l","type":"number","description":"Measured serum sodium in mmol/L. Range 90-135 (hyponatremia).","required":true,"example":"120"},{"in":"query","name":"desired_na_mmol_l","type":"number","description":"Target serum sodium in mmol/L (120-150), must exceed measured Na. Omitted uses 140.","required":false,"example":"140"}],"errors":[{"code":"invalid_weight","message":"weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_hyponatremia_sodium","message":"sodium_mmol_l must be a number from 90 to 135 (hyponatremia). Returned before settlement; you are not charged.","status":400},{"code":"invalid_desired_sodium","message":"desired_na_mmol_l must be a number from 120 to 150 greater than sodium_mmol_l. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/sodium-deficit","citation":{"authors":"Adrogué HJ, Madias NE","doi":"10.1056/NEJM200005253422107","id":"adrogue-madias-hyponatremia-2000","source":"N Engl J Med. 2000;342(21):1581-1589","title":"Hyponatremia","url":"https://doi.org/10.1056/NEJM200005253422107"},"formula_expression":"TBW_L = 0.6 * weight_kg (male) or 0.5 * weight_kg (female); sodium_deficit_mmol = TBW_L * (desired_na_mmol_l - sodium_mmol_l)","purpose":"Estimate sodium (cation) deficit from weight, sex-specific TBW, and measured serum Na versus a chosen target.","markdown_url":"https://magentlab.com/docs/sodium-deficit.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"adrogue_madias"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"weight_kg","type":"number","description":"Normalized weight in kg"},{"name":"sex","type":"string","description":"male or female used for TBW fraction"},{"name":"tbw_l","type":"number","description":"Total body water in L, 0.6 or 0.5 × weight_kg, 1 decimal"},{"name":"sodium_mmol_l","type":"number","description":"Measured serum sodium used"},{"name":"desired_na_mmol_l","type":"number","description":"Target serum sodium (140 when omitted)"},{"name":"sodium_deficit_mmol","type":"number","description":"Estimated sodium (cation) deficit in mmol, 1 decimal"},{"name":"citation","type":"object","description":"Adrogué and Madias NEJM 2000 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"desired_na_mmol_l":"140","sex":"male","sodium_mmol_l":"120","weight_kg":"70"},{"desired_na_mmol_l":"140","sex":"male","sodium_mmol_l":"120","weight_kg":"70"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/sodium-deficit","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/sodium-deficit?weight_kg=70&sex=male&sodium_mmol_l=120&desired_na_mmol_l=140","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/sodium-deficit","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/free-water-deficit","description":"Free water deficit from weight, sex, and measured Na using Adrogué–Madias TBW (0.6 male / 0.5 female). Deterministic published arithmetic with citation; not a water-replacement infusion protocol.","parameters":[{"in":"query","name":"weight_kg","type":"number","description":"Weight in kilograms. Provide weight_kg or weight_lb.","required":false,"example":"70"},{"in":"query","name":"weight_lb","type":"number","description":"Weight in pounds. Converted as kg = lb * 0.45359237.","required":false,"example":"154.3236"},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"Sex used for TBW: 0.6 × weight (male) or 0.5 × weight (female).","required":true,"example":"male"},{"in":"query","name":"sodium_mmol_l","type":"number","description":"Measured serum sodium in mmol/L. Range 146-190 (hypernatremia).","required":true,"example":"160"},{"in":"query","name":"desired_na_mmol_l","type":"number","description":"Target serum sodium in mmol/L (130-145), must be less than measured Na. Omitted uses 140.","required":false,"example":"140"}],"errors":[{"code":"invalid_weight","message":"weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_hypernatremia_sodium","message":"sodium_mmol_l must be a number from 146 to 190 (hypernatremia). Returned before settlement; you are not charged.","status":400},{"code":"invalid_hypernatremia_desired_sodium","message":"desired_na_mmol_l must be a number from 130 to 145 less than sodium_mmol_l. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/free-water-deficit","citation":{"authors":"Adrogué HJ, Madias NE","doi":"10.1056/NEJM200005183422006","id":"adrogue-madias-hypernatremia-2000","source":"N Engl J Med. 2000;342(20):1493-1499","title":"Hypernatremia","url":"https://doi.org/10.1056/NEJM200005183422006"},"formula_expression":"TBW_L = 0.6 * weight_kg (male) or 0.5 * weight_kg (female); free_water_deficit_l = TBW_L * (sodium_mmol_l / desired_na_mmol_l - 1)","purpose":"Estimate free water deficit from weight, sex-specific TBW, and measured serum Na versus a chosen target.","markdown_url":"https://magentlab.com/docs/free-water-deficit.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"adrogue_madias"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"weight_kg","type":"number","description":"Normalized weight in kg"},{"name":"sex","type":"string","description":"male or female used for TBW fraction"},{"name":"tbw_l","type":"number","description":"Total body water in L, 0.6 or 0.5 × weight_kg, 1 decimal"},{"name":"sodium_mmol_l","type":"number","description":"Measured serum sodium used"},{"name":"desired_na_mmol_l","type":"number","description":"Target serum sodium (140 when omitted)"},{"name":"free_water_deficit_l","type":"number","description":"Estimated free water deficit in L, 1 decimal"},{"name":"citation","type":"object","description":"Adrogué and Madias NEJM 2000 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"desired_na_mmol_l":"140","sex":"male","sodium_mmol_l":"160","weight_kg":"70"},{"desired_na_mmol_l":"140","sex":"male","sodium_mmol_l":"160","weight_kg":"70"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/free-water-deficit","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/free-water-deficit?weight_kg=70&sex=male&sodium_mmol_l=160&desired_na_mmol_l=140","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/free-water-deficit","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/winters","description":"Winters' formula for expected PCO2 in metabolic acidosis: 1.5 × bicarbonate + 8 mm Hg, with a published ±2 mm Hg range. Optional comparison of measured PaCO2 to that band. Deterministic Albert–Winters 1967 arithmetic with citation; not a treatment target or a metabolic alkalosis formula.","parameters":[{"in":"query","name":"bicarbonate_mmol_l","type":"number","description":"Plasma bicarbonate in mmol/L (2-24). Metabolic acidosis range.","required":true,"example":"12"},{"in":"query","name":"paco2_mm_hg","type":"number","description":"Measured arterial PCO2 in mm Hg (8-80). When supplied, compensation is returned versus the Winters ±2 band.","required":false,"example":"26"}],"errors":[{"code":"invalid_acidosis_bicarbonate","message":"bicarbonate_mmol_l must be a number from 2 to 24 (metabolic acidosis). Returned before settlement; you are not charged.","status":400},{"code":"invalid_paco2","message":"paco2_mm_hg must be a number from 8 to 80. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/winters","citation":{"authors":"Albert MS, Dell RB, Winters RW","doi":"10.7326/0003-4819-66-2-312","id":"albert-winters-1967","source":"Ann Intern Med. 1967;66(2):312-322","title":"Quantitative displacement of acid-base equilibrium in metabolic acidosis","url":"https://doi.org/10.7326/0003-4819-66-2-312"},"formula_expression":"expected_pco2_mm_hg = 1.5 * bicarbonate_mmol_l + 8","purpose":"Compute expected arterial PCO2 in metabolic acidosis from plasma bicarbonate using the Albert–Winters 1967 formula.","markdown_url":"https://magentlab.com/docs/winters.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"winters"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"bicarbonate_mmol_l","type":"number","description":"Plasma bicarbonate used"},{"name":"expected_pco2_mm_hg","type":"number","description":"Winters expected PCO2 in mm Hg, 1 decimal"},{"name":"expected_pco2_low_mm_hg","type":"number","description":"Lower bound of expected ± 2 mm Hg, 1 decimal"},{"name":"expected_pco2_high_mm_hg","type":"number","description":"Upper bound of expected ± 2 mm Hg, 1 decimal"},{"name":"paco2_mm_hg","type":"number","description":"Measured arterial PCO2 when supplied. Omitted when paco2_mm_hg is not given."},{"name":"compensation","type":"string","description":"appropriate, below_expected, or above_expected versus the Winters ±2 band. Omitted when paco2_mm_hg is not given."},{"name":"citation","type":"object","description":"Albert, Dell, and Winters 1967 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"bicarbonate_mmol_l":"12"},{"bicarbonate_mmol_l":"12"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/winters","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/winters?bicarbonate_mmol_l=12","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/winters","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/anion-gap","description":"Serum anion gap from sodium, chloride, and bicarbonate, with or without potassium. formula=without_k or formula=with_k is required; magent does not pick one. Deterministic Emmett–Narins 1977 arithmetic with citation. Not a diagnosis, albumin-corrected gap (Figge/Fencl), or delta gap.","parameters":[{"in":"query","name":"sodium_mmol_l","type":"number","description":"Serum sodium in mmol/L (110-160).","required":true,"example":"140"},{"in":"query","name":"chloride_mmol_l","type":"number","description":"Serum chloride in mmol/L (70-130).","required":true,"example":"104"},{"in":"query","name":"bicarbonate_mmol_l","type":"number","description":"Serum bicarbonate in mmol/L (2-45).","required":true,"example":"24"},{"in":"query","name":"potassium_mmol_l","type":"number","description":"Serum potassium in mmol/L (1.5-8.0). Required when formula=with_k. Ignored when formula=without_k.","required":false,"example":"4.0"},{"in":"query","name":"formula","type":"string","enum":["without_k","with_k"],"description":"without_k (Na - Cl - HCO3) or with_k (Na + K - Cl - HCO3). Required; magent does not pick one silently.","required":true,"example":"without_k"}],"errors":[{"code":"invalid_sodium","message":"sodium_mmol_l must be a number from 110 to 160 Returned before settlement; you are not charged.","status":400},{"code":"invalid_chloride","message":"chloride_mmol_l must be a number from 70 to 130. Returned before settlement; you are not charged.","status":400},{"code":"invalid_bicarbonate","message":"bicarbonate_mmol_l must be a number from 2 to 45. Returned before settlement; you are not charged.","status":400},{"code":"invalid_potassium","message":"potassium_mmol_l must be a number from 1.5 to 8.0. Returned before settlement; you are not charged.","status":400},{"code":"invalid_anion_gap_formula","message":"formula must be without_k or with_k. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/anion-gap","citation":{"authors":"Emmett M, Narins RG","doi":"10.1097/00005792-197701000-00002","id":"emmett-narins-1977","source":"Medicine (Baltimore). 1977;56(1):38-54","title":"Clinical use of the anion gap","url":"https://doi.org/10.1097/00005792-197701000-00002"},"formula_expression":"anion_gap_mmol_l = sodium_mmol_l - chloride_mmol_l - bicarbonate_mmol_l","purpose":"Compute the serum anion gap from sodium, chloride, and bicarbonate, with or without potassium, using the Emmett–Narins 1977 formulas. formula is required.","markdown_url":"https://magentlab.com/docs/anion-gap.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"without_k or with_k"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"sodium_mmol_l","type":"number","description":"Input sodium in mmol/L"},{"name":"chloride_mmol_l","type":"number","description":"Input chloride in mmol/L"},{"name":"bicarbonate_mmol_l","type":"number","description":"Input bicarbonate in mmol/L"},{"name":"potassium_mmol_l","type":"number","description":"Serum potassium used when formula=with_k. Omitted when formula=without_k."},{"name":"anion_gap_mmol_l","type":"number","description":"Anion gap in mmol/L, 1 decimal"},{"name":"citation","type":"object","description":"Emmett and Narins 1977 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"bicarbonate_mmol_l":"24","chloride_mmol_l":"104","formula":"without_k","sodium_mmol_l":"140"},{"bicarbonate_mmol_l":"24","chloride_mmol_l":"104","formula":"without_k","sodium_mmol_l":"140"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/anion-gap","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/anion-gap?sodium_mmol_l=140&chloride_mmol_l=104&bicarbonate_mmol_l=24&formula=without_k","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/anion-gap","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/abg","description":"Berend 2014 physiological acid-base assessment. Labels acidemia or alkalemia, primary metabolic vs respiratory process, anion gap (Na-Cl-HCO3), optional albumin-corrected gap, and printed delta-delta. Not a diagnosis, ventilator order, bicarbonate dose, or blood-gas assay.","parameters":[{"in":"query","name":"ph","type":"number","description":"Arterial pH (6.80-7.80). Acidemia if pH<7.38; alkalemia if pH>7.42 (Berend 2014 Table 1).","required":true,"example":7.28},{"in":"query","name":"paco2_mm_hg","type":"number","description":"Arterial PaCO2 in mm Hg (8-120). Respiratory acidosis if pH<7.38 and PaCO2>42; respiratory alkalosis if pH>7.42 and PaCO2<38.","required":true,"example":39},{"in":"query","name":"bicarbonate_mmol_l","type":"number","description":"Plasma bicarbonate in mmol/L (2-55). Metabolic acidosis if pH<7.38 and HCO3<22; metabolic alkalosis if pH>7.42 and HCO3>26.","required":true,"example":18},{"in":"query","name":"sodium_mmol_l","type":"number","description":"Serum sodium in mmol/L (110-160). Used for anion gap Na-Cl-HCO3.","required":true,"example":135},{"in":"query","name":"chloride_mmol_l","type":"number","description":"Serum chloride in mmol/L (70-130). Used for anion gap Na-Cl-HCO3.","required":true,"example":115},{"in":"query","name":"albumin_g_dl","type":"number","description":"Serum albumin in g/dL (1-6). When supplied and below 4.0 g/dL, anion gap is increased by 2.5 mmol/L per 1 g/dL decrease (Figure 1). Omitted skips the correction.","required":false,"example":4.0},{"in":"query","name":"lactate_mmol_l","type":"number","description":"Serum lactate in mmol/L (0-30) when supplied. Echoed only; magent does not pick keto vs lactic delta-delta from lactate. Both printed equations are returned when the anion gap is high.","required":false,"example":2.0}],"errors":[{"code":"invalid_abg","message":"ABG acid-base inputs must match Berend 2014 pH, PaCO2, bicarbonate, sodium, chloride, albumin, and lactate as published. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/abg","citation":{"authors":"Berend K, de Vries APJ, Gans ROB","doi":"10.1056/NEJMra1003327","id":"berend-2014-acid-base","pmid":"25295502","source":"N Engl J Med. 2014;371:1434-1445","title":"Physiological Approach to Assessment of Acid-Base Disturbances","url":"https://doi.org/10.1056/NEJMra1003327"},"formula_expression":"Berend 2014: acidemia if pH<7.38; alkalemia if pH>7.42; metabolic acidosis if pH<7.38 and HCO3<22; metabolic alkalosis if pH>7.42 and HCO3>26; respiratory acidosis if pH<7.38 and PaCO2>42; respiratory alkalosis if pH>7.42 and PaCO2<38; anion_gap=Na-Cl-HCO3 (high if >12); albumin-corrected AG=AG+2.5*(4.0-albumin) when albumin<4.0 g/dL; metabolic acidosis expected PaCO2=1.5*HCO3+8±2; metabolic alkalosis expected PaCO2=0.7*(HCO3-24)+40±2; acute respiratory acidosis HCO3 +1 per 10 mm Hg PaCO2 above 40; chronic +4 to +5; acute respiratory alkalosis HCO3 -2 per 10 mm Hg PaCO2 below 40; chronic -4 to -5; ketoacidosis delta-delta=ΔAG-ΔHCO3; lactic delta-delta=0.6*ΔAG-ΔHCO3 (simple if -5 to 5)","purpose":"Apply the Berend 2014 physiological stepwise assessment: pH acidemia or alkalemia, Table 1 primary metabolic versus respiratory process, anion gap, optional albumin-corrected gap, and printed delta-delta.","markdown_url":"https://magentlab.com/docs/abg.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"abg"},{"name":"formula_expression","type":"string","description":"Berend 2014 printed steps"},{"name":"ph","type":"number","description":"Arterial pH used, 2 decimals"},{"name":"paco2_mm_hg","type":"number","description":"Arterial PaCO2 used, 1 decimal"},{"name":"bicarbonate_mmol_l","type":"number","description":"Plasma bicarbonate used, 1 decimal"},{"name":"sodium_mmol_l","type":"number","description":"Serum sodium used, 1 decimal"},{"name":"chloride_mmol_l","type":"number","description":"Serum chloride used, 1 decimal"},{"name":"anion_gap_mmol_l","type":"number","description":"Na - Cl - HCO3 in mmol/L, 1 decimal"},{"name":"anion_gap_class","type":"string","description":"high if anion gap >12 mmol/L (Berend example upper reference); else normal"},{"name":"ph_status","type":"string","description":"acidemia, alkalemia, or normal"},{"name":"primary_process","type":"string","description":"Table 1 primary metabolic and/or respiratory process label"},{"name":"disorders","type":"array","description":"Berend 2014 disorder labels as strings"},{"name":"expected_paco2_mm_hg","type":"number","description":"Table 1 expected PaCO2 when a metabolic primary is present. Omitted otherwise."},{"name":"expected_paco2_low_mm_hg","type":"number","description":"Expected PaCO2 minus 2 mm Hg. Omitted when expected PaCO2 is omitted."},{"name":"expected_paco2_high_mm_hg","type":"number","description":"Expected PaCO2 plus 2 mm Hg. Omitted when expected PaCO2 is omitted."},{"name":"secondary_response","type":"string","description":"appropriate, additional respiratory acidosis, or additional respiratory alkalosis versus the metabolic expected PaCO2 ±2 band. Omitted when no metabolic primary."},{"name":"hco3_change_per_10_mm_hg","type":"number","description":"Change in HCO3 per 10 mm Hg PaCO2 from 40 when a respiratory primary is present. Omitted otherwise."},{"name":"respiratory_secondary","type":"string","description":"acute, chronic, additional metabolic acidosis, or additional metabolic alkalosis when the printed per-10 mm Hg band is met. Omitted when no respiratory primary or the ratio is between printed bands."},{"name":"albumin_g_dl","type":"number","description":"Serum albumin when supplied. Omitted when albumin_g_dl is not given."},{"name":"albumin_corrected_anion_gap_mmol_l","type":"number","description":"Anion gap plus 2.5 mmol/L per 1 g/dL albumin decrease from 4.0 g/dL. Omitted when albumin is omitted."},{"name":"lactate_mmol_l","type":"number","description":"Serum lactate when supplied. Omitted when lactate_mmol_l is not given."},{"name":"delta_ag_mmol_l","type":"number","description":"Anion gap minus 12 (albumin-corrected when albumin is supplied). Omitted when anion gap is not high."},{"name":"delta_hco3_mmol_l","type":"number","description":"24 minus HCO3. Omitted when anion gap is not high."},{"name":"delta_delta_ketoacidosis_mmol_l","type":"number","description":"ΔAG − ΔHCO3. Omitted when anion gap is not high."},{"name":"delta_delta_lactic_mmol_l","type":"number","description":"0.6×ΔAG − ΔHCO3. Omitted when anion gap is not high."},{"name":"mixed_metabolic_ketoacidosis","type":"string","description":"Printed Δ-Δ ketoacidosis mixed-metabolic label. Omitted when AG is not high."},{"name":"mixed_metabolic_lactic","type":"string","description":"Printed Δ-Δ lactic mixed-metabolic label. Omitted when AG is not high."},{"name":"criteria","type":"array","description":"Tree rows for acidemia, alkalemia, primary processes, and anion-gap class"},{"name":"citation","type":"object","description":"Berend 2014 NEJM citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"bicarbonate_mmol_l":"18","chloride_mmol_l":"115","paco2_mm_hg":"39","ph":"7.28","sodium_mmol_l":"135"},{"bicarbonate_mmol_l":"18","chloride_mmol_l":"115","paco2_mm_hg":"39","ph":"7.28","sodium_mmol_l":"135"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/abg","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/abg?ph=7.28&paco2_mm_hg=39&bicarbonate_mmol_l=18&sodium_mmol_l=135&chloride_mmol_l=115","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/abg","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/estimated-ethanol","description":"Fasting Watson 1981 theoretical Co from ingested ethanol grams and sex-specific Watson 1980 total body water. Blood-water fraction 0.80; absorbed fraction 1. Fasting Widmark-type estimate only. Ethanol only; not a medicolegal BAC or treatment dose.","parameters":[{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"Sex for Watson 1980 TBW: male uses age, height, and weight; female uses height and weight only.","required":true,"example":"male"},{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Used in male TBW; required for both sexes.","required":true,"example":"30"},{"in":"query","name":"height_cm","type":"number","description":"Height in centimeters (50-250). Provide height_cm or height_in.","required":false,"example":"175"},{"in":"query","name":"height_in","type":"number","description":"Height in inches (20-98). Converted as cm = in * 2.54.","required":false,"example":"68.9"},{"in":"query","name":"weight_kg","type":"number","description":"Weight in kilograms (1-500). Provide weight_kg or weight_lb.","required":false,"example":"70"},{"in":"query","name":"weight_lb","type":"number","description":"Weight in pounds (2-1100). Converted as kg = lb * 0.45359237.","required":false,"example":"154.3"},{"in":"query","name":"ethanol_g","type":"number","description":"Ingested ethanol mass in grams (0-500). Watson 1981 does not publish a mass clamp; one US standard drink is about 14 g.","required":true,"example":"14"}],"errors":[{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_height","message":"height_cm (50-250) or height_in (20-98) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_weight","message":"weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_ethanol","message":"Ethanol ingestion inputs must match Watson 1981 sex, age, height, weight, and alcohol mass from that paper. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/estimated-ethanol","citation":{"authors":"Watson PE, Watson ID, Batt RD","doi":"10.15288/jsa.1981.42.547","id":"watson-1981","pmid":"7289599","source":"J Stud Alcohol. 1981;42(7):547-556","title":"Prediction of blood alcohol concentrations in human subjects. Updating the Widmark Equation","url":"https://doi.org/10.15288/jsa.1981.42.547"},"formula_expression":"TBW_L (male) = 2.447 - 0.09516*age_years + 0.1074*height_cm + 0.3362*weight_kg; TBW_L (female) = -2.097 + 0.1069*height_cm + 0.2466*weight_kg; Co_g_l = absorbed_fraction * ethanol_g * blood_water_fraction / TBW_L (fasting absorbed_fraction = 1, blood_water_fraction = 0.80)","purpose":"Estimate fasting theoretical blood ethanol (Co) from ingested ethanol grams and sex-specific Watson 1980 total body water, using the Watson 1981 Widmark update.","markdown_url":"https://magentlab.com/docs/estimated-ethanol.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"watson_1981"},{"name":"formula_expression","type":"string","description":"Exact TBW and Co expressions"},{"name":"sex","type":"string","description":"female or male used for TBW"},{"name":"age_years","type":"integer","description":"Age in years used"},{"name":"height_cm","type":"number","description":"Normalized height in cm"},{"name":"weight_kg","type":"number","description":"Normalized weight in kg"},{"name":"ethanol_g","type":"number","description":"Ingested ethanol mass in grams"},{"name":"tbw_l","type":"number","description":"Watson 1980 total body water in L, 2 decimals"},{"name":"absorbed_fraction","type":"number","description":"Fasting absorbed fraction from Watson 1981 (1.0)"},{"name":"blood_water_fraction","type":"number","description":"Watson 1981 blood-water fraction (0.80 w/w)"},{"name":"co_g_l","type":"number","description":"Theoretical fasting Co in g/L, 3 decimals"},{"name":"co_mg_dl","type":"number","description":"Same Co as mg/dL (g/L × 100), 1 decimal"},{"name":"citation","type":"object","description":"Watson 1981 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"30","ethanol_g":"14","height_cm":"175","sex":"male","weight_kg":"70"},{"age":"30","ethanol_g":"14","height_cm":"175","sex":"male","weight_kg":"70"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/estimated-ethanol","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/estimated-ethanol?sex=male&age=30&height_cm=175&weight_kg=70&ethanol_g=14","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/estimated-ethanol","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/dka-mpm","description":"Efstathiou 2002 DKA-MPM. Six caller-assigned flags: severe coexisting disease at presentation (+6), pH <7.0 at presentation (+4), regular insulin >50 IU in the first 12 h (+4), glucose >16.7 mmol/L after 12 h (+4), depressed mental state after 24 h (+4), fever after 24 h (+3). Max 25. Published in-hospital death 0.86% for scores 0–14 and 93.3% for 19–25; scores 15–18 return the total only. magent does not assay pH or glucose. Not a DKA treatment or insulin-dose order. Not a medical device.","parameters":[{"in":"query","name":"severe_comorbidity","type":"boolean","description":"Severe coexisting disease at presentation as assigned by the caller (Efstathiou 2002). true scores 6. true or false. magent does not diagnose comorbidity.","required":true,"example":"false"},{"in":"query","name":"ph_lt_7","type":"boolean","description":"Arterial pH < 7.0 at presentation as assigned by the caller (Efstathiou 2002). true scores 4. true or false. magent does not assay pH.","required":true,"example":"false"},{"in":"query","name":"insulin_gt_50_12h","type":"boolean","description":"Regular insulin > 50 IU in the first 12 h as assigned by the caller (Efstathiou 2002). true scores 4. true or false. Not an insulin dose. magent does not order insulin.","required":true,"example":"false"},{"in":"query","name":"glucose_gt_16_7_12h","type":"boolean","description":"Serum glucose > 16.7 mmol/L after 12 h as assigned by the caller (Efstathiou 2002). true scores 4. true or false. magent does not assay glucose.","required":true,"example":"false"},{"in":"query","name":"depressed_mental_24h","type":"boolean","description":"Depressed mental state after 24 h as assigned by the caller (Efstathiou 2002). true scores 4. true or false. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"fever_24h","type":"boolean","description":"Fever after 24 h as assigned by the caller (Efstathiou 2002). true scores 3. true or false. magent does not take temperature.","required":true,"example":"false"}],"errors":[{"code":"invalid_dka_mpm","message":"DKA-MPM inputs must match Efstathiou 2002 presentation and first-day binary predictors from that paper. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/dka-mpm","citation":{"authors":"Efstathiou SP, Tsioulos DI, Tsiakou AG, Gratsias YG, Pefanis AV, Mountokalakis TD","doi":"10.1046/j.1365-2265.2002.01636.x","id":"efstathiou-2002","pmid":"12390332","source":"Clin Endocrinol (Oxf). 2002;57(5):595-601","title":"A mortality prediction model in diabetic ketoacidosis","url":"https://doi.org/10.1046/j.1365-2265.2002.01636.x"},"formula_expression":"DKA-MPM = severe_comorbidity 6 + ph_lt_7 4 + insulin_gt_50_12h 4 + glucose_gt_16_7_12h 4 + depressed_mental_24h 4 + fever_24h 3; Efstathiou 2002; max 25; published in-hospital death 0.86% scores 0-14 and 93.3% scores 19-25","purpose":"Sum the Efstathiou 2002 DKA-MPM flags (max 25) and return the published in-hospital death percents only for scores 0–14 (0.86%) and 19–25 (93.3%).","markdown_url":"https://magentlab.com/docs/dka-mpm.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"dka_mpm"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Efstathiou 2002 DKA-MPM points 0-25"},{"name":"max_score","type":"integer","description":"Always 25"},{"name":"observed_mortality_percent","type":"number","description":"Efstathiou 2002 published in-hospital death: 0.86 when score is 0-14, 93.3 when score is 19-25. Omitted for scores 15-18; those scores are not given invented percents."},{"name":"components","type":"array","description":"Per-factor Efstathiou 2002 points"},{"name":"citation","type":"object","description":"Efstathiou et al. Clin Endocrinol (Oxf) 2002 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"depressed_mental_24h":"false","fever_24h":"false","glucose_gt_16_7_12h":"false","insulin_gt_50_12h":"false","ph_lt_7":"false","severe_comorbidity":"false"},{"depressed_mental_24h":"false","fever_24h":"false","glucose_gt_16_7_12h":"false","insulin_gt_50_12h":"false","ph_lt_7":"false","severe_comorbidity":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/dka-mpm","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/dka-mpm?severe_comorbidity=false&ph_lt_7=false&insulin_gt_50_12h=false&glucose_gt_16_7_12h=false&depressed_mental_24h=false&fever_24h=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/dka-mpm","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/stool-osmotic-gap","description":"Eherer–Fordtran 1992 fecal osmotic gap: stool osmolality minus 2×(stool Na + stool K). Assumed stool osm 290 mOsm/kg when measured osm is omitted. Deterministic published arithmetic with citation; not a diagnosis of osmotic versus secretory diarrhea.","parameters":[{"in":"query","name":"stool_sodium_mmol_l","type":"number","description":"Stool sodium in mmol/L (1-150).","required":true,"example":"30"},{"in":"query","name":"stool_potassium_mmol_l","type":"number","description":"Stool potassium in mmol/L (1-150).","required":true,"example":"75"},{"in":"query","name":"stool_osm_mosm_kg","type":"number","description":"Measured stool osmolality in mOsm/kg (200-600). When omitted, 290 mOsm/kg is assumed.","required":false,"example":"290"}],"errors":[{"code":"invalid_stool_sodium","message":"stool_sodium_mmol_l must be a number from 1 to 150. Returned before settlement; you are not charged.","status":400},{"code":"invalid_stool_potassium","message":"stool_potassium_mmol_l must be a number from 1 to 150. Returned before settlement; you are not charged.","status":400},{"code":"invalid_stool_osmolality","message":"stool_osm_mosm_kg must be a number from 200 to 600 when provided. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/stool-osmotic-gap","citation":{"authors":"Eherer AJ, Fordtran JS","doi":"10.1016/0016-5085(92)90845-P","id":"eherer-fordtran-1992","source":"Gastroenterology. 1992;103(2):545-551","title":"Fecal osmotic gap and pH in experimental diarrhea of various causes","url":"https://doi.org/10.1016/0016-5085(92)90845-P"},"formula_expression":"osmotic_gap = stool_osm_mosm_kg - 2 * (stool_sodium_mmol_l + stool_potassium_mmol_l)","purpose":"Compute the Eherer–Fordtran fecal osmotic gap from stool sodium and potassium, using measured stool osmolality when supplied or 290 mOsm/kg when omitted.","markdown_url":"https://magentlab.com/docs/stool-osmotic-gap.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"eherer_fordtran"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"stool_sodium_mmol_l","type":"number","description":"Input stool sodium in mmol/L"},{"name":"stool_potassium_mmol_l","type":"number","description":"Input stool potassium in mmol/L"},{"name":"stool_osm_mosm_kg","type":"number","description":"Stool osmolality used in mOsm/kg (measured or assumed 290)"},{"name":"assumed_osmolality","type":"boolean","description":"true when stool_osm_mosm_kg was omitted and 290 mOsm/kg was used"},{"name":"osmotic_gap","type":"number","description":"Fecal osmotic gap in mOsm/kg, 1 decimal. May be negative."},{"name":"gap_gt_50","type":"boolean","description":"true when osmotic_gap is greater than 50, the Eherer–Fordtran separator. Not a diagnosis."},{"name":"citation","type":"object","description":"Eherer and Fordtran 1992 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"stool_potassium_mmol_l":"75","stool_sodium_mmol_l":"30"},{"stool_potassium_mmol_l":"75","stool_sodium_mmol_l":"30"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/stool-osmotic-gap","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/stool-osmotic-gap?stool_sodium_mmol_l=30&stool_potassium_mmol_l=75","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/stool-osmotic-gap","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/urine-anion-gap","description":"Urine anion gap from urine sodium, potassium, and chloride (Na + K − Cl). Batlle 1988 interpretive band: negative suggests increased NH4+ (GI bicarbonate loss); positive suggests impaired NH4+ (RTA). Deterministic published arithmetic with citation; not a diagnosis.","parameters":[{"in":"query","name":"urine_sodium_mmol_l","type":"number","description":"Urine sodium in mmol/L (same as mEq/L). Range 1-300.","required":true,"example":"20"},{"in":"query","name":"urine_potassium_mmol_l","type":"number","description":"Urine potassium in mmol/L (same as mEq/L). Range 1-200.","required":true,"example":"30"},{"in":"query","name":"urine_chloride_mmol_l","type":"number","description":"Urine chloride in mmol/L (same as mEq/L). Range 1-300.","required":true,"example":"90"}],"errors":[{"code":"invalid_urine_sodium","message":"urine_sodium_mmol_l must be a number from 1 to 300. Returned before settlement; you are not charged.","status":400},{"code":"invalid_urine_potassium","message":"urine_potassium_mmol_l must be a number from 1 to 200. Returned before settlement; you are not charged.","status":400},{"code":"invalid_urine_chloride","message":"urine_chloride_mmol_l must be a number from 1 to 300. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/urine-anion-gap","citation":{"authors":"Batlle DC, Hizon M, Cohen E, Gutterman C, Gupta R","doi":"10.1056/NEJM198803103181002","id":"batlle-1988","source":"N Engl J Med. 1988;318(10):594-599","title":"The use of the urinary anion gap in the diagnosis of hyperchloremic metabolic acidosis","url":"https://doi.org/10.1056/NEJM198803103181002"},"formula_expression":"urine_anion_gap_mmol_l = urine_sodium_mmol_l + urine_potassium_mmol_l - urine_chloride_mmol_l","purpose":"Compute the urine anion gap from urine sodium, potassium, and chloride as a surrogate for ammonium excretion in hyperchloremic metabolic acidosis.","markdown_url":"https://magentlab.com/docs/urine-anion-gap.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"urine_anion_gap"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"urine_sodium_mmol_l","type":"number","description":"Urine sodium used, mmol/L"},{"name":"urine_potassium_mmol_l","type":"number","description":"Urine potassium used, mmol/L"},{"name":"urine_chloride_mmol_l","type":"number","description":"Urine chloride used, mmol/L"},{"name":"urine_anion_gap_mmol_l","type":"number","description":"Urine anion gap in mmol/L (mEq/L), 1 decimal"},{"name":"uag_band","type":"string","description":"negative (UAG < 0; Batlle: increased NH4+, GI bicarbonate loss), near_zero (UAG = 0), or positive (UAG > 0; Batlle: impaired NH4+, RTA). A band, not a diagnosis."},{"name":"citation","type":"object","description":"Batlle et al. NEJM 1988 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"urine_chloride_mmol_l":"90","urine_potassium_mmol_l":"30","urine_sodium_mmol_l":"20"},{"urine_chloride_mmol_l":"90","urine_potassium_mmol_l":"30","urine_sodium_mmol_l":"20"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/urine-anion-gap","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/urine-anion-gap?urine_sodium_mmol_l=20&urine_potassium_mmol_l=30&urine_chloride_mmol_l=90","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/urine-anion-gap","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/adrogue-madias","description":"Adrogué–Madias change in serum sodium after 1 L of infusate from TBW (child 0.6; adult male 0.6; adult female 0.5; elderly male 0.5; elderly female 0.45) and infusate Na plus K. Deterministic published arithmetic with citation; not a correction-rate order or infusion protocol.","parameters":[{"in":"query","name":"sodium_mmol_l","type":"number","description":"Measured serum sodium in mmol/L. Range 90-190.","required":true,"example":"110"},{"in":"query","name":"infusate_na_mmol_l","type":"number","description":"Sodium concentration of 1 L of infusate in mmol/L (0-1000). Adrogué–Madias table examples: 5% dextrose 0; 0.9% NaCl 154; 3% NaCl 513.","required":true,"example":"513"},{"in":"query","name":"infusate_k_mmol_l","type":"number","description":"Potassium concentration of the same 1 L infusate in mmol/L (0-200). Omitted uses 0. Added to infusate sodium in the numerator.","required":false,"example":"0"},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"Sex used for adult and elderly TBW fractions. Ignored for the TBW fraction when pediatric=true (child fraction 0.6).","required":true,"example":"female"},{"in":"query","name":"age","type":"integer","description":"Age in years. pediatric=false: integer 18-120; age ≥65 uses the elderly TBW fraction. pediatric=true: integer 0-17; TBW uses the child fraction 0.6.","required":true,"example":"40"},{"in":"query","name":"weight_kg","type":"number","description":"Weight in kilograms. Provide weight_kg or weight_lb.","required":false,"example":"70"},{"in":"query","name":"weight_lb","type":"number","description":"Weight in pounds. Converted as kg = lb * 0.45359237.","required":false,"example":"154.3236"},{"in":"query","name":"pediatric","type":"boolean","description":"true uses the child TBW fraction 0.6. false uses adult or elderly fractions from sex and age. Required; magent does not infer child vs adult from age.","required":true,"example":"false"}],"errors":[{"code":"invalid_adrogue_sodium","message":"sodium_mmol_l must be a number from 90 to 190. Returned before settlement; you are not charged.","status":400},{"code":"invalid_infusate_sodium","message":"infusate_na_mmol_l must be a number from 0 to 1000. Returned before settlement; you are not charged.","status":400},{"code":"invalid_infusate_potassium","message":"infusate_k_mmol_l must be a number from 0 to 200 when provided. Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_weight","message":"weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/adrogue-madias","citation":{"authors":"Adrogué HJ, Madias NE","doi":"10.1056/NEJM200005253422107","id":"adrogue-madias-2000","source":"N Engl J Med. 2000;342(21):1581-1589","title":"Hyponatremia","url":"https://doi.org/10.1056/NEJM200005253422107"},"formula_expression":"delta_na_mmol_l = (infusate_na_mmol_l + infusate_k_mmol_l - sodium_mmol_l) / (tbw_l + 1); tbw_l = tbw_fraction * weight_kg","purpose":"Estimate the change in serum sodium after 1 L of a given infusate from Adrogué–Madias TBW fractions and infusate sodium plus potassium.","markdown_url":"https://magentlab.com/docs/adrogue-madias.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"adrogue_madias"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"sodium_mmol_l","type":"number","description":"Measured serum sodium used"},{"name":"infusate_na_mmol_l","type":"number","description":"Infusate sodium used, mmol/L"},{"name":"infusate_k_mmol_l","type":"number","description":"Infusate potassium used (0 when omitted)"},{"name":"weight_kg","type":"number","description":"Normalized weight in kg"},{"name":"sex","type":"string","description":"male or female"},{"name":"age_years","type":"integer","description":"Age in years used"},{"name":"pediatric","type":"boolean","description":"true when the child TBW fraction 0.6 was used"},{"name":"tbw_fraction","type":"number","description":"TBW coefficient: children 0.6; adult male 0.6; adult female 0.5; elderly male 0.5; elderly female 0.45"},{"name":"tbw_l","type":"number","description":"Total body water in L (fraction × weight_kg), 1 decimal"},{"name":"delta_na_mmol_l","type":"number","description":"Estimated change in serum Na after 1 L of infusate, 1 decimal"},{"name":"citation","type":"object","description":"Adrogué and Madias NEJM 2000 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"40","infusate_na_mmol_l":"513","pediatric":"false","sex":"female","sodium_mmol_l":"110","weight_kg":"70"},{"age":"40","infusate_na_mmol_l":"513","pediatric":"false","sex":"female","sodium_mmol_l":"110","weight_kg":"70"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/adrogue-madias","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/adrogue-madias?sodium_mmol_l=110&infusate_na_mmol_l=513&sex=female&age=40&weight_kg=70&pediatric=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/adrogue-madias","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/myxedema-coma","description":"Popoveniuc 2014 myxedema coma points from caller-assigned bands: thermoregulatory 0/10/20; CNS 0/10/15/20/30; GI 0/5/15/20; precipitant 10; bradycardia 0/10/20/30 plus other EKG 10, effusion 10, pulmonary edema 15, cardiomegaly 15, hypotension 20; five metabolic flags 10 each. Max 230. ≥60 potentially diagnostic; 45–59 at risk. Not a diagnosis or thyroid-hormone order. magent does not measure temperature, GCS, or labs.","parameters":[{"in":"query","name":"thermoregulatory","type":"string","enum":["gt_35","32_to_35","lt_32"],"description":"Caller-assigned Popoveniuc 2014 thermoregulatory band. gt_35 (>35 °C) scores 0; 32_to_35 (32–35 °C) scores 10; lt_32 (<32 °C) scores 20. magent does not measure temperature.","required":true,"example":"gt_35"},{"in":"query","name":"cns_effects","type":"string","enum":["absent","somnolent_lethargic","obtunded","stupor","coma_seizures"],"description":"Caller-assigned Popoveniuc 2014 central-nervous-system band. absent scores 0; somnolent_lethargic 10; obtunded 15; stupor 20; coma_seizures 30. magent does not compute GCS or examine the patient.","required":true,"example":"absent"},{"in":"query","name":"gastrointestinal","type":"string","enum":["absent","anorexia_pain_constipation","decreased_motility","paralytic_ileus"],"description":"Caller-assigned Popoveniuc 2014 gastrointestinal band. absent scores 0; anorexia_pain_constipation (anorexia, abdominal pain, or constipation) scores 5; decreased_motility 15; paralytic_ileus 20. magent does not examine the patient.","required":true,"example":"absent"},{"in":"query","name":"precipitating_event","type":"boolean","description":"Precipitating event as assigned by the caller (true or false). Popoveniuc 2014: true → 10. magent does not take a history.","required":true,"example":"false"},{"in":"query","name":"bradycardia","type":"string","enum":["absent","50_to_59","40_to_49","lt_40"],"description":"Caller-assigned Popoveniuc 2014 bradycardia band. absent scores 0; 50_to_59 (heart rate 50–59) scores 10; 40_to_49 scores 20; lt_40 (<40) scores 30. magent does not measure heart rate.","required":true,"example":"absent"},{"in":"query","name":"other_ekg_changes","type":"boolean","description":"Other electrocardiogram changes as assigned by the caller (true or false): QT prolongation, low voltage, bundle-branch block, nonspecific ST-T changes, or heart block (Popoveniuc 2014). true → 10. magent does not read an ECG.","required":true,"example":"false"},{"in":"query","name":"pericardial_pleural_effusion","type":"boolean","description":"Pericardial or pleural effusion as assigned by the caller (true or false). Popoveniuc 2014: true → 10. magent does not interpret imaging.","required":true,"example":"false"},{"in":"query","name":"pulmonary_edema","type":"boolean","description":"Pulmonary edema as assigned by the caller (true or false). Popoveniuc 2014: true → 15. magent does not interpret imaging.","required":true,"example":"false"},{"in":"query","name":"cardiomegaly","type":"boolean","description":"Cardiomegaly as assigned by the caller (true or false). Popoveniuc 2014: true → 15. magent does not interpret imaging.","required":true,"example":"false"},{"in":"query","name":"hypotension","type":"boolean","description":"Hypotension or shock as assigned by the caller (true or false). Popoveniuc 2014: true → 20. magent does not measure blood pressure.","required":true,"example":"false"},{"in":"query","name":"hyponatremia","type":"boolean","description":"Hyponatremia as assigned by the caller (true or false). Popoveniuc 2014: true → 10. magent does not measure sodium.","required":true,"example":"false"},{"in":"query","name":"hypoglycemia","type":"boolean","description":"Hypoglycemia as assigned by the caller (true or false). Popoveniuc 2014: true → 10. magent does not measure glucose.","required":true,"example":"false"},{"in":"query","name":"hypoxemia","type":"boolean","description":"Hypoxemia as assigned by the caller (true or false). Popoveniuc 2014: true → 10. magent does not measure oxygen.","required":true,"example":"false"},{"in":"query","name":"hypercarbia","type":"boolean","description":"Hypercarbia as assigned by the caller (true or false). Popoveniuc 2014: true → 10. magent does not measure carbon dioxide.","required":true,"example":"false"},{"in":"query","name":"decreased_gfr","type":"boolean","description":"Decrease in glomerular filtration rate as assigned by the caller (true or false). Popoveniuc 2014: true → 10. magent does not compute GFR.","required":true,"example":"false"}],"errors":[{"code":"invalid_myxedema_coma","message":"Myxedema coma score inputs must match Popoveniuc 2014 thermoregulatory, neurologic, cardiovascular, gastrointestinal, metabolic, and precipitant bands from that paper. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/myxedema-coma","citation":{"authors":"Popoveniuc G, Chandra T, Sud A, Sharma M, Blackman MR, Burman KD, Mete M, Desale S, Wartofsky L","doi":"10.4158/EP13460.OR","id":"popoveniuc-2014","pmid":"24518183","source":"Endocr Pract. 2014;20(8):808-817","title":"A diagnostic scoring system for myxedema coma","url":"https://doi.org/10.4158/EP13460.OR"},"formula_expression":"Popoveniuc 2014 = thermoregulatory(gt_35→0, 32_to_35→10, lt_32→20) + cns_effects(absent→0, somnolent_lethargic→10, obtunded→15, stupor→20, coma_seizures→30) + gastrointestinal(absent→0, anorexia_pain_constipation→5, decreased_motility→15, paralytic_ileus→20) + 10*precipitating_event + bradycardia(absent→0, 50_to_59→10, 40_to_49→20, lt_40→30) + 10*other_ekg_changes + 10*pericardial_pleural_effusion + 15*pulmonary_edema + 15*cardiomegaly + 20*hypotension + 10*hyponatremia + 10*hypoglycemia + 10*hypoxemia + 10*hypercarbia + 10*decreased_gfr; max 230; ≥60 potentially_diagnostic, 45–59 at_risk","purpose":"Sum Popoveniuc 2014 myxedema coma diagnostic points from caller-assigned thermoregulatory, CNS, GI, precipitating-event, cardiovascular, and metabolic bands and return ≥60 potentially diagnostic or 45–59 at risk.","markdown_url":"https://magentlab.com/docs/myxedema-coma.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"myxedema_coma"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Popoveniuc 2014 myxedema coma diagnostic points 0-230"},{"name":"max_score","type":"integer","description":"Always 230"},{"name":"myxedema_coma_band","type":"string","description":"potentially_diagnostic when score is ≥60, at_risk when 45-59, below_at_risk when <45 (Popoveniuc 2014 conclusion). Not a myxedema-coma diagnosis or thyroid-hormone order."},{"name":"components","type":"array","description":"Per-factor Popoveniuc 2014 points"},{"name":"citation","type":"object","description":"Popoveniuc et al. Endocr Pract 2014 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"bradycardia":"absent","cardiomegaly":"false","cns_effects":"absent","decreased_gfr":"false","gastrointestinal":"absent","hypercarbia":"false","hypoglycemia":"false","hyponatremia":"false","hypotension":"false","hypoxemia":"false","other_ekg_changes":"false","pericardial_pleural_effusion":"false","precipitating_event":"false","pulmonary_edema":"false","thermoregulatory":"gt_35"},{"bradycardia":"absent","cardiomegaly":"false","cns_effects":"absent","decreased_gfr":"false","gastrointestinal":"absent","hypercarbia":"false","hypoglycemia":"false","hyponatremia":"false","hypotension":"false","hypoxemia":"false","other_ekg_changes":"false","pericardial_pleural_effusion":"false","precipitating_event":"false","pulmonary_edema":"false","thermoregulatory":"gt_35"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/myxedema-coma","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/myxedema-coma?thermoregulatory=gt_35&cns_effects=absent&gastrointestinal=absent&precipitating_event=false&bradycardia=absent&other_ekg_changes=false&pericardial_pleural_effusion=false&pulmonary_edema=false&cardiomegaly=false&hypotension=false&hyponatremia=false&hypoglycemia=false&hypoxemia=false&hypercarbia=false&decreased_gfr=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/myxedema-coma","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/irae-hypothyroidism","description":"Brahmer 2018 ASCO Table 4.1.1 irAE primary hypothyroidism grade from tsh_miu_l (0.01-150 mIU/L) and three caller-assigned flags. First-match: grade 3 if severe_or_life_threatening or unable_to_perform_adl (paper G3-4 as grade 3); else 2 if moderate_symptoms or TSH >= 10; else 1 if TSH < 10. Returns icpi_action continue (grade 1) or hold_until_baseline (grade 2 or 3). Not hyperthyroidism (Table 4.1.2). magent does not assay TSH/FT4. Not a medical device, not a diagnosis, not a levothyroxine dose.","parameters":[{"in":"query","name":"tsh_miu_l","type":"number","description":"TSH in mIU/L (0.01-150; Brahmer 2018 Table 4.1.1 primary hypothyroidism). Persistently TSH >10 mIU/L is grade 2 unless a grade 3 flag is true; TSH 10 is this band. TSH <10 mIU/L with no moderate or severe flags is grade 1. magent does not assay TSH.","required":true,"example":"8"},{"in":"query","name":"moderate_symptoms","type":"boolean","description":"Moderate symptoms with ability to perform ADL as assigned by the caller (Brahmer 2018 Table 4.1.1 grade 2). true or false. When true and no grade 3 flag is true, grade is 2. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"severe_or_life_threatening","type":"boolean","description":"Severe symptoms, medically significant or life-threatening consequences as assigned by the caller (Brahmer 2018 Table 4.1.1 grade 3-4, returned as grade 3). true or false. When true, grade is 3. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"unable_to_perform_adl","type":"boolean","description":"Unable to perform ADL as assigned by the caller (Brahmer 2018 Table 4.1.1 grade 3-4, returned as grade 3). true or false. When true, grade is 3. magent does not assess ADL.","required":true,"example":"false"}],"errors":[{"code":"invalid_tsh_miu_l","message":"tsh_miu_l must be a number from 0.01 to 150 (Brahmer 2018 TSH mIU/L). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/irae-hypothyroidism","citation":{"authors":"Brahmer JR, Lacchetti C, Schneider BJ, Atkins MB, Brassil KJ, Caterino JM, Chau I, Ernstoff MS, Gardner JM, Ginex P, Hallmeyer S, Holter Chakrabarty J, Leighl NB, Mammen JS, McDermott DF, Naing A, Nastoupil LJ, Phillips T, Porter LD, Puzanov I, Reichner CA, Santomasso BD, Seigel C, Spira A, Suarez-Almazor ME, Wang Y, Weber JS, Wolchok JD, Thompson JA","doi":"10.1200/JCO.2017.77.6385","id":"brahmer-2018","pmid":"29442540","source":"J Clin Oncol. 2018;36(17):1714-1768","title":"Management of Immune-Related Adverse Events in Patients Treated With Immune Checkpoint Inhibitor Therapy: American Society of Clinical Oncology Clinical Practice Guideline","url":"https://doi.org/10.1200/JCO.2017.77.6385"},"formula_expression":"irae hypothyroidism first-match (Brahmer 2018 Table 4.1.1 primary hypothyroidism): grade 3 if severe_or_life_threatening or unable_to_perform_adl (paper G3-4 as grade 3); else grade 2 if moderate_symptoms or tsh_miu_l >= 10; else grade 1 if tsh_miu_l < 10. icpi_action continue (1), hold_until_baseline (2 and 3). Not hyperthyroidism (Table 4.1.2). magent does not assay TSH/FT4. Not a diagnosis. Not a levothyroxine dose","purpose":"Apply Brahmer 2018 ASCO Table 4.1.1 primary hypothyroidism grading and return grade 1-3 plus icpi_action from tsh_miu_l and three caller-assigned flags.","markdown_url":"https://magentlab.com/docs/irae-hypothyroidism.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"irae_hypothyroidism"},{"name":"formula_expression","type":"string","description":"Brahmer 2018 Table 4.1.1 first-match primary hypothyroidism grade and icpi_action rule"},{"name":"grade","type":"integer","description":"Primary hypothyroidism grade 1, 2, or 3 (Brahmer 2018 Table 4.1.1; paper G3-4 is grade 3). First-match worst-wins. Not a diagnosis."},{"name":"icpi_action","type":"string","description":"continue (grade 1) or hold_until_baseline (grade 2 or 3). Not a levothyroxine dose."},{"name":"tsh_miu_l","type":"number","description":"Echo of the caller-assigned TSH in mIU/L (0.01-150)"},{"name":"moderate_symptoms","type":"boolean","description":"Echo of caller-assigned moderate symptoms (grade 2 when true)"},{"name":"severe_or_life_threatening","type":"boolean","description":"Echo of caller-assigned severe or life-threatening flag (grade 3 when true)"},{"name":"unable_to_perform_adl","type":"boolean","description":"Echo of caller-assigned unable to perform ADL (grade 3 when true)"},{"name":"criteria","type":"array","description":"Per-factor Tree rows with factor and met for severe_or_life_threatening, unable_to_perform_adl, moderate_symptoms, and tsh_ge_10; the TSH row includes value"},{"name":"citation","type":"object","description":"Brahmer 2018 J Clin Oncol ASCO irAE guideline citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"moderate_symptoms":"false","severe_or_life_threatening":"false","tsh_miu_l":"8","unable_to_perform_adl":"false"},{"moderate_symptoms":"false","severe_or_life_threatening":"false","tsh_miu_l":"8","unable_to_perform_adl":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/irae-hypothyroidism","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/irae-hypothyroidism?tsh_miu_l=8&moderate_symptoms=false&severe_or_life_threatening=false&unable_to_perform_adl=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/irae-hypothyroidism","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/miller-esr","description":"Adult maximum normal erythrocyte sedimentation rate (mm/h, 98th percentile approximation) from age and sex (Miller 1983). Men: age/2. Women: (age + 10)/2. Deterministic published arithmetic with citation. Returns the threshold only; not a diagnosis, not a measured ESR, and not Wener 2000 CRP. magent does not measure ESR.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (integer 20-90). Miller 1983 adult range.","required":true,"example":"40"},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"Sex for the published rule (female or male).","required":true,"example":"male"}],"errors":[{"code":"invalid_miller_age","message":"age must be an integer from 20 to 90 (Miller 1983 adult ESR rule). Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/miller-esr","citation":{"authors":"Miller A, Green M, Robinson D","doi":"10.1136/bmj.286.6361.266","id":"miller-1983","pmid":"6402065","source":"Br Med J (Clin Res Ed). 1983;286(6361):266","title":"Simple rule for calculating normal erythrocyte sedimentation rate","url":"https://doi.org/10.1136/bmj.286.6361.266"},"formula_expression":"men: max_normal_esr = age / 2; women: max_normal_esr = (age + 10) / 2","purpose":"Compute the Miller 1983 adult maximum normal erythrocyte sedimentation rate in mm/h from age and sex. Men: age/2. Women: (age + 10)/2. Returns the threshold only.","markdown_url":"https://magentlab.com/docs/miller-esr.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"miller_1983"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"age","type":"integer","description":"Age in years used"},{"name":"sex","type":"string","description":"male or female"},{"name":"max_normal_esr","type":"number","description":"Adult maximum normal ESR in mm/h (Miller 1983 98th percentile approximation). Integer or one decimal."},{"name":"citation","type":"object","description":"Miller 1983 BMJ citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"40","sex":"male"},{"age":"40","sex":"male"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/miller-esr","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/miller-esr?age=40&sex=male","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/miller-esr","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/friedewald","description":"Friedewald estimated LDL-C from total cholesterol, HDL, and triglycerides. One unit system (mg/dL or mmol/L). Deterministic published equation with citation; not a diagnosis or statin order.","parameters":[{"in":"query","name":"total_cholesterol_mg_dl","type":"number","description":"Total cholesterol in mg/dL (50-500). Provide the full mg/dL set or the full mmol/L set, not mixed.","required":false,"example":"200"},{"in":"query","name":"hdl_mg_dl","type":"number","description":"HDL cholesterol in mg/dL (5-150). Same unit system as the other lipids.","required":false,"example":"50"},{"in":"query","name":"triglycerides_mg_dl","type":"number","description":"Triglycerides in mg/dL (10-400). Values above 400 are rejected; Friedewald VLDL is TG/5 for typical specimens only.","required":false,"example":"150"},{"in":"query","name":"total_cholesterol_mmol_l","type":"number","description":"Total cholesterol in mmol/L (1.3-12.9). Converted as mg/dL = mmol/L * 38.67. Do not mix with mg/dL keys.","required":false,"example":"5.0"},{"in":"query","name":"hdl_mmol_l","type":"number","description":"HDL cholesterol in mmol/L (0.1-3.9). Converted as mg/dL = mmol/L * 38.67.","required":false,"example":"1.0"},{"in":"query","name":"triglycerides_mmol_l","type":"number","description":"Triglycerides in mmol/L (0.1-4.5). Cap is the SI stand-in for 400 mg/dL (mg/dL = mmol/L * 88.57). SI LDL uses TG/2.2.","required":false,"example":"2.2"}],"errors":[{"code":"invalid_cholesterol","message":"provide all of total_cholesterol_mg_dl (50-500), hdl_mg_dl (5-150), and triglycerides_mg_dl, or all of total_cholesterol_mmol_l (1.3-12.9), hdl_mmol_l (0.1-3.9), and triglycerides_mmol_l, not mixed. Returned before settlement; you are not charged.","status":400},{"code":"invalid_triglyceride","message":"triglycerides_mg_dl must be 10-400; triglycerides_mmol_l must be 0.1-4.5 (~400 mg/dL). Friedewald is not applied above 400 mg/dL. Returned before settlement; you are not charged.","status":400},{"code":"invalid_lipid_inputs","message":"computed LDL-C would be negative; check total cholesterol, HDL, and triglycerides. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/friedewald","citation":{"authors":"Friedewald WT, Levy RI, Fredrickson DS","doi":"10.1093/clinchem/18.6.499","id":"friedewald-1972","source":"Clin Chem. 1972;18(6):499-502","title":"Estimation of the concentration of low-density lipoprotein cholesterol in plasma, without use of the preparative ultracentrifuge","url":"https://doi.org/10.1093/clinchem/18.6.499"},"formula_expression":"ldl_c_mg_dl = total_cholesterol_mg_dl - hdl_mg_dl - (triglycerides_mg_dl / 5); ldl_c_mmol_l = total_cholesterol_mmol_l - hdl_mmol_l - (triglycerides_mmol_l / 2.2)","purpose":"Estimate LDL-C from total cholesterol, HDL, and triglycerides using Friedewald 1972.","markdown_url":"https://magentlab.com/docs/friedewald.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"friedewald"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"unit","type":"string","description":"mg_dl or mmol_l, the unit system supplied"},{"name":"total_cholesterol_mg_dl","type":"number","description":"Total cholesterol in mg/dL (converted when SI inputs are used)"},{"name":"hdl_mg_dl","type":"number","description":"HDL cholesterol in mg/dL (converted when SI inputs are used)"},{"name":"triglycerides_mg_dl","type":"number","description":"Triglycerides in mg/dL (converted when SI inputs are used)"},{"name":"ldl_c_mg_dl","type":"number","description":"Estimated LDL-C in mg/dL, 1 decimal"},{"name":"ldl_c_mmol_l","type":"number","description":"Estimated LDL-C in mmol/L, 1 decimal"},{"name":"citation","type":"object","description":"Friedewald Clin Chem 1972 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"hdl_mg_dl":"50","total_cholesterol_mg_dl":"200","triglycerides_mg_dl":"150"},{"hdl_mg_dl":"50","total_cholesterol_mg_dl":"200","triglycerides_mg_dl":"150"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/friedewald","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/friedewald?total_cholesterol_mg_dl=200&hdl_mg_dl=50&triglycerides_mg_dl=150","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/friedewald","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/martin-ldl","description":"Martin 2013 estimated LDL-C from total cholesterol, HDL, and triglycerides in mg/dL. Adjustable TG:VLDL-C factor from the published 180-cell table by non-HDL-C and TG strata. Not Friedewald factor 5, not Sampson, not a diagnosis or statin order.","parameters":[{"in":"query","name":"total_cholesterol_mg_dl","type":"number","description":"Total cholesterol in mg/dL (50-500). mg/dL only; magent does not convert mmol/L.","required":true,"example":"200"},{"in":"query","name":"hdl_mg_dl","type":"number","description":"HDL cholesterol in mg/dL (5-150). Must be less than total cholesterol so non-HDL-C is positive.","required":true,"example":"50"},{"in":"query","name":"triglycerides_mg_dl","type":"number","description":"Triglycerides in mg/dL (7-399). The Martin 2013 table first TG row starts at 7. Values of 400 or higher are rejected; that is the paper's primary analysis cut.","required":true,"example":"150"}],"errors":[{"code":"invalid_martin_ldl","message":"Martin LDL-C needs total cholesterol, HDL, and triglycerides in published mg/dL ranges (Martin 2013). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/martin-ldl","citation":{"authors":"Martin SS, Blaha MJ, Elshazly MB, et al.","doi":"10.1001/jama.2013.280532","id":"martin-2013","pmid":"24240933","source":"JAMA. 2013;310(19):2061-2068","title":"Comparison of a novel method vs the Friedewald equation for estimating low-density lipoprotein cholesterol","url":"https://doi.org/10.1001/jama.2013.280532"},"formula_expression":"ldl_c_mg_dl = (total_cholesterol_mg_dl - hdl_mg_dl) - (triglycerides_mg_dl / factor); factor is the Martin 2013 180-cell median TG:VLDL-C ratio by non-HDL-C and TG strata (mg/dL); not Friedewald factor 5","purpose":"Estimate LDL-C from total cholesterol, HDL, and triglycerides using Martin 2013: non-HDL-C minus triglycerides divided by the published 180-cell TG:VLDL-C factor (mg/dL).","markdown_url":"https://magentlab.com/docs/martin-ldl.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"martin"},{"name":"formula_expression","type":"string","description":"Martin 2013 expression with table factor"},{"name":"total_cholesterol_mg_dl","type":"number","description":"Input total cholesterol in mg/dL"},{"name":"hdl_mg_dl","type":"number","description":"Input HDL cholesterol in mg/dL"},{"name":"triglycerides_mg_dl","type":"number","description":"Input triglycerides in mg/dL"},{"name":"non_hdl_c_mg_dl","type":"number","description":"Total cholesterol minus HDL, 1 decimal"},{"name":"factor","type":"number","description":"Martin 2013 180-cell TG:VLDL-C median for the specimen's strata"},{"name":"ldl_c_mg_dl","type":"number","description":"Estimated LDL-C in mg/dL, 1 decimal"},{"name":"citation","type":"object","description":"Martin JAMA 2013 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"hdl_mg_dl":"50","total_cholesterol_mg_dl":"200","triglycerides_mg_dl":"150"},{"hdl_mg_dl":"50","total_cholesterol_mg_dl":"200","triglycerides_mg_dl":"150"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/martin-ldl","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/martin-ldl?total_cholesterol_mg_dl=200&hdl_mg_dl=50&triglycerides_mg_dl=150","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/martin-ldl","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/sampson","description":"Sampson 2020 estimated LDL-C from total cholesterol, HDL, and triglycerides (valid through 800 mg/dL). One unit system (mg/dL or mmol/L). Deterministic published equation with citation; not Friedewald, not a diagnosis or statin order.","parameters":[{"in":"query","name":"total_cholesterol_mg_dl","type":"number","description":"Total cholesterol in mg/dL (50-500). Provide the full mg/dL set or the full mmol/L set, not mixed.","required":false,"example":"200"},{"in":"query","name":"hdl_mg_dl","type":"number","description":"HDL cholesterol in mg/dL (5-150). Same unit system as the other lipids.","required":false,"example":"50"},{"in":"query","name":"triglycerides_mg_dl","type":"number","description":"Triglycerides in mg/dL (10-800). Values above 800 are rejected; Sampson 2020 is not applied above 800 mg/dL.","required":false,"example":"150"},{"in":"query","name":"total_cholesterol_mmol_l","type":"number","description":"Total cholesterol in mmol/L (1.3-12.9). Converted as mg/dL = mmol/L * 38.67. Do not mix with mg/dL keys.","required":false,"example":"5.0"},{"in":"query","name":"hdl_mmol_l","type":"number","description":"HDL cholesterol in mmol/L (0.1-3.9). Converted as mg/dL = mmol/L * 38.67.","required":false,"example":"1.0"},{"in":"query","name":"triglycerides_mmol_l","type":"number","description":"Triglycerides in mmol/L (0.1-9.03). Cap is the SI stand-in for 800 mg/dL (mg/dL = mmol/L * 88.57). The Sampson equation is applied in mg/dL.","required":false,"example":"2.2"}],"errors":[{"code":"invalid_cholesterol","message":"provide all of total_cholesterol_mg_dl (50-500), hdl_mg_dl (5-150), and triglycerides_mg_dl, or all of total_cholesterol_mmol_l (1.3-12.9), hdl_mmol_l (0.1-3.9), and triglycerides_mmol_l, not mixed. Returned before settlement; you are not charged.","status":400},{"code":"invalid_sampson_triglyceride","message":"triglycerides_mg_dl must be 10-800; triglycerides_mmol_l must be 0.1-9.03. Sampson is not applied above 800 mg/dL. Returned before settlement; you are not charged.","status":400},{"code":"invalid_lipid_inputs","message":"computed LDL-C would be negative; check total cholesterol, HDL, and triglycerides. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/sampson","citation":{"authors":"Sampson M, Ling C, Sun Q, et al.","doi":"10.1001/jamacardio.2020.0013","id":"sampson-2020","pmid":"32101259","source":"JAMA Cardiol. 2020;5(5):540-548","title":"A new equation for calculation of low-density lipoprotein cholesterol in patients with normolipidemia and/or hypertriglyceridemia","url":"https://doi.org/10.1001/jamacardio.2020.0013"},"formula_expression":"LDL-C = TC/0.948 - HDL/0.971 - (TG/8.56 + TG*(TC-HDL)/2140 - TG^2/16100) - 9.44 (mg/dL)","purpose":"Estimate LDL-C from total cholesterol, HDL, and triglycerides using Sampson 2020.","markdown_url":"https://magentlab.com/docs/sampson.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"sampson"},{"name":"formula_expression","type":"string","description":"Exact Sampson 2020 expression"},{"name":"unit","type":"string","description":"mg_dl or mmol_l, the unit system supplied"},{"name":"total_cholesterol_mg_dl","type":"number","description":"Total cholesterol in mg/dL (converted when SI inputs are used)"},{"name":"hdl_mg_dl","type":"number","description":"HDL cholesterol in mg/dL (converted when SI inputs are used)"},{"name":"triglycerides_mg_dl","type":"number","description":"Triglycerides in mg/dL (converted when SI inputs are used)"},{"name":"ldl_c_mg_dl","type":"number","description":"Estimated LDL-C in mg/dL, 1 decimal"},{"name":"ldl_c_mmol_l","type":"number","description":"Estimated LDL-C in mmol/L, 1 decimal"},{"name":"citation","type":"object","description":"Sampson JAMA Cardiol 2020 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"hdl_mg_dl":"50","total_cholesterol_mg_dl":"200","triglycerides_mg_dl":"150"},{"hdl_mg_dl":"50","total_cholesterol_mg_dl":"200","triglycerides_mg_dl":"150"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/sampson","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/sampson?total_cholesterol_mg_dl=200&hdl_mg_dl=50&triglycerides_mg_dl=150","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/sampson","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/simon-broome","description":"Simon Broome Register 1991 adult definite familial hypercholesterolaemia: total cholesterol >7.5 mmol/L or LDL cholesterol >4.9 mmol/L plus tendon xanthomas in the patient or a relative (parent, child, grandparent, sibling, uncle, or aunt). One lipid (mmol/L or mg/dL). magent does not assay lipids or examine tendons. Not a diagnosis, not possible FH, and not a DNA or child-cutoff classifier.","parameters":[{"in":"query","name":"total_cholesterol_mmol_l","type":"number","description":"Total cholesterol in mmol/L (1.3-20). Adult threshold is >7.5 mmol/L (7.5 does not meet). Provide exactly one of total_cholesterol_mmol_l, total_cholesterol_mg_dl, ldl_mmol_l, or ldl_mg_dl. magent does not assay lipids.","required":false,"example":"8.0"},{"in":"query","name":"total_cholesterol_mg_dl","type":"number","description":"Total cholesterol in mg/dL (50-800). Converted to mmol/L as mg/dL / 38.67, then compared with >7.5. Provide exactly one lipid parameter.","required":false,"example":"310"},{"in":"query","name":"ldl_mmol_l","type":"number","description":"LDL cholesterol in mmol/L (1-15). Adult threshold is >4.9 mmol/L (4.9 does not meet). Provide exactly one lipid parameter. magent does not assay lipids.","required":false,"example":"5.0"},{"in":"query","name":"ldl_mg_dl","type":"number","description":"LDL cholesterol in mg/dL (40-600). Converted to mmol/L as mg/dL / 38.67, then compared with >4.9. Provide exactly one lipid parameter.","required":false,"example":"200"},{"in":"query","name":"tendon_xanthoma_patient_or_relative","type":"boolean","description":"Tendon xanthomas in the patient or a relative (parent, child, grandparent, sibling, uncle, or aunt) as assigned by the caller. true or false. magent does not examine tendons or take a pedigree.","required":true,"example":"true"}],"errors":[{"code":"invalid_simon_lipid","message":"provide exactly one of total_cholesterol_mmol_l (1.3-20), total_cholesterol_mg_dl (50-800), ldl_mmol_l (1-15), or ldl_mg_dl (40-600). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/simon-broome","citation":{"authors":"Scientific Steering Committee on behalf of the Simon Broome Register Group","doi":"10.1136/bmj.303.6807.893","id":"simon-broome-1991","source":"BMJ. 1991;303(6807):893-896","title":"Risk of fatal coronary heart disease in familial hypercholesterolaemia","url":"https://doi.org/10.1136/bmj.303.6807.893"},"formula_expression":"definite FH iff (total cholesterol >7.5 mmol/L or LDL cholesterol >4.9 mmol/L) and tendon xanthomas in the patient or a relative (parent, child, grandparent, sibling, uncle, or aunt); adult 1991 register definition","purpose":"Apply the 1991 Simon Broome Register adult definite familial hypercholesterolaemia rule and return definite or not_definite from one lipid value plus a caller-assigned tendon-xanthoma flag.","markdown_url":"https://magentlab.com/docs/simon-broome.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"simon_broome"},{"name":"formula_expression","type":"string","description":"Published 1991 adult definite-register rule"},{"name":"lipid_mmol_l","type":"number","description":"The supplied lipid converted to mmol/L (mg/dL / 38.67 when a mg/dL key is used)"},{"name":"lipid_kind","type":"string","description":"total_cholesterol or ldl, matching the supplied lipid key"},{"name":"cholesterol_threshold_met","type":"boolean","description":"true when total cholesterol >7.5 mmol/L or LDL cholesterol >4.9 mmol/L. 7.5 and 4.9 do not meet."},{"name":"tendon_xanthoma_patient_or_relative","type":"boolean","description":"Echo of the caller-assigned xanthoma flag"},{"name":"classification","type":"string","description":"definite when the lipid threshold and xanthoma flag both hold; otherwise not_definite. Not a diagnosis."},{"name":"components","type":"array","description":"Rows for cholesterol_threshold and tendon_xanthoma with factor, met, and value on the lipid row"},{"name":"citation","type":"object","description":"Simon Broome Register BMJ 1991 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"tendon_xanthoma_patient_or_relative":"true","total_cholesterol_mmol_l":"8.0"},{"tendon_xanthoma_patient_or_relative":"true","total_cholesterol_mmol_l":"8.0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/simon-broome","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/simon-broome?total_cholesterol_mmol_l=8.0&tendon_xanthoma_patient_or_relative=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/simon-broome","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/medped","description":"Williams 1993 US MEDPED total cholesterol cutoffs by age and relative degree (first, second, third, or general population). Meets the published criterion iff total cholesterol in mg/dL is greater than the table cutoff (mmol/L converted as mg/dL = mmol/L * 38.67). Total cholesterol only; not Dutch Lipid Clinic or Simon Broome. Not a medical device and not a diagnosis of familial hypercholesterolemia.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (integer 1-120). Selects the Williams 1993 US MEDPED total cholesterol row: <20, 20-29, 30-39, or >=40.","required":true,"example":"50"},{"in":"query","name":"relative_degree","type":"string","description":"Relative degree as assigned by the caller: first, second, third, or general_population (Williams 1993). magent does not take a pedigree.","required":true,"example":"general_population"},{"in":"query","name":"total_cholesterol_mg_dl","type":"number","description":"Total cholesterol in mg/dL (50-800). Provide exactly one of total_cholesterol_mg_dl or total_cholesterol_mmol_l. Meets the published cutoff iff this value is greater than the age- and relative-degree-specific mg/dL cutoff. magent does not assay lipids.","required":false,"example":"200"},{"in":"query","name":"total_cholesterol_mmol_l","type":"number","description":"Total cholesterol in mmol/L (1.3-20). Converted as mg/dL = mmol/L * 38.67, then compared with the US MEDPED mg/dL cutoff. Provide exactly one lipid parameter.","required":false,"example":"10.0"}],"errors":[{"code":"invalid_medped_age","message":"age must be an integer from 1 to 120 (Williams 1993). Returned before settlement; you are not charged.","status":400},{"code":"invalid_medped_relation","message":"relative_degree must be first, second, third, or general_population (Williams 1993). Returned before settlement; you are not charged.","status":400},{"code":"invalid_medped_lipid","message":"provide exactly one of total_cholesterol_mg_dl (50-800) or total_cholesterol_mmol_l (1.3-20). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/medped","citation":{"authors":"Williams RR, Hunt SC, Schumacher MC, Hegele RA, Leppert MF, Ludwig EH, Hopkins PN","doi":"10.1016/0002-9149(93)90155-6","id":"williams-1993","pmid":"8328379","source":"Am J Cardiol. 1993;72(2):171-176","title":"Diagnosing heterozygous familial hypercholesterolemia using new practical criteria validated by molecular genetics","url":"https://doi.org/10.1016/0002-9149(93)90155-6"},"formula_expression":"meets_criteria iff total_cholesterol_mg_dl > cutoff_mg_dl (Williams 1993 US MEDPED total cholesterol); mmol/L converted as mg/dL = mmol/L * 38.67; age <20: first 220, second 230, third 240, general_population 270; 20-29: 240/250/260/290; 30-39: 270/280/290/340; >=40: 290/300/310/360","purpose":"Apply the Williams 1993 US MEDPED total cholesterol tables and return whether caller-supplied total cholesterol exceeds the cutoff for that age and relative degree. Not a diagnosis.","markdown_url":"https://magentlab.com/docs/medped.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"medped"},{"name":"formula_expression","type":"string","description":"Williams 1993 US MEDPED total cholesterol cutoffs"},{"name":"age","type":"integer","description":"Echo of the caller-assigned age in years"},{"name":"relative_degree","type":"string","description":"first, second, third, or general_population"},{"name":"total_cholesterol_mg_dl","type":"number","description":"Total cholesterol in mg/dL (converted when a mmol/L key is used)"},{"name":"cutoff_mg_dl","type":"integer","description":"Williams 1993 US MEDPED total cholesterol cutoff in mg/dL for that age and relative degree"},{"name":"meets_criteria","type":"boolean","description":"true iff total_cholesterol_mg_dl is greater than cutoff_mg_dl. Equality does not meet. Not a diagnosis."},{"name":"classification","type":"string","description":"meets_criteria when the cutoff is exceeded; otherwise below_cutoff. Not a diagnosis."},{"name":"criteria","type":"array","description":"Tree row for total_cholesterol_gt_cutoff with factor, met, value, and cutoff_mg_dl"},{"name":"citation","type":"object","description":"Williams 1993 Am J Cardiol citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"50","relative_degree":"general_population","total_cholesterol_mg_dl":"200"},{"age":"50","relative_degree":"general_population","total_cholesterol_mg_dl":"200"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/medped","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/medped?age=50&relative_degree=general_population&total_cholesterol_mg_dl=200","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/medped","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/dutch-fh","description":"Dutch Lipid Clinic Network (Nordestgaard 2013 Table 1) familial hypercholesterolaemia score. One LDL (mmol/L or mg/dL / 38.67) plus family, clinical, physical, and DNA groups; per group only the highest. Max 26. Definite >8, probable 6-8, possible 3-5, unlikely 0-2. Score 8 (mutation alone) is probable. Adult Table 1 only; not Simon Broome, not MEDPED, not homozygous FH. magent does not assay lipids, examine tendons or arcus, or sequence genes. Not a medical device and not a diagnosis of FH.","parameters":[{"in":"query","name":"ldl_mmol_l","type":"number","description":"LDL cholesterol in mmol/L (1-20). Nordestgaard 2013 Table 1 bands: >8.5 → 8, 6.5-8.4 → 5, 5.0-6.4 → 3, 4.0-4.9 → 1. Provide exactly one of ldl_mmol_l or ldl_mg_dl. magent does not assay lipids.","required":false,"example":"9.0"},{"in":"query","name":"ldl_mg_dl","type":"number","description":"LDL cholesterol in mg/dL (40-800). Converted to mmol/L as mg/dL / 38.67, then scored on the mmol/L bands. Provide exactly one lipid parameter.","required":false,"example":"348"},{"in":"query","name":"first_degree_premature_chd","type":"boolean","description":"First-degree relative with premature coronary heart disease (Nordestgaard 2013 Table 1 family history, 1 point). true or false as assigned by the caller. magent does not take a pedigree. Either this or first_degree_ldl_gt_95th scores 1 for the family group; a 2-point family item still yields family 2, not 3.","required":true,"example":"false"},{"in":"query","name":"first_degree_ldl_gt_95th","type":"boolean","description":"First-degree relative with LDL cholesterol above the 95th percentile (Nordestgaard 2013 Table 1 family history, 1 point). true or false as assigned by the caller. magent does not assay lipids or take a pedigree.","required":true,"example":"false"},{"in":"query","name":"first_degree_xanthoma_or_arcus","type":"boolean","description":"First-degree relative with tendon xanthoma and/or arcus cornealis (Nordestgaard 2013 Table 1 family history, 2 points). true or false as assigned by the caller. magent does not examine relatives. Either this or child_ldl_gt_95th scores 2 for the family group (max of family items).","required":true,"example":"false"},{"in":"query","name":"child_ldl_gt_95th","type":"boolean","description":"Child under 18 years with LDL cholesterol above the 95th percentile (Nordestgaard 2013 Table 1 family history, 2 points). true or false as assigned by the caller. magent does not assay lipids or take a pedigree.","required":true,"example":"false"},{"in":"query","name":"premature_chd","type":"boolean","description":"Premature coronary heart disease in the subject (Nordestgaard 2013 Table 1 clinical history, 2 points; men <55 years / women <60 years as assigned by the caller). true or false. magent does not diagnose CHD or compute age or sex. If premature_cerebral_or_pvd is also true, the clinical group is 2, not 3.","required":true,"example":"false"},{"in":"query","name":"premature_cerebral_or_pvd","type":"boolean","description":"Premature cerebral or peripheral vascular disease in the subject (Nordestgaard 2013 Table 1 clinical history, 1 point). true or false as assigned by the caller. magent does not diagnose vascular disease.","required":true,"example":"false"},{"in":"query","name":"tendon_xanthoma","type":"boolean","description":"Tendon xanthoma in the subject (Nordestgaard 2013 Table 1 physical examination, 6 points). true or false as assigned by the caller. magent does not examine tendons. If corneal_arcus_age_lt_45 is also true, the physical group is 6, not 10.","required":true,"example":"true"},{"in":"query","name":"corneal_arcus_age_lt_45","type":"boolean","description":"Arcus cornealis before age 45 years (Nordestgaard 2013 Table 1 physical examination, 4 points). true or false as assigned by the caller. magent does not examine the cornea or compute age.","required":true,"example":"false"},{"in":"query","name":"causative_mutation_ldlr_apob_pcsk9","type":"boolean","description":"Causative mutation in LDLR, APOB, or PCSK9 as assigned by the caller (Nordestgaard 2013 Table 1 DNA analysis, 8 points). true or false. magent does not sequence genes. Mutation alone is probable (score 8), not definite.","required":true,"example":"false"}],"errors":[{"code":"invalid_dutch_ldl","message":"provide exactly one of ldl_mmol_l (1-20) or ldl_mg_dl (40-800) (Nordestgaard 2013 DLCN). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/dutch-fh","citation":{"authors":"Nordestgaard BG, Chapman MJ, Humphries SE, et al.","doi":"10.1093/eurheartj/eht273","id":"nordestgaard-2013","pmid":"23956253","source":"Eur Heart J. 2013;34(45):3478-3490","title":"Familial hypercholesterolaemia is underdiagnosed and undertreated in the general population: guidance for clinicians to prevent coronary heart disease: consensus statement of the European Atherosclerosis Society","url":"https://doi.org/10.1093/eurheartj/eht273"},"formula_expression":"DLCN (Nordestgaard 2013 Table 1) = family + clinical + physical + ldl + dna (per group only the highest); family: first_degree_xanthoma_or_arcus or child_ldl_gt_95th -> 2 else first_degree_premature_chd or first_degree_ldl_gt_95th -> 1; clinical: premature_chd -> 2 else premature_cerebral_or_pvd -> 1; physical: tendon_xanthoma -> 6 else corneal_arcus_age_lt_45 -> 4; ldl mmol/L: >8.5 -> 8, 6.5-8.4 -> 5, 5.0-6.4 -> 3, 4.0-4.9 -> 1; dna causative_mutation_ldlr_apob_pcsk9 -> 8; max 26; definite >8, probable 6-8, possible 3-5, unlikely 0-2","purpose":"Apply the Nordestgaard 2013 Table 1 Dutch Lipid Clinic Network score from caller-supplied LDL cholesterol plus family, clinical, physical, and DNA flags, and return the 0–26 score and definite, probable, possible, or unlikely classification. Not a diagnosis.","markdown_url":"https://magentlab.com/docs/dutch-fh.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"dutch_fh"},{"name":"formula_expression","type":"string","description":"Nordestgaard 2013 Table 1 Dutch Lipid Clinic Network expression"},{"name":"score","type":"integer","description":"DLCN points 0-26"},{"name":"max_score","type":"integer","description":"Always 26"},{"name":"classification","type":"string","description":"definite when score >8; probable when 6, 7, or 8; possible when 3, 4, or 5; unlikely when 0, 1, or 2. Score 8 (including mutation alone) is probable, not definite. Not a diagnosis."},{"name":"ldl_mmol_l","type":"number","description":"The supplied LDL converted to mmol/L (mg/dL / 38.67 when ldl_mg_dl is used), rounded"},{"name":"ldl_points","type":"integer","description":"LDL group points: 8, 5, 3, 1, or 0"},{"name":"family_points","type":"integer","description":"Family-history group points: 2, 1, or 0 (max of family items)"},{"name":"clinical_points","type":"integer","description":"Clinical-history group points: 2, 1, or 0 (max of clinical items)"},{"name":"physical_points","type":"integer","description":"Physical-examination group points: 6, 4, or 0 (max of physical items)"},{"name":"dna_points","type":"integer","description":"DNA-analysis group points: 8 if a causative LDLR/APOB/PCSK9 mutation, else 0"},{"name":"components","type":"array","description":"Five group rows (family, clinical, physical, ldl, dna) with factor, present, points, and value on the ldl row"},{"name":"citation","type":"object","description":"Nordestgaard 2013 Eur Heart J EAS consensus citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"causative_mutation_ldlr_apob_pcsk9":"false","child_ldl_gt_95th":"false","corneal_arcus_age_lt_45":"false","first_degree_ldl_gt_95th":"false","first_degree_premature_chd":"false","first_degree_xanthoma_or_arcus":"false","ldl_mmol_l":"9.0","premature_cerebral_or_pvd":"false","premature_chd":"false","tendon_xanthoma":"true"},{"causative_mutation_ldlr_apob_pcsk9":"false","child_ldl_gt_95th":"false","corneal_arcus_age_lt_45":"false","first_degree_ldl_gt_95th":"false","first_degree_premature_chd":"false","first_degree_xanthoma_or_arcus":"false","ldl_mmol_l":"9.0","premature_cerebral_or_pvd":"false","premature_chd":"false","tendon_xanthoma":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/dutch-fh","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/dutch-fh?ldl_mmol_l=9.0&first_degree_premature_chd=false&first_degree_ldl_gt_95th=false&first_degree_xanthoma_or_arcus=false&child_ldl_gt_95th=false&premature_chd=false&premature_cerebral_or_pvd=false&tendon_xanthoma=true&corneal_arcus_age_lt_45=false&causative_mutation_ldlr_apob_pcsk9=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/dutch-fh","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/nafcs","description":"Hegele 2025 NAFCS. Table 3 points from age or early HTG onset, BMI, abdominal pain or pancreatitis, secondary factors, fasting TG >880 mg/dL or >10 mmol/L, TG/TC >8 (mg/dL) or >3.5 (mmol/L), and apo B <1.0 g/L, plus published interactions. Max 100. ≥60 definite classical FCS; ≥45 very likely. Not a diagnosis or genetic test. Not Simon Broome or Dutch FH. magent does not examine the patient or assay lipids. Not a medical device.","parameters":[{"in":"query","name":"age_years","type":"integer","description":"Current age in whole years (1-120). Hegele 2025 Table 3: ages 1-9 score child_htg 12; ages ≥10 score early_htg_onset 12 only when htg_onset_before_age_10 is true. The score does not provide a value for infants <1 year. magent does not examine the patient.","required":true,"example":"40"},{"in":"query","name":"htg_onset_before_age_10","type":"boolean","description":"Hypertriglyceridemia onset in infancy or childhood (before age 10) as assigned by the caller (Hegele 2025 Table 1). true or false. Scores 12 only when age_years ≥10. For ages 1-9, child_htg is scored from age and this flag does not add points. magent does not date onset.","required":true,"example":"false"},{"in":"query","name":"bmi_below_threshold","type":"boolean","description":"BMI <25.0 kg/m2 in adults or <85th percentile in children/adolescents as assigned by the caller (Hegele 2025 Table 3, 9 points). true or false. magent does not compute BMI or pediatric percentiles.","required":true,"example":"false"},{"in":"query","name":"abdominal_history","type":"string","enum":["none","abdominal_pain","pancreatitis"],"description":"Caller-assigned chylomicronemia-related abdominal history (Hegele 2025 Table 3): none (0), abdominal_pain = recurrent abdominal pain without pancreatitis (9), pancreatitis = history of pancreatitis with or without abdominal pain (16). magent does not diagnose pancreatitis.","required":true,"example":"none"},{"in":"query","name":"secondary_factors_present","type":"boolean","description":"One or more secondary factors that may contribute to hypertriglyceridemia as assigned by the caller (Hegele 2025 Table 1: lifestyle, medications, clinical conditions). true (≥1, 0 points) or false (none, 11 points, plus published interactions). magent does not take a history.","required":true,"example":"true"},{"in":"query","name":"tg_mg_dl","type":"number","description":"Caller-assigned fasting triglycerides in mg/dL (440-20000) representing all readings used in the score (Hegele 2025 Table 1: last 3 labs in adults, last 2 in children). All readings >880 score 13. Provide exactly one of tg_mg_dl or tg_mmol_l. magent does not assay lipids.","required":false,"example":"500"},{"in":"query","name":"tg_mmol_l","type":"number","description":"Caller-assigned fasting triglycerides in mmol/L (5-226). All readings >10 score 13. Provide exactly one of tg_mg_dl or tg_mmol_l. magent does not assay lipids.","required":false,"example":"8"},{"in":"query","name":"tg_tc_ratio_mg_dl","type":"number","description":"Triglyceride/total-cholesterol ratio when both are in mg/dL (0.1-80). >8 scores 8 (Hegele 2025 Table 1). Provide exactly one of tg_tc_ratio_mg_dl or tg_tc_ratio_mmol_l. magent does not assay lipids.","required":false,"example":"5"},{"in":"query","name":"tg_tc_ratio_mmol_l","type":"number","description":"Triglyceride/total-cholesterol ratio when both are in mmol/L (0.1-35). >3.5 scores 8. Provide exactly one of tg_tc_ratio_mg_dl or tg_tc_ratio_mmol_l. magent does not assay lipids.","required":false,"example":"2"},{"in":"query","name":"apo_b_g_l","type":"number","description":"Apolipoprotein B in g/L (0.1-3.0). <1.0 scores 12 (Hegele 2025 Table 3). Provide exactly one of apo_b_g_l or apo_b_mg_dl. 1.0 g/L = 100 mg/dL in the paper. magent does not assay apo B.","required":false,"example":"1.2"},{"in":"query","name":"apo_b_mg_dl","type":"number","description":"Apolipoprotein B in mg/dL (10-300). <100 scores 12. Provide exactly one of apo_b_g_l or apo_b_mg_dl. magent does not assay apo B.","required":false,"example":"120"}],"errors":[{"code":"invalid_nafcs","message":"NAFCS needs Hegele North American familial chylomicronemia inputs in published ranges. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/nafcs","citation":{"authors":"Hegele RA, Ahmad Z, Ashraf A, et al.","doi":"10.1016/j.jacl.2024.09.008","id":"hegele-2025","pmid":"39537503","source":"J Clin Lipidol. 2025;19(1):83-94","title":"Development and validation of clinical criteria to identify familial chylomicronemia syndrome (FCS) in North America","url":"https://doi.org/10.1016/j.jacl.2024.09.008"},"formula_expression":"NAFCS = early_htg_onset 12 (age_years ≥10 and htg_onset_before_age_10) + child_htg 12 (age_years 1-9) + all_tg_severely_elevated 13 (all fasting TG >880 mg/dL or >10 mmol/L) + high_tg_tc_ratio 8 (TG/TC >8 mg/dL or >3.5 mmol/L) + low_apo_b 12 (apo B <1.0 g/L or <100 mg/dL) + bmi_below_threshold 9 (BMI <25 kg/m2 or <85th percentile) + abdominal_pain 9 (recurrent abdominal pain without pancreatitis) + pancreatitis 16 + no_secondary_factors 11 + high_ratio_and_low_apo_b 7 + child_and_no_secondary 7 + high_ratio_and_no_secondary 5 (Hegele 2025 Table 3, parameter estimates ×10); max 100; ≥60 definite classical FCS; ≥45 very likely classical FCS","purpose":"Sum Hegele 2025 Table 3 NAFCS item points (age or early HTG onset, BMI, abdominal pain or pancreatitis, secondary factors, fasting TG, TG/TC ratio, apo B, and three published interactions) and return the 0–100 score plus ≥60 definite classical FCS and ≥45 very likely classical FCS flags. Not a diagnosis or genetic test.","markdown_url":"https://magentlab.com/docs/nafcs.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"nafcs"},{"name":"formula_expression","type":"string","description":"Hegele 2025 Table 3 NAFCS expression"},{"name":"score","type":"integer","description":"NAFCS points 0-100"},{"name":"max_score","type":"integer","description":"Always 100"},{"name":"age_years","type":"integer","description":"Parsed current age in whole years"},{"name":"all_tg_severely_elevated","type":"boolean","description":"true when all fasting TG readings are >880 mg/dL or >10 mmol/L"},{"name":"high_tg_tc_ratio","type":"boolean","description":"true when TG/TC is >8 (mg/dL) or >3.5 (mmol/L)"},{"name":"low_apo_b","type":"boolean","description":"true when apo B is <1.0 g/L or <100 mg/dL"},{"name":"definite_classical_fcs","type":"boolean","description":"true when score ≥60 (Hegele 2025 abstract: definite classical FCS). Not a diagnosis."},{"name":"very_likely_classical_fcs","type":"boolean","description":"true when score ≥45 (Hegele 2025 abstract: very likely classical FCS). Not a diagnosis."},{"name":"components","type":"array","description":"Hegele 2025 Table 3 rows including three interaction terms"},{"name":"citation","type":"object","description":"Hegele 2025 J Clin Lipidol NAFCS citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"abdominal_history":"none","age_years":"40","apo_b_g_l":"1.2","bmi_below_threshold":"false","htg_onset_before_age_10":"false","secondary_factors_present":"true","tg_mg_dl":"500","tg_tc_ratio_mg_dl":"5"},{"abdominal_history":"none","age_years":"40","apo_b_g_l":"1.2","bmi_below_threshold":"false","htg_onset_before_age_10":"false","secondary_factors_present":"true","tg_mg_dl":"500","tg_tc_ratio_mg_dl":"5"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/nafcs","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/nafcs?age_years=40&htg_onset_before_age_10=false&bmi_below_threshold=false&abdominal_history=none&secondary_factors_present=true&tg_mg_dl=500&tg_tc_ratio_mg_dl=5&apo_b_g_l=1.2","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/nafcs","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/framingham-chd","description":"Wilson 1998 Framingham 10-year CHD from sex-specific total-cholesterol point sheets: age 30-74, TC, HDL, JNC-V blood pressure, diabetes, and smoking. Deterministic published arithmetic with citation. Not a statin order, not ATP-III 2001, not pooled-cohort ASCVD. magent does not measure lipids or BP.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years. Wilson 1998 derivation was ages 30-74; magent accepts that published range only. Sex-specific 5-year point bands from Figs 3-4.","required":true,"example":30},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"female or male. Wilson 1998 published separate point sheets. No race coefficient.","required":true,"example":"male"},{"in":"query","name":"total_cholesterol_mg_dl","type":"number","description":"Total cholesterol in mg/dL (50-500, magent clamp). Wilson 1998 TC bands: <160, 160-199, 200-239, 240-279, >=280. Not the LDL-C sheet. magent does not assay lipids.","required":true,"example":180},{"in":"query","name":"hdl_mg_dl","type":"number","description":"HDL cholesterol in mg/dL (5-150, magent clamp). Wilson 1998 HDL bands: <35, 35-44, 45-49, 50-59, >=60. magent does not assay lipids.","required":true,"example":45},{"in":"query","name":"sbp_mm_hg","type":"number","description":"Systolic blood pressure in mm Hg (70-260, magent clamp). JNC-V categories with diastolic: when SBP and DBP stages differ, use the higher point value (Wilson 1998 Fig 3-4). magent does not measure blood pressure. Not ATP-III treated vs untreated SBP.","required":true,"example":110},{"in":"query","name":"dbp_mm_hg","type":"number","description":"Diastolic blood pressure in mm Hg (40-150, magent clamp). JNC-V: <80 optimal, 80-84 normal, 85-89 high-normal, 90-99 stage I, >=100 stage II-IV. magent does not measure blood pressure.","required":true,"example":70},{"in":"query","name":"diabetes","type":"boolean","description":"Diabetes as assigned by the caller (Wilson 1998 dichotomous). true is 2 points in men and 4 points in women. magent does not assay glucose.","required":true,"example":false},{"in":"query","name":"smoker","type":"boolean","description":"Current cigarette smoking as assigned by the caller (Wilson 1998 dichotomous). true is 2 points in both sexes. Former smoking is false. magent does not take a smoking history.","required":true,"example":false}],"errors":[{"code":"invalid_framingham_chd","message":"Framingham CHD inputs must match Wilson 1998 sex-specific age, lipids, blood pressure, diabetes, and smoking categories from that paper. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/framingham-chd","citation":{"authors":"Wilson PW, D'Agostino RB, Levy D, Belanger AM, Silbershatz H, Kannel WB","doi":"10.1161/01.CIR.97.18.1837","id":"wilson-1998","pmid":"9603539","source":"Circulation. 1998;97(18):1837-1847","title":"Prediction of coronary heart disease using risk factor categories","url":"https://doi.org/10.1161/01.CIR.97.18.1837"},"formula_expression":"Wilson 1998 TC point sheets (Figs 3-4): sex-specific age + total cholesterol + HDL + JNC-V BP (higher of SBP/DBP stage) + diabetes + smoker; men age 30-34 -1, 35-39 0, 40-44 1, 45-49 2, 50-54 3, 55-59 4, 60-64 5, 65-69 6, 70-74 7; men TC <160 -3, 160-199 0, 200-239 1, 240-279 2, >=280 3; men HDL <35 2, 35-44 1, 45-59 0, >=60 -2; men BP optimal/normal 0, high-normal 1, stage I 2, stage II-IV 3; men diabetes 2, smoker 2; women age 30-34 -9, 35-39 -4, 40-44 0, 45-49 3, 50-54 6, 55-59 7, 60-74 8; women TC <160 -2, 160-199 0, 200-239 1, 240-279 1, >=280 3; women HDL <35 5, 35-44 2, 45-49 1, 50-59 0, >=60 -3; women BP optimal -3, normal/high-normal 0, stage I 2, stage II-IV 3; women diabetes 4, smoker 2; 10-year CHD % from the published point-total lookup; age 30-74; no race; not ATP-III","purpose":"Sum Wilson 1998 sex-specific total-cholesterol point sheets (age, TC, HDL, JNC-V blood pressure, diabetes, smoking) and return the published 10-year CHD percent.","markdown_url":"https://magentlab.com/docs/framingham-chd.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"framingham_chd"},{"name":"formula_expression","type":"string","description":"Wilson 1998 Figs 3-4 TC point sheets"},{"name":"sex","type":"string","description":"female or male used"},{"name":"age_years","type":"integer","description":"Age in years used (30-74)"},{"name":"age_band","type":"string","description":"Wilson 1998 5-year age band"},{"name":"total_cholesterol_mg_dl","type":"number","description":"Input total cholesterol in mg/dL"},{"name":"cholesterol_band","type":"string","description":"Wilson 1998 TC band used for points"},{"name":"hdl_mg_dl","type":"number","description":"Input HDL cholesterol in mg/dL"},{"name":"hdl_band","type":"string","description":"Wilson 1998 HDL band used for points"},{"name":"sbp_mm_hg","type":"number","description":"Input systolic BP in mm Hg"},{"name":"dbp_mm_hg","type":"number","description":"Input diastolic BP in mm Hg"},{"name":"blood_pressure_category","type":"string","description":"JNC-V category after taking the higher of SBP and DBP stages"},{"name":"diabetes","type":"boolean","description":"Caller-assigned diabetes flag used"},{"name":"smoker","type":"boolean","description":"Caller-assigned current-smoker flag used"},{"name":"score","type":"integer","description":"Wilson 1998 TC-sheet point total"},{"name":"max_score","type":"integer","description":"19 in men, 25 in women (sum of each sheet's highest cell)"},{"name":"ten_year_chd_risk_percent","type":"integer","description":"Published 10-year CHD percent from the point-total lookup (Figs 3-4 Step 8). Men >=14 maps to 53; women >=17 maps to 27."},{"name":"ten_year_chd_risk_at_or_above","type":"boolean","description":"true when the sheet prints a >= bound (men >=14 or women >=17)"},{"name":"components","type":"array","description":"Per-factor Wilson 1998 points"},{"name":"citation","type":"object","description":"Wilson et al. Circulation 1998 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"30","dbp_mm_hg":"70","diabetes":"false","hdl_mg_dl":"45","sbp_mm_hg":"110","sex":"male","smoker":"false","total_cholesterol_mg_dl":"180"},{"age":"30","dbp_mm_hg":"70","diabetes":"false","hdl_mg_dl":"45","sbp_mm_hg":"110","sex":"male","smoker":"false","total_cholesterol_mg_dl":"180"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/framingham-chd","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/framingham-chd?age=30&sex=male&total_cholesterol_mg_dl=180&hdl_mg_dl=45&sbp_mm_hg=110&dbp_mm_hg=70&diabetes=false&smoker=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/framingham-chd","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/reynolds","description":"Ridker JAMA 2007 Reynolds Risk Score, women Model B only: 10-year CVD percent from age, SBP, hsCRP, total cholesterol, HDL-C, HbA1c if diabetic, current smoking, and parental MI before 60. Natural-log Box formula. Not men (Ridker 2008), not ATP-III, not 2013 PCE, not a diagnosis or statin order. magent does not assay lipids or hsCRP.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (integer 45-84). Ridker JAMA 2007 Model B was derived in women 45 years or older. magent accepts 45-84 only. Not men.","required":true,"example":55},{"in":"query","name":"sbp_mm_hg","type":"number","description":"Systolic blood pressure in mm Hg (50-250). Enters as ln(SBP). magent does not measure blood pressure.","required":true,"example":125},{"in":"query","name":"hscrp_mg_l","type":"number","description":"High-sensitivity C-reactive protein in mg/L (0.1-50). Enters as ln(hsCRP). magent does not assay hsCRP.","required":true,"example":2},{"in":"query","name":"total_cholesterol_mg_dl","type":"number","description":"Total cholesterol in mg/dL (50-800). Enters as ln(total cholesterol). magent does not assay lipids.","required":true,"example":200},{"in":"query","name":"hdl_mg_dl","type":"number","description":"HDL cholesterol in mg/dL (5-150). Enters as ln(HDL-C). magent does not assay lipids.","required":true,"example":50},{"in":"query","name":"diabetes","type":"boolean","description":"Diabetes as assigned by the caller. If true, a1c_percent (4-15) is required and adds 0.134*HbA1c(%). If false, omit a1c; the HbA1c term is not added. magent does not diagnose diabetes.","required":true,"example":false},{"in":"query","name":"a1c_percent","type":"number","description":"HbA1c in percent (4-15). Required when diabetes=true. Ignored when diabetes=false. magent does not assay HbA1c.","required":false,"example":7.5},{"in":"query","name":"smoker","type":"boolean","description":"Current cigarette smoking as assigned by the caller. true adds 0.818. magent does not take a smoking history.","required":true,"example":false},{"in":"query","name":"family_mi_before_60","type":"boolean","description":"Parental myocardial infarction before age 60 as assigned by the caller. true adds 0.438. magent does not take a family history.","required":true,"example":false}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_systolic_bp","message":"systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.","status":400},{"code":"invalid_crp","message":"crp_mg_l must be a number from 0 to 500. Returned before settlement; you are not charged.","status":400},{"code":"invalid_medped_lipid","message":"provide exactly one of total_cholesterol_mg_dl (50-800) or total_cholesterol_mmol_l (1.3-20). Returned before settlement; you are not charged.","status":400},{"code":"invalid_hdl","message":"hdl_mg_dl must be a number from 5 to 150, or hdl_mmol_l from 0.1 to 3.9, not both. Returned before settlement; you are not charged.","status":400},{"code":"invalid_a1c","message":"a1c_percent must be a number from 4 to 15 Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/reynolds","citation":{"authors":"Ridker PM, Buring JE, Rifai N, Cook NR","doi":"10.1001/jama.297.6.611","id":"ridker-2007","pmid":"17299196","source":"JAMA. 2007;297(6):611-619","title":"Development and validation of improved algorithms for the assessment of global cardiovascular risk in women: the Reynolds Risk Score","url":"https://doi.org/10.1001/jama.297.6.611"},"formula_expression":"10-year CVD risk (%) = [1 - 0.98634^(exp(B - 22.325))] * 100; B = 0.0799*age + 3.137*ln(SBP) + 0.180*ln(hsCRP) + 1.382*ln(total cholesterol) - 1.172*ln(HDL-C) + 0.134*HbA1c(%) [if diabetic] + 0.818 [if current smoker] + 0.438 [if family history of premature MI]; Ridker JAMA 2007 Model B women; natural log; cholesterol and HDL mg/dL; hsCRP mg/L; SBP mm Hg; not men; not ATP-III; not 2013 PCE","purpose":"Compute the Ridker JAMA 2007 Reynolds Risk Score 10-year CVD percent for women using clinically simplified Model B (age, SBP, hsCRP, total cholesterol, HDL-C, HbA1c if diabetic, current smoking, and parental MI before age 60).","markdown_url":"https://magentlab.com/docs/reynolds.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"reynolds"},{"name":"formula_expression","type":"string","description":"Ridker JAMA 2007 Model B women Box formula"},{"name":"age","type":"integer","description":"Age in years used (45-84)"},{"name":"sbp_mm_hg","type":"number","description":"Systolic BP used, mm Hg"},{"name":"hscrp_mg_l","type":"number","description":"hsCRP used, mg/L"},{"name":"total_cholesterol_mg_dl","type":"number","description":"Total cholesterol used, mg/dL"},{"name":"hdl_mg_dl","type":"number","description":"HDL-C used, mg/dL"},{"name":"diabetes","type":"boolean","description":"Caller-assigned diabetes used"},{"name":"a1c_percent","type":"number","description":"HbA1c used when diabetes is true. Omitted when diabetes is false."},{"name":"smoker","type":"boolean","description":"Caller-assigned current smoking used"},{"name":"family_mi_before_60","type":"boolean","description":"Caller-assigned parental MI before age 60 used"},{"name":"b","type":"number","description":"Model B linear predictor B, 4 decimals"},{"name":"risk_percent","type":"number","description":"10-year CVD risk percent, 1 decimal"},{"name":"citation","type":"object","description":"Ridker et al. JAMA 2007 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"55","diabetes":"false","family_mi_before_60":"false","hdl_mg_dl":"50","hscrp_mg_l":"2","sbp_mm_hg":"125","smoker":"false","total_cholesterol_mg_dl":"200"},{"age":"55","diabetes":"false","family_mi_before_60":"false","hdl_mg_dl":"50","hscrp_mg_l":"2","sbp_mm_hg":"125","smoker":"false","total_cholesterol_mg_dl":"200"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/reynolds","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/reynolds?age=55&sbp_mm_hg=125&hscrp_mg_l=2&total_cholesterol_mg_dl=200&hdl_mg_dl=50&diabetes=false&smoker=false&family_mi_before_60=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/reynolds","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/score2","description":"ESC 2021 SCORE2 10-year fatal plus non-fatal CVD percent for age 40-69 from sex, current smoking, systolic BP, non-HDL cholesterol, and European geographic risk region (low, moderate, high, very_high). Published sex-specific coefficients and region scale1/scale2. Not SCORE2-OP, not SCORE2-Diabetes, not 2013 PCE, not Reynolds, not a diagnosis or statin order. magent does not assay lipids.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (integer 40-69). SCORE2 2021 is for ages 40-69. Not SCORE2-OP (age 70 or older).","required":true,"example":50},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"Sex used by the sex-specific SCORE2 2021 coefficients (female or male).","required":true,"example":"male"},{"in":"query","name":"smoker","type":"boolean","description":"Current cigarette smoking as assigned by the caller (true or false). magent does not take a smoking history.","required":true,"example":true},{"in":"query","name":"sbp_mm_hg","type":"number","description":"Systolic blood pressure in mm Hg (50-250). Enters as (SBP-120)/20. magent does not measure blood pressure.","required":true,"example":140},{"in":"query","name":"non_hdl_mmol_l","type":"number","description":"Non-HDL cholesterol in mmol/L (1-12). SCORE2 charts display non-HDL. The published equation uses TC and HDL at the paper HDL centering 1.3 mmol/L (TC = non-HDL + 1.3). The printed 50-year-old example is TC 5.5 and HDL 1.3 (non-HDL 4.2). magent does not assay lipids.","required":true,"example":4.2},{"in":"query","name":"european_risk_region","type":"string","enum":["low","moderate","high","very_high"],"description":"Geographic SCORE2 2021 calibration region (low, moderate, high, or very_high) as printed in that paper. Not race. Not ethnicity.","required":true,"example":"low"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_systolic_bp","message":"systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.","status":400},{"code":"invalid_score2_region","message":"european_risk_region must be low, moderate, high, or very_high as printed in SCORE2 2021 (geographic calibration, not race). Returned before settlement; you are not charged.","status":400},{"code":"invalid_score2","message":"SCORE2 2021 inputs must match that paper's age 40-69, sex, smoking, systolic BP, non-HDL cholesterol, and European risk region. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/score2","citation":{"authors":"SCORE2 working group and ESC Cardiovascular risk collaboration","doi":"10.1093/eurheartj/ehab309","id":"score2-2021","pmid":"34120177","source":"Eur Heart J. 2021;42(25):2439-2454","title":"SCORE2 risk prediction algorithms: new models to estimate 10-year risk of cardiovascular disease in Europe","url":"https://doi.org/10.1093/eurheartj/ehab309"},"formula_expression":"10-year fatal+non-fatal CVD % = 100*(1-exp(-exp(scale1+scale2*ln(-ln(1-uncal))))); uncal=1-S0^exp(lp); cage=(age-60)/5; csbp=(SBP-120)/20; charts display non-HDL mmol/L; equation uses TC and HDL at paper HDL centering 1.3 so TC=non-HDL+1.3, ctchol=(TC-6)/1, chdl=0; diabetes terms omitted (not SCORE2-Diabetes); men S0=0.9605 lp=0.3742*cage+0.6012*smoke+0.2777*csbp+0.1458*ctchol-0.2698*chdl-0.0755*cage*smoke-0.0255*cage*csbp-0.0281*cage*ctchol+0.0426*cage*chdl; women S0=0.9776 lp=0.4648*cage+0.7744*smoke+0.3131*csbp+0.1002*ctchol-0.2606*chdl-0.1088*cage*smoke-0.0277*cage*csbp-0.0226*cage*ctchol+0.0613*cage*chdl; region (scale1,scale2) men low (-0.5699,0.7476) moderate (-0.1565,0.8009) high (0.3207,0.9360) very_high (0.5836,0.8294); women low (-0.7380,0.7019) moderate (-0.3143,0.7701) high (0.5710,0.9369) very_high (0.9412,0.8329); SCORE2 2021 four-decimal coefficients (updated supplement Table 1); age 40-69; geographic region not race; not SCORE2-OP; not 2013 PCE","purpose":"Compute the ESC 2021 SCORE2 10-year fatal plus non-fatal CVD percent for adults aged 40-69 from sex, current smoking, systolic blood pressure, non-HDL cholesterol, and European geographic risk region.","markdown_url":"https://magentlab.com/docs/score2.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"score2"},{"name":"formula_expression","type":"string","description":"SCORE2 2021 sex-specific coefficients and region scale1/scale2"},{"name":"age","type":"integer","description":"Age in years used (40-69)"},{"name":"sex","type":"string","description":"female or male used"},{"name":"smoker","type":"boolean","description":"Caller-assigned current smoking used"},{"name":"sbp_mm_hg","type":"number","description":"Systolic BP used, mm Hg"},{"name":"non_hdl_mmol_l","type":"number","description":"Non-HDL cholesterol used, mmol/L"},{"name":"total_cholesterol_mmol_l","type":"number","description":"TC used as non-HDL + 1.3 mmol/L (paper HDL centering)"},{"name":"hdl_mmol_l","type":"number","description":"HDL used, always 1.3 mmol/L (paper centering / printed example)"},{"name":"european_risk_region","type":"string","description":"Geographic calibration region used"},{"name":"linear_predictor","type":"number","description":"Sex-specific linear predictor lp, 4 decimals"},{"name":"risk_10y_percent","type":"number","description":"Calibrated 10-year fatal+non-fatal CVD risk percent, 1 decimal"},{"name":"citation","type":"object","description":"SCORE2 working group Eur Heart J 2021 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"50","european_risk_region":"low","non_hdl_mmol_l":"4.2","sbp_mm_hg":"140","sex":"male","smoker":"true"},{"age":"50","european_risk_region":"low","non_hdl_mmol_l":"4.2","sbp_mm_hg":"140","sex":"male","smoker":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/score2","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/score2?age=50&sex=male&smoker=true&sbp_mm_hg=140&non_hdl_mmol_l=4.2&european_risk_region=low","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/score2","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/score2-op","description":"ESC 2021 SCORE2-OP 10-year fatal plus non-fatal CVD percent for age 70-89 from sex, current smoking, diabetes, systolic BP, non-HDL cholesterol, and European geographic risk region (low, moderate, high, very_high). Published sex-specific Table 2 coefficients and region scale1/scale2. Not SCORE2, not SCORE2-Diabetes, not 2013 PCE, not PREVENT, not a diagnosis or statin order. magent does not assay lipids.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (integer 70-89). SCORE2-OP 2021 is for ages 70-89. Not SCORE2 (age 40-69).","required":true,"example":75},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"Sex used by the sex-specific SCORE2-OP 2021 Table 2 coefficients (female or male).","required":true,"example":"male"},{"in":"query","name":"smoker","type":"boolean","description":"Current cigarette smoking as assigned by the caller (true or false). magent does not take a smoking history.","required":true,"example":true},{"in":"query","name":"diabetes","type":"boolean","description":"History of diabetes as assigned by the caller (true or false). SCORE2-OP includes diabetes. Not SCORE2-Diabetes (no HbA1c, age at diagnosis, or eGFR).","required":true,"example":false},{"in":"query","name":"sbp_mm_hg","type":"number","description":"Systolic blood pressure in mm Hg (50-250). Enters as (SBP-150)/10. magent does not measure blood pressure.","required":true,"example":150},{"in":"query","name":"non_hdl_mmol_l","type":"number","description":"Non-HDL cholesterol in mmol/L (1-12). SCORE2-OP charts display non-HDL. The published equation uses TC and HDL at the paper HDL centering 1.4 mmol/L (TC = non-HDL + 1.4). The printed 75-year-old example is non-HDL 4.5 mmol/L. magent does not assay lipids.","required":true,"example":4.5},{"in":"query","name":"european_risk_region","type":"string","enum":["low","moderate","high","very_high"],"description":"Geographic SCORE2-OP 2021 calibration region (low, moderate, high, or very_high) as printed in that paper. Not race. Not ethnicity.","required":true,"example":"low"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_systolic_bp","message":"systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.","status":400},{"code":"invalid_score2_region","message":"european_risk_region must be low, moderate, high, or very_high as printed in SCORE2 2021 (geographic calibration, not race). Returned before settlement; you are not charged.","status":400},{"code":"invalid_score2_op","message":"SCORE2-OP 2021 inputs must match that paper's age 70-89, sex, smoking, diabetes, systolic BP, non-HDL cholesterol, and European risk region. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/score2-op","citation":{"authors":"SCORE2-OP working group and ESC Cardiovascular risk collaboration","doi":"10.1093/eurheartj/ehab312","id":"score2-op-2021","pmid":"34120185","source":"Eur Heart J. 2021;42(25):2455-2467","title":"SCORE2-OP risk prediction algorithms: estimating incident cardiovascular event risk in older persons in four geographical risk regions","url":"https://doi.org/10.1093/eurheartj/ehab312"},"formula_expression":"10-year fatal+non-fatal CVD % = 100*(1-exp(-exp(scale1+scale2*ln(-ln(1-uncal))))); uncal=1-S0^exp(lp); cage=age-73; csbp=(SBP-150)/10; charts display non-HDL mmol/L; equation uses TC and HDL at paper HDL centering 1.4 so TC=non-HDL+1.4, ctc=TC-6, chdl=0; diabetes is included (not SCORE2-Diabetes); men S0=0.7576 lp=0.063*cage+0.425*diabetes-0.017*cage*diabetes+0.352*smoke-0.025*cage*smoke+0.094*csbp-0.005*cage*csbp+0.085*ctc+0.007*cage*ctc-0.356*chdl+0.009*cage*chdl; women S0=0.8082 lp=0.079*cage+0.601*diabetes-0.011*cage*diabetes+0.492*smoke-0.026*cage*smoke+0.102*csbp-0.004*cage*csbp+0.060*ctc-0.001*cage*ctc-0.304*chdl+0.015*cage*chdl; region (scale1,scale2) men low (-0.3400,1.1900) moderate (0.0100,1.2500) high (0.0800,1.1500) very_high (0.0500,0.7000); women low (-0.5200,1.0100) moderate (-0.1000,1.1000) high (0.3800,1.0900) very_high (0.3800,0.6900); SCORE2-OP 2021 Table 2 coefficients and supplement four-decimal scale1/scale2 and baseline survival; age 70-89; geographic region not race; not SCORE2; not SCORE2-Diabetes; not 2013 PCE; not PREVENT","purpose":"Compute the ESC 2021 SCORE2-OP 10-year fatal plus non-fatal CVD percent for adults aged 70-89 from sex, current smoking, diabetes, systolic blood pressure, non-HDL cholesterol, and European geographic risk region.","markdown_url":"https://magentlab.com/docs/score2-op.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"score2_op"},{"name":"formula_expression","type":"string","description":"SCORE2-OP 2021 sex-specific Table 2 coefficients and region scale1/scale2"},{"name":"age","type":"integer","description":"Age in years used (70-89)"},{"name":"sex","type":"string","description":"female or male used"},{"name":"smoker","type":"boolean","description":"Caller-assigned current smoking used"},{"name":"diabetes","type":"boolean","description":"Caller-assigned diabetes history used"},{"name":"sbp_mm_hg","type":"number","description":"Systolic BP used, mm Hg"},{"name":"non_hdl_mmol_l","type":"number","description":"Non-HDL cholesterol used, mmol/L"},{"name":"total_cholesterol_mmol_l","type":"number","description":"TC used as non-HDL + 1.4 mmol/L (paper HDL centering)"},{"name":"hdl_mmol_l","type":"number","description":"HDL used, always 1.4 mmol/L (paper centering)"},{"name":"european_risk_region","type":"string","description":"Geographic calibration region used"},{"name":"linear_predictor","type":"number","description":"Sex-specific linear predictor lp, 4 decimals"},{"name":"risk_10y_percent","type":"number","description":"Calibrated 10-year fatal+non-fatal CVD risk percent, 1 decimal"},{"name":"citation","type":"object","description":"SCORE2-OP working group Eur Heart J 2021 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"75","diabetes":"false","european_risk_region":"low","non_hdl_mmol_l":"4.5","sbp_mm_hg":"150","sex":"male","smoker":"true"},{"age":"75","diabetes":"false","european_risk_region":"low","non_hdl_mmol_l":"4.5","sbp_mm_hg":"150","sex":"male","smoker":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/score2-op","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/score2-op?age=75&sex=male&smoker=true&diabetes=false&sbp_mm_hg=150&non_hdl_mmol_l=4.5&european_risk_region=low","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/score2-op","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/score2-diabetes","description":"ESC 2023 SCORE2-Diabetes 10-year fatal plus non-fatal CVD percent for type 2 diabetes, age 40-79, from sex, smoking, systolic BP, total and HDL cholesterol, age at diagnosis, IFCC HbA1c, eGFR, and European geographic risk region. Not SCORE2, not SCORE2-OP, not a diagnosis or statin order. magent does not assay lipids, HbA1c, or eGFR.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (integer 40-79). SCORE2-Diabetes 2023 is for ages 40-79. Not SCORE2 (40-69 without diabetes labs). Not SCORE2-OP.","required":true,"example":60},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"Sex used by the sex-specific SCORE2-Diabetes 2023 coefficients (female or male).","required":true,"example":"male"},{"in":"query","name":"smoker","type":"boolean","description":"Current cigarette smoking as assigned by the caller (true or false). magent does not take a smoking history.","required":true,"example":false},{"in":"query","name":"sbp_mm_hg","type":"number","description":"Systolic blood pressure in mm Hg (50-250). Enters as (SBP-120)/20. magent does not measure blood pressure.","required":true,"example":140},{"in":"query","name":"total_cholesterol_mmol_l","type":"number","description":"Total cholesterol in mmol/L (1.5-15). Enters as (TC-6). magent does not assay lipids.","required":true,"example":5.5},{"in":"query","name":"hdl_mmol_l","type":"number","description":"HDL cholesterol in mmol/L (0.4-4). Enters as (HDL-1.3)/0.5. magent does not assay lipids.","required":true,"example":1.3},{"in":"query","name":"age_at_diabetes_diagnosis","type":"integer","description":"Age at type 2 diabetes diagnosis in years (integer 1-79, not after current age). Enters as (age_at_dx-50)/5. Patient is assumed to have type 2 diabetes.","required":true,"example":60},{"in":"query","name":"hba1c_mmol_mol","type":"number","description":"HbA1c in IFCC mmol/mol (20-195), not % DCCT. Enters as (HbA1c-31)/9.34. magent does not assay HbA1c.","required":true,"example":50},{"in":"query","name":"egfr_ml_min_1_73m2","type":"number","description":"Caller-assigned eGFR in mL/min/1.73 m² (5-200). Enters as (ln(eGFR)-4.5)/0.15 plus the squared term. magent does not compute CKD-EPI.","required":true,"example":90},{"in":"query","name":"european_risk_region","type":"string","enum":["low","moderate","high","very_high"],"description":"Geographic SCORE2/SCORE2-OP calibration region (low, moderate, high, or very_high) as printed for SCORE2-Diabetes. Not race. Not ethnicity.","required":true,"example":"moderate"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_systolic_bp","message":"systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.","status":400},{"code":"invalid_score2_region","message":"european_risk_region must be low, moderate, high, or very_high as printed in SCORE2 2021 (geographic calibration, not race). Returned before settlement; you are not charged.","status":400},{"code":"invalid_hba1c_mmol_mol","message":"hba1c_mmol_mol must be a number in the range used by SCORE2-Diabetes 2023 (IFCC mmol/mol, not % DCCT). Returned before settlement; you are not charged.","status":400},{"code":"invalid_egfr","message":"egfr_ml_min_1_73m2 must be a number from 5 to 200 (caller-assigned eGFR; magent does not compute MDRD or CKD-EPI). Returned before settlement; you are not charged.","status":400},{"code":"invalid_score2_diabetes","message":"SCORE2-Diabetes 2023 inputs must match that paper's age, sex, smoking, systolic BP, total and HDL cholesterol, age at diabetes diagnosis, HbA1c, eGFR, and European risk region. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/score2-diabetes","citation":{"authors":"SCORE2-Diabetes working group and ESC Cardiovascular risk collaboration","doi":"10.1093/eurheartj/ehad260","id":"score2-diabetes-2023","pmid":"37247330","source":"Eur Heart J. 2023;44(28):2544-2556","title":"SCORE2-Diabetes: 10-year cardiovascular risk estimation in type 2 diabetes in Europe","url":"https://doi.org/10.1093/eurheartj/ehad260"},"formula_expression":"10-year fatal+non-fatal CVD % = 100*(1-exp(-exp(scale1+scale2*ln(-ln(1-uncal))))); uncal=1-S0^exp(lp); cage=(age-60)/5; csbp=(SBP-120)/20; ctc=(TC-6)/1; chdl=(HDL-1.3)/0.5; cdiabage=(age_at_dx-50)/5; chba1c=(HbA1c_mmol_mol-31)/9.34; cegfr=(ln(eGFR)-4.5)/0.15; diabetes=1; men S0=0.9605 lp=0.5368*cage+0.4774*smoke+0.1322*csbp+0.6457*diabetes+0.1102*ctc-0.1087*chdl-0.0672*cage*smoke-0.0268*cage*csbp-0.0983*cage*diabetes-0.0181*cage*ctc+0.0095*cage*chdl-0.0998*diabetes*cdiabage+0.0955*chba1c-0.0591*cegfr+0.0058*cegfr^2-0.0134*cage*chba1c+0.0115*cage*cegfr; women S0=0.9776 lp=0.6624*cage+0.6139*smoke+0.1421*csbp+0.8096*diabetes+0.1127*ctc-0.1568*chdl-0.1122*cage*smoke-0.0167*cage*csbp-0.1272*cage*diabetes-0.0200*cage*ctc+0.0186*cage*chdl-0.118*diabetes*cdiabage+0.1173*chba1c-0.0640*cegfr+0.0062*cegfr^2-0.0196*cage*chba1c+0.0169*cage*cegfr; region scale1/scale2 SCORE2 age<70 and SCORE2-OP age 70-79; age 40-79; type 2 diabetes only; geographic region not race; not SCORE2; not SCORE2-OP","purpose":"Compute the ESC 2023 SCORE2-Diabetes 10-year fatal plus non-fatal CVD percent for adults aged 40-79 with type 2 diabetes from sex, current smoking, systolic blood pressure, total and HDL cholesterol, age at diabetes diagnosis, IFCC HbA1c, eGFR, and European geographic risk region.","markdown_url":"https://magentlab.com/docs/score2-diabetes.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"score2_diabetes"},{"name":"formula_expression","type":"string","description":"SCORE2-Diabetes 2023 sex-specific coefficients and region scale1/scale2"},{"name":"age","type":"integer","description":"Age in years used (40-79)"},{"name":"sex","type":"string","description":"female or male used"},{"name":"smoker","type":"boolean","description":"Caller-assigned current smoking used"},{"name":"sbp_mm_hg","type":"number","description":"Systolic BP used, mm Hg"},{"name":"total_cholesterol_mmol_l","type":"number","description":"Total cholesterol used, mmol/L"},{"name":"hdl_mmol_l","type":"number","description":"HDL cholesterol used, mmol/L"},{"name":"age_at_diabetes_diagnosis","type":"integer","description":"Age at type 2 diabetes diagnosis used"},{"name":"hba1c_mmol_mol","type":"number","description":"HbA1c used, IFCC mmol/mol"},{"name":"egfr_ml_min_1_73m2","type":"number","description":"Caller-assigned eGFR used, mL/min/1.73 m²"},{"name":"european_risk_region","type":"string","description":"Geographic calibration region used"},{"name":"linear_predictor","type":"number","description":"Sex-specific linear predictor lp, 4 decimals"},{"name":"risk_10y_percent","type":"number","description":"Calibrated 10-year fatal+non-fatal CVD risk percent, 1 decimal"},{"name":"citation","type":"object","description":"SCORE2-Diabetes working group Eur Heart J 2023 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"60","age_at_diabetes_diagnosis":"60","egfr_ml_min_1_73m2":"90","european_risk_region":"moderate","hba1c_mmol_mol":"50","hdl_mmol_l":"1.3","sbp_mm_hg":"140","sex":"male","smoker":"false","total_cholesterol_mmol_l":"5.5"},{"age":"60","age_at_diabetes_diagnosis":"60","egfr_ml_min_1_73m2":"90","european_risk_region":"moderate","hba1c_mmol_mol":"50","hdl_mmol_l":"1.3","sbp_mm_hg":"140","sex":"male","smoker":"false","total_cholesterol_mmol_l":"5.5"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/score2-diabetes","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/score2-diabetes?age=60&sex=male&smoker=false&sbp_mm_hg=140&total_cholesterol_mmol_l=5.5&hdl_mmol_l=1.3&age_at_diabetes_diagnosis=60&hba1c_mmol_mol=50&egfr_ml_min_1_73m2=90&european_risk_region=moderate","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/score2-diabetes","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/prevent","description":"Khan 2024 AHA PREVENT base 10-year total CVD percent (ASCVD plus heart failure) for age 30-79 from sex, lipids, treated systolic BP, diabetes, smoking, eGFR, BMI, antihypertensive, and statin. Sex-specific, race-free Table S12 coefficients. Not 30-year, not ASCVD-only, not HF-only, not 2013 PCE, not SCORE2, not a diagnosis or statin order. magent does not assay lipids.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (integer 30-79). Khan 2024 PREVENT base 10-year total CVD is for ages 30-79. Not 30-year PREVENT (that horizon is not returned).","required":true,"example":50},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"Sex used by the sex-specific Table S12 base 10-year total-CVD coefficients (female or male). Not race. PREVENT is race-free.","required":true,"example":"female"},{"in":"query","name":"total_cholesterol_mg_dl","type":"number","description":"Total cholesterol in mg/dL (50-800). Converted as mg/dL*0.02586 to mmol/L. Enters as non-HDL (TC-HDL) centered at 3.5 mmol/L. magent does not assay lipids.","required":true,"example":240},{"in":"query","name":"hdl_mg_dl","type":"number","description":"HDL cholesterol in mg/dL (5-150). Converted as mg/dL*0.02586 to mmol/L. Enters as (HDL-1.3)/0.3. magent does not assay lipids.","required":true,"example":55},{"in":"query","name":"sbp_mm_hg","type":"number","description":"Systolic blood pressure in mm Hg (50-250). Piecewise around 110 mm Hg, with a treated-SBP interaction when antihypertensive is true. magent does not measure blood pressure.","required":true,"example":160},{"in":"query","name":"antihypertensive","type":"boolean","description":"Current antihypertensive treatment as assigned by the caller (true or false). Adds the Table S12 antihypertensive term and the treated SBP interaction.","required":true,"example":true},{"in":"query","name":"statin","type":"boolean","description":"Current statin use as assigned by the caller (true or false). Adds the Table S12 statin term and the statin × non-HDL interaction.","required":true,"example":false},{"in":"query","name":"diabetes","type":"boolean","description":"Diabetes as assigned by the caller (true or false). Adds the Table S12 diabetes term and the age × diabetes interaction. Not the optional HbA1c add-on equation.","required":true,"example":false},{"in":"query","name":"smoker","type":"boolean","description":"Current cigarette smoking as assigned by the caller (true or false). magent does not take a smoking history.","required":true,"example":false},{"in":"query","name":"egfr_ml_min_1_73m2","type":"number","description":"Caller-assigned eGFR in mL/min/1.73m2 (5-200). Piecewise around 60. magent does not compute MDRD or CKD-EPI.","required":true,"example":90},{"in":"query","name":"bmi_kg_m2","type":"number","description":"Body-mass index in kg/m2 (10-80). Required Khan 2024 predictor. Table S12 base 10-year total-CVD BMI coefficients are 0 (BMI enters the HF-only equations, which this tool does not return).","required":true,"example":35}],"errors":[{"code":"invalid_prevent","message":"AHA PREVENT 2024 10-year CVD inputs must match that paper's age, sex, lipids, treated systolic BP, diabetes, smoking, BMI, eGFR, antihypertensive, and statin flags. Returned before settlement; you are not charged.","status":400},{"code":"invalid_bmi_kg_m2","message":"bmi_kg_m2 must be a number from 10 to 80. Returned before settlement; you are not charged.","status":400},{"code":"invalid_egfr","message":"egfr_ml_min_1_73m2 must be a number from 5 to 200 (caller-assigned eGFR; magent does not compute MDRD or CKD-EPI). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/prevent","citation":{"authors":"Khan SS, Matsushita K, Sang Y, Ballew SH, Grams ME, Surapaneni A, et al.; Chronic Kidney Disease Prognosis Consortium and the AHA Cardiovascular-Kidney-Metabolic Science Advisory Group","doi":"10.1161/CIRCULATIONAHA.123.067626","id":"khan-2024-prevent","pmid":"37947085","source":"Circulation. 2024;149(6):430-449","title":"Development and Validation of the American Heart Association’s PREVENT Equations","url":"https://doi.org/10.1161/CIRCULATIONAHA.123.067626"},"formula_expression":"10-year total CVD % = 100*exp(lp)/(1+exp(lp)); Khan 2024 Supplement Table S12 base 10-year total CVD (ASCVD+HF) only; sex-specific race-free; age 30-79; cage=(age-55)/10; mg/dL*0.02586 to mmol/L; cnhdl=(TC-HDL)*0.02586-3.5; chdl=(HDL*0.02586-1.3)/0.3; sbp_lt110=(min(SBP,110)-110)/20; sbp_ge110=(max(SBP,110)-130)/20; egfr_lt60=(min(eGFR,60)-60)/-15; egfr_ge60=(max(eGFR,60)-90)/-15; BMI spline printed at 30 with S12 total-CVD betas 0; women lp=-3.307728+0.7939329*cage+0.0305239*cnhdl-0.1606857*chdl-0.2394003*sbp_lt110+0.3600781*sbp_ge110+0.8667604*dm+0.5360739*smoke+0.6045917*egfr_lt60+0.0433769*egfr_ge60+0.3151672*antihtn-0.1477655*statin-0.0663612*sbp_ge110*antihtn+0.1197879*cnhdl*statin-0.0819715*cage*cnhdl+0.0306769*cage*chdl-0.0946348*cage*sbp_ge110-0.27057*cage*dm-0.078715*cage*smoke-0.1637806*cage*egfr_lt60; men lp=-3.031168+0.7688528*cage+0.0736174*cnhdl-0.0954431*chdl-0.4347345*sbp_lt110+0.3362658*sbp_ge110+0.7692857*dm+0.4386871*smoke+0.5378979*egfr_lt60+0.0164827*egfr_ge60+0.288879*antihtn-0.1337349*statin-0.0475924*sbp_ge110*antihtn+0.150273*cnhdl*statin-0.0517874*cage*cnhdl+0.0191169*cage*chdl-0.1049477*cage*sbp_ge110-0.2251948*cage*dm-0.0895067*cage*smoke-0.1543702*cage*egfr_lt60; not 30-year; not ASCVD-only; not HF-only; not HbA1c/UACR/SDI add-ons; not 2013 PCE; not SCORE2","purpose":"Compute the Khan 2024 PREVENT base 10-year total CVD percent (ASCVD plus heart failure) for adults aged 30-79 from sex-specific, race-free Table S12 coefficients.","markdown_url":"https://magentlab.com/docs/prevent.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"prevent"},{"name":"formula_expression","type":"string","description":"Khan 2024 Table S12 sex-specific base 10-year total-CVD logistic"},{"name":"age","type":"integer","description":"Age in years used (30-79)"},{"name":"sex","type":"string","description":"female or male used"},{"name":"total_cholesterol_mg_dl","type":"number","description":"Total cholesterol used, mg/dL"},{"name":"hdl_mg_dl","type":"number","description":"HDL-C used, mg/dL"},{"name":"sbp_mm_hg","type":"number","description":"Systolic BP used, mm Hg"},{"name":"antihypertensive","type":"boolean","description":"Caller-assigned antihypertensive treatment used"},{"name":"statin","type":"boolean","description":"Caller-assigned statin use used"},{"name":"diabetes","type":"boolean","description":"Caller-assigned diabetes used"},{"name":"smoker","type":"boolean","description":"Caller-assigned current smoking used"},{"name":"egfr_ml_min_1_73m2","type":"number","description":"Caller-assigned eGFR used, mL/min/1.73m2"},{"name":"bmi_kg_m2","type":"number","description":"BMI used, kg/m2"},{"name":"linear_predictor","type":"number","description":"Sex-specific Table S12 linear predictor lp, 4 decimals"},{"name":"ten_year_cvd_percent","type":"number","description":"10-year total CVD (ASCVD+HF) percent, 1 decimal"},{"name":"citation","type":"object","description":"Khan et al. Circulation 2024 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"50","antihypertensive":"true","bmi_kg_m2":"35","diabetes":"false","egfr_ml_min_1_73m2":"90","hdl_mg_dl":"55","sbp_mm_hg":"160","sex":"female","smoker":"false","statin":"false","total_cholesterol_mg_dl":"240"},{"age":"50","antihypertensive":"true","bmi_kg_m2":"35","diabetes":"false","egfr_ml_min_1_73m2":"90","hdl_mg_dl":"55","sbp_mm_hg":"160","sex":"female","smoker":"false","statin":"false","total_cholesterol_mg_dl":"240"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/prevent","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/prevent?age=50&sex=female&total_cholesterol_mg_dl=240&hdl_mg_dl=55&sbp_mm_hg=160&antihypertensive=true&statin=false&diabetes=false&smoker=false&egfr_ml_min_1_73m2=90&bmi_kg_m2=35","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/prevent","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/ascvd-pce","description":"Goff 2013 ACC/AHA pooled-cohort 10-year hard ASCVD percent for age 40-79 from sex, caller-assigned white or african_american cohort, total and HDL cholesterol, treated or untreated systolic BP, smoking, and diabetes. Table A coefficients. Caller assigns cohort; magent does not assign race and does not apply Recommendation 2 as a silent swap. Not PREVENT 2024, not Framingham CHD, not SCORE2, not a diagnosis or statin order. magent does not assay lipids.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (integer 40-79). Goff 2013 Table A 10-year hard ASCVD is for ages 40-79. magent does not take a date of birth.","required":true,"example":55},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"Sex used by the sex-specific Table A coefficients (female or male). Not cohort.","required":true,"example":"female"},{"in":"query","name":"cohort","type":"string","enum":["white","african_american"],"description":"Caller-assigned cohort as used in Goff 2013 Table A: white or african_american (paper terms). Not param race. magent does not assign race or ethnicity. Recommendation 2 (use the White equations for other groups) is not applied as a silent swap; other strings are rejected.","required":true,"example":"white"},{"in":"query","name":"total_cholesterol_mg_dl","type":"number","description":"Total cholesterol in mg/dL (50-800). Enters as ln(total cholesterol). magent does not assay lipids.","required":true,"example":213},{"in":"query","name":"hdl_mg_dl","type":"number","description":"HDL cholesterol in mg/dL (5-150). Enters as ln(HDL-C). magent does not assay lipids.","required":true,"example":50},{"in":"query","name":"sbp_mm_hg","type":"number","description":"Systolic blood pressure in mm Hg (50-250). Enters as ln(SBP) with the treated or untreated Table A coefficient according to antihypertensive. magent does not measure blood pressure.","required":true,"example":120},{"in":"query","name":"antihypertensive","type":"boolean","description":"Current antihypertensive treatment as assigned by the caller (true or false). true uses the Table A treated-SBP coefficient (and age × treated SBP when that cell is not N/A). false uses untreated SBP. Not both.","required":true,"example":false},{"in":"query","name":"smoker","type":"boolean","description":"Current cigarette smoking as assigned by the caller (true or false). Adds the Table A smoker term and ln(age) × smoker when that cell is not N/A. magent does not take a smoking history.","required":true,"example":false},{"in":"query","name":"diabetes","type":"boolean","description":"Diabetes as assigned by the caller (true or false). Adds the Table A diabetes term. magent does not assay glucose.","required":true,"example":false}],"errors":[{"code":"invalid_ascvd_pce","message":"2013 PCE inputs must match Goff 2013 age 40-79, sex, white or african_american cohort, lipids, treated or untreated SBP, smoking, and diabetes. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/ascvd-pce","citation":{"authors":"Goff DC Jr, Lloyd-Jones DM, Bennett G, Coady S, D'Agostino RB, Gibbons R, Greenland P, Lackland DT, Levy D, O'Donnell CJ, Robinson JG, Schwartz JS, Shero ST, Smith SC Jr, Sorlie P, Stone NJ, Wilson PW","doi":"10.1161/01.cir.0000437741.48606.98","id":"goff-2013-pce","pmid":"24222018","source":"Circulation. 2014;129(25 Suppl 2):S49-S73","title":"2013 ACC/AHA Guideline on the Assessment of Cardiovascular Risk: A Report of the American College of Cardiology/American Heart Association Task Force on Practice Guidelines","url":"https://doi.org/10.1161/01.cir.0000437741.48606.98"},"formula_expression":"10-year hard ASCVD % = 100*(1-S10**exp(individualSum-meanSum)); Goff 2013 Table A; Ln=natural log; age 40-79; cohort white|african_american (caller-assigned paper terms; not param race; Recommendation 2 is not a silent swap); treated vs untreated SBP (not both); interactions only where Table A is not N/A; WHITE WOMEN: ln_age -29.799, ln_age^2 4.884, ln_tc 13.540, ln_age*ln_tc -3.114, ln_hdl -13.578, ln_age*ln_hdl 3.149, ln_treated_sbp 2.019, ln_untreated_sbp 1.957, smoker 7.574, ln_age*smoker -1.665, diabetes 0.661, meanSum -29.18, S10 0.9665; AFRICAN AMERICAN WOMEN: ln_age 17.114, ln_tc 0.940, ln_hdl -18.920, ln_age*ln_hdl 4.475, ln_treated_sbp 29.291, ln_age*ln_treated_sbp -6.432, ln_untreated_sbp 27.820, ln_age*ln_untreated_sbp -6.087, smoker 0.691, diabetes 0.874, meanSum 86.61, S10 0.9533; WHITE MEN: ln_age 12.344, ln_tc 11.853, ln_age*ln_tc -2.664, ln_hdl -7.990, ln_age*ln_hdl 1.769, ln_treated_sbp 1.797, ln_untreated_sbp 1.764, smoker 7.837, ln_age*smoker -1.795, diabetes 0.658, meanSum 61.18, S10 0.9144; AFRICAN AMERICAN MEN: ln_age 2.469, ln_tc 0.302, ln_hdl -0.307, ln_treated_sbp 1.916, ln_untreated_sbp 1.809, smoker 0.549, diabetes 0.645, meanSum 19.54, S10 0.8954; round 1 decimal; not PREVENT 2024; not Framingham CHD; not SCORE2; not a statin order","purpose":"Compute the Goff 2013 pooled-cohort 10-year hard ASCVD percent (first hard CHD or stroke) for adults aged 40-79 from Table A sex- and cohort-specific coefficients.","markdown_url":"https://magentlab.com/docs/ascvd-pce.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"ascvd_pce"},{"name":"formula_expression","type":"string","description":"Goff 2013 Table A sex- and cohort-specific 10-year hard ASCVD"},{"name":"age","type":"integer","description":"Age in years used (40-79)"},{"name":"sex","type":"string","description":"female or male used"},{"name":"cohort","type":"string","description":"Caller-assigned white or african_american used"},{"name":"total_cholesterol_mg_dl","type":"number","description":"Total cholesterol used, mg/dL"},{"name":"hdl_mg_dl","type":"number","description":"HDL-C used, mg/dL"},{"name":"sbp_mm_hg","type":"number","description":"Systolic BP used, mm Hg"},{"name":"antihypertensive","type":"boolean","description":"Caller-assigned antihypertensive treatment used"},{"name":"smoker","type":"boolean","description":"Caller-assigned current smoking used"},{"name":"diabetes","type":"boolean","description":"Caller-assigned diabetes used"},{"name":"individual_sum","type":"number","description":"Table A Coefficient×Value individual sum, 4 decimals"},{"name":"ten_year_ascvd_percent","type":"number","description":"10-year hard ASCVD percent, 1 decimal"},{"name":"citation","type":"object","description":"Goff et al. Circulation 2014 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"55","antihypertensive":"false","cohort":"white","diabetes":"false","hdl_mg_dl":"50","sbp_mm_hg":"120","sex":"female","smoker":"false","total_cholesterol_mg_dl":"213"},{"age":"55","antihypertensive":"false","cohort":"white","diabetes":"false","hdl_mg_dl":"50","sbp_mm_hg":"120","sex":"female","smoker":"false","total_cholesterol_mg_dl":"213"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/ascvd-pce","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/ascvd-pce?age=55&sex=female&cohort=white&total_cholesterol_mg_dl=213&hdl_mg_dl=50&sbp_mm_hg=120&antihypertensive=false&smoker=false&diabetes=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/ascvd-pce","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/ascvd-vhr","description":"AHA/ACC 2018 Table 4 very high-risk ASCVD for known clinical ASCVD. Very high-risk if ≥2 major events (recent ACS, prior MI, ischemic stroke, symptomatic PAD) or 1 major event and ≥2 high-risk conditions (age ≥65, heterozygous FH, CABG/PCI outside those events, diabetes, hypertension, CKD eGFR 15-59, current smoking, LDL-C ≥100 on max statin and ezetimibe, congestive HF). Not PCE. Not a statin, ezetimibe, or PCSK9 order. magent does not diagnose ASCVD or measure ABI or LDL-C.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). ≥65 is an AHA/ACC 2018 Table 4 high-risk condition. magent does not assign age.","required":true,"example":70},{"in":"query","name":"recent_acs","type":"boolean","description":"Recent ACS within the past 12 months as assigned by the caller (AHA/ACC 2018 Table 4 major ASCVD event). true or false. magent does not date ACS.","required":true,"example":false},{"in":"query","name":"history_mi","type":"boolean","description":"History of MI other than a caller-assigned recent ACS as assigned by the caller (AHA/ACC 2018 Table 4 major ASCVD event). true or false. magent does not diagnose MI.","required":true,"example":true},{"in":"query","name":"ischemic_stroke","type":"boolean","description":"History of ischemic stroke as assigned by the caller (AHA/ACC 2018 Table 4 major ASCVD event). true or false. magent does not diagnose stroke.","required":true,"example":false},{"in":"query","name":"symptomatic_pad","type":"boolean","description":"Symptomatic PAD as assigned by the caller from the Table 4 row (claudication with ABI <0.85, or previous revascularization or amputation). true or false. magent does not measure ABI.","required":true,"example":false},{"in":"query","name":"heterozygous_fh","type":"boolean","description":"Heterozygous familial hypercholesterolemia as assigned by the caller (AHA/ACC 2018 Table 4 high-risk condition). true or false. magent does not diagnose FH.","required":true,"example":false},{"in":"query","name":"prior_cabg_or_pci_outside_major","type":"boolean","description":"Prior CABG or PCI outside the major ASCVD event(s) as assigned by the caller (AHA/ACC 2018 Table 4 high-risk condition). true or false. magent does not read an operative note.","required":true,"example":false},{"in":"query","name":"diabetes","type":"boolean","description":"Diabetes mellitus as assigned by the caller (AHA/ACC 2018 Table 4 high-risk condition). true or false. magent does not diagnose diabetes.","required":true,"example":true},{"in":"query","name":"hypertension","type":"boolean","description":"Hypertension as assigned by the caller (AHA/ACC 2018 Table 4 high-risk condition). true or false. magent does not measure blood pressure.","required":true,"example":false},{"in":"query","name":"ckd_egfr_15_to_59","type":"boolean","description":"CKD with eGFR 15–59 mL/min/1.73 m² as assigned by the caller (AHA/ACC 2018 Table 4 printed band). true or false. magent does not compute eGFR.","required":true,"example":false},{"in":"query","name":"current_smoking","type":"boolean","description":"Current smoking as assigned by the caller (AHA/ACC 2018 Table 4 high-risk condition). true or false. magent does not assign smoking status.","required":true,"example":false},{"in":"query","name":"ldl_c_ge_100_on_max_statin_ezetimibe","type":"boolean","description":"Persistently elevated LDL-C ≥100 mg/dL (≥2.6 mmol/L) despite maximally tolerated statin and ezetimibe as assigned by the caller (AHA/ACC 2018 Table 4 high-risk condition). true or false. magent does not assay LDL-C.","required":true,"example":false},{"in":"query","name":"congestive_hf","type":"boolean","description":"History of congestive HF as assigned by the caller (AHA/ACC 2018 Table 4 high-risk condition). true or false. magent does not diagnose HF.","required":true,"example":false}],"errors":[{"code":"invalid_ascvd_vhr","message":"Very high-risk ASCVD inputs must match AHA/ACC 2018 major ASCVD events and high-risk conditions. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/ascvd-vhr","citation":{"authors":"Grundy SM, Stone NJ, Bailey AL, et al.","doi":"10.1161/CIR.0000000000000625","id":"grundy-2018-aha-acc-cholesterol","pmid":"30586774","source":"Circulation. 2019;139(25):e1082-e1143","title":"2018 AHA/ACC/AACVPR/AAPA/ABC/ACPM/ADA/AGS/APhA/ASPC/NLA/PCNA Guideline on the Management of Blood Cholesterol","url":"https://doi.org/10.1161/CIR.0000000000000625"},"formula_expression":"very_high_risk iff major_event_count ≥ 2 or (major_event_count = 1 and high_risk_condition_count ≥ 2) (AHA/ACC 2018 Table 4 / Figure 1). Major events (caller-assigned): recent ACS within 12 months; history of MI other than that recent ACS; history of ischemic stroke; symptomatic PAD (claudication with ABI <0.85, or prior revascularization or amputation). High-risk conditions: age ≥65 years; heterozygous familial hypercholesterolemia; prior CABG or PCI outside the major ASCVD event(s); diabetes mellitus; hypertension; CKD (eGFR 15–59 mL/min/1.73 m²); current smoking; persistently elevated LDL-C ≥100 mg/dL (≥2.6 mmol/L) despite maximally tolerated statin and ezetimibe; history of congestive HF. Not PCE 10-year risk. Not a statin, ezetimibe, or PCSK9 order. magent does not diagnose ASCVD or measure ABI or LDL-C","purpose":"Apply AHA/ACC 2018 Table 4 and return whether known clinical ASCVD is very high-risk from caller-assigned major events and high-risk conditions.","markdown_url":"https://magentlab.com/docs/ascvd-vhr.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"ascvd_vhr"},{"name":"formula_expression","type":"string","description":"AHA/ACC 2018 Table 4 very high-risk classifier"},{"name":"age","type":"integer","description":"Age in years used for the ≥65 condition"},{"name":"very_high_risk","type":"boolean","description":"true iff ≥2 major events or exactly 1 major event and ≥2 high-risk conditions. Not a treatment order."},{"name":"major_event_count","type":"integer","description":"Count of the four Table 4 major ASCVD events that are true"},{"name":"high_risk_condition_count","type":"integer","description":"Count of Table 4 high-risk conditions, including age ≥65 when met. Still reported when ≥2 majors already classify."},{"name":"classifying_rule","type":"string","description":"two_or_more_major_events, one_major_and_multiple_high_risk_conditions, or not_very_high_risk"},{"name":"criteria","type":"array","description":"Per-factor rows for the four major events, age_ge_65 (with age value), and eight high-risk flags"},{"name":"citation","type":"object","description":"Grundy 2018 Circulation citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"70","ckd_egfr_15_to_59":"false","congestive_hf":"false","current_smoking":"false","diabetes":"true","heterozygous_fh":"false","history_mi":"true","hypertension":"false","ischemic_stroke":"false","ldl_c_ge_100_on_max_statin_ezetimibe":"false","prior_cabg_or_pci_outside_major":"false","recent_acs":"false","symptomatic_pad":"false"},{"age":"70","ckd_egfr_15_to_59":"false","congestive_hf":"false","current_smoking":"false","diabetes":"true","heterozygous_fh":"false","history_mi":"true","hypertension":"false","ischemic_stroke":"false","ldl_c_ge_100_on_max_statin_ezetimibe":"false","prior_cabg_or_pci_outside_major":"false","recent_acs":"false","symptomatic_pad":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/ascvd-vhr","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/ascvd-vhr?age=70&recent_acs=false&history_mi=true&ischemic_stroke=false&symptomatic_pad=false&heterozygous_fh=false&prior_cabg_or_pci_outside_major=false&diabetes=true&hypertension=false&ckd_egfr_15_to_59=false&current_smoking=false&ldl_c_ge_100_on_max_statin_ezetimibe=false&congestive_hf=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/ascvd-vhr","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/qtc","description":"Heart-rate-corrected QT (Bazett or Fridericia). formula is required; magent does not pick one silently. Deterministic published correction with citation.","parameters":[{"in":"query","name":"qt_ms","type":"number","description":"Measured QT interval in milliseconds (200-800).","required":true,"example":"400"},{"in":"query","name":"heart_rate_bpm","type":"integer","description":"Heart rate in beats per minute (30-220). RR_s = 60 / HR.","required":true,"example":"80"},{"in":"query","name":"formula","type":"string","enum":["bazett","fridericia"],"description":"Correction formula. Required; magent does not pick one silently.","required":true,"example":"bazett"}],"errors":[{"code":"invalid_qt","message":"qt_ms must be a number from 200 to 800 Returned before settlement; you are not charged.","status":400},{"code":"invalid_heart_rate","message":"heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.","status":400},{"code":"invalid_formula","message":"formula must be bazett or fridericia Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/qtc","citation":{"authors":"Bazett HC","doi":null,"id":"bazett-1920","source":"Heart. 1920;7:353-370","title":"An analysis of the time-relations of electrocardiograms","url":"https://pubmed.ncbi.nlm.nih.gov/18610463/"},"formula_expression":"QTc_ms = QT_ms / sqrt(RR_s)","purpose":"Compute heart-rate-corrected QT using Bazett or Fridericia. The formula argument is required.","markdown_url":"https://magentlab.com/docs/qtc.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"bazett or fridericia"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"qt_ms","type":"number","description":"Input QT in ms"},{"name":"heart_rate_bpm","type":"integer","description":"Input heart rate"},{"name":"rr_s","type":"number","description":"RR interval in seconds (60/HR)"},{"name":"qtc_ms","type":"number","description":"Corrected QT in ms, 1 decimal"},{"name":"citation","type":"object","description":"Bazett 1920 or Fridericia 1920"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"formula":"bazett","heart_rate_bpm":"80","qt_ms":"400"},{"formula":"bazett","heart_rate_bpm":"80","qt_ms":"400"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/qtc","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/qtc?qt_ms=400&heart_rate_bpm=80&formula=bazett","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/qtc","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/tisdale","description":"Tisdale 2013 QT prolongation risk score (Table 5): age ≥68 (1), female (1), loop diuretic (1), potassium ≤3.5 mmol/L (2), admission QTc ≥450 ms (2), acute MI (2), sepsis (3), heart failure (3), one QTc-prolonging drug (3) plus ≥2 drugs (3 stacked; max 21). Returns bands 0-6 / 7-10 / ≥11. Deterministic published arithmetic with citation; not a medical device, not a drug-stop protocol, and not a TdP diagnosis.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Age ≥68 scores 1 (Tisdale 2013 Table 5). 67 does not score.","required":true,"example":"60"},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"female scores 1; male scores 0 (Tisdale 2013 Table 5).","required":true,"example":"male"},{"in":"query","name":"loop_diuretic","type":"boolean","description":"Loop diuretic (Tisdale 2013 Table 5). true or false. Scores 1 if true.","required":true,"example":"false"},{"in":"query","name":"potassium_mmol_l","type":"number","description":"Serum potassium in mmol/L (1.5-8.0). ≤3.5 scores 2 (Tisdale 2013 Table 5). 3.5 scores; 3.51 does not.","required":true,"example":"4.0"},{"in":"query","name":"admission_qtc_ms","type":"number","description":"Admission QTc in milliseconds (200-800). ≥450 scores 2 (Tisdale 2013 Table 5). 450 scores.","required":true,"example":"400"},{"in":"query","name":"acute_mi","type":"boolean","description":"Acute myocardial infarction (Tisdale 2013 Table 5). true or false. Scores 2 if true.","required":true,"example":"false"},{"in":"query","name":"sepsis","type":"boolean","description":"Sepsis (Tisdale 2013 Table 5). true or false. Scores 3 if true.","required":true,"example":"false"},{"in":"query","name":"heart_failure","type":"boolean","description":"Left ventricular dysfunction / heart failure (Tisdale 2013 Table 5). true or false. Scores 3 if true.","required":true,"example":"false"},{"in":"query","name":"qtc_prolonging_drugs","type":"integer","description":"Count of QTc-prolonging drugs (integer 0-20). 0 → 0 points; 1 → 3 points; ≥2 → 6 points (Table 5 one-drug and ≥2-drug rows stack).","required":true,"example":"0"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_potassium","message":"potassium_mmol_l must be a number from 1.5 to 8.0. Returned before settlement; you are not charged.","status":400},{"code":"invalid_admission_qtc","message":"admission_qtc_ms must be a number from 200 to 800 (Tisdale 2013). Returned before settlement; you are not charged.","status":400},{"code":"invalid_qtc_drug_count","message":"qtc_prolonging_drugs must be an integer from 0 to 20 (Tisdale 2013). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/tisdale","citation":{"authors":"Tisdale JE, Jaynes HA, Kingery JR, et al.","doi":"10.1161/CIRCOUTCOMES.113.000152","id":"tisdale-2013","pmid":"23716032","source":"Circ Cardiovasc Qual Outcomes. 2013;6(4):479-487","title":"Development and validation of a risk score to predict QT interval prolongation in hospitalized patients","url":"https://doi.org/10.1161/CIRCOUTCOMES.113.000152"},"formula_expression":"Tisdale = age≥68 1 + female 1 + loop_diuretic 1 + potassium≤3.5 2 + admission_QTc≥450 2 + acute_MI 2 + sepsis 3 + heart_failure 3 + one_QTc_prolonging_drug 3 + ≥2_QTc_prolonging_drugs 3; Table 5; max 21; bands 0-6 / 7-10 / ≥11","purpose":"Sum Tisdale 2013 Table 5 points for in-hospital QT prolongation risk and return the published 0-6 / 7-10 / ≥11 band.","markdown_url":"https://magentlab.com/docs/tisdale.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"tisdale"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Tisdale 2013 Table 5 points 0-21"},{"name":"max_score","type":"integer","description":"21"},{"name":"tisdale_band","type":"string","description":"Validation band: 0-6 (low, score <7), 7-10 (moderate), or >=11 (high). Score 11 is high. Not a percent."},{"name":"age_years","type":"integer","description":"Age used for the ≥68 point"},{"name":"sex","type":"string","description":"female or male"},{"name":"potassium_mmol_l","type":"number","description":"Serum potassium in mmol/L"},{"name":"admission_qtc_ms","type":"number","description":"Admission QTc in ms"},{"name":"qtc_prolonging_drugs","type":"integer","description":"Caller-assigned QTc-prolonging drug count 0-20"},{"name":"components","type":"array","description":"Per-factor points (Table 5 rows, including stacked drug rows)"},{"name":"citation","type":"object","description":"Tisdale et al. Circ Cardiovasc Qual Outcomes 2013 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"acute_mi":"false","admission_qtc_ms":"400","age":"60","heart_failure":"false","loop_diuretic":"false","potassium_mmol_l":"4.0","qtc_prolonging_drugs":"0","sepsis":"false","sex":"male"},{"acute_mi":"false","admission_qtc_ms":"400","age":"60","heart_failure":"false","loop_diuretic":"false","potassium_mmol_l":"4.0","qtc_prolonging_drugs":"0","sepsis":"false","sex":"male"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/tisdale","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/tisdale?age=60&sex=male&loop_diuretic=false&potassium_mmol_l=4.0&admission_qtc_ms=400&acute_mi=false&sepsis=false&heart_failure=false&qtc_prolonging_drugs=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/tisdale","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/brugada","description":"Brugada 1991 four-step algorithm for a regular tachycardia with a wide QRS complex. Caller assigns absence of an RS complex in all precordial leads, RS interval >100 ms in one precordial lead, AV dissociation, and VT morphology in V1–V2 and V6. Returns diagnosis vt or svt and the stopping step. magent does not interpret ECGs. Not Brugada syndrome, not Vereckei aVR, not RWPT, not Sgarbossa, and not a cardioversion order. Not a medical device.","parameters":[{"in":"query","name":"no_rs_precordial","type":"boolean","description":"Step 1: absence of an RS complex in all precordial leads (Brugada 1991). true or false as assigned by the caller. true diagnoses VT and stops the tree. magent does not interpret ECGs.","required":true,"example":"false"},{"in":"query","name":"rs_interval_gt_100","type":"boolean","description":"Step 2: RS interval >100 ms in one precordial lead (Brugada 1991). true or false as assigned by the caller. Evaluated only when step 1 is false. magent does not measure the tracing.","required":true,"example":"false"},{"in":"query","name":"av_dissociation","type":"boolean","description":"Step 3: atrioventricular dissociation (Brugada 1991). true or false as assigned by the caller. Evaluated only when steps 1 and 2 are false. magent does not interpret ECGs.","required":true,"example":"false"},{"in":"query","name":"morphology_vt","type":"boolean","description":"Step 4: both V1–V2 and V6 morphology criteria for VT as in Brugada 1991. true or false as assigned by the caller. Evaluated only when steps 1–3 are false. magent does not interpret ECGs.","required":true,"example":"false"}],"errors":[{"code":"invalid_brugada","message":"each Brugada 1991 step must be true or false. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/brugada","citation":{"authors":"Brugada P, Brugada J, Mont L, Smeets J, Andries EW","doi":"10.1161/01.CIR.83.5.1649","id":"brugada-1991","pmid":"2022022","source":"Circulation. 1991;83(5):1649-1659","title":"A new approach to the differential diagnosis of a regular tachycardia with a wide QRS complex","url":"https://doi.org/10.1161/01.CIR.83.5.1649"},"formula_expression":"VT iff no_rs_precordial or else rs_interval_gt_100 or else av_dissociation or else morphology_vt (Brugada 1991; stop at first true); else SVT","purpose":"Apply the Brugada 1991 four-step algorithm for regular wide-QRS tachycardia and return diagnosis vt or svt plus the step that stopped the tree.","markdown_url":"https://magentlab.com/docs/brugada.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"brugada"},{"name":"formula_expression","type":"string","description":"Brugada 1991 four-step sequential tree"},{"name":"diagnosis","type":"string","description":"vt if any step is the first true finding; otherwise svt. Not a diagnosis of Brugada syndrome."},{"name":"stopped_at","type":"string","description":"First positive step: no_rs_precordial, rs_interval_gt_100, av_dissociation, or morphology_vt; none when all four are false"},{"name":"no_rs_precordial","type":"boolean","description":"Echo of the caller-assigned step 1 flag"},{"name":"rs_interval_gt_100","type":"boolean","description":"Echo of the caller-assigned step 2 flag"},{"name":"av_dissociation","type":"boolean","description":"Echo of the caller-assigned step 3 flag"},{"name":"morphology_vt","type":"boolean","description":"Echo of the caller-assigned step 4 flag"},{"name":"criteria","type":"array","description":"Per-step rows with factor and met; met echoes that caller-assigned flag"},{"name":"citation","type":"object","description":"Brugada et al. Circulation 1991 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"av_dissociation":"false","morphology_vt":"false","no_rs_precordial":"false","rs_interval_gt_100":"false"},{"av_dissociation":"false","morphology_vt":"false","no_rs_precordial":"false","rs_interval_gt_100":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/brugada","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/brugada?no_rs_precordial=false&rs_interval_gt_100=false&av_dissociation=false&morphology_vt=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/brugada","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/shanghai","description":"Antzelevitch 2016 Shanghai Score System (Table 2) for Brugada syndrome. Caller assigns ECG (spontaneous type 1 3.5, fever type 1 3, drug-converted type 2/3 2; required; highest only), clinical history (0–3), family history (0–2), and pathogenic BrS-gene mutation (0.5). Bands: probable_definite ≥3.5, possible 2–3. magent does not read tracings. Not a diagnosis or ICD indication. Not the ERS Table 5 score.","parameters":[{"in":"query","name":"ecg_pattern","type":"string","enum":["spontaneous_type1","fever_type1","drug_converted_type2_3"],"description":"Highest Table 2 ECG finding as assigned by the caller (Antzelevitch 2016). spontaneous_type1 scores 3.5; fever_type1 scores 3; drug_converted_type2_3 scores 2. At least one ECG finding is required. Award once (highest item only). magent does not read tracings.","required":true,"example":"spontaneous_type1"},{"in":"query","name":"clinical","type":"string","enum":["vf_arrest","nocturnal_agonal","arrhythmic_syncope","unclear_syncope","af_under_30","none"],"description":"Highest Table 2 clinical-history item as assigned by the caller (Antzelevitch 2016). vf_arrest 3; nocturnal_agonal 2; arrhythmic_syncope 2; unclear_syncope 1; af_under_30 0.5; none 0. Optional; omitted defaults to none. Award once (highest item only). magent does not take a history.","required":false,"example":"none"},{"in":"query","name":"family","type":"string","enum":["relative_definite_brs","suspicious_scd","unexplained_scd_under_45","none"],"description":"Highest Table 2 family-history item as assigned by the caller (Antzelevitch 2016). relative_definite_brs 2; suspicious_scd 1; unexplained_scd_under_45 0.5; none 0. Optional; omitted defaults to none. Award once (highest item only). magent does not take a pedigree.","required":false,"example":"none"},{"in":"query","name":"pathogenic_mutation","type":"boolean","description":"Probable pathogenic mutation in a BrS susceptibility gene (Antzelevitch 2016 Table 2 IV). true scores 0.5; false scores 0. magent does not interpret sequencing.","required":true,"example":"false"}],"errors":[{"code":"invalid_shanghai_ecg","message":"ecg_pattern must be spontaneous_type1, fever_type1, or drug_converted_type2_3 (Antzelevitch 2016 Shanghai BrS Table 2; at least one ECG finding is required). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/shanghai","citation":{"authors":"Antzelevitch C, Yan GX, Ackerman MJ, Borggrefe M, Corrado D, Guo J, et al.","doi":"10.1016/j.hrthm.2016.05.024","id":"antzelevitch-2016","pmid":"27423412","source":"Heart Rhythm. 2016;13(10):e295-e324","title":"J-Wave syndromes expert consensus conference report: Emerging concepts and gaps in knowledge","url":"https://doi.org/10.1016/j.hrthm.2016.05.024"},"formula_expression":"Shanghai Table 2 (Antzelevitch 2016): ECG required, highest only (spontaneous_type1 3.5, fever_type1 3, drug_converted_type2_3 2) + clinical highest only (vf_arrest 3, nocturnal_agonal 2, arrhythmic_syncope 2, unclear_syncope 1, af_under_30 0.5, none 0) + family highest only (relative_definite_brs 2, suspicious_scd 1, unexplained_scd_under_45 0.5, none 0) + pathogenic_mutation 0.5; max 9; probable_definite ≥3.5, possible 2–3, nondiagnostic <2. Not ERS Table 5","purpose":"Sum Antzelevitch 2016 Table 2 Shanghai Score System points from a caller-assigned ECG finding plus optional clinical, family, and pathogenic-mutation items, and return probable_definite, possible, or nondiagnostic.","markdown_url":"https://magentlab.com/docs/shanghai.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"shanghai"},{"name":"formula_expression","type":"string","description":"Antzelevitch 2016 Table 2 Shanghai Score System expression"},{"name":"score","type":"number","description":"Shanghai Table 2 point total (ECG floor 2; max 9)"},{"name":"max_score","type":"integer","description":"9"},{"name":"shanghai_band","type":"string","description":"probable_definite when score ≥3.5; possible when 2–3; nondiagnostic when <2 (unreachable while an ECG finding is required). Not a diagnosis or ICD indication."},{"name":"ecg_pattern","type":"string","description":"Echo of the caller-assigned ECG token"},{"name":"clinical","type":"string","description":"Echo of the caller-assigned clinical token (none when omitted)"},{"name":"family","type":"string","description":"Echo of the caller-assigned family token (none when omitted)"},{"name":"pathogenic_mutation","type":"boolean","description":"Echo of the caller-assigned pathogenic-mutation flag"},{"name":"components","type":"array","description":"Per-category Table 2 points"},{"name":"citation","type":"object","description":"Antzelevitch et al. Heart Rhythm 2016 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"clinical":"none","ecg_pattern":"spontaneous_type1","family":"none","pathogenic_mutation":"false"},{"clinical":"none","ecg_pattern":"spontaneous_type1","family":"none","pathogenic_mutation":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/shanghai","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/shanghai?ecg_pattern=spontaneous_type1&clinical=none&family=none&pathogenic_mutation=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/shanghai","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/subtle-stemi","description":"Driver 2017 4-variable formula for normal-variant STE in V2-V4 (early repolarization) versus subtle LAD occlusion: formula_value = 0.052*QTc_ms - 0.151*QRS_V2_mm - 0.268*R_V4_mm + 1.062*STE60_V3_mm, 3 decimals. lad_occlusion_suggested is true iff the value is ≥18.2 (derivation highest-accuracy cutpoint). Intended only when ≥1 mm STE in V2-V4 without obvious occlusion features. magent does not read the ECG. Not a STEMI diagnosis, cath-lab order, or 3-variable formula. Not a medical device.","parameters":[{"in":"query","name":"qtc_ms","type":"number","description":"Computerized Bazett QTc in milliseconds (200-800). Driver 2017.","required":true,"example":"400"},{"in":"query","name":"qrs_v2_mm","type":"number","description":"Total QRS amplitude in V2 (R+S) in millimetres at standard calibration (0.1-50). Driver 2017.","required":true,"example":"20"},{"in":"query","name":"r_v4_mm","type":"number","description":"R-wave amplitude in V4 in millimetres at standard calibration (0.1-50). Driver 2017.","required":true,"example":"15"},{"in":"query","name":"ste60_v3_mm","type":"number","description":"ST elevation at 60 ms after the J-point in V3, in millimetres (0-10). Driver 2017.","required":true,"example":"1"}],"errors":[{"code":"invalid_qtc_ms","message":"qtc_ms must be a number from 200 to 800 (Thiruganasambandamoorthy 2016 CSRS). Returned before settlement; you are not charged.","status":400},{"code":"invalid_precordial_mm","message":"qrs_v2_mm and r_v4_mm must each be a number from 0.1 to 50 (Driver 2017 millimetres at standard calibration). Returned before settlement; you are not charged.","status":400},{"code":"invalid_st_deviation_mm","message":"st_deviation_mm must be a number from 0 to 10 (Mark 1991 maximal ST deviation in millimetres). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/subtle-stemi","citation":{"authors":"Driver BE, Khalil A, Henry T, Kazmi F, Adil A, Smith SW","doi":"10.1016/j.jelectrocard.2017.04.005","id":"driver-2017","pmid":"28460689","source":"J Electrocardiol. 2017;50(5):561-569","title":"A new 4-variable formula to differentiate normal variant ST segment elevation in V2-V4 (early repolarization) from subtle left anterior descending coronary occlusion - Adding QRS amplitude of V2 improves the model","url":"https://doi.org/10.1016/j.jelectrocard.2017.04.005"},"formula_expression":"formula_value = 0.052 * qtc_ms - 0.151 * qrs_v2_mm - 0.268 * r_v4_mm + 1.062 * ste60_v3_mm","purpose":"Compute the Driver 2017 4-variable formula that differentiates normal-variant ST elevation in V2-V4 (early repolarization) from subtle left anterior descending coronary occlusion, using computerized Bazett QTc, total QRS amplitude in V2, R-wave amplitude in V4, and ST elevation at 60 ms after the J-point in V3.","markdown_url":"https://magentlab.com/docs/subtle-stemi.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"subtle_stemi"},{"name":"formula_expression","type":"string","description":"Exact Driver 2017 4-variable expression"},{"name":"qtc_ms","type":"number","description":"Computerized Bazett QTc used, milliseconds"},{"name":"qrs_v2_mm","type":"number","description":"Total QRS amplitude in V2 used, millimetres"},{"name":"r_v4_mm","type":"number","description":"R-wave amplitude in V4 used, millimetres"},{"name":"ste60_v3_mm","type":"number","description":"ST elevation at 60 ms after the J-point in V3 used, millimetres"},{"name":"formula_value","type":"number","description":"Driver 2017 4-variable value, 3 decimals"},{"name":"lad_occlusion_suggested","type":"boolean","description":"True iff formula_value is ≥ 18.2 (Driver 2017 derivation cutpoint with highest accuracy). Not a STEMI diagnosis."},{"name":"citation","type":"object","description":"Driver J Electrocardiol 2017 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"qrs_v2_mm":"20","qtc_ms":"400","r_v4_mm":"15","ste60_v3_mm":"1"},{"qrs_v2_mm":"20","qtc_ms":"400","r_v4_mm":"15","ste60_v3_mm":"1"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/subtle-stemi","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/subtle-stemi?qtc_ms=400&qrs_v2_mm=20&r_v4_mm=15&ste60_v3_mm=1","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/subtle-stemi","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/curb65","description":"CURB-65 pneumonia severity from age and discrete clinical flags. Deterministic published score with citation; not a treatment recommendation.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Age ≥65 scores 1.","required":true,"example":"70"},{"in":"query","name":"confusion","type":"boolean","description":"New confusion (C). true or false.","required":true,"example":"true"},{"in":"query","name":"urea_high","type":"boolean","description":"Urea >7 mmol/L (U). Pass the published cutoff as a flag; magent does not convert BUN.","required":true,"example":"true"},{"in":"query","name":"respiratory_rate_ge_30","type":"boolean","description":"Respiratory rate ≥30/min (R). true or false.","required":true,"example":"false"},{"in":"query","name":"low_blood_pressure","type":"boolean","description":"SBP <90 mmHg or DBP ≤60 mmHg (B). true or false.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/curb65","citation":{"authors":"Lim WS, van der Eerden MM, Laing R, et al.","doi":"10.1136/thorax.58.5.377","id":"lim-2003","source":"Thorax. 2003;58(5):377-382","title":"Defining community acquired pneumonia severity on presentation to hospital: an international derivation and validation study","url":"https://doi.org/10.1136/thorax.58.5.377"},"formula_expression":"CURB-65 = confusion + urea_high + respiratory_rate_ge_30 + low_blood_pressure + age_ge_65; max 5","purpose":"Compute the CURB-65 community-acquired pneumonia severity score from age and discrete flags.","markdown_url":"https://magentlab.com/docs/curb65.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"curb65"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Total points 0-5"},{"name":"max_score","type":"integer","description":"Always 5"},{"name":"age_years","type":"integer","description":"Age used for the 65 criterion"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Thorax 2003 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"70","confusion":"true","low_blood_pressure":"false","respiratory_rate_ge_30":"false","urea_high":"true"},{"age":"70","confusion":"true","low_blood_pressure":"false","respiratory_rate_ge_30":"false","urea_high":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/curb65","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/curb65?age=70&confusion=true&urea_high=true&respiratory_rate_ge_30=false&low_blood_pressure=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/curb65","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/crb-65","description":"Lim 2003 CRB-65 for community-acquired pneumonia: confusion, respiratory rate ≥30/min, low blood pressure (SBP <90 or DBP ≤60), and age ≥65; 1 point each, max 4. No urea. Score only; no mortality percentages or site-of-care bands. Not a diagnosis. Not CURB-65. Caller assigns the C, R, and B flags; magent does not convert BUN or take BP numbers.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Age ≥65 scores 1.","required":true,"example":"40"},{"in":"query","name":"confusion","type":"boolean","description":"New confusion (C) as assigned by the caller. true or false.","required":true,"example":"false"},{"in":"query","name":"respiratory_rate_ge_30","type":"boolean","description":"Respiratory rate ≥30/min (R) as assigned by the caller. true or false.","required":true,"example":"false"},{"in":"query","name":"low_blood_pressure","type":"boolean","description":"SBP <90 mmHg or DBP ≤60 mmHg (B) as assigned by the caller. true or false. magent does not take BP numbers.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/crb-65","citation":{"authors":"Lim WS, van der Eerden MM, Laing R, et al.","doi":"10.1136/thorax.58.5.377","id":"lim-2003","source":"Thorax. 2003;58(5):377-382","title":"Defining community acquired pneumonia severity on presentation to hospital: an international derivation and validation study","url":"https://doi.org/10.1136/thorax.58.5.377"},"formula_expression":"CRB-65 = confusion + respiratory_rate_ge_30 + low_blood_pressure + age_ge_65; max 4","purpose":"Compute the Lim 2003 CRB-65 community-acquired pneumonia score from age and caller-assigned confusion, respiratory-rate, and blood-pressure flags. Urea is not an input.","markdown_url":"https://magentlab.com/docs/crb-65.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"crb65"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Total points 0-4"},{"name":"max_score","type":"integer","description":"Always 4"},{"name":"age_years","type":"integer","description":"Age used for the 65 criterion"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Thorax 2003 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"40","confusion":"false","low_blood_pressure":"false","respiratory_rate_ge_30":"false"},{"age":"40","confusion":"false","low_blood_pressure":"false","respiratory_rate_ge_30":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/crb-65","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/crb-65?age=40&confusion=false&respiratory_rate_ge_30=false&low_blood_pressure=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/crb-65","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/psi-port","description":"Fine 1997 Pneumonia Severity Index (PSI/PORT): Class I if age ≤50 and no neoplastic, liver, CHF, cerebrovascular, or renal disease, no AMS, HR <125, RR <30, SBP >=90, and temperature 35 to <40 C. Otherwise Table 2 points (age, or age-10 if female, plus comorbidity, vital-sign, and laboratory weights) map to classes II-V. Always returns the Table 2 total. Not a medical device and not a site-of-care decision.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Table 2: men add the age integer; women add age − 10. Step 1 Class I requires age ≤50 (Fine: 50 years of age or younger).","required":true,"example":"45"},{"in":"query","name":"sex","type":"string","description":"Sex (female or male). Women subtract 10 from the age points.","required":true,"example":"male"},{"in":"query","name":"nursing_home","type":"boolean","description":"Nursing home resident as assigned by the caller. true or false. Table 2 +10 if true. Not a Step 1 Class I item.","required":true,"example":"false"},{"in":"query","name":"neoplastic","type":"boolean","description":"Neoplastic disease as assigned by the caller. true or false. Step 1 excludes Class I if true. Table 2 +30 if true.","required":true,"example":"false"},{"in":"query","name":"liver_disease","type":"boolean","description":"Liver disease as assigned by the caller. true or false. Step 1 excludes Class I if true. Table 2 +20 if true.","required":true,"example":"false"},{"in":"query","name":"chf","type":"boolean","description":"Congestive heart failure as assigned by the caller. true or false. Step 1 excludes Class I if true. Table 2 +10 if true.","required":true,"example":"false"},{"in":"query","name":"cerebrovascular","type":"boolean","description":"Cerebrovascular disease as assigned by the caller. true or false. Step 1 excludes Class I if true. Table 2 +10 if true.","required":true,"example":"false"},{"in":"query","name":"renal_disease","type":"boolean","description":"Renal disease as assigned by the caller. true or false. Step 1 excludes Class I if true. Table 2 +10 if true.","required":true,"example":"false"},{"in":"query","name":"altered_mental_status","type":"boolean","description":"Altered mental status as assigned by the caller. true or false. Step 1 excludes Class I if true. Table 2 +20 if true.","required":true,"example":"false"},{"in":"query","name":"heart_rate_bpm","type":"integer","description":"Heart rate in beats per minute (integer 30-220). Step 1 Class I requires <125. Table 2 +10 when ≥125; 124 does not score.","required":true,"example":"80"},{"in":"query","name":"respiratory_rate","type":"integer","description":"Respiratory rate in breaths/min (integer 4-80). Step 1 Class I requires <30. Table 2 +20 when ≥30; 29 does not score.","required":true,"example":"16"},{"in":"query","name":"systolic_mm_hg","type":"number","description":"Systolic blood pressure in mm Hg (50-250). Step 1 Class I requires ≥90. Table 2 +20 when <90; 90 does not score.","required":true,"example":"120"},{"in":"query","name":"temperature_c","type":"number","description":"Temperature in °C (30-45). Step 1 Class I requires ≥35 and <40. Table 2 +15 when <35 or ≥40; 35.0 and 39.9 do not score.","required":true,"example":"37.0"},{"in":"query","name":"arterial_ph","type":"number","description":"Arterial pH (6.80-7.80). Table 2 +30 when <7.35; 7.35 does not score. Not a Step 1 Class I item.","required":true,"example":"7.40"},{"in":"query","name":"bun_mg_dl","type":"number","description":"Blood urea nitrogen in mg/dL (1-200). Table 2 +20 when ≥30; 29.9 does not score. Not a Step 1 Class I item.","required":true,"example":"14"},{"in":"query","name":"sodium_mmol_l","type":"number","description":"Serum sodium in mmol/L (110-160). Table 2 +20 when <130; 130 does not score. Not a Step 1 Class I item.","required":true,"example":"140"},{"in":"query","name":"glucose_mg_dl","type":"number","description":"Serum glucose in mg/dL (50-1000). Fine Table 2 is mg/dL only. Table 2 +10 when ≥250; 249 does not score. Not a Step 1 Class I item.","required":true,"example":"90"},{"in":"query","name":"hematocrit_percent","type":"number","description":"Hematocrit percent (10-70). Table 2 +10 when <30; 30 does not score. Not a Step 1 Class I item.","required":true,"example":"42"},{"in":"query","name":"pao2_mm_hg","type":"number","description":"Arterial PaO2 in mm Hg (20-700). Table 2 +10 when <60; 60 does not score. Not a Step 1 Class I item.","required":true,"example":"90"},{"in":"query","name":"pleural_effusion","type":"boolean","description":"Pleural effusion as assigned by the caller. true or false. Table 2 +10 if true. Not a Step 1 Class I item.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_heart_rate","message":"heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.","status":400},{"code":"invalid_respiratory_rate","message":"respiratory_rate must be an integer from 4 to 80. Returned before settlement; you are not charged.","status":400},{"code":"invalid_temperature","message":"temperature_c must be a number from 30.0 to 45.0. Returned before settlement; you are not charged.","status":400},{"code":"invalid_systolic_bp","message":"systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.","status":400},{"code":"invalid_arterial_ph","message":"arterial_ph must be a number from 6.80 to 7.80. Returned before settlement; you are not charged.","status":400},{"code":"invalid_bun","message":"bun_mg_dl must be a number from 1 to 200. Returned before settlement; you are not charged.","status":400},{"code":"invalid_sodium","message":"sodium_mmol_l must be a number from 110 to 160 Returned before settlement; you are not charged.","status":400},{"code":"invalid_glucose","message":"glucose_mg_dl (50-1000) or glucose_mmol_l (2.8-55.5) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_hematocrit","message":"hematocrit_percent must be a number from 10 to 70. Returned before settlement; you are not charged.","status":400},{"code":"invalid_pao2","message":"pao2_mm_hg must be a number from 20 to 700. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/psi-port","citation":{"authors":"Fine MJ, Auble TE, Yealy DM, et al.","doi":"10.1056/NEJM199701233360402","id":"fine-1997","pmid":"8995086","source":"N Engl J Med. 1997;336(4):243-250","title":"A prediction rule to identify low-risk patients with community-acquired pneumonia","url":"https://doi.org/10.1056/NEJM199701233360402"},"formula_expression":"PSI/PORT two-step (Fine 1997): Class I if age<=50 and no neoplastic, liver, CHF, cerebrovascular, renal, AMS and HR<125, RR<30, SBP>=90, temp>=35 and <40; else Table 2 points: age (men) or age-10 (women) + nursing_home 10 + neoplastic 30 + liver 20 + CHF 10 + cerebrovascular 10 + renal 10 + AMS 20 + RR>=30 20 + SBP<90 20 + (temp<35 or >=40) 15 + HR>=125 10 + pH<7.35 30 + BUN>=30 20 + Na<130 20 + glucose>=250 10 + Hct<30 10 + PaO2<60 10 + pleural_effusion 10; class I from step 1 else 2 if <=70, 3 if 71-90, 4 if 91-130, 5 if >130","purpose":"Compute the Fine 1997 Pneumonia Severity Index (PORT) two-step risk class and Table 2 point total for community-acquired pneumonia.","markdown_url":"https://magentlab.com/docs/psi-port.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"psi_port"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Fine Table 2 point total (always returned, including Class I)"},{"name":"risk_class","type":"integer","description":"1 if Step 1 Class I; else 2 if score ≤70, 3 if 71-90, 4 if 91-130, 5 if >130"},{"name":"age_years","type":"integer","description":"Age used for Step 1 and Table 2"},{"name":"components","type":"array","description":"Per-factor Table 2 points"},{"name":"citation","type":"object","description":"Fine 1997 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"45","altered_mental_status":"false","arterial_ph":"7.40","bun_mg_dl":"14","cerebrovascular":"false","chf":"false","glucose_mg_dl":"90","heart_rate_bpm":"80","hematocrit_percent":"42","liver_disease":"false","neoplastic":"false","nursing_home":"false","pao2_mm_hg":"90","pleural_effusion":"false","renal_disease":"false","respiratory_rate":"16","sex":"male","sodium_mmol_l":"140","systolic_mm_hg":"120","temperature_c":"37.0"},{"age":"45","altered_mental_status":"false","arterial_ph":"7.40","bun_mg_dl":"14","cerebrovascular":"false","chf":"false","glucose_mg_dl":"90","heart_rate_bpm":"80","hematocrit_percent":"42","liver_disease":"false","neoplastic":"false","nursing_home":"false","pao2_mm_hg":"90","pleural_effusion":"false","renal_disease":"false","respiratory_rate":"16","sex":"male","sodium_mmol_l":"140","systolic_mm_hg":"120","temperature_c":"37.0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/psi-port","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/psi-port?age=45&sex=male&nursing_home=false&neoplastic=false&liver_disease=false&chf=false&cerebrovascular=false&renal_disease=false&altered_mental_status=false&heart_rate_bpm=80&respiratory_rate=16&systolic_mm_hg=120&temperature_c=37.0&arterial_ph=7.40&bun_mg_dl=14&sodium_mmol_l=140&glucose_mg_dl=90&hematocrit_percent=42&pao2_mm_hg=90&pleural_effusion=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/psi-port","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/piro-cap","description":"Rello 2009 PIRO score for ICU community-acquired pneumonia: comorbidities (COPD or immunocompromise count as one feature) + age >70 + multilobar opacities + shock + severe hypoxemia + acute renal failure + bacteremia + ARDS. Each 1; max 8. Bands low 0-2, mild 3, high 4, very high 5-8. Not CURB-65, PSI, or APACHE II. magent does not interpret a chest radiograph. Not a diagnosis.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (integer 18-120). Age >70 scores 1 (Rello 2009). Age 70 does not score. magent does not compute age from a date of birth.","required":true,"example":"75"},{"in":"query","name":"copd","type":"boolean","description":"Chronic obstructive pulmonary disease as assigned by the caller (Rello 2009 comorbidity feature with immunocompromise). true or false. COPD or immunocompromise scores 1 together, not 1 each. magent does not diagnose COPD.","required":true,"example":"false"},{"in":"query","name":"immunocompromise","type":"boolean","description":"Immunocompromise as assigned by the caller (Rello 2009 comorbidity feature with COPD). true or false. COPD or immunocompromise scores 1 together, not 1 each. magent does not assign immune status.","required":true,"example":"false"},{"in":"query","name":"multilobar_opacities","type":"boolean","description":"Multilobar opacities on chest radiograph as assigned by the caller (Rello 2009). true or false. 1 point if true. magent does not interpret a chest radiograph.","required":true,"example":"true"},{"in":"query","name":"shock","type":"boolean","description":"Shock as assigned by the caller (Rello 2009). true or false. 1 point if true. magent does not measure blood pressure or diagnose shock.","required":true,"example":"true"},{"in":"query","name":"severe_hypoxemia","type":"boolean","description":"Severe hypoxemia as assigned by the caller (Rello 2009). true or false. 1 point if true. magent does not measure PaO2 or FiO2.","required":true,"example":"false"},{"in":"query","name":"acute_renal_failure","type":"boolean","description":"Acute renal failure as assigned by the caller (Rello 2009). true or false. 1 point if true. magent does not assay creatinine.","required":true,"example":"false"},{"in":"query","name":"bacteremia","type":"boolean","description":"Bacteremia as assigned by the caller (Rello 2009). true or false. 1 point if true. magent does not interpret cultures.","required":true,"example":"false"},{"in":"query","name":"ards","type":"boolean","description":"Acute respiratory distress syndrome as assigned by the caller (Rello 2009). true or false. 1 point if true. magent does not diagnose ARDS.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/piro-cap","citation":{"authors":"Rello J, Rodriguez A, Lisboa T, Gallego M, Lujan M, Wunderink R","doi":"10.1097/CCM.0b013e318194b021","id":"rello-2009","pmid":"19114916","source":"Crit Care Med. 2009;37(2):456-462","title":"PIRO score for community-acquired pneumonia: a new prediction rule for assessment of severity in intensive care unit patients with community-acquired pneumonia","url":"https://doi.org/10.1097/CCM.0b013e318194b021"},"formula_expression":"PIRO-CAP (Rello 2009 ICU CAP, within 24 h of ICU admission) = comorbidities (copd or immunocompromise, 1 if either) + age>70 + multilobar_opacities + shock + severe_hypoxemia + acute_renal_failure + bacteremia + ards; each 1; max 8; bands low 0-2, mild 3, high 4, very_high 5-8. Not CURB-65. Not PSI. Not APACHE II","purpose":"Sum the Rello 2009 PIRO features for ICU community-acquired pneumonia and return the 0-8 score and published band.","markdown_url":"https://magentlab.com/docs/piro-cap.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"piro_cap"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"PIRO-CAP points 0-8"},{"name":"max_score","type":"integer","description":"8"},{"name":"band","type":"string","description":"Rello 2009 band: low (0-2), mild (3), high (4), or very_high (5-8). A band, not a diagnosis."},{"name":"age_years","type":"integer","description":"Age used for the >70 criterion"},{"name":"components","type":"array","description":"Per-feature points. comorbidities is 1 if copd or immunocompromise is true, not 1 each."},{"name":"citation","type":"object","description":"Rello 2009 Crit Care Med citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"acute_renal_failure":"false","age":"75","ards":"false","bacteremia":"false","copd":"false","immunocompromise":"false","multilobar_opacities":"true","severe_hypoxemia":"false","shock":"true"},{"acute_renal_failure":"false","age":"75","ards":"false","bacteremia":"false","copd":"false","immunocompromise":"false","multilobar_opacities":"true","severe_hypoxemia":"false","shock":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/piro-cap","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/piro-cap?age=75&copd=false&immunocompromise=false&multilobar_opacities=true&shock=true&severe_hypoxemia=false&acute_renal_failure=false&bacteremia=false&ards=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/piro-cap","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/mulbsta","description":"Guo 2019 MuLBSTA viral pneumonia mortality score. Caller-assigned multilobular infiltrates (5), lymphocyte count ≤0.8 ×10^9/L (4), bacterial coinfection (4), exclusive smoking (never 0, former 2, current 3), hypertension (2), and age ≥60 (2). Max 20. Low 0-11, high ≥12. magent does not read imaging or assign smoking history. Not a viral-species diagnosis or treatment order.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Age ≥60 scores 2 (Guo 2019). magent does not compute age.","required":true,"example":"50"},{"in":"query","name":"smoking","type":"string","description":"Exclusive Guo 2019 smoking status: never (0), former / quit-smoker (2), or current / acute-smoker (3). Current and former cannot both apply. Assigned by the caller; magent does not assign smoking history.","required":true,"example":"never"},{"in":"query","name":"lymphocyte_k_ul","type":"number","description":"Absolute lymphocyte count ×10^9/L (0.05-20). Scores 4 when ≤0.8 (Guo 2019). magent does not read a CBC.","required":true,"example":"1.5"},{"in":"query","name":"multilobular_infiltrates","type":"boolean","description":"Multilobular infiltrates as assigned by the caller (Guo 2019). true scores 5. magent does not read imaging.","required":true,"example":"false"},{"in":"query","name":"bacterial_coinfection","type":"boolean","description":"Bacterial coinfection as assigned by the caller (Guo 2019). true scores 4. magent does not diagnose coinfection.","required":true,"example":"false"},{"in":"query","name":"hypertension","type":"boolean","description":"Hypertension as assigned by the caller (Guo 2019). true scores 2. magent does not take a blood pressure.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_mulbsta_smoking","message":"smoking must be never, former, or current (Guo 2019 MuLBSTA; current and former are mutually exclusive). Returned before settlement; you are not charged.","status":400},{"code":"invalid_lymphocyte_count","message":"lymphocyte_k_ul must be a number from 0.05 to 20 (absolute lymphocyte count ×10^9/L). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/mulbsta","citation":{"authors":"Guo L, Wei D, Zhang X, Wu Y, Li Q, Zhou M, Qu J","doi":"10.3389/fmicb.2019.02752","id":"guo-2019","pmid":"31849894","source":"Front Microbiol. 2019;10:2752","title":"Clinical Features Predicting Mortality Risk in Patients With Viral Pneumonia: The MuLBSTA Score","url":"https://doi.org/10.3389/fmicb.2019.02752"},"formula_expression":"MuLBSTA = multilobular_infiltrates 5 + lymphocyte_k_ul<=0.8 4 + bacterial_coinfection 4 + smoking (never 0, former 2, current 3; exclusive) + hypertension 2 + age>=60 2; Guo 2019; max 20; low 0-11, high >=12","purpose":"Sum Guo 2019 MuLBSTA points from age, exclusive smoking status, absolute lymphocyte count, and caller-assigned flags, and return the published total (max 20) and low/high band.","markdown_url":"https://magentlab.com/docs/mulbsta.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"mulbsta"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"MuLBSTA points 0-20"},{"name":"max_score","type":"integer","description":"Always 20"},{"name":"mulbsta_band","type":"string","description":"Guo 2019 band: low (score 0-11; paper mortality 5.07%) or high (score ≥12; paper 33.92%). Not a treatment order."},{"name":"age_years","type":"integer","description":"Age used for the ≥60 criterion"},{"name":"smoking","type":"string","description":"Exclusive smoking status used: never, former, or current"},{"name":"lymphocyte_k_ul","type":"number","description":"Absolute lymphocyte count ×10^9/L used for the ≤0.8 criterion"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Guo et al. Front Microbiol 2019 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"50","bacterial_coinfection":"false","hypertension":"false","lymphocyte_k_ul":"1.5","multilobular_infiltrates":"false","smoking":"never"},{"age":"50","bacterial_coinfection":"false","hypertension":"false","lymphocyte_k_ul":"1.5","multilobular_infiltrates":"false","smoking":"never"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/mulbsta","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/mulbsta?age=50&smoking=never&lymphocyte_k_ul=1.5&multilobular_infiltrates=false&bacterial_coinfection=false&hypertension=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/mulbsta","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/drip","description":"Webb 2016 DRIP (drug resistance in pneumonia): ten caller-assigned flags, four major at 2 points and six minor at 1, max 14. high_risk if score >= 4. Deterministic published score with citation; not a medical device, not an antibiotic order, and not HCAP. magent does not classify the facility or compute Karnofsky.","parameters":[{"in":"query","name":"antibiotics_60d","type":"boolean","description":"Antibiotic use within 60 days (Webb 2016 major, 2 points). true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"long_term_care","type":"boolean","description":"Residence in long-term acute care, a skilled nursing facility, or inpatient rehabilitation (Webb 2016 major, 2 points). Not assisted living or a group home. The caller assigns the flag; magent does not classify the facility. true or false.","required":true,"example":"false"},{"in":"query","name":"tube_feeding","type":"boolean","description":"Tube feeding (Webb 2016 major, 2 points). true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"prior_drp_1yr","type":"boolean","description":"Prior drug-resistant pneumonia within 1 year (Webb 2016 major, 2 points). true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"hospitalization_60d","type":"boolean","description":"Hospitalization within 60 days (Webb 2016 minor, 1 point). true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"chronic_pulmonary_disease","type":"boolean","description":"Chronic pulmonary disease (Webb 2016 minor, 1 point). true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"poor_functional_status","type":"boolean","description":"Poor functional status as in Webb 2016 (Karnofsky <70 or non-ambulatory). Caller-assigned boolean; magent does not compute Karnofsky. 1 point if true.","required":true,"example":"false"},{"in":"query","name":"gastric_acid_suppression","type":"boolean","description":"Gastric acid suppression (Webb 2016 minor, 1 point). true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"wound_care","type":"boolean","description":"Wound care (Webb 2016 minor, 1 point). true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"mrsa_colonization_1yr","type":"boolean","description":"MRSA colonization within 1 year (Webb 2016 minor, 1 point). true or false as assigned by the caller.","required":true,"example":"false"}],"errors":[{"code":"invalid_drip","message":"each DRIP flag must be true or false (Webb 2016). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/drip","citation":{"authors":"Webb BJ, Dascomb K, Stenehjem E, et al.","doi":"10.1128/AAC.03071-15","id":"webb-2016","pmid":"26856838","source":"Antimicrob Agents Chemother. 2016;60(5):2652-2663","title":"Derivation and multicenter validation of the drug resistance in pneumonia clinical prediction score","url":"https://doi.org/10.1128/AAC.03071-15"},"formula_expression":"DRIP = antibiotics_60d (2) + long_term_care (2) + tube_feeding (2) + prior_drp_1yr (2) + hospitalization_60d (1) + chronic_pulmonary_disease (1) + poor_functional_status (1) + gastric_acid_suppression (1) + wound_care (1) + mrsa_colonization_1yr (1); max 14; high_risk iff score >= 4","purpose":"Sum the Webb 2016 DRIP (drug resistance in pneumonia) major and minor flags and return score, max, and high_risk at ≥4.","markdown_url":"https://magentlab.com/docs/drip.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"drip"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"DRIP points 0-14 (Webb 2016)"},{"name":"max_score","type":"integer","description":"14"},{"name":"high_risk","type":"boolean","description":"true iff score ≥ 4 (Webb 2016 cutoff). Not an antibiotic order and not a diagnosis of drug-resistant pneumonia."},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Webb et al. AAC 2016 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"antibiotics_60d":"false","chronic_pulmonary_disease":"false","gastric_acid_suppression":"false","hospitalization_60d":"false","long_term_care":"false","mrsa_colonization_1yr":"false","poor_functional_status":"false","prior_drp_1yr":"false","tube_feeding":"false","wound_care":"false"},{"antibiotics_60d":"false","chronic_pulmonary_disease":"false","gastric_acid_suppression":"false","hospitalization_60d":"false","long_term_care":"false","mrsa_colonization_1yr":"false","poor_functional_status":"false","prior_drp_1yr":"false","tube_feeding":"false","wound_care":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/drip","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/drip?antibiotics_60d=false&long_term_care=false&tube_feeding=false&prior_drp_1yr=false&hospitalization_60d=false&chronic_pulmonary_disease=false&poor_functional_status=false&gastric_acid_suppression=false&wound_care=false&mrsa_colonization_1yr=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/drip","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/shorr","description":"Shorr 2013 MRSA pneumonia risk score (Table 2 only, not HCAP, not DRIP): recent hospitalization ≥2 days in 90 days 2; ICU admission 2; age <30 or >79 1; prior IV antibiotics 1; dementia 1; cerebrovascular disease 1; female with diabetes 1 (male with diabetes 0); nursing home/LTAC/SNF 1; max 10. Bands: 0-1 low, 2-5 medium, ≥6 high. Returns score, max_score, and risk_band. Not a medical device and not an antibiotic order.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Shorr 2013 Table 2: <30 or >79 scores 1; 30 through 79 scores 0. 29 scores 1; 30 scores 0; 79 scores 0; 80 scores 1.","required":true,"example":"50"},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"female or male. Female with diabetes scores 1 (Shorr 2013 Table 2). Male with diabetes scores 0. Sex alone does not score.","required":true,"example":"male"},{"in":"query","name":"hospitalization_90d","type":"boolean","description":"Recent inpatient hospitalization for ≥2 days within 90 days (Shorr 2013 Table 2, 2 points). true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"icu_admission","type":"boolean","description":"ICU admission (Shorr 2013 Table 2, 2 points). true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"prior_iv_antibiotics","type":"boolean","description":"Prior IV antibiotic exposure (Shorr 2013 Table 2, 1 point). true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"dementia","type":"boolean","description":"Dementia (Shorr 2013 Table 2, 1 point). true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"cerebrovascular_disease","type":"boolean","description":"Cerebrovascular disease (Shorr 2013 Table 2, 1 point). true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"diabetes","type":"boolean","description":"Diabetes mellitus. Scores 1 only when sex is female (Shorr 2013 Table 2). Male with diabetes scores 0. true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"nursing_home_ltac_snf","type":"boolean","description":"Recent nursing home, long-term acute care, or skilled nursing facility exposure (Shorr 2013 Table 2, 1 point). true or false as assigned by the caller. magent does not classify the facility.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/shorr","citation":{"authors":"Shorr AF, Myers DE, Huang DB, Nathanson BH, Emons MF, Kollef MH","doi":"10.1186/1471-2334-13-268","id":"shorr-2013","pmid":"23742753","source":"BMC Infect Dis. 2013;13:268","title":"A risk score for identifying methicillin-resistant Staphylococcus aureus in patients presenting to the hospital with pneumonia","url":"https://doi.org/10.1186/1471-2334-13-268"},"formula_expression":"Shorr = hospitalization_90d (2) + icu_admission (2) + age_lt_30_or_gt_79 (1) + prior_iv_antibiotics (1) + dementia (1) + cerebrovascular_disease (1) + female_and_diabetes (1) + nursing_home_ltac_snf (1); max 10; 0-1 low, 2-5 medium, >=6 high","purpose":"Sum the Shorr 2013 Table 2 MRSA pneumonia risk points and return score, max_score, and the published low, medium, or high band.","markdown_url":"https://magentlab.com/docs/shorr.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"shorr"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Shorr 2013 Table 2 points 0-10"},{"name":"max_score","type":"integer","description":"10"},{"name":"risk_band","type":"string","description":"Shorr 2013 band: low (0-1), medium (2-5), or high (≥6). A band, not a MRSA prevalence and not an antibiotic order."},{"name":"age_years","type":"integer","description":"Age used for the <30 or >79 criterion"},{"name":"sex","type":"string","description":"female or male used for the female-with-diabetes item"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Shorr et al. BMC Infect Dis 2013 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"50","cerebrovascular_disease":"false","dementia":"false","diabetes":"false","hospitalization_90d":"false","icu_admission":"false","nursing_home_ltac_snf":"false","prior_iv_antibiotics":"false","sex":"male"},{"age":"50","cerebrovascular_disease":"false","dementia":"false","diabetes":"false","hospitalization_90d":"false","icu_admission":"false","nursing_home_ltac_snf":"false","prior_iv_antibiotics":"false","sex":"male"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/shorr","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/shorr?age=50&sex=male&hospitalization_90d=false&icu_admission=false&prior_iv_antibiotics=false&dementia=false&cerebrovascular_disease=false&diabetes=false&nursing_home_ltac_snf=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/shorr","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/smart-cop","description":"Charles 2008 SMART-COP for intensive respiratory or vasopressor support in community-acquired pneumonia: SBP <90 (2), multilobar CXR (1), albumin <3.5 g/dL (1), age-adjusted RR (1), HR >=125 (1), new confusion (1), age-adjusted low oxygen (2), arterial pH <7.35 (2; omitted pH scores 0). Max 11. IRVS 0-2 low, 3-4 moderate, 5-6 high, >=7 very high. Not a site-of-care protocol. Albumin g/dL or g/L. Exactly one of PaO2, SpO2, or P/F.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Age ≤50 uses RR ≥25, PaO2 <70, SpO2 ≤93%, P/F <333. Age >50 uses RR ≥30, PaO2 <60, SpO2 ≤90%, P/F <250.","required":true,"example":"40"},{"in":"query","name":"systolic_mm_hg","type":"number","description":"Systolic blood pressure in mm Hg (50-250). Scores 2 when <90; 90 does not score (Charles 2008 S).","required":true,"example":"120"},{"in":"query","name":"multilobar_cxr","type":"boolean","description":"Multilobar involvement on chest radiograph as assigned by the caller (Charles 2008 M). true or false. 1 point if true. magent does not interpret radiographs.","required":true,"example":"false"},{"in":"query","name":"albumin_g_dl","type":"number","description":"Albumin in g/dL (1-6). Provide this or albumin_g_l, not both. Scores 1 when <3.5; 3.5 does not score (Charles 2008 A).","required":false,"example":"4.0"},{"in":"query","name":"albumin_g_l","type":"number","description":"Albumin in g/L (10-60). Converted as g/dL = g/L / 10. Provide this or albumin_g_dl, not both. Scores 1 when <35 g/L.","required":false,"example":"40"},{"in":"query","name":"respiratory_rate","type":"integer","description":"Respiratory rate in breaths/min (integer 4-80). Age ≤50: ≥25 scores 1 (24 does not). Age >50: ≥30 scores 1 (29 does not). Charles 2008 R.","required":true,"example":"16"},{"in":"query","name":"heart_rate_bpm","type":"integer","description":"Heart rate in beats per minute (integer 30-220). Scores 1 when ≥125; 124 does not score (Charles 2008 T).","required":true,"example":"80"},{"in":"query","name":"confusion","type":"boolean","description":"New or acute confusion as assigned by the caller (Charles 2008 C). true or false. 1 point if true. magent does not assess mental status.","required":true,"example":"false"},{"in":"query","name":"pao2_mm_hg","type":"number","description":"Arterial PaO2 in mm Hg (20-700). Provide exactly one of pao2_mm_hg, spo2_percent, or pf_ratio. Age ≤50: <70 scores 2. Age >50: <60 scores 2.","required":false,"example":"90"},{"in":"query","name":"spo2_percent","type":"number","description":"Oxygen saturation percent (50-100). Provide exactly one of pao2_mm_hg, spo2_percent, or pf_ratio. Age ≤50: ≤93 scores 2. Age >50: ≤90 scores 2.","required":false,"example":"98"},{"in":"query","name":"pf_ratio","type":"number","description":"PaO2/FiO2 ratio (20-800). Provide exactly one of pao2_mm_hg, spo2_percent, or pf_ratio. Age ≤50: <333 scores 2. Age >50: <250 scores 2.","required":false,"example":"400"},{"in":"query","name":"arterial_ph","type":"number","description":"Arterial pH (6.80-7.80). Optional. Scores 2 when <7.35; 7.35 does not score. Omitted pH scores 0 (Charles 2008 missing-pH assumption).","required":false,"example":"7.40"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_systolic_bp","message":"systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_albumin","message":"albumin_g_dl (1-6) or albumin_g_l (10-60) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_respiratory_rate","message":"respiratory_rate must be an integer from 4 to 80. Returned before settlement; you are not charged.","status":400},{"code":"invalid_heart_rate","message":"heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.","status":400},{"code":"invalid_smart_cop_oxygen","message":"provide exactly one of pao2_mm_hg, spo2_percent, or pf_ratio (Charles 2008). Returned before settlement; you are not charged.","status":400},{"code":"invalid_pao2","message":"pao2_mm_hg must be a number from 20 to 700. Returned before settlement; you are not charged.","status":400},{"code":"invalid_spo2","message":"spo2_percent must be a number from 50 to 100. Returned before settlement; you are not charged.","status":400},{"code":"invalid_pf_ratio","message":"pf_ratio must be a number from 20 to 800. Returned before settlement; you are not charged.","status":400},{"code":"invalid_arterial_ph","message":"arterial_ph must be a number from 6.80 to 7.80. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/smart-cop","citation":{"authors":"Charles PGP, Wolfe R, Whitby M, et al.","doi":"10.1086/589754","id":"charles-2008","pmid":"18558884","source":"Clin Infect Dis. 2008;47(3):375-384","title":"SMART-COP: a tool for predicting the need for intensive respiratory or vasopressor support in community-acquired pneumonia","url":"https://doi.org/10.1086/589754"},"formula_expression":"SMART-COP (Charles 2008) = SBP<90 (2) + multilobar_cxr (1) + albumin<3.5 g/dL (1) + age-adjusted RR (1; age<=50 RR>=25, age>50 RR>=30) + HR>=125 (1) + confusion (1) + age-adjusted low oxygen (2; age<=50 PaO2<70 or SpO2<=93 or P/F<333; age>50 PaO2<60 or SpO2<=90 or P/F<250) + arterial_pH<7.35 (2; omitted pH scores 0); max 11; IRVS 0-2 low, 3-4 moderate, 5-6 high, >=7 very high","purpose":"Compute the Charles 2008 SMART-COP point total and IRVS risk band for community-acquired pneumonia.","markdown_url":"https://magentlab.com/docs/smart-cop.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"smart_cop"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"SMART-COP points 0-11"},{"name":"max_score","type":"integer","description":"11"},{"name":"irvs_risk","type":"string","description":"Charles 2008 IRVS band: low (0-2), moderate (3-4), high (5-6), or very_high (≥7). A band, not a site-of-care decision."},{"name":"age_years","type":"integer","description":"Age used for RR and oxygen cutoffs"},{"name":"systolic_mm_hg","type":"number","description":"Systolic pressure used, mm Hg"},{"name":"albumin_g_dl","type":"number","description":"Albumin used in g/dL (after conversion)"},{"name":"respiratory_rate","type":"integer","description":"Respiratory rate used"},{"name":"heart_rate_bpm","type":"integer","description":"Heart rate used"},{"name":"pao2_mm_hg","type":"number","description":"PaO2 used when that oxygen input was given"},{"name":"spo2_percent","type":"number","description":"SpO2 used when that oxygen input was given"},{"name":"pf_ratio","type":"number","description":"P/F used when that oxygen input was given"},{"name":"arterial_ph","type":"number","description":"Arterial pH when supplied; omitted when the param is absent"},{"name":"components","type":"array","description":"Per-criterion SMART-COP points"},{"name":"citation","type":"object","description":"Charles 2008 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"40","albumin_g_dl":"4.0","arterial_ph":"7.40","confusion":"false","heart_rate_bpm":"80","multilobar_cxr":"false","respiratory_rate":"16","spo2_percent":"98","systolic_mm_hg":"120"},{"age":"40","albumin_g_dl":"4.0","arterial_ph":"7.40","confusion":"false","heart_rate_bpm":"80","multilobar_cxr":"false","respiratory_rate":"16","spo2_percent":"98","systolic_mm_hg":"120"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/smart-cop","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/smart-cop?age=40&systolic_mm_hg=120&multilobar_cxr=false&albumin_g_dl=4.0&respiratory_rate=16&heart_rate_bpm=80&confusion=false&spo2_percent=98&arterial_ph=7.40","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/smart-cop","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/wells-pe","description":"Wells pulmonary-embolism probability from discrete clinical flags. Returns three-tier and two-tier bands. Deterministic published score with citation; not a diagnosis.","parameters":[{"in":"query","name":"signs_dvt","type":"boolean","description":"Clinical signs and symptoms of DVT (3 points).","required":true,"example":"true"},{"in":"query","name":"pe_number_one","type":"boolean","description":"PE is the number-one diagnosis or equally likely (3 points).","required":true,"example":"true"},{"in":"query","name":"hr_gt_100","type":"boolean","description":"Heart rate >100 (1.5 points).","required":true,"example":"false"},{"in":"query","name":"immobilization_or_surgery","type":"boolean","description":"Immobilization ≥3 days or surgery in previous 4 weeks (1.5 points).","required":true,"example":"false"},{"in":"query","name":"previous_dvt_pe","type":"boolean","description":"Previous DVT or PE (1.5 points).","required":true,"example":"false"},{"in":"query","name":"hemoptysis","type":"boolean","description":"Hemoptysis (1 point).","required":true,"example":"false"},{"in":"query","name":"malignancy","type":"boolean","description":"Malignancy with treatment in last 6 months or palliative (1 point).","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/wells-pe","citation":{"authors":"Wells PS, Anderson DR, Rodger M, et al.","doi":"10.7326/0003-4819-135-2-200107170-00010","id":"wells-pe-2001","source":"Ann Intern Med. 2001;135(2):98-107","title":"Excluding pulmonary embolism at the bedside without diagnostic imaging: management of patients with suspected pulmonary embolism presenting to the emergency department by using a simple clinical model and d-dimer","url":"https://doi.org/10.7326/0003-4819-135-2-200107170-00010"},"formula_expression":"Wells PE = 3*signs_dvt + 3*pe_number_one + 1.5*hr_gt_100 + 1.5*immobilization_or_surgery + 1.5*previous_dvt_pe + 1*hemoptysis + 1*malignancy","purpose":"Compute the Wells pulmonary-embolism probability score and return three-tier and two-tier bands.","markdown_url":"https://magentlab.com/docs/wells-pe.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"wells_pe"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"number","description":"Total points (0-12.5, 0.5 steps)"},{"name":"max_score","type":"number","description":"Always 12.5"},{"name":"three_tier","type":"string","description":"low (0-1), moderate (2-6), high (≥7). Not a diagnosis."},{"name":"two_tier","type":"string","description":"likely (>4) or unlikely (≤4). Not a diagnosis."},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Ann Intern Med 2001 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"hemoptysis":"false","hr_gt_100":"false","immobilization_or_surgery":"false","malignancy":"false","pe_number_one":"true","previous_dvt_pe":"false","signs_dvt":"true"},{"hemoptysis":"false","hr_gt_100":"false","immobilization_or_surgery":"false","malignancy":"false","pe_number_one":"true","previous_dvt_pe":"false","signs_dvt":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/wells-pe","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/wells-pe?signs_dvt=true&pe_number_one=true&hr_gt_100=false&immobilization_or_surgery=false&previous_dvt_pe=false&hemoptysis=false&malignancy=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/wells-pe","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/4peps","description":"Roy 2021 4PEPS Table 3: age <50 −2, 50–64 −1, ≥65 0; chronic respiratory disease −1; HR <80 −1; chest pain and acute dyspnea +1; male +2; estrogen treatment +2; prior VTE +2; syncope +2; 4-week immobility +2; SpO2 <95% +3; calf pain or unilateral edema +3; PE most likely +5. Max 22. Bands: very_low <0, low 0–5, moderate 6–12, high ≥13. Not imaging or D-dimer. magent does not examine the patient or decide PE most likely.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (integer 18-120). Roy 2021 Table 3: <50 scores −2; 50-64 scores −1; ≥65 scores 0 (65-80 and >80 were not independently associated).","required":true,"example":"40"},{"in":"query","name":"chronic_respiratory_disease","type":"boolean","description":"Chronic respiratory disease (Roy 2021 Table 3). true scores −1. Assigned by the caller. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"heart_rate_bpm","type":"integer","description":"Heart rate in beats per minute (integer 30-220). Table 3: <80 scores −1. 80-100 was not independently associated; this tool does not add tachycardia points.","required":true,"example":"90"},{"in":"query","name":"chest_pain_and_acute_dyspnea","type":"boolean","description":"Both chest pain and acute dyspnea present as assigned by the caller (Roy 2021 Table 3). true scores +1. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"female or male (Roy 2021 Table 3). Male scores +2. Female scores 0. Assigned by the caller.","required":true,"example":"female"},{"in":"query","name":"hormonal_estrogenic_treatment","type":"boolean","description":"Hormonal estrogenic treatment as assigned by the caller (Roy 2021 Table 3). true scores +2.","required":true,"example":"false"},{"in":"query","name":"personal_history_vte","type":"boolean","description":"Personal history of VTE as assigned by the caller (Roy 2021 Table 3). true scores +2.","required":true,"example":"false"},{"in":"query","name":"syncope","type":"boolean","description":"Syncope as assigned by the caller (Roy 2021 Table 3). true scores +2. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"immobility_4w","type":"boolean","description":"Immobility within 4 weeks (Roy 2021 Table 3 footnote a): surgery, lower limb plaster cast, or bedridden more than 3 days for an acute medical condition. true scores +2. Assigned by the caller. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"spo2_percent","type":"number","description":"Oxygen saturation percent (50-100). Roy 2021 Table 3: <95 scores +3; 95 and above score 0.","required":true,"example":"98"},{"in":"query","name":"calf_pain_or_unilateral_edema","type":"boolean","description":"Calf pain and/or unilateral lower-limb edema as assigned by the caller (Roy 2021 Table 3). true scores +3. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"pe_most_likely","type":"boolean","description":"PE is the most likely diagnosis as assigned by the caller (Roy 2021 Table 3). true scores +5. magent does not examine the patient or decide PE most likely.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_heart_rate","message":"heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.","status":400},{"code":"invalid_spo2","message":"spo2_percent must be a number from 50 to 100. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/4peps","citation":{"authors":"Roy PM, Friou E, Germeau B, et al.","doi":"10.1001/jamacardio.2021.0064","id":"roy-2021","pmid":"33656522","source":"JAMA Cardiol. 2021;6(6):669-677","title":"Derivation and Validation of a 4-Level Clinical Pretest Probability Score for Suspected Pulmonary Embolism to Safely Decrease Imaging Testing","url":"https://doi.org/10.1001/jamacardio.2021.0064"},"formula_expression":"4PEPS = age (<50 -2, 50-64 -1, ≥65 0) + chronic_respiratory_disease (-1) + heart_rate_bpm (<80 -1) + chest_pain_and_acute_dyspnea (1) + male (2) + hormonal_estrogenic_treatment (2) + personal_history_vte (2) + syncope (2) + immobility_4w (2) + spo2_percent (<95 3) + calf_pain_or_unilateral_edema (3) + pe_most_likely (5); Roy 2021 Table 3; cpp very_low <0, low 0-5, moderate 6-12, high ≥13; max 22 (age ≥65 plus all positive items; score may be negative)","purpose":"Sum the Roy 2021 Table 3 4-level clinical pretest probability (4PEPS) items and return score and cpp (very_low, low, moderate, or high).","markdown_url":"https://magentlab.com/docs/4peps.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"4peps"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"4PEPS points. May be negative. Theoretical maximum 22 when age ≥65 and all positive items fire."},{"name":"max_score","type":"integer","description":"Always 22 (age ≥65 plus all positive Table 3 items; score may be negative)"},{"name":"cpp","type":"string","description":"Roy 2021 Table 3 clinical probability: very_low when score <0, low when 0-5, moderate when 6-12, high when ≥13. Not a diagnosis."},{"name":"components","type":"array","description":"Per-item points"},{"name":"citation","type":"object","description":"Roy 2021 JAMA Cardiology citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"40","calf_pain_or_unilateral_edema":"false","chest_pain_and_acute_dyspnea":"false","chronic_respiratory_disease":"false","heart_rate_bpm":"90","hormonal_estrogenic_treatment":"false","immobility_4w":"false","pe_most_likely":"false","personal_history_vte":"false","sex":"female","spo2_percent":"98","syncope":"false"},{"age":"40","calf_pain_or_unilateral_edema":"false","chest_pain_and_acute_dyspnea":"false","chronic_respiratory_disease":"false","heart_rate_bpm":"90","hormonal_estrogenic_treatment":"false","immobility_4w":"false","pe_most_likely":"false","personal_history_vte":"false","sex":"female","spo2_percent":"98","syncope":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/4peps","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/4peps?age=40&sex=female&heart_rate_bpm=90&spo2_percent=98&chronic_respiratory_disease=false&chest_pain_and_acute_dyspnea=false&hormonal_estrogenic_treatment=false&personal_history_vte=false&syncope=false&immobility_4w=false&calf_pain_or_unilateral_edema=false&pe_most_likely=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/4peps","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/wells-dvt","description":"Wells deep-vein thrombosis probability from discrete clinical flags. Returns three-tier and two-tier bands. Deterministic published score with citation; not a diagnosis.","parameters":[{"in":"query","name":"active_cancer","type":"boolean","description":"Active cancer (treatment ongoing, within 6 months, or palliative). +1.","required":true,"example":"true"},{"in":"query","name":"paralysis_or_cast","type":"boolean","description":"Paralysis, paresis, or recent plaster immobilization of the legs. +1.","required":true,"example":"false"},{"in":"query","name":"bedridden_or_surgery","type":"boolean","description":"Recently bedridden ≥3 days or major surgery within 12 weeks. +1.","required":true,"example":"false"},{"in":"query","name":"tenderness","type":"boolean","description":"Localized tenderness along the deep venous system. +1.","required":true,"example":"false"},{"in":"query","name":"entire_leg_swollen","type":"boolean","description":"Entire leg swollen. +1.","required":true,"example":"false"},{"in":"query","name":"calf_swelling_gt_3cm","type":"boolean","description":"Calf swelling >3 cm compared with the asymptomatic side. +1.","required":true,"example":"true"},{"in":"query","name":"pitting_edema","type":"boolean","description":"Pitting edema confined to the symptomatic leg. +1.","required":true,"example":"false"},{"in":"query","name":"collateral_veins","type":"boolean","description":"Collateral superficial veins (nonvaricose). +1.","required":true,"example":"false"},{"in":"query","name":"previous_dvt","type":"boolean","description":"Previously documented DVT. +1.","required":true,"example":"false"},{"in":"query","name":"alternative_diagnosis_as_likely","type":"boolean","description":"Alternative diagnosis at least as likely as DVT. −2.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/wells-dvt","citation":{"authors":"Wells PS, Anderson DR, Rodger M, et al.","doi":"10.1056/NEJMoa023153","id":"wells-dvt-2003","source":"N Engl J Med. 2003;349(13):1227-1235","title":"Evaluation of D-dimer in the diagnosis of suspected deep-vein thrombosis","url":"https://doi.org/10.1056/NEJMoa023153"},"formula_expression":"Wells DVT = +1 each of 9 findings; −2 if alternative_diagnosis_as_likely","purpose":"Compute the Wells deep-vein thrombosis probability score and return three-tier and two-tier bands.","markdown_url":"https://magentlab.com/docs/wells-dvt.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"wells_dvt"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Total points (−2 to 9)"},{"name":"max_score","type":"integer","description":"Always 9"},{"name":"three_tier","type":"string","description":"low (≤0), moderate (1-2), high (≥3). Not a diagnosis."},{"name":"two_tier","type":"string","description":"likely (≥2) or unlikely (<2). Not a diagnosis."},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"NEJM 2003 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"active_cancer":"true","alternative_diagnosis_as_likely":"false","bedridden_or_surgery":"false","calf_swelling_gt_3cm":"true","collateral_veins":"false","entire_leg_swollen":"false","paralysis_or_cast":"false","pitting_edema":"false","previous_dvt":"false","tenderness":"false"},{"active_cancer":"true","alternative_diagnosis_as_likely":"false","bedridden_or_surgery":"false","calf_swelling_gt_3cm":"true","collateral_veins":"false","entire_leg_swollen":"false","paralysis_or_cast":"false","pitting_edema":"false","previous_dvt":"false","tenderness":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/wells-dvt","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/wells-dvt?active_cancer=true&paralysis_or_cast=false&bedridden_or_surgery=false&tenderness=false&entire_leg_swollen=false&calf_swelling_gt_3cm=true&pitting_edema=false&collateral_veins=false&previous_dvt=false&alternative_diagnosis_as_likely=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/wells-dvt","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/centor","description":"Centor or McIsaac (age-modified) score for streptococcal pharyngitis from four caller-assigned findings. edition=centor (max 4) or edition=mcisaac (age 3-14 +1, 15-44 0, >=45 -1, max 5) is required; magent does not pick one. Deterministic published score with citation; not a test-or-treat protocol.","parameters":[{"in":"query","name":"edition","type":"string","enum":["centor","mcisaac"],"description":"Published score. Required; magent does not pick Centor (four findings, max 4) or McIsaac (age-modified, max 5).","required":true,"example":"mcisaac"},{"in":"query","name":"age","type":"integer","description":"Age in years (3-120). Required when edition=mcisaac (3-14 +1, 15-44 0, >=45 -1). Ignored when edition=centor.","required":false,"example":"30"},{"in":"query","name":"tonsillar_exudates","type":"boolean","description":"Tonsillar exudates. true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"tender_anterior_cervical_nodes","type":"boolean","description":"Tender anterior cervical nodes. true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"history_of_fever","type":"boolean","description":"History of fever. true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"cough_absent","type":"boolean","description":"Absence of cough. true when cough is absent; false when cough is present.","required":true,"example":"false"}],"errors":[{"code":"invalid_centor_edition","message":"edition must be centor or mcisaac. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_centor_age","message":"age must be an integer from 3 to 120 (McIsaac). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/centor","citation":{"authors":"McIsaac WJ, Kellner JD, Aufricht P, Vanjaka A, Low DE","doi":"10.1001/jama.291.13.1587","id":"mcisaac-2004","source":"JAMA. 2004;291(13):1587-1595","title":"Empirical validation of guidelines for the management of pharyngitis in children and adults","url":"https://doi.org/10.1001/jama.291.13.1587"},"formula_expression":"McIsaac = Centor criteria + age 3-14 +1, 15-44 0, >=45 -1; max 5","purpose":"Compute the Centor score or the McIsaac age-modified score from four caller-assigned pharyngitis findings. The edition is required.","markdown_url":"https://magentlab.com/docs/centor.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"centor or mcisaac"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"edition","type":"string","description":"centor or mcisaac"},{"name":"score","type":"integer","description":"Total points (0-4 Centor; -1 to 5 McIsaac)"},{"name":"max_score","type":"integer","description":"4 (Centor) or 5 (McIsaac)"},{"name":"age_years","type":"integer","description":"Age used for McIsaac bands. Present when edition=mcisaac."},{"name":"components","type":"array","description":"Per-finding points"},{"name":"citation","type":"object","description":"Centor 1981 or McIsaac 2004"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"30","cough_absent":"false","edition":"mcisaac","history_of_fever":"false","tender_anterior_cervical_nodes":"false","tonsillar_exudates":"false"},{"age":"30","cough_absent":"false","edition":"mcisaac","history_of_fever":"false","tender_anterior_cervical_nodes":"false","tonsillar_exudates":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/centor","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/centor?edition=mcisaac&age=30&tonsillar_exudates=false&tender_anterior_cervical_nodes=false&history_of_fever=false&cough_absent=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/centor","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/feverpain","description":"FeverPAIN from Little 2013 (PRISM): five caller-assigned flags (fever in past 24 hours, purulent tonsils, attendance within 3 days, severely inflamed tonsils, no cough or coryza), 1 point each, max 5. Returns published score groups 0-1 / 2-3 / 4-5. Deterministic published score with citation; not a medical device, not a test-or-treat order, and not a diagnosis of streptococcal pharyngitis. magent does not examine the throat.","parameters":[{"in":"query","name":"fever_in_past_24h","type":"boolean","description":"Fever in the past 24 hours (Little 2013). true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"purulent_tonsils","type":"boolean","description":"Purulent tonsils (Little 2013). true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"attends_within_3_days","type":"boolean","description":"Attendance within 3 days of onset (Little 2013). true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"severely_inflamed_tonsils","type":"boolean","description":"Severely inflamed tonsils (Little 2013). true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"no_cough_or_coryza","type":"boolean","description":"Absence of cough or coryza (Little 2013). true when the published finding is present; false otherwise. Assigned by the caller.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/feverpain","citation":{"authors":"Little P, Hobbs FDR, Moore M, et al.","doi":"10.1136/bmj.f5806","id":"little-2013","pmid":"24114306","source":"BMJ. 2013;347:f5806","title":"Clinical score and rapid antigen detection test to guide antibiotic use for sore throats: randomised controlled trial of PRISM (primary care streptococcal management)","url":"https://doi.org/10.1136/bmj.f5806"},"formula_expression":"FeverPAIN = fever_in_past_24h + purulent_tonsils + attends_within_3_days + severely_inflamed_tonsils + no_cough_or_coryza; each 1 if true; max 5","purpose":"Sum the five Little 2013 FeverPAIN flags for sore throat and return the published 0-1 / 2-3 / 4-5 score group.","markdown_url":"https://magentlab.com/docs/feverpain.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"feverpain"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"FeverPAIN points 0-5"},{"name":"max_score","type":"integer","description":"5"},{"name":"band","type":"string","description":"Published Little 2013 score group: 0-1, 2-3, or 4-5. A band, not a test-or-treat order."},{"name":"components","type":"array","description":"Per-finding points"},{"name":"citation","type":"object","description":"Little et al. BMJ 2013 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"attends_within_3_days":"false","fever_in_past_24h":"false","no_cough_or_coryza":"false","purulent_tonsils":"false","severely_inflamed_tonsils":"false"},{"attends_within_3_days":"false","fever_in_past_24h":"false","no_cough_or_coryza":"false","purulent_tonsils":"false","severely_inflamed_tonsils":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/feverpain","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/feverpain?fever_in_past_24h=false&purulent_tonsils=false&attends_within_3_days=false&severely_inflamed_tonsils=false&no_cough_or_coryza=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/feverpain","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/perc","description":"Eight-factor pulmonary embolism rule-out criteria (Kline 2004). PERC-negative only when all eight hold: age <50, pulse <100, SaO2 >94%, and no unilateral leg swelling, hemoptysis, recent trauma or surgery, prior PE or DVT, or hormone use. Caller must already have low pretest probability as in the paper. Not a diagnosis, not a D-dimer protocol, and not altitude-adjusted PERC.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Criterion met when age < 50; 50 does not meet.","required":true,"example":"40"},{"in":"query","name":"heart_rate_bpm","type":"integer","description":"Pulse in beats per minute (integer 30-220). Criterion met when pulse < 100; 100 does not meet.","required":true,"example":"80"},{"in":"query","name":"spo2_percent","type":"number","description":"Oxygen saturation percent (50-100). Criterion met when SaO2 > 94; 94 does not meet.","required":true,"example":"98"},{"in":"query","name":"unilateral_leg_swelling","type":"boolean","description":"Unilateral leg swelling. true or false as assigned by the caller. Criterion met when false.","required":true,"example":"false"},{"in":"query","name":"hemoptysis","type":"boolean","description":"Hemoptysis. true or false as assigned by the caller. Criterion met when false.","required":true,"example":"false"},{"in":"query","name":"recent_surgery_or_trauma","type":"boolean","description":"Recent trauma or surgery. true or false as assigned by the caller. Criterion met when false.","required":true,"example":"false"},{"in":"query","name":"prior_vte","type":"boolean","description":"Prior PE or DVT. true or false as assigned by the caller. Criterion met when false.","required":true,"example":"false"},{"in":"query","name":"estrogen_use","type":"boolean","description":"Hormone or exogenous estrogen use. true or false as assigned by the caller. Criterion met when false.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_heart_rate","message":"heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.","status":400},{"code":"invalid_spo2","message":"spo2_percent must be a number from 50 to 100. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/perc","citation":{"authors":"Kline JA, Mitchell AM, Kabrhel C, Richman PB, Courtney DM","doi":"10.1111/j.1538-7836.2004.00790.x","id":"kline-2004","source":"J Thromb Haemost. 2004;2(8):1247-1255","title":"Clinical criteria to prevent unnecessary diagnostic testing in emergency department patients with suspected pulmonary embolism","url":"https://doi.org/10.1111/j.1538-7836.2004.00790.x"},"formula_expression":"PERC-negative iff age < 50 and pulse < 100 bpm and SaO2 > 94% and no unilateral leg swelling and no hemoptysis and no recent trauma or surgery and no prior PE or DVT and no hormone use","purpose":"Apply the Kline 2004 eight-factor pulmonary embolism rule-out criteria and return whether all eight are met (PERC-negative).","markdown_url":"https://magentlab.com/docs/perc.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"perc"},{"name":"formula_expression","type":"string","description":"Eight Kline 2004 criteria"},{"name":"perc_negative","type":"boolean","description":"true only when all eight criteria are met. Not a diagnosis."},{"name":"criteria","type":"array","description":"Per-factor rows with factor, met, and value when numeric"},{"name":"citation","type":"object","description":"Kline 2004 J Thromb Haemost citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"40","estrogen_use":"false","heart_rate_bpm":"80","hemoptysis":"false","prior_vte":"false","recent_surgery_or_trauma":"false","spo2_percent":"98","unilateral_leg_swelling":"false"},{"age":"40","estrogen_use":"false","heart_rate_bpm":"80","hemoptysis":"false","prior_vte":"false","recent_surgery_or_trauma":"false","spo2_percent":"98","unilateral_leg_swelling":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/perc","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/perc?age=40&heart_rate_bpm=80&spo2_percent=98&unilateral_leg_swelling=false&hemoptysis=false&recent_surgery_or_trauma=false&prior_vte=false&estrogen_use=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/perc","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/perc-altitude","description":"Altitude-adjusted PERC (Madsen 2019). Same eight Kline factors as sea-level PERC except hypoxia is O2 sat <90% at ~4980 ft, not <95%. PERC-negative only when all eight hold: age <50, pulse <100, SaO2 ≥90%, and no unilateral leg swelling, hemoptysis, recent trauma or surgery, prior PE or DVT, or hormone use. Caller must already have low pretest probability as in Kline. Not a PE diagnosis, not sea-level PERC, and not a medical device.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Criterion met when age < 50; 50 does not meet.","required":true,"example":"40"},{"in":"query","name":"heart_rate_bpm","type":"integer","description":"Pulse in beats per minute (integer 30-220). Criterion met when pulse < 100; 100 does not meet.","required":true,"example":"80"},{"in":"query","name":"spo2_percent","type":"number","description":"Oxygen saturation percent (50-100). Criterion met when SaO2 ≥ 90; 89.9 does not meet. Madsen 2019 altitude adjustment, not sea-level PERC >94.","required":true,"example":"90"},{"in":"query","name":"unilateral_leg_swelling","type":"boolean","description":"Unilateral leg swelling. true or false as assigned by the caller. Criterion met when false.","required":true,"example":"false"},{"in":"query","name":"hemoptysis","type":"boolean","description":"Hemoptysis. true or false as assigned by the caller. Criterion met when false.","required":true,"example":"false"},{"in":"query","name":"recent_surgery_or_trauma","type":"boolean","description":"Recent trauma or surgery. true or false as assigned by the caller. Criterion met when false.","required":true,"example":"false"},{"in":"query","name":"prior_vte","type":"boolean","description":"Prior PE or DVT. true or false as assigned by the caller. Criterion met when false.","required":true,"example":"false"},{"in":"query","name":"estrogen_use","type":"boolean","description":"Hormone or exogenous estrogen use. true or false as assigned by the caller. Criterion met when false.","required":true,"example":"false"}],"errors":[{"code":"invalid_perc_altitude","message":"Altitude-adjusted PERC needs age, heart_rate_bpm, spo2_percent, and the five Kline flags (Madsen 2019). Returned before settlement; you are not charged.","status":400},{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_heart_rate","message":"heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.","status":400},{"code":"invalid_spo2","message":"spo2_percent must be a number from 50 to 100. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/perc-altitude","citation":{"authors":"Madsen T, Jedick R, Teeples T, Carlson M, Steenblik J","doi":"10.1016/j.ajem.2018.05.050","id":"madsen-2019","pmid":"29848460","source":"Am J Emerg Med. 2019;37(2):281-285 (Epub 2018 May 24)","title":"Impact of altitude-adjusted hypoxia on the Pulmonary Embolism Rule-out Criteria.","url":"https://doi.org/10.1016/j.ajem.2018.05.050"},"formula_expression":"PERC-negative iff age < 50 and pulse < 100 bpm and SaO2 ≥ 90% and no unilateral leg swelling and no hemoptysis and no recent trauma or surgery and no prior PE or DVT and no hormone use","purpose":"Apply the Madsen 2019 altitude-adjusted eight-factor pulmonary embolism rule-out criteria (hypoxia as O2 sat <90% at ~4980 ft) and return whether all eight are met (PERC-negative).","markdown_url":"https://magentlab.com/docs/perc-altitude.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"perc_altitude"},{"name":"formula_expression","type":"string","description":"Eight Kline factors with Madsen 2019 SaO2 ≥ 90% hypoxia threshold"},{"name":"perc_negative","type":"boolean","description":"true only when all eight criteria are met. Not a diagnosis."},{"name":"criteria","type":"array","description":"Per-factor rows with factor, met, and value when numeric"},{"name":"citation","type":"object","description":"Madsen 2019 Am J Emerg Med citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"40","estrogen_use":"false","heart_rate_bpm":"80","hemoptysis":"false","prior_vte":"false","recent_surgery_or_trauma":"false","spo2_percent":"90","unilateral_leg_swelling":"false"},{"age":"40","estrogen_use":"false","heart_rate_bpm":"80","hemoptysis":"false","prior_vte":"false","recent_surgery_or_trauma":"false","spo2_percent":"90","unilateral_leg_swelling":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/perc-altitude","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/perc-altitude?age=40&heart_rate_bpm=80&spo2_percent=90&unilateral_leg_swelling=false&hemoptysis=false&recent_surgery_or_trauma=false&prior_vte=false&estrogen_use=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/perc-altitude","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/years","description":"YEARS algorithm (van der Hulle 2017 Lancet). Count three caller-assigned items (clinical signs of DVT, hemoptysis, PE most likely) and exclude PE only when D-dimer (ng/mL FEU) is strictly below 1000 with 0 items or 500 with 1-3 items. Equality is not excluded. Not a diagnosis, not Wells, not PERC. magent does not decide PE most likely. The 2017 cohort excluded pregnancy.","parameters":[{"in":"query","name":"clinical_signs_dvt","type":"boolean","description":"Clinical signs of deep-vein thrombosis. true or false as assigned by the caller. Counts as one unweighted YEARS item when true.","required":true,"example":"false"},{"in":"query","name":"hemoptysis","type":"boolean","description":"Hemoptysis. true or false as assigned by the caller. Counts as one unweighted YEARS item when true.","required":true,"example":"false"},{"in":"query","name":"pe_most_likely","type":"boolean","description":"PE is the most likely diagnosis, as assigned by the caller. magent does not decide PE most likely. Counts as one unweighted YEARS item when true.","required":true,"example":"false"},{"in":"query","name":"d_dimer_ng_ml","type":"number","description":"D-dimer in ng/mL fibrinogen-equivalent units (FEU) as in van der Hulle 2017 (0-20000). PE excluded only when strictly below 1000 (0 YEARS items) or 500 (1-3 items). Equality is not excluded.","required":true,"example":"499"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_d_dimer","message":"d_dimer_ng_ml must be a number from 0 to 20000. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/years","citation":{"authors":"van der Hulle T, Cheung WY, Kooij S, et al.","doi":"10.1016/S0140-6736(17)30885-1","id":"van-der-hulle-2017","source":"Lancet. 2017;390(10091):289-297","title":"Simplified diagnostic management of suspected pulmonary embolism (the YEARS study): a prospective, multicentre, cohort study","url":"https://doi.org/10.1016/S0140-6736(17)30885-1"},"formula_expression":"PE excluded iff (years_items == 0 and d_dimer_ng_ml < 1000) or (years_items >= 1 and d_dimer_ng_ml < 500); years_items counts clinical_signs_dvt, hemoptysis, and pe_most_likely","purpose":"Apply the van der Hulle 2017 YEARS algorithm: count three caller-assigned items and return whether PE is excluded at the published D-dimer threshold.","markdown_url":"https://magentlab.com/docs/years.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"years"},{"name":"formula_expression","type":"string","description":"YEARS item count plus strict D-dimer thresholds"},{"name":"years_items","type":"integer","description":"Count of true YEARS items (0-3). Each item is one, not weighted."},{"name":"d_dimer_ng_ml","type":"number","description":"Caller D-dimer in ng/mL FEU"},{"name":"d_dimer_threshold_ng_ml","type":"number","description":"1000.0 when years_items is 0; 500.0 when years_items is 1-3"},{"name":"pe_excluded","type":"boolean","description":"true only when D-dimer is strictly below the item-count threshold. Not a diagnosis."},{"name":"ctpa_indicated","type":"boolean","description":"true when PE is not excluded (not pe_excluded)"},{"name":"criteria","type":"array","description":"Per-item YEARS rows with factor and met (true when that item is present)"},{"name":"citation","type":"object","description":"van der Hulle 2017 Lancet citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"clinical_signs_dvt":"false","d_dimer_ng_ml":"499","hemoptysis":"false","pe_most_likely":"false"},{"clinical_signs_dvt":"false","d_dimer_ng_ml":"499","hemoptysis":"false","pe_most_likely":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/years","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/years?clinical_signs_dvt=false&hemoptysis=false&pe_most_likely=false&d_dimer_ng_ml=499","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/years","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/dash","description":"Tosetto 2012 DASH (D-dimer, Age, Sex, Hormonal therapy) after a first unprovoked VTE: abnormal D-dimer after stopping anticoagulation +2, age <50 +1 (age 50 does not score), male +1, hormone use at the initial VTE in women -2. Score -2 to 4. Returns published recurrence bands <=1, 2, and >=3 without percents. Not a medical device and not a duration-of-anticoagulation order.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Scores 1 when age is <50 (Tosetto 2012). Age 50 does not score.","required":true,"example":"60"},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"female or male. Male scores 1. Hormone use applies only when female.","required":true,"example":"female"},{"in":"query","name":"abnormal_d_dimer","type":"boolean","description":"Abnormal D-dimer after stopping anticoagulation (Tosetto 2012). true or false. 2 points if true.","required":true,"example":"false"},{"in":"query","name":"hormone_use","type":"boolean","description":"Hormone use at the initial VTE. Required. Scores -2 only when sex is female and true. Must be false when sex is male.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_dash_hormone","message":"hormone_use may be true only when sex is female (Tosetto 2012 DASH). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/dash","citation":{"authors":"Tosetto A, Iorio A, Marcucci M, et al.","doi":"10.1111/j.1538-7836.2012.04735.x","id":"tosetto-2012","pmid":"22489957","source":"J Thromb Haemost. 2012;10(6):1019-1025","title":"Predicting disease recurrence in patients with previous unprovoked venous thromboembolism: a proposed prediction score (DASH)","url":"https://doi.org/10.1111/j.1538-7836.2012.04735.x"},"formula_expression":"DASH = 2*abnormal_d_dimer + 1*(age<50) + 1*male + (-2)*hormone_use(female only); max 4; recurrence_band <=1 / 2 / >=3","purpose":"Compute the Tosetto 2012 DASH score (abnormal D-dimer after stopping anticoagulation, age <50, male sex, hormone use at the initial VTE in women) and return the published recurrence band.","markdown_url":"https://magentlab.com/docs/dash.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"dash"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"DASH points from -2 to 4"},{"name":"max_score","type":"integer","description":"4"},{"name":"recurrence_band","type":"string","description":"Tosetto 2012 published annualized-recurrence group: <=1, 2, or >=3. Percents are not returned. Not a stop-or-continue anticoagulation order."},{"name":"age_years","type":"integer","description":"Age used for the <50 criterion"},{"name":"sex","type":"string","description":"female or male"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Tosetto 2012 J Thromb Haemost citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"abnormal_d_dimer":"false","age":"60","hormone_use":"false","sex":"female"},{"abnormal_d_dimer":"false","age":"60","hormone_use":"false","sex":"female"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/dash","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/dash?age=60&sex=female&abnormal_d_dimer=false&hormone_use=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/dash","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/herdoo2","description":"Rodger 2008 HERDOO2 after a first unprovoked VTE. Score 1 each for hyperpigmentation, edema, or redness in either leg; D-dimer ≥250 μg/L while on anticoagulants; BMI ≥30; age ≥65 (equality scores). Max 4. low_risk is true only for women with score ≤1. Men have no low-risk subgroup in the derivation. Not a medical device and not a duration-of-anticoagulation order.","parameters":[{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"female or male. low_risk is true only when female and score ≤1. Men have no low-risk subgroup in Rodger 2008.","required":true,"example":"female"},{"in":"query","name":"her_signs","type":"boolean","description":"Hyperpigmentation, edema, or redness in either leg (Rodger 2008). Caller-assigned. true or false. 1 point if true.","required":true,"example":"false"},{"in":"query","name":"d_dimer_ge_250","type":"boolean","description":"D-dimer ≥250 μg/L while on anticoagulants (Rodger 2008). Caller-assigned; magent does not assay D-dimer. true or false. 1 point if true.","required":true,"example":"false"},{"in":"query","name":"bmi_kg_m2","type":"number","description":"Body-mass index in kg/m^2 (10-80). Caller-supplied; magent does not compute BMI from height and weight. Scores 1 when ≥30. Equality at 30.0 meets.","required":true,"example":"22"},{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Scores 1 when ≥65. Age 65 meets (Rodger 2008).","required":true,"example":"40"}],"errors":[{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_bmi_kg_m2","message":"bmi_kg_m2 must be a number from 10 to 80. Returned before settlement; you are not charged.","status":400},{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/herdoo2","citation":{"authors":"Rodger MA, Kahn SR, Wells PS, Anderson DA, Chagnon I, Le Gal G, Solymoss S, Crowther M, Perrier A, White R, Vickars L, Ramsay T, Betancourt MT, Kovacs MJ","doi":"10.1503/cmaj.080493","id":"rodger-2008","pmid":"18725614","source":"CMAJ. 2008;179(5):417-426","title":"Identifying unprovoked thromboembolism patients at low risk for recurrence who can discontinue anticoagulant therapy","url":"https://doi.org/10.1503/cmaj.080493"},"formula_expression":"HERDOO2 = her_signs + d_dimer_ge_250 + (bmi_kg_m2>=30) + (age>=65); each 1 if true; max 4; low_risk iff female and score<=1 (men have no low-risk subgroup)","purpose":"Compute the Rodger 2008 HERDOO2 score (hyperpigmentation, edema, or redness in either leg; D-dimer ≥250 μg/L while on anticoagulants; BMI ≥30; age ≥65) and return whether the derivation classified the patient as low risk (women with score ≤1 only).","markdown_url":"https://magentlab.com/docs/herdoo2.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"herdoo2"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"HERDOO2 points 0-4"},{"name":"max_score","type":"integer","description":"4"},{"name":"low_risk","type":"boolean","description":"true only when sex is female and score ≤1. False for every male, including score 0. Not a stop-or-continue anticoagulation order."},{"name":"sex","type":"string","description":"female or male"},{"name":"age_years","type":"integer","description":"Age used for the ≥65 criterion"},{"name":"bmi_kg_m2","type":"number","description":"Caller-supplied BMI in kg/m^2 used for the ≥30 criterion"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Rodger 2008 CMAJ citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"40","bmi_kg_m2":"22","d_dimer_ge_250":"false","her_signs":"false","sex":"female"},{"age":"40","bmi_kg_m2":"22","d_dimer_ge_250":"false","her_signs":"false","sex":"female"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/herdoo2","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/herdoo2?sex=female&her_signs=false&d_dimer_ge_250=false&bmi_kg_m2=22&age=40","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/herdoo2","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/age-adjusted-dimer","description":"Age-adjusted D-dimer cutoff (Righini 2014 ADJUST-PE). PE excluded only when D-dimer (ng/mL FEU) is strictly below 500 if age <50 or age×10 if age ≥50. Equality is not excluded. FEU only, not DDU; magent does not convert units. Not a diagnosis, not YEARS, not Wells.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Cutoff is 500 ng/mL FEU when age < 50; age × 10 when age ≥ 50 (age 50 → 500).","required":true,"example":"40"},{"in":"query","name":"d_dimer_ng_ml","type":"number","description":"D-dimer in ng/mL fibrinogen-equivalent units (FEU) as in Righini 2014 (0-20000). PE excluded only when strictly below the age-adjusted cutoff. Equality is not excluded. DDU and other units are not this tool.","required":true,"example":"499"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_d_dimer","message":"d_dimer_ng_ml must be a number from 0 to 20000. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/age-adjusted-dimer","citation":{"authors":"Righini M, Van Es J, Den Exter PL, et al.","doi":"10.1001/jama.2014.2135","id":"righini-2014","source":"JAMA. 2014;311(11):1117-1124","title":"Age-adjusted D-dimer cutoff levels to rule out pulmonary embolism: the ADJUST-PE study","url":"https://doi.org/10.1001/jama.2014.2135"},"formula_expression":"PE excluded iff d_dimer_ng_ml < (500 if age < 50 else age * 10); D-dimer is ng/mL FEU; equality is not excluded","purpose":"Apply the Righini 2014 ADJUST-PE age-adjusted D-dimer cutoff and return whether PE is excluded at the published FEU threshold.","markdown_url":"https://magentlab.com/docs/age-adjusted-dimer.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"age_adjusted_dimer"},{"name":"formula_expression","type":"string","description":"Age-adjusted D-dimer cutoff with a strict less-than FEU threshold"},{"name":"age_years","type":"integer","description":"Caller age in years"},{"name":"d_dimer_ng_ml","type":"number","description":"Caller D-dimer in ng/mL FEU"},{"name":"d_dimer_threshold_ng_ml","type":"number","description":"500.0 when age < 50; age × 10.0 when age ≥ 50"},{"name":"pe_excluded","type":"boolean","description":"true only when D-dimer is strictly below the age-adjusted cutoff. Not a diagnosis."},{"name":"ctpa_indicated","type":"boolean","description":"true when PE is not excluded (not pe_excluded)"},{"name":"criteria","type":"array","description":"age_ge_50 row with factor, met, and value (age)"},{"name":"citation","type":"object","description":"Righini 2014 JAMA ADJUST-PE citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"40","d_dimer_ng_ml":"499"},{"age":"40","d_dimer_ng_ml":"499"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/age-adjusted-dimer","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/age-adjusted-dimer?age=40&d_dimer_ng_ml=499","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/age-adjusted-dimer","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/sofa","description":"SOFA (Sepsis-related Organ Failure Assessment) from Vincent 1996 Table 3: six organs 0-4, max 24, from PaO2/FiO2 with a ventilation gate, platelets, bilirubin, MAP and adrenergic agents, caller-assigned GCS, and creatinine or urine output. Deterministic published score with citation; not a Sepsis-3 diagnosis.","parameters":[{"in":"query","name":"pao2_mm_hg","type":"number","description":"Arterial PaO2 in mm Hg (20-700). Respiration uses PaO2/FiO2: ≥400 scores 0; <400 scores 1; <300 scores 2; <200 with ventilation scores 3; <100 with ventilation scores 4.","required":true,"example":"96"},{"in":"query","name":"fio2","type":"number","description":"Inspired oxygen as a fraction (0.21-1.0), not a percent.","required":true,"example":"0.21"},{"in":"query","name":"ventilated","type":"boolean","description":"Respiratory support (Vincent 1996). true or false. Scores 3 and 4 require ventilation; unventilated PaO2/FiO2 <200 is capped at 2.","required":true,"example":"false"},{"in":"query","name":"platelets_10e9_l","type":"number","description":"Platelets ×10^9/L, same as ×10^3/mm^3 (1-2000). ≥150 scores 0; <150 scores 1; <100 scores 2; <50 scores 3; <20 scores 4.","required":true,"example":"200"},{"in":"query","name":"bilirubin_mg_dl","type":"number","description":"Total bilirubin in mg/dL (0.1-40). Provide this or bilirubin_umol_l. <1.2 scores 0; 1.2-1.9 scores 1; 2.0-5.9 scores 2; 6.0-11.9 scores 3; >12.0 scores 4.","required":false,"example":"0.8"},{"in":"query","name":"bilirubin_umol_l","type":"number","description":"Total bilirubin in µmol/L. Converted as mg/dL = µmol/L / 17.1.","required":false,"example":"17.1"},{"in":"query","name":"map_mm_hg","type":"number","description":"Mean arterial pressure in mm Hg (30-180). MAP <70 scores 1 unless a higher cardiovascular band applies.","required":true,"example":"80"},{"in":"query","name":"dopamine_ug_kg_min","type":"number","description":"Dopamine in µg/kg·min (0-50) when provided. Absent is 0. 0 < dose ≤5 scores 2; >5 scores 3; >15 scores 4.","required":false,"example":"0"},{"in":"query","name":"dobutamine","type":"boolean","description":"Any dobutamine. true or false when provided; absent is false. true scores cardiovascular 2 unless a higher band applies.","required":false,"example":"false"},{"in":"query","name":"epinephrine_ug_kg_min","type":"number","description":"Epinephrine in µg/kg·min (0-2) when provided. Absent is 0. 0 < dose ≤0.1 scores 3; >0.1 scores 4.","required":false,"example":"0"},{"in":"query","name":"norepinephrine_ug_kg_min","type":"number","description":"Norepinephrine in µg/kg·min (0-2) when provided. Absent is 0. 0 < dose ≤0.1 scores 3; >0.1 scores 4.","required":false,"example":"0"},{"in":"query","name":"gcs","type":"integer","description":"Glasgow Coma Scale total as assigned by the caller (integer 3-15). 15 scores 0; 13-14 scores 1; 10-12 scores 2; 6-9 scores 3; <6 scores 4.","required":true,"example":"15"},{"in":"query","name":"creatinine_mg_dl","type":"number","description":"Creatinine in mg/dL (0.1-20). Provide this, creatinine_umol_l, or urine_output_ml_day. <1.2 scores 0; 1.2-1.9 scores 1; 2.0-3.4 scores 2; 3.5-4.9 scores 3; ≥5.0 scores 4.","required":false,"example":"1.0"},{"in":"query","name":"creatinine_umol_l","type":"number","description":"Creatinine in µmol/L. Converted as mg/dL = µmol/L / 88.42.","required":false,"example":"88.42"},{"in":"query","name":"urine_output_ml_day","type":"number","description":"Urine output in mL/day (0-20000) when provided. <200 scores 4; <500 scores 3; otherwise urine does not add 1-2. Renal is the max of creatinine and urine when both are given.","required":false,"example":"1500"}],"errors":[{"code":"invalid_pao2","message":"pao2_mm_hg must be a number from 20 to 700. Returned before settlement; you are not charged.","status":400},{"code":"invalid_fio2","message":"fio2 must be a fraction from 0.21 to 1.0. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_platelets","message":"platelets_10e9_l must be a number from 1 to 2000 Returned before settlement; you are not charged.","status":400},{"code":"invalid_bilirubin","message":"bilirubin_mg_dl (0.1-40) or bilirubin_umol_l (2-684) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_map_mm_hg","message":"map_mm_hg must be a number from 30 to 180. Returned before settlement; you are not charged.","status":400},{"code":"invalid_dopamine","message":"dopamine_ug_kg_min must be a number from 0 to 50 when provided. Returned before settlement; you are not charged.","status":400},{"code":"invalid_epinephrine","message":"epinephrine_ug_kg_min must be a number from 0 to 2 when provided. Returned before settlement; you are not charged.","status":400},{"code":"invalid_norepinephrine","message":"norepinephrine_ug_kg_min must be a number from 0 to 2 when provided. Returned before settlement; you are not charged.","status":400},{"code":"invalid_sofa_gcs","message":"gcs must be an integer from 3 to 15. Returned before settlement; you are not charged.","status":400},{"code":"invalid_creatinine","message":"creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_urine_output","message":"urine_output_ml_day must be a number from 0 to 20000 when provided. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/sofa","citation":{"authors":"Vincent JL, Moreno R, Takala J, Willatts S, De Mendonça A, Bruining H, Reinhart CK, Suter PM, Thijs LG","doi":"10.1007/BF01709751","id":"vincent-1996","source":"Intensive Care Med. 1996;22(7):707-710","title":"The SOFA (Sepsis-related Organ Failure Assessment) score to describe organ dysfunction/failure","url":"https://doi.org/10.1007/BF01709751"},"formula_expression":"SOFA = respiration + coagulation + liver + cardiovascular + cns + renal; each 0-4; max 24","purpose":"Compute the Vincent 1996 SOFA score from PaO2/FiO2, platelets, bilirubin, MAP and adrenergic agents, GCS, and creatinine or urine output.","markdown_url":"https://magentlab.com/docs/sofa.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"sofa"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Total points 0-24"},{"name":"max_score","type":"integer","description":"Always 24"},{"name":"components","type":"array","description":"Per-organ 0-4 points"},{"name":"citation","type":"object","description":"Vincent 1996 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"bilirubin_mg_dl":"0.8","creatinine_mg_dl":"1.0","fio2":"0.21","gcs":"15","map_mm_hg":"80","pao2_mm_hg":"96","platelets_10e9_l":"200","ventilated":"false"},{"bilirubin_mg_dl":"0.8","creatinine_mg_dl":"1.0","fio2":"0.21","gcs":"15","map_mm_hg":"80","pao2_mm_hg":"96","platelets_10e9_l":"200","ventilated":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/sofa","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/sofa?pao2_mm_hg=96&fio2=0.21&ventilated=false&platelets_10e9_l=200&bilirubin_mg_dl=0.8&map_mm_hg=80&gcs=15&creatinine_mg_dl=1.0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/sofa","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/sofa-2","description":"Ranzani 2025 SOFA-2 from six organs 0-4 (brain, respiratory, cardiovascular, liver, kidney, hemostasis), max 24. Maps PaO2/FiO2 or SpO2/FiO2 with NIV/ECMO, MAP and vasopressor dose bands, caller-assigned GCS and delirium-drug flag, bilirubin, platelets, creatinine or urine rate, and RRT. Not Vincent 1996 SOFA and not a diagnosis.","parameters":[{"in":"query","name":"pao2_mm_hg","type":"number","description":"Arterial PaO2 in mm Hg (20-700). Provide this with fio2, or spo2 with fio2 when PaO2 is unavailable. PaO2/FiO2 >300 scores 0; ≤300 scores 1; ≤225 scores 2; ≤150 with advanced ventilatory support scores 3; ≤75 with advanced ventilatory support scores 4. Respiratory ECMO scores 4 regardless of the ratio.","required":false,"example":"96"},{"in":"query","name":"spo2","type":"number","description":"Pulse-oximetry SpO2 as a percent (50-97.9). Used with fio2 only when pao2_mm_hg is absent and SpO2 is <98 (Ranzani 2025). SpO2/FiO2 >300 scores 0; ≤300 scores 1; ≤250 scores 2; ≤200 with advanced ventilatory support scores 3; ≤120 with advanced ventilatory support or ECMO scores 4.","required":false,"example":"96"},{"in":"query","name":"fio2","type":"number","description":"Inspired oxygen as a fraction (0.21-1.0), not a percent.","required":true,"example":"0.21"},{"in":"query","name":"advanced_ventilatory_support","type":"boolean","description":"High-flow nasal cannula, CPAP, bilevel positive airway pressure, noninvasive ventilation, invasive mechanical ventilation, or long-term home ventilation (Ranzani 2025). true or false. Respiratory scores 3 and 4 require this, ventilatory_support_unavailable, or respiratory ECMO.","required":true,"example":"false"},{"in":"query","name":"ecmo","type":"boolean","description":"Respiratory ECMO of any form. true or false when provided; absent is false. true scores respiratory 4 regardless of PaO2/FiO2 or SpO2/FiO2 and does not by itself score cardiovascular points.","required":false,"example":"false"},{"in":"query","name":"ventilatory_support_unavailable","type":"boolean","description":"Advanced ventilatory support not available or precluded by a ceiling of treatment (Ranzani 2025). true or false when provided; absent is false. When true, oxygenation ratios may score 3 or 4 without advanced_ventilatory_support.","required":false,"example":"false"},{"in":"query","name":"platelets_10e9_l","type":"number","description":"Platelets ×10^9/L, same as ×10^3/μL (1-2000). >150 scores 0; ≤150 scores 1; ≤100 scores 2; ≤80 scores 3; ≤50 scores 4.","required":true,"example":"200"},{"in":"query","name":"bilirubin_mg_dl","type":"number","description":"Total bilirubin in mg/dL (0.1-40). Provide this or bilirubin_umol_l. ≤1.20 scores 0; ≤3.0 scores 1; ≤6.0 scores 2; ≤12.0 scores 3; >12.0 scores 4.","required":false,"example":"0.8"},{"in":"query","name":"bilirubin_umol_l","type":"number","description":"Total bilirubin in µmol/L (2-684). ≤20.6 scores 0; ≤51.3 scores 1; ≤102.6 scores 2; ≤205 scores 3; >205 scores 4.","required":false,"example":"13.7"},{"in":"query","name":"map_mm_hg","type":"number","description":"Mean arterial pressure in mm Hg (20-180). MAP <70 with no vasopressor or inotrope scores 1 unless a higher cardiovascular band applies. When vasoactive_unavailable is true, MAP ≥70 scores 0; 60-69 scores 1; 50-59 scores 2; 40-49 scores 3; <40 scores 4.","required":true,"example":"80"},{"in":"query","name":"norepinephrine_ug_kg_min","type":"number","description":"Norepinephrine as the base in µg/kg·min (0-10) when provided. Absent is 0. Summed with epinephrine: >0 to ≤0.2 scores 2; >0.2 to ≤0.4 scores 3; >0.4 scores 4. Low-dose plus any other vasopressor or inotrope scores 3; medium-dose plus any other, or mechanical circulatory support, scores 4.","required":false,"example":"0"},{"in":"query","name":"epinephrine_ug_kg_min","type":"number","description":"Epinephrine in µg/kg·min (0-10) when provided. Absent is 0. Added to norepinephrine for the published dose bands.","required":false,"example":"0"},{"in":"query","name":"dopamine_ug_kg_min","type":"number","description":"Dopamine in µg/kg·min (0-80) when provided. Absent is 0. As a single vasopressor: ≤20 scores 2; >20 to 40 scores 3; >40 scores 4. With norepinephrine, epinephrine, or another agent it counts as an other vasopressor or inotrope.","required":false,"example":"0"},{"in":"query","name":"other_vasopressor_or_inotrope","type":"boolean","description":"Any other vasopressor or inotrope (Ranzani 2025). true or false when provided; absent is false. Any dose scores cardiovascular 2 unless a higher norepinephrine/epinephrine or mechanical band applies.","required":false,"example":"false"},{"in":"query","name":"mechanical_circulatory_support","type":"boolean","description":"Mechanical circulatory support (veno-arterial ECMO, intra-aortic balloon pump, left ventricular assist device, or microaxial flow pump). true or false when provided; absent is false. true scores cardiovascular 4.","required":false,"example":"false"},{"in":"query","name":"vasoactive_unavailable","type":"boolean","description":"Vasoactive drugs unavailable or precluded by a ceiling of treatment (Ranzani 2025). true or false when provided; absent is false. When true, cardiovascular points use the MAP-only cutoffs unless mechanical_circulatory_support is true.","required":false,"example":"false"},{"in":"query","name":"gcs","type":"integer","description":"Glasgow Coma Scale total as assigned by the caller (integer 3-15), including last pre-sedation GCS or the motor scale when the three-domain GCS cannot be evaluated. 15 scores 0; 13-14 scores 1; 9-12 scores 2; 6-8 scores 3; 3-5 scores 4. magent does not examine the patient.","required":true,"example":"15"},{"in":"query","name":"delirium_drugs","type":"boolean","description":"Drugs given to treat delirium (Ranzani 2025). true or false when provided; absent is false. true scores brain at least 1 even if GCS is 15.","required":false,"example":"false"},{"in":"query","name":"creatinine_mg_dl","type":"number","description":"Creatinine in mg/dL (0.1-20). Provide this, creatinine_umol_l, or rrt=true. ≤1.20 scores 0; ≤2.0 scores 1; ≤3.50 scores 2; >3.50 scores 3. Kidney is the max of creatinine, urine, and RRT.","required":false,"example":"1.0"},{"in":"query","name":"creatinine_umol_l","type":"number","description":"Creatinine in µmol/L (9-1768). ≤110 scores 0; ≤170 scores 1; ≤300 scores 2; >300 scores 3.","required":false,"example":"88"},{"in":"query","name":"urine_output_ml_kg_h","type":"number","description":"Urine output in mL/kg/h (0-20) when provided. Provide oliguria_hours with this. <0.5 for 6-12 h scores 1; <0.5 for ≥12 h scores 2; <0.3 for ≥24 h or anuria (0 mL) for ≥12 h scores 3.","required":false,"example":"1.0"},{"in":"query","name":"oliguria_hours","type":"number","description":"Hours at the reported urine_output_ml_kg_h (0-72). Required when urine_output_ml_kg_h is provided.","required":false,"example":"8"},{"in":"query","name":"rrt","type":"boolean","description":"Receiving renal replacement therapy or fulfilling published RRT criteria, including chronic use (Ranzani 2025). true or false when provided; absent is false. true scores kidney 4. Non-renal RRT is not scored; the caller assigns this flag.","required":false,"example":"false"}],"errors":[{"code":"invalid_sofa_2","message":"SOFA-2 needs Ranzani 2025 six organ-system inputs in published ranges. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/sofa-2","citation":{"authors":"Ranzani OT, Singer M, Salluh JIF, Shankar-Hari M, Pilcher D, Berger-Estilita J, Coopersmith CM, Juffermans NP, Laffey J, Reinikainen M, Serpa Neto A, Tavares M, Timsit JF, Arias Lopez MDP, Arulkumaran N, Aryal D, Azoulay E, Celi LA, Chaudhuri D, De Lange D, De Waele J, Dos Santos CC, Du B, Einav S, Engelbrecht T, Fazla F, Ferrer R, Finazzi S, Fujii T, Gershengorn HB, Greene JD, Haniffa R, Hao S, Hasan MS, Hollenberg S, Ippolito M, Jung C, Kirov M, Kobari S, Lakbar I, Lipman J, Liu V, Liu X, Lobo SM, Magatti D, Martin GS, Metnitz B, Metnitz P, Myatra SN, Oczkowski S, Paiva JA, Paruk F, Pekkarinen PT, Piquilloud L, Pölkki A, Prescott HC, Reintam Blaser A, Rezende E, Robba C, Rochwerg B, Ruckly S, Samei R, Schenck EJ, Secombe P, Sendagire C, Siaw-Frimpong M, Simpkin AJ, Soares M, Summers C, Szczeklik W, Takala J, Tanaka S, Tricella G, Vincent JL, Wendon J, Zampieri FG, Rhodes A, Moreno R","doi":"10.1001/jama.2025.20516","id":"ranzani-2025","pmid":"41159833","source":"JAMA. 2025 (SOFA-2)","title":"Development and Validation of the Sequential Organ Failure Assessment (SOFA)-2 Score","url":"https://doi.org/10.1001/jama.2025.20516"},"formula_expression":"SOFA-2 = brain + respiratory + cardiovascular + liver + kidney + hemostasis; each 0-4; max 24","purpose":"Compute the Ranzani 2025 SOFA-2 score from oxygenation (PaO2/FiO2 or SpO2/FiO2), advanced respiratory support or ECMO, MAP and vasopressor doses, caller-assigned GCS, bilirubin, platelets, and creatinine, urine output, or RRT.","markdown_url":"https://magentlab.com/docs/sofa-2.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"sofa_2"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Total points 0-24"},{"name":"max_score","type":"integer","description":"Always 24"},{"name":"components","type":"array","description":"Per-organ 0-4 points"},{"name":"citation","type":"object","description":"Ranzani 2025 JAMA citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"advanced_ventilatory_support":"false","bilirubin_mg_dl":"0.8","creatinine_mg_dl":"1.0","fio2":"0.21","gcs":"15","map_mm_hg":"80","pao2_mm_hg":"96","platelets_10e9_l":"200"},{"advanced_ventilatory_support":"false","bilirubin_mg_dl":"0.8","creatinine_mg_dl":"1.0","fio2":"0.21","gcs":"15","map_mm_hg":"80","pao2_mm_hg":"96","platelets_10e9_l":"200"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/sofa-2","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/sofa-2?pao2_mm_hg=96&fio2=0.21&advanced_ventilatory_support=false&platelets_10e9_l=200&bilirubin_mg_dl=0.8&map_mm_hg=80&gcs=15&creatinine_mg_dl=1.0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/sofa-2","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/qsofa","description":"qSOFA from Seymour 2016: respiratory rate ≥22, caller-assigned altered mentation, and systolic BP ≤100 mm Hg; 1 point each, max 3. Deterministic published score with citation; not a diagnosis of sepsis.","parameters":[{"in":"query","name":"respiratory_rate","type":"integer","description":"Respiratory rate in breaths/min (integer 4-80). ≥22 scores 1.","required":true,"example":"16"},{"in":"query","name":"systolic_mm_hg","type":"number","description":"Systolic blood pressure in mm Hg (50-250). ≤100 scores 1.","required":true,"example":"120"},{"in":"query","name":"altered_mentation","type":"boolean","description":"Altered mentation as assigned by the caller (GCS <15 in Seymour 2016). true or false. magent does not compute GCS here.","required":true,"example":"false"}],"errors":[{"code":"invalid_respiratory_rate","message":"respiratory_rate must be an integer from 4 to 80. Returned before settlement; you are not charged.","status":400},{"code":"invalid_systolic_bp","message":"systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/qsofa","citation":{"authors":"Seymour CW, Liu VX, Iwashyna TJ, Brunkhorst FM, Rea TD, Scherag A, Rubenfeld G, Kahn JM, Shankar-Hari M, Singer M, Deutschman CS, Escobar GJ, Angus DC","doi":"10.1001/jama.2016.0288","id":"seymour-2016","source":"JAMA. 2016;315(8):762-774","title":"Assessment of Clinical Criteria for Sepsis: For the Third International Consensus Definitions for Sepsis and Septic Shock (Sepsis-3)","url":"https://doi.org/10.1001/jama.2016.0288"},"formula_expression":"qSOFA = respiratory_rate_ge_22 + altered_mentation + systolic_mm_hg_le_100; each 1 if present; max 3","purpose":"Compute the Sepsis-3 qSOFA score from respiratory rate, caller-assigned altered mentation, and systolic blood pressure.","markdown_url":"https://magentlab.com/docs/qsofa.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"qsofa"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Total points 0-3"},{"name":"max_score","type":"integer","description":"Always 3"},{"name":"components","type":"array","description":"Per-criterion points"},{"name":"citation","type":"object","description":"Seymour 2016 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"altered_mentation":"false","respiratory_rate":"16","systolic_mm_hg":"120"},{"altered_mentation":"false","respiratory_rate":"16","systolic_mm_hg":"120"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/qsofa","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/qsofa?respiratory_rate=16&systolic_mm_hg=120&altered_mentation=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/qsofa","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/phoenix-sepsis","description":"Schlapbach 2024 Phoenix Sepsis Score (max 13) from four caller-assigned table integers: respiratory 0-3, cardiovascular 0-6 (vasoactives + lactate + age-adjusted MAP), coagulation 0-2, neurologic 0-2. Sepsis if suspected_infection and score ≥2; septic shock if sepsis and cardiovascular ≥1. magent does not take raw labs, P/F, MAP, or GCS. Not Phoenix-8, not adult SOFA, not 2005 Goldstein SIRS sepsis. Not a medical device.","parameters":[{"in":"query","name":"respiratory","type":"integer","description":"Caller-assigned Schlapbach 2024 Phoenix table respiratory integer 0-3. 0: PaO2/FiO2 ≥400 or SpO2/FiO2 ≥292. 1: PaO2/FiO2 <400 or SpO2/FiO2 <292 on any respiratory support. 2: PaO2/FiO2 100-200 and IMV, or SpO2/FiO2 148-220 and IMV. 3: PaO2/FiO2 <100 and IMV, or SpO2/FiO2 <148 and IMV. magent does not take PaO2, SpO2, FiO2, or ventilation.","required":true,"example":"0"},{"in":"query","name":"cardiovascular","type":"integer","description":"Caller-assigned Schlapbach 2024 Phoenix table cardiovascular integer 0-6: sum of vasoactives 0-2 (none / 1 / ≥2 of epinephrine, norepinephrine, dopamine, dobutamine, milrinone, vasopressin) + lactate 0-2 (<5 / 5-10.9 / ≥11 mmol/L) + age-adjusted MAP 0-2. magent does not take vasoactive counts, lactate, MAP, or age.","required":true,"example":"0"},{"in":"query","name":"coagulation","type":"integer","description":"Caller-assigned Schlapbach 2024 Phoenix table coagulation integer 0-2. 1 each for platelets <100 K/μL, INR >1.3, D-dimer >2 mg/L FEU, fibrinogen <100 mg/dL, capped at 2. magent does not take those labs.","required":true,"example":"0"},{"in":"query","name":"neurologic","type":"integer","description":"Caller-assigned Schlapbach 2024 Phoenix table neurologic integer 0-2. GCS ≤10 scores 1; bilaterally fixed pupils scores 2. magent does not take GCS or pupil exam.","required":true,"example":"0"},{"in":"query","name":"suspected_infection","type":"boolean","description":"Suspected or confirmed infection as assigned by the caller (Schlapbach 2024). Sepsis requires this true and Phoenix Sepsis Score ≥2. true or false.","required":true,"example":"true"}],"errors":[{"code":"invalid_phoenix_organ","message":"respiratory must be 0-3, cardiovascular 0-6, coagulation 0-2, and neurologic 0-2 (Schlapbach 2024 Phoenix table). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/phoenix-sepsis","citation":{"authors":"Schlapbach LJ, Watson RS, Sorce LR, et al.","doi":"10.1001/jama.2024.0179","id":"schlapbach-2024","pmid":"38245889","source":"JAMA. 2024;331(8):665-674","title":"International Consensus Criteria for Pediatric Sepsis and Septic Shock","url":"https://doi.org/10.1001/jama.2024.0179"},"formula_expression":"Phoenix Sepsis Score = respiratory (0-3) + cardiovascular (0-6) + coagulation (0-2) + neurologic (0-2); caller-assigned Schlapbach 2024 table integers; max 13; sepsis iff suspected_infection and score >= 2; septic_shock iff sepsis and cardiovascular >= 1","purpose":"Sum four caller-assigned Schlapbach 2024 Phoenix Sepsis Score organ integers and return sepsis (suspected infection and score ≥2) and septic shock (sepsis with cardiovascular ≥1).","markdown_url":"https://magentlab.com/docs/phoenix-sepsis.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"phoenix_sepsis"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Phoenix Sepsis Score 0-13"},{"name":"max_score","type":"integer","description":"13"},{"name":"phoenix_sepsis_score","type":"integer","description":"Same integer as score (Schlapbach 2024 four-organ total, max 13)"},{"name":"sepsis","type":"boolean","description":"true iff suspected_infection and score ≥2 (Schlapbach 2024 Phoenix Pediatric Sepsis Criteria). Not a diagnosis."},{"name":"septic_shock","type":"boolean","description":"true iff sepsis and cardiovascular ≥1 (Schlapbach 2024). Not a diagnosis."},{"name":"category","type":"string","description":"not_sepsis, sepsis (sepsis true and cardiovascular 0), or septic_shock"},{"name":"suspected_infection","type":"boolean","description":"Caller-assigned suspected or confirmed infection"},{"name":"respiratory","type":"integer","description":"Caller-assigned respiratory 0-3"},{"name":"cardiovascular","type":"integer","description":"Caller-assigned cardiovascular 0-6"},{"name":"coagulation","type":"integer","description":"Caller-assigned coagulation 0-2"},{"name":"neurologic","type":"integer","description":"Caller-assigned neurologic 0-2"},{"name":"components","type":"array","description":"Per-organ Phoenix table points"},{"name":"citation","type":"object","description":"Schlapbach et al. JAMA 2024 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"cardiovascular":"0","coagulation":"0","neurologic":"0","respiratory":"0","suspected_infection":"true"},{"cardiovascular":"0","coagulation":"0","neurologic":"0","respiratory":"0","suspected_infection":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/phoenix-sepsis","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/phoenix-sepsis?respiratory=0&cardiovascular=0&coagulation=0&neurologic=0&suspected_infection=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/phoenix-sepsis","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/4c","description":"Knight 2020 ISARIC 4C Mortality Score: age (<50→0, 50–59→2, 60–69→4, 70–79→6, ≥80→7) + male 1 + comorbidity_count (0/1/≥2 → 0/1/2; caller-assigned Charlson-plus-obesity count) + RR (<20→0, 20–29→1, ≥30→2) + room-air SpO2 (<92→2) + GCS (<15→2) + urea (<7→0, 7–14→1, >14→3 mmol/L; or BUN/2.8) + CRP (<50→0, 50–99→1, ≥100→2). Max 21. Table 5: low 0–3, intermediate 4–8, high 9–14, very high ≥15. Not a COVID-19 diagnosis or treatment order.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Knight 2020 Table 2: <50 scores 0; 50–59 scores 2; 60–69 scores 4; 70–79 scores 6; ≥80 scores 7.","required":true,"example":"40"},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"Sex at birth (Knight 2020). female scores 0; male scores 1.","required":true,"example":"female"},{"in":"query","name":"comorbidity_count","type":"integer","description":"Caller-assigned count of Charlson-plus-obesity comorbidities from Knight 2020 (integer 0–20). 0 scores 0; 1 scores 1; ≥2 scores 2. magent does not compute Charlson.","required":true,"example":"0"},{"in":"query","name":"respiratory_rate","type":"integer","description":"Respiratory rate in breaths/min (integer 4–80). Knight 2020: <20 scores 0; 20–29 scores 1; ≥30 scores 2. magent does not measure vitals.","required":true,"example":"16"},{"in":"query","name":"spo2_percent","type":"number","description":"Room-air SpO2 percent (50–100). Knight 2020: ≥92 scores 0; <92 scores 2. magent does not measure saturation.","required":true,"example":"98"},{"in":"query","name":"gcs","type":"integer","description":"Caller-assigned total GCS as an integer 3–15. 15 scores 0; <15 scores 2 (Knight 2020). This API does not collect eye, verbal, or motor components.","required":true,"example":"15"},{"in":"query","name":"urea_mmol_l","type":"number","description":"Serum urea in mmol/L (1–50). Provide this or bun_mg_dl, not both. Knight 2020: <7 scores 0; 7–14 inclusive scores 1; >14 scores 3.","required":false,"example":"5"},{"in":"query","name":"bun_mg_dl","type":"number","description":"BUN in mg/dL (3–140). Converted as urea_mmol_l = bun_mg_dl / 2.8.","required":false,"example":"14"},{"in":"query","name":"crp_mg_l","type":"number","description":"C-reactive protein in mg/L (0–500). Knight 2020: <50 scores 0; 50–99 scores 1; ≥100 scores 2.","required":true,"example":"10"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_comorbidity_count","message":"comorbidities or comorbidity_count must be an integer from 0 to 20 (Heyland 2011 NUTRIC comorbidities; Knight 2020 4C comorbidity_count, caller-assigned Charlson-plus-obesity, not computed). Returned before settlement; you are not charged.","status":400},{"code":"invalid_respiratory_rate","message":"respiratory_rate must be an integer from 4 to 80. Returned before settlement; you are not charged.","status":400},{"code":"invalid_spo2","message":"spo2_percent must be a number from 50 to 100. Returned before settlement; you are not charged.","status":400},{"code":"invalid_gcs_total","message":"gcs must be an integer from 3 to 15. Returned before settlement; you are not charged.","status":400},{"code":"invalid_urea","message":"urea_mmol_l (1-50) or bun_mg_dl (3-140) is required, not both. Returned before settlement; you are not charged.","status":400},{"code":"invalid_crp","message":"crp_mg_l must be a number from 0 to 500. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/4c","citation":{"authors":"Knight SR, Ho A, Pius R, Buchan I, Carson G, Drake TM, Dunning J, Fairfield CJ, Gamble C, Green CA, Gupta R, Halpin S, Hardwick HE, Holden KA, Horby PW, Jackson C, Mclean KA, Merson L, Nguyen-Van-Tam JS, Norman L, Noursadeghi M, Olliaro PL, Pritchard MG, Russell CD, Shaw CA, Sheikh A, Solomon T, Sudlow C, Swann OV, Turtle LCW, Openshaw PJM, Baillie JK, Semple MG, Docherty AB, Harrison EM; ISARIC4C investigators","doi":"10.1136/bmj.m3339","id":"knight-2020","pmid":"32907855","source":"BMJ. 2020;370:m3339","title":"Risk stratification of patients admitted to hospital with covid-19 using the ISARIC WHO Clinical Characterisation Protocol: development and validation of the 4C Mortality Score","url":"https://doi.org/10.1136/bmj.m3339"},"formula_expression":"4C = age (<50 0, 50–59 2, 60–69 4, 70–79 6, ≥80 7) + sex (female 0, male 1) + comorbidity_count (0→0, 1→1, ≥2→2) + respiratory_rate (<20 0, 20–29 1, ≥30 2) + spo2_percent (≥92 0, <92 2) + gcs (15 0, <15 2) + urea_mmol_l (<7 0, 7–14 1, >14 3) + crp_mg_l (<50 0, 50–99 1, ≥100 2); Knight 2020 Table 2; max 21; Table 5 bands low 0–3, intermediate 4–8, high 9–14, very_high ≥15","purpose":"Sum the Knight 2020 ISARIC 4C Mortality Score items and return the published Table 5 band (low, intermediate, high, or very high).","markdown_url":"https://magentlab.com/docs/4c.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"4c"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"4C points 0-21"},{"name":"max_score","type":"integer","description":"Always 21"},{"name":"four_c_band","type":"string","description":"Knight 2020 Table 5 validation mortality band: low (0-3), intermediate (4-8), high (9-14), or very_high (≥15). Not a COVID-19 diagnosis or treatment order."},{"name":"age_years","type":"integer","description":"Age used"},{"name":"sex","type":"string","description":"Sex at birth used (female or male)"},{"name":"comorbidity_count","type":"integer","description":"Caller-assigned Charlson-plus-obesity count used"},{"name":"respiratory_rate","type":"integer","description":"Respiratory rate used"},{"name":"spo2_percent","type":"number","description":"Room-air SpO2 percent used"},{"name":"gcs","type":"integer","description":"Caller-assigned total GCS used"},{"name":"urea_mmol_l","type":"number","description":"Urea in mmol/L used"},{"name":"crp_mg_l","type":"number","description":"CRP in mg/L used"},{"name":"components","type":"array","description":"Per-item points"},{"name":"citation","type":"object","description":"Knight 2020 BMJ citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"40","comorbidity_count":"0","crp_mg_l":"10","gcs":"15","respiratory_rate":"16","sex":"female","spo2_percent":"98","urea_mmol_l":"5"},{"age":"40","comorbidity_count":"0","crp_mg_l":"10","gcs":"15","respiratory_rate":"16","sex":"female","spo2_percent":"98","urea_mmol_l":"5"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/4c","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/4c?age=40&sex=female&comorbidity_count=0&respiratory_rate=16&spo2_percent=98&gcs=15&urea_mmol_l=5&crp_mg_l=10","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/4c","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/priest","description":"Goodacre 2021 PRIEST: NEWS2 Chart 1 Scale 1 vitals (RR, SpO2 Scale 1 only, oxygen +2, temperature, SBP, HR) + alertness (alert 0; confused_or_not_alert 3) + sex (male 1) + age (16–49→0, 50–65→2, 66–80→3, >80→4) + performance 0–4. Max 29. low_adverse_outcome_risk iff score ≤4. Not NEWS2, not 4C, not an admission order.","parameters":[{"in":"query","name":"age_years","type":"integer","description":"Age in years (integer 16-120). Goodacre 2021 PRIEST: 16-49 → 0; 50-65 → 2; 66-80 → 3; >80 → 4. Age 80 scores 3; age 81 scores 4.","required":true,"example":"70"},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"Sex (female or male). Goodacre 2021 PRIEST: female → 0; male → 1.","required":true,"example":"male"},{"in":"query","name":"respiratory_rate","type":"integer","description":"Respiratory rate in breaths/min (integer 0-80). NEWS2 Chart 1 Scale 1 as used in PRIEST: 12-20 → 0; 9-11 → 1; 21-24 → 2; <9 or >24 → 3.","required":true,"example":"16"},{"in":"query","name":"spo2_percent","type":"number","description":"Oxygen saturation percent (50-100). NEWS2 Chart 1 Scale 1 only: >95 → 0; 94-95 → 1; 92-93 → 2; <92 → 3. magent does not implement NEWS2 SpO2 Scale 2.","required":true,"example":"98"},{"in":"query","name":"heart_rate_bpm","type":"integer","description":"Heart rate in beats/min (integer 30-220). NEWS2 Chart 1: 51-90 → 0; 41-50 or 91-110 → 1; 111-130 → 2; <41 or >130 → 3.","required":true,"example":"70"},{"in":"query","name":"systolic_mm_hg","type":"integer","description":"Systolic blood pressure in mm Hg (integer 0-300). NEWS2 Chart 1: 111-219 → 0; 101-110 → 1; 91-100 → 2; <91 or >219 → 3.","required":true,"example":"120"},{"in":"query","name":"temperature_c","type":"number","description":"Temperature in °C (30.0-45.0). NEWS2 Chart 1: 36.1-38.0 → 0; 35.1-36.0 or 38.1-39.0 → 1; >39.0 → 2; <35.1 → 3. magent does not convert Fahrenheit.","required":true,"example":"37.0"},{"in":"query","name":"alertness","type":"string","enum":["alert","confused_or_not_alert"],"description":"Caller-assigned alertness (alert or confused_or_not_alert). Goodacre 2021 PRIEST: alert → 0; confused_or_not_alert → 3. Not full ACVPU and not GCS.","required":true,"example":"alert"},{"in":"query","name":"supplemental_oxygen","type":"boolean","description":"Any supplemental oxygen as assigned by the caller (true or false). NEWS2 Chart 1 inspired oxygen: air/false → 0; supplemental/true → 2.","required":true,"example":"false"},{"in":"query","name":"performance_status","type":"string","enum":["unrestricted","limited_strenuous","limited_activity","limited_self_care","bed_chair_bound"],"description":"Caller-assigned performance (unrestricted, limited_strenuous, limited_activity, limited_self_care, or bed_chair_bound). Goodacre 2021: unrestricted → 0; limited strenuous activity, can do light activity → 1; limited activity, can self-care → 2; limited self-care → 3; bed/chair bound, no self-care → 4.","required":true,"example":"unrestricted"}],"errors":[{"code":"invalid_priest_age","message":"age_years must be an integer from 16 to 120 (Goodacre 2021 PRIEST adults). Returned before settlement; you are not charged.","status":400},{"code":"invalid_priest_performance","message":"performance_status must be unrestricted, limited_strenuous, limited_activity, limited_self_care, or bed_chair_bound (Goodacre 2021 PRIEST). Returned before settlement; you are not charged.","status":400},{"code":"invalid_priest_alertness","message":"alertness must be alert or confused_or_not_alert (Goodacre 2021 PRIEST). Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_heart_rate","message":"heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.","status":400},{"code":"invalid_rts_respiratory_rate","message":"respiratory_rate must be an integer from 0 to 80. Returned before settlement; you are not charged.","status":400},{"code":"invalid_spo2","message":"spo2_percent must be a number from 50 to 100. Returned before settlement; you are not charged.","status":400},{"code":"invalid_temperature","message":"temperature_c must be a number from 30.0 to 45.0. Returned before settlement; you are not charged.","status":400},{"code":"invalid_rts_systolic","message":"systolic_mm_hg must be an integer from 0 to 300. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/priest","citation":{"authors":"Goodacre S, Thomas B, Sutton L, et al.","doi":"10.1371/journal.pone.0245840","id":"goodacre-2021","pmid":"33481930","source":"PLoS One. 2021;16(1):e0245840","title":"Derivation and validation of a clinical severity score for acutely ill adults with suspected COVID-19: The PRIEST observational cohort study","url":"https://doi.org/10.1371/journal.pone.0245840"},"formula_expression":"PRIEST = rr_points + spo2_scale1_points + oxygen_points + temp_points + sbp_points + hr_points + alertness_points + sex_points + age_points + performance_points; NEWS2 Chart 1 Scale 1 vitals (not Scale 2) + age + sex + performance; Goodacre 2021 Fig 2; max 29; low_adverse_outcome_risk iff score ≤4","purpose":"Sum the Goodacre 2021 PRIEST points from NEWS2 Chart 1 Scale 1 vitals, alertness, inspired oxygen, age, sex, and performance status, and return whether the total is ≤4.","markdown_url":"https://magentlab.com/docs/priest.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"priest"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"PRIEST points 0-29"},{"name":"max_score","type":"integer","description":"Always 29"},{"name":"low_adverse_outcome_risk","type":"boolean","description":"true iff score ≤4 (Goodacre 2021: scores of four or less). Not a named high-risk group and not a mortality percent."},{"name":"age_years","type":"integer","description":"Age used, years"},{"name":"sex","type":"string","description":"Sex used (female or male)"},{"name":"respiratory_rate","type":"integer","description":"Respiratory rate used, breaths/min"},{"name":"spo2_percent","type":"number","description":"SpO2 percent used (Scale 1)"},{"name":"heart_rate_bpm","type":"integer","description":"Heart rate used, bpm"},{"name":"systolic_mm_hg","type":"integer","description":"Systolic BP used, mm Hg"},{"name":"temperature_c","type":"number","description":"Temperature used, °C"},{"name":"alertness","type":"string","description":"Caller-assigned alertness used (alert or confused_or_not_alert)"},{"name":"supplemental_oxygen","type":"boolean","description":"Supplemental oxygen flag used"},{"name":"performance_status","type":"string","description":"Caller-assigned performance status used"},{"name":"components","type":"array","description":"Per-item points"},{"name":"citation","type":"object","description":"Goodacre 2021 PLoS One citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age_years":"70","alertness":"alert","heart_rate_bpm":"70","performance_status":"unrestricted","respiratory_rate":"16","sex":"male","spo2_percent":"98","supplemental_oxygen":"false","systolic_mm_hg":"120","temperature_c":"37.0"},{"age_years":"70","alertness":"alert","heart_rate_bpm":"70","performance_status":"unrestricted","respiratory_rate":"16","sex":"male","spo2_percent":"98","supplemental_oxygen":"false","systolic_mm_hg":"120","temperature_c":"37.0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/priest","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/priest?age_years=70&sex=male&respiratory_rate=16&spo2_percent=98&heart_rate_bpm=70&systolic_mm_hg=120&temperature_c=37.0&alertness=alert&supplemental_oxygen=false&performance_status=unrestricted","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/priest","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/chosen","description":"Levine 2020 CHOSEN (COVID Home Safely Now): age 18-45 +5, 46-59 +2, 60-73 +1, >73 +0; SpO2 <94 +0, 94-96 +9, 97-98 +14, >98 +21; albumin g/dL <2.8 +0, 2.8-3.3 +5, 3.4-3.7 +15, >3.7 +29. Score 0-55. Cutpoint 30 (derivation sensitivity 83%, specificity 82%). Higher score favored event-free status in the paper. Not a discharge order.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (integer 18-120). Levine 2020 Figure 2: 18-45 → 5; 46-59 → 2; 60-73 → 1; >73 → 0. Age 73 scores 1; age 74 scores 0. Adults as in the derivation cohort.","required":true,"example":40},{"in":"query","name":"spo2_percent","type":"number","description":"Oxygen saturation percent (50-100). Levine 2020 Figure 2: <94 → 0; 94-96 → 9; 97-98 → 14; >98 → 21. magent does not measure SpO2.","required":true,"example":99},{"in":"query","name":"albumin_g_dl","type":"number","description":"Serum albumin in g/dL (1.0-6.0). Levine 2020 Figure 2: <2.8 → 0; 2.8-3.3 → 5; 3.4-3.7 → 15; >3.7 → 29. Not g/L. magent does not assay albumin.","required":true,"example":4.0}],"errors":[{"code":"invalid_chosen","message":"CHOSEN inputs must match Levine 2020 age, oxygen saturation, and albumin bands. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/chosen","citation":{"authors":"Levine DM, Lipsitz SR, Co Z, Song W, Dykes PC, Samal L","doi":"10.1007/s11606-020-06353-5","id":"levine-2020-chosen","pmid":"33274414","source":"J Gen Intern Med. 2021;36(3):730-737","title":"Derivation of a clinical risk score to predict 14-day occurrence of hypoxia, ICU admission, and death among patients with coronavirus disease 2019","url":"https://doi.org/10.1007/s11606-020-06353-5"},"formula_expression":"CHOSEN = age_points + spo2_points + albumin_points; Levine 2020 Figure 2; age 18-45 → 5, 46-59 → 2, 60-73 → 1, >73 → 0; SpO2 % <94 → 0, 94-96 → 9, 97-98 → 14, >98 → 21; albumin g/dL <2.8 → 0, 2.8-3.3 → 5, 3.4-3.7 → 15, >3.7 → 29; range 0-55; at_or_above_cutpoint iff score ≥30 (derivation sensitivity 83%, specificity 82%)","purpose":"Sum the Levine 2020 CHOSEN (COVID Home Safely Now) Figure 2 points from age, oxygen saturation, and serum albumin in g/dL, and return whether the total is at or above the printed cutpoint of 30.","markdown_url":"https://magentlab.com/docs/chosen.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"chosen"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"CHOSEN points 0-55"},{"name":"max_score","type":"integer","description":"Always 55 (5+21+29)"},{"name":"cutpoint","type":"integer","description":"Levine 2020 printed cutpoint 30"},{"name":"at_or_above_cutpoint","type":"boolean","description":"true iff score ≥30 (Levine 2020 derivation sensitivity 83%, specificity 82%). Not a discharge order."},{"name":"age","type":"integer","description":"Age used, years"},{"name":"spo2_percent","type":"number","description":"Oxygen saturation percent used"},{"name":"albumin_g_dl","type":"number","description":"Serum albumin in g/dL used"},{"name":"components","type":"array","description":"Per-predictor points"},{"name":"citation","type":"object","description":"Levine 2020 JGIM citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"40","albumin_g_dl":"4.0","spo2_percent":"99"},{"age":"40","albumin_g_dl":"4.0","spo2_percent":"99"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/chosen","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/chosen?age=40&spo2_percent=99&albumin_g_dl=4.0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/chosen","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/vaco","description":"King 2020 VACO Index logistic 30-day all-cause mortality from age, sex, caller-assigned unadjusted Charlson comorbidity index, and history of myocardial infarction or peripheral vascular disease. Supplement S3 coefficients. Age 85 or older uses the published combined CCI term. Not VACS Index 1.0 or 2.0, not a diagnosis, and not a treatment order.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (integer 20-120). King 2020 S3 bands: 20-50 (ages 20-49), 50-54, 55-59, 60-64, 65-69, 70-74, 75-79, 80-89, ge90. Age 50 uses 50-54. Age 85-89 keeps the 80-89 age term and the age>=85 CCI term.","required":true,"example":40},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"Sex as assigned by the caller. female is the S3 reference (0). male adds 0.322291449. magent does not assign sex.","required":true,"example":"female"},{"in":"query","name":"cci","type":"integer","description":"Unadjusted Charlson comorbidity index as assigned by the caller (integer 0-37). King 2020 S3: 0 (reference), 1-3, 4-5, 6-9, ge10 when age<85. Age 85 or older uses the published combined CCI term regardless of this integer. magent does not assign Charlson diagnoses.","required":true,"example":0},{"in":"query","name":"mi_pvd","type":"boolean","description":"History of myocardial infarction or peripheral vascular disease as assigned by the caller (true or false). false is the S3 reference (0). true adds 0.267265312.","required":true,"example":false}],"errors":[{"code":"invalid_vaco","message":"VACO Index inputs must match King 2020 age, sex, Charlson comorbidity index, and myocardial infarction or peripheral vascular disease. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/vaco","citation":{"authors":"King JT Jr, Yoon JS, Rentsch CT, Tate JP, Park LS, Kidwai-Khan F, et al.","doi":"10.1371/journal.pone.0241825","id":"king-2020-vaco","pmid":"33175863","source":"PLoS One. 2020;15(11):e0241825","title":"Development and validation of a 30-day mortality index based on pre-existing medical administrative data from 13,323 COVID-19 patients: The Veterans Health Administration COVID-19 (VACO) Index","url":"https://doi.org/10.1371/journal.pone.0241825"},"formula_expression":"lp = intercept + age_term + sex_term + cci_term + mi_pvd_term; probability = exp(lp)/(1+exp(lp)); King 2020 S1 File (PLOS S3); intercept -4.216058062; female 0; male 0.322291449; no MI/PVD 0; MI or PVD 0.267265312; age 20-50 (ages 20-49) -2.228678713, 50-54 0, 55-59 0.400599289, 60-64 0.941322019, 65-69 1.295007128, 70-74 1.629533438, 75-79 1.763345763, 80-89 1.927443543, ge90 2.018752269; age<85 CCI 0 0, 1-3 0.612122574, 4-5 0.825072847, 6-9 0.956099733, ge10 1.395164653; age>=85 any CCI 1.529325519; unadjusted Charlson; not VACS 1.0; not VACS 2.0","purpose":"Compute the King 2020 VACO Index 30-day all-cause mortality probability from age, sex, a caller-assigned unadjusted Charlson comorbidity index, and history of myocardial infarction or peripheral vascular disease using Supplement S3 coefficients.","markdown_url":"https://magentlab.com/docs/vaco.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"vaco"},{"name":"formula_expression","type":"string","description":"King 2020 S3 logistic linear predictor and probability"},{"name":"age","type":"integer","description":"Input age in years"},{"name":"sex","type":"string","description":"female or male"},{"name":"cci","type":"integer","description":"Caller-assigned unadjusted Charlson comorbidity index"},{"name":"mi_pvd","type":"boolean","description":"Caller-assigned history of myocardial infarction or peripheral vascular disease"},{"name":"age_band","type":"string","description":"S3 age band used for the age term (20-50, 50-54, …, ge90)"},{"name":"cci_band","type":"string","description":"S3 CCI band, or age_ge85_any when age is 85 or older"},{"name":"logit","type":"number","description":"Unrounded linear predictor, 6 decimals"},{"name":"estimated_probability_percent","type":"number","description":"30-day all-cause mortality percent from the unrounded logit, 2 decimals"},{"name":"citation","type":"object","description":"King 2020 VACO Index citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"40","cci":"0","mi_pvd":"false","sex":"female"},{"age":"40","cci":"0","mi_pvd":"false","sex":"female"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/vaco","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/vaco?age=40&sex=female&cci=0&mi_pvd=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/vaco","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/utah-covid","description":"Webb 2022 Table 6 simplified score for 14-day hospitalization and 28-day mortality. Age decade lookup 0-10=0.5 through >100=5.5. Two points: diabetes, severe immunocompromise, obesity (BMI ≥30), caller-assigned community of color. One point: male sex, dyspnea, hypertension, CAD, arrhythmia, CHF, CKD, chronic pulmonary, liver, cerebrovascular, neurologic disease. score_ge_6 at Table 7 Youden ≥6. Not a diagnosis or allocation order.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in whole years (0-120). Webb 2022 Table 6 decade lookup: 0-10=0.5, 11-20=1, 21-30=1.5, 31-40=2, 41-50=2.5, 51-60=3, 61-70=3.5, 71-80=4, 81-90=4.5, 91-100=5, >100=5.5. Not floor(age/10)×0.5.","required":true,"example":35},{"in":"query","name":"sex","type":"string","description":"Sex as recorded. Male scores 1 (Webb 2022 Table 6). female or male.","required":true,"example":"female"},{"in":"query","name":"community_of_color","type":"boolean","description":"Caller-assigned: the paper's community of color (self-identifies as non-white race or Hispanic/Latinx ethnicity). 2 points if true. magent does not assign race or ethnicity. true or false.","required":true,"example":false},{"in":"query","name":"diabetes","type":"boolean","description":"Diabetes mellitus (Webb 2022 Table 6 high-risk comorbidity). 2 points if true. true or false.","required":true,"example":false},{"in":"query","name":"severe_immunocompromise","type":"boolean","description":"Severe immunocompromise as Table 6 footnote 2: solid organ or bone marrow transplant, AIDS, active chemotherapy, or inherited immunodeficiency. 2 points if true. Caller-assigned; magent does not adjudicate. true or false.","required":true,"example":false},{"in":"query","name":"obesity","type":"boolean","description":"Obesity as BMI ≥30 kg/m² (Webb 2022 Methods; Table 6 label BMI>30). 2 points if true. Caller-assigned true or false.","required":true,"example":false},{"in":"query","name":"dyspnea","type":"boolean","description":"Dyspnea at the time of testing (Webb 2022 Table 6 symptom). 1 point if true. true or false.","required":true,"example":false},{"in":"query","name":"hypertension","type":"boolean","description":"Hypertension (Webb 2022 Table 6). 1 point if true. true or false.","required":true,"example":false},{"in":"query","name":"coronary_artery_disease","type":"boolean","description":"Coronary artery disease (Webb 2022 Table 6). 1 point if true. true or false.","required":true,"example":false},{"in":"query","name":"cardiac_arrhythmia","type":"boolean","description":"Cardiac arrhythmia (Webb 2022 Table 6). 1 point if true. true or false.","required":true,"example":false},{"in":"query","name":"congestive_heart_failure","type":"boolean","description":"Congestive heart failure (Webb 2022 Table 6). 1 point if true. true or false.","required":true,"example":false},{"in":"query","name":"chronic_kidney_disease","type":"boolean","description":"Chronic kidney disease (Webb 2022 Table 6). 1 point if true. true or false.","required":true,"example":false},{"in":"query","name":"chronic_pulmonary_disease","type":"boolean","description":"Chronic pulmonary disease (Webb 2022 Table 6). 1 point if true. true or false.","required":true,"example":false},{"in":"query","name":"chronic_liver_disease","type":"boolean","description":"Chronic liver disease (Webb 2022 Table 6). 1 point if true. true or false.","required":true,"example":false},{"in":"query","name":"cerebrovascular_disease","type":"boolean","description":"Cerebrovascular disease (Webb 2022 Table 6). 1 point if true. true or false.","required":true,"example":false},{"in":"query","name":"chronic_neurologic_disease","type":"boolean","description":"Chronic neurologic disease (Webb 2022 Table 6). 1 point if true. true or false.","required":true,"example":false}],"errors":[{"code":"invalid_utah_covid","message":"Utah COVID score inputs must match Webb 2022 Table 6 age, sex, caller-assigned community of color, dyspnea, and comorbidity flags. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/utah-covid","citation":{"authors":"Webb BJ, Levin NM, Grisel N, Brown SM, Peltan ID, Spivak ES, et al.","doi":"10.1371/journal.pone.0261508","id":"webb-2022-utah-covid","pmid":"35239664","source":"PLoS One. 2022;17(3):e0261508","title":"Simple scoring tool to estimate risk of hospitalization and mortality in ambulatory and emergency department patients with COVID-19","url":"https://doi.org/10.1371/journal.pone.0261508"},"formula_expression":"Webb 2022 Table 6: age 0-10=0.5, 11-20=1, 21-30=1.5, 31-40=2, 41-50=2.5, 51-60=3, 61-70=3.5, 71-80=4, 81-90=4.5, 91-100=5, >100=5.5 (printed decade lookup, not floor(age/10)*0.5); diabetes, severe immunocompromise, obesity (Methods BMI ≥30; Table 6 label BMI>30), community of color 2 each; male sex, dyspnea, hypertension, CAD, cardiac arrhythmia, CHF, CKD, chronic pulmonary disease, chronic liver disease, cerebrovascular disease, chronic neurologic disease 1 each; max 24.5; score_ge_6 iff score ≥6 (Table 7 Youden)","purpose":"Sum the Webb 2022 Table 6 simplified clinical prediction score from the printed age-decade lookup, caller-assigned community of color, and comorbidity and dyspnea flags, and return whether the total is at or above the Table 7 Youden threshold of 6.","markdown_url":"https://magentlab.com/docs/utah-covid.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"utah-covid"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"number","description":"Webb 2022 Table 6 points 0-24.5"},{"name":"max_score","type":"number","description":"24.5"},{"name":"cutpoint","type":"integer","description":"Table 7 Youden threshold 6 (sensitivity 71.1%, specificity 76.2%)"},{"name":"score_ge_6","type":"boolean","description":"true iff score ≥6 (Webb 2022 Table 7 Youden). Not a treatment-allocation order."},{"name":"age","type":"integer","description":"Age used, years"},{"name":"sex","type":"string","description":"female or male used"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Webb et al. PLoS One 2022 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"35","cardiac_arrhythmia":"false","cerebrovascular_disease":"false","chronic_kidney_disease":"false","chronic_liver_disease":"false","chronic_neurologic_disease":"false","chronic_pulmonary_disease":"false","community_of_color":"false","congestive_heart_failure":"false","coronary_artery_disease":"false","diabetes":"false","dyspnea":"false","hypertension":"false","obesity":"false","severe_immunocompromise":"false","sex":"female"},{"age":"35","cardiac_arrhythmia":"false","cerebrovascular_disease":"false","chronic_kidney_disease":"false","chronic_liver_disease":"false","chronic_neurologic_disease":"false","chronic_pulmonary_disease":"false","community_of_color":"false","congestive_heart_failure":"false","coronary_artery_disease":"false","diabetes":"false","dyspnea":"false","hypertension":"false","obesity":"false","severe_immunocompromise":"false","sex":"female"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/utah-covid","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/utah-covid?age=35&sex=female&community_of_color=false&diabetes=false&severe_immunocompromise=false&obesity=false&dyspnea=false&hypertension=false&coronary_artery_disease=false&cardiac_arrhythmia=false&congestive_heart_failure=false&chronic_kidney_disease=false&chronic_pulmonary_disease=false&chronic_liver_disease=false&cerebrovascular_disease=false&chronic_neurologic_disease=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/utah-covid","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/covid-gram","description":"Liang 2020 COVID-GRAM logistic probability of critical illness (ICU, invasive ventilation, or death) among hospitalized COVID-19 from age, caller-assigned chest radiograph abnormality, hemoptysis, dyspnea, unconsciousness, comorbidity count, cancer history, neutrophil-to-lymphocyte ratio, LDH (U/L), and direct bilirubin (umol/L). Table 3 coefficients. magent does not read the film or count comorbidities. Not a diagnosis or ICU-allocation order.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (integer 1-120). Liang 2020 Table 3: +0.0276 per year (OR 1.03 per year). Development cohort ages 1-95.","required":true,"example":30},{"in":"query","name":"chest_xray_abnormal","type":"boolean","description":"Chest radiograph abnormality as assigned by the caller (true or false). Liang 2020 Table 3: true adds 1.2205 (OR 3.39). magent does not read the film.","required":true,"example":false},{"in":"query","name":"hemoptysis","type":"boolean","description":"Hemoptysis as assigned by the caller (true or false). Liang 2020 Table 3: true adds 1.5116 (OR 4.53).","required":true,"example":false},{"in":"query","name":"dyspnea","type":"boolean","description":"Dyspnea (shortness of breath) as assigned by the caller (true or false). Liang 2020 Table 3: true adds 0.632 (OR 1.88).","required":true,"example":false},{"in":"query","name":"unconsciousness","type":"boolean","description":"Unconsciousness as assigned by the caller (true or false). Liang 2020 Table 3: true adds 1.5494 (OR 4.71).","required":true,"example":false},{"in":"query","name":"number_of_comorbidities","type":"integer","description":"Caller-assigned count of comorbidities as Liang 2020 defined (integer 0-10): COPD, diabetes, hypertension, cardiovascular disease, cerebrovascular disease, hepatitis B, cancer, chronic kidney disease, immunodeficiency. Table 3: +0.4668 per comorbidity (OR 1.60). magent does not count diagnoses.","required":true,"example":0},{"in":"query","name":"cancer_history","type":"boolean","description":"Cancer history as assigned by the caller (true or false). Liang 2020 Table 3: true adds 1.4037 (OR 4.07), separate from the comorbidity count.","required":true,"example":false},{"in":"query","name":"nlr","type":"number","description":"Neutrophil-to-lymphocyte ratio (0.01-200). Liang 2020 Table 3: +0.0562 per unit (OR 1.06). Caller assigns the ratio; magent does not compute it from counts.","required":true,"example":2.0},{"in":"query","name":"ldh_u_l","type":"number","description":"Lactate dehydrogenase in U/L (1-5000). Liang 2020 Table 3: +0.0024 per U/L (OR 1.002). magent does not convert other LDH units.","required":true,"example":150},{"in":"query","name":"direct_bilirubin_umol_l","type":"number","description":"Direct bilirubin in umol/L (0-200). Liang 2020 Table 3: +0.1376 per umol/L (OR 1.15). magent does not convert mg/dL.","required":true,"example":3.0}],"errors":[{"code":"invalid_covid_gram","message":"COVID-GRAM inputs must match Liang 2020 age, radiographic abnormality, symptoms, comorbidities, neutrophil-to-lymphocyte ratio, LDH, and direct bilirubin. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/covid-gram","citation":{"authors":"Liang W, Liang H, Ou L, Chen B, Chen A, Li C, et al.","doi":"10.1001/jamainternmed.2020.2033","id":"liang-2020-covid-gram","pmid":"32396163","source":"JAMA Intern Med. 2020;180(8):1081-1089","title":"Development and Validation of a Clinical Risk Score to Predict the Occurrence of Critical Illness in Hospitalized Patients With COVID-19","url":"https://doi.org/10.1001/jamainternmed.2020.2033"},"formula_expression":"lp = 1.2205*chest_xray_abnormal + 0.0276*age + 1.5116*hemoptysis + 0.632*dyspnea + 1.5494*unconsciousness + 0.4668*number_of_comorbidities + 1.4037*cancer_history + 0.0562*nlr + 0.0024*ldh_u_l + 0.1376*direct_bilirubin_umol_l - 6.6127; probability = exp(lp)/(1+exp(lp)); Liang 2020 Table 3 logistic (printed ORs; intercept -6.6127 matches constant 0.001); critical illness = ICU, invasive ventilation, or death; LDH U/L; direct bilirubin umol/L; magent does not read the chest film or count comorbidities; Liang 2020 did not publish low/medium/high cutoffs","purpose":"Compute the Liang 2020 COVID-GRAM logistic probability of critical illness (ICU admission, invasive ventilation, or death) among hospitalized COVID-19 from age, a caller-assigned chest radiograph abnormality, hemoptysis, dyspnea, unconsciousness, comorbidity count, cancer history, neutrophil-to-lymphocyte ratio, LDH, and direct bilirubin.","markdown_url":"https://magentlab.com/docs/covid-gram.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"covid_gram"},{"name":"formula_expression","type":"string","description":"Liang 2020 Table 3 logistic linear predictor and probability"},{"name":"age","type":"integer","description":"Input age in years"},{"name":"chest_xray_abnormal","type":"boolean","description":"Caller-assigned chest radiograph abnormality"},{"name":"hemoptysis","type":"boolean","description":"Caller-assigned hemoptysis"},{"name":"dyspnea","type":"boolean","description":"Caller-assigned dyspnea"},{"name":"unconsciousness","type":"boolean","description":"Caller-assigned unconsciousness"},{"name":"number_of_comorbidities","type":"integer","description":"Caller-assigned Liang 2020 comorbidity count"},{"name":"cancer_history","type":"boolean","description":"Caller-assigned cancer history"},{"name":"nlr","type":"number","description":"Input neutrophil-to-lymphocyte ratio"},{"name":"ldh_u_l","type":"number","description":"Input LDH in U/L"},{"name":"direct_bilirubin_umol_l","type":"number","description":"Input direct bilirubin in umol/L"},{"name":"logit","type":"number","description":"Unrounded linear predictor, 4 decimals"},{"name":"estimated_probability_percent","type":"number","description":"Critical-illness percent from the unrounded logit, 1 decimal. A probability, not an ICU order."},{"name":"citation","type":"object","description":"Liang 2020 COVID-GRAM citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"30","cancer_history":"false","chest_xray_abnormal":"false","direct_bilirubin_umol_l":"3.0","dyspnea":"false","hemoptysis":"false","ldh_u_l":"150","nlr":"2.0","number_of_comorbidities":"0","unconsciousness":"false"},{"age":"30","cancer_history":"false","chest_xray_abnormal":"false","direct_bilirubin_umol_l":"3.0","dyspnea":"false","hemoptysis":"false","ldh_u_l":"150","nlr":"2.0","number_of_comorbidities":"0","unconsciousness":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/covid-gram","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/covid-gram?age=30&chest_xray_abnormal=false&hemoptysis=false&dyspnea=false&unconsciousness=false&number_of_comorbidities=0&cancer_history=false&nlr=2.0&ldh_u_l=150&direct_bilirubin_umol_l=3.0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/covid-gram","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/circ","description":"Garibaldi 2020 CIRC day-2/4/7 probability of severe disease or death from admission age, nursing-home residence, caller-assigned race term, Charlson CCI, BMI, symptoms, vitals, and listed laboratories. Appendix Table 1 coefficients on the printed reference cumulative incidences. Not a diagnosis, triage order, or the death-only Appendix Table 2 model.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (integer 18-120). Appendix Table 1 bands: <60 (term -0.61), 60-74 (reference 0), >=75 (term -0.71). Derivation excluded ages under 18.","required":true,"example":65},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"Sex as assigned by the caller. female is the Appendix Table 1 reference (0). male adds 0.31 if age<60, -0.47 if age 60-74, 0.10 if age>=75. magent does not assign sex.","required":true,"example":"female"},{"in":"query","name":"race","type":"string","enum":["white","nonwhite"],"description":"Caller-assigned Garibaldi 2020 paper term Non-White race vs White race. white is the reference (0). nonwhite adds 0.08. magent does not assign race.","required":true,"example":"white"},{"in":"query","name":"nursing_home","type":"boolean","description":"Admitted from a nursing home as assigned by the caller. false is the reference (0). true adds -0.24 if age<75, -0.22 if age>=75.","required":true,"example":false},{"in":"query","name":"bmi","type":"number","description":"Body mass index in kg/m2 (10-80). Appendix Table 1: 0.17 per increment of 5 kg/m2 versus the reference BMI of 30. obesity in the response is BMI >= 30.","required":true,"example":30},{"in":"query","name":"cci","type":"integer","description":"Caller-assigned Charlson comorbidity index (integer 0-37). Appendix Table 1 per 1-point: 0.19 if age<60, -0.23 if age 60-74, 0.14 if age>=75. Reference CCI 0. magent does not assign Charlson diagnoses.","required":true,"example":0},{"in":"query","name":"respiratory_symptoms","type":"boolean","description":"Respiratory symptoms present vs absent as assigned by the caller. false is the reference. true adds 0.81.","required":true,"example":false},{"in":"query","name":"gastrointestinal_symptoms","type":"boolean","description":"Gastrointestinal symptoms present vs absent as assigned by the caller. false is the reference. true adds -0.14.","required":true,"example":false},{"in":"query","name":"constitutional_symptoms","type":"boolean","description":"Constitutional symptoms present vs absent as assigned by the caller. false is the reference. true adds -0.57.","required":true,"example":false},{"in":"query","name":"loss_of_taste_smell","type":"boolean","description":"Loss of taste and smell present vs absent as assigned by the caller. false is the reference. true adds -0.30.","required":true,"example":false},{"in":"query","name":"fever","type":"boolean","description":"Temperature >38.0 C within 24 hours of admission as assigned by the caller. false is the reference. true adds 0.56.","required":true,"example":false},{"in":"query","name":"pulse","type":"number","description":"Pulse in beats/min (30-220). Appendix Table 1: -0.02 per increment of 10 versus the reference pulse of 85.","required":true,"example":85},{"in":"query","name":"respiratory_rate","type":"number","description":"Respiratory rate in breaths/min (6-60). Appendix Table 1 linear spline with knot at 18: -0.25 per unit below 18, 0.13 per unit at or above 18. Reference RR 21.","required":true,"example":21},{"in":"query","name":"leukocyte_k","type":"number","description":"Leukocyte count in K cells/mm3 (0.5-100). Appendix Table 1: -0.06 times the natural log. Reference 6.8.","required":true,"example":6.8},{"in":"query","name":"lymphocyte_k","type":"number","description":"Absolute lymphocyte count in K cells/mm3 (0.1-10). Appendix Table 1: -0.29 times the natural log. Reference 1.0.","required":true,"example":1.0},{"in":"query","name":"alt_u_l","type":"number","description":"Alanine aminotransferase in U/L (1-2000). Appendix Table 1: 0.02 times the natural log. Reference 30.0.","required":true,"example":30},{"in":"query","name":"hemoglobin_g_dl","type":"number","description":"Hemoglobin in g/dL (4-20). Appendix Table 1: 0.04 per 1-point decrease versus the reference 12.9 g/dL.","required":true,"example":12.9},{"in":"query","name":"albumin_g_dl","type":"number","description":"Albumin in g/dL (1-6). Appendix Table 1: 0.23 per 0.5 g/dL decrease below 4 g/dL (no term when albumin >= 4). Reference 3.7.","required":true,"example":3.7},{"in":"query","name":"gfr","type":"number","description":"GFR in mL/min per 1.73 m2 (5-150). Appendix Table 1: -0.03 per increase of 10 versus the reference 71.","required":true,"example":71},{"in":"query","name":"crp_mg_dl","type":"number","description":"C-reactive protein in mg/dL (0.1-50). Appendix Table 1: 0.20 times the natural log. Reference 5.7.","required":true,"example":5.7},{"in":"query","name":"ferritin_ng_ml","type":"number","description":"Ferritin in ng/mL (10-20000). Appendix Table 1: 0.11 times the natural log. Reference 545.","required":true,"example":545},{"in":"query","name":"troponin_detectable","type":"boolean","description":"Detectable troponin vs not as assigned by the caller. false is the reference. true adds 0.19 if age<60, 1.36 if age 60-74, 0.35 if age>=75.","required":true,"example":false},{"in":"query","name":"d_dimer_gt_1","type":"boolean","description":"D-dimer above the Appendix Table 1 threshold (>1 mg/dL FEU) as assigned by the caller. false is the reference. true adds 0.24.","required":true,"example":false}],"errors":[{"code":"invalid_circ","message":"CIRC inputs must match Garibaldi 2020 admission age, nursing-home residence, comorbidities, obesity, respiratory findings, and listed laboratory bands. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/circ","citation":{"authors":"Garibaldi BT, Fiksel J, Muschelli J, et al.","doi":"10.7326/M20-3905","id":"garibaldi-2020-circ","pmid":"32960645","source":"Ann Intern Med. 2021;174(1):33-41","title":"Patient Trajectories Among Persons Hospitalized for COVID-19: A Cohort Study","url":"https://doi.org/10.7326/M20-3905"},"formula_expression":"delta = lp(x) - lp(x0); P(t) = 1-(1-P0(t))^exp(delta); Garibaldi 2020 Appendix Table 1 estimates; x0 White female age 60-74 not from a nursing home BMI 30 CCI 0 no symptoms no fever pulse 85 RR 21 leukocyte 6.8 ALC 1.0 ALT 30 albumin 3.7 GFR 71 CRP 5.7 hemoglobin 12.9 ferritin 545 troponin not detectable D-dimer not >1; P0 day2 0.10 day4 0.13 day7 0.15; age<60 -0.61 age>=75 -0.71; NH <75 -0.24 >=75 -0.22; male <60 0.31 60-74 -0.47 >=75 0.10; BMI per 5 0.17; Non-White vs White 0.08 (caller-assigned); CCI per 1 <60 0.19 60-74 -0.23 >=75 0.14; respiratory 0.81 GI -0.14 constitutional -0.57 taste/smell -0.30 fever>38.0 0.56; pulse per 10 -0.02; RR linear spline knot 18: <18 per unit -0.25, >=18 per unit 0.13; ln leukocyte -0.06 ln ALC -0.29 ln ALT 0.02; hemoglobin per 1 g/dL decrease 0.04; albumin per 0.5 g/dL decrease below 4 0.23; GFR per 10 -0.03; ln CRP 0.20 ln ferritin 0.11; troponin detectable <60 0.19 60-74 1.36 >=75 0.35; D-dimer >1 0.24; natural log; not Appendix Table 2 death-only; discharge competing-risk coefficients were not printed","purpose":"Compute Garibaldi 2020 CIRC probabilities of progression to severe disease or death at hospital days 2, 4, and 7 from admission age, nursing-home residence, caller-assigned race term, Charlson CCI, BMI, symptoms, vitals, and listed laboratories using Appendix Table 1 coefficients on the published reference-patient cumulative incidences.","markdown_url":"https://magentlab.com/docs/circ.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"circ"},{"name":"formula_expression","type":"string","description":"Garibaldi 2020 Appendix Table 1 linear predictor and day-2/4/7 CIF"},{"name":"age","type":"integer","description":"Input age in years"},{"name":"sex","type":"string","description":"female or male"},{"name":"race","type":"string","description":"white or nonwhite (caller-assigned)"},{"name":"nursing_home","type":"boolean","description":"Caller-assigned nursing-home flag"},{"name":"bmi","type":"number","description":"Input BMI in kg/m2"},{"name":"cci","type":"integer","description":"Caller-assigned Charlson comorbidity index"},{"name":"respiratory_symptoms","type":"boolean","description":"Caller-assigned respiratory-symptom flag"},{"name":"gastrointestinal_symptoms","type":"boolean","description":"Caller-assigned gastrointestinal-symptom flag"},{"name":"constitutional_symptoms","type":"boolean","description":"Caller-assigned constitutional-symptom flag"},{"name":"loss_of_taste_smell","type":"boolean","description":"Caller-assigned loss-of-taste-and-smell flag"},{"name":"fever","type":"boolean","description":"Caller-assigned fever >38.0 C flag"},{"name":"pulse","type":"number","description":"Input pulse in beats/min"},{"name":"respiratory_rate","type":"number","description":"Input respiratory rate in breaths/min"},{"name":"leukocyte_k","type":"number","description":"Input leukocyte count in K cells/mm3"},{"name":"lymphocyte_k","type":"number","description":"Input absolute lymphocyte count in K cells/mm3"},{"name":"alt_u_l","type":"number","description":"Input ALT in U/L"},{"name":"hemoglobin_g_dl","type":"number","description":"Input hemoglobin in g/dL"},{"name":"albumin_g_dl","type":"number","description":"Input albumin in g/dL"},{"name":"gfr","type":"number","description":"Input GFR in mL/min per 1.73 m2"},{"name":"crp_mg_dl","type":"number","description":"Input CRP in mg/dL"},{"name":"ferritin_ng_ml","type":"number","description":"Input ferritin in ng/mL"},{"name":"troponin_detectable","type":"boolean","description":"Caller-assigned detectable-troponin flag"},{"name":"d_dimer_gt_1","type":"boolean","description":"Caller-assigned D-dimer-above-threshold flag"},{"name":"age_band","type":"string","description":"Appendix Table 1 age band used (lt_60, 60_74, ge_75)"},{"name":"obesity","type":"boolean","description":"true when BMI is 30 kg/m2 or greater"},{"name":"logit_delta","type":"number","description":"lp(x) minus lp of the published reference patient, 4 decimals"},{"name":"day_2_percent","type":"number","description":"Severe disease or death percent by day 2, 1 decimal"},{"name":"day_4_percent","type":"number","description":"Severe disease or death percent by day 4, 1 decimal"},{"name":"day_7_percent","type":"number","description":"Severe disease or death percent by day 7, 1 decimal"},{"name":"citation","type":"object","description":"Garibaldi 2020 CIRC citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"65","albumin_g_dl":"3.7","alt_u_l":"30","bmi":"30","cci":"0","constitutional_symptoms":"false","crp_mg_dl":"5.7","d_dimer_gt_1":"false","ferritin_ng_ml":"545","fever":"false","gastrointestinal_symptoms":"false","gfr":"71","hemoglobin_g_dl":"12.9","leukocyte_k":"6.8","loss_of_taste_smell":"false","lymphocyte_k":"1.0","nursing_home":"false","pulse":"85","race":"white","respiratory_rate":"21","respiratory_symptoms":"false","sex":"female","troponin_detectable":"false"},{"age":"65","albumin_g_dl":"3.7","alt_u_l":"30","bmi":"30","cci":"0","constitutional_symptoms":"false","crp_mg_dl":"5.7","d_dimer_gt_1":"false","ferritin_ng_ml":"545","fever":"false","gastrointestinal_symptoms":"false","gfr":"71","hemoglobin_g_dl":"12.9","leukocyte_k":"6.8","loss_of_taste_smell":"false","lymphocyte_k":"1.0","nursing_home":"false","pulse":"85","race":"white","respiratory_rate":"21","respiratory_symptoms":"false","sex":"female","troponin_detectable":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/circ","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/circ?age=65&sex=female&race=white&nursing_home=false&bmi=30&cci=0&respiratory_symptoms=false&gastrointestinal_symptoms=false&constitutional_symptoms=false&loss_of_taste_smell=false&fever=false&pulse=85&respiratory_rate=21&leukocyte_k=6.8&lymphocyte_k=1.0&alt_u_l=30&hemoglobin_g_dl=12.9&albumin_g_dl=3.7&gfr=71&crp_mg_dl=5.7&ferritin_ng_ml=545&troponin_detectable=false&d_dimer_gt_1=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/circ","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/alvarado","description":"Alvarado 1986 MANTRELS score from caller-assigned findings, temperature, WBC, and neutrophil percent (max 10). Bands 0-4, 5-6, and 7-10. Deterministic published score with citation; not a diagnosis or operating-room protocol. magent does not examine the abdomen.","parameters":[{"in":"query","name":"migration","type":"boolean","description":"Pain migration to the right lower quadrant (M). true or false.","required":true,"example":"false"},{"in":"query","name":"anorexia","type":"boolean","description":"Anorexia (A). true or false.","required":true,"example":"false"},{"in":"query","name":"nausea_vomiting","type":"boolean","description":"Nausea or vomiting (N). true or false.","required":true,"example":"false"},{"in":"query","name":"rlq_tenderness","type":"boolean","description":"Right-lower-quadrant tenderness (T). true scores 2; false scores 0.","required":true,"example":"false"},{"in":"query","name":"rebound","type":"boolean","description":"Rebound tenderness (R). true or false.","required":true,"example":"false"},{"in":"query","name":"temperature_c","type":"number","description":"Temperature in °C (30.0-45.0). ≥37.3 scores 1 (37.3 scores; 37.2 does not).","required":true,"example":"37.0"},{"in":"query","name":"wbc_k_ul","type":"number","description":"WBC in 10^3/µL (same as 10^9/L). Provide wbc_k_ul or wbc_ul. Range 0.01-500. >10000/µL scores 2.","required":false,"example":"8.0"},{"in":"query","name":"wbc_ul","type":"number","description":"WBC in cells/µL (same as cells/mm^3). Provide wbc_k_ul or wbc_ul. Range 10-500000. >10000 scores 2 (10000 does not; 10001 does).","required":false,"example":"8000"},{"in":"query","name":"neutrophil_percent","type":"number","description":"Neutrophil percent (0-100). Left shift scores 1 if >75 (75.0 does not; 75.1 does).","required":true,"example":"60"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_temperature","message":"temperature_c must be a number from 30.0 to 45.0. Returned before settlement; you are not charged.","status":400},{"code":"invalid_wbc","message":"wbc_k_ul (0.01-500) or wbc_ul (10-500000) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_neutrophil_percent","message":"neutrophil_percent must be a number from 0 to 100 Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/alvarado","citation":{"authors":"Alvarado A","doi":"10.1016/S0196-0644(86)80993-3","id":"alvarado-1986","source":"Ann Emerg Med. 1986;15(5):557-564","title":"A practical score for the early diagnosis of acute appendicitis","url":"https://doi.org/10.1016/S0196-0644(86)80993-3"},"formula_expression":"Alvarado (MANTRELS) = migration + anorexia + nausea_vomiting + 2*rlq_tenderness + rebound + (temperature_c >= 37.3) + 2*(wbc_ul > 10000) + (neutrophil_percent > 75); max 10; bands 0-4 / 5-6 / 7-10","purpose":"Compute the Alvarado 1986 MANTRELS score from caller-assigned findings, temperature, WBC, and neutrophil percent.","markdown_url":"https://magentlab.com/docs/alvarado.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"alvarado"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Total points 0-10"},{"name":"max_score","type":"integer","description":"Always 10"},{"name":"alvarado_band","type":"string","description":"0-4, 5-6, or 7-10. Score 0 is grouped with 0-4; original discussion used 1-4."},{"name":"wbc_ul","type":"number","description":"Normalized WBC in cells/µL used for scoring"},{"name":"temperature_c","type":"number","description":"Temperature in °C used for scoring"},{"name":"neutrophil_percent","type":"number","description":"Neutrophil percent used for the left-shift criterion"},{"name":"components","type":"array","description":"Per-factor MANTRELS points"},{"name":"citation","type":"object","description":"Alvarado 1986 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"anorexia":"false","migration":"false","nausea_vomiting":"false","neutrophil_percent":"60","rebound":"false","rlq_tenderness":"false","temperature_c":"37.0","wbc_ul":"8000"},{"anorexia":"false","migration":"false","nausea_vomiting":"false","neutrophil_percent":"60","rebound":"false","rlq_tenderness":"false","temperature_c":"37.0","wbc_ul":"8000"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/alvarado","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/alvarado?migration=false&anorexia=false&nausea_vomiting=false&rlq_tenderness=false&rebound=false&temperature_c=37.0&wbc_ul=8000&neutrophil_percent=60","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/alvarado","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/air","description":"Andersson 2008 appendicitis inflammatory response (AIR) score from caller-assigned vomiting, right-iliac-fossa pain, rebound or guarding (none/light/medium/strong), temperature, WBC, neutrophil percent, and CRP in mg/L (max 12). Bands 0-4, 5-8, and 9-12. Deterministic published score with citation; not a diagnosis or operating-room protocol. magent does not examine the abdomen.","parameters":[{"in":"query","name":"vomiting","type":"boolean","description":"Vomiting (Andersson 2008). true scores 1; false scores 0.","required":true,"example":"false"},{"in":"query","name":"rif_pain","type":"boolean","description":"Pain in the right iliac fossa / right lower quadrant (Andersson 2008). true scores 1; false scores 0.","required":true,"example":"false"},{"in":"query","name":"rebound_or_guarding","type":"string","enum":["none","light","medium","strong"],"description":"Caller-assigned rebound tenderness or muscular guarding (Andersson 2008). none scores 0; light 1; medium 2; strong 3. magent does not examine the abdomen.","required":true,"example":"none"},{"in":"query","name":"temperature_c","type":"number","description":"Temperature in °C (30.0-45.0). ≥38.5 scores 1 (38.5 scores; 38.49 does not).","required":true,"example":"37.0"},{"in":"query","name":"wbc_k_ul","type":"number","description":"WBC in 10^3/µL (same as 10^9/L). Provide wbc_k_ul or wbc_ul. Range 0.01-500. Converted to ×10^9/L: <10 scores 0; 10.0-14.9 scores 1; ≥15.0 scores 2.","required":false,"example":"8.0"},{"in":"query","name":"wbc_ul","type":"number","description":"WBC in cells/µL (same as cells/mm^3). Provide wbc_k_ul or wbc_ul. Range 10-500000. Converted to ×10^9/L (= wbc_ul/1000): <10 scores 0; 10.0-14.9 scores 1; ≥15.0 scores 2.","required":false,"example":"8000"},{"in":"query","name":"neutrophil_percent","type":"number","description":"Neutrophil percent (0-100). <70 scores 0; 70-84 scores 1; ≥85 scores 2 (69.9 does not; 70 and 84 score 1; 85 scores 2).","required":true,"example":"60"},{"in":"query","name":"crp_mg_l","type":"number","description":"C-reactive protein in mg/L (0-500), not mg/dL. <10 scores 0; 10-49 scores 1; ≥50 scores 2 (9.9 does not; 10 and 49 score 1; 50 scores 2).","required":true,"example":"5"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_air_rebound","message":"rebound_or_guarding must be none, light, medium, or strong (Andersson 2008 AIR). Returned before settlement; you are not charged.","status":400},{"code":"invalid_temperature","message":"temperature_c must be a number from 30.0 to 45.0. Returned before settlement; you are not charged.","status":400},{"code":"invalid_wbc","message":"wbc_k_ul (0.01-500) or wbc_ul (10-500000) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_neutrophil_percent","message":"neutrophil_percent must be a number from 0 to 100 Returned before settlement; you are not charged.","status":400},{"code":"invalid_crp","message":"crp_mg_l must be a number from 0 to 500. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/air","citation":{"authors":"Andersson M, Andersson RE","doi":"10.1007/s00268-008-9649-y","id":"andersson-2008","pmid":"18553045","source":"World J Surg. 2008;32(8):1843-1849","title":"The appendicitis inflammatory response score: a tool for the diagnosis of acute appendicitis that outperforms the Alvarado score","url":"https://doi.org/10.1007/s00268-008-9649-y"},"formula_expression":"AIR = vomiting + rif_pain + rebound_or_guarding (none 0, light 1, medium 2, strong 3) + (temperature_c >= 38.5) + WBC 10^9/L (<10 → 0; 10.0–14.9 → 1; ≥15.0 → 2) + neutrophil_percent (<70 → 0; 70–84 → 1; ≥85 → 2) + crp_mg_l (<10 → 0; 10–49 → 1; ≥50 → 2); max 12; bands 0-4 / 5-8 / 9-12","purpose":"Compute the Andersson 2008 appendicitis inflammatory response (AIR) score from caller-assigned findings, temperature, WBC, neutrophil percent, and CRP in mg/L.","markdown_url":"https://magentlab.com/docs/air.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"air"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Total points 0-12"},{"name":"max_score","type":"integer","description":"Always 12"},{"name":"air_band","type":"string","description":"0-4 (low), 5-8 (indeterminate), or 9-12 (high) published Andersson 2008 strata. Not an operate-versus-observe order and not a percent."},{"name":"vomiting","type":"boolean","description":"Parsed vomiting flag"},{"name":"rif_pain","type":"boolean","description":"Parsed right-iliac-fossa pain flag"},{"name":"rebound_or_guarding","type":"string","description":"Canonical none, light, medium, or strong"},{"name":"temperature_c","type":"number","description":"Temperature in °C used for scoring"},{"name":"wbc_ul","type":"number","description":"Normalized WBC in cells/µL used for scoring"},{"name":"wbc_10e9_l","type":"number","description":"WBC converted to ×10^9/L (wbc_ul / 1000) for Andersson 2008 bands"},{"name":"neutrophil_percent","type":"number","description":"Neutrophil percent used for scoring"},{"name":"crp_mg_l","type":"number","description":"CRP in mg/L used for scoring (not mg/dL)"},{"name":"components","type":"array","description":"Per-factor AIR points"},{"name":"citation","type":"object","description":"Andersson 2008 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"crp_mg_l":"5","neutrophil_percent":"60","rebound_or_guarding":"none","rif_pain":"false","temperature_c":"37.0","vomiting":"false","wbc_ul":"8000"},{"crp_mg_l":"5","neutrophil_percent":"60","rebound_or_guarding":"none","rif_pain":"false","temperature_c":"37.0","vomiting":"false","wbc_ul":"8000"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/air","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/air?vomiting=false&rif_pain=false&rebound_or_guarding=none&temperature_c=37.0&wbc_ul=8000&neutrophil_percent=60&crp_mg_l=5","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/air","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/ripasa","description":"Chong 2010 RIPASA score from 15 caller-assigned findings (half-points; max 16). Age <40 scores 1.0, ≥40 scores 0.5; male 1.0, female 0.5; symptoms <48h 1.0, otherwise 0.5. Guarding and Rovsing 2.0 each. Fever, raised WCC, and foreign NRIC are caller-assigned; magent does not apply a °C or WBC cutoff. Derivation ROC: <7.5 below_cutoff, ≥7.5 at_or_above_cutoff. Not a diagnosis or operating-room protocol. magent does not examine the abdomen.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years as an integer from 1 to 120 (Chong 2010). <40 scores 1.0; ≥40 scores 0.5 (age 40 is the ≥40 arm). magent does not assign age.","required":true,"example":"50"},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"Caller-assigned sex (Chong 2010). male scores 1.0; female scores 0.5. magent does not assign sex.","required":true,"example":"female"},{"in":"query","name":"rif_pain","type":"boolean","description":"Pain in the right iliac fossa (Chong 2010). true scores 0.5. magent does not take a history.","required":true,"example":"false"},{"in":"query","name":"migration_to_rif","type":"boolean","description":"Migration of pain to the right iliac fossa (Chong 2010). true scores 0.5. magent does not take a history.","required":true,"example":"false"},{"in":"query","name":"nausea_vomiting","type":"boolean","description":"Nausea or vomiting (Chong 2010). true scores 1.0. magent does not take a history.","required":true,"example":"false"},{"in":"query","name":"anorexia","type":"boolean","description":"Anorexia (Chong 2010). true scores 1.0. magent does not take a history.","required":true,"example":"false"},{"in":"query","name":"symptoms_lt_48h","type":"boolean","description":"true when symptom duration is under 48 hours (Chong 2010 <48h arm, 1.0). false scores 0.5 (the >48h arm; 48 hours is locked to this arm). magent does not timestamp onset.","required":true,"example":"false"},{"in":"query","name":"rif_tenderness","type":"boolean","description":"Right-iliac-fossa tenderness (Chong 2010). true scores 1.0. magent does not examine the abdomen.","required":true,"example":"false"},{"in":"query","name":"guarding","type":"boolean","description":"Guarding (Chong 2010). true scores 2.0. magent does not examine the abdomen.","required":true,"example":"false"},{"in":"query","name":"rebound_tenderness","type":"boolean","description":"Rebound tenderness (Chong 2010). true scores 1.0. magent does not examine the abdomen.","required":true,"example":"false"},{"in":"query","name":"rovsing_sign","type":"boolean","description":"Rovsing sign (Chong 2010). true scores 2.0. magent does not examine the abdomen.","required":true,"example":"false"},{"in":"query","name":"fever","type":"boolean","description":"Caller-assigned fever flag (Chong 2010). true scores 1.0. magent does not apply a °C cutoff.","required":true,"example":"false"},{"in":"query","name":"raised_wcc","type":"boolean","description":"Caller-assigned raised white-cell-count flag (Chong 2010). true scores 1.0. magent does not apply a WBC cutoff.","required":true,"example":"false"},{"in":"query","name":"negative_urinalysis","type":"boolean","description":"Negative urinalysis (Chong 2010). true scores 1.0. magent does not assay urine.","required":true,"example":"false"},{"in":"query","name":"foreign_nric","type":"boolean","description":"Caller-assigned foreign national registration identity card item (Chong 2010). true scores 1.0. magent does not read identity documents.","required":true,"example":"false"}],"errors":[{"code":"invalid_ripasa_age","message":"age must be an integer from 1 to 120 (Chong 2010 RIPASA). Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/ripasa","citation":{"authors":"Chong CF, Adi MIW, Thien A, Suyoi A, Mackie AJ, Tin AS, Tripathi S, Jaman NH, Tan KK, Kok KY, Mathew VV, Paw O, Chua HB, Yapp SK","id":"chong-2010","pmid":"20428744","source":"Singapore Med J. 2010;51(3):220-225","title":"Development of the RIPASA score: a new appendicitis scoring system for the diagnosis of acute appendicitis","url":"https://pubmed.ncbi.nlm.nih.gov/20428744"},"formula_expression":"RIPASA = (age<40 → 1.0; age≥40 → 0.5) + (male 1.0; female 0.5) + 0.5*rif_pain + 0.5*migration_to_rif + nausea_vomiting + anorexia + (symptoms_lt_48h 1.0; else 0.5) + rif_tenderness + 2*guarding + rebound_tenderness + 2*rovsing_sign + fever + raised_wcc + negative_urinalysis + foreign_nric; Chong 2010; max 16; <7.5 below_cutoff, ≥7.5 at_or_above_cutoff","purpose":"Sum the Chong 2010 RIPASA points from 15 caller-assigned findings and return below_cutoff (<7.5) or at_or_above_cutoff (≥7.5) from the derivation ROC only.","markdown_url":"https://magentlab.com/docs/ripasa.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"ripasa"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"number","description":"Chong 2010 RIPASA points 0.5-16, 0.5 steps"},{"name":"max_score","type":"integer","description":"Always 16"},{"name":"ripasa_band","type":"string","description":"below_cutoff when score is <7.5, at_or_above_cutoff when score is ≥7.5 (Chong 2010 derivation ROC). Not an appendicitis diagnosis."},{"name":"age","type":"integer","description":"Age in years used for the <40 / ≥40 split"},{"name":"sex","type":"string","description":"female or male"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Chong 2010 Singapore Med J citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"50","anorexia":"false","fever":"false","foreign_nric":"false","guarding":"false","migration_to_rif":"false","nausea_vomiting":"false","negative_urinalysis":"false","raised_wcc":"false","rebound_tenderness":"false","rif_pain":"false","rif_tenderness":"false","rovsing_sign":"false","sex":"female","symptoms_lt_48h":"false"},{"age":"50","anorexia":"false","fever":"false","foreign_nric":"false","guarding":"false","migration_to_rif":"false","nausea_vomiting":"false","negative_urinalysis":"false","raised_wcc":"false","rebound_tenderness":"false","rif_pain":"false","rif_tenderness":"false","rovsing_sign":"false","sex":"female","symptoms_lt_48h":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/ripasa","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/ripasa?age=50&sex=female&rif_pain=false&migration_to_rif=false&nausea_vomiting=false&anorexia=false&symptoms_lt_48h=false&rif_tenderness=false&guarding=false&rebound_tenderness=false&rovsing_sign=false&fever=false&raised_wcc=false&negative_urinalysis=false&foreign_nric=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/ripasa","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/spesi","description":"sPESI (simplified Pulmonary Embolism Severity Index) from Jiménez 2010: 1 point each for age >80, cancer, chronic cardiopulmonary disease (one combined item), heart rate ≥110, systolic BP <100 mm Hg, and SpO2 <90%; max 6. Score 0 is low risk; ≥1 is high risk. Only for already diagnosed acute PE as in the paper. Not a diagnosis, not an outpatient-treatment protocol, and not original PESI classes.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Scores 1 when age >80; 80 does not score.","required":true,"example":"70"},{"in":"query","name":"cancer","type":"boolean","description":"Active cancer as assigned by the caller. true or false. 1 point if true.","required":true,"example":"false"},{"in":"query","name":"chronic_cardiopulmonary_disease","type":"boolean","description":"Chronic cardiopulmonary disease as one combined flag (heart failure and chronic lung disease were combined in Jiménez 2010). true or false. 1 point if true.","required":true,"example":"false"},{"in":"query","name":"heart_rate_bpm","type":"integer","description":"Heart rate in beats per minute (integer 30-220). Scores 1 when ≥110; 109 does not score.","required":true,"example":"80"},{"in":"query","name":"systolic_mm_hg","type":"number","description":"Systolic blood pressure in mm Hg (50-250). Scores 1 when <100; 100 does not score.","required":true,"example":"120"},{"in":"query","name":"spo2_percent","type":"number","description":"Oxygen saturation percent (50-100). Scores 1 when <90; 90 does not score.","required":true,"example":"96"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_heart_rate","message":"heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.","status":400},{"code":"invalid_systolic_bp","message":"systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.","status":400},{"code":"invalid_spo2","message":"spo2_percent must be a number from 50 to 100. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/spesi","citation":{"authors":"Jiménez D, Aujesky D, Moores L, et al.","doi":"10.1001/archinternmed.2010.199","id":"jimenez-2010","source":"Arch Intern Med. 2010;170(15):1383-1389","title":"Simplification of the pulmonary embolism severity index for prognostication in patients with acute symptomatic pulmonary embolism","url":"https://doi.org/10.1001/archinternmed.2010.199"},"formula_expression":"sPESI = age_gt_80 + cancer + chronic_cardiopulmonary_disease + heart_rate_ge_110 + systolic_mm_hg_lt_100 + spo2_lt_90; each 1 if present; max 6; 0 low, >=1 high","purpose":"Compute the Jiménez 2010 simplified Pulmonary Embolism Severity Index (sPESI) from age and five caller-assigned findings.","markdown_url":"https://magentlab.com/docs/spesi.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"spesi"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Total points 0-6"},{"name":"max_score","type":"integer","description":"Always 6"},{"name":"spesi_risk","type":"string","description":"low when score is 0; high when score is ≥1. Not original PESI classes."},{"name":"age_years","type":"integer","description":"Age used for the >80 criterion"},{"name":"components","type":"array","description":"Per-item points"},{"name":"citation","type":"object","description":"Jiménez 2010 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"70","cancer":"false","chronic_cardiopulmonary_disease":"false","heart_rate_bpm":"80","spo2_percent":"96","systolic_mm_hg":"120"},{"age":"70","cancer":"false","chronic_cardiopulmonary_disease":"false","heart_rate_bpm":"80","spo2_percent":"96","systolic_mm_hg":"120"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/spesi","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/spesi?age=70&cancer=false&chronic_cardiopulmonary_disease=false&heart_rate_bpm=80&systolic_mm_hg=120&spo2_percent=96","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/spesi","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/pesi","description":"PESI (Pulmonary Embolism Severity Index) from Aujesky 2005: age in years plus male sex (+10), cancer (+30), heart failure (+10), chronic lung disease (+10), heart rate >=110 (+20), SBP <100 mm Hg (+30), respiratory rate >=30 (+20), temperature <36 C (+20), altered mental status (+60), and SpO2 <90% (+20). Classes I (<=65) through V (>125). Only for already diagnosed PE. Not a diagnosis, not an outpatient protocol, not sPESI, and not the 17-variable laboratory model.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Adds 1 point per year (the age integer itself).","required":true,"example":"50"},{"in":"query","name":"sex","type":"string","description":"Sex (female or male). Male scores +10.","required":true,"example":"female"},{"in":"query","name":"cancer","type":"boolean","description":"Cancer as assigned by the caller. true or false. +30 if true.","required":true,"example":"false"},{"in":"query","name":"heart_failure","type":"boolean","description":"Heart failure as assigned by the caller (separate from chronic lung disease). true or false. +10 if true.","required":true,"example":"false"},{"in":"query","name":"chronic_lung_disease","type":"boolean","description":"Chronic lung disease as assigned by the caller (separate from heart failure). true or false. +10 if true.","required":true,"example":"false"},{"in":"query","name":"heart_rate_bpm","type":"integer","description":"Heart rate in beats per minute (integer 30-220). Scores +20 when ≥110; 109 does not score.","required":true,"example":"80"},{"in":"query","name":"systolic_mm_hg","type":"number","description":"Systolic blood pressure in mm Hg (50-250). Scores +30 when <100; 100 does not score.","required":true,"example":"120"},{"in":"query","name":"respiratory_rate","type":"integer","description":"Respiratory rate in breaths/min (integer 4-80). Scores +20 when ≥30; 29 does not score.","required":true,"example":"16"},{"in":"query","name":"temperature_c","type":"number","description":"Temperature in °C (30-45). Scores +20 when <36; 36.0 does not score.","required":true,"example":"37.0"},{"in":"query","name":"altered_mentation","type":"boolean","description":"Altered mental status as assigned by the caller. true or false. +60 if true.","required":true,"example":"false"},{"in":"query","name":"spo2_percent","type":"number","description":"Arterial oxygen saturation percent (50-100). Scores +20 when <90; 90 does not score.","required":true,"example":"96"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_heart_rate","message":"heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.","status":400},{"code":"invalid_systolic_bp","message":"systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.","status":400},{"code":"invalid_respiratory_rate","message":"respiratory_rate must be an integer from 4 to 80. Returned before settlement; you are not charged.","status":400},{"code":"invalid_temperature","message":"temperature_c must be a number from 30.0 to 45.0. Returned before settlement; you are not charged.","status":400},{"code":"invalid_spo2","message":"spo2_percent must be a number from 50 to 100. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/pesi","citation":{"authors":"Aujesky D, Obrosky DS, Stone RA, et al.","doi":"10.1164/rccm.200506-862OC","id":"aujesky-2005","source":"Am J Respir Crit Care Med. 2005;172(8):1041-1046","title":"Derivation and validation of a prognostic model for pulmonary embolism","url":"https://doi.org/10.1164/rccm.200506-862OC"},"formula_expression":"PESI = age_in_years + 10*male + 30*cancer + 10*heart_failure + 10*chronic_lung_disease + 20*(HR>=110) + 30*(SBP<100) + 20*(RR>=30) + 20*(temp<36) + 60*altered_mentation + 20*(SpO2<90); classes I <=65, II 66-85, III 86-105, IV 106-125, V >125","purpose":"Compute the Aujesky 2005 Pulmonary Embolism Severity Index (PESI) from age, sex, comorbidities, vital signs, and altered mental status.","markdown_url":"https://magentlab.com/docs/pesi.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"pesi"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Total points (age in years plus weights)"},{"name":"pesi_class","type":"string","description":"I if score ≤65; II 66-85; III 86-105; IV 106-125; V if >125"},{"name":"age_years","type":"integer","description":"Age added as points"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Aujesky 2005 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"50","altered_mentation":"false","cancer":"false","chronic_lung_disease":"false","heart_failure":"false","heart_rate_bpm":"80","respiratory_rate":"16","sex":"female","spo2_percent":"96","systolic_mm_hg":"120","temperature_c":"37.0"},{"age":"50","altered_mentation":"false","cancer":"false","chronic_lung_disease":"false","heart_failure":"false","heart_rate_bpm":"80","respiratory_rate":"16","sex":"female","spo2_percent":"96","systolic_mm_hg":"120","temperature_c":"37.0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/pesi","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/pesi?age=50&sex=female&cancer=false&heart_failure=false&chronic_lung_disease=false&heart_rate_bpm=80&systolic_mm_hg=120&respiratory_rate=16&temperature_c=37.0&altered_mentation=false&spo2_percent=96","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/pesi","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/pompe-c","description":"Kline 2012 POMPE-C 30-day mortality probability for active cancer plus acute PE. Logistic from DNR, respiratory distress, unilateral limb swelling, altered mental status, heart rate >99, respiratory rate, room-air SpO2, and weight in pounds (intercept 3.718). Bands: low <=5%, high >50%, else intermediate. Not a PE or cancer diagnosis, not integer points, not a dose.","parameters":[{"in":"query","name":"dnr","type":"boolean","description":"Do-not-resuscitate status as assigned by the caller (Kline 2012: new or existing verbal or written desire not to be resuscitated). true or false. magent does not read an advance directive.","required":true,"example":"false"},{"in":"query","name":"respiratory_distress","type":"boolean","description":"Respiratory distress as assigned by the caller (Kline 2012: obvious anxiety from dyspnea or increased work of breathing). true or false. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"unilateral_leg_swelling","type":"boolean","description":"Unilateral limb swelling as assigned by the caller (Kline 2012: new noticeable arm or leg asymmetry). true or false. magent does not examine the limbs.","required":true,"example":"false"},{"in":"query","name":"altered_mental_status","type":"boolean","description":"Altered mental status as assigned by the caller (Kline 2012: acute impairment in consciousness, new disorientation, delirium, or confusion). true or false. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"heart_rate_gt_99","type":"boolean","description":"Heart rate documented over 99 beats/min in the previous six hours, as assigned by the caller. true or false. magent does not take a pulse.","required":true,"example":"false"},{"in":"query","name":"respiratory_rate","type":"integer","description":"Highest documented respiratory rate in breaths/min within the previous six hours (integer 4-80). Continuous predictor in the Kline 2012 prototype logistic.","required":true,"example":"18"},{"in":"query","name":"spo2_percent","type":"number","description":"Most recent pulse oximetry on room air, percent (50-100). Continuous predictor in the Kline 2012 prototype logistic. magent does not measure saturation.","required":true,"example":"97"},{"in":"query","name":"weight_lb","type":"number","description":"Body weight in pounds (2-1100), measured or by patient estimate as in Kline 2012. Pounds enter the logistic directly. magent does not convert from kilograms.","required":true,"example":"170"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_respiratory_rate","message":"respiratory_rate must be an integer from 4 to 80. Returned before settlement; you are not charged.","status":400},{"code":"invalid_spo2","message":"spo2_percent must be a number from 50 to 100. Returned before settlement; you are not charged.","status":400},{"code":"invalid_weight","message":"weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/pompe-c","citation":{"authors":"Kline JA, Roy PM, Than MP, Hernandez J, Courtney DM, Jones AE, Penaloza A, Pollack CV Jr","doi":"10.1016/j.thromres.2012.03.015","id":"kline-2012","pmid":"22475313","source":"Thromb Res. 2012;129(5):e194-e199","title":"Derivation and validation of a multivariate model to predict mortality from pulmonary embolism with cancer: The POMPE-C tool","url":"https://doi.org/10.1016/j.thromres.2012.03.015"},"formula_expression":"mortality_pct = 100 * (1 - 1 / (1 + exp(3.718 + 1.551*dnr + 0.800*respiratory_distress + 0.734*unilateral_leg_swelling + 1.473*altered_mental_status + 1.027*heart_rate_gt_99 + 0.044*respiratory_rate + (-0.063)*spo2_percent + (-0.012)*weight_lb))); Kline 2012 web-prototype logistic (intercept 3.718); heart_rate_gt_99 coefficient 1.027 from Table 2 (OR 2.8) because the manuscript prototype line-wraps as + HR; flags 1 if true else 0; low if mortality_pct <= 5, high if > 50, else intermediate; 30-day all-cause mortality probability for active cancer + acute PE; not integer points","purpose":"Compute the Kline 2012 POMPE-C 30-day mortality probability for a caller who already has active cancer and acute pulmonary embolism, from five dichotomous findings plus respiratory rate, room-air SpO2, and weight in pounds.","markdown_url":"https://magentlab.com/docs/pompe-c.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"pompe_c"},{"name":"formula_expression","type":"string","description":"Kline 2012 web-prototype logistic expression"},{"name":"dnr","type":"boolean","description":"Do-not-resuscitate flag used"},{"name":"respiratory_distress","type":"boolean","description":"Respiratory-distress flag used"},{"name":"unilateral_leg_swelling","type":"boolean","description":"Unilateral limb-swelling flag used"},{"name":"altered_mental_status","type":"boolean","description":"Altered-mental-status flag used"},{"name":"heart_rate_gt_99","type":"boolean","description":"Heart-rate-over-99 flag used"},{"name":"respiratory_rate","type":"integer","description":"Respiratory rate in breaths/min used"},{"name":"spo2_percent","type":"number","description":"Room-air pulse oximetry percent used"},{"name":"weight_lb","type":"number","description":"Body weight in pounds used"},{"name":"logit","type":"number","description":"Kline 2012 prototype linear predictor, 4 decimal places"},{"name":"mortality_pct","type":"number","description":"Estimated 30-day all-cause mortality probability in percent (0-100), 1 decimal. Not a survival percent."},{"name":"risk_band","type":"string","description":"Kline 2012 validation cutoffs: low if mortality_pct <= 5, high if > 50, else intermediate. A band, not a treatment order."},{"name":"citation","type":"object","description":"Kline et al. Thromb Res 2012 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"altered_mental_status":"false","dnr":"false","heart_rate_gt_99":"false","respiratory_distress":"false","respiratory_rate":"18","spo2_percent":"97","unilateral_leg_swelling":"false","weight_lb":"170"},{"altered_mental_status":"false","dnr":"false","heart_rate_gt_99":"false","respiratory_distress":"false","respiratory_rate":"18","spo2_percent":"97","unilateral_leg_swelling":"false","weight_lb":"170"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/pompe-c","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/pompe-c?dnr=false&respiratory_distress=false&unilateral_leg_swelling=false&altered_mental_status=false&heart_rate_gt_99=false&respiratory_rate=18&spo2_percent=97&weight_lb=170","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/pompe-c","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/bova","description":"Bova 2014 seven-point index for confirmed acute PE that is not hypotensive: SBP 90–100 mm Hg +2 (SBP 100 scores; 101 does not; SBP <90 rejected), elevated troponin +2 (caller-assigned lab cutoff; magent does not grade assays), RV dysfunction on echo or CT +2, heart rate ≥110 +1 (110 scores; 109 does not). Max 7. Returns bands 0-2 / 3-4 / >4 (stages I–III) without mortality percents. Not a medical device and not a thrombolysis order.","parameters":[{"in":"query","name":"systolic_mm_hg","type":"number","description":"Systolic blood pressure in mm Hg (90-250). Scores 2 when 90-100 inclusive (Bova 2014 Table 5). SBP 100 scores; SBP 101 does not. SBP <90 is rejected (normotensive PE cohort).","required":true,"example":"120"},{"in":"query","name":"elevated_troponin","type":"boolean","description":"Elevated cardiac troponin as assigned by the caller at the local lab cutoff (Bova 2014). true or false. 2 points if true. magent does not grade troponin ng/mL.","required":true,"example":"false"},{"in":"query","name":"rv_dysfunction","type":"boolean","description":"Right-ventricular dysfunction on echocardiography or CT as assigned by the caller (Bova 2014). true or false. 2 points if true.","required":true,"example":"false"},{"in":"query","name":"heart_rate_bpm","type":"integer","description":"Heart rate in beats per minute (integer 30-220). Scores 1 when ≥110 (Bova 2014 Table 5). HR 110 scores; HR 109 does not.","required":true,"example":"80"}],"errors":[{"code":"invalid_bova_systolic","message":"systolic_mm_hg must be 90-250 (Bova 2014 is for normotensive PE; SBP <90 is not scored). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_heart_rate","message":"heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/bova","citation":{"authors":"Bova C, Sanchez O, Prandoni P, et al.","doi":"10.1183/09031936.00006114","id":"bova-2014","pmid":"24696111","source":"Eur Respir J. 2014;44(3):694-703","title":"Identification of intermediate-risk patients with acute symptomatic pulmonary embolism","url":"https://doi.org/10.1183/09031936.00006114"},"formula_expression":"BOVA = 2*(systolic_mm_hg in 90-100) + 2*elevated_troponin + 2*rv_dysfunction + 1*(heart_rate_bpm>=110); max 7; bands 0-2 / 3-4 / >4 (stages I / II / III)","purpose":"Compute the Bova 2014 seven-point index (SBP 90-100 mm Hg, elevated troponin, RV dysfunction, heart rate ≥110) for confirmed acute PE that is not hypotensive, and return the published Table 6 stage band.","markdown_url":"https://magentlab.com/docs/bova.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"bova"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Bova points 0-7"},{"name":"max_score","type":"integer","description":"7"},{"name":"bova_band","type":"string","description":"Bova 2014 Table 6 stage band: 0-2 (stage I), 3-4 (stage II), or >4 (stage III, scores 5-7). Mortality percents are not returned. Not a thrombolysis order."},{"name":"systolic_mm_hg","type":"number","description":"Systolic BP used, mm Hg"},{"name":"elevated_troponin","type":"boolean","description":"Caller-assigned elevated troponin flag used"},{"name":"rv_dysfunction","type":"boolean","description":"Caller-assigned RV dysfunction flag used"},{"name":"heart_rate_bpm","type":"integer","description":"Heart rate used, bpm"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Bova 2014 Eur Respir J citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"elevated_troponin":"false","heart_rate_bpm":"80","rv_dysfunction":"false","systolic_mm_hg":"120"},{"elevated_troponin":"false","heart_rate_bpm":"80","rv_dysfunction":"false","systolic_mm_hg":"120"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/bova","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/bova?systolic_mm_hg=120&elevated_troponin=false&rv_dysfunction=false&heart_rate_bpm=80","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/bova","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/hestia","description":"Hestia criteria (Zondag 2011). Outpatient PE is eligible only when none of 11 caller-assigned exclusions hold: hemodynamic instability, thrombolysis or embolectomy, high bleeding risk, oxygen >24 h, PE on anticoagulation, IV pain medication >24 h, medical or social admission, CrCl <30, severe liver impairment, pregnancy, or documented HIT. Any yes excludes home treatment. Not a diagnosis, not PESI, not sPESI.","parameters":[{"in":"query","name":"hemodynamically_unstable","type":"boolean","description":"Hemodynamic instability left to the clinician, including SBP <100 mmHg with heart rate >100 or ICU admission, as assigned by the caller. true or false. magent does not measure blood pressure or heart rate.","required":true,"example":"false"},{"in":"query","name":"thrombolysis_or_embolectomy","type":"boolean","description":"Thrombolysis or embolectomy necessary. true or false as assigned by the caller. magent does not decide reperfusion.","required":true,"example":"false"},{"in":"query","name":"high_bleeding_risk","type":"boolean","description":"Active bleeding or high risk of bleeding as assigned by the caller (paper: GI bleeding in the preceding 14 days, stroke <4 weeks, operation <2 weeks, bleeding disorder or platelets <75×10^9/L, or uncontrolled hypertension SBP >180 or DBP >110). true or false. magent does not compute bleeding risk.","required":true,"example":"false"},{"in":"query","name":"oxygen_gt_24h","type":"boolean","description":"More than 24 h of oxygen supply to keep SaO2 >90%, as assigned by the caller. true or false. magent does not compute oxygen duration or saturation.","required":true,"example":"false"},{"in":"query","name":"pe_on_anticoagulation","type":"boolean","description":"Pulmonary embolism diagnosed during anticoagulant treatment. true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"iv_pain_meds_gt_24h","type":"boolean","description":"Severe pain needing intravenous pain medication for more than 24 h. true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"medical_or_social_admission","type":"boolean","description":"Medical or social reason for hospital treatment >24 h (paper: infection, malignancy, no support system). true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"creatinine_clearance_lt_30","type":"boolean","description":"Creatinine clearance <30 mL/min by Cockcroft-Gault, as assigned by the caller. true or false. magent does not compute Cockcroft-Gault.","required":true,"example":"false"},{"in":"query","name":"severe_liver_impairment","type":"boolean","description":"Severe liver impairment as judged by the caller (paper: physician judgement). true or false. magent does not grade liver impairment.","required":true,"example":"false"},{"in":"query","name":"pregnant","type":"boolean","description":"Pregnancy. true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"history_of_hit","type":"boolean","description":"Documented history of heparin-induced thrombocytopenia (HIT). true or false as assigned by the caller. magent does not diagnose HIT.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/hestia","citation":{"authors":"Zondag W, Mos ICM, Creemers-Schild D, et al.","doi":"10.1111/j.1538-7836.2011.04388.x","id":"zondag-2011","source":"J Thromb Haemost. 2011;9(8):1500-1507","title":"Outpatient treatment in patients with acute pulmonary embolism: the Hestia Study","url":"https://doi.org/10.1111/j.1538-7836.2011.04388.x"},"formula_expression":"outpatient eligible iff none of the 11 exclusion criteria","purpose":"Apply the Zondag 2011 Hestia exclusion checklist and return whether outpatient treatment of acute PE is eligible from 11 caller-assigned items.","markdown_url":"https://magentlab.com/docs/hestia.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"hestia"},{"name":"formula_expression","type":"string","description":"Outpatient eligible iff none of the 11 Zondag 2011 exclusion criteria"},{"name":"outpatient_eligible","type":"boolean","description":"true only when all 11 exclusion criteria are absent. Any yes excludes home treatment. Not a diagnosis."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met; met is true when that exclusion is present"},{"name":"citation","type":"object","description":"Zondag 2011 J Thromb Haemost citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"creatinine_clearance_lt_30":"false","hemodynamically_unstable":"false","high_bleeding_risk":"false","history_of_hit":"false","iv_pain_meds_gt_24h":"false","medical_or_social_admission":"false","oxygen_gt_24h":"false","pe_on_anticoagulation":"false","pregnant":"false","severe_liver_impairment":"false","thrombolysis_or_embolectomy":"false"},{"creatinine_clearance_lt_30":"false","hemodynamically_unstable":"false","high_bleeding_risk":"false","history_of_hit":"false","iv_pain_meds_gt_24h":"false","medical_or_social_admission":"false","oxygen_gt_24h":"false","pe_on_anticoagulation":"false","pregnant":"false","severe_liver_impairment":"false","thrombolysis_or_embolectomy":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/hestia","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/hestia?hemodynamically_unstable=false&thrombolysis_or_embolectomy=false&high_bleeding_risk=false&oxygen_gt_24h=false&pe_on_anticoagulation=false&iv_pain_meds_gt_24h=false&medical_or_social_admission=false&creatinine_clearance_lt_30=false&severe_liver_impairment=false&pregnant=false&history_of_hit=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/hestia","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/epiphany","description":"Carmona-Bayonas 2017 EPIPHANY CHAID tree for cancer-associated PE. Hestia-like CDR any vs none, then ECOG-PS, SaO2, PE symptoms, tumour response, and primary resection as in Figure 2. Returns low, intermediate, or high with 15-day complication rates 1.6/9.4/30.6% and mortality 0.3/6.1/17.1%. Caller assigns the six covariates. Not a diagnosis or anticoagulation order. magent does not examine the patient.","parameters":[{"in":"query","name":"hestia_like_any","type":"boolean","description":"true if any Carmona-Bayonas 2017 Hestia-like clinical decision rule item is present: SBP <100 mm Hg, arterial oxygen saturation <90%, respiratory rate >=30 breaths/min, pulse >=110 beats/min, sudden or progressive dyspnoea, or clinically relevant haemorrhage / high bleeding risk / platelets <50 000 mm^-3 (Figure 2). false if none. Caller-assigned; magent does not measure vitals or score the 11-item Zondag Hestia checklist.","required":true,"example":"false"},{"in":"query","name":"ecog_ps_ge_2","type":"boolean","description":"ECOG-PS >=2 as assigned by the caller (Carmona-Bayonas 2017: <2 vs >=2). true or false. Used on the Hestia-like-any branch. magent does not assign performance status.","required":true,"example":"false"},{"in":"query","name":"oxygen_sat_lt_90","type":"boolean","description":"Arterial oxygen saturation <90% as assigned by the caller (Figure 2: <90 vs >=90%). true or false. Used when Hestia-like any is present and ECOG-PS >=2; both sat leaves are high class. Distinct from the same cutoff inside the Hestia-like CDR. magent does not measure saturation.","required":true,"example":"false"},{"in":"query","name":"pe_specific_symptoms","type":"boolean","description":"PE-specific symptoms present as assigned by the caller (Carmona-Bayonas 2017 Figure 2). true or false. Used when Hestia-like any is present and ECOG-PS <2. Distinct from incidental vs symptomatic diagnosis and from the dyspnoea CDR item. magent does not take a history.","required":true,"example":"false"},{"in":"query","name":"tumour_uncontrolled","type":"boolean","description":"true if tumour response is progression, unknown, or not evaluated; false for others (complete or partial response, stable disease, or no evidence of disease) per Carmona-Bayonas 2017 Table 1 / Figure 2. Used on the Hestia-like-none branch. magent does not apply RECIST.","required":true,"example":"false"},{"in":"query","name":"primary_tumour_resected","type":"boolean","description":"Prior surgical resection of the primary tumour as assigned by the caller. true or false. Used when Hestia-like none and tumour_uncontrolled are both true. magent does not read an operative note.","required":true,"example":"true"}],"errors":[{"code":"invalid_epiphany","message":"EPIPHANY needs Carmona-Bayonas 2017 Hestia-like, ECOG, saturation, symptoms, tumour response, and resection flags. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/epiphany","citation":{"authors":"Carmona-Bayonas A, Jiménez-Fonseca P, Font C, Fenoy F, Otero R, Beato C, Plasencia JM, Biosca M, Sánchez M, Benegas M, Calvo-Temprano D, Varona D, Faez L, de la Haba I, Antonio M, Madridano O, Solis MP, Ramchandani A, Castañón E, Marchena PJ, Martín M, Ayala de la Peña F, Vicente V; Asociación de Investigación de la Enfermedad Tromboembólica de la Región de Murcia","doi":"10.1038/bjc.2017.48","id":"carmona-bayonas-2017","pmid":"28267709","source":"Br J Cancer. 2017;116:994-1001","title":"Predicting serious complications in patients with cancer and pulmonary embolism using decision tree modelling: the EPIPHANY Index","url":"https://doi.org/10.1038/bjc.2017.48"},"formula_expression":"root: hestia-like CDR any vs none (Carmona-Bayonas 2017 Figure 2). CDR any: ECOG-PS >=2 then SaO2 <90 vs >=90 (both high), else PE-specific symptoms yes (high) vs no (intermediate). CDR none: tumour progression/unknown/not evaluated vs others (CR/PR/SD/NED); if uncontrolled then primary tumour resection yes (low) vs no (intermediate); if others then low. Classes low/intermediate/high with 15-day serious complications 1.6/9.4/30.6% and 15-day mortality 0.3/6.1/17.1%","purpose":"Apply the Carmona-Bayonas 2017 EPIPHANY Index decision tree and return low, intermediate, or high 15-day serious-complication class with the published class rates.","markdown_url":"https://magentlab.com/docs/epiphany.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"epiphany"},{"name":"formula_expression","type":"string","description":"Carmona-Bayonas 2017 Figure 2 CHAID tree"},{"name":"hestia_like_any","type":"boolean","description":"Caller-assigned Hestia-like CDR any vs none"},{"name":"ecog_ps_ge_2","type":"boolean","description":"Caller-assigned ECOG-PS >=2"},{"name":"oxygen_sat_lt_90","type":"boolean","description":"Caller-assigned arterial oxygen saturation <90%"},{"name":"pe_specific_symptoms","type":"boolean","description":"Caller-assigned PE-specific symptoms"},{"name":"tumour_uncontrolled","type":"boolean","description":"true when tumour response is progression, unknown, or not evaluated; false for CR/PR/SD/NED"},{"name":"primary_tumour_resected","type":"boolean","description":"Caller-assigned prior primary tumour resection"},{"name":"risk_class","type":"string","description":"low, intermediate, or high. Published three-class summary, not a diagnosis."},{"name":"leaf","type":"string","description":"Figure 2 terminal leaf token: low_controlled, low_resected, intermediate_unresected, intermediate_silent, high_symptoms, high_ecog_normoxemia, or high_ecog_hypoxemia"},{"name":"serious_complication_15d_percent","type":"number","description":"Published 15-day serious-complication class rate: 1.6 (low), 9.4 (intermediate), or 30.6 (high)"},{"name":"mortality_15d_percent","type":"number","description":"Published 15-day mortality class rate: 0.3 (low), 6.1 (intermediate), or 17.1 (high)"},{"name":"criteria","type":"array","description":"Per-covariate rows with factor and met for the six Figure 2 inputs"},{"name":"citation","type":"object","description":"Carmona-Bayonas 2017 Br J Cancer citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"ecog_ps_ge_2":"false","hestia_like_any":"false","oxygen_sat_lt_90":"false","pe_specific_symptoms":"false","primary_tumour_resected":"true","tumour_uncontrolled":"false"},{"ecog_ps_ge_2":"false","hestia_like_any":"false","oxygen_sat_lt_90":"false","pe_specific_symptoms":"false","primary_tumour_resected":"true","tumour_uncontrolled":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/epiphany","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/epiphany?hestia_like_any=false&ecog_ps_ge_2=false&oxygen_sat_lt_90=false&pe_specific_symptoms=false&tumour_uncontrolled=false&primary_tumour_resected=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/epiphany","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/revised-geneva","description":"Revised Geneva score (Le Gal 2006) for suspected PE in the emergency department: age >65 (1), previous DVT or PE (3), surgery or lower-limb fracture within 1 month (2), active malignancy (2), unilateral lower-limb pain (3), hemoptysis (2), heart rate 75-94 (3) or >=95 (5), pain on deep-vein palpation and unilateral edema (4). Max 22. Bands 0-3, 4-10, and 11-22. Not a diagnosis, not simplified Geneva, and not Wells.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Scores 1 when age >65; 65 does not score.","required":true,"example":"50"},{"in":"query","name":"previous_dvt_or_pe","type":"boolean","description":"Previous DVT or PE as assigned by the caller. true or false. 3 points if true.","required":true,"example":"false"},{"in":"query","name":"surgery_or_fracture_within_1_month","type":"boolean","description":"Surgery under general anesthesia or lower-limb fracture within 1 month (one combined flag). true or false. 2 points if true.","required":true,"example":"false"},{"in":"query","name":"active_malignancy","type":"boolean","description":"Solid or hematologic malignancy currently active or considered cured <1 year (caller-applied). true or false. 2 points if true.","required":true,"example":"false"},{"in":"query","name":"unilateral_lower_limb_pain","type":"boolean","description":"Unilateral lower-limb pain. true or false. 3 points if true.","required":true,"example":"false"},{"in":"query","name":"hemoptysis","type":"boolean","description":"Hemoptysis. true or false. 2 points if true.","required":true,"example":"false"},{"in":"query","name":"heart_rate_bpm","type":"integer","description":"Heart rate in beats per minute (integer 30-220). Scores 3 when 75-94 inclusive, 5 when ≥95, and 0 when ≤74. Never both 3 and 5.","required":true,"example":"70"},{"in":"query","name":"pain_on_deep_vein_palpation_and_unilateral_edema","type":"boolean","description":"Pain on deep-vein palpation AND unilateral edema as one combined flag. true or false. 4 points if true.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_heart_rate","message":"heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/revised-geneva","citation":{"authors":"Le Gal G, Righini M, Roy PM, et al.","doi":"10.7326/0003-4819-144-3-200602070-00004","id":"le-gal-2006","source":"Ann Intern Med. 2006;144(3):165-171","title":"Prediction of pulmonary embolism in the emergency department: the revised Geneva score","url":"https://doi.org/10.7326/0003-4819-144-3-200602070-00004"},"formula_expression":"revised Geneva = age>65 (1) + previous_dvt_or_pe (3) + surgery_or_fracture_within_1_month (2) + active_malignancy (2) + unilateral_lower_limb_pain (3) + hemoptysis (2) + heart_rate_75_94 (3) or heart_rate_ge_95 (5) + pain_on_deep_vein_palpation_and_unilateral_edema (4); max 22; bands 0-3, 4-10, 11-22","purpose":"Compute the Le Gal 2006 revised Geneva score for suspected pulmonary embolism in the emergency department from age, heart rate, and six caller-assigned findings.","markdown_url":"https://magentlab.com/docs/revised-geneva.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"revised_geneva"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Total points 0-22"},{"name":"max_score","type":"integer","description":"Always 22"},{"name":"geneva_band","type":"string","description":"0-3, 4-10, or 11-22. Not a diagnosis."},{"name":"age_years","type":"integer","description":"Age used for the >65 criterion"},{"name":"heart_rate_bpm","type":"integer","description":"Heart rate used for the 75-94 / ≥95 bands"},{"name":"components","type":"array","description":"Per-item points"},{"name":"citation","type":"object","description":"Le Gal 2006 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"active_malignancy":"false","age":"50","heart_rate_bpm":"70","hemoptysis":"false","pain_on_deep_vein_palpation_and_unilateral_edema":"false","previous_dvt_or_pe":"false","surgery_or_fracture_within_1_month":"false","unilateral_lower_limb_pain":"false"},{"active_malignancy":"false","age":"50","heart_rate_bpm":"70","hemoptysis":"false","pain_on_deep_vein_palpation_and_unilateral_edema":"false","previous_dvt_or_pe":"false","surgery_or_fracture_within_1_month":"false","unilateral_lower_limb_pain":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/revised-geneva","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/revised-geneva?age=50&previous_dvt_or_pe=false&surgery_or_fracture_within_1_month=false&active_malignancy=false&unilateral_lower_limb_pain=false&hemoptysis=false&heart_rate_bpm=70&pain_on_deep_vein_palpation_and_unilateral_edema=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/revised-geneva","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/padua","description":"Barbar 2010 Padua Prediction Score for hospitalized medical patients: cancer 3, previous VTE 3, reduced mobility 3, thrombophilia 3, recent trauma/surgery 2, age >=70 1, heart/respiratory failure 1, acute MI/stroke 1, infection/rheumatologic 1, obesity (BMI>=30) 1, hormonal treatment 1. Max 20. <4 low; >=4 high. Not a diagnosis. Not Caprini, IMPROVE, or Khorana.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Scores 1 when age ≥70; 69 does not score.","required":true,"example":"50"},{"in":"query","name":"active_cancer","type":"boolean","description":"Active cancer as assigned by the caller (local or distant metastases and/or chemotherapy or radiotherapy in the previous 6 months). true or false. 3 points if true.","required":true,"example":"false"},{"in":"query","name":"previous_vte","type":"boolean","description":"Previous VTE as assigned by the caller (exclude superficial vein thrombosis). true or false. 3 points if true.","required":true,"example":"false"},{"in":"query","name":"reduced_mobility","type":"boolean","description":"Reduced mobility as assigned by the caller (bedrest with bathroom privileges ≥3 days). true or false. 3 points if true.","required":true,"example":"false"},{"in":"query","name":"thrombophilic_condition","type":"boolean","description":"Known thrombophilic condition as assigned by the caller. true or false. 3 points if true.","required":true,"example":"false"},{"in":"query","name":"recent_trauma_or_surgery","type":"boolean","description":"Recent trauma and/or surgery as assigned by the caller (≤1 month). true or false. 2 points if true.","required":true,"example":"false"},{"in":"query","name":"heart_or_respiratory_failure","type":"boolean","description":"Heart and/or respiratory failure. true or false. 1 point if true.","required":true,"example":"false"},{"in":"query","name":"acute_mi_or_ischemic_stroke","type":"boolean","description":"Acute myocardial infarction or ischemic stroke. true or false. 1 point if true.","required":true,"example":"false"},{"in":"query","name":"acute_infection_or_rheumatologic_disorder","type":"boolean","description":"Acute infection and/or rheumatologic disorder. true or false. 1 point if true.","required":true,"example":"false"},{"in":"query","name":"obesity","type":"boolean","description":"Obesity as assigned by the caller (BMI ≥30). true or false. magent does not take height or weight. 1 point if true.","required":true,"example":"false"},{"in":"query","name":"ongoing_hormonal_treatment","type":"boolean","description":"Ongoing hormonal treatment. true or false. 1 point if true.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/padua","citation":{"authors":"Barbar S, Noventa F, Rossetto V, et al.","doi":"10.1111/j.1538-7836.2010.04044.x","id":"barbar-2010","source":"J Thromb Haemost. 2010;8(11):2450-2457","title":"A risk assessment model for the identification of hospitalized medical patients at risk for venous thromboembolism: the Padua Prediction Score","url":"https://doi.org/10.1111/j.1538-7836.2010.04044.x"},"formula_expression":"Padua = active_cancer (3) + previous_vte (3) + reduced_mobility (3) + thrombophilic_condition (3) + recent_trauma_or_surgery (2) + age>=70 (1) + heart_or_respiratory_failure (1) + acute_mi_or_ischemic_stroke (1) + acute_infection_or_rheumatologic_disorder (1) + obesity (1) + ongoing_hormonal_treatment (1); max 20; <4 low, >=4 high","purpose":"Compute the Barbar 2010 Padua Prediction Score for VTE risk in hospitalized medical patients from age and ten caller-assigned findings.","markdown_url":"https://magentlab.com/docs/padua.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"padua"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Total points 0-20"},{"name":"max_score","type":"integer","description":"Always 20"},{"name":"padua_risk","type":"string","description":"low when score is <4; high when score is ≥4. Not a diagnosis."},{"name":"age_years","type":"integer","description":"Age used for the ≥70 criterion"},{"name":"components","type":"array","description":"Per-item points"},{"name":"citation","type":"object","description":"Barbar 2010 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"active_cancer":"false","acute_infection_or_rheumatologic_disorder":"false","acute_mi_or_ischemic_stroke":"false","age":"50","heart_or_respiratory_failure":"false","obesity":"false","ongoing_hormonal_treatment":"false","previous_vte":"false","recent_trauma_or_surgery":"false","reduced_mobility":"false","thrombophilic_condition":"false"},{"active_cancer":"false","acute_infection_or_rheumatologic_disorder":"false","acute_mi_or_ischemic_stroke":"false","age":"50","heart_or_respiratory_failure":"false","obesity":"false","ongoing_hormonal_treatment":"false","previous_vte":"false","recent_trauma_or_surgery":"false","reduced_mobility":"false","thrombophilic_condition":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/padua","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/padua?age=50&active_cancer=false&previous_vte=false&reduced_mobility=false&thrombophilic_condition=false&recent_trauma_or_surgery=false&heart_or_respiratory_failure=false&acute_mi_or_ischemic_stroke=false&acute_infection_or_rheumatologic_disorder=false&obesity=false&ongoing_hormonal_treatment=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/padua","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/michigan-picc","description":"Chopra 2017 Michigan Risk Score for PICC-associated thrombosis: another CVC at PICC placement 1, WBC >12 x10^9/L 1 (12.0 does not score), active cancer 2, PICC lumens single 0 / double 2 / triple 3 (triple includes quad), VTE history never 0 / remote 2 / within 30 days 3 (one field; do not add remote and recent). Max 10. Classes I=0 (observed 0.9%), II=1-2 (1.6%), III=3-4 (2.7%), IV=>4 (4.7% Table 4). Not a PICC order. magent does not count lumens.","parameters":[{"in":"query","name":"other_cvc","type":"boolean","description":"Another CVC present when the index PICC is placed, as assigned by the caller (Chopra 2017). true or false. true scores 1. magent does not count catheters.","required":true,"example":"false"},{"in":"query","name":"wbc_k_ul","type":"number","description":"WBC in 10^3/µL (same as 10^9/L) at PICC insertion. Provide wbc_k_ul or wbc_ul. Range 0.01-500. >12 scores 1 (12.0 does not).","required":false,"example":"8"},{"in":"query","name":"wbc_ul","type":"number","description":"WBC in cells/µL (same as cells/mm^3) at PICC insertion. Provide wbc_k_ul or wbc_ul. Range 10-500000. >12000 scores 1 (12000 does not; 12001 does).","required":false,"example":"8000"},{"in":"query","name":"active_cancer","type":"boolean","description":"Active cancer as assigned by the caller (Chopra 2017). true or false. true scores 2.","required":true,"example":"false"},{"in":"query","name":"picc_lumens","type":"string","enum":["single","double","triple"],"description":"PICC lumen count as assigned by the caller (Chopra 2017). single scores 0; double scores 2; triple scores 3. triple includes quad as published. magent does not count lumens.","required":true,"example":"single"},{"in":"query","name":"vte_history","type":"string","enum":["never","remote","within_30_days"],"description":"One 3-tier VTE history field (Chopra 2017). never scores 0; remote (prior VTE beyond 30 days) scores 2; within_30_days scores 3. Do not add remote and recent.","required":true,"example":"never"}],"errors":[{"code":"invalid_wbc","message":"wbc_k_ul (0.01-500) or wbc_ul (10-500000) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_picc_lumens","message":"picc_lumens must be single, double, or triple (Chopra 2017 Michigan PICC-DVT Risk Score; triple includes quad). Returned before settlement; you are not charged.","status":400},{"code":"invalid_vte_recency","message":"vte_history must be never, remote, or within_30_days (Chopra 2017; remote is prior VTE beyond 30 days). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/michigan-picc","citation":{"authors":"Chopra V, Kaatz S, Conlon A, Paje D, Grant PJ, Rogers MAM, Bernstein SJ, Saint S, Flanders SA","doi":"10.1111/jth.13794","id":"chopra-2017","pmid":"28796444","source":"J Thromb Haemost. 2017;15(10):1951-1962","title":"The Michigan Risk Score to predict peripherally inserted central catheter-associated thrombosis","url":"https://doi.org/10.1111/jth.13794"},"formula_expression":"Michigan PICC-DVT (Chopra 2017) = other_cvc (1) + (WBC >12 x10^9/L) (1) + active_cancer (2) + picc_lumens (single 0, double 2, triple 3; triple includes quad) + vte_history (never 0, remote 2, within_30_days 3); max 10; class I=0 (observed 0.9%), II=1-2 (1.6%), III=3-4 (2.7%), IV=>4 (4.7% Table 4)","purpose":"Sum the Chopra 2017 Michigan Risk Score factors for PICC-associated thrombosis and return class I–IV with Table 4 observed percents.","markdown_url":"https://magentlab.com/docs/michigan-picc.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"michigan_picc"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Chopra 2017 Michigan PICC-DVT points 0-10"},{"name":"max_score","type":"integer","description":"10"},{"name":"risk_class","type":"string","description":"Chopra 2017 class I (0), II (1-2), III (3-4), or IV (>4). A class, not a PICC order or VTE diagnosis."},{"name":"observed_vte_percent","type":"number","description":"Chopra 2017 Table 4 observed PICC-DVT percent for the class: I 0.9, II 1.6, III 2.7, IV 4.7."},{"name":"picc_lumens","type":"string","description":"Lumen category used (single, double, or triple)"},{"name":"vte_history","type":"string","description":"VTE history category used (never, remote, or within_30_days)"},{"name":"wbc_ul","type":"number","description":"Normalized WBC in cells/µL used for the >12000 cutoff"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Chopra et al. J Thromb Haemost 2017 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"active_cancer":"false","other_cvc":"false","picc_lumens":"single","vte_history":"never","wbc_k_ul":"8"},{"active_cancer":"false","other_cvc":"false","picc_lumens":"single","vte_history":"never","wbc_k_ul":"8"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/michigan-picc","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/michigan-picc?other_cvc=false&wbc_k_ul=8&active_cancer=false&picc_lumens=single&vte_history=never","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/michigan-picc","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/caprini","description":"Caprini 2005 thrombosis risk assessment (Table 3): exclusive age (41-60=1, 61-74=2, >=75=3) and exclusive surgery (minor=1; arthroscopic/major/laparoscopic=2; arthroplasty=5) plus caller-assigned 1-, 2-, 3-, and 5-point flags. Max 78. Bands: 0-1 low, 2 moderate, 3-4 high, >=5 highest. Not a diagnosis. Not Caprini 2009/2013. Not a prophylaxis order.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Caprini 2005 exclusive bands: 41-60 scores 1; 61-74 scores 2; 75 or older scores 3. Age 40 or younger scores 0 for age.","required":true,"example":"50"},{"in":"query","name":"surgery","type":"string","enum":["none","minor","arthroscopic","major","laparoscopic","arthroplasty"],"description":"Mutually exclusive Caprini 2005 Table 3 surgery category as assigned by the caller. none scores 0. minor (minor surgery planned) scores 1. arthroscopic, major (major surgery >45 minutes), and laparoscopic (laparoscopic surgery >45 minutes) score 2. arthroplasty (elective major lower extremity arthroplasty) scores 5. One category only. History of prior major surgery is a separate 1-point flag.","required":true,"example":"none"},{"in":"query","name":"prior_major_surgery","type":"boolean","description":"History of prior major surgery (<1 month) as assigned by the caller (Caprini 2005 Table 3). Independent of the exclusive surgery category. true scores 1.","required":true,"example":"false"},{"in":"query","name":"varicose_veins","type":"boolean","description":"Varicose veins as assigned by the caller (Caprini 2005 Table 3). true scores 1. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"inflammatory_bowel_disease","type":"boolean","description":"History of inflammatory bowel disease as assigned by the caller (Caprini 2005 Table 3). true scores 1.","required":true,"example":"false"},{"in":"query","name":"swollen_legs","type":"boolean","description":"Swollen legs (current) as assigned by the caller (Caprini 2005 Table 3). true scores 1. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"obesity","type":"boolean","description":"Obesity as assigned by the caller (Caprini 2005 BMI >25). true scores 1. magent does not take height or weight.","required":true,"example":"false"},{"in":"query","name":"acute_myocardial_infarction","type":"boolean","description":"Acute myocardial infarction as assigned by the caller (Caprini 2005 Table 3). true scores 1.","required":true,"example":"false"},{"in":"query","name":"congestive_heart_failure","type":"boolean","description":"Congestive heart failure (<1 month) as assigned by the caller (Caprini 2005 Table 3). true scores 1.","required":true,"example":"false"},{"in":"query","name":"sepsis","type":"boolean","description":"Sepsis (<1 month) as assigned by the caller (Caprini 2005 Table 3). true scores 1.","required":true,"example":"false"},{"in":"query","name":"serious_lung_disease","type":"boolean","description":"Serious lung disease including pneumonia (<1 month) as assigned by the caller (Caprini 2005 Table 3). true scores 1.","required":true,"example":"false"},{"in":"query","name":"abnormal_pulmonary_function","type":"boolean","description":"Abnormal pulmonary function (COPD) as assigned by the caller (Caprini 2005 Table 3). true scores 1.","required":true,"example":"false"},{"in":"query","name":"medical_bed_rest","type":"boolean","description":"Medical patient currently at bed rest as assigned by the caller (Caprini 2005 Table 3). true scores 1. Independent of confined_to_bed_gt_72h.","required":true,"example":"false"},{"in":"query","name":"other_risk_factor","type":"boolean","description":"Other Caprini 2005 Table 3 1-point risk factor as assigned by the caller. true scores 1. magent does not invent a factor from prose.","required":true,"example":"false"},{"in":"query","name":"oral_contraceptives_or_hrt","type":"boolean","description":"Oral contraceptives or hormone replacement therapy as assigned by the caller (Caprini 2005 Table 3, listed for women). true scores 1.","required":true,"example":"false"},{"in":"query","name":"pregnancy_or_postpartum","type":"boolean","description":"Pregnancy or postpartum (<1 month) as assigned by the caller (Caprini 2005 Table 3, listed for women). true scores 1.","required":true,"example":"false"},{"in":"query","name":"adverse_pregnancy_history","type":"boolean","description":"History of unexplained stillborn infant, recurrent spontaneous abortion (>=3), premature birth with toxemia, or growth-restricted infant as assigned by the caller (Caprini 2005 Table 3, listed for women). true scores 1.","required":true,"example":"false"},{"in":"query","name":"malignancy","type":"boolean","description":"Malignancy (present or previous) as assigned by the caller (Caprini 2005 Table 3). true scores 2.","required":true,"example":"false"},{"in":"query","name":"confined_to_bed_gt_72h","type":"boolean","description":"Patient confined to bed (>72 hours) as assigned by the caller (Caprini 2005 Table 3). true scores 2. Independent of medical_bed_rest.","required":true,"example":"false"},{"in":"query","name":"immobilizing_plaster_cast","type":"boolean","description":"Immobilizing plaster cast (<1 month) as assigned by the caller (Caprini 2005 Table 3). true scores 2.","required":true,"example":"false"},{"in":"query","name":"central_venous_access","type":"boolean","description":"Central venous access as assigned by the caller (Caprini 2005 Table 3). true scores 2.","required":true,"example":"false"},{"in":"query","name":"history_dvt_pe","type":"boolean","description":"History of DVT or PE as assigned by the caller (Caprini 2005 Table 3). true scores 3. magent does not diagnose VTE.","required":true,"example":"false"},{"in":"query","name":"family_history_thrombosis","type":"boolean","description":"Family history of thrombosis as assigned by the caller (Caprini 2005 Table 3). true scores 3.","required":true,"example":"false"},{"in":"query","name":"factor_v_leiden","type":"boolean","description":"Positive Factor V Leiden as assigned by the caller (Caprini 2005 Table 3). true scores 3.","required":true,"example":"false"},{"in":"query","name":"prothrombin_20210a","type":"boolean","description":"Positive Prothrombin 20210A as assigned by the caller (Caprini 2005 Table 3). true scores 3.","required":true,"example":"false"},{"in":"query","name":"elevated_homocysteine","type":"boolean","description":"Elevated serum homocysteine as assigned by the caller (Caprini 2005 Table 3). true scores 3.","required":true,"example":"false"},{"in":"query","name":"lupus_anticoagulant","type":"boolean","description":"Positive lupus anticoagulant as assigned by the caller (Caprini 2005 Table 3). true scores 3.","required":true,"example":"false"},{"in":"query","name":"anticardiolipin_antibodies","type":"boolean","description":"Elevated anticardiolipin antibodies as assigned by the caller (Caprini 2005 Table 3). true scores 3.","required":true,"example":"false"},{"in":"query","name":"heparin_induced_thrombocytopenia","type":"boolean","description":"Heparin-induced thrombocytopenia (HIT) as assigned by the caller (Caprini 2005 Table 3). true scores 3. magent does not diagnose HIT.","required":true,"example":"false"},{"in":"query","name":"other_thrombophilia","type":"boolean","description":"Other congenital or acquired thrombophilia as assigned by the caller (Caprini 2005 Table 3). true scores 3.","required":true,"example":"false"},{"in":"query","name":"hip_pelvis_leg_fracture","type":"boolean","description":"Hip, pelvis, or leg fracture (<1 month) as assigned by the caller (Caprini 2005 Table 3). true scores 5. Independent of exclusive surgery.","required":true,"example":"false"},{"in":"query","name":"stroke","type":"boolean","description":"Stroke (<1 month) as assigned by the caller (Caprini 2005 Table 3). true scores 5.","required":true,"example":"false"},{"in":"query","name":"multiple_trauma","type":"boolean","description":"Multiple trauma (<1 month) as assigned by the caller (Caprini 2005 Table 3). true scores 5.","required":true,"example":"false"},{"in":"query","name":"spinal_cord_injury","type":"boolean","description":"Acute spinal cord injury (paralysis) (<1 month) as assigned by the caller (Caprini 2005 Table 3). true scores 5.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_caprini","message":"each Caprini 2005 VTE item must be a published weight for that factor. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/caprini","citation":{"authors":"Caprini JA","doi":"10.1016/j.disamonth.2005.02.003","id":"caprini-2005","pmid":"15900257","source":"Dis Mon. 2005;51(2-3):70-78","title":"Thrombosis risk assessment as a guide to quality patient care","url":"https://doi.org/10.1016/j.disamonth.2005.02.003"},"formula_expression":"Caprini 2005 = exclusive age (<=40: 0, 41-60: 1, 61-74: 2, >=75: 3) + exclusive surgery (none 0, minor 1, arthroscopic 2, major >45 min 2, laparoscopic >45 min 2, elective arthroplasty 5) + Table 3 flags (1, 2, 3, or 5); max 78; 0-1 low, 2 moderate, 3-4 high, >=5 highest","purpose":"Sum Caprini 2005 Table 3 thrombosis risk factors with exclusive age and surgery weights and return the Table 2 band (low / moderate / high / highest).","markdown_url":"https://magentlab.com/docs/caprini.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"caprini"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Caprini 2005 Table 3 points 0-78"},{"name":"max_score","type":"integer","description":"78 (exclusive age and surgery)"},{"name":"risk_band","type":"string","description":"Caprini 2005 Table 2 band: low (0-1), moderate (2), high (3-4), or highest (>=5). A band, not a diagnosis or prophylaxis order."},{"name":"age_years","type":"integer","description":"Age used for the exclusive age band"},{"name":"surgery","type":"string","description":"Exclusive surgery category used (none, minor, arthroscopic, major, laparoscopic, or arthroplasty)"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Caprini Dis Mon 2005 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"history_dvt_pe":"false","family_history_thrombosis":"false","stroke":"false","multiple_trauma":"false","sepsis":"false","other_thrombophilia":"false","prothrombin_20210a":"false","factor_v_leiden":"false","central_venous_access":"false","immobilizing_plaster_cast":"false","lupus_anticoagulant":"false","hip_pelvis_leg_fracture":"false","medical_bed_rest":"false","acute_myocardial_infarction":"false","anticardiolipin_antibodies":"false","prior_major_surgery":"false","oral_contraceptives_or_hrt":"false","congestive_heart_failure":"false","pregnancy_or_postpartum":"false","serious_lung_disease":"false","spinal_cord_injury":"false","malignancy":"false","confined_to_bed_gt_72h":"false","inflammatory_bowel_disease":"false","varicose_veins":"false","other_risk_factor":"false","swollen_legs":"false","heparin_induced_thrombocytopenia":"false","elevated_homocysteine":"false","abnormal_pulmonary_function":"false","obesity":"false","adverse_pregnancy_history":"false","age":"50","surgery":"none"},{"history_dvt_pe":"false","family_history_thrombosis":"false","stroke":"false","multiple_trauma":"false","sepsis":"false","other_thrombophilia":"false","prothrombin_20210a":"false","factor_v_leiden":"false","central_venous_access":"false","immobilizing_plaster_cast":"false","lupus_anticoagulant":"false","hip_pelvis_leg_fracture":"false","medical_bed_rest":"false","acute_myocardial_infarction":"false","anticardiolipin_antibodies":"false","prior_major_surgery":"false","oral_contraceptives_or_hrt":"false","congestive_heart_failure":"false","pregnancy_or_postpartum":"false","serious_lung_disease":"false","spinal_cord_injury":"false","malignancy":"false","confined_to_bed_gt_72h":"false","inflammatory_bowel_disease":"false","varicose_veins":"false","other_risk_factor":"false","swollen_legs":"false","heparin_induced_thrombocytopenia":"false","elevated_homocysteine":"false","abnormal_pulmonary_function":"false","obesity":"false","adverse_pregnancy_history":"false","age":"50","surgery":"none"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/caprini","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/caprini?age=50&surgery=none&prior_major_surgery=false&varicose_veins=false&inflammatory_bowel_disease=false&swollen_legs=false&obesity=false&acute_myocardial_infarction=false&congestive_heart_failure=false&sepsis=false&serious_lung_disease=false&abnormal_pulmonary_function=false&medical_bed_rest=false&other_risk_factor=false&oral_contraceptives_or_hrt=false&pregnancy_or_postpartum=false&adverse_pregnancy_history=false&malignancy=false&confined_to_bed_gt_72h=false&immobilizing_plaster_cast=false&central_venous_access=false&history_dvt_pe=false&family_history_thrombosis=false&factor_v_leiden=false&prothrombin_20210a=false&elevated_homocysteine=false&lupus_anticoagulant=false&anticardiolipin_antibodies=false&heparin_induced_thrombocytopenia=false&other_thrombophilia=false&hip_pelvis_leg_fracture=false&stroke=false&multiple_trauma=false&spinal_cord_injury=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/caprini","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/riete","description":"Ruiz-Giménez 2008 RIETE score for 3-month major bleeding after documented acute VTE. Six caller-assigned flags: recent major bleeding (2), creatinine >1.2 mg/dL (1.5), anemia (1.5), cancer (1), clinically overt PE (1), age >75 (1); max 8. Low 0 (0.3%), intermediate 1–4 (2.6%), high >4 (7.3%) in derivation; validation 0.1%/2.8%/6.2%. Not a VTE diagnosis or bleed-treatment protocol. magent does not assay hemoglobin or creatinine.","parameters":[{"in":"query","name":"recent_major_bleeding","type":"boolean","description":"Recent major bleeding as assigned by the caller (Ruiz-Giménez 2008). true scores 2.0. magent does not grade bleeding.","required":true,"example":"false"},{"in":"query","name":"creatinine_gt_1_2","type":"boolean","description":"Creatinine >1.2 mg/dL as assigned by the caller (Ruiz-Giménez 2008). true scores 1.5. magent does not compute creatinine from a lab.","required":true,"example":"false"},{"in":"query","name":"anemia","type":"boolean","description":"Anemia as assigned by the caller (Ruiz-Giménez 2008: hemoglobin <13 g/dL in men or <12 g/dL in women). true scores 1.5. magent does not assay hemoglobin.","required":true,"example":"false"},{"in":"query","name":"cancer","type":"boolean","description":"Cancer as assigned by the caller (Ruiz-Giménez 2008). true scores 1.0. magent does not diagnose cancer.","required":true,"example":"false"},{"in":"query","name":"clinically_overt_pe","type":"boolean","description":"Clinically overt pulmonary embolism as assigned by the caller (Ruiz-Giménez 2008). true scores 1.0. magent does not diagnose PE.","required":true,"example":"false"},{"in":"query","name":"age_gt_75","type":"boolean","description":"Age >75 years as assigned by the caller (Ruiz-Giménez 2008). true scores 1.0. magent does not assign age.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/riete","citation":{"authors":"Ruiz-Giménez N, Suárez C, González R, Nieto JA, Todolí JA, Samperiz AL, Monreal M; RIETE Investigators","doi":"10.1160/TH08-03-0193","id":"ruiz-gimenez-2008","pmid":"18612534","source":"Thromb Haemost. 2008;100(1):26-31","title":"Predictive variables for major bleeding events in patients presenting with documented acute venous thromboembolism. Findings from the RIETE Registry","url":"https://doi.org/10.1160/TH08-03-0193"},"formula_expression":"RIETE = recent_major_bleeding 2.0 + creatinine_gt_1_2 1.5 + anemia 1.5 + cancer 1.0 + clinically_overt_pe 1.0 + age_gt_75 1.0; Ruiz-Giménez 2008; max 8; low 0, intermediate 1-4, high >4","purpose":"Sum the Ruiz-Giménez 2008 RIETE adverse factors for 3-month major bleeding after documented acute VTE and return low (0), intermediate (1–4), or high (>4).","markdown_url":"https://magentlab.com/docs/riete.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"riete"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"number","description":"RIETE points 0-8 (0.5 steps; not rounded)"},{"name":"max_score","type":"integer","description":"Always 8"},{"name":"riete_band","type":"string","description":"low when score is 0, intermediate when 1-4 inclusive, high when >4 (Ruiz-Giménez 2008 derivation 3-month major bleed 0.3%/2.6%/7.3%). Not a VTE diagnosis or bleed-treatment protocol."},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Ruiz-Giménez 2008 Thromb Haemost citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age_gt_75":"false","anemia":"false","cancer":"false","clinically_overt_pe":"false","creatinine_gt_1_2":"false","recent_major_bleeding":"false"},{"age_gt_75":"false","anemia":"false","cancer":"false","clinically_overt_pe":"false","creatinine_gt_1_2":"false","recent_major_bleeding":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/riete","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/riete?recent_major_bleeding=false&creatinine_gt_1_2=false&anemia=false&cancer=false&clinically_overt_pe=false&age_gt_75=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/riete","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/vte-bleed","description":"Klok 2016 VTE-BLEED for major bleeding on stable anticoagulation after VTE. Six items: active cancer 2; male with uncontrolled hypertension (SBP ≥140) 1; anemia 1.5; history of bleeding 1.5; age ≥60 1.5; renal dysfunction (eGFR/CrCl <60) 1.5; max 9. Low <2, high ≥2. Caller-assigned flags; magent does not assay hemoglobin or eGFR. Not a medical device, not HAS-BLED, and not a treatment-duration order.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Age ≥60 scores 1.5 (Klok 2016). magent does not assign age.","required":true,"example":"70"},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"female or male. Uncontrolled hypertension scores 1 only when sex is male (Klok 2016 / XALIA SBP ≥140 item). Female never scores that item.","required":true,"example":"male"},{"in":"query","name":"active_cancer","type":"boolean","description":"Active cancer as assigned by the caller (Klok 2016). true scores 2. magent does not diagnose cancer.","required":true,"example":"false"},{"in":"query","name":"uncontrolled_hypertension","type":"boolean","description":"Uncontrolled hypertension (SBP ≥140 mmHg) as assigned by the caller (Klok 2016 / XALIA). true scores 1 only in males; females score 0 even when true. magent does not measure blood pressure.","required":true,"example":"false"},{"in":"query","name":"anemia","type":"boolean","description":"Anemia as assigned by the caller (Klok 2016: hemoglobin <130 g/L in men or <120 g/L in women). true scores 1.5. magent does not take a hemoglobin number.","required":true,"example":"false"},{"in":"query","name":"history_of_bleeding","type":"boolean","description":"History of bleeding as assigned by the caller (Klok 2016). true scores 1.5. magent does not grade bleeding.","required":true,"example":"false"},{"in":"query","name":"renal_dysfunction","type":"boolean","description":"Renal dysfunction (eGFR or CrCl <60) as assigned by the caller (Klok 2016). true scores 1.5. magent does not compute eGFR or creatinine clearance.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/vte-bleed","citation":{"authors":"Klok FA, Hösel V, Clemens A, Yollo WD, Tilke C, Schulman S, Lankeit M, Konstantinides SV","doi":"10.1183/13993003.00280-2016","id":"klok-2016","pmid":"27471209","source":"Eur Respir J. 2016;48(5):1369-1376","title":"Prediction of bleeding events in patients with venous thromboembolism on stable anticoagulation treatment","url":"https://doi.org/10.1183/13993003.00280-2016"},"formula_expression":"VTE-BLEED = active_cancer 2 + (male AND uncontrolled_hypertension) 1 + anemia 1.5 + history_of_bleeding 1.5 + age_ge_60 1.5 + renal_dysfunction 1.5; Klok 2016; max 9; low <2, high >=2","purpose":"Sum the Klok 2016 VTE-BLEED items for major bleeding on stable anticoagulation after VTE and return low (<2) or high (≥2).","markdown_url":"https://magentlab.com/docs/vte-bleed.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"vte_bleed"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"number","description":"VTE-BLEED points 0-9 (1.5 steps allowed; not integer-rounded)"},{"name":"max_score","type":"integer","description":"Always 9"},{"name":"vte_bleed_band","type":"string","description":"low when score is <2, high when score is ≥2 (Klok 2016). Not a treatment-duration order."},{"name":"sex","type":"string","description":"female or male used for the hypertension item"},{"name":"age_years","type":"integer","description":"Age used for the ≥60 criterion"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Klok 2016 Eur Respir J citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"active_cancer":"false","age":"70","anemia":"false","history_of_bleeding":"false","renal_dysfunction":"false","sex":"male","uncontrolled_hypertension":"false"},{"active_cancer":"false","age":"70","anemia":"false","history_of_bleeding":"false","renal_dysfunction":"false","sex":"male","uncontrolled_hypertension":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/vte-bleed","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/vte-bleed?age=70&sex=male&active_cancer=false&uncontrolled_hypertension=false&anemia=false&history_of_bleeding=false&renal_dysfunction=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/vte-bleed","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/khorana","description":"Khorana 2008 Blood predictive model for chemotherapy-associated thrombosis: very_high site (stomach or pancreas) 2, high (lung, lymphoma, gynecologic, bladder, testicular) 1, other 0; platelets >=350 1; hemoglobin <10 g/dL or ESA 1 (once); WBC >11 x10^9/L 1; BMI>=35 caller flag 1. Max 6. 0 low; 1-2 intermediate; >=3 high. Not a diagnosis. Not Padua or Caprini. Caller assigns cancer site; magent does not compute BMI.","parameters":[{"in":"query","name":"cancer_site","type":"string","description":"Caller-assigned Khorana site class. very_high (stomach or pancreas) scores 2; high (lung, lymphoma, gynecologic, bladder, or testicular) scores 1; other scores 0. magent does not assign cancer site from histology text.","required":true,"example":"other"},{"in":"query","name":"platelets_10e9_l","type":"number","description":"Pre-chemotherapy platelet count ×10^9/L (1-2000). ≥350 scores 1 (350 scores; 349 does not).","required":true,"example":"200"},{"in":"query","name":"hemoglobin_g_dl","type":"number","description":"Hemoglobin in g/dL (3-22). Provide this or hemoglobin_g_l, not both. <10 scores 1 with ESA (once, not twice). 10.0 does not score unless ESA is true.","required":false,"example":"12"},{"in":"query","name":"hemoglobin_g_l","type":"number","description":"Hemoglobin in g/L (30-220). Converted as hemoglobin_g_dl = hemoglobin_g_l / 10. Provide this or hemoglobin_g_dl, not both.","required":false,"example":"120"},{"in":"query","name":"erythropoiesis_stimulating_agent","type":"boolean","description":"Use of an erythropoiesis-stimulating agent as assigned by the caller. true or false. Scores 1 with hemoglobin <10 g/dL (once, not twice).","required":true,"example":"false"},{"in":"query","name":"wbc_k_ul","type":"number","description":"WBC in 10^3/µL (same as 10^9/L). Provide wbc_k_ul or wbc_ul. Range 0.01-500. >11 scores 1 (11.0 does not).","required":false,"example":"8"},{"in":"query","name":"wbc_ul","type":"number","description":"WBC in cells/µL (same as cells/mm^3). Provide wbc_k_ul or wbc_ul. Range 10-500000. >11000 scores 1 (11000 does not).","required":false,"example":"8000"},{"in":"query","name":"bmi_ge_35","type":"boolean","description":"BMI ≥35 as assigned by the caller. true or false. magent does not take height or weight. 1 point if true.","required":true,"example":"false"}],"errors":[{"code":"invalid_cancer_site","message":"cancer_site must be very_high, high, or other. Returned before settlement; you are not charged.","status":400},{"code":"invalid_platelets","message":"platelets_10e9_l must be a number from 1 to 2000 Returned before settlement; you are not charged.","status":400},{"code":"invalid_hemoglobin","message":"hemoglobin_g_l (30-220) or hemoglobin_g_dl (3-22) is required, not both. Returned before settlement; you are not charged.","status":400},{"code":"invalid_wbc","message":"wbc_k_ul (0.01-500) or wbc_ul (10-500000) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/khorana","citation":{"authors":"Khorana AA, Kuderer NM, Culakova E, Lyman GH, Francis CW","doi":"10.1182/blood-2007-10-116327","id":"khorana-2008","source":"Blood. 2008;111(10):4902-4907","title":"Development and validation of a predictive model for chemotherapy-associated thrombosis","url":"https://doi.org/10.1182/blood-2007-10-116327"},"formula_expression":"Khorana = cancer_site (very_high 2, high 1, other 0) + (platelets>=350) + (hemoglobin<10 g/dL or ESA) + (wbc>11 x10^9/L) + (BMI>=35); max 6; 0 low, 1-2 intermediate, >=3 high","purpose":"Compute the Khorana 2008 Blood predictive model for chemotherapy-associated thrombosis from caller-assigned cancer site, pre-chemotherapy labs, ESA use, and BMI ≥35.","markdown_url":"https://magentlab.com/docs/khorana.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"khorana"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Total points 0-6"},{"name":"max_score","type":"integer","description":"Always 6"},{"name":"khorana_risk","type":"string","description":"low when score is 0; intermediate when 1-2; high when ≥3. Not a diagnosis."},{"name":"cancer_site","type":"string","description":"Caller-assigned site class used: very_high, high, or other"},{"name":"platelets_10e9_l","type":"number","description":"Platelet count used (×10^9/L)"},{"name":"hemoglobin_g_dl","type":"number","description":"Hemoglobin used in g/dL (g/L inputs converted as g/dL = g/L / 10)"},{"name":"erythropoiesis_stimulating_agent","type":"boolean","description":"ESA flag used"},{"name":"wbc_ul","type":"number","description":"WBC used in cells/µL (wbc_k_ul converted as ×1000)"},{"name":"bmi_ge_35","type":"boolean","description":"Caller-assigned BMI ≥35 flag used"},{"name":"components","type":"array","description":"Per-item points"},{"name":"citation","type":"object","description":"Khorana 2008 Blood citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"bmi_ge_35":"false","cancer_site":"other","erythropoiesis_stimulating_agent":"false","hemoglobin_g_dl":"12","platelets_10e9_l":"200","wbc_k_ul":"8"},{"bmi_ge_35":"false","cancer_site":"other","erythropoiesis_stimulating_agent":"false","hemoglobin_g_dl":"12","platelets_10e9_l":"200","wbc_k_ul":"8"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/khorana","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/khorana?cancer_site=other&platelets_10e9_l=200&hemoglobin_g_dl=12&erythropoiesis_stimulating_agent=false&wbc_k_ul=8&bmi_ge_35=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/khorana","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/impede-vte","description":"Sanfilippo 2019 IMPEDE VTE for multiple myeloma: IMiD 4, BMI>=25 1, pelvic/hip/femur fracture 4, ESA 1, doxorubicin 3, dexamethasone none/low/high 0/2/4 (high if monthly >160 mg), Asian/Pacific Islander -3 (caller-assigned), VTE history 5, tunneled line 2, thromboprophylaxis none/prophylactic/therapeutic 0/-3/-4. Unclamped. <=3 low 3.3%, 4-7 intermediate 8.3%, >=8 high 15.2%. Not a prophylaxis order. Not SAVED or Khorana.","parameters":[{"in":"query","name":"imid","type":"boolean","description":"Immunomodulatory drug (IMiD) as assigned by the caller (Sanfilippo 2019 Table 3). true or false. 4 points if true.","required":true,"example":"false"},{"in":"query","name":"bmi_ge_25","type":"boolean","description":"BMI ≥25 kg/m2 as assigned by the caller (Sanfilippo 2019 Table 3). true or false. magent does not compute BMI from height or weight. 1 point if true.","required":true,"example":"false"},{"in":"query","name":"pelvic_hip_femur_fracture","type":"boolean","description":"Pelvic, hip, or femur fracture as assigned by the caller (Sanfilippo 2019 Table 3). true or false. 4 points if true.","required":true,"example":"false"},{"in":"query","name":"esa","type":"boolean","description":"Erythropoiesis-stimulating agent as assigned by the caller (Sanfilippo 2019 Table 3). true or false. 1 point if true.","required":true,"example":"false"},{"in":"query","name":"doxorubicin","type":"boolean","description":"Doxorubicin as assigned by the caller (Sanfilippo 2019 Table 3). true or false. 3 points if true.","required":true,"example":"false"},{"in":"query","name":"dexamethasone","type":"string","enum":["none","low","high"],"description":"Dexamethasone as assigned by the caller (Sanfilippo 2019 Table 3). none (not on dexamethasone) scores 0; low (dexamethasone used at total monthly dosing ≤160 mg) scores 2; high (total monthly dosing >160 mg) scores 4. Not the NCCN ≥480 mg definition.","required":true,"example":"none"},{"in":"query","name":"asian_pacific_islander","type":"boolean","description":"Caller-assigned ethnicity/race Asian/Pacific Islander as used in Sanfilippo 2019. true or false. magent does not assign race or ethnicity. −3 if true.","required":true,"example":"false"},{"in":"query","name":"vte_history","type":"boolean","description":"History of VTE before multiple myeloma as assigned by the caller (Sanfilippo 2019 Table 3). true or false. 5 points if true.","required":true,"example":"false"},{"in":"query","name":"tunneled_line","type":"boolean","description":"Tunneled line / central venous catheter as assigned by the caller (Sanfilippo 2019 Table 3). true or false. 2 points if true.","required":true,"example":"false"},{"in":"query","name":"thromboprophylaxis","type":"string","enum":["none","prophylactic","therapeutic"],"description":"Existing thromboprophylaxis as assigned by the caller (Sanfilippo 2019 Table 3). Mutually exclusive. none scores 0; prophylactic (prophylactic LMWH or aspirin) scores −3; therapeutic (therapeutic LMWH or warfarin) scores −4.","required":true,"example":"none"}],"errors":[{"code":"invalid_impede_vte","message":"IMPEDE-VTE inputs must match Sanfilippo 2019 Table 3 flags, dexamethasone none/low/high, and thromboprophylaxis none/prophylactic/therapeutic. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/impede-vte","citation":{"authors":"Sanfilippo KM, Luo S, Wang TF, Fiala M, Schoen M, Wildes TM, Mikhael J, Kuderer NM, Calverley DC, Keller J, Thomas T, Carson KR, Gage BF","doi":"10.1002/ajh.25603","id":"sanfilippo-2019-impede","pmid":"31379000","source":"Am J Hematol. 2019;94(11):1176-1184","title":"Predicting venous thromboembolism in multiple myeloma: development and validation of the IMPEDE VTE score","url":"https://doi.org/10.1002/ajh.25603"},"formula_expression":"IMPEDE VTE (Sanfilippo 2019 Table 3) = imid (4) + bmi_ge_25 (1) + pelvic_hip_femur_fracture (4) + esa (1) + doxorubicin (3) + dexamethasone (none 0, low 2, high 4; high if total monthly dosing >160 mg) + asian_pacific_islander (-3) + vte_history (5) + tunneled_line (2) + thromboprophylaxis (none 0, prophylactic -3, therapeutic -4); unclamped; <=3 low 3.3%, 4-7 intermediate 8.3%, >=8 high 15.2%","purpose":"Compute the Sanfilippo 2019 IMPEDE VTE score for venous thromboembolism in multiple myeloma from caller-assigned Table 3 factors and return the published 6-month risk group.","markdown_url":"https://magentlab.com/docs/impede-vte.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"impede_vte"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Sanfilippo 2019 Table 3 total. Not clamped at 0."},{"name":"max_score","type":"integer","description":"24 (sum of positive Table 3 weights)"},{"name":"risk","type":"string","description":"low when score ≤3, intermediate when 4-7, high when ≥8. Derivation-cohort 6-month groups. Not a diagnosis."},{"name":"six_month_vte_percent","type":"number","description":"Derivation 6-month cumulative incidence percent: 3.3 (low), 8.3 (intermediate), or 15.2 (high)."},{"name":"imid","type":"boolean","description":"IMiD flag used"},{"name":"bmi_ge_25","type":"boolean","description":"Caller-assigned BMI ≥25 flag used"},{"name":"pelvic_hip_femur_fracture","type":"boolean","description":"Pelvic, hip, or femur fracture flag used"},{"name":"esa","type":"boolean","description":"ESA flag used"},{"name":"doxorubicin","type":"boolean","description":"Doxorubicin flag used"},{"name":"dexamethasone","type":"string","description":"Dexamethasone token used: none, low, or high"},{"name":"asian_pacific_islander","type":"boolean","description":"Caller-assigned Asian/Pacific Islander flag used"},{"name":"vte_history","type":"boolean","description":"VTE-before-MM flag used"},{"name":"tunneled_line","type":"boolean","description":"Tunneled line / CVC flag used"},{"name":"thromboprophylaxis","type":"string","description":"Thromboprophylaxis token used: none, prophylactic, or therapeutic"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Sanfilippo 2019 Am J Hematol citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"asian_pacific_islander":"false","bmi_ge_25":"false","dexamethasone":"none","doxorubicin":"false","esa":"false","imid":"false","pelvic_hip_femur_fracture":"false","thromboprophylaxis":"none","tunneled_line":"false","vte_history":"false"},{"asian_pacific_islander":"false","bmi_ge_25":"false","dexamethasone":"none","doxorubicin":"false","esa":"false","imid":"false","pelvic_hip_femur_fracture":"false","thromboprophylaxis":"none","tunneled_line":"false","vte_history":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/impede-vte","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/impede-vte?imid=false&bmi_ge_25=false&pelvic_hip_femur_fracture=false&esa=false&doxorubicin=false&dexamethasone=none&asian_pacific_islander=false&vte_history=false&tunneled_line=false&thromboprophylaxis=none","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/impede-vte","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/sirs","description":"SIRS from Bone 1992 ACCP/SCCM: four binary criteria (temperature >38 or <36 °C, heart rate >90, respiratory rate >20 or PaCO2 <32 mm Hg, WBC >12000 or <4000 per µL or bands >10%); present when ≥2 of 4. Deterministic published criteria with citation; not a diagnosis, not Sepsis-3, not qSOFA or SOFA.","parameters":[{"in":"query","name":"temperature_c","type":"number","description":"Temperature in °C (30.0-45.0). >38 or <36 scores 1 (38.0 and 36.0 do not).","required":true,"example":"37.0"},{"in":"query","name":"heart_rate_bpm","type":"integer","description":"Heart rate in beats/min (integer 30-220). >90 scores 1 (90 does not).","required":true,"example":"80"},{"in":"query","name":"respiratory_rate","type":"integer","description":"Respiratory rate in breaths/min (integer 4-80). >20 scores 1 for the respiratory criterion (20 does not). Optional paco2_mm_hg <32 also meets this criterion.","required":true,"example":"16"},{"in":"query","name":"paco2_mm_hg","type":"number","description":"Arterial PaCO2 in mm Hg (8-80) when provided. Omitted uses respiratory rate only. <32 scores the respiratory criterion (32 does not).","required":false,"example":"40"},{"in":"query","name":"wbc_k_ul","type":"number","description":"WBC in 10^3/µL (same as 10^9/L). Provide wbc_k_ul or wbc_ul. Range 0.01-500. >12000 or <4000 per µL scores 1.","required":false,"example":"8.0"},{"in":"query","name":"wbc_ul","type":"number","description":"WBC in cells/µL (same as cells/mm^3). Provide wbc_k_ul or wbc_ul. Range 10-500000. >12000 or <4000 scores 1 (12000 and 4000 do not).","required":false,"example":"8000"},{"in":"query","name":"band_percent","type":"number","description":"Immature bands as a percent of WBC (0-100) when provided. Omitted does not use bands. >10 scores the WBC criterion (10 does not).","required":false,"example":"5"}],"errors":[{"code":"invalid_temperature","message":"temperature_c must be a number from 30.0 to 45.0. Returned before settlement; you are not charged.","status":400},{"code":"invalid_heart_rate","message":"heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.","status":400},{"code":"invalid_respiratory_rate","message":"respiratory_rate must be an integer from 4 to 80. Returned before settlement; you are not charged.","status":400},{"code":"invalid_wbc","message":"wbc_k_ul (0.01-500) or wbc_ul (10-500000) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_paco2","message":"paco2_mm_hg must be a number from 8 to 80. Returned before settlement; you are not charged.","status":400},{"code":"invalid_band_percent","message":"band_percent must be a number from 0 to 100 Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/sirs","citation":{"authors":"Bone RC, Balk RA, Cerra FB, et al.","doi":"10.1378/chest.101.6.1644","id":"bone-1992","source":"Chest. 1992;101(6):1644-1655","title":"Definitions for sepsis and organ failure and guidelines for the use of innovative therapies in sepsis","url":"https://doi.org/10.1378/chest.101.6.1644"},"formula_expression":"SIRS present iff >=2 of 4: (temperature_c >38 or <36) + (heart_rate_bpm >90) + (respiratory_rate >20 or paco2_mm_hg <32) + (wbc_per_ul >12000 or <4000 or band_percent >10); each 1; max 4","purpose":"Compute the Bone 1992 ACCP/SCCM SIRS criteria from temperature, heart rate, respiratory rate, and WBC, with optional PaCO2 and band percent.","markdown_url":"https://magentlab.com/docs/sirs.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"sirs"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"sirs_present","type":"boolean","description":"true when sirs_criteria_met is ≥2. Not a diagnosis of sepsis."},{"name":"sirs_criteria_met","type":"integer","description":"Count of Bone 1992 criteria met (0-4)"},{"name":"max_score","type":"integer","description":"Always 4"},{"name":"temperature_c","type":"number","description":"Temperature in °C used"},{"name":"heart_rate_bpm","type":"integer","description":"Heart rate used, bpm"},{"name":"respiratory_rate","type":"integer","description":"Respiratory rate used, breaths/min"},{"name":"wbc_per_ul","type":"number","description":"Normalized WBC in cells/µL used for scoring"},{"name":"components","type":"array","description":"Per-criterion points"},{"name":"citation","type":"object","description":"Bone 1992 Chest citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"heart_rate_bpm":"80","respiratory_rate":"16","temperature_c":"37.0","wbc_ul":"8000"},{"heart_rate_bpm":"80","respiratory_rate":"16","temperature_c":"37.0","wbc_ul":"8000"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/sirs","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/sirs?temperature_c=37.0&heart_rate_bpm=80&respiratory_rate=16&wbc_ul=8000","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/sirs","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/pediatric-sirs","description":"Goldstein 2005 pediatric SIRS from age-group HR, RR, WBC, and core temperature. Present when ≥2 of 4 Table 3 criteria include abnormal temperature (>38.5 or <36 C) or leukocyte. Sepsis is SIRS plus suspected infection; severe sepsis and septic shock use caller-assigned organ-dysfunction flags. magent does not measure vitals or assay WBC. Not Bone 1992 adult SIRS and not Phoenix 2024. Not a medical device and not a diagnosis or sepsis order.","parameters":[{"in":"query","name":"age_group","type":"string","description":"Goldstein 2005 Table 1 age group. One of: newborn (0 days to 1 week; HR >180 or <100, RR >50, WBC >34 k/µL), neonate (1 week to 1 month; HR >180 or <100, RR >40, WBC >19.5 or <5), infant (1 month to 1 year; HR >180 or <90, RR >34, WBC >17.5 or <5), toddler_preschool (2-5 years; HR >140, RR >22, WBC >15.5 or <6), school_age (6-12 years; HR >130, RR >18, WBC >13.5 or <4.5), adolescent (13-18 years; HR >110, RR >14, WBC >11 or <4.5). magent does not map chronological age (the paper has a 1-2 year gap).","required":true,"example":"school_age"},{"in":"query","name":"temperature_c","type":"number","description":"Core temperature in °C (30.0-45.0), rectal, bladder, oral, or central-catheter probe as in Goldstein 2005. >38.5 or <36 meets the temperature criterion (38.5 and 36.0 do not). Not Bone 1992 adult >38. magent does not measure temperature.","required":true,"example":"37.0"},{"in":"query","name":"heart_rate_bpm","type":"integer","description":"Heart rate in beats/min (integer 30-300). Meets when greater than the age-group tachycardia cutoff, or when less than the bradycardia cutoff for newborn, neonate, or infant only (Goldstein 2005 Table 3). Equal to the cutoff does not meet. magent does not measure heart rate.","required":true,"example":"100"},{"in":"query","name":"respiratory_rate","type":"integer","description":"Respiratory rate in breaths/min (integer 4-120). Meets when greater than the age-group cutoff (Goldstein 2005 Table 3). Equal to the cutoff does not meet. Optional mechanical_ventilation also meets this criterion. magent does not measure respiratory rate.","required":true,"example":"16"},{"in":"query","name":"wbc_k_ul","type":"number","description":"WBC in 10^3/µL (same as 10^3/mm^3 in Goldstein 2005 Table 3). Provide wbc_k_ul or wbc_ul. Range 0.01-500. Meets when greater than the age-group high cutoff or less than the low cutoff (newborn has high-only; no leukopenia bound). Equal to a cutoff does not meet. magent does not assay WBC.","required":false,"example":"8.0"},{"in":"query","name":"wbc_ul","type":"number","description":"WBC in cells/µL. Provide wbc_k_ul or wbc_ul. Range 10-500000. Converted to 10^3/µL for Table 3 cutoffs. magent does not assay WBC.","required":false,"example":"8000"},{"in":"query","name":"band_percent","type":"number","description":"Immature neutrophils as a percent of WBC (0-100) when provided. Omitted does not use bands. >10 meets the leukocyte criterion (10 does not). magent does not assay bands.","required":false,"example":"5"},{"in":"query","name":"mechanical_ventilation","type":"boolean","description":"Caller-assigned mechanical ventilation for an acute process not related to underlying neuromuscular disease or general anesthesia (Goldstein 2005 Table 2 respiratory criterion). true meets the respiratory criterion. Omitted is false. true or false. magent does not examine ventilation.","required":false,"example":"false"},{"in":"query","name":"suspected_infection","type":"boolean","description":"Caller-assigned suspected or proven infection (Goldstein 2005 Table 2). Sepsis requires SIRS and this true. true or false. magent does not diagnose infection.","required":true,"example":"false"},{"in":"query","name":"cardiovascular_dysfunction","type":"boolean","description":"Caller-assigned cardiovascular organ dysfunction as in Goldstein 2005 Table 4. With SIRS and suspected_infection, this is septic shock (and severe sepsis). true or false. magent does not apply Table 4 from raw labs or blood pressure.","required":true,"example":"false"},{"in":"query","name":"ards","type":"boolean","description":"Caller-assigned acute respiratory distress syndrome as used for severe sepsis in Goldstein 2005 Table 2. true or false. magent does not interpret imaging or PaO2/FiO2.","required":true,"example":"false"},{"in":"query","name":"two_or_more_other_organ_dysfunctions","type":"boolean","description":"Caller-assigned two or more other organ dysfunctions (respiratory, renal, neurologic, hematologic, or hepatic per Goldstein 2005 Table 2/4) for severe sepsis when cardiovascular dysfunction and ARDS are absent. true or false. magent does not apply Table 4 from raw labs.","required":true,"example":"false"}],"errors":[{"code":"invalid_pediatric_sirs","message":"Pediatric SIRS inputs must match Goldstein 2005 age-group vital-sign and WBC thresholds from that paper only. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/pediatric-sirs","citation":{"authors":"Goldstein B, Giroir B, Randolph A; International Consensus Conference on Pediatric Sepsis","doi":"10.1097/01.PCC.0000149131.72248.E6","id":"goldstein-2005","pmid":"15636651","source":"Pediatr Crit Care Med. 2005;6(1):2-8","title":"International pediatric sepsis consensus conference: definitions for sepsis and organ dysfunction in pediatrics","url":"https://doi.org/10.1097/01.PCC.0000149131.72248.E6"},"formula_expression":"pediatric SIRS iff >=2 of 4 Goldstein 2005 Table 3 age-group criteria and (temperature or leukocyte): core temperature_c >38.5 or <36; heart_rate_bpm > tachycardia cutoff or (newborn/neonate/infant) < bradycardia cutoff; respiratory_rate > cutoff or mechanical_ventilation; wbc_k_ul > high or < low for age (newborn high-only) or band_percent >10; sepsis iff SIRS and suspected_infection; severe_sepsis iff sepsis and (cardiovascular_dysfunction or ards or two_or_more_other_organ_dysfunctions); septic_shock iff sepsis and cardiovascular_dysfunction","purpose":"Apply Goldstein 2005 pediatric SIRS age-group heart-rate, respiratory-rate, leukocyte, and core-temperature criteria, then the paper's sepsis, severe-sepsis, and septic-shock definitions from caller-assigned infection and organ-dysfunction flags.","markdown_url":"https://magentlab.com/docs/pediatric-sirs.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"pediatric_sirs"},{"name":"formula_expression","type":"string","description":"Goldstein 2005 pediatric SIRS, sepsis, severe sepsis, and septic shock"},{"name":"sirs_present","type":"boolean","description":"true when at least two of four Table 3 criteria are met and at least one is temperature or leukocyte. Heart rate plus respiratory rate alone is not SIRS. Not a diagnosis."},{"name":"sirs_criteria_met","type":"integer","description":"Count of the four Goldstein 2005 Table 3 criteria that are met (0-4)"},{"name":"sepsis","type":"boolean","description":"true when sirs_present and suspected_infection (Goldstein 2005 Table 2). Not a diagnosis or antibiotic order."},{"name":"severe_sepsis","type":"boolean","description":"true when sepsis and (cardiovascular_dysfunction or ards or two_or_more_other_organ_dysfunctions). Not a diagnosis."},{"name":"septic_shock","type":"boolean","description":"true when sepsis and cardiovascular_dysfunction (Goldstein 2005 Table 2). Not a vasopressor order."},{"name":"category","type":"string","description":"none, sirs, sepsis, severe_sepsis, or septic_shock. Highest published rung that holds. Not Phoenix 2024."},{"name":"age_group","type":"string","description":"Goldstein 2005 Table 1 age group used for Table 3 cutoffs"},{"name":"temperature_c","type":"number","description":"Core temperature in °C used"},{"name":"heart_rate_bpm","type":"integer","description":"Heart rate used, bpm"},{"name":"respiratory_rate","type":"integer","description":"Respiratory rate used, breaths/min"},{"name":"wbc_k_ul","type":"number","description":"WBC in 10^3/µL used for Table 3 cutoffs"},{"name":"criteria","type":"array","description":"Per-criterion rows with factor and met: temperature, heart_rate, respiratory, leukocyte, suspected_infection, cardiovascular_dysfunction, ards, two_or_more_other_organ_dysfunctions"},{"name":"citation","type":"object","description":"Goldstein 2005 Pediatr Crit Care Med citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age_group":"school_age","ards":"false","cardiovascular_dysfunction":"false","heart_rate_bpm":"100","respiratory_rate":"16","suspected_infection":"false","temperature_c":"37.0","two_or_more_other_organ_dysfunctions":"false","wbc_k_ul":"8.0"},{"age_group":"school_age","ards":"false","cardiovascular_dysfunction":"false","heart_rate_bpm":"100","respiratory_rate":"16","suspected_infection":"false","temperature_c":"37.0","two_or_more_other_organ_dysfunctions":"false","wbc_k_ul":"8.0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/pediatric-sirs","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/pediatric-sirs?age_group=school_age&temperature_c=37.0&heart_rate_bpm=100&respiratory_rate=16&wbc_k_ul=8.0&suspected_infection=false&cardiovascular_dysfunction=false&ards=false&two_or_more_other_organ_dysfunctions=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/pediatric-sirs","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/prs","description":"Lipsett 2022 Pneumonia Risk Score for children 3 months to 18 years: logistic probability of radiographic pneumonia from age, triage oxygen saturation, fever, rales, and wheeze, plus the published supplement integer score 1–6. Caller-assigned findings. Not a diagnosis, not a CXR order, and not adult CURB-65.","parameters":[{"in":"query","name":"age_years","type":"number","description":"Age in years, continuous (0.25-18). Lipsett 2022 enrolled children 3 months to 18 years. Not adult Params.age.","required":true,"example":"2"},{"in":"query","name":"spo2_percent","type":"number","description":"Triage / first oxygen saturation percent (50-100). Caller-assigned. magent does not measure saturation.","required":true,"example":"99"},{"in":"query","name":"fever","type":"boolean","description":"Fever at home or in the ED (Lipsett 2022 SDC: >38°C). true or false. Caller-assigned.","required":true,"example":"false"},{"in":"query","name":"rales","type":"boolean","description":"Rales / crackles on exam as assigned by the caller (Lipsett 2022). true or false. magent does not auscultate.","required":true,"example":"false"},{"in":"query","name":"wheeze","type":"boolean","description":"Wheeze on exam as assigned by the caller (Lipsett 2022). true or false. magent does not auscultate.","required":true,"example":"false"}],"errors":[{"code":"invalid_prs","message":"PRS inputs must match Lipsett 2022 age, triage oxygen saturation, fever, rales, and wheeze from that paper. Returned before settlement; you are not charged.","status":400},{"code":"invalid_spo2","message":"spo2_percent must be a number from 50 to 100. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/prs","citation":{"authors":"Lipsett SC, Hirsch AW, Monuteaux MC, Bachur RG, Neuman MI","doi":"10.1097/INF.0000000000003361","id":"lipsett-2022","pmid":"34694254","source":"Pediatr Infect Dis J. 2022;41(1):24-30","title":"Development of the Novel Pneumonia Risk Score to Predict Radiographic Pneumonia in Children","url":"https://doi.org/10.1097/INF.0000000000003361"},"formula_expression":"logit = 18.05624 + 0.098308*age_years + 1.144985*fever + (-0.21636)*spo2_percent + 0.407494*rales + (-0.907087)*wheeze (Lipsett 2022 SDC INF/E552; flags 1 if true else 0); probability_percent = 100 * exp(logit) / (1 + exp(logit)) from the unrounded logit, 2 decimals; score 1 if p < 0.05, 2 if p < 0.11, 3 if p < 0.21, 4 if p < 0.51, 5 if p < 0.75, else 6 (SDC wrote >=0.76 after <0.75; magent closes that hole at 0.75)","purpose":"Compute the Lipsett 2022 Pneumonia Risk Score logistic probability of radiographic pneumonia in children 3 months to 18 years, and the supplement integer score 1–6, from age, triage oxygen saturation, fever, rales, and wheeze.","markdown_url":"https://magentlab.com/docs/prs.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"prs"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"age_years","type":"number","description":"Input age in years"},{"name":"spo2_percent","type":"number","description":"Input triage oxygen saturation percent"},{"name":"fever","type":"boolean","description":"Fever at home or in the ED"},{"name":"rales","type":"boolean","description":"Caller-assigned rales / crackles"},{"name":"wheeze","type":"boolean","description":"Caller-assigned wheeze"},{"name":"logit","type":"number","description":"Lipsett 2022 SDC logit, 4 decimal places"},{"name":"probability_percent","type":"number","description":"Predicted probability of radiographic pneumonia as a percent from the unrounded logit, 2 decimals. Not a diagnosis."},{"name":"score","type":"integer","description":"Integer Pneumonia Risk Score 1-6 from the SDC probability bins. Not a CXR or antibiotic order."},{"name":"max_score","type":"integer","description":"6"},{"name":"citation","type":"object","description":"Lipsett et al. 2022 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age_years":"2","fever":"false","rales":"false","spo2_percent":"99","wheeze":"false"},{"age_years":"2","fever":"false","rales":"false","spo2_percent":"99","wheeze":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/prs","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/prs?age_years=2&spo2_percent=99&fever=false&rales=false&wheeze=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/prs","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/cpis","description":"Pugin 1991 clinical pulmonary infection score (CPIS, max 12) from temperature, leukocytes and band forms, tracheal secretions, PaO2/FiO2 with ARDS, chest radiograph, and tracheal-aspirate culture. Band CPIS>6 follows the 1991 derivation correlation. Not a VAP diagnosis or Singh modified CPIS.","parameters":[{"in":"query","name":"temperature_c","type":"number","description":"Temperature in °C (30.0-45.0). 36.5-38.4 scores 0; 38.5-38.9 scores 1; ≥39.0 or ≤36.0 scores 2 (Pugin 1991).","required":true,"example":"37.0"},{"in":"query","name":"wbc_k_ul","type":"number","description":"WBC in 10^3/mm^3 (same as 10^3/µL or 10^9/L). Range 0.01-500. 4.0-11.0 scores 0; <4.0 or >11.0 scores 1. Abnormal WBC plus bands_ge_50 scores 2 for this domain.","required":true,"example":"8.0"},{"in":"query","name":"bands_ge_50","type":"boolean","description":"Caller-assigned ≥50% band forms (Pugin 1991). true adds 1 only when WBC is already <4.0 or >11.0. true or false.","required":true,"example":"false"},{"in":"query","name":"tracheal_secretions","type":"string","enum":["none","nonpurulent","purulent"],"description":"Caller-assigned tracheal secretions. none scores 0; nonpurulent scores 1; purulent scores 2 (Pugin 1991).","required":true,"example":"none"},{"in":"query","name":"pf_ratio","type":"number","description":"PaO2/FiO2 in mm Hg (20-800). >240 or ards=true scores 0; ≤240 and ards=false scores 2 (Pugin 1991).","required":true,"example":"300"},{"in":"query","name":"ards","type":"boolean","description":"Caller-assigned ARDS. true scores 0 for oxygenation even when pf_ratio ≤240. true or false.","required":true,"example":"false"},{"in":"query","name":"chest_radiograph","type":"string","enum":["none","diffuse","localized"],"description":"Caller-assigned chest radiograph. none scores 0; diffuse scores 1; localized scores 2. magent does not read the radiograph.","required":true,"example":"none"},{"in":"query","name":"culture","type":"string","enum":["none","pathogen","pathogen_and_gram"],"description":"Caller-assigned tracheal-aspirate culture. none scores 0; pathogen (moderate/heavy pathogenic growth) scores 1; pathogen_and_gram (same pathogen on Gram stain) scores 2. magent does not read Gram stains.","required":true,"example":"none"}],"errors":[{"code":"invalid_temperature","message":"temperature_c must be a number from 30.0 to 45.0. Returned before settlement; you are not charged.","status":400},{"code":"invalid_wbc","message":"wbc_k_ul (0.01-500) or wbc_ul (10-500000) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_pf_ratio","message":"pf_ratio must be a number from 20 to 800. Returned before settlement; you are not charged.","status":400},{"code":"invalid_tracheal_secretions","message":"tracheal_secretions must be none, nonpurulent, or purulent (Pugin 1991 CPIS). Returned before settlement; you are not charged.","status":400},{"code":"invalid_chest_radiograph","message":"chest_radiograph must be none, diffuse, or localized (Pugin 1991 CPIS). Returned before settlement; you are not charged.","status":400},{"code":"invalid_cpis_culture","message":"culture must be none, pathogen, or pathogen_and_gram (Pugin 1991 CPIS). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/cpis","citation":{"authors":"Pugin J, Auckenthaler R, Mili N, Janssens JP, Lew PD, Suter PM","doi":"10.1164/ajrccm/143.5_Pt_1.1121","id":"pugin-1991","pmid":"2024824","source":"Am Rev Respir Dis. 1991;143(5 Pt 1):1121-1129","title":"Diagnosis of ventilator-associated pneumonia by bacteriologic analysis of bronchoscopic and nonbronchoscopic \"blind\" bronchoalveolar lavage fluid","url":"https://doi.org/10.1164/ajrccm/143.5_Pt_1.1121"},"formula_expression":"CPIS = temperature(36.5-38.4→0, 38.5-38.9→1, ≥39 or ≤36→2) + leukocytes(4.0-11.0→0, <4.0 or >11.0→1, +1 if abnormal and bands_ge_50) + tracheal_secretions(none→0, nonpurulent→1, purulent→2) + oxygenation(pf_ratio>240 or ards→0, pf_ratio≤240 and not ards→2) + chest_radiograph(none→0, diffuse→1, localized→2) + culture(none→0, pathogen→1, pathogen_and_gram→2); Pugin 1991; max 12; CPIS>6 suggests pulmonary infection in that derivation","purpose":"Sum the six Pugin 1991 CPIS domains (temperature, leukocytes, tracheal secretions, oxygenation, chest radiograph, tracheal-aspirate culture) and return le_6 or gt_6.","markdown_url":"https://magentlab.com/docs/cpis.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"cpis"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"CPIS points 0-12"},{"name":"max_score","type":"integer","description":"12"},{"name":"cpis_band","type":"string","description":"le_6 when score ≤6, gt_6 when score ≥7. Pugin 1991 CPIS>6 suggested pulmonary infection in that derivation. Not a VAP diagnosis."},{"name":"temperature_c","type":"number","description":"Temperature in °C used for scoring"},{"name":"wbc_k_ul","type":"number","description":"WBC in 10^3/mm^3 used for scoring"},{"name":"bands_ge_50","type":"boolean","description":"Caller-assigned ≥50% band forms used for the leukocyte domain"},{"name":"tracheal_secretions","type":"string","description":"none, nonpurulent, or purulent"},{"name":"pf_ratio","type":"number","description":"PaO2/FiO2 in mm Hg used for scoring"},{"name":"ards","type":"boolean","description":"Caller-assigned ARDS used for oxygenation"},{"name":"chest_radiograph","type":"string","description":"none, diffuse, or localized"},{"name":"culture","type":"string","description":"none, pathogen, or pathogen_and_gram"},{"name":"components","type":"array","description":"Per-domain Pugin 1991 points"},{"name":"citation","type":"object","description":"Pugin et al. Am Rev Respir Dis 1991 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"ards":"false","bands_ge_50":"false","chest_radiograph":"none","culture":"none","pf_ratio":"300","temperature_c":"37.0","tracheal_secretions":"none","wbc_k_ul":"8.0"},{"ards":"false","bands_ge_50":"false","chest_radiograph":"none","culture":"none","pf_ratio":"300","temperature_c":"37.0","tracheal_secretions":"none","wbc_k_ul":"8.0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/cpis","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/cpis?temperature_c=37.0&wbc_k_ul=8.0&bands_ge_50=false&tracheal_secretions=none&pf_ratio=300&ards=false&chest_radiograph=none&culture=none","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/cpis","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/lrinec","description":"LRINEC (Wong 2004): CRP ≥150 mg/L (4), WBC k/µL (<15 0, 15–25 1, >25 2), hemoglobin g/dL (>13.5 0, 11–13.5 1, <11 2), sodium <135 mmol/L (2), creatinine >141 µmol/L (2), glucose >10 mmol/L (1); max 13; cutoff ≥6. Deterministic published laboratory score with citation; not a diagnosis of necrotizing fasciitis and not an operative decision. A score below cutoff does not exclude disease.","parameters":[{"in":"query","name":"crp_mg_l","type":"number","description":"C-reactive protein in mg/L (0-500). ≥150 scores 4; otherwise 0.","required":true,"example":"20"},{"in":"query","name":"wbc_k_ul","type":"number","description":"WBC in 10^3/mm^3 (same as k/µL or 10^9/L). Provide wbc_k_ul or wbc_ul. Range 0.01-500. <15 scores 0; 15-25 scores 1; >25 scores 2.","required":false,"example":"8"},{"in":"query","name":"wbc_ul","type":"number","description":"WBC in cells/µL (same as cells/mm^3). Provide wbc_k_ul or wbc_ul. Range 10-500000. Converted as k/µL = cells/µL / 1000.","required":false,"example":"8000"},{"in":"query","name":"hemoglobin_g_dl","type":"number","description":"Hemoglobin in g/dL (3-22). >13.5 scores 0; 11-13.5 scores 1; <11 scores 2.","required":true,"example":"14"},{"in":"query","name":"sodium_mmol_l","type":"number","description":"Serum sodium in mmol/L (110-160). <135 scores 2; otherwise 0.","required":true,"example":"140"},{"in":"query","name":"creatinine_mg_dl","type":"number","description":"Creatinine in mg/dL (0.1-20). Provide this or creatinine_umol_l. Converted as µmol/L = mg/dL × 88.42. >141 µmol/L scores 2.","required":false,"example":"1.0"},{"in":"query","name":"creatinine_umol_l","type":"number","description":"Creatinine in µmol/L (9-1768). Provide this or creatinine_mg_dl. >141 scores 2.","required":false,"example":"88.42"},{"in":"query","name":"glucose_mg_dl","type":"number","description":"Plasma glucose in mg/dL (50-1000). Provide this or glucose_mmol_l, not both. Converted as mmol/L = mg/dL / 18.0182. >10 mmol/L scores 1.","required":false,"example":"90"},{"in":"query","name":"glucose_mmol_l","type":"number","description":"Plasma glucose in mmol/L (2.8-55.5). Provide this or glucose_mg_dl, not both. >10 scores 1.","required":false,"example":"5.0"}],"errors":[{"code":"invalid_crp","message":"crp_mg_l must be a number from 0 to 500. Returned before settlement; you are not charged.","status":400},{"code":"invalid_wbc","message":"wbc_k_ul (0.01-500) or wbc_ul (10-500000) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_hemoglobin","message":"hemoglobin_g_l (30-220) or hemoglobin_g_dl (3-22) is required, not both. Returned before settlement; you are not charged.","status":400},{"code":"invalid_sodium","message":"sodium_mmol_l must be a number from 110 to 160 Returned before settlement; you are not charged.","status":400},{"code":"invalid_creatinine","message":"creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_glucose","message":"glucose_mg_dl (50-1000) or glucose_mmol_l (2.8-55.5) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/lrinec","citation":{"authors":"Wong CH, Khin LW, Heng KS, Tan KC, Low CO","doi":"10.1097/01.CCM.0000129486.35458.7D","id":"wong-2004","pmid":"15241098","source":"Crit Care Med. 2004;32(7):1535-1541","title":"The LRINEC (Laboratory Risk Indicator for Necrotizing Fasciitis) score: a tool for distinguishing necrotizing fasciitis from other soft tissue infections","url":"https://doi.org/10.1097/01.CCM.0000129486.35458.7D"},"formula_expression":"LRINEC = CRP (>=150 mg/L → 4) + WBC 10^3/mm^3 (<15 → 0; 15-25 → 1; >25 → 2) + hemoglobin g/dL (>13.5 → 0; 11-13.5 → 1; <11 → 2) + sodium (<135 mmol/L → 2) + creatinine (>141 µmol/L → 2) + glucose (>10 mmol/L → 1); max 13; cutoff >=6","purpose":"Sum the Wong 2004 LRINEC laboratory table and return whether the total is at or above the published cutoff of 6.","markdown_url":"https://magentlab.com/docs/lrinec.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"lrinec"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"LRINEC points 0-13"},{"name":"max_score","type":"integer","description":"13"},{"name":"at_or_above_cutoff","type":"boolean","description":"true iff score >= 6 (Wong 2004 cutoff)"},{"name":"crp_mg_l","type":"number","description":"CRP in mg/L used"},{"name":"wbc_k_ul","type":"number","description":"WBC in 10^3/mm^3 used"},{"name":"hemoglobin_g_dl","type":"number","description":"Hemoglobin in g/dL used"},{"name":"sodium_mmol_l","type":"number","description":"Sodium in mmol/L used"},{"name":"creatinine_umol_l","type":"number","description":"Creatinine in µmol/L used (mg/dL × 88.42)"},{"name":"glucose_mmol_l","type":"number","description":"Glucose in mmol/L used"},{"name":"components","type":"array","description":"Per-lab Wong 2004 points"},{"name":"citation","type":"object","description":"Wong et al. Crit Care Med 2004 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"creatinine_mg_dl":"1.0","crp_mg_l":"20","glucose_mg_dl":"90","hemoglobin_g_dl":"14","sodium_mmol_l":"140","wbc_k_ul":"8"},{"creatinine_mg_dl":"1.0","crp_mg_l":"20","glucose_mg_dl":"90","hemoglobin_g_dl":"14","sodium_mmol_l":"140","wbc_k_ul":"8"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/lrinec","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/lrinec?crp_mg_l=20&wbc_k_ul=8&hemoglobin_g_dl=14&sodium_mmol_l=140&creatinine_mg_dl=1.0&glucose_mg_dl=90","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/lrinec","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/pedis","description":"Schaper 2004 IWGDF PEDIS: five independent grades, not a summed total. Perfusion 1-3 (no PAD; PAD without CLI; CLI). Extent 1-3 (<1; 1-3; >3 cm2). Depth 1-3 (superficial; fascia/muscle/tendon; bone/joint). Infection 1-4 (none; skin; deeper without SIRS; with SIRS). Sensation 1-2 (protective sensation present or lost). Label like 1-1-1-1-1. Caller assigns grades. Not a medical device or IWGDF treatment; magent does not measure the ulcer, diagnose PAD, or probe bone.","parameters":[{"in":"query","name":"perfusion","type":"integer","description":"Perfusion grade 1-3 as assigned by the caller (Schaper 2004): 1 no PAD symptoms/signs; 2 PAD without critical limb ischemia; 3 critical limb ischemia. magent does not diagnose PAD or measure pulses or pressures.","required":true,"example":"1"},{"in":"query","name":"extent","type":"integer","description":"Extent (ulcer area) grade 1-3 as assigned by the caller (Schaper 2004): 1 <1 cm2; 2 1-3 cm2; 3 >3 cm2. magent does not measure the ulcer.","required":true,"example":"1"},{"in":"query","name":"depth","type":"integer","description":"Depth grade 1-3 as assigned by the caller (Schaper 2004): 1 superficial (not through dermis to subcutaneous); 2 to subcutaneous/fascia/muscle/tendon (not bone/joint); 3 bone and/or joint. magent does not probe bone.","required":true,"example":"1"},{"in":"query","name":"infection","type":"integer","description":"Infection grade 1-4 as assigned by the caller (Schaper 2004): 1 none; 2 skin/subcutaneous only; 3 deeper than skin (abscess, osteomyelitis, septic arthritis, fasciitis) without SIRS; 4 infection with SIRS. magent does not diagnose infection.","required":true,"example":"1"},{"in":"query","name":"sensation","type":"integer","description":"Sensation grade 1-2 as assigned by the caller (Schaper 2004): 1 no loss of protective sensation; 2 loss of protective sensation. magent does not test sensation.","required":true,"example":"1"}],"errors":[{"code":"invalid_pedis","message":"perfusion 1-3, extent 1-3, depth 1-3, infection 1-4, and sensation 1-2 (Schaper 2004 IWGDF PEDIS grades). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/pedis","citation":{"authors":"Schaper NC","doi":"10.1002/dmrr.464","id":"schaper-2004","pmid":"15150820","source":"Diabetes Metab Res Rev. 2004;20 Suppl 1:S90-S95","title":"Diabetic foot ulcer classification system for research purposes: a progress report on criteria for including patients in research studies","url":"https://doi.org/10.1002/dmrr.464"},"formula_expression":"PEDIS is five independent Schaper 2004 IWGDF grades, not a summed total: perfusion 1-3 (1 no PAD symptoms/signs; 2 PAD without critical limb ischemia; 3 critical limb ischemia); extent 1-3 (ulcer area 1 <1 cm2; 2 1-3 cm2; 3 >3 cm2); depth 1-3 (1 superficial, not through dermis to subcutaneous; 2 to subcutaneous/fascia/muscle/tendon, not bone/joint; 3 bone and/or joint); infection 1-4 (1 none; 2 skin/subcutaneous only; 3 deeper than skin without SIRS; 4 infection with SIRS); sensation 1-2 (1 no loss of protective sensation; 2 loss of protective sensation). Label is perfusion-extent-depth-infection-sensation","purpose":"Apply Schaper 2004 IWGDF PEDIS research grades and return the five independent grades (perfusion 1-3, extent 1-3, depth 1-3, infection 1-4, sensation 1-2) plus a pedis label like 1-1-1-1-1.","markdown_url":"https://magentlab.com/docs/pedis.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"pedis"},{"name":"formula_expression","type":"string","description":"Five independent Schaper 2004 IWGDF PEDIS grades, not a summed total"},{"name":"perfusion","type":"integer","description":"Caller-assigned perfusion grade 1-3"},{"name":"extent","type":"integer","description":"Caller-assigned extent grade 1-3"},{"name":"depth","type":"integer","description":"Caller-assigned depth grade 1-3"},{"name":"infection","type":"integer","description":"Caller-assigned infection grade 1-4"},{"name":"sensation","type":"integer","description":"Caller-assigned sensation grade 1-2"},{"name":"pedis","type":"string","description":"perfusion-extent-depth-infection-sensation label, for example 1-1-1-1-1"},{"name":"criteria","type":"array","description":"Per-axis rows with factor, met, and value for the five PEDIS grades"},{"name":"citation","type":"object","description":"Schaper 2004 Diabetes Metab Res Rev citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"depth":"1","extent":"1","infection":"1","perfusion":"1","sensation":"1"},{"depth":"1","extent":"1","infection":"1","perfusion":"1","sensation":"1"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/pedis","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/pedis?perfusion=1&extent=1&depth=1&infection=1&sensation=1","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/pedis","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/wifi","description":"Mills 2014 SVS WIfI: three independent caller-assigned grades, not a summed total. Wound 0-3 (no ulcer; small shallow distal ulcer; deeper ulcer or digital gangrene; extensive ulcer or gangrene). Ischemia 0-3 (none; mild; moderate; severe). Foot infection 0-3 (none; skin/subcutaneous; deeper without SIRS; with SIRS). Label like W0-I0-fI0. Caller assigns grades. Not a medical device, not PEDIS, and not an amputation or revascularization order; magent does not inspect wounds or measure ABI.","parameters":[{"in":"query","name":"wound","type":"integer","description":"Wound grade 0-3 as assigned by the caller (Mills 2014): 0 no ulcer and no gangrene; 1 small, shallow ulcer(s) on the distal leg or foot without gangrene; 2 deeper ulcer with exposed bone, joint, or tendon, or gangrene limited to digits; 3 extensive deep ulcer involving forefoot and/or midfoot, full-thickness heel ulcer, or extensive gangrene. magent does not inspect wounds.","required":true,"example":"0"},{"in":"query","name":"ischemia","type":"integer","description":"Ischemia grade 0-3 as assigned by the caller (Mills 2014): 0 none; 1 mild; 2 moderate; 3 severe. magent does not measure ABI, ankle pressure, or toe pressure and does not compute this grade from pressures.","required":true,"example":"0"},{"in":"query","name":"foot_infection","type":"integer","description":"Foot infection grade 0-3 as assigned by the caller (Mills 2014): 0 no signs of infection; 1 infection involving only skin and subcutaneous tissue; 2 infection deeper than skin (abscess, osteomyelitis, septic arthritis, fasciitis) without SIRS; 3 infection with SIRS. magent does not diagnose infection.","required":true,"example":"0"}],"errors":[{"code":"invalid_wifi","message":"wound, ischemia, and foot_infection must be integers 0-3 (Mills 2014 SVS WIfI caller-assigned grades). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/wifi","citation":{"authors":"Mills JL, Conte MS, Armstrong DG, et al.","doi":"10.1016/j.jvs.2013.08.003","id":"mills-2014","pmid":"24126108","source":"J Vasc Surg. 2014;59(1):220-234.e1-2","title":"The Society for Vascular Surgery Lower Extremity Threatened Limb Classification System: risk stratification based on wound, ischemia, and foot infection (WIfI).","url":"https://doi.org/10.1016/j.jvs.2013.08.003"},"formula_expression":"WIfI is three independent Mills 2014 SVS grades, not a summed total: wound 0-3 (0 no ulcer and no gangrene; 1 small shallow distal ulcer without gangrene; 2 deeper ulcer with exposed bone, joint, or tendon, or gangrene limited to digits; 3 extensive deep ulcer or extensive gangrene); ischemia 0-3 as assigned by the caller (0 none; 1 mild; 2 moderate; 3 severe); foot_infection 0-3 (0 none; 1 skin and subcutaneous only; 2 deeper than skin without SIRS; 3 infection with SIRS). Label is W{wound}-I{ischemia}-fI{foot_infection}","purpose":"Apply Mills 2014 SVS WIfI grades and return the three independent grades (wound 0-3, ischemia 0-3, foot_infection 0-3) plus a wifi label like W0-I0-fI0.","markdown_url":"https://magentlab.com/docs/wifi.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"wifi"},{"name":"formula_expression","type":"string","description":"Three independent Mills 2014 SVS WIfI grades, not a summed total"},{"name":"wound","type":"integer","description":"Caller-assigned wound grade 0-3"},{"name":"ischemia","type":"integer","description":"Caller-assigned ischemia grade 0-3"},{"name":"foot_infection","type":"integer","description":"Caller-assigned foot infection grade 0-3"},{"name":"wifi","type":"string","description":"W{wound}-I{ischemia}-fI{foot_infection} label, for example W0-I0-fI0"},{"name":"criteria","type":"array","description":"Per-axis rows with factor, met, and value for the three WIfI grades"},{"name":"citation","type":"object","description":"Mills 2014 J Vasc Surg citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"foot_infection":"0","ischemia":"0","wound":"0"},{"foot_infection":"0","ischemia":"0","wound":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/wifi","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/wifi?wound=0&ischemia=0&foot_infection=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/wifi","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/alt-70","description":"Raff 2017 ALT-70 for lower-extremity cellulitis vs pseudocellulitis. Caller-assigned unilateral involvement (3), WBC ≥10,000/µL (1), heart rate ≥90 (1), age ≥70 (2); max 7. Bands 0-2 (pseudocellulitis-leaning), 3-4 (indeterminate), and ≥5 (cellulitis-leaning). Deterministic published score with citation; not a medical device, not a cellulitis diagnosis, and not an antibiotic order. magent does not examine the limb.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Raff 2017: scores 2 when ≥70. Age 69 does not score.","required":true,"example":"40"},{"in":"query","name":"unilateral","type":"boolean","description":"Unilateral (asymmetric) lower-extremity involvement (Raff 2017). true or false as assigned by the caller. 3 points if true. magent does not examine the limb.","required":true,"example":"false"},{"in":"query","name":"wbc_k_ul","type":"number","description":"WBC in 10^3/µL (same as k/µL or 10^9/L). Provide wbc_k_ul or wbc_ul. Range 0.01-500. ≥10 (10,000/µL) scores 1. 9.9 does not score.","required":false,"example":"8"},{"in":"query","name":"wbc_ul","type":"number","description":"WBC in cells/µL (same as cells/mm^3). Provide wbc_k_ul or wbc_ul. Range 10-500000. ≥10,000/µL scores 1.","required":false,"example":"8000"},{"in":"query","name":"heart_rate_bpm","type":"integer","description":"Heart rate in beats per minute (integer 30-220). Raff 2017: scores 1 when ≥90. Heart rate 89 does not score.","required":true,"example":"80"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_wbc","message":"wbc_k_ul (0.01-500) or wbc_ul (10-500000) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_heart_rate","message":"heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/alt-70","citation":{"authors":"Raff AB, Weng QY, Cohen JM, et al.","doi":"10.1016/j.jaad.2016.12.044","id":"raff-2017","pmid":"28215446","source":"J Am Acad Dermatol. 2017;76(4):618-625.e2","title":"A predictive model for diagnosis of lower extremity cellulitis: A cross-sectional study.","url":"https://doi.org/10.1016/j.jaad.2016.12.044"},"formula_expression":"ALT-70 = (unilateral → 3) + (WBC >= 10000/µL → 1) + (heart_rate_bpm >= 90 → 1) + (age >= 70 → 2); max 7; bands 0-2 / 3-4 / >=5","purpose":"Sum the Raff 2017 ALT-70 items (unilateral involvement, leukocytosis, tachycardia, age ≥70) and return the published 0-2 / 3-4 / >=5 band.","markdown_url":"https://magentlab.com/docs/alt-70.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"alt_70"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"ALT-70 points 0-7"},{"name":"max_score","type":"integer","description":"7"},{"name":"band","type":"string","description":"Raff 2017 point region: 0-2 (pseudocellulitis-leaning), 3-4 (indeterminate), or >=5 (cellulitis-leaning). A band, not a diagnosis. Percents are not returned."},{"name":"age_years","type":"integer","description":"Age used for the ≥70 criterion"},{"name":"unilateral","type":"boolean","description":"Unilateral-involvement flag used"},{"name":"wbc_per_ul","type":"number","description":"WBC in cells/µL used"},{"name":"heart_rate_bpm","type":"integer","description":"Heart rate used, bpm"},{"name":"components","type":"array","description":"Per-item Raff 2017 points"},{"name":"citation","type":"object","description":"Raff et al. J Am Acad Dermatol 2017 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"40","heart_rate_bpm":"80","unilateral":"false","wbc_k_ul":"8"},{"age":"40","heart_rate_bpm":"80","unilateral":"false","wbc_k_ul":"8"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/alt-70","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/alt-70?age=40&unilateral=false&wbc_k_ul=8&heart_rate_bpm=80","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/alt-70","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/mascc","description":"MASCC risk index from Klastersky 2000: one burden-of-illness value (none_or_mild 5, moderate 3, severe 0) plus no hypotension (5), no COPD (4), solid tumor or hematologic malignancy without previous fungal infection (4), outpatient (3), no dehydration (3), and age <60 (2). Max 26; low-risk ≥21. Deterministic published arithmetic with citation; not an outpatient-chemotherapy order; magent does not read a blood pressure.","parameters":[{"in":"query","name":"burden","type":"string","enum":["none_or_mild","moderate","severe"],"description":"Caller-assigned burden of illness (none_or_mild, moderate, or severe). Klastersky 2000: none_or_mild → 5, moderate → 3, severe → 0. One value, not cumulative.","required":true,"example":"none_or_mild"},{"in":"query","name":"no_hypotension","type":"boolean","description":"No hypotension (SBP >90 mm Hg) as assigned by the caller (Klastersky 2000). true scores 5. magent does not read a blood pressure.","required":true,"example":"true"},{"in":"query","name":"no_copd","type":"boolean","description":"No COPD as assigned by the caller (Klastersky 2000). true scores 4.","required":true,"example":"true"},{"in":"query","name":"solid_tumor_or_no_prior_fungal","type":"boolean","description":"Solid tumor, or hematologic malignancy without previous fungal infection, as assigned by the caller (Klastersky 2000). One item. true scores 4.","required":true,"example":"true"},{"in":"query","name":"outpatient","type":"boolean","description":"Outpatient status at fever onset as assigned by the caller (Klastersky 2000). true scores 3.","required":true,"example":"true"},{"in":"query","name":"no_dehydration","type":"boolean","description":"No dehydration requiring parenteral fluids as assigned by the caller (Klastersky 2000). true scores 3.","required":true,"example":"true"},{"in":"query","name":"age_lt_60","type":"boolean","description":"Age <60 years as assigned by the caller (Klastersky 2000). true scores 2. magent does not parse a numeric age here.","required":true,"example":"true"}],"errors":[{"code":"invalid_mascc_burden","message":"burden must be none_or_mild, moderate, or severe (Klastersky 2000 MASCC; not cumulative). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/mascc","citation":{"authors":"Klastersky J, Paesmans M, Rubenstein EB, Boyer M, Elting L, Feld R, Gallagher J, Herrstedt J, Rapoport B, Rolston K, Talcott J","doi":"10.1200/JCO.2000.18.16.3038","id":"klastersky-2000","pmid":"10944139","source":"J Clin Oncol. 2000;18(16):3038-3051","title":"The Multinational Association for Supportive Care in Cancer risk index: a multinational scoring system for identifying low-risk febrile neutropenic cancer patients","url":"https://doi.org/10.1200/JCO.2000.18.16.3038"},"formula_expression":"MASCC = burden (none_or_mild 5, moderate 3, severe 0; one value) + no_hypotension 5 + no_copd 4 + solid_tumor_or_no_prior_fungal 4 + outpatient 3 + no_dehydration 3 + age_lt_60 2; Klastersky 2000; max 26; low-risk ≥21","purpose":"Sum the Klastersky 2000 MASCC risk-index weights for febrile neutropenia and return low-risk (≥21) or high-risk (<21).","markdown_url":"https://magentlab.com/docs/mascc.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"mascc"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"MASCC points 0-26"},{"name":"max_score","type":"integer","description":"Always 26"},{"name":"mascc_band","type":"string","description":"low_risk when score ≥21, high_risk when score <21 (Klastersky 2000). Not an outpatient-chemotherapy order."},{"name":"burden","type":"string","description":"Caller-assigned burden of illness used (none_or_mild, moderate, or severe)"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Klastersky 2000 J Clin Oncol citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age_lt_60":"true","burden":"none_or_mild","no_copd":"true","no_dehydration":"true","no_hypotension":"true","outpatient":"true","solid_tumor_or_no_prior_fungal":"true"},{"age_lt_60":"true","burden":"none_or_mild","no_copd":"true","no_dehydration":"true","no_hypotension":"true","outpatient":"true","solid_tumor_or_no_prior_fungal":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/mascc","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/mascc?burden=none_or_mild&no_hypotension=true&no_copd=true&solid_tumor_or_no_prior_fungal=true&outpatient=true&no_dehydration=true&age_lt_60=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/mascc","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/cisne","description":"Carmona-Bayonas 2015 CISNE: ECOG ≥2 (2), stress hyperglycemia (2), COPD (1), chronic cardiovascular disease (1), NCI CTC mucositis ≥2 (1), monocytes <200/µL (1). Max 8. Low 0, intermediate 1–2, high ≥3. Seemingly stable adult solid-tumor febrile neutropenia only. Deterministic published score with citation; not MASCC; not an outpatient-chemotherapy or discharge order. magent does not assign ECOG, assay glucose, diagnose COPD, read an echocardiogram, grade mucositis, or count monocytes.","parameters":[{"in":"query","name":"ecog_ge_2","type":"boolean","description":"ECOG performance status ≥2 as assigned by the caller (Carmona-Bayonas 2015). true scores 2. magent does not assign ECOG.","required":true,"example":"false"},{"in":"query","name":"stress_hyperglycemia","type":"boolean","description":"Stress hyperglycemia as assigned by the caller (Carmona-Bayonas 2015). true scores 2. magent does not assay glucose.","required":true,"example":"false"},{"in":"query","name":"copd","type":"boolean","description":"COPD as assigned by the caller (Carmona-Bayonas 2015). true scores 1. magent does not diagnose COPD.","required":true,"example":"false"},{"in":"query","name":"chronic_cardiovascular_disease","type":"boolean","description":"Chronic cardiovascular disease as assigned by the caller (Carmona-Bayonas 2015). true scores 1. magent does not read an echocardiogram.","required":true,"example":"false"},{"in":"query","name":"mucositis_nci_ge_2","type":"boolean","description":"NCI CTC mucositis grade ≥2 as assigned by the caller (Carmona-Bayonas 2015). true scores 1, not 3. magent does not grade mucositis.","required":true,"example":"false"},{"in":"query","name":"monocytes_lt_200","type":"boolean","description":"Monocytes <200 per µL as assigned by the caller (Carmona-Bayonas 2015). true scores 1. magent does not count monocytes.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/cisne","citation":{"authors":"Carmona-Bayonas A, Jiménez-Fonseca P, Virizuela Echaburu J, Antonio M, Font C, Biosca M, Ramchandani A, Martínez J, Hernando Cubero J, Espinosa J, Martínez de Castro E, Ghanem I, Beato C, Blasco A, Garrido M, Bonilla Y, Mondéjar R, Arcusa Lanza MÁ, Aragón Manrique I, Manzano A, Sevillano E, Castañón E, Cardona M, Gallardo Martín E, Pérez Armillas Q, Sánchez Lasheras F, Ayala de la Peña F","doi":"10.1200/JCO.2014.57.2347","id":"carmona-bayonas-2015","pmid":"25559804","source":"J Clin Oncol. 2015;33(5):465-471","title":"Prediction of serious complications in patients with seemingly stable febrile neutropenia: validation of the Clinical Index of Stable Febrile Neutropenia in a prospective cohort of patients from the FINITE study","url":"https://doi.org/10.1200/JCO.2014.57.2347"},"formula_expression":"CISNE = ecog_ge_2 2 + stress_hyperglycemia 2 + copd 1 + chronic_cardiovascular_disease 1 + mucositis_nci_ge_2 1 + monocytes_lt_200 1; Carmona-Bayonas 2015; max 8; low 0, intermediate 1-2, high ≥3","purpose":"Sum the Carmona-Bayonas 2015 CISNE weights for seemingly stable febrile neutropenia and return low (0), intermediate (1–2), or high (≥3).","markdown_url":"https://magentlab.com/docs/cisne.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"cisne"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"CISNE points 0-8"},{"name":"max_score","type":"integer","description":"Always 8"},{"name":"cisne_band","type":"string","description":"low when score is 0, intermediate when 1-2, high when ≥3 (Carmona-Bayonas 2015). Not MASCC and not an outpatient-chemotherapy or discharge order."},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Carmona-Bayonas 2015 J Clin Oncol citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"chronic_cardiovascular_disease":"false","copd":"false","ecog_ge_2":"false","monocytes_lt_200":"false","mucositis_nci_ge_2":"false","stress_hyperglycemia":"false"},{"chronic_cardiovascular_disease":"false","copd":"false","ecog_ge_2":"false","monocytes_lt_200":"false","mucositis_nci_ge_2":"false","stress_hyperglycemia":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/cisne","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/cisne?ecog_ge_2=false&stress_hyperglycemia=false&copd=false&chronic_cardiovascular_disease=false&mucositis_nci_ge_2=false&monocytes_lt_200=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/cisne","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/geneva-prophylaxis","description":"Chopard 2006 Geneva score for VTE prophylaxis in acutely ill medical inpatients. Eleven 2-point factors plus eight 1-point factors including age >60. Max 30. Score <3 low; >=3 high (prophylaxis indicated). Not a diagnosis or order. Not Revised Geneva PE. Not Padua.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Age >60 scores 1 (Chopard 2006). Age 60 is the ≤60 arm and scores 0.","required":true,"example":"50"},{"in":"query","name":"cardiac_failure","type":"boolean","description":"Cardiac failure as assigned by the caller (Chopard 2006 Geneva prophylaxis table). true scores 2. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"respiratory_failure","type":"boolean","description":"Respiratory failure as assigned by the caller (Chopard 2006). true scores 2. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"recent_stroke","type":"boolean","description":"Recent stroke as assigned by the caller (Chopard 2006). true scores 2. magent does not diagnose stroke.","required":true,"example":"false"},{"in":"query","name":"recent_myocardial_infarction","type":"boolean","description":"Recent myocardial infarction as assigned by the caller (Chopard 2006). true scores 2. magent does not diagnose myocardial infarction.","required":true,"example":"false"},{"in":"query","name":"acute_infectious_disease","type":"boolean","description":"Acute infectious disease including sepsis as assigned by the caller (Chopard 2006). true scores 2. magent does not diagnose infection.","required":true,"example":"false"},{"in":"query","name":"acute_rheumatic_disease","type":"boolean","description":"Acute rheumatic disease as assigned by the caller (Chopard 2006). true scores 2. magent does not diagnose rheumatic disease.","required":true,"example":"false"},{"in":"query","name":"malignancy","type":"boolean","description":"Malignancy as assigned by the caller (Chopard 2006). true scores 2. magent does not diagnose cancer.","required":true,"example":"false"},{"in":"query","name":"myeloproliferative_syndrome","type":"boolean","description":"Myeloproliferative syndrome as assigned by the caller (Chopard 2006). true scores 2. magent does not diagnose a myeloproliferative neoplasm.","required":true,"example":"false"},{"in":"query","name":"nephrotic_syndrome","type":"boolean","description":"Nephrotic syndrome as assigned by the caller (Chopard 2006). true scores 2. magent does not diagnose nephrotic syndrome.","required":true,"example":"false"},{"in":"query","name":"history_of_vte","type":"boolean","description":"History of VTE as assigned by the caller (Chopard 2006). true scores 2. magent does not diagnose VTE.","required":true,"example":"false"},{"in":"query","name":"known_hypercoagulable_state","type":"boolean","description":"Known hypercoagulable state as assigned by the caller (Chopard 2006). true scores 2. magent does not interpret a thrombophilia panel.","required":true,"example":"false"},{"in":"query","name":"immobilization_ge_3d","type":"boolean","description":"Immobilization as assigned by the caller (walk <30 min/day for ≥3 days, Chopard 2006). true scores 1. magent does not observe walking time.","required":true,"example":"false"},{"in":"query","name":"recent_travel_gt_6h","type":"boolean","description":"Recent travel >6 hours as assigned by the caller (Chopard 2006). true scores 1.","required":true,"example":"false"},{"in":"query","name":"obesity_bmi_gt_30","type":"boolean","description":"Obesity as assigned by the caller (BMI >30, Chopard 2006). true scores 1. magent does not take height or weight.","required":true,"example":"false"},{"in":"query","name":"chronic_venous_insufficiency","type":"boolean","description":"Chronic venous insufficiency as assigned by the caller (Chopard 2006). true scores 1. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"pregnancy","type":"boolean","description":"Pregnancy as assigned by the caller (Chopard 2006). true scores 1. magent does not confirm pregnancy.","required":true,"example":"false"},{"in":"query","name":"hormonal_therapy","type":"boolean","description":"Hormonal therapy as assigned by the caller (Chopard 2006). true scores 1.","required":true,"example":"false"},{"in":"query","name":"dehydration","type":"boolean","description":"Dehydration as assigned by the caller (Chopard 2006). true scores 1. magent does not assay volume status.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_geneva_prophylaxis","message":"each Chopard 2006 Geneva prophylaxis flag must be true or false. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/geneva-prophylaxis","citation":{"authors":"Chopard P, Spirk D, Bounameaux H","doi":"10.1111/j.1538-7836.2006.01818.x","id":"chopard-2006","pmid":"16634771","source":"J Thromb Haemost. 2006;4(4):915-916","title":"Identifying acutely ill medical patients requiring thromboprophylaxis","url":"https://doi.org/10.1111/j.1538-7836.2006.01818.x"},"formula_expression":"geneva_prophylaxis = cardiac_failure (2) + respiratory_failure (2) + recent_stroke (2) + recent_myocardial_infarction (2) + acute_infectious_disease (2) + acute_rheumatic_disease (2) + malignancy (2) + myeloproliferative_syndrome (2) + nephrotic_syndrome (2) + history_of_vte (2) + known_hypercoagulable_state (2) + immobilization_ge_3d (1) + recent_travel_gt_6h (1) + age>60 (1) + obesity_bmi_gt_30 (1) + chronic_venous_insufficiency (1) + pregnancy (1) + hormonal_therapy (1) + dehydration (1); Chopard 2006 letter table; max 30; <3 low, >=3 high (prophylaxis indicated)","purpose":"Compute the Chopard 2006 Geneva risk score for VTE thromboprophylaxis in acutely ill medical inpatients from age and caller-assigned findings.","markdown_url":"https://magentlab.com/docs/geneva-prophylaxis.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"geneva_prophylaxis"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Total points 0-30"},{"name":"max_score","type":"integer","description":"Always 30 (11×2 + 8×1)"},{"name":"risk_group","type":"string","description":"low when score is <3; high when score is ≥3 (Chopard 2006 prophylaxis indicated). Not a diagnosis or prophylaxis order. Not Padua."},{"name":"age_years","type":"integer","description":"Age used for the >60 criterion"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Chopard 2006 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"acute_infectious_disease":"false","acute_rheumatic_disease":"false","age":"50","cardiac_failure":"false","chronic_venous_insufficiency":"false","dehydration":"false","history_of_vte":"false","hormonal_therapy":"false","immobilization_ge_3d":"false","known_hypercoagulable_state":"false","malignancy":"false","myeloproliferative_syndrome":"false","nephrotic_syndrome":"false","obesity_bmi_gt_30":"false","pregnancy":"false","recent_myocardial_infarction":"false","recent_stroke":"false","recent_travel_gt_6h":"false","respiratory_failure":"false"},{"acute_infectious_disease":"false","acute_rheumatic_disease":"false","age":"50","cardiac_failure":"false","chronic_venous_insufficiency":"false","dehydration":"false","history_of_vte":"false","hormonal_therapy":"false","immobilization_ge_3d":"false","known_hypercoagulable_state":"false","malignancy":"false","myeloproliferative_syndrome":"false","nephrotic_syndrome":"false","obesity_bmi_gt_30":"false","pregnancy":"false","recent_myocardial_infarction":"false","recent_stroke":"false","recent_travel_gt_6h":"false","respiratory_failure":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/geneva-prophylaxis","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/geneva-prophylaxis?age=50&cardiac_failure=false&respiratory_failure=false&recent_stroke=false&recent_myocardial_infarction=false&acute_infectious_disease=false&acute_rheumatic_disease=false&malignancy=false&myeloproliferative_syndrome=false&nephrotic_syndrome=false&history_of_vte=false&known_hypercoagulable_state=false&immobilization_ge_3d=false&recent_travel_gt_6h=false&obesity_bmi_gt_30=false&chronic_venous_insufficiency=false&pregnancy=false&hormonal_therapy=false&dehydration=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/geneva-prophylaxis","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/kawasaki","description":"AHA 2017 classic/complete Kawasaki disease (McCrindle). Complete when fever_days >= 4 and at least 4 of 5 principal features are true (oral mucosal changes, bilateral conjunctival injection, rash, extremity changes, cervical lymphadenopathy). Does not implement the incomplete-KD lab/echo algorithm or the 3-day clinician exception. magent does not examine the patient or read an echocardiogram. Not a medical device and not a diagnosis.","parameters":[{"in":"query","name":"fever_days","type":"integer","description":"Duration of fever in days (integer 1-30). Classic complete KD requires fever_days >= 5 with >=4 principal features; with >=4 principal features the diagnosis may be made with 4 days of fever (McCrindle 2017). The 3-day clinician exception is not this tool.","required":true,"example":"5"},{"in":"query","name":"oral_mucosal_changes","type":"boolean","description":"Principal feature: erythema and cracking of lips, strawberry tongue, and/or erythema of oral and pharyngeal mucosa (McCrindle 2017). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"true"},{"in":"query","name":"bilateral_conjunctival_injection","type":"boolean","description":"Principal feature: bilateral bulbar conjunctival injection without exudate (McCrindle 2017). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"true"},{"in":"query","name":"rash","type":"boolean","description":"Principal feature: rash — maculopapular, diffuse erythroderma, or erythema multiforme-like (McCrindle 2017). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"true"},{"in":"query","name":"extremity_changes","type":"boolean","description":"Principal feature: erythema and edema of the hands and feet in the acute phase and/or periungual desquamation in the subacute phase (McCrindle 2017). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"true"},{"in":"query","name":"cervical_lymphadenopathy","type":"boolean","description":"Principal feature: cervical lymphadenopathy (>=1.5 cm diameter), usually unilateral (McCrindle 2017). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"true"}],"errors":[{"code":"invalid_fever_days","message":"fever_days must be an integer from 1 to 30. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/kawasaki","citation":{"authors":"McCrindle BW, Rowley AH, Newburger JW, Burns JC, Bolger AF, Gewitz M, Baker AL, Jackson MA, Takahashi M, Shah PB, Kobayashi T, Wu MH, Saji TT, Pahl E","doi":"10.1161/CIR.0000000000000484","id":"mccrindle-2017","pmid":"28356445","source":"Circulation. 2017;135(17):e927-e999","title":"Diagnosis, Treatment, and Long-Term Management of Kawasaki Disease: A Scientific Statement for Health Professionals From the American Heart Association","url":"https://doi.org/10.1161/CIR.0000000000000484"},"formula_expression":"complete iff principal_feature_count >= 4 and fever_days >= 4 (McCrindle 2017; classic KD with fever_days >= 5 and >=4 features, or 4 days of fever when >=4 principal features). principal_feature_count is the number of true flags among oral_mucosal_changes, bilateral_conjunctival_injection, rash, extremity_changes, cervical_lymphadenopathy. Not incomplete-KD labs/echo. Not the 3-day clinician exception","purpose":"Apply McCrindle 2017 classic/complete Kawasaki disease criteria and return complete or not_complete from fever_days and five caller-assigned principal features.","markdown_url":"https://magentlab.com/docs/kawasaki.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"kawasaki"},{"name":"formula_expression","type":"string","description":"McCrindle 2017 classic/complete Kawasaki disease rule"},{"name":"fever_days","type":"integer","description":"Echo of fever duration in days"},{"name":"oral_mucosal_changes","type":"boolean","description":"Echo of the caller-assigned oral mucosal principal feature"},{"name":"bilateral_conjunctival_injection","type":"boolean","description":"Echo of the caller-assigned conjunctival principal feature"},{"name":"rash","type":"boolean","description":"Echo of the caller-assigned rash principal feature"},{"name":"extremity_changes","type":"boolean","description":"Echo of the caller-assigned extremity principal feature"},{"name":"cervical_lymphadenopathy","type":"boolean","description":"Echo of the caller-assigned cervical lymphadenopathy principal feature"},{"name":"principal_feature_count","type":"integer","description":"Number of true principal features (0-5)"},{"name":"classification","type":"string","description":"complete when principal_feature_count >= 4 and fever_days >= 4; otherwise not_complete. Not incomplete KD. Not a diagnosis."},{"name":"criteria","type":"array","description":"Rows for fever_days_ge_4, each principal feature, and principal_feature_count_ge_4 with factor, met, and value when numeric"},{"name":"citation","type":"object","description":"McCrindle 2017 Circulation citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"bilateral_conjunctival_injection":"true","cervical_lymphadenopathy":"true","extremity_changes":"true","fever_days":"5","oral_mucosal_changes":"true","rash":"true"},{"bilateral_conjunctival_injection":"true","cervical_lymphadenopathy":"true","extremity_changes":"true","fever_days":"5","oral_mucosal_changes":"true","rash":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/kawasaki","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/kawasaki?fever_days=5&oral_mucosal_changes=true&bilateral_conjunctival_injection=true&rash=true&extremity_changes=true&cervical_lymphadenopathy=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/kawasaki","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/scap","description":"España 2006 SCAP. Eight caller-assigned flags: two major (arterial pH <7.30, SBP <90 mm Hg) and six minor (RR >30, altered mental status, BUN >30 mg/dL, hypoxemia as PaO2 <54 mm Hg or PaO2/FiO2 <250, age ≥80, multilobar or bilateral). Severe if 1 major or ≥2 minor. One point per true predictor (max 8). Not a diagnosis, not an ICU-admission order, not CURB-65, not PSI/PORT, not SMART-COP.","parameters":[{"in":"query","name":"ph_lt_7_30","type":"boolean","description":"Arterial pH <7.30 (España 2006 major). true or false as assigned by the caller. magent does not measure pH.","required":true,"example":"false"},{"in":"query","name":"sbp_lt_90","type":"boolean","description":"Systolic blood pressure <90 mm Hg (España 2006 major). true or false as assigned by the caller. magent does not measure blood pressure.","required":true,"example":"false"},{"in":"query","name":"respiratory_rate_gt_30","type":"boolean","description":"Respiratory rate >30 breaths/min (España 2006 minor; strict greater-than, not ≥30). true or false as assigned by the caller. magent does not measure respiratory rate.","required":true,"example":"false"},{"in":"query","name":"altered_mental_status","type":"boolean","description":"Altered mental status (España 2006 minor). true or false as assigned by the caller. magent does not assess mental status.","required":true,"example":"false"},{"in":"query","name":"bun_gt_30_mg_dl","type":"boolean","description":"Blood urea nitrogen >30 mg/dL (España 2006 minor). true or false as assigned by the caller. magent does not convert urea or measure BUN.","required":true,"example":"false"},{"in":"query","name":"hypoxemia","type":"boolean","description":"Hypoxemia as PaO2 <54 mm Hg or PaO2/FiO2 <250 (España 2006 minor), as assigned by the caller. true or false. magent does not measure PaO2 or FiO2.","required":true,"example":"false"},{"in":"query","name":"age_ge_80","type":"boolean","description":"Age ≥80 years (España 2006 minor). true or false as assigned by the caller. magent does not compute age.","required":true,"example":"false"},{"in":"query","name":"multilobar_or_bilateral","type":"boolean","description":"Multilobar or bilateral lung involvement (España 2006 minor). true or false as assigned by the caller. magent does not interpret radiographs.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/scap","citation":{"authors":"España PP, Capelastegui A, Gorordo I, Esteban C, Oribe M, Ortega M, Bilbao A, Quintana JM","doi":"10.1164/rccm.200602-177OC","id":"espana-2006","pmid":"16973986","source":"Am J Respir Crit Care Med. 2006;174(11):1249-1256","title":"Development and validation of a clinical prediction rule for severe community-acquired pneumonia","url":"https://doi.org/10.1164/rccm.200602-177OC"},"formula_expression":"SCAP severe iff 1 major (ph_lt_7_30 or sbp_lt_90) OR >=2 minor (respiratory_rate_gt_30, altered_mental_status, bun_gt_30_mg_dl, hypoxemia, age_ge_80, multilobar_or_bilateral); 1 point per true predictor (España 2006 major/minor rule; not beta-derived integer cards); max 8","purpose":"Apply the España 2006 SCAP major/minor rule from eight caller-assigned flags and return major_count, minor_count, score, and whether the published severe threshold is met.","markdown_url":"https://magentlab.com/docs/scap.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"scap"},{"name":"formula_expression","type":"string","description":"España 2006 1-major or ≥2-minor rule with 1 point per true predictor"},{"name":"score","type":"integer","description":"Count of true predictors (0-8). Not a 13/11/9/6/5 weighted card."},{"name":"max_score","type":"integer","description":"Always 8"},{"name":"major_count","type":"integer","description":"Count of true major flags: ph_lt_7_30 and sbp_lt_90 (0-2)"},{"name":"minor_count","type":"integer","description":"Count of true minor flags: respiratory_rate_gt_30, altered_mental_status, bun_gt_30_mg_dl, hypoxemia, age_ge_80, multilobar_or_bilateral (0-6)"},{"name":"scap_severe","type":"boolean","description":"true when major_count ≥1 or minor_count ≥2 (España 2006). Not a pneumonia diagnosis and not an ICU-admission order."},{"name":"components","type":"array","description":"Per-predictor points (1 if true, else 0)"},{"name":"citation","type":"object","description":"España 2006 AJRCCM citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age_ge_80":"false","altered_mental_status":"false","bun_gt_30_mg_dl":"false","hypoxemia":"false","multilobar_or_bilateral":"false","ph_lt_7_30":"false","respiratory_rate_gt_30":"false","sbp_lt_90":"false"},{"age_ge_80":"false","altered_mental_status":"false","bun_gt_30_mg_dl":"false","hypoxemia":"false","multilobar_or_bilateral":"false","ph_lt_7_30":"false","respiratory_rate_gt_30":"false","sbp_lt_90":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/scap","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/scap?ph_lt_7_30=false&sbp_lt_90=false&respiratory_rate_gt_30=false&altered_mental_status=false&bun_gt_30_mg_dl=false&hypoxemia=false&age_ge_80=false&multilobar_or_bilateral=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/scap","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/pen-fast","description":"Trubiano 2020 PEN-FAST for patients who already report a penicillin allergy. Three caller-assigned flags: allergy event 5 or fewer years ago (2), anaphylaxis/angioedema or potential SCAR as one criterion (2), treatment required (1). Max 5. Risk: 0 very_low, 1–2 low, 3 moderate, 4–5 high. low_risk_for_testing iff score < 3. Not an allergy diagnosis or delabeling order. magent does not take an allergy history.","parameters":[{"in":"query","name":"five_or_fewer_years_ago","type":"boolean","description":"Allergy event 5 or fewer years ago as assigned by the caller (Trubiano 2020). true scores 2. magent does not take an allergy history.","required":true,"example":"false"},{"in":"query","name":"anaphylaxis_angioedema_or_scar","type":"boolean","description":"Anaphylaxis/angioedema or potential SCAR as one 2-point criterion (Trubiano 2020). true scores 2; do not add both phenotypes separately. magent does not take an allergy history.","required":true,"example":"false"},{"in":"query","name":"treatment_required","type":"boolean","description":"Treatment required for the allergy episode as assigned by the caller (Trubiano 2020). true scores 1. magent does not take an allergy history.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/pen-fast","citation":{"authors":"Trubiano JA, Vogrin S, Chua KYL, et al.","doi":"10.1001/jamainternmed.2020.0403","id":"trubiano-2020","pmid":"32176248","source":"JAMA Intern Med. 2020;180(5):745-752","title":"Development and Validation of a Penicillin Allergy Clinical Decision Rule","url":"https://doi.org/10.1001/jamainternmed.2020.0403"},"formula_expression":"PEN-FAST = five_or_fewer_years_ago (true 2) + anaphylaxis_angioedema_or_scar (true 2) + treatment_required (true 1); Trubiano 2020; max 5; 0 very_low, 1-2 low, 3 moderate, 4-5 high; low_risk_for_testing iff score < 3","purpose":"Sum the three Trubiano 2020 PEN-FAST flags for a reported penicillin allergy and return the 0–5 score, published risk group, and low_risk_for_testing (score < 3).","markdown_url":"https://magentlab.com/docs/pen-fast.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"pen_fast"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"PEN-FAST points 0-5"},{"name":"max_score","type":"integer","description":"Always 5"},{"name":"risk","type":"string","description":"Trubiano 2020 risk group: very_low (0), low (1–2), moderate (3), or high (4–5). Not an allergy diagnosis."},{"name":"low_risk_for_testing","type":"boolean","description":"true iff score < 3 (Trubiano 2020 low-risk cutoff). Not a delabeling order and not a substitute for specialist testing when indicated."},{"name":"components","type":"array","description":"Per-flag points"},{"name":"citation","type":"object","description":"Trubiano 2020 JAMA Intern Med citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"anaphylaxis_angioedema_or_scar":"false","five_or_fewer_years_ago":"false","treatment_required":"false"},{"anaphylaxis_angioedema_or_scar":"false","five_or_fewer_years_ago":"false","treatment_required":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/pen-fast","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/pen-fast?five_or_fewer_years_ago=false&anaphylaxis_angioedema_or_scar=false&treatment_required=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/pen-fast","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/sulf-fast","description":"Waldron 2023 SULF-FAST for patients who already report a TMP-SMX (sulfa antibiotic) allergy. Adapted PEN-FAST flags, not PEN-FAST itself. Three caller-assigned flags: allergy event 5 or fewer years ago (2), anaphylaxis/angioedema or potential SCAR as one criterion (2), treatment required (1). Max 5. Risk: low if score < 3, elevated if ≥ 3. low_risk_for_testing iff score < 3. Not an allergy diagnosis or delabeling order. magent does not take an allergy history.","parameters":[{"in":"query","name":"five_or_fewer_years_ago","type":"boolean","description":"Allergy event 5 or fewer years ago as assigned by the caller (Waldron 2023). true scores 2. magent does not take an allergy history.","required":true,"example":"false"},{"in":"query","name":"anaphylaxis_angioedema_or_scar","type":"boolean","description":"Anaphylaxis/angioedema or potential SCAR as one 2-point criterion (Waldron 2023). true scores 2; do not add both phenotypes separately. magent does not take an allergy history.","required":true,"example":"false"},{"in":"query","name":"treatment_required","type":"boolean","description":"Treatment required for the allergy episode as assigned by the caller (Waldron 2023). true scores 1. magent does not take an allergy history.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/sulf-fast","citation":{"authors":"Waldron JL, Rose M, Vogrin S, Krantz MS, Bolotte R, Phillips EJ, Trubiano JA","doi":"10.1001/jamanetworkopen.2023.16776","id":"waldron-2023","pmid":"37273210","source":"JAMA Netw Open. 2023;6(6):e2316776","title":"Development and Validation of a Sulfa Antibiotic Allergy Clinical Decision Rule","url":"https://doi.org/10.1001/jamanetworkopen.2023.16776"},"formula_expression":"SULF-FAST = five_or_fewer_years_ago (true 2) + anaphylaxis_angioedema_or_scar (true 2) + treatment_required (true 1); Waldron 2023; max 5; score < 3 low, score ≥ 3 elevated; low_risk_for_testing iff score < 3","purpose":"Sum the three Waldron 2023 SULF-FAST flags for a reported trimethoprim-sulfamethoxazole allergy and return the 0–5 score, published risk group (low if score < 3, elevated if ≥ 3), and low_risk_for_testing (score < 3).","markdown_url":"https://magentlab.com/docs/sulf-fast.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"sulf_fast"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"SULF-FAST points 0-5"},{"name":"max_score","type":"integer","description":"Always 5"},{"name":"risk","type":"string","description":"Waldron 2023 risk group: low (score < 3) or elevated (score ≥ 3). Not an allergy diagnosis. Not the Trubiano 2020 four-tier PEN-FAST groups."},{"name":"low_risk_for_testing","type":"boolean","description":"true iff score < 3 (Waldron 2023 low-risk cutoff). Not a delabeling order and not a substitute for specialist testing when indicated."},{"name":"components","type":"array","description":"Per-flag points"},{"name":"citation","type":"object","description":"Waldron 2023 JAMA Network Open citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"anaphylaxis_angioedema_or_scar":"false","five_or_fewer_years_ago":"false","treatment_required":"false"},{"anaphylaxis_angioedema_or_scar":"false","five_or_fewer_years_ago":"false","treatment_required":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/sulf-fast","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/sulf-fast?five_or_fewer_years_ago=false&anaphylaxis_angioedema_or_scar=false&treatment_required=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/sulf-fast","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/atlas","description":"Miller 2013 ATLAS for Clostridioides difficile: age (<60 0, 60–79 1, ≥80 2), systemic antibiotics during CDI therapy (0 or 2), WBC (<16 0, 16–25 1, >25 ×10^9/L 2), albumin (>35 0, 26–35 1, ≤25 g/L 2), creatinine (≤120 0, 121–179 1, ≥180 µmol/L 2); max 10. Predicted cure percent = 100 − 5.08 × score (1 decimal). Not a CDI diagnosis, stool culture, or metronidazole/vancomycin/fidaxomicin order.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Miller 2013 Table 1: <60 scores 0; 60–79 inclusive scores 1; ≥80 scores 2.","required":true,"example":"40"},{"in":"query","name":"systemic_antibiotics","type":"boolean","description":"Systemic antibiotics on one or more days of CDI therapy (Miller 2013). true scores 2; false scores 0. There is no 1-point cell. magent does not review the medication list.","required":true,"example":"false"},{"in":"query","name":"wbc_k_ul","type":"number","description":"Total leukocyte count in 10^3/µL (same as ×10^9/L). Provide wbc_k_ul or wbc_ul, not both. Range 0.01-500. Miller 2013: <16 scores 0; 16–25 inclusive scores 1; >25 scores 2.","required":false,"example":"8"},{"in":"query","name":"wbc_ul","type":"number","description":"Total leukocyte count in cells/µL. Provide wbc_k_ul or wbc_ul, not both. Range 10-500000. Miller 2013: <16000 scores 0; 16000–25000 inclusive scores 1; >25000 scores 2.","required":false,"example":"8000"},{"in":"query","name":"albumin_g_l","type":"number","description":"Serum albumin in g/L (10-60). Provide this or albumin_g_dl, not both. Miller 2013: >35 scores 0; 26–35 inclusive scores 1; ≤25 scores 2. magent does not assay albumin.","required":false,"example":"40"},{"in":"query","name":"albumin_g_dl","type":"number","description":"Serum albumin in g/dL (1-6). Converted as g/L = g/dL × 10. Provide this or albumin_g_l, not both.","required":false,"example":"4.0"},{"in":"query","name":"creatinine_umol_l","type":"number","description":"Serum creatinine in µmol/L (9-1768). Provide this or creatinine_mg_dl, not both. Miller 2013: ≤120 scores 0; 121–179 inclusive scores 1; ≥180 scores 2. magent does not assay creatinine.","required":false,"example":"80"},{"in":"query","name":"creatinine_mg_dl","type":"number","description":"Serum creatinine in mg/dL (0.1-20). Converted as µmol/L = mg/dL × 88.42. Provide this or creatinine_umol_l, not both.","required":false,"example":"0.9"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_wbc","message":"wbc_k_ul (0.01-500) or wbc_ul (10-500000) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_albumin","message":"albumin_g_dl (1-6) or albumin_g_l (10-60) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_creatinine","message":"creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/atlas","citation":{"authors":"Miller MA, Louie T, Mullane K, Weiss K, Lentnek A, Golan Y, Kean Y, Sears P","doi":"10.1186/1471-2334-13-148","id":"miller-2013","pmid":"23530807","source":"BMC Infect Dis. 2013;13:148","title":"Derivation and validation of a simple clinical bedside score (ATLAS) for Clostridium difficile infection which predicts response to therapy","url":"https://doi.org/10.1186/1471-2334-13-148"},"formula_expression":"ATLAS = age (<60 0, 60–79 1, ≥80 2) + systemic_antibiotics (false 0, true 2) + leukocyte (<16 ×10^9/L 0, 16–25 1, >25 2) + albumin (>35 g/L 0, 26–35 1, ≤25 2) + creatinine (≤120 µmol/L 0, 121–179 1, ≥180 2); Miller 2013 Table 1 five-component ATLAS; max 10; predicted_cure_percent = 100 − 5.08 × score (1 decimal)","purpose":"Sum the Miller 2013 five-component ATLAS bedside score (age, systemic antibiotics during CDI therapy, leukocyte count, albumin, serum creatinine) and return the published predicted-cure percent.","markdown_url":"https://magentlab.com/docs/atlas.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"atlas"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"ATLAS points 0-10"},{"name":"atlas_score","type":"integer","description":"Same integer as score"},{"name":"max_score","type":"integer","description":"10"},{"name":"predicted_cure_percent","type":"number","description":"Miller 2013 regression 100 − 5.08 × score, rounded to 1 decimal. Score 0 is 100.0. Not a named severity band."},{"name":"age_years","type":"integer","description":"Age in years used"},{"name":"systemic_antibiotics","type":"boolean","description":"Systemic-antibiotics-during-CDI-therapy flag used"},{"name":"wbc_per_ul","type":"number","description":"Leukocyte count in cells/µL used"},{"name":"albumin_g_l","type":"number","description":"Serum albumin used in g/L (after g/dL conversion when supplied)"},{"name":"creatinine_umol_l","type":"number","description":"Serum creatinine used in µmol/L (after mg/dL conversion when supplied)"},{"name":"components","type":"array","description":"Per-factor Miller 2013 points"},{"name":"citation","type":"object","description":"Miller et al. BMC Infect Dis 2013 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"40","albumin_g_l":"40","creatinine_umol_l":"80","systemic_antibiotics":"false","wbc_k_ul":"8"},{"age":"40","albumin_g_l":"40","creatinine_umol_l":"80","systemic_antibiotics":"false","wbc_k_ul":"8"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/atlas","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/atlas?age=40&systemic_antibiotics=false&wbc_k_ul=8&albumin_g_l=40&creatinine_umol_l=80","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/atlas","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/improve-vte","description":"Spyropoulos 2011 7-factor associative IMPROVE VTE score during hospitalization: previous VTE 3, known thrombophilia 2, lower-limb paralysis 2, current cancer 2, immobilized >=7 days 1, ICU/CCU stay 1, age >60 1. Max 12. Bands: 0-1; 2-3 (observed VTE 1.5%); >=4 (observed VTE 5.7%). Not a VTE diagnosis or prophylaxis order. Not the 4-factor admission predictive model. Not IMPROVEDD. magent does not examine the patient.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Scores 1 when age >60 (Spyropoulos 2011). Age 60 scores 0; age 61 scores 1.","required":true,"example":"50"},{"in":"query","name":"previous_vte","type":"boolean","description":"Previous VTE as assigned by the caller (Spyropoulos 2011 7-factor associative model). true or false. 3 points if true. magent does not diagnose VTE.","required":true,"example":"false"},{"in":"query","name":"known_thrombophilia","type":"boolean","description":"Known thrombophilia as assigned by the caller (Spyropoulos 2011). true or false. 2 points if true. magent does not interpret a thrombophilia panel.","required":true,"example":"false"},{"in":"query","name":"lower_limb_paralysis","type":"boolean","description":"Lower-limb paralysis as assigned by the caller (Spyropoulos 2011). true or false. 2 points if true. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"current_cancer","type":"boolean","description":"Current cancer as assigned by the caller (Spyropoulos 2011). true or false. 2 points if true. magent does not diagnose cancer.","required":true,"example":"false"},{"in":"query","name":"immobilized_ge_7_days","type":"boolean","description":"Immobilized ≥7 days as assigned by the caller (Spyropoulos 2011, during hospitalization). true or false. 1 point if true. magent does not observe mobility.","required":true,"example":"false"},{"in":"query","name":"icu_ccu_stay","type":"boolean","description":"ICU or CCU stay as assigned by the caller (Spyropoulos 2011, during hospitalization). true or false. 1 point if true. magent does not assign level of care.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/improve-vte","citation":{"authors":"Spyropoulos AC, Anderson FA Jr, FitzGerald G, Decousus H, Pini M, Chong BH, Zotz RB, Bergmann JF, Tapson VF, Froehlich JB, Monreal M, Merli GJ, Pavanello R, Turpie AGG, Nakamura M, Piovella F, Kakkar AK, Spencer FA, IMPROVE Investigators","doi":"10.1378/chest.10-1944","id":"spyropoulos-2011","pmid":"21436241","source":"Chest. 2011;140(3):706-714","title":"Predictive and associative models to identify hospitalized medical patients at risk for VTE","url":"https://doi.org/10.1378/chest.10-1944"},"formula_expression":"IMPROVE VTE (Spyropoulos 2011 7-factor associative during hospitalization) = previous_vte (3) + known_thrombophilia (2) + lower_limb_paralysis (2) + current_cancer (2) + immobilized_ge_7_days (1) + icu_ccu_stay (1) + age>60 (1); max 12; 0-1, 2-3 (observed VTE 1.5%), >=4 (observed VTE 5.7%); not the 4-factor admission predictive model; not IMPROVEDD","purpose":"Compute the Spyropoulos 2011 7-factor associative IMPROVE VTE score during hospitalization from age and six caller-assigned flags.","markdown_url":"https://magentlab.com/docs/improve-vte.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"improve_vte"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Total points 0-12"},{"name":"max_score","type":"integer","description":"Always 12"},{"name":"vte_band","type":"string","description":"Spyropoulos 2011 observed-VTE band during hospitalization: 0-1, 2-3, or >=4. Not a diagnosis and not a prophylaxis order."},{"name":"age_years","type":"integer","description":"Age used for the >60 criterion"},{"name":"components","type":"array","description":"Per-item points"},{"name":"citation","type":"object","description":"Spyropoulos 2011 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"50","current_cancer":"false","icu_ccu_stay":"false","immobilized_ge_7_days":"false","known_thrombophilia":"false","lower_limb_paralysis":"false","previous_vte":"false"},{"age":"50","current_cancer":"false","icu_ccu_stay":"false","immobilized_ge_7_days":"false","known_thrombophilia":"false","lower_limb_paralysis":"false","previous_vte":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/improve-vte","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/improve-vte?age=50&previous_vte=false&known_thrombophilia=false&lower_limb_paralysis=false&current_cancer=false&immobilized_ge_7_days=false&icu_ccu_stay=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/improve-vte","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/improve-bleed","description":"Decousus 2011 IMPROVE admission bleeding-risk score: ulcer 4.5, prior bleeding 4, platelets <50 4, age >=85 3.5, hepatic failure 2.5, severe renal failure 2.5, ICU/CCU 2.5, CVC 2, rheumatic disease 2, current cancer 2, age 40-84 1.5, male 1, moderate renal failure 1. Max 30.5. Increased risk at >=7. Not a VTE-prophylaxis order. magent does not examine the patient.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Decousus 2011 bands: <40 scores 0, 40-84 scores 1.5, >=85 scores 3.5. Age 39 scores 0; age 40 scores 1.5; age 84 scores 1.5; age 85 scores 3.5. Bands are mutually exclusive.","required":true,"example":"35"},{"in":"query","name":"sex","type":"string","description":"male or female (Decousus 2011). Male scores 1; female scores 0. magent does not examine the patient.","required":true,"example":"female"},{"in":"query","name":"renal_failure","type":"string","description":"none, moderate, or severe as assigned by the caller (Decousus 2011). none is GFR >=60 mL/min/m2 (0 points); moderate is GFR 30-59 (1 point); severe is GFR <30 (2.5 points). Bands are mutually exclusive. magent does not compute GFR.","required":true,"example":"none"},{"in":"query","name":"active_gastroduodenal_ulcer","type":"boolean","description":"Active gastroduodenal ulcer as assigned by the caller (Decousus 2011). true or false. 4.5 points if true. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"prior_bleeding","type":"boolean","description":"Bleeding during the 3 months before admission as assigned by the caller (Decousus 2011). true or false. 4 points if true. magent does not take a bleeding history.","required":true,"example":"false"},{"in":"query","name":"platelet_count_lt_50","type":"boolean","description":"Platelet count <50 x 10^9/L at admission as assigned by the caller (Decousus 2011). true or false. 4 points if true. magent does not assay platelets.","required":true,"example":"false"},{"in":"query","name":"hepatic_failure","type":"boolean","description":"Hepatic failure (INR >1.5) as assigned by the caller (Decousus 2011). true or false. 2.5 points if true. magent does not assay INR.","required":true,"example":"false"},{"in":"query","name":"icu_ccu","type":"boolean","description":"ICU or CCU stay as assigned by the caller (Decousus 2011). true or false. 2.5 points if true. magent does not assign level of care.","required":true,"example":"false"},{"in":"query","name":"central_venous_catheter","type":"boolean","description":"Central venous catheter as assigned by the caller (Decousus 2011). true or false. 2 points if true. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"rheumatic_disease","type":"boolean","description":"Rheumatic disease as assigned by the caller (Decousus 2011). true or false. 2 points if true. magent does not diagnose rheumatic disease.","required":true,"example":"false"},{"in":"query","name":"current_cancer","type":"boolean","description":"Current cancer as assigned by the caller (Decousus 2011). true or false. 2 points if true. magent does not diagnose cancer.","required":true,"example":"false"}],"errors":[{"code":"invalid_improve_bleed","message":"IMPROVE bleeding inputs must match Decousus 2011 admission bleeding-risk factors and point weights from that paper. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/improve-bleed","citation":{"authors":"Decousus H, Tapson VF, Bergmann JF, Chong BH, Froehlich JB, Kakkar AK, et al.","doi":"10.1378/chest.09-3081","id":"decousus-2011","pmid":"20453069","source":"Chest. 2011;139(1):69-79","title":"Factors at admission associated with bleeding risk in medical patients: findings from the IMPROVE investigators","url":"https://doi.org/10.1378/chest.09-3081"},"formula_expression":"IMPROVE bleed (Decousus 2011 admission) = active_gastroduodenal_ulcer (4.5) + prior_bleeding (4) + platelet_count_lt_50 (4) + age>=85 (3.5) + hepatic_failure INR>1.5 (2.5) + severe_renal_failure GFR<30 (2.5) + icu_ccu (2.5) + central_venous_catheter (2) + rheumatic_disease (2) + current_cancer (2) + age 40-84 (1.5) + male (1) + moderate_renal_failure GFR 30-59 (1); max 30.5; <7 not_increased, >=7 increased; half-points not integer-rounded; not Hostler 2016; not IMPROVE VTE","purpose":"Sum the Decousus 2011 IMPROVE admission bleeding-risk points from age, sex, renal-failure band, and eight caller-assigned flags, and return whether the published >=7 high-risk cutoff is met.","markdown_url":"https://magentlab.com/docs/improve-bleed.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"improve_bleed"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"number","description":"Decousus 2011 IMPROVE bleed points 0-30.5 (half-points allowed; not integer-rounded)"},{"name":"max_score","type":"number","description":"Always 30.5"},{"name":"bleed_band","type":"string","description":"not_increased when score is <7, increased when score is >=7 (Decousus 2011 derivation). Not a VTE-prophylaxis order."},{"name":"age_years","type":"integer","description":"Age used for the <40 / 40-84 / >=85 bands"},{"name":"sex","type":"string","description":"female or male"},{"name":"renal_failure","type":"string","description":"none, moderate, or severe as supplied"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Decousus 2011 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"active_gastroduodenal_ulcer":"false","age":"35","central_venous_catheter":"false","current_cancer":"false","hepatic_failure":"false","icu_ccu":"false","platelet_count_lt_50":"false","prior_bleeding":"false","renal_failure":"none","rheumatic_disease":"false","sex":"female"},{"active_gastroduodenal_ulcer":"false","age":"35","central_venous_catheter":"false","current_cancer":"false","hepatic_failure":"false","icu_ccu":"false","platelet_count_lt_50":"false","prior_bleeding":"false","renal_failure":"none","rheumatic_disease":"false","sex":"female"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/improve-bleed","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/improve-bleed?age=35&sex=female&renal_failure=none&active_gastroduodenal_ulcer=false&prior_bleeding=false&platelet_count_lt_50=false&hepatic_failure=false&icu_ccu=false&central_venous_catheter=false&rheumatic_disease=false&current_cancer=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/improve-bleed","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/pe-sard","description":"Chopard 2021 PE-SARD score for early major bleeding in acute pulmonary embolism. Three caller-assigned flags: syncope (1.5), anemia (hemoglobin <12 g/dL, 2.5), renal dysfunction (GFR <60 mL/min, 1). Max 5. Half-points as published. Risk: low (0), intermediate (1–2.5), high (>2.5). magent does not assay hemoglobin or compute GFR. Not a PE diagnosis and not an anticoagulation order. Not a medical device.","parameters":[{"in":"query","name":"syncope","type":"boolean","description":"Syncope as assigned by the caller (Chopard 2021). true scores 1.5. magent does not take a syncope history.","required":true,"example":"false"},{"in":"query","name":"anemia","type":"boolean","description":"Anemia as assigned by the caller (Chopard 2021: hemoglobin <12 g/dL). true scores 2.5. magent does not assay hemoglobin.","required":true,"example":"false"},{"in":"query","name":"renal_dysfunction","type":"boolean","description":"Renal dysfunction as assigned by the caller (Chopard 2021: GFR <60 mL/min). true scores 1. magent does not compute GFR.","required":true,"example":"false"}],"errors":[{"code":"invalid_pe_sard","message":"PE-SARD inputs must match Chopard 2021 syncope, anemia, and renal-dysfunction factors from that paper. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/pe-sard","citation":{"authors":"Chopard R, Piazza G, Falvo N, Ecarnot F, Besutti M, Capellier G, Schiele F, Badoz M, Meneveau N","doi":"10.1016/j.chest.2021.06.048","id":"chopard-2021","pmid":"34217683","source":"Chest. 2021;160(5):1832-1843","title":"An Original Risk Score to Predict Early Major Bleeding in Acute Pulmonary Embolism: The Syncope, Anemia, Renal Dysfunction (PE-SARD) Bleeding Score","url":"https://doi.org/10.1016/j.chest.2021.06.048"},"formula_expression":"PE-SARD (Chopard 2021) = syncope (1.5) + anemia Hb<12 g/dL (2.5) + renal_dysfunction GFR<60 (1); max 5; 0 low, 1-2.5 intermediate, >2.5 high; half-points not integer-rounded","purpose":"Sum the Chopard 2021 PE-SARD factors (syncope, anemia, renal dysfunction) and return the published early major-bleed risk band.","markdown_url":"https://magentlab.com/docs/pe-sard.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"pe_sard"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"number","description":"PE-SARD points 0-5 (half-points allowed; not integer-rounded)"},{"name":"max_score","type":"integer","description":"Always 5"},{"name":"risk","type":"string","description":"Chopard 2021 band: low (score 0), intermediate (1–2.5 inclusive), high (>2.5). Not a PE diagnosis and not an anticoagulation order."},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Chopard et al. Chest 2021 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"anemia":"false","renal_dysfunction":"false","syncope":"false"},{"anemia":"false","renal_dysfunction":"false","syncope":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/pe-sard","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/pe-sard?syncope=false&anemia=false&renal_dysfunction=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/pe-sard","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/improvedd","description":"Gibson 2017 IMPROVEDD VTE score: Spyropoulos 2011 7-factor IMPROVE items (previous VTE 3, known thrombophilia 2, lower-limb paralysis 2, current cancer 2, immobilized >=7 days 1, ICU/CCU 1, age >60 1) plus 2 if caller-assigned D-dimer >=2x ULN. Max 14. low 0-1 vs high >=2 (heightened VTE through 77 days when >=2). Not a VTE diagnosis or prophylaxis order. Not the 4-factor admission model. Not Padua or Caprini. magent does not assay D-dimer.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Scores 1 when age >60 (Spyropoulos 2011 / Gibson 2017). Age 60 scores 0; age 61 scores 1.","required":true,"example":"50"},{"in":"query","name":"previous_vte","type":"boolean","description":"Previous VTE as assigned by the caller (Spyropoulos 2011 7-factor associative items in Gibson 2017 IMPROVEDD). true or false. 3 points if true. magent does not diagnose VTE.","required":true,"example":"false"},{"in":"query","name":"known_thrombophilia","type":"boolean","description":"Known thrombophilia as assigned by the caller (Spyropoulos 2011 / Gibson 2017). true or false. 2 points if true. magent does not interpret a thrombophilia panel.","required":true,"example":"false"},{"in":"query","name":"lower_limb_paralysis","type":"boolean","description":"Lower-limb paralysis as assigned by the caller (Spyropoulos 2011 / Gibson 2017). true or false. 2 points if true. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"current_cancer","type":"boolean","description":"Current cancer as assigned by the caller (Spyropoulos 2011 / Gibson 2017). true or false. 2 points if true. magent does not diagnose cancer.","required":true,"example":"false"},{"in":"query","name":"immobilized_ge_7_days","type":"boolean","description":"Immobilized >=7 days as assigned by the caller (Spyropoulos 2011 / Gibson 2017, during hospitalization). true or false. 1 point if true. magent does not observe mobility.","required":true,"example":"false"},{"in":"query","name":"icu_ccu_stay","type":"boolean","description":"ICU or CCU stay as assigned by the caller (Spyropoulos 2011 / Gibson 2017, during hospitalization). true or false. 1 point if true. magent does not assign level of care.","required":true,"example":"false"},{"in":"query","name":"d_dimer_ge_2x_uln","type":"boolean","description":"D-dimer >=2x the local upper limit of normal as assigned by the caller (Gibson 2017). true or false. 2 points if true. magent does not assay D-dimer.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/improvedd","citation":{"authors":"Gibson CM, Spyropoulos AC, Cohen AT, Hull RD, Goldhaber SZ, Yusen RD, Hernandez AF, Korjian S, Daaboul Y, Gold A, Harrington RA, Chi G","doi":"10.1055/s-0037-1603929","id":"gibson-2017","pmid":"31249911","source":"TH Open. 2017;1(1):e56-e65","title":"The IMPROVEDD VTE Risk Score: Incorporation of D-Dimer into the IMPROVE Score to Improve Venous Thromboembolism Risk Stratification","url":"https://doi.org/10.1055/s-0037-1603929"},"formula_expression":"IMPROVEDD VTE (Gibson 2017; Spyropoulos 2011 7-factor associative items plus D-dimer >=2x ULN) = previous_vte (3) + known_thrombophilia (2) + lower_limb_paralysis (2) + current_cancer (2) + immobilized_ge_7_days (1) + icu_ccu_stay (1) + age>60 (1) + d_dimer_ge_2x_uln (2); max 14; 0-1 low vs >=2 high (heightened VTE risk through 77 days when >=2); not the 4-factor admission predictive model; not Padua; not Caprini","purpose":"Compute the Gibson 2017 IMPROVEDD VTE score from age, six caller-assigned IMPROVE flags, and caller-assigned D-dimer >=2x ULN.","markdown_url":"https://magentlab.com/docs/improvedd.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"improvedd"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Total points 0-14"},{"name":"max_score","type":"integer","description":"Always 14"},{"name":"vte_band","type":"string","description":"Gibson 2017 cutoff: low (score 0-1) vs high (score >=2, heightened VTE risk through 77 days). Not a diagnosis and not a prophylaxis order."},{"name":"age_years","type":"integer","description":"Age used for the >60 criterion"},{"name":"components","type":"array","description":"Per-item points"},{"name":"citation","type":"object","description":"Gibson 2017 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"50","current_cancer":"false","d_dimer_ge_2x_uln":"false","icu_ccu_stay":"false","immobilized_ge_7_days":"false","known_thrombophilia":"false","lower_limb_paralysis":"false","previous_vte":"false"},{"age":"50","current_cancer":"false","d_dimer_ge_2x_uln":"false","icu_ccu_stay":"false","immobilized_ge_7_days":"false","known_thrombophilia":"false","lower_limb_paralysis":"false","previous_vte":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/improvedd","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/improvedd?age=50&previous_vte=false&known_thrombophilia=false&lower_limb_paralysis=false&current_cancer=false&immobilized_ge_7_days=false&icu_ccu_stay=false&d_dimer_ge_2x_uln=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/improvedd","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/villalta","description":"Kahn 2009 Villalta scale (ISTH SSC): five caller-assigned symptoms and six signs, each 0-3 (none/mild/moderate/severe), summed 0-33. Venous ulcer is a separate boolean and is not added as 15 points. PTS if score ≥5 or ulcer; bands none 0-4 (no ulcer), mild 5-9, moderate 10-14, severe if ≥15 or ulcer. magent does not examine the limb. Not CEAP, not VCSS, not Ginsberg PTS.","parameters":[{"in":"query","name":"pain","type":"integer","description":"Caller-assigned Kahn 2009 Villalta symptom pain (integer 0-3: 0 none, 1 mild, 2 moderate, 3 severe). magent does not examine the limb.","required":true,"example":"0"},{"in":"query","name":"cramps","type":"integer","description":"Caller-assigned Kahn 2009 Villalta symptom cramps (integer 0-3: 0 none, 1 mild, 2 moderate, 3 severe). magent does not examine the limb.","required":true,"example":"0"},{"in":"query","name":"heaviness","type":"integer","description":"Caller-assigned Kahn 2009 Villalta symptom heaviness (integer 0-3: 0 none, 1 mild, 2 moderate, 3 severe). magent does not examine the limb.","required":true,"example":"0"},{"in":"query","name":"pruritus","type":"integer","description":"Caller-assigned Kahn 2009 Villalta symptom pruritus (integer 0-3: 0 none, 1 mild, 2 moderate, 3 severe). magent does not examine the limb.","required":true,"example":"0"},{"in":"query","name":"paresthesia","type":"integer","description":"Caller-assigned Kahn 2009 Villalta symptom paresthesia (integer 0-3: 0 none, 1 mild, 2 moderate, 3 severe). magent does not examine the limb.","required":true,"example":"0"},{"in":"query","name":"pretibial_edema","type":"integer","description":"Caller-assigned Kahn 2009 Villalta sign pretibial edema (integer 0-3: 0 none, 1 mild, 2 moderate, 3 severe). magent does not examine the limb.","required":true,"example":"0"},{"in":"query","name":"skin_induration","type":"integer","description":"Caller-assigned Kahn 2009 Villalta sign skin induration (integer 0-3: 0 none, 1 mild, 2 moderate, 3 severe). magent does not examine the limb.","required":true,"example":"0"},{"in":"query","name":"hyperpigmentation","type":"integer","description":"Caller-assigned Kahn 2009 Villalta sign hyperpigmentation (integer 0-3: 0 none, 1 mild, 2 moderate, 3 severe). magent does not examine the limb.","required":true,"example":"0"},{"in":"query","name":"venous_ectasia","type":"integer","description":"Caller-assigned Kahn 2009 Villalta sign venous ectasia (integer 0-3: 0 none, 1 mild, 2 moderate, 3 severe). magent does not examine the limb.","required":true,"example":"0"},{"in":"query","name":"redness","type":"integer","description":"Caller-assigned Kahn 2009 Villalta sign redness (integer 0-3: 0 none, 1 mild, 2 moderate, 3 severe). magent does not examine the limb.","required":true,"example":"0"},{"in":"query","name":"pain_on_calf_compression","type":"integer","description":"Caller-assigned Kahn 2009 Villalta sign pain on calf compression (integer 0-3: 0 none, 1 mild, 2 moderate, 3 severe). magent does not examine the limb.","required":true,"example":"0"},{"in":"query","name":"ulcer","type":"boolean","description":"Caller-assigned venous ulcer (true or false). Presence classifies PTS as severe (Kahn 2009) and does not add 15 to the numeric score. magent does not examine the limb.","required":true,"example":"false"}],"errors":[{"code":"invalid_villalta","message":"each Villalta symptom and sign must be an integer 0-3 (Kahn 2009 ISTH; 0 none, 1 mild, 2 moderate, 3 severe). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/villalta","citation":{"authors":"Kahn SR","doi":"10.1111/j.1538-7836.2009.03339.x","id":"kahn-2009","pmid":"19320818","source":"J Thromb Haemost. 2009;7(5):884-888","title":"Measurement properties of the Villalta scale to define and classify the severity of the post-thrombotic syndrome","url":"https://doi.org/10.1111/j.1538-7836.2009.03339.x"},"formula_expression":"Villalta = pain + cramps + heaviness + pruritus + paresthesia + pretibial_edema + skin_induration + hyperpigmentation + venous_ectasia + redness + pain_on_calf_compression; each caller-assigned 0-3; max 33; ulcer is a separate boolean and is not added to the score; PTS if score ≥5 or ulcer; none 0-4 (no ulcer); mild 5-9; moderate 10-14; severe if score ≥15 or ulcer","purpose":"Sum five caller-assigned Villalta symptoms and six signs (each integer 0-3) and return the Kahn 2009 PTS band. Venous ulcer is a separate boolean and is not added as 15 points.","markdown_url":"https://magentlab.com/docs/villalta.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"villalta"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Sum of the eleven Kahn 2009 items (0-33). Venous ulcer is not added as 15 points."},{"name":"max_score","type":"integer","description":"Always 33"},{"name":"pts","type":"boolean","description":"true when score ≥5 or ulcer is true (Kahn 2009 PTS definition)"},{"name":"pts_band","type":"string","description":"Kahn 2009 band: none (0-4 and no ulcer), mild (5-9), moderate (10-14), or severe (score ≥15 or ulcer). Not a treatment order."},{"name":"ulcer","type":"boolean","description":"Caller-assigned venous ulcer used. Presence classifies severe PTS and does not change score."},{"name":"components","type":"array","description":"Per-item caller-assigned points"},{"name":"citation","type":"object","description":"Kahn 2009 J Thromb Haemost citation (ISTH SSC supporting review)"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"cramps":"0","heaviness":"0","hyperpigmentation":"0","pain":"0","pain_on_calf_compression":"0","paresthesia":"0","pretibial_edema":"0","pruritus":"0","redness":"0","skin_induration":"0","ulcer":"false","venous_ectasia":"0"},{"cramps":"0","heaviness":"0","hyperpigmentation":"0","pain":"0","pain_on_calf_compression":"0","paresthesia":"0","pretibial_edema":"0","pruritus":"0","redness":"0","skin_induration":"0","ulcer":"false","venous_ectasia":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/villalta","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/villalta?pain=0&cramps=0&heaviness=0&pruritus=0&paresthesia=0&pretibial_edema=0&skin_induration=0&hyperpigmentation=0&venous_ectasia=0&redness=0&pain_on_calf_compression=0&ulcer=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/villalta","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/trip-cast","description":"Nemeth 2020 TRiP(cast) VTE risk after lower-limb trauma immobilization. Caller-assigned Table 1 trauma (high 3, intermediate 2, low 1) and immobilization (upper_leg 3, lower_leg 2, foot_cast 1, other_plantar 0) plus age, sex, BMI, and nine flags. Max 34. High-risk at score >=7. Not a diagnosis or thromboprophylaxis order. magent does not classify the radiograph.","parameters":[{"in":"query","name":"trauma","type":"string","enum":["high","intermediate","low"],"description":"Mutually exclusive Nemeth 2020 Table 1 trauma category as assigned by the caller (choose the most severe). high scores 3 (paper examples: fibula/tibia shaft, tibial plateau, Achilles rupture). intermediate scores 2 (bi/tri-malleolar ankle, patellar fracture, ankle dislocation/Lisfranc, severe knee sprain with edema/haemarthrosis, grade 3 ankle sprain). low scores 1 (single malleolar, patellar dislocation, (meta)tarsal/forefoot fracture, grade 1-2 sprain, significant muscle injury). magent does not classify the trauma radiograph.","required":true,"example":"intermediate"},{"in":"query","name":"immobilization","type":"string","enum":["upper_leg","lower_leg","foot_cast","other_plantar"],"description":"Mutually exclusive Nemeth 2020 Table 1 immobilization category as assigned by the caller. upper_leg scores 3. lower_leg scores 2. foot_cast scores 1 (foot cast ankle-free or any semi-rigid without plantar support). other_plantar scores 0 (other cast or bracing with plantar support).","required":true,"example":"lower_leg"},{"in":"query","name":"age","type":"integer","description":"Age in years (integer 1-120). Nemeth 2020: <35 scores 0; ≥35 and <55 scores 1; ≥55 and <75 scores 2; ≥75 scores 3. Age 35 scores 1; 55 scores 2; 75 scores 3.","required":true,"example":"50"},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"female or male. Male scores 1; female scores 0 (Nemeth 2020 Table 1).","required":true,"example":"male"},{"in":"query","name":"bmi_kg_m2","type":"number","description":"Body-mass index in kg/m^2 (10-80). Caller-supplied; magent does not compute BMI from height and weight. Nemeth 2020: <25 scores 0; ≥25 and <35 scores 1; ≥35 scores 2. 25.0 scores 1; 35.0 scores 2.","required":true,"example":"30"},{"in":"query","name":"family_history_vte","type":"boolean","description":"First-degree family history of VTE as assigned by the caller (Nemeth 2020 Table 1). true scores 2. magent does not take a family history.","required":true,"example":"false"},{"in":"query","name":"personal_history_vte_or_major_thrombophilia","type":"boolean","description":"Personal history of VTE or major thrombophilia as assigned by the caller (Nemeth 2020 Table 1). true scores 4. magent does not diagnose VTE or interpret a thrombophilia panel.","required":true,"example":"false"},{"in":"query","name":"hormonal_estrogenic_treatment","type":"boolean","description":"Current oral contraceptives or estrogenic hormone therapy as assigned by the caller (Nemeth 2020 Table 1). true scores 4.","required":true,"example":"false"},{"in":"query","name":"cancer_within_5y","type":"boolean","description":"Cancer within 5 years as assigned by the caller (Nemeth 2020 Table 1). true scores 3. magent does not diagnose cancer.","required":true,"example":"false"},{"in":"query","name":"pregnancy_or_puerperium","type":"boolean","description":"Pregnancy or puerperium as assigned by the caller (Nemeth 2020 Table 1). true scores 3. magent does not confirm pregnancy.","required":true,"example":"false"},{"in":"query","name":"other_immobilization_3mo","type":"boolean","description":"Hospital admission, bedridden, flight >6 h, or lower-limb paralysis other than the cast, within 3 months, as assigned by the caller (Nemeth 2020 Table 1). true scores 2. Independent of the exclusive immobilization category.","required":true,"example":"false"},{"in":"query","name":"surgery_within_3mo","type":"boolean","description":"Surgery within 3 months as assigned by the caller (Nemeth 2020 Table 1). true scores 2. magent does not classify an operation.","required":true,"example":"false"},{"in":"query","name":"comorbidity","type":"boolean","description":"Heart failure, rheumatoid arthritis, CKD, COPD, or IBD as one caller-assigned flag (Nemeth 2020 Table 1). true scores 1. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"chronic_venous_insufficiency","type":"boolean","description":"Chronic venous insufficiency (varicose veins) as assigned by the caller (Nemeth 2020 Table 1). true scores 1. magent does not examine the patient.","required":true,"example":"false"}],"errors":[{"code":"invalid_trip_trauma","message":"trauma must be high, intermediate, or low (Nemeth 2020 Table 1; caller assigns the highest trauma category). Returned before settlement; you are not charged.","status":400},{"code":"invalid_trip_immobilization","message":"immobilization must be upper_leg, lower_leg, foot_cast, or other_plantar (Nemeth 2020 Table 1). Returned before settlement; you are not charged.","status":400},{"code":"invalid_trip_age","message":"age must be an integer from 1 to 120 (Nemeth 2020 TRiP(cast); not the adult 18-120 clamp). Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_bmi_kg_m2","message":"bmi_kg_m2 must be a number from 10 to 80. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/trip-cast","citation":{"authors":"Nemeth B, Douillet D, le Cessie S, Penaloza A, Moumneh T, Roy PM, Cannegieter S","doi":"10.1016/j.eclinm.2020.100270","id":"nemeth-2020","pmid":"32300734","source":"EClinicalMedicine. 2020;20:100270","title":"Clinical risk assessment model to predict venous thromboembolism risk after immobilization for lower-limb trauma","url":"https://doi.org/10.1016/j.eclinm.2020.100270"},"formula_expression":"TRiP(cast) = trauma (high 3, intermediate 2, low 1) + immobilization (upper_leg 3, lower_leg 2, foot_cast 1, other_plantar 0) + age (<35: 0, 35-54: 1, 55-74: 2, >=75: 3) + male (1) + BMI (>=35: 2, >=25 and <35: 1, <25: 0) + family_history_vte (2) + personal_history_vte_or_major_thrombophilia (4) + hormonal_estrogenic_treatment (4) + cancer_within_5y (3) + pregnancy_or_puerperium (3) + other_immobilization_3mo (2) + surgery_within_3mo (2) + comorbidity (1) + chronic_venous_insufficiency (1); Nemeth 2020 Table 1; max 34; high_risk iff score >= 7","purpose":"Sum Nemeth 2020 Table 1 TRiP(cast) points from caller-assigned trauma and immobilization categories, age, sex, BMI, and nine clinical flags, and return high vs low risk at cutoff 7.","markdown_url":"https://magentlab.com/docs/trip-cast.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"trip_cast"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"TRiP(cast) points 0-34"},{"name":"max_score","type":"integer","description":"34 (Nemeth 2020 Table 1 maximum)"},{"name":"high_risk","type":"boolean","description":"true iff score ≥7 (Nemeth 2020 / POT-CAST cutoff). Not a VTE diagnosis and not a thromboprophylaxis order."},{"name":"risk_band","type":"string","description":"high_risk when score ≥7; low_risk when score <7 (Nemeth 2020 cutoff 7). A band, not a diagnosis or order."},{"name":"age_years","type":"integer","description":"Age used for the exclusive age band"},{"name":"sex","type":"string","description":"female or male used for the sex points"},{"name":"bmi_kg_m2","type":"number","description":"BMI in kg/m^2 used for the exclusive BMI band"},{"name":"trauma","type":"string","description":"Exclusive trauma category used (high, intermediate, or low)"},{"name":"immobilization","type":"string","description":"Exclusive immobilization category used (upper_leg, lower_leg, foot_cast, or other_plantar)"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Nemeth 2020 eClinicalMedicine citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"50","bmi_kg_m2":"30","cancer_within_5y":"false","chronic_venous_insufficiency":"false","comorbidity":"false","family_history_vte":"false","hormonal_estrogenic_treatment":"false","immobilization":"lower_leg","other_immobilization_3mo":"false","personal_history_vte_or_major_thrombophilia":"false","pregnancy_or_puerperium":"false","sex":"male","surgery_within_3mo":"false","trauma":"intermediate"},{"age":"50","bmi_kg_m2":"30","cancer_within_5y":"false","chronic_venous_insufficiency":"false","comorbidity":"false","family_history_vte":"false","hormonal_estrogenic_treatment":"false","immobilization":"lower_leg","other_immobilization_3mo":"false","personal_history_vte_or_major_thrombophilia":"false","pregnancy_or_puerperium":"false","sex":"male","surgery_within_3mo":"false","trauma":"intermediate"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/trip-cast","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/trip-cast?trauma=intermediate&immobilization=lower_leg&age=50&sex=male&bmi_kg_m2=30&family_history_vte=false&personal_history_vte_or_major_thrombophilia=false&hormonal_estrogenic_treatment=false&cancer_within_5y=false&pregnancy_or_puerperium=false&other_immobilization_3mo=false&surgery_within_3mo=false&comorbidity=false&chronic_venous_insufficiency=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/trip-cast","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/jones","description":"Gewitz 2015 AHA Jones criteria (Table 7). jones_arf iff evidence_of_preceding_gas and the episode rule: initial 2 major or 1 major plus 2 minor; recurrent also allows 3 minor. Majors/minors follow population_risk for arthritis vs arthralgia, fever, and ESR/CRP. Prolonged PR does not count with carditis. Joints count in major or minor, not both. magent does not examine the patient or read an echocardiogram. Not Jones 1944. Not a diagnosis. Not a medical device.","parameters":[{"in":"query","name":"episode","type":"string","enum":["initial","recurrent"],"description":"ARF episode: initial or recurrent (Gewitz 2015 Table 7). Recurrent also allows 3 minor manifestations. magent does not date prior ARF.","required":true,"example":"initial"},{"in":"query","name":"population_risk","type":"string","enum":["low","moderate_high"],"description":"Caller-assigned population risk. low means ARF incidence ≤2 per 100000 school-aged children or all-age RHD prevalence ≤1 per 1000 as already assigned by the caller; moderate_high otherwise. magent does not compute incidence.","required":true,"example":"low"},{"in":"query","name":"evidence_of_preceding_gas","type":"boolean","description":"Evidence of preceding group A streptococcal infection as assigned by the caller (Gewitz 2015). true or false. magent does not interpret serology or culture.","required":true,"example":"true"},{"in":"query","name":"carditis","type":"boolean","description":"Clinical and/or subclinical carditis as assigned by the caller (subclinical = echocardiographic valvulitis). Counts as one major. When true, prolonged_pr does not count as a minor. magent does not examine the patient or read an echocardiogram.","required":true,"example":"true"},{"in":"query","name":"polyarthritis","type":"boolean","description":"Polyarthritis as assigned by the caller. Counts as the arthritis major in low-risk and in moderate_high-risk populations. Joints count in major or minor, not both. magent does not examine the joints.","required":true,"example":"true"},{"in":"query","name":"monoarthritis","type":"boolean","description":"Monoarthritis as assigned by the caller. Counts as the arthritis major only when population_risk is moderate_high (and polyarthritis is false). Does not count in low-risk. magent does not examine the joints.","required":true,"example":"false"},{"in":"query","name":"polyarthralgia","type":"boolean","description":"Polyarthralgia as assigned by the caller. Low-risk: a minor only if polyarthritis is false. Moderate_high: a major only if neither polyarthritis nor monoarthritis is true. Not a second joint major. magent does not examine the joints.","required":true,"example":"false"},{"in":"query","name":"monoarthralgia","type":"boolean","description":"Monoarthralgia as assigned by the caller. Counts as a minor only when population_risk is moderate_high and no arthritis or polyarthralgia major is counted. Does not count in low-risk. magent does not examine the joints.","required":true,"example":"false"},{"in":"query","name":"chorea","type":"boolean","description":"Sydenham chorea as assigned by the caller (Gewitz 2015 major). true or false. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"erythema_marginatum","type":"boolean","description":"Erythema marginatum as assigned by the caller (Gewitz 2015 major). true or false. magent does not examine the skin.","required":true,"example":"false"},{"in":"query","name":"subcutaneous_nodules","type":"boolean","description":"Subcutaneous nodules as assigned by the caller (Gewitz 2015 major). true or false. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"fever_ge_38_5","type":"boolean","description":"Fever ≥38.5 C as assigned by the caller. Counts as a minor only when population_risk is low. Ignored for counting when population_risk is moderate_high. magent does not measure temperature.","required":true,"example":"false"},{"in":"query","name":"fever_ge_38","type":"boolean","description":"Fever ≥38.0 C as assigned by the caller. Counts as a minor only when population_risk is moderate_high. Ignored for counting when population_risk is low. magent does not measure temperature.","required":true,"example":"false"},{"in":"query","name":"esr_ge_60_or_crp_ge_3","type":"boolean","description":"ESR ≥60 mm/h or CRP ≥3.0 mg/dL as assigned by the caller. Counts as the acute-phase minor only when population_risk is low. Ignored for counting when population_risk is moderate_high. magent does not interpret laboratory values.","required":true,"example":"false"},{"in":"query","name":"esr_ge_30_or_crp_ge_3","type":"boolean","description":"ESR ≥30 mm/h or CRP ≥3.0 mg/dL as assigned by the caller. Counts as the acute-phase minor only when population_risk is moderate_high. Ignored for counting when population_risk is low. magent does not interpret laboratory values.","required":true,"example":"false"},{"in":"query","name":"prolonged_pr","type":"boolean","description":"Prolonged PR interval as assigned by the caller. Counts as a minor only when carditis is false. magent does not interpret an electrocardiogram.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_population_risk","message":"population_risk must be low or moderate_high (Gewitz 2015 AHA Jones criteria). Returned before settlement; you are not charged.","status":400},{"code":"invalid_arf_episode","message":"episode must be initial or recurrent (Gewitz 2015 AHA Jones criteria). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/jones","citation":{"authors":"Gewitz MH, Baltimore RS, Tani LY, Sable CA, Shulman ST, Carapetis J, Remenyi B, Taubert KA, Bolger AF, Beerman L, Mayosi BM, Beaton A, Pandian NG, Kaplan EL","doi":"10.1161/CIR.0000000000000205","id":"gewitz-2015","pmid":"25908771","source":"Circulation. 2015;131(20):1806-1818","title":"Revision of the Jones Criteria for the Diagnosis of Acute Rheumatic Fever in the Era of Doppler Echocardiography: A Scientific Statement From the American Heart Association","url":"https://doi.org/10.1161/CIR.0000000000000205"},"formula_expression":"jones_arf iff evidence_of_preceding_gas and episode rule (Gewitz 2015 Table 7). initial: 2 major or (1 major and 2 minor). recurrent: 2 major or (1 major and 2 minor) or 3 minor. Majors: carditis (clinical and/or subclinical); arthritis (low: polyarthritis; moderate_high: polyarthritis or monoarthritis, else polyarthralgia); chorea; erythema_marginatum; subcutaneous_nodules. Minors: polyarthralgia (low, if no arthritis major); monoarthralgia (moderate_high, if no arthritis or polyarthralgia major); fever (low: fever_ge_38_5; moderate_high: fever_ge_38); ESR/CRP (low: esr_ge_60_or_crp_ge_3; moderate_high: esr_ge_30_or_crp_ge_3); prolonged_pr only when carditis is false. Joints count in major or minor, not both, at most one joint major. Not Jones 1944. Not a diagnosis","purpose":"Apply Gewitz 2015 Table 7 Jones criteria and return whether jones_arf holds from caller-assigned episode, population_risk, evidence of preceding GAS, and major/minor flags.","markdown_url":"https://magentlab.com/docs/jones.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"jones"},{"name":"formula_expression","type":"string","description":"Gewitz 2015 Table 7 Jones episode rule with population-specific majors/minors"},{"name":"episode","type":"string","description":"Echo of episode: initial or recurrent"},{"name":"population_risk","type":"string","description":"Echo of population_risk: low or moderate_high"},{"name":"major_count","type":"integer","description":"Count of Jones majors after population-specific joint assignment (carditis, one joint major, chorea, erythema_marginatum, subcutaneous_nodules)"},{"name":"minor_count","type":"integer","description":"Count of Jones minors after population-specific fever, ESR/CRP, joint, and prolonged-PR assignment. Prolonged PR is excluded when carditis is a major"},{"name":"jones_arf","type":"boolean","description":"true iff evidence_of_preceding_gas and the episode rule hold. Not a diagnosis"},{"name":"criteria","type":"array","description":"Rows for each caller flag, episode_rule, and jones_arf with factor and met"},{"name":"citation","type":"object","description":"Gewitz 2015 Circulation citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"carditis":"true","chorea":"false","episode":"initial","erythema_marginatum":"false","esr_ge_30_or_crp_ge_3":"false","esr_ge_60_or_crp_ge_3":"false","evidence_of_preceding_gas":"true","fever_ge_38":"false","fever_ge_38_5":"false","monoarthralgia":"false","monoarthritis":"false","polyarthralgia":"false","polyarthritis":"true","population_risk":"low","prolonged_pr":"false","subcutaneous_nodules":"false"},{"carditis":"true","chorea":"false","episode":"initial","erythema_marginatum":"false","esr_ge_30_or_crp_ge_3":"false","esr_ge_60_or_crp_ge_3":"false","evidence_of_preceding_gas":"true","fever_ge_38":"false","fever_ge_38_5":"false","monoarthralgia":"false","monoarthritis":"false","polyarthralgia":"false","polyarthritis":"true","population_risk":"low","prolonged_pr":"false","subcutaneous_nodules":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/jones","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/jones?episode=initial&population_risk=low&evidence_of_preceding_gas=true&carditis=true&polyarthritis=true&monoarthritis=false&polyarthralgia=false&monoarthralgia=false&chorea=false&erythema_marginatum=false&subcutaneous_nodules=false&fever_ge_38_5=false&fever_ge_38=false&esr_ge_60_or_crp_ge_3=false&esr_ge_30_or_crp_ge_3=false&prolonged_pr=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/jones","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/duke","description":"Durack 1994 original Duke criteria for infective endocarditis. Definite if pathologic_definite or clinical_definite (2 major, or 1 major plus 3 minor, or 5 minor); else rejected if any rejected flag; else possible. Suggestive echo and suggestive micro are not double-counted with the matching major. Caller assigns flags. magent does not examine the patient, read an echocardiogram, or interpret cultures. Not Li 2000 modified Duke. Not ISCVID 2023. Not a diagnosis.","parameters":[{"in":"query","name":"pathologic_definite","type":"boolean","description":"Microorganisms demonstrated by culture or histology in a vegetation, embolus, or intracardiac abscess, or pathologic lesions (vegetation or abscess) confirmed by histology showing active endocarditis (Durack 1994 pathologic definite). true or false as assigned by the caller. magent does not examine tissue.","required":true,"example":"false"},{"in":"query","name":"major_typical_blood_culture","type":"boolean","description":"Typical microorganism from two separate blood cultures, or persistently positive blood cultures, as assigned by the caller (Durack 1994 major typical blood culture). true or false. magent does not interpret cultures.","required":true,"example":"true"},{"in":"query","name":"major_positive_echo","type":"boolean","description":"Positive echocardiogram for IE: oscillating mass or vegetation, abscess, new partial dehiscence of a prosthetic valve, or new valvular regurgitation (Durack 1994 major). true or false as assigned by the caller. magent does not read an echocardiogram.","required":true,"example":"true"},{"in":"query","name":"minor_predisposition","type":"boolean","description":"Predisposing heart condition or intravenous drug use (Durack 1994 minor). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"false"},{"in":"query","name":"minor_fever","type":"boolean","description":"Fever ≥38.0 C (Durack 1994 minor). true or false as assigned by the caller. magent does not measure temperature.","required":true,"example":"false"},{"in":"query","name":"minor_vascular_phenomena","type":"boolean","description":"Vascular phenomena (Durack 1994 minor): major arterial emboli, septic pulmonary infarcts, mycotic aneurysm, intracranial hemorrhage, conjunctival hemorrhages, or Janeway lesions, as assigned by the caller. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"minor_immunologic_phenomena","type":"boolean","description":"Immunologic phenomena (Durack 1994 minor): glomerulonephritis, Osler nodes, Roth spots, or rheumatoid factor, as assigned by the caller. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"minor_suggestive_echo","type":"boolean","description":"Echocardiogram consistent with IE but not meeting the major echo definition (Durack 1994 minor). true or false as assigned by the caller. Not counted in minor_count when major_positive_echo is true. magent does not read an echocardiogram.","required":true,"example":"false"},{"in":"query","name":"minor_suggestive_micro","type":"boolean","description":"Microbiologic evidence not meeting the major culture definition (Durack 1994 minor). true or false as assigned by the caller. Not counted in minor_count when major_typical_blood_culture is true. magent does not interpret cultures.","required":true,"example":"false"},{"in":"query","name":"rejected_firm_alternate_diagnosis","type":"boolean","description":"Firm alternate diagnosis explaining evidence of IE (Durack 1994 rejected). true or false as assigned by the caller. Classification is rejected only when definite does not hold.","required":true,"example":"false"},{"in":"query","name":"rejected_resolved_le_4_days_antibiotics","type":"boolean","description":"Manifestations of IE resolved with antibiotic therapy for 4 days or less (Durack 1994 rejected). true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"rejected_no_pathology_le_4_days_antibiotics","type":"boolean","description":"No pathologic evidence of IE at surgery or autopsy after antibiotic therapy for 4 days or less (Durack 1994 rejected). true or false as assigned by the caller. magent does not examine tissue.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/duke","citation":{"authors":"Durack DT, Lukes AS, Bright DK","doi":"10.1016/0002-9343(94)90143-0","id":"durack-1994","pmid":"8154507","source":"Am J Med. 1994;96(3):200-209","title":"New criteria for diagnosis of infective endocarditis: utilization of specific echocardiographic findings. Duke Endocarditis Service","url":"https://doi.org/10.1016/0002-9343(94)90143-0"},"formula_expression":"definite iff pathologic_definite or clinical_definite; clinical_definite iff major_count >= 2 or (major_count >= 1 and minor_count >= 3) or minor_count >= 5; else rejected if any rejected flag; else possible (Durack 1994 original Duke). minor_suggestive_echo is not counted when major_positive_echo is true; minor_suggestive_micro is not counted when major_typical_blood_culture is true. Not Li 2000. Not ISCVID 2023","purpose":"Apply the Durack 1994 original Duke criteria for infective endocarditis and return definite, possible, or rejected from caller-assigned pathologic, major, minor, and rejected flags.","markdown_url":"https://magentlab.com/docs/duke.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"duke"},{"name":"formula_expression","type":"string","description":"Durack 1994 original Duke: definite if pathologic_definite or clinical_definite (2 major, or 1 major plus 3 minor, or 5 minor); else rejected if any rejected flag; else possible. Suggestive echo and suggestive micro are not double-counted with the matching major."},{"name":"major_count","type":"integer","description":"Count of true Durack 1994 major flags among major_typical_blood_culture and major_positive_echo (0-2)"},{"name":"minor_count","type":"integer","description":"Count of counted Durack 1994 minor flags (0-6). minor_suggestive_echo is omitted when major_positive_echo is true; minor_suggestive_micro is omitted when major_typical_blood_culture is true"},{"name":"classification","type":"string","description":"definite, possible, or rejected (Durack 1994). possible is the leftover category. Not Li 2000. Not a diagnosis."},{"name":"criteria","type":"array","description":"Per-flag rows for pathologic_definite, two majors, six minors, and three rejected flags, plus clinical_definite and rejected aggregates (factor and met)"},{"name":"citation","type":"object","description":"Durack 1994 Am J Med citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"major_positive_echo":"true","major_typical_blood_culture":"true","minor_fever":"false","minor_immunologic_phenomena":"false","minor_predisposition":"false","minor_suggestive_echo":"false","minor_suggestive_micro":"false","minor_vascular_phenomena":"false","pathologic_definite":"false","rejected_firm_alternate_diagnosis":"false","rejected_no_pathology_le_4_days_antibiotics":"false","rejected_resolved_le_4_days_antibiotics":"false"},{"major_positive_echo":"true","major_typical_blood_culture":"true","minor_fever":"false","minor_immunologic_phenomena":"false","minor_predisposition":"false","minor_suggestive_echo":"false","minor_suggestive_micro":"false","minor_vascular_phenomena":"false","pathologic_definite":"false","rejected_firm_alternate_diagnosis":"false","rejected_no_pathology_le_4_days_antibiotics":"false","rejected_resolved_le_4_days_antibiotics":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/duke","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/duke?pathologic_definite=false&major_typical_blood_culture=true&major_positive_echo=true&minor_predisposition=false&minor_fever=false&minor_vascular_phenomena=false&minor_immunologic_phenomena=false&minor_suggestive_echo=false&minor_suggestive_micro=false&rejected_firm_alternate_diagnosis=false&rejected_resolved_le_4_days_antibiotics=false&rejected_no_pathology_le_4_days_antibiotics=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/duke","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/duke-iscvid","description":"2023 Duke-ISCVID (Fowler) IE criteria. Definite if pathologic_definite or clinical_definite (2 major, or 1 major plus 3 minor, or 5 minor). Possible if 1 major plus 1 minor or 3 minor. Rejected if neither, or if a rejected flag is true and definite does not hold. Majors are caller-assigned microbiologic, imaging, and surgical domains. minor_microbiologic is not counted when major_microbiologic is true. magent does not read echo, PET, or cultures. Not Durack 1994. Not Li 2000. Not a diagnosis.","parameters":[{"in":"query","name":"pathologic_definite","type":"boolean","description":"Microorganisms or histopathology of active IE in a vegetation, embolus, or intracardiac abscess, including 2023 molecular or tissue methods, as assigned by the caller (Fowler 2023 pathologic definite). true or false. magent does not examine tissue.","required":true,"example":"false"},{"in":"query","name":"major_microbiologic","type":"boolean","description":"Fowler 2023 microbiologic major as assigned by the caller (typical organisms from two or more sets, or another published microbiologic major including Coxiella or Bartonella serology). true or false. magent does not interpret cultures.","required":true,"example":"true"},{"in":"query","name":"major_imaging","type":"boolean","description":"Fowler 2023 imaging major as assigned by the caller (echocardiogram, cardiac CT, or 18F-FDG PET/CT meeting the 2023 imaging major). true or false. magent does not read imaging.","required":true,"example":"true"},{"in":"query","name":"major_surgical","type":"boolean","description":"Fowler 2023 surgical major as assigned by the caller (intraoperative inspection or subsequent histology or microbiology documenting IE). true or false. New 2023 major domain. magent does not examine the operative field.","required":true,"example":"false"},{"in":"query","name":"minor_predisposition","type":"boolean","description":"Predisposing heart condition or intravenous drug use (Fowler 2023 minor). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"false"},{"in":"query","name":"minor_fever","type":"boolean","description":"Fever ≥38.0 C (Fowler 2023 minor). true or false as assigned by the caller. magent does not measure temperature.","required":true,"example":"false"},{"in":"query","name":"minor_vascular","type":"boolean","description":"Vascular phenomena (Fowler 2023 minor) as assigned by the caller. true or false. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"minor_immunologic","type":"boolean","description":"Immunologic phenomena (Fowler 2023 minor) as assigned by the caller. true or false. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"minor_microbiologic","type":"boolean","description":"Microbiologic evidence not meeting the microbiologic major (Fowler 2023 minor). true or false as assigned by the caller. Not counted in minor_count when major_microbiologic is true. magent does not interpret cultures.","required":true,"example":"false"},{"in":"query","name":"rejected_firm_alternate_diagnosis","type":"boolean","description":"Firm alternate diagnosis explaining evidence of IE (Fowler 2023 rejected). true or false as assigned by the caller. Classification is rejected only when definite does not hold.","required":true,"example":"false"},{"in":"query","name":"rejected_resolved_le_4_days_antibiotics","type":"boolean","description":"Manifestations of IE resolved with antibiotic therapy for 4 days or less (Fowler 2023 rejected). true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"rejected_no_pathology_le_4_days_antibiotics","type":"boolean","description":"No pathologic evidence of IE at surgery or autopsy after antibiotic therapy for 4 days or less (Fowler 2023 rejected). true or false as assigned by the caller. magent does not examine tissue.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/duke-iscvid","citation":{"authors":"Fowler VG Jr, Durack DT, Selton-Suty C, Athan E, Bayer AS, Chamis JG, Dahl A, DiBernardo L, Durante-Mangoni E, Duval X, Fortes CQ, Fosbøl E, Hannan MM, Hasse B, Hoen B, Iversen K, et al.","doi":"10.1093/cid/ciad271","id":"fowler-2023","pmid":"37138445","source":"Clin Infect Dis. 2023;77(4):518-526","title":"The 2023 Duke-International Society for Cardiovascular Infectious Diseases Criteria for Infective Endocarditis: Updating the Modified Duke Criteria","url":"https://doi.org/10.1093/cid/ciad271"},"formula_expression":"definite iff pathologic_definite or clinical_definite; clinical_definite iff major_count >= 2 or (major_count >= 1 and minor_count >= 3) or minor_count >= 5; possible iff not definite and ((major_count >= 1 and minor_count >= 1) or minor_count >= 3); rejected iff not definite and not possible, or (not definite and any rejected flag); definite is not overridden by rejected flags (Fowler 2023 Duke-ISCVID). minor_microbiologic is not counted when major_microbiologic is true. Majors are caller-assigned microbiologic, imaging, and surgical domains. Not Durack 1994. Not Li 2000","purpose":"Apply the 2023 Duke-ISCVID (Fowler) criteria for infective endocarditis and return definite, possible, or rejected from caller-assigned pathologic, major (microbiologic, imaging, surgical), minor, and rejected flags.","markdown_url":"https://magentlab.com/docs/duke-iscvid.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"duke_iscvid"},{"name":"formula_expression","type":"string","description":"Fowler 2023 Duke-ISCVID: definite if pathologic_definite or clinical_definite (2 major, or 1 major plus 3 minor, or 5 minor); possible if not definite and (1 major plus 1 minor or 3 minor); rejected if neither, or if a rejected flag is true and definite does not hold. minor_microbiologic is not double-counted with major_microbiologic. Not Durack 1994. Not Li 2000."},{"name":"classification","type":"string","description":"definite, possible, or rejected (Fowler 2023 Duke-ISCVID). Not Durack 1994 leftover possible. Not a diagnosis."},{"name":"definite","type":"boolean","description":"true iff classification is definite (pathologic_definite or clinical_definite)"},{"name":"possible","type":"boolean","description":"true iff classification is possible (1 major plus 1 minor, or 3 minor, and not definite and no rejected flag)"},{"name":"rejected","type":"boolean","description":"true iff classification is rejected. Rejected flags do not override definite."},{"name":"major_count","type":"integer","description":"Count of true Fowler 2023 major flags among major_microbiologic, major_imaging, and major_surgical (0-3)"},{"name":"minor_count","type":"integer","description":"Count of counted Fowler 2023 minor flags (0-5). minor_microbiologic is omitted when major_microbiologic is true"},{"name":"pathologic_definite","type":"boolean","description":"Caller-assigned Fowler 2023 pathologic definite flag. true is sufficient for classification definite."},{"name":"criteria","type":"array","description":"Per-flag rows for pathologic_definite, three majors, five minors, and three rejected flags, plus clinical_definite and rejected aggregates (factor and met)"},{"name":"citation","type":"object","description":"Fowler 2023 Clin Infect Dis citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"major_imaging":"true","major_microbiologic":"true","major_surgical":"false","minor_fever":"false","minor_immunologic":"false","minor_microbiologic":"false","minor_predisposition":"false","minor_vascular":"false","pathologic_definite":"false","rejected_firm_alternate_diagnosis":"false","rejected_no_pathology_le_4_days_antibiotics":"false","rejected_resolved_le_4_days_antibiotics":"false"},{"major_imaging":"true","major_microbiologic":"true","major_surgical":"false","minor_fever":"false","minor_immunologic":"false","minor_microbiologic":"false","minor_predisposition":"false","minor_vascular":"false","pathologic_definite":"false","rejected_firm_alternate_diagnosis":"false","rejected_no_pathology_le_4_days_antibiotics":"false","rejected_resolved_le_4_days_antibiotics":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/duke-iscvid","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/duke-iscvid?pathologic_definite=false&major_microbiologic=true&major_imaging=true&major_surgical=false&minor_predisposition=false&minor_fever=false&minor_vascular=false&minor_immunologic=false&minor_microbiologic=false&rejected_firm_alternate_diagnosis=false&rejected_resolved_le_4_days_antibiotics=false&rejected_no_pathology_le_4_days_antibiotics=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/duke-iscvid","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/ie-mortality","description":"Park 2016 ICE Table 5 simplified 6-month IE mortality score: constant 4, age bands (<=45: 0; 46-60: 2; 61-70: 3; >70: 4), and caller-assigned flags (dialysis +3, nosocomial +2, prosthetic +1, symptoms >1 month -1, S. aureus +1, viridans -2, aortic/mitral vegetation +1 each, NYHA 3-4 +3, stroke +2, paravalvular +2, persistent bacteremia +2, surgery -2). Returns score, quadratic mortality percent, and score >= 8. Not a diagnosis. magent does not examine the patient or decide surgery.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (integer 18-120). Park 2016 Table 5: <=45 scores 0; 46-60 scores 2; 61-70 scores 3; >70 scores 4. Age 45 scores 0; 46 scores 2; 70 scores 3; 71 scores 4. magent does not examine the patient.","required":true,"example":"40"},{"in":"query","name":"dialysis","type":"boolean","description":"History of dialysis as assigned by the caller (Park 2016 Table 5). true or false. +3 if true. magent does not review dialysis records.","required":true,"example":"false"},{"in":"query","name":"nosocomial_ie","type":"boolean","description":"Nosocomial infective endocarditis as assigned by the caller (Park 2016 Table 5). true or false. +2 if true. magent does not classify acquisition.","required":true,"example":"false"},{"in":"query","name":"prosthetic_ie","type":"boolean","description":"Prosthetic-valve infective endocarditis as assigned by the caller (Park 2016 Table 5). true or false. +1 if true. magent does not examine the valve.","required":true,"example":"false"},{"in":"query","name":"symptoms_gt_1_month","type":"boolean","description":"Symptoms for more than 1 month before admission as assigned by the caller (Park 2016 Table 5). true or false. -1 if true. magent does not date symptom onset.","required":true,"example":"false"},{"in":"query","name":"staphylococcus_aureus","type":"boolean","description":"Staphylococcus aureus as assigned by the caller (Park 2016 Table 5). true or false. +1 if true. Independent of viridans_group_streptococci; both may be true. magent does not interpret cultures.","required":true,"example":"false"},{"in":"query","name":"viridans_group_streptococci","type":"boolean","description":"Viridans group streptococci as assigned by the caller (Park 2016 Table 5). true or false. -2 if true. Independent of staphylococcus_aureus; both may be true. magent does not interpret cultures.","required":true,"example":"false"},{"in":"query","name":"aortic_vegetation","type":"boolean","description":"Aortic vegetation as assigned by the caller (Park 2016 Table 5). true or false. +1 if true. Independent of mitral_vegetation. magent does not read an echocardiogram.","required":true,"example":"false"},{"in":"query","name":"mitral_vegetation","type":"boolean","description":"Mitral vegetation as assigned by the caller (Park 2016 Table 5). true or false. +1 if true. Independent of aortic_vegetation. magent does not read an echocardiogram.","required":true,"example":"false"},{"in":"query","name":"nyha_class_3_or_4","type":"boolean","description":"NYHA class 3 or 4 heart failure as assigned by the caller (Park 2016 Table 5). true or false. +3 if true. magent does not examine the patient or assign NYHA class.","required":true,"example":"false"},{"in":"query","name":"stroke","type":"boolean","description":"Stroke as assigned by the caller (Park 2016 Table 5). true or false. +2 if true. magent does not diagnose stroke.","required":true,"example":"false"},{"in":"query","name":"paravalvular_complication","type":"boolean","description":"Paravalvular complication as assigned by the caller (Park 2016 Table 5). true or false. +2 if true. magent does not read imaging.","required":true,"example":"false"},{"in":"query","name":"persistent_bacteremia","type":"boolean","description":"Persistent bacteremia as assigned by the caller (Park 2016 Table 5). true or false. +2 if true. magent does not interpret cultures.","required":true,"example":"false"},{"in":"query","name":"surgical_treatment","type":"boolean","description":"Surgical treatment as assigned by the caller (Park 2016 Table 5). true or false. -2 if true. magent does not decide surgery.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/ie-mortality","citation":{"authors":"Park LP, Chu VH, Peterson G, et al.","doi":"10.1161/JAHA.115.003016","id":"park-2016","pmid":"27091179","source":"J Am Heart Assoc. 2016;5(4):e003016","title":"Validated Risk Score for Predicting 6-Month Mortality in Infective Endocarditis","url":"https://doi.org/10.1161/JAHA.115.003016"},"formula_expression":"Park 2016 Table 5 simplified IE 6-month mortality score = constant 4 + age (<=45: 0, 46-60: 2, 61-70: 3, >70: 4) + dialysis 3 + nosocomial_ie 2 + prosthetic_ie 1 + symptoms_gt_1_month -1 + staphylococcus_aureus 1 + viridans_group_streptococci -2 + aortic_vegetation 1 + mitral_vegetation 1 + nyha_class_3_or_4 3 + stroke 2 + paravalvular_complication 2 + persistent_bacteremia 2 + surgical_treatment -2; mortality_percent = 2.416*score + 0.109*score*score - 4.849 rounded to 1 decimal (Table 5 footnote); score_ge_8 iff score >= 8 (paper ROC operating point). Not Table 6 quintile bands","purpose":"Compute the Park 2016 ICE simplified risk score for 6-month mortality in infective endocarditis from age and caller-assigned Table 5 flags, and return the score, quadratic 6-month mortality percent, and whether score >= 8.","markdown_url":"https://magentlab.com/docs/ie-mortality.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"ie_mortality"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Park 2016 Table 5 simplified risk score including the constant 4. May be negative. Not Table 6 quintile bands."},{"name":"mortality_percent","type":"number","description":"Probability of 6-month mortality from the Table 5 footnote quadratic 2.416*score + 0.109*score*score - 4.849, rounded to 1 decimal. Not clamped."},{"name":"score_ge_8","type":"boolean","description":"true iff simplified risk score >= 8 (Park 2016 ROC operating point). Not a treatment cutoff and not a quintile band."},{"name":"age_years","type":"integer","description":"Age used for the Table 5 age term"},{"name":"components","type":"array","description":"Per-factor points including the constant"},{"name":"citation","type":"object","description":"Park et al. J Am Heart Assoc 2016 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"40","aortic_vegetation":"false","dialysis":"false","mitral_vegetation":"false","nosocomial_ie":"false","nyha_class_3_or_4":"false","paravalvular_complication":"false","persistent_bacteremia":"false","prosthetic_ie":"false","staphylococcus_aureus":"false","stroke":"false","surgical_treatment":"false","symptoms_gt_1_month":"false","viridans_group_streptococci":"false"},{"age":"40","aortic_vegetation":"false","dialysis":"false","mitral_vegetation":"false","nosocomial_ie":"false","nyha_class_3_or_4":"false","paravalvular_complication":"false","persistent_bacteremia":"false","prosthetic_ie":"false","staphylococcus_aureus":"false","stroke":"false","surgical_treatment":"false","symptoms_gt_1_month":"false","viridans_group_streptococci":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/ie-mortality","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/ie-mortality?age=40&dialysis=false&nosocomial_ie=false&prosthetic_ie=false&symptoms_gt_1_month=false&staphylococcus_aureus=false&viridans_group_streptococci=false&aortic_vegetation=false&mitral_vegetation=false&nyha_class_3_or_4=false&stroke=false&paravalvular_complication=false&persistent_bacteremia=false&surgical_treatment=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/ie-mortality","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/riske","description":"Olmos 2017 RISK-E (Risk-Endocarditis) for in-hospital mortality after cardiac surgery in active left-sided IE. Age <=51: 0; 52-63: 9; 64-72: 13; >=73: 14. Flags: prosthetic_infection +6, periannular_complications +5, staphylococcus_aureus_or_fungi +9, acute_renal_failure +5, septic_shock +7, cardiogenic_shock +15, thrombocytopenia +7. Returns score and max_score 68 only. Not a diagnosis or surgery decision. magent does not examine the valve or read echo.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (integer 18-120). Olmos 2017: <=51 scores 0; 52-63 scores 9; 64-72 scores 13; >=73 scores 14. Age 51 scores 0; 52 scores 9; 63 scores 9; 64 scores 13; 72 scores 13; 73 scores 14. magent does not examine the patient.","required":true,"example":"50"},{"in":"query","name":"prosthetic_infection","type":"boolean","description":"Prosthetic-valve infection as assigned by the caller (Olmos 2017). true or false. +6 if true. magent does not examine the valve.","required":true,"example":"false"},{"in":"query","name":"periannular_complications","type":"boolean","description":"Periannular complications (abscess, pseudoaneurysm, fistula, or prosthetic dehiscence) as assigned by the caller (Olmos 2017). true or false. +5 if true. magent does not read echocardiography.","required":true,"example":"false"},{"in":"query","name":"staphylococcus_aureus_or_fungi","type":"boolean","description":"Staphylococcus aureus or fungi as assigned by the caller (Olmos 2017 virulent microorganism). true or false. +9 if true. magent does not interpret cultures.","required":true,"example":"false"},{"in":"query","name":"acute_renal_failure","type":"boolean","description":"Acute renal failure as assigned by the caller (Olmos 2017; GFR <60 mL/min/1.73 m2 in the derivation). true or false. +5 if true. magent does not compute GFR.","required":true,"example":"false"},{"in":"query","name":"septic_shock","type":"boolean","description":"Septic shock as assigned by the caller (Olmos 2017). true or false. +7 if true. magent does not diagnose shock.","required":true,"example":"false"},{"in":"query","name":"cardiogenic_shock","type":"boolean","description":"Cardiogenic shock as assigned by the caller (Olmos 2017). true or false. +15 if true. magent does not diagnose shock or decide surgery.","required":true,"example":"false"},{"in":"query","name":"thrombocytopenia","type":"boolean","description":"Thrombocytopenia as assigned by the caller (Olmos 2017 thrombocytopaenia, <150000 platelets/mm3). true or false. +7 if true. magent does not interpret a platelet count.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/riske","citation":{"authors":"Olmos C, Vilacosta I, Fernández C, et al.","doi":"10.1136/heartjnl-2016-311093","id":"olmos-2017","pmid":"28432158","source":"Heart. 2017;103(18):1435-1442","title":"Risk score for cardiac surgery in active left-sided infective endocarditis","url":"https://doi.org/10.1136/heartjnl-2016-311093"},"formula_expression":"RISK-E = age (<=51: 0, 52-63: 9, 64-72: 13, >=73: 14) + prosthetic_infection 6 + periannular_complications 5 + staphylococcus_aureus_or_fungi 9 + acute_renal_failure 5 + septic_shock 7 + cardiogenic_shock 15 + thrombocytopenia 7; max 68. Score and max_score only; not a mortality percent. Olmos 2017 Table 2 and Table 3. Not Park 2016. Not Duke","purpose":"Compute the Olmos 2017 RISK-E (Risk-Endocarditis) score from age and seven caller-assigned flags for active left-sided infective endocarditis undergoing cardiac surgery, and return the integer score and max_score 68.","markdown_url":"https://magentlab.com/docs/riske.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"riske"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Olmos 2017 RISK-E points 0-68. Not a mortality percent and not a risk band."},{"name":"max_score","type":"integer","description":"Always 68"},{"name":"age_years","type":"integer","description":"Age used for the Olmos 2017 age term"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Olmos et al. Heart 2017 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"acute_renal_failure":"false","age":"50","cardiogenic_shock":"false","periannular_complications":"false","prosthetic_infection":"false","septic_shock":"false","staphylococcus_aureus_or_fungi":"false","thrombocytopenia":"false"},{"acute_renal_failure":"false","age":"50","cardiogenic_shock":"false","periannular_complications":"false","prosthetic_infection":"false","septic_shock":"false","staphylococcus_aureus_or_fungi":"false","thrombocytopenia":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/riske","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/riske?age=50&prosthetic_infection=false&periannular_complications=false&staphylococcus_aureus_or_fungi=false&acute_renal_failure=false&septic_shock=false&cardiogenic_shock=false&thrombocytopenia=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/riske","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/virsta","description":"Tubiana 2016 VIRSTA from nine caller-assigned SAB flags plus CRP mg/L. Points: emboli 5, meningitis 5, device or previous IE 4 (one item), IVDU 4, native valve 3, persistent bacteremia 3, vertebral osteomyelitis 2, community/non-nosocomial 2, severe sepsis/shock 1, CRP >190 mg/L 1. Max 30. high_risk iff score ≥ 3. Not an endocarditis diagnosis.","parameters":[{"in":"query","name":"cerebral_or_peripheral_emboli","type":"boolean","description":"Caller-assigned cerebral or peripheral (extracerebral) emboli (Tubiana 2016). true scores 5. magent does not diagnose emboli or endocarditis.","required":true,"example":"false"},{"in":"query","name":"meningitis","type":"boolean","description":"Caller-assigned meningitis (Tubiana 2016). true scores 5. magent does not diagnose meningitis or endocarditis.","required":true,"example":"false"},{"in":"query","name":"intracardiac_device_or_previous_ie","type":"boolean","description":"Permanent intracardiac device or previous infective endocarditis as one Tubiana 2016 item. true scores 4 if either is present; the two are not added separately. magent does not diagnose IE.","required":true,"example":"false"},{"in":"query","name":"iv_drug_use","type":"boolean","description":"Caller-assigned intravenous drug use (Tubiana 2016). true scores 4. magent does not take a social history.","required":true,"example":"false"},{"in":"query","name":"native_valve_disease","type":"boolean","description":"Caller-assigned preexisting native valve disease (Tubiana 2016). true scores 3. magent does not diagnose valve disease.","required":true,"example":"false"},{"in":"query","name":"persistent_bacteremia","type":"boolean","description":"H48-persistent bacteremia (positive blood culture after 48 hours) as assigned by the caller (Tubiana 2016). true scores 3. magent does not interpret cultures.","required":true,"example":"false"},{"in":"query","name":"vertebral_osteomyelitis","type":"boolean","description":"Caller-assigned vertebral osteomyelitis / spondylodiscitis (Tubiana 2016). true scores 2. magent does not diagnose osteomyelitis.","required":true,"example":"false"},{"in":"query","name":"community_or_non_nosocomial","type":"boolean","description":"Community-acquired or non-nosocomial healthcare-associated Staphylococcus aureus bacteremia (Tubiana 2016), as assigned by the caller. true scores 2; nosocomial is false (0). magent does not classify acquisition.","required":true,"example":"false"},{"in":"query","name":"severe_sepsis_or_shock","type":"boolean","description":"Caller-assigned severe sepsis or septic shock (Tubiana 2016). true scores 1. magent does not diagnose sepsis.","required":true,"example":"false"},{"in":"query","name":"crp_mg_l","type":"number","description":"C-reactive protein in mg/L (0-500). Tubiana 2016 scores 1 if CRP is above 190 mg/L (not ≥190). magent does not assay CRP.","required":true,"example":"50"}],"errors":[{"code":"invalid_virsta","message":"VIRSTA needs Tubiana 2016 Staphylococcus aureus bacteremia flags and CRP in published ranges. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/virsta","citation":{"authors":"Tubiana S, Duval X, Alla F, Selton-Suty C, Tattevin P, Delahaye F, Piroth L, Chirouze C, Lavigne JP, Erpelding ML, Hoen B, Vandenesch F, Iung B, Le Moing V","doi":"10.1016/j.jinf.2016.02.003","id":"tubiana-2016","pmid":"26916042","source":"J Infect. 2016;72(5):544-553","title":"The VIRSTA score, a prediction score to estimate risk of infective endocarditis and determine priority for echocardiography in patients with Staphylococcus aureus bacteremia","url":"https://doi.org/10.1016/j.jinf.2016.02.003"},"formula_expression":"VIRSTA = cerebral_or_peripheral_emboli (5 if present) + meningitis (5) + intracardiac_device_or_previous_ie (4) + iv_drug_use (4) + native_valve_disease (3) + persistent_bacteremia (3) + vertebral_osteomyelitis (2) + community_or_non_nosocomial (2) + severe_sepsis_or_shock (1) + (crp_mg_l > 190 → 1); Tubiana 2016 caller-assigned items; CRP cutoff is above 190 mg/L (not ≥190); intracardiac device or previous IE is one 4-point item; max 30; high_risk iff score ≥ 3","purpose":"Sum the Tubiana 2016 VIRSTA items from caller-assigned Staphylococcus aureus bacteremia flags and CRP, and return high_risk when the total is 3 or more.","markdown_url":"https://magentlab.com/docs/virsta.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"virsta"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"VIRSTA points 0-30"},{"name":"max_score","type":"integer","description":"Always 30"},{"name":"high_risk","type":"boolean","description":"true iff score ≥ 3 (Tubiana 2016 not-low-risk / echocardiography-priority cutoff). Not a diagnosis and not an imaging order. No extra strata."},{"name":"crp_mg_l","type":"number","description":"CRP in mg/L used"},{"name":"components","type":"array","description":"Per-item Tubiana 2016 points"},{"name":"citation","type":"object","description":"Tubiana J Infect 2016 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"cerebral_or_peripheral_emboli":"false","community_or_non_nosocomial":"false","crp_mg_l":"50","intracardiac_device_or_previous_ie":"false","iv_drug_use":"false","meningitis":"false","native_valve_disease":"false","persistent_bacteremia":"false","severe_sepsis_or_shock":"false","vertebral_osteomyelitis":"false"},{"cerebral_or_peripheral_emboli":"false","community_or_non_nosocomial":"false","crp_mg_l":"50","intracardiac_device_or_previous_ie":"false","iv_drug_use":"false","meningitis":"false","native_valve_disease":"false","persistent_bacteremia":"false","severe_sepsis_or_shock":"false","vertebral_osteomyelitis":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/virsta","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/virsta?cerebral_or_peripheral_emboli=false&meningitis=false&intracardiac_device_or_previous_ie=false&iv_drug_use=false&native_valve_disease=false&persistent_bacteremia=false&vertebral_osteomyelitis=false&community_or_non_nosocomial=false&severe_sepsis_or_shock=false&crp_mg_l=50","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/virsta","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/cpes","description":"Bangalore 2023 composite PE shock score for intermediate-risk PE. Six equally weighted caller-assigned flags (elevated troponin per local assay, elevated BNP, moderate or severe RV dysfunction, saddle PE, concomitant DVT, tachycardia ≥100 beats/min), 1 point each, max 6. Integer 0–6 score only; no named bands. magent does not invent biomarker cutoffs, read echo, or take raw heart rate. Not a shock diagnosis, not sPESI/Bova/PESI, not hypotensive PE, and not a medical device.","parameters":[{"in":"query","name":"elevated_troponin","type":"boolean","description":"Elevated troponin per local assay, as assigned by the caller (Bangalore 2023). true scores 1; false scores 0. Site cutoffs were not standardized; magent does not invent a numeric threshold or read the assay.","required":true,"example":"false"},{"in":"query","name":"elevated_bnp","type":"boolean","description":"Elevated BNP, as assigned by the caller (Bangalore 2023). true scores 1; false scores 0. Site cutoffs were not standardized; magent does not invent a numeric threshold or read the assay.","required":true,"example":"false"},{"in":"query","name":"moderate_or_severe_rv_dysfunction","type":"boolean","description":"Moderately or severely reduced RV function, as assigned by the caller (Bangalore 2023). Normal or mild reduction is false. true scores 1; false scores 0. magent does not read echo.","required":true,"example":"false"},{"in":"query","name":"saddle_pe","type":"boolean","description":"Saddle PE or central thrombus burden, as assigned by the caller (Bangalore 2023). true scores 1; false scores 0. magent does not read imaging.","required":true,"example":"false"},{"in":"query","name":"concomitant_dvt","type":"boolean","description":"Concomitant DVT, as assigned by the caller (Bangalore 2023). true scores 1; false scores 0. magent does not diagnose DVT.","required":true,"example":"false"},{"in":"query","name":"tachycardia","type":"boolean","description":"Tachycardia ≥100 beats/min as assigned by the caller (Bangalore 2023). true scores 1; false scores 0. magent does not take raw heart rate.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/cpes","citation":{"authors":"Bangalore S, Horowitz JM, Beam D, Jaber WA, Khandhar S, Toma C, Weinberg MD, Mina B","doi":"10.1016/j.jcin.2023.02.004","id":"bangalore-2023","pmid":"37100559","source":"JACC Cardiovasc Interv. 2023;16(8):958-972","title":"Prevalence and Predictors of Cardiogenic Shock in Intermediate-Risk Pulmonary Embolism: Insights From the FLASH Registry","url":"https://doi.org/10.1016/j.jcin.2023.02.004"},"formula_expression":"CPES = elevated_troponin + elevated_bnp + moderate_or_severe_rv_dysfunction + saddle_pe + concomitant_dvt + tachycardia; each 1 if true; max 6 (Bangalore 2023)","purpose":"Sum the six Bangalore 2023 composite PE shock flags from caller-assigned booleans and return the 0–6 integer total. No named risk bands.","markdown_url":"https://magentlab.com/docs/cpes.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"cpes"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Bangalore 2023 composite PE shock points 0-6"},{"name":"max_score","type":"integer","description":"Always 6"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Bangalore 2023 JACC Cardiovasc Interv citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"concomitant_dvt":"false","elevated_bnp":"false","elevated_troponin":"false","moderate_or_severe_rv_dysfunction":"false","saddle_pe":"false","tachycardia":"false"},{"concomitant_dvt":"false","elevated_bnp":"false","elevated_troponin":"false","moderate_or_severe_rv_dysfunction":"false","saddle_pe":"false","tachycardia":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/cpes","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/cpes?elevated_troponin=false&elevated_bnp=false&moderate_or_severe_rv_dysfunction=false&saddle_pe=false&concomitant_dvt=false&tachycardia=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/cpes","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/shapiro","description":"Shapiro 2008 blood-culture rule. Indicated if ≥1 major (temperature >39.5 °C, indwelling vascular catheter, suspected endocarditis) or ≥2 minor (temperature 38.3–39.4 °C, age >65, chills, vomiting, hypotension SBP <90, neutrophils >80%, WBC >18 k, bands >5%, platelets <150 k, creatinine >2.0 mg/dL). Not a culture order or sepsis diagnosis. magent does not examine the patient.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (integer 18-120). Age >65 is a Shapiro 2008 minor criterion; 65 is not. The published rule is for adults ≥18 years.","required":true,"example":"40"},{"in":"query","name":"temperature_c","type":"number","description":"Temperature in °C (30.0-45.0). Major when >39.5 (39.5 is not). Minor when 38.3–39.4 inclusive. magent does not measure temperature.","required":true,"example":"37.0"},{"in":"query","name":"catheter","type":"boolean","description":"Indwelling vascular catheter (Shapiro 2008 major). true or false as assigned by the caller. magent does not inspect lines.","required":true,"example":"false"},{"in":"query","name":"suspected_endocarditis","type":"boolean","description":"Clinical suspicion of endocarditis (Shapiro 2008 major). true or false as assigned by the caller. magent does not diagnose endocarditis.","required":true,"example":"false"},{"in":"query","name":"chills","type":"boolean","description":"Chills (Shapiro 2008 minor). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"false"},{"in":"query","name":"vomiting","type":"boolean","description":"Vomiting (Shapiro 2008 minor). true or false as assigned by the caller. magent does not observe vomiting.","required":true,"example":"false"},{"in":"query","name":"hypotension","type":"boolean","description":"Hypotension (Shapiro 2008 minor: systolic blood pressure < 90 mm Hg). true or false as assigned by the caller. magent does not measure blood pressure.","required":true,"example":"false"},{"in":"query","name":"neutrophil_percent","type":"number","description":"Neutrophil percent (0-100). Shapiro 2008 minor when >80 (80 does not). magent does not assay a CBC.","required":true,"example":"70"},{"in":"query","name":"wbc_k","type":"number","description":"White blood cell count in thousands (0-500; same as 10^3/µL). Shapiro 2008 minor when >18 (18 does not). magent does not assay a CBC.","required":true,"example":"10"},{"in":"query","name":"bands_percent","type":"number","description":"Band percent (0-100). Shapiro 2008 minor when >5 (5 does not). magent does not assay a CBC.","required":true,"example":"2"},{"in":"query","name":"platelets_k","type":"number","description":"Platelet count in thousands (0-2000; same as 10^3/µL). Shapiro 2008 minor when <150 (150 does not). magent does not assay a CBC.","required":true,"example":"250"},{"in":"query","name":"creatinine_mg_dl","type":"number","description":"Creatinine in mg/dL (0.1-20.0). Shapiro 2008 minor when >2.0 (2.0 does not). magent does not assay creatinine.","required":true,"example":"1.0"}],"errors":[{"code":"invalid_shapiro","message":"Shapiro-rule inputs must be the 2008 major and minor bacteremia criteria (temperature, catheter, endocarditis suspicion, age, chills, vomiting, hypotension, and listed labs). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/shapiro","citation":{"authors":"Shapiro NI, Wolfe RE, Wright SB, Moore R, Bates DW","doi":"10.1016/j.jemermed.2008.04.001","id":"shapiro-2008","pmid":"18486413","source":"J Emerg Med. 2008;35(3):255-264","title":"Who needs a blood culture? A prospectively derived and validated prediction rule","url":"https://doi.org/10.1016/j.jemermed.2008.04.001"},"formula_expression":"culture indicated if ≥1 major (temperature_c > 39.5, catheter, suspected_endocarditis) or ≥2 minor (temperature_c 38.3–39.4, age > 65, chills, vomiting, hypotension, neutrophil_percent > 80, wbc_k > 18, bands_percent > 5, platelets_k < 150, creatinine_mg_dl > 2.0) (Shapiro 2008)","purpose":"Apply the Shapiro 2008 major/minor blood-culture prediction rule and return whether culture is indicated from caller-assigned findings and labs.","markdown_url":"https://magentlab.com/docs/shapiro.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"shapiro"},{"name":"formula_expression","type":"string","description":"Shapiro 2008 rule: culture if ≥1 major or ≥2 minor"},{"name":"culture_indicated","type":"boolean","description":"true when ≥1 major criterion or ≥2 minor criteria are met (Shapiro 2008). Not a diagnosis and not a culture order."},{"name":"major_count","type":"integer","description":"Count of major criteria met (0-3)"},{"name":"minor_count","type":"integer","description":"Count of minor criteria met (0-10)"},{"name":"age","type":"integer","description":"Age used for the age >65 minor criterion"},{"name":"temperature_c","type":"number","description":"Temperature in °C used for the >39.5 major and 38.3–39.4 minor bands"},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met; temperature, age, and lab rows include value"},{"name":"citation","type":"object","description":"Shapiro 2008 J Emerg Med citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"40","bands_percent":"2","catheter":"false","chills":"false","creatinine_mg_dl":"1.0","hypotension":"false","neutrophil_percent":"70","platelets_k":"250","suspected_endocarditis":"false","temperature_c":"37.0","vomiting":"false","wbc_k":"10"},{"age":"40","bands_percent":"2","catheter":"false","chills":"false","creatinine_mg_dl":"1.0","hypotension":"false","neutrophil_percent":"70","platelets_k":"250","suspected_endocarditis":"false","temperature_c":"37.0","vomiting":"false","wbc_k":"10"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/shapiro","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/shapiro?age=40&temperature_c=37.0&catheter=false&suspected_endocarditis=false&chills=false&vomiting=false&hypotension=false&neutrophil_percent=70&wbc_k=10&bands_percent=2&platelets_k=250&creatinine_mg_dl=1.0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/shapiro","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/wound-class","description":"CDC/HICPAC surgical wound classification Class I-IV as assigned by the caller (Mangram 1999 Table 7). Returns wound_class, class_label (e.g. I/Clean), and the published Table 7 description. magent does not inspect the wound. Not SSI percentage rates (not in Table 7). Not a diagnosis of infection. Not antimicrobial prophylaxis selection. Not a medical device.","parameters":[{"in":"query","name":"wound_class","type":"integer","description":"CDC/HICPAC surgical wound class 1-4 as assigned by the caller (Mangram 1999 Table 7: 1 Class I/Clean, uninfected operative wound, no inflammation, respiratory/alimentary/genital/uninfected urinary tract not entered; 2 Class II/Clean-Contaminated, those tracts entered under controlled conditions without unusual contamination; 3 Class III/Contaminated, open fresh accidental wounds, major break in technique, GI spillage, or acute nonpurulent inflammation; 4 Class IV/Dirty-Infected, old traumatic wounds with retained devitalized tissue, existing clinical infection, or perforated viscera). Integer 1-4 only; reject 0, 5, 1.5, and roman I. magent does not inspect the wound. Not SSI rates. Not AMP selection.","required":true,"example":"1"}],"errors":[{"code":"invalid_wound_class","message":"wound_class must be 1, 2, 3, or 4 (Mangram 1999 CDC/HICPAC Table 7 Class I-IV). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/wound-class","citation":{"authors":"Mangram AJ, Horan TC, Pearson ML, Silver LC, Jarvis WR, Hospital Infection Control Practices Advisory Committee","doi":"10.1086/501620","id":"mangram-1999","pmid":"10219875","source":"Infect Control Hosp Epidemiol. 1999;20(4):250-278","title":"Guideline for prevention of surgical site infection, 1999","url":"https://doi.org/10.1086/501620"},"formula_expression":"wound_class in {1, 2, 3, 4} as assigned by the caller (Mangram 1999 CDC/HICPAC Table 7 Class I-IV). magent does not inspect the wound. Not SSI rates. Not AMP selection.","purpose":"Return the caller-assigned CDC/HICPAC surgical wound class 1-4 with the published class label and Table 7 description (Mangram 1999). magent does not inspect the wound. Not SSI rates. Not AMP selection.","markdown_url":"https://magentlab.com/docs/wound-class.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"wound_class"},{"name":"formula_expression","type":"string","description":"Published Mangram 1999 Table 7 class rule"},{"name":"wound_class","type":"integer","description":"Caller-assigned CDC/HICPAC class 1-4"},{"name":"class_label","type":"string","description":"Roman class plus name (e.g. I/Clean)"},{"name":"description","type":"string","description":"Mangram 1999 Table 7 wording for that class"},{"name":"components","type":"array","description":"Per-class Tree rows class_i_clean, class_ii_clean_contaminated, class_iii_contaminated, class_iv_dirty with factor and met; exactly one is met"},{"name":"citation","type":"object","description":"Mangram 1999 Infect Control Hosp Epidemiol citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"wound_class":"1"},{"wound_class":"1"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/wound-class","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/wound-class?wound_class=1","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/wound-class","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/vacs-1","description":"Tate 2013 VACS Index 1.0 (not VACS 2.0): age, CD4, HIV-1 RNA, hemoglobin g/dL, caller-assigned FIB-4 and eGFR, and hepatitis C. Points 0-164. No published named mortality bands. magent does not compute FIB-4 or MDRD/CKD-EPI and does not order ART.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (integer 18-120). Tate 2013 VACS Index: <50 scores 0; 50-64 scores 12; ≥65 scores 27.","required":true,"example":"40"},{"in":"query","name":"cd4_cells_mm3","type":"integer","description":"CD4 count in cells/mm³ (integer 1-2000). Tate 2013: ≥500 scores 0; 350-499 scores 6; 200-349 scores 6; 100-199 scores 10; 50-99 scores 28; <50 scores 29. magent does not assay CD4.","required":true,"example":"600"},{"in":"query","name":"hiv_rna_copies_ml","type":"number","description":"HIV-1 RNA in copies/mL (0-10000000). Tate 2013: <500 scores 0; 500-99999 scores 7; ≥100000 scores 14. magent does not assay viral load.","required":true,"example":"200"},{"in":"query","name":"hemoglobin_g_dl","type":"number","description":"Hemoglobin in g/dL (3-22). Tate 2013: ≥14 scores 0; 12-13.9 scores 10; 10-11.9 scores 22; <10 scores 38. magent does not assay hemoglobin.","required":true,"example":"15"},{"in":"query","name":"fib4","type":"number","description":"Caller-assigned FIB-4 (0.1-20). Tate 2013: <1.45 scores 0; 1.45-3.25 scores 6; >3.25 scores 25. magent does not recompute FIB-4.","required":true,"example":"1.0"},{"in":"query","name":"egfr_ml_min_1_73m2","type":"number","description":"Caller-assigned eGFR in mL/min/1.73m² (5-200). Tate 2013: ≥60 scores 0; 45-59.9 scores 6; 30-44.9 scores 8; <30 scores 26. magent does not compute MDRD or CKD-EPI.","required":true,"example":"90"},{"in":"query","name":"hepatitis_c","type":"boolean","description":"Caller-assigned hepatitis C co-infection (Tate 2013). true scores 5. magent does not diagnose hepatitis C.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_cd4","message":"cd4_cells_mm3 must be an integer from 1 to 2000 (Tate 2013 VACS 1.0 CD4 count). Returned before settlement; you are not charged.","status":400},{"code":"invalid_hiv_rna","message":"hiv_rna_copies_ml must be a number from 0 to 10000000 (Tate 2013 VACS 1.0 HIV-1 RNA copies/mL). Returned before settlement; you are not charged.","status":400},{"code":"invalid_hemoglobin","message":"hemoglobin_g_l (30-220) or hemoglobin_g_dl (3-22) is required, not both. Returned before settlement; you are not charged.","status":400},{"code":"invalid_fib4","message":"fib4 must be a number from 0.1 to 20 (Tate 2013 VACS 1.0 caller-assigned FIB-4; magent does not recompute FIB-4). Returned before settlement; you are not charged.","status":400},{"code":"invalid_egfr","message":"egfr_ml_min_1_73m2 must be a number from 5 to 200 (caller-assigned eGFR; magent does not compute MDRD or CKD-EPI). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/vacs-1","citation":{"authors":"Tate JP, Justice AC, Hughes MD, Bonnet F, Reiss P, Mocroft A, et al.","doi":"10.1097/QAD.0b013e32835b8c7f","id":"tate-2013","pmid":"23095314","source":"AIDS. 2013;27(4):563-572","title":"An internationally generalizable risk index for mortality after one year of antiretroviral therapy","url":"https://doi.org/10.1097/QAD.0b013e32835b8c7f"},"formula_expression":"VACS 1.0 = age (<50 0; 50-64 12; ≥65 27) + cd4_cells_mm3 (≥500 0; 350-499 6; 200-349 6; 100-199 10; 50-99 28; <50 29) + hiv_rna_copies_ml (<500 0; 500-99999 7; ≥100000 14) + hemoglobin_g_dl (≥14 0; 12-13.9 10; 10-11.9 22; <10 38) + fib4 (<1.45 0; 1.45-3.25 6; >3.25 25) + egfr_ml_min_1_73m2 (≥60 0; 45-59.9 6; 30-44.9 8; <30 26) + hepatitis_c 5; Tate 2013 VACS Index column (Brown 2014 Table 1 reprint); max 164; caller-assigned FIB-4 and eGFR; not VACS 2.0","purpose":"Sum the Tate 2013 VACS Index 1.0 points after one year of antiretroviral therapy from age, CD4, HIV-1 RNA, hemoglobin, caller-assigned FIB-4 and eGFR, and hepatitis C.","markdown_url":"https://magentlab.com/docs/vacs-1.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"vacs_1"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Tate 2013 VACS Index 1.0 points 0-164"},{"name":"max_score","type":"integer","description":"164"},{"name":"age","type":"integer","description":"Age in years used for Tate 2013 age bands"},{"name":"cd4_cells_mm3","type":"integer","description":"CD4 cells/mm³ used for Tate 2013 CD4 bands"},{"name":"hiv_rna_copies_ml","type":"number","description":"HIV-1 RNA copies/mL used for Tate 2013 viral-load bands"},{"name":"hemoglobin_g_dl","type":"number","description":"Hemoglobin g/dL used for Tate 2013 hemoglobin bands"},{"name":"fib4","type":"number","description":"Caller-assigned FIB-4 used for Tate 2013 FIB-4 bands"},{"name":"egfr_ml_min_1_73m2","type":"number","description":"Caller-assigned eGFR used for Tate 2013 eGFR bands"},{"name":"hepatitis_c","type":"boolean","description":"Caller-assigned hepatitis C co-infection flag"},{"name":"components","type":"array","description":"Per-factor Tate 2013 points"},{"name":"citation","type":"object","description":"Tate et al. AIDS 2013 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"40","cd4_cells_mm3":"600","egfr_ml_min_1_73m2":"90","fib4":"1.0","hemoglobin_g_dl":"15","hepatitis_c":"false","hiv_rna_copies_ml":"200"},{"age":"40","cd4_cells_mm3":"600","egfr_ml_min_1_73m2":"90","fib4":"1.0","hemoglobin_g_dl":"15","hepatitis_c":"false","hiv_rna_copies_ml":"200"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/vacs-1","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/vacs-1?age=40&cd4_cells_mm3=600&hiv_rna_copies_ml=200&hemoglobin_g_dl=15&fib4=1.0&egfr_ml_min_1_73m2=90&hepatitis_c=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/vacs-1","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/vacs-2","description":"Tate 2019 VACS Index 2.0 (not 1.0): age, CD4, HIV-1 RNA, hemoglobin, caller-assigned FIB-4 and eGFR, hepatitis C, albumin, WBC, and BMI. Appendix Table 1 polynomials. Score scaled so the median profile is 44. Not a 5-year percent (no published S0). magent does not compute FIB-4 or eGFR and does not assign HIV status.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (integer 18-120). Tate 2019 Appendix Table 1 censors age at 30-75 and uses the cubic polynomial of (age-50)/5. magent does not assign age.","required":true,"example":40},{"in":"query","name":"cd4_cells_mm3","type":"integer","description":"CD4 count in cells/mm³ (integer 1-2000). Appendix Table 1 censors at 0-1000 and uses ln(max(1000-CD4, 1)). magent does not assay CD4.","required":true,"example":600},{"in":"query","name":"hiv_rna_copies_ml","type":"number","description":"HIV-1 RNA in copies/mL (0-10000000). Appendix Table 1 uses log10 copies censored at 1.3-5.0 and centered at (logVL-2). magent does not assay viral load.","required":true,"example":50},{"in":"query","name":"hemoglobin_g_dl","type":"number","description":"Hemoglobin in g/dL (3-22). Appendix Table 1 censors at 9-16 and centers at (hemoglobin-14). magent does not assay hemoglobin.","required":true,"example":15},{"in":"query","name":"fib4","type":"number","description":"Caller-assigned FIB-4 (0.1-20). Appendix Table 1 censors at 0.5-7.5. magent does not recompute FIB-4.","required":true,"example":1.0},{"in":"query","name":"egfr_ml_min_1_73m2","type":"number","description":"Caller-assigned eGFR in mL/min/1.73m² (0-200). Appendix Table 1 censors at 0-180 and uses the footnote truncated linear terms at 35, 65, and 115. magent does not compute MDRD or CKD-EPI. Race is not an input.","required":true,"example":100},{"in":"query","name":"hepatitis_c","type":"boolean","description":"Caller-assigned hepatitis C co-infection (Tate 2019). true adds 0.342 to the linear predictor. magent does not diagnose hepatitis C.","required":true,"example":false},{"in":"query","name":"albumin_g_dl","type":"number","description":"Serum albumin in g/dL (1-6.5). Appendix Table 1 censors at 2-5 and centers at (albumin-4). magent does not assay albumin.","required":true,"example":4.2},{"in":"query","name":"wbc_10e9_l","type":"number","description":"White blood count in 10^9/L (0.5-50), equal to k/µL. Appendix Table 1 censors at 2.5-11 and centers at (WBC-5.5). magent does not assay WBC.","required":true,"example":6.0},{"in":"query","name":"bmi_kg_m2","type":"number","description":"Body mass index in kg/m² (10-60). Appendix Table 1 censors at 15-35 and centers at (BMI-25). magent does not compute BMI from height and weight.","required":true,"example":26}],"errors":[{"code":"invalid_vacs_2","message":"VACS Index 2.0 inputs must match Tate 2019 age, CD4, HIV-1 RNA, hemoglobin, caller-assigned FIB-4 and eGFR, HCV, albumin, WBC, and BMI. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/vacs-2","citation":{"authors":"Tate JP, Sterne JAC, Justice AC; Veterans Aging Cohort Study (VACS) and the Antiretroviral Therapy Cohort Collaboration (ART-CC)","doi":"10.1097/QAD.0000000000002140","id":"tate-2019-vacs-2","pmid":"30649058","source":"AIDS. 2019;33(5):903-912","title":"Albumin, white blood cell count, and body mass index improve discrimination of mortality in HIV-positive individuals","url":"https://doi.org/10.1097/QAD.0000000000002140"},"formula_expression":"lp = age_poly + cd4_poly + rna_poly + hb_poly + fib4_poly + egfr_spline + hcv + alb_poly + wbc_poly + bmi_poly; score = round(44 + 20*(lp - lp_median)); lp_median is Appendix Table 2 median profile (age 52, CD4 435, log10 HIV-1 RNA 1.7, Hb 14, FIB-4 1.34, eGFR 90, HCV no, albumin 4, WBC 5.5, BMI 25.3); age censored 30-75, X=(age-50)/5, PE 0.056/-0.004/0.005; CD4 censored 0-1000 as ln(max(1000-CD4, 1)), PE -0.056/-0.153/0.024; HIV-1 RNA log10 copies censored 1.3-5.0, centered (logVL-2), PE 0.513/-0.422/0.098; hemoglobin censored 9-16, centered (hemoglobin-14), PE -0.134/0.026/0.005; FIB-4 censored 0.5-7.5, PE 0.220/-0.009; eGFR censored 0-180, X1=eGFR/10, X2=max(eGFR-35,0)/10, X3=max(eGFR-65,0)/10, X4=max(eGFR-115,0)/10, PE -0.031/-0.077/0.106/0.133; HCV yes 0.342; albumin censored 2-5, centered (albumin-4), PE -0.443/0.104/0.028; WBC 10^9/L censored 2.5-11, centered (WBC-5.5), PE 0.126/0.020/-0.004; BMI censored 15-35, centered (BMI-25), PE -0.055/0.004; Tate 2019 Appendix Table 1 main analysis LVCF 180 days; caller-assigned FIB-4 and eGFR; not VACS 1.0; no published S0","purpose":"Compute the Tate 2019 VACS Index 2.0 score for 5-year all-cause mortality from age, CD4, HIV-1 RNA, hemoglobin, caller-assigned FIB-4 and eGFR, hepatitis C, albumin, WBC, and BMI using Appendix Table 1 coefficients.","markdown_url":"https://magentlab.com/docs/vacs-2.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"vacs_2"},{"name":"formula_expression","type":"string","description":"Tate 2019 Appendix Table 1 linear predictor and Table 2 score conversion"},{"name":"score","type":"integer","description":"VACS Index 2.0 score; 44 at the Appendix Table 2 median profile, scale 20 × (lp - lp_median)"},{"name":"linear_predictor","type":"number","description":"Unrounded Appendix Table 1 Cox linear predictor, 6 decimals"},{"name":"age","type":"integer","description":"Input age in years"},{"name":"cd4_cells_mm3","type":"integer","description":"Input CD4 cells/mm³"},{"name":"hiv_rna_copies_ml","type":"number","description":"Input HIV-1 RNA copies/mL"},{"name":"hemoglobin_g_dl","type":"number","description":"Input hemoglobin g/dL"},{"name":"fib4","type":"number","description":"Caller-assigned FIB-4"},{"name":"egfr_ml_min_1_73m2","type":"number","description":"Caller-assigned eGFR mL/min/1.73m²"},{"name":"hepatitis_c","type":"boolean","description":"Caller-assigned hepatitis C flag"},{"name":"albumin_g_dl","type":"number","description":"Input albumin g/dL"},{"name":"wbc_10e9_l","type":"number","description":"Input WBC 10^9/L"},{"name":"bmi_kg_m2","type":"number","description":"Input BMI kg/m²"},{"name":"citation","type":"object","description":"Tate et al. AIDS 2019 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"40","albumin_g_dl":"4.2","bmi_kg_m2":"26","cd4_cells_mm3":"600","egfr_ml_min_1_73m2":"100","fib4":"1.0","hemoglobin_g_dl":"15","hepatitis_c":"false","hiv_rna_copies_ml":"50","wbc_10e9_l":"6.0"},{"age":"40","albumin_g_dl":"4.2","bmi_kg_m2":"26","cd4_cells_mm3":"600","egfr_ml_min_1_73m2":"100","fib4":"1.0","hemoglobin_g_dl":"15","hepatitis_c":"false","hiv_rna_copies_ml":"50","wbc_10e9_l":"6.0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/vacs-2","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/vacs-2?age=40&cd4_cells_mm3=600&hiv_rna_copies_ml=50&hemoglobin_g_dl=15&fib4=1.0&egfr_ml_min_1_73m2=100&hepatitis_c=false&albumin_g_dl=4.2&wbc_10e9_l=6.0&bmi_kg_m2=26","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/vacs-2","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/vacs-cci","description":"McGinnis 2024 VACS-CCI Table 2 Model 7 linear predictor from sex, age, hemoglobin, FIB-4, eGFR, albumin, WBC, BMI, hepatitis C, and caller-assigned Charlson groupings. CCI group is those weights (0/1/2/3+) times age band. The 0-100 score needs unpublished development min/max Xbeta; magent does not invent it. Paper prints score 30 to 1/3/8/18% and 45 to 6/14/35/61% at 1/2/5/10 years. Not a diagnosis or individual prognosis. magent does not code the chart.","parameters":[{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"Caller-assigned sex (female or male). Female vs male adds -0.513 to the Table 2 linear predictor. magent does not assign sex.","required":true,"example":"male"},{"in":"query","name":"age","type":"integer","description":"Age in years (integer 18-120). Table 2 uses the cubic polynomial of (age-50) and CCI x age-band interaction (<50, 50-64, 65-79, 80+). magent does not assign age.","required":true,"example":55},{"in":"query","name":"hemoglobin_g_dl","type":"number","description":"Hemoglobin in g/dL (3-22). Table 2 centers at (hemoglobin-14). magent does not assay hemoglobin.","required":true,"example":14},{"in":"query","name":"fib4","type":"number","description":"Caller-assigned FIB-4 (0.1-20). Table 2 uses X and X2 of FIB-4. magent does not recompute FIB-4.","required":true,"example":1.0},{"in":"query","name":"egfr_ml_min_1_73m2","type":"number","description":"Caller-assigned eGFR in mL/min/1.73m² (0-200). Table 2 centers at (egfr-90). magent does not compute CKD-EPI.","required":true,"example":90},{"in":"query","name":"albumin_g_dl","type":"number","description":"Serum albumin in g/dL (1-6.5). Table 2 centers at (albumin-4). magent does not assay albumin.","required":true,"example":4},{"in":"query","name":"wbc_10e9_l","type":"number","description":"White blood count in 10^9/L (0.5-50), equal to k/µL. Table 2 centers at (WBC-4). magent does not assay WBC.","required":true,"example":4},{"in":"query","name":"bmi_kg_m2","type":"number","description":"Body mass index in kg/m² (10-60). Table 2 centers at (BMI-25). magent does not compute BMI from height and weight.","required":true,"example":25},{"in":"query","name":"hepatitis_c","type":"boolean","description":"Caller-assigned hepatitis C (McGinnis 2024). true adds 0.273 to the linear predictor. magent does not diagnose hepatitis C.","required":true,"example":false},{"in":"query","name":"myocardial_infarction","type":"boolean","description":"Caller-assigned myocardial infarction (McGinnis 2024 Table 2). true adds 0.008 to lp and 1 to the CCI grouping. magent does not diagnose infarction.","required":true,"example":false},{"in":"query","name":"congestive_heart_failure","type":"boolean","description":"Caller-assigned congestive heart failure (McGinnis 2024 Table 2). true adds 0.420 to lp and 1 to the CCI grouping. magent does not diagnose heart failure.","required":true,"example":false},{"in":"query","name":"peripheral_vascular_disease","type":"boolean","description":"Caller-assigned peripheral vascular disease (McGinnis 2024 Table 2). true adds 0.141 to lp and 1 to the CCI grouping. magent does not diagnose vascular disease.","required":true,"example":false},{"in":"query","name":"cerebrovascular_disease","type":"boolean","description":"Caller-assigned cerebrovascular disease (McGinnis 2024 Table 2). true adds 0.114 to lp and 1 to the CCI grouping. magent does not diagnose stroke.","required":true,"example":false},{"in":"query","name":"dementia","type":"boolean","description":"Caller-assigned dementia (McGinnis 2024 Table 2). true adds 0.489 to lp and 1 to the CCI grouping. magent does not diagnose dementia.","required":true,"example":false},{"in":"query","name":"chronic_pulmonary_disease","type":"boolean","description":"Caller-assigned chronic pulmonary disease (McGinnis 2024 Table 2). true adds 0.279 to lp and 1 to the CCI grouping. magent does not diagnose lung disease.","required":true,"example":false},{"in":"query","name":"rheumatic_disease","type":"boolean","description":"Caller-assigned rheumatic disease (McGinnis 2024 Table 2). true adds -0.034 to lp and 1 to the CCI grouping. magent does not diagnose rheumatic disease.","required":true,"example":false},{"in":"query","name":"peptic_ulcer_disease","type":"boolean","description":"Caller-assigned peptic ulcer disease (McGinnis 2024 Table 2). true adds -0.074 to lp and 1 to the CCI grouping. magent does not diagnose ulcer disease.","required":true,"example":false},{"in":"query","name":"diabetes_without_complications","type":"boolean","description":"Caller-assigned diabetes without chronic complications (McGinnis 2024 Table 2). true adds 0.053 to lp and 1 to the CCI grouping. magent does not diagnose diabetes.","required":true,"example":false},{"in":"query","name":"diabetes_with_complications","type":"boolean","description":"Caller-assigned diabetes with chronic complications (McGinnis 2024 Table 2). true adds 0.075 to lp and 2 to the CCI grouping. magent does not diagnose diabetes.","required":true,"example":false},{"in":"query","name":"hemiplegia_or_paraplegia","type":"boolean","description":"Caller-assigned hemiplegia or paraplegia (McGinnis 2024 Table 2). true adds -0.049 to lp and 2 to the CCI grouping. magent does not diagnose paralysis.","required":true,"example":false},{"in":"query","name":"kidney_mild_to_moderate","type":"boolean","description":"Caller-assigned mild-to-moderate kidney disease (McGinnis 2024 Table 2). true adds -0.199 to lp and 2 to the CCI grouping. magent does not grade kidney disease.","required":true,"example":false},{"in":"query","name":"kidney_severe","type":"boolean","description":"Caller-assigned severe kidney disease (McGinnis 2024 Table 2). true adds -0.098 to lp and 2 to the CCI grouping. magent does not grade kidney disease.","required":true,"example":false},{"in":"query","name":"any_malignancy","type":"boolean","description":"Caller-assigned any malignancy (McGinnis 2024 Table 2). true adds 0.090 to lp and 2 to the CCI grouping. magent does not diagnose cancer.","required":true,"example":false},{"in":"query","name":"metastatic_solid_tumor","type":"boolean","description":"Caller-assigned metastatic solid tumor (McGinnis 2024 Table 2). true adds 1.184 to lp and 6 to the CCI grouping. magent does not diagnose cancer.","required":true,"example":false},{"in":"query","name":"liver_mild","type":"boolean","description":"Caller-assigned mild liver disease (McGinnis 2024 Table 2). true adds -0.045 to lp and 1 to the CCI grouping. magent does not grade liver disease.","required":true,"example":false},{"in":"query","name":"liver_moderate_to_severe","type":"boolean","description":"Caller-assigned moderate-to-severe liver disease (McGinnis 2024 Table 2). true adds 0.226 to lp and 3 to the CCI grouping. magent does not grade liver disease.","required":true,"example":false}],"errors":[{"code":"invalid_vacs_cci","message":"VACS-CCI inputs must match McGinnis 2024 age, sex, VACS Index 2.0 biomarkers, hepatitis C, and Charlson comorbidity groupings. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/vacs-cci","citation":{"authors":"McGinnis KA, Justice AC, Marconi VC, et al.","doi":"10.3389/fmed.2023.1342466","id":"mcginnis-2024-vacs-cci","pmid":"38356736","source":"Front Med (Lausanne). 2024;10:1342466","title":"Combining Charlson comorbidity and VACS indices improves prognostic accuracy for all-cause mortality for patients with and without HIV in the Veterans Health Administration","url":"https://doi.org/10.3389/fmed.2023.1342466"},"formula_expression":"lp = sex_female -0.513 + age_poly(X=age-50, 0.278/0.006/-0.001) + hb_poly(X=hemoglobin-14, -0.115/0.024/0.004) + fib4_poly(X, 0.205/-0.006) + egfr_poly(X=egfr-90, 0.071/0.036/0.002) + alb_poly(X=albumin-4, -0.405/0.326/0.156) + wbc_poly(X=WBC-4, -0.011/0.053/-0.008/0.000) + bmi_poly(X=BMI-25, -0.061/0.005/0.000) + hepatitis_c 0.273 + Table 2 Charlson condition coefficients + CCI-group x age-band interaction (CCI 0/1/2/3+ by <50, 50-64, 65-79, 80+; CCI 1 x 50-64 is reference 0); cci_group from caller-assigned condition weights (MI 1, CHF 1, PVD 1, CVD 1, dementia 1, pulmonary 1, rheumatic 1, PUD 1, DM without 1, DM with 2, hemiplegia 2, kidney mild-to-moderate 2, kidney severe 2, any malignancy 2, metastatic 6, liver mild 1, liver moderate-to-severe 3); McGinnis 2024 Table 2 Model 7; 1st/99th percentile winsorizing not published; 0-100 score uses unpublished development min/max Xbeta so magent does not scale; paper prints 0-100 score 30 → 1-year 1%, 2-year 3%, 5-year 8%, 10-year 18% and score 45 → 6%, 14%, 35%, 61%; no published S0; 2025 corrigendum PMID 39845833 does not change Table 2 coefficients; caller-assigned comorbidities, FIB-4, and eGFR","purpose":"Compute the McGinnis 2024 Table 2 Model 7 VACS-CCI Cox linear predictor from caller-assigned sex, age, VACS Index 2.0 biomarkers (hemoglobin, FIB-4, eGFR, albumin, WBC, BMI), hepatitis C, and Charlson comorbidity groupings. CD4 and HIV-1 RNA are not inputs.","markdown_url":"https://magentlab.com/docs/vacs-cci.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"vacs_cci"},{"name":"formula_expression","type":"string","description":"McGinnis 2024 Table 2 Model 7 linear predictor"},{"name":"linear_predictor","type":"number","description":"Unrounded Table 2 Model 7 Cox linear predictor, 6 decimals"},{"name":"sex","type":"string","description":"female or male"},{"name":"age","type":"integer","description":"Input age in years"},{"name":"age_band","type":"string","description":"Table 2 CCI interaction band: lt_50, 50_64, 65_79, or 80_plus"},{"name":"hemoglobin_g_dl","type":"number","description":"Input hemoglobin g/dL"},{"name":"fib4","type":"number","description":"Caller-assigned FIB-4"},{"name":"egfr_ml_min_1_73m2","type":"number","description":"Caller-assigned eGFR mL/min/1.73m²"},{"name":"albumin_g_dl","type":"number","description":"Input albumin g/dL"},{"name":"wbc_10e9_l","type":"number","description":"Input WBC 10^9/L"},{"name":"bmi_kg_m2","type":"number","description":"Input BMI kg/m²"},{"name":"hepatitis_c","type":"boolean","description":"Caller-assigned hepatitis C flag"},{"name":"cci_score","type":"integer","description":"Sum of Table 2 Charlson condition weights from caller-assigned flags"},{"name":"cci_group","type":"string","description":"CCI grouping used in the age interaction: 0, 1, 2, or 3plus"},{"name":"citation","type":"object","description":"McGinnis et al. Front Med 2024 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"},{"name":"myocardial_infarction","type":"boolean","description":"Caller-assigned myocardial infarction (McGinnis 2024 Table 2). true adds 0.008 to lp and 1 to the CCI grouping. magent does not diagnose infarction."},{"name":"congestive_heart_failure","type":"boolean","description":"Caller-assigned congestive heart failure (McGinnis 2024 Table 2). true adds 0.420 to lp and 1 to the CCI grouping. magent does not diagnose heart failure."},{"name":"peripheral_vascular_disease","type":"boolean","description":"Caller-assigned peripheral vascular disease (McGinnis 2024 Table 2). true adds 0.141 to lp and 1 to the CCI grouping. magent does not diagnose vascular disease."},{"name":"cerebrovascular_disease","type":"boolean","description":"Caller-assigned cerebrovascular disease (McGinnis 2024 Table 2). true adds 0.114 to lp and 1 to the CCI grouping. magent does not diagnose stroke."},{"name":"dementia","type":"boolean","description":"Caller-assigned dementia (McGinnis 2024 Table 2). true adds 0.489 to lp and 1 to the CCI grouping. magent does not diagnose dementia."},{"name":"chronic_pulmonary_disease","type":"boolean","description":"Caller-assigned chronic pulmonary disease (McGinnis 2024 Table 2). true adds 0.279 to lp and 1 to the CCI grouping. magent does not diagnose lung disease."},{"name":"rheumatic_disease","type":"boolean","description":"Caller-assigned rheumatic disease (McGinnis 2024 Table 2). true adds -0.034 to lp and 1 to the CCI grouping. magent does not diagnose rheumatic disease."},{"name":"peptic_ulcer_disease","type":"boolean","description":"Caller-assigned peptic ulcer disease (McGinnis 2024 Table 2). true adds -0.074 to lp and 1 to the CCI grouping. magent does not diagnose ulcer disease."},{"name":"diabetes_without_complications","type":"boolean","description":"Caller-assigned diabetes without chronic complications (McGinnis 2024 Table 2). true adds 0.053 to lp and 1 to the CCI grouping. magent does not diagnose diabetes."},{"name":"diabetes_with_complications","type":"boolean","description":"Caller-assigned diabetes with chronic complications (McGinnis 2024 Table 2). true adds 0.075 to lp and 2 to the CCI grouping. magent does not diagnose diabetes."},{"name":"hemiplegia_or_paraplegia","type":"boolean","description":"Caller-assigned hemiplegia or paraplegia (McGinnis 2024 Table 2). true adds -0.049 to lp and 2 to the CCI grouping. magent does not diagnose paralysis."},{"name":"kidney_mild_to_moderate","type":"boolean","description":"Caller-assigned mild-to-moderate kidney disease (McGinnis 2024 Table 2). true adds -0.199 to lp and 2 to the CCI grouping. magent does not grade kidney disease."},{"name":"kidney_severe","type":"boolean","description":"Caller-assigned severe kidney disease (McGinnis 2024 Table 2). true adds -0.098 to lp and 2 to the CCI grouping. magent does not grade kidney disease."},{"name":"any_malignancy","type":"boolean","description":"Caller-assigned any malignancy (McGinnis 2024 Table 2). true adds 0.090 to lp and 2 to the CCI grouping. magent does not diagnose cancer."},{"name":"metastatic_solid_tumor","type":"boolean","description":"Caller-assigned metastatic solid tumor (McGinnis 2024 Table 2). true adds 1.184 to lp and 6 to the CCI grouping. magent does not diagnose cancer."},{"name":"liver_mild","type":"boolean","description":"Caller-assigned mild liver disease (McGinnis 2024 Table 2). true adds -0.045 to lp and 1 to the CCI grouping. magent does not grade liver disease."},{"name":"liver_moderate_to_severe","type":"boolean","description":"Caller-assigned moderate-to-severe liver disease (McGinnis 2024 Table 2). true adds 0.226 to lp and 3 to the CCI grouping. magent does not grade liver disease."}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"55","albumin_g_dl":"4","any_malignancy":"false","bmi_kg_m2":"25","cerebrovascular_disease":"false","chronic_pulmonary_disease":"false","congestive_heart_failure":"false","dementia":"false","diabetes_with_complications":"false","diabetes_without_complications":"false","egfr_ml_min_1_73m2":"90","fib4":"1.0","hemiplegia_or_paraplegia":"false","hemoglobin_g_dl":"14","hepatitis_c":"false","kidney_mild_to_moderate":"false","kidney_severe":"false","liver_mild":"false","liver_moderate_to_severe":"false","metastatic_solid_tumor":"false","myocardial_infarction":"false","peptic_ulcer_disease":"false","peripheral_vascular_disease":"false","rheumatic_disease":"false","sex":"male","wbc_10e9_l":"4"},{"age":"55","albumin_g_dl":"4","any_malignancy":"false","bmi_kg_m2":"25","cerebrovascular_disease":"false","chronic_pulmonary_disease":"false","congestive_heart_failure":"false","dementia":"false","diabetes_with_complications":"false","diabetes_without_complications":"false","egfr_ml_min_1_73m2":"90","fib4":"1.0","hemiplegia_or_paraplegia":"false","hemoglobin_g_dl":"14","hepatitis_c":"false","kidney_mild_to_moderate":"false","kidney_severe":"false","liver_mild":"false","liver_moderate_to_severe":"false","metastatic_solid_tumor":"false","myocardial_infarction":"false","peptic_ulcer_disease":"false","peripheral_vascular_disease":"false","rheumatic_disease":"false","sex":"male","wbc_10e9_l":"4"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/vacs-cci","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/vacs-cci?sex=male&age=55&hemoglobin_g_dl=14&fib4=1.0&egfr_ml_min_1_73m2=90&albumin_g_dl=4&wbc_10e9_l=4&bmi_kg_m2=25&hepatitis_c=false&myocardial_infarction=false&congestive_heart_failure=false&peripheral_vascular_disease=false&cerebrovascular_disease=false&dementia=false&chronic_pulmonary_disease=false&rheumatic_disease=false&peptic_ulcer_disease=false&diabetes_without_complications=false&diabetes_with_complications=false&hemiplegia_or_paraplegia=false&kidney_mild_to_moderate=false&kidney_severe=false&any_malignancy=false&metastatic_solid_tumor=false&liver_mild=false&liver_moderate_to_severe=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/vacs-cci","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/menza","description":"Menza 2009 HIV-acquisition score for MSM. Four caller-assigned flags: meth or poppers in the prior 6 months (11), current or prior bacterial STI (4), ≥10 male partners in the prior year (3), unprotected anal intercourse with a positive- or unknown-status partner in the prior year (1). Max 19. Integer score only; no named strata or PrEP cutoff. Not a diagnosis, PrEP order, or test-and-treat protocol. Not HIRI-MSM or SexPro. magent does not take a sexual history.","parameters":[{"in":"query","name":"meth_or_poppers_6mo","type":"boolean","description":"Methamphetamine or inhaled nitrites (poppers) in the prior 6 months as assigned by the caller (Menza 2009). true scores 11. magent does not take a sexual history.","required":true,"example":"false"},{"in":"query","name":"bacterial_sti","type":"boolean","description":"Current diagnosis or history of bacterial STI (Menza 2009: gonorrhea, chlamydia, or syphilis) as assigned by the caller. true scores 4. magent does not take a sexual history.","required":true,"example":"false"},{"in":"query","name":"partners_ge_10_year","type":"boolean","description":"Ten or more male sex partners in the prior year as assigned by the caller (Menza 2009). true scores 3. magent does not take a sexual history.","required":true,"example":"false"},{"in":"query","name":"uai_positive_or_unknown_year","type":"boolean","description":"Unprotected anal intercourse with a partner of positive or unknown HIV status in the prior year as assigned by the caller (Menza 2009). true scores 1. magent does not take a sexual history.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/menza","citation":{"authors":"Menza TW, Hughes JP, Celum CL, Golden MR","doi":"10.1097/OLQ.0b013e3181a9cc41","id":"menza-2009","pmid":"19707108","source":"Sex Transm Dis. 2009;36(9):547-555","title":"Prediction of HIV acquisition among men who have sex with men","url":"https://doi.org/10.1097/OLQ.0b013e3181a9cc41"},"formula_expression":"Menza = meth_or_poppers_6mo (true 11) + bacterial_sti (true 4) + partners_ge_10_year (true 3) + uai_positive_or_unknown_year (true 1); Menza 2009; max 19","purpose":"Sum the four Menza 2009 caller-assigned flags and return the 0–19 point total.","markdown_url":"https://magentlab.com/docs/menza.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"menza"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Menza 2009 points 0-19"},{"name":"max_score","type":"integer","description":"19"},{"name":"components","type":"array","description":"Per-flag points"},{"name":"citation","type":"object","description":"Menza et al. Sex Transm Dis 2009 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"bacterial_sti":"false","meth_or_poppers_6mo":"false","partners_ge_10_year":"false","uai_positive_or_unknown_year":"false"},{"bacterial_sti":"false","meth_or_poppers_6mo":"false","partners_ge_10_year":"false","uai_positive_or_unknown_year":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/menza","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/menza?meth_or_poppers_6mo=false&bacterial_sti=false&partners_ge_10_year=false&uai_positive_or_unknown_year=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/menza","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/hiri-msm","description":"Smith 2012 seven-item HIV incidence risk index for MSM. Age 18-28=8, 29-40=5, 41-48=2, >=49=0; male partners 0-5=0, 6-10=4, >=11=7; HIV-positive partners 0=0, 1=4, >=2=8; unprotected receptive anal 0=0, >=1=10; insertive anal with HIV-positive partner 0-4=0, >=5=6; poppers 3; amphetamines 5. Range 0-47; at_or_above_10 when score >=10. Caller-assigned. Not a diagnosis or PrEP order.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Smith 2012: 18-28 scores 8; 29-40 scores 5; 41-48 scores 2; ≥49 scores 0. Caller-assigned. magent does not take a sexual history.","required":true,"example":"55"},{"in":"query","name":"male_sex_partners_6mo","type":"integer","description":"Caller-assigned number of male sex partners in the prior 6 months (0-500). Smith 2012: 0-5 scores 0; 6-10 scores 4; ≥11 scores 7.","required":true,"example":"0"},{"in":"query","name":"hiv_positive_male_partners_6mo","type":"integer","description":"Caller-assigned number of HIV-positive male sex partners in the prior 6 months (0-500). Smith 2012: 0 scores 0; 1 scores 4; ≥2 scores 8. Do not drop this item.","required":true,"example":"0"},{"in":"query","name":"unprotected_receptive_anal_6mo","type":"integer","description":"Caller-assigned times the person had unprotected receptive anal sex with a male partner of any HIV status in the prior 6 months (0-500). Smith 2012: 0 scores 0; ≥1 scores 10.","required":true,"example":"0"},{"in":"query","name":"insertive_anal_hiv_positive_6mo","type":"integer","description":"Caller-assigned times the person had insertive anal sex with an HIV-positive male partner in the prior 6 months (0-500). Smith 2012: 0-4 scores 0; ≥5 scores 6.","required":true,"example":"0"},{"in":"query","name":"poppers_6mo","type":"boolean","description":"Caller-assigned popper (amyl nitrate) use in the prior 6 months (Smith 2012). true or false. magent does not take a substance-use history.","required":true,"example":"false"},{"in":"query","name":"amphetamines_6mo","type":"boolean","description":"Caller-assigned amphetamine use in the prior 6 months (Smith 2012). true or false. magent does not take a substance-use history.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex_partner_count","message":"male_sex_partners_6mo must be an integer from 0 to 500 (Smith 2012 HIRI-MSM male partners in the prior 6 months). Returned before settlement; you are not charged.","status":400},{"code":"invalid_anal_act_count","message":"unprotected_receptive_anal_6mo and insertive_anal_hiv_positive_6mo must each be an integer from 0 to 500 (Smith 2012 HIRI-MSM act counts in the prior 6 months). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/hiri-msm","citation":{"authors":"Smith DK, Pals SL, Herbst JH, Shinde S, Carey JW","doi":"10.1097/QAI.0b013e318256b2f6","id":"smith-dk-2012","pmid":"22487585","source":"J Acquir Immune Defic Syndr. 2012;60(4):421-427","title":"Development of a Clinical Screening Index Predictive of Incident HIV Infection Among Men Who Have Sex With Men in the United States","url":"https://doi.org/10.1097/QAI.0b013e318256b2f6"},"formula_expression":"HIRI-MSM = age + male_sex_partners_6mo + hiv_positive_male_partners_6mo + unprotected_receptive_anal_6mo + insertive_anal_hiv_positive_6mo + poppers_6mo + amphetamines_6mo; age 18-28 -> 8, 29-40 -> 5, 41-48 -> 2, >=49 -> 0; male partners 0-5 -> 0, 6-10 -> 4, >=11 -> 7; HIV-positive partners 0 -> 0, 1 -> 4, >=2 -> 8; unprotected receptive anal 0 -> 0, >=1 -> 10; insertive anal with HIV-positive partner 0-4 -> 0, >=5 -> 6; poppers true -> 3; amphetamines true -> 5; max 47; at_or_above_10 iff score>=10","purpose":"Sum the published Smith 2012 seven-item HIV incidence risk index for MSM (age plus six prior-6-month behaviors, 0–47) and return at_or_above_10 when the total is ≥10.","markdown_url":"https://magentlab.com/docs/hiri-msm.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"hiri_msm"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Smith 2012 HIRI-MSM points 0-47"},{"name":"max_score","type":"integer","description":"47"},{"name":"at_or_above_10","type":"boolean","description":"true when score ≥10, the published Smith 2012 screening cutoff. Not a diagnosis or PrEP order."},{"name":"age_years","type":"integer","description":"Age in years used for the age band"},{"name":"male_sex_partners_6mo","type":"integer","description":"Caller-assigned male sex partners in the prior 6 months"},{"name":"hiv_positive_male_partners_6mo","type":"integer","description":"Caller-assigned HIV-positive male partners in the prior 6 months"},{"name":"unprotected_receptive_anal_6mo","type":"integer","description":"Caller-assigned unprotected receptive anal acts in the prior 6 months"},{"name":"insertive_anal_hiv_positive_6mo","type":"integer","description":"Caller-assigned insertive anal acts with an HIV-positive partner in the prior 6 months"},{"name":"components","type":"array","description":"Per-item points"},{"name":"citation","type":"object","description":"Smith et al. JAIDS 2012 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"55","amphetamines_6mo":"false","hiv_positive_male_partners_6mo":"0","insertive_anal_hiv_positive_6mo":"0","male_sex_partners_6mo":"0","poppers_6mo":"false","unprotected_receptive_anal_6mo":"0"},{"age":"55","amphetamines_6mo":"false","hiv_positive_male_partners_6mo":"0","insertive_anal_hiv_positive_6mo":"0","male_sex_partners_6mo":"0","poppers_6mo":"false","unprotected_receptive_anal_6mo":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/hiri-msm","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/hiri-msm?age=55&male_sex_partners_6mo=0&hiv_positive_male_partners_6mo=0&unprotected_receptive_anal_6mo=0&insertive_anal_hiv_positive_6mo=0&poppers_6mo=false&amphetamines_6mo=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/hiri-msm","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/denver-hiv","description":"Haukoos 2012 Table 2 FULL Denver HIV score (not abbreviated). Age bands, sex, ethnicity, and five caller-assigned flags (sm vi rai idu pht). Range -14 to 81. Caller-assigned. Not a diagnosis.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (integer 18-120). Haukoos 2012 Table 2: <22 or >60 scores 0; 22-25 or 55-60 scores 4; 26-32 or 47-54 scores 10; 33-46 scores 12. Caller-assigned.","required":true,"example":20},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"female or male as assigned by the caller (Haukoos 2012 Table 2 gender). female scores 0; male scores 21.","required":true,"example":"female"},{"in":"query","name":"ethnicity","type":"string","enum":["black","hispanic","white","other"],"description":"Caller-assigned ethnicity as used in Haukoos 2012 Table 2 (not param race). black scores 9; hispanic scores 3; white scores 0; other scores 0 (paper: American Indian or Alaska Native, Native Hawaiian, or non-Hawaiian Pacific Islander). magent does not assign race or ethnicity.","required":true,"example":"white"},{"in":"query","name":"sm","type":"boolean","description":"Haukoos 2012 Table 2 item sm. Caller-assigned boolean. +22 if true. Magent docs map this to the paper's sex-with-a-male coefficient; magent does not take a sexual history.","required":true,"example":false},{"in":"query","name":"vi","type":"boolean","description":"Haukoos 2012 Table 2 item vi. Caller-assigned boolean. -10 if true. Do not drop this item. Magent docs map this to the paper's vaginal-intercourse coefficient.","required":true,"example":false},{"in":"query","name":"rai","type":"boolean","description":"Haukoos 2012 Table 2 item rai. Caller-assigned boolean. +8 if true. Do not drop this item. Magent docs map this to the paper's receptive-anal-intercourse coefficient.","required":true,"example":false},{"in":"query","name":"idu","type":"boolean","description":"Haukoos 2012 Table 2 item idu. Caller-assigned boolean. +9 if true. Magent docs map this to the paper's injection-drug-use coefficient.","required":true,"example":false},{"in":"query","name":"pht","type":"boolean","description":"Haukoos 2012 Table 2 item pht. Caller-assigned boolean. -4 if true. Magent docs map this to the paper's past-HIV-testing coefficient.","required":true,"example":false}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_denver_hiv","message":"Denver HIV score inputs must match Haukoos 2012 Table 2 age band, sex, ethnicity, sexual-practice flags, IDU, and prior testing. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/denver-hiv","citation":{"authors":"Haukoos JS, Lyons MS, Lindsell CJ, Hopkins E, Bender B, Rothman RE, Hsieh YH, MacLaren LA, Thrun MW, Sasson C, Byyny RL","doi":"10.1093/aje/kwr389","id":"haukoos-2012-denver-hiv","pmid":"22431561","source":"Am J Epidemiol. 2012;175(8):838-846","title":"Derivation and Validation of the Denver Human Immunodeficiency Virus (HIV) Risk Score for Targeted HIV Screening","url":"https://doi.org/10.1093/aje/kwr389"},"formula_expression":"Denver HIV (Haukoos 2012 Table 2 FULL pruned) = age (<22 or >60 0; 22-25 or 55-60 4; 26-32 or 47-54 10; 33-46 12) + sex (female 0, male 21) + ethnicity (black 9, hispanic 3, white 0, other 0) + sex_with_male 22 + vaginal_intercourse -10 + receptive_anal_intercourse 8 + injection_drug_use 9 + past_hiv_testing -4; flags independent, not mutually exclusive; range -14 to 81; <20 very_low derivation 0.12%, 20-29 low 0.24%, 30-39 moderate 0.67%, 40-49 high 2.28%, >=50 very_high 5.66%","purpose":"Sum the published Haukoos 2012 Table 2 FULL pruned Denver HIV risk score from caller-assigned age, sex, ethnicity, independent sexual-practice flags, injection drug use, and past HIV testing, and return the derivation-cohort HIV prevalence band.","markdown_url":"https://magentlab.com/docs/denver-hiv.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"denver_hiv"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Haukoos 2012 Table 2 FULL pruned points, -14 to +81"},{"name":"min_score","type":"integer","description":"-14"},{"name":"max_score","type":"integer","description":"81"},{"name":"band","type":"string","description":"Paper names: very_low (<20), low (20-29), moderate (30-39), high (40-49), very_high (>=50). Not a diagnosis."},{"name":"derivation_hiv_percent","type":"number","description":"Derivation-cohort HIV prevalence percent after Table 2: 0.12, 0.24, 0.67, 2.28, or 5.66. Not the validation-cohort percents."},{"name":"age_years","type":"integer","description":"Age in years used for the age band"},{"name":"sex","type":"string","description":"female or male used"},{"name":"ethnicity","type":"string","description":"black, hispanic, white, or other used"},{"name":"sm","type":"boolean","description":"Haukoos 2012 Table 2 item sm (paper: sex with a male)"},{"name":"vi","type":"boolean","description":"Haukoos 2012 Table 2 item vi (paper: vaginal intercourse)"},{"name":"rai","type":"boolean","description":"Haukoos 2012 Table 2 item rai (paper: receptive anal intercourse)"},{"name":"idu","type":"boolean","description":"Haukoos 2012 Table 2 item idu (paper: injection drug use)"},{"name":"pht","type":"boolean","description":"Haukoos 2012 Table 2 item pht (paper: past HIV testing)"},{"name":"components","type":"array","description":"Per-item Table 2 points"},{"name":"citation","type":"object","description":"Haukoos et al. Am J Epidemiol 2012 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"20","ethnicity":"white","idu":"false","pht":"false","rai":"false","sex":"female","sm":"false","vi":"false"},{"age":"20","ethnicity":"white","idu":"false","pht":"false","rai":"false","sex":"female","sm":"false","vi":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/denver-hiv","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/denver-hiv?age=20&sex=female&ethnicity=white&sm=false&vi=false&rai=false&idu=false&pht=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/denver-hiv","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rasp","description":"Vertesi 2003 RASP multiplies exclusive source (A), inoculum type (B), and transmission (C) to Z, then total_risk = (1/Z) × volume (D). Table 2: <1/1000 definitely indicated; 1/1000–1/10 000 recommended but optional; 1/10 001–1/100 000 optional but not recommended; >1/100 000 not indicated. Average Canadian community prevalence is baked into the scores. Caller-assigned tokens. Not a PEP order. magent does not interpret the source patient.","parameters":[{"in":"query","name":"source_population","type":"string","enum":["known_hiv_acute_aids","known_hiv_asymptomatic","unknown_hiv_high_risk","unknown_hiv_low_risk"],"description":"Vertesi 2003 Step A source population as assigned by the caller (exclusive). known_hiv_acute_aids scores 1 (acute AIDS illness); known_hiv_asymptomatic scores 10; unknown_hiv_high_risk scores 100; unknown_hiv_low_risk scores 1000. magent does not interpret the source patient.","required":true,"example":"known_hiv_asymptomatic"},{"in":"query","name":"inoculum_type","type":"string","enum":["fresh_blood","body_fluids_at_risk","dried_old_blood","low_risk_secretions"],"description":"Vertesi 2003 Step B inoculum type as assigned by the caller (exclusive). fresh_blood scores 1; body_fluids_at_risk scores 10 (semen); dried_old_blood scores 100; low_risk_secretions scores 1000 (tears, saliva, urine). magent does not classify the specimen.","required":true,"example":"fresh_blood"},{"in":"query","name":"transmission","type":"string","enum":["intravenous","deep_intramuscular","deep_transcutaneous_visible_bleeding","superficial_transcutaneous_no_bleeding","mucosal_contact","intact_skin"],"description":"Vertesi 2003 Step C method of transmission as assigned by the caller (exclusive). intravenous scores 1; deep_intramuscular scores 10; deep_transcutaneous_visible_bleeding scores 100; superficial_transcutaneous_no_bleeding scores 200; mucosal_contact scores 500; intact_skin scores 1000. magent does not examine the wound.","required":true,"example":"deep_transcutaneous_visible_bleeding"},{"in":"query","name":"inoculum_volume","type":"string","enum":["massive_transfusion","measurable_gt_1_ml","moderate_large_bore_gt_22g","small_small_bore_lt_22g","trace_surface"],"description":"Vertesi 2003 Step D volume modifier as assigned by the caller (exclusive). massive_transfusion scores 100; measurable_gt_1_ml scores 10; moderate_large_bore_gt_22g scores 5; small_small_bore_lt_22g scores 3; trace_surface scores 1 (suture needle). 22 g exactly is not a published token. magent does not measure volume.","required":true,"example":"small_small_bore_lt_22g"}],"errors":[{"code":"invalid_rasp","message":"RASP inputs must match Vertesi 2003 exclusive source-population, inoculum-type, transmission, and volume scores from that paper. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rasp","citation":{"authors":"Vertesi L","doi":"10.1017/S1481803500008113","id":"vertesi-2003","pmid":"17659153","source":"CJEM. 2003;5(1):46-48","title":"Risk Assessment Stratification Protocol (RASP) to help patients decide on the use of postexposure prophylaxis for HIV exposure","url":"https://doi.org/10.1017/S1481803500008113"},"formula_expression":"Z = A * B * C; basic_risk = 1/Z; total_risk = basic_risk * D; Vertesi 2003 Figure 1 exclusive A source, B inoculum, C transmission, D volume; Table 2 <1/1000 definitely indicated; 1/1000-1/10 000 recommended but optional; 1/10 001-1/100 000 optional but not recommended; >1/100 000 not indicated","purpose":"Multiply Vertesi 2003 exclusive Steps A–C (source population, inoculum type, transmission) to Z, take basic_risk = 1/Z, apply volume modifier D as total_risk = basic_risk × D, and return the Table 2 suggested-treatment band.","markdown_url":"https://magentlab.com/docs/rasp.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rasp"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"source_population","type":"string","description":"Caller-assigned Step A token used"},{"name":"inoculum_type","type":"string","description":"Caller-assigned Step B token used"},{"name":"transmission","type":"string","description":"Caller-assigned Step C token used"},{"name":"inoculum_volume","type":"string","description":"Caller-assigned Step D token used"},{"name":"source_score","type":"integer","description":"Step A score (1, 10, 100, or 1000)"},{"name":"inoculum_type_score","type":"integer","description":"Step B score (1, 10, 100, or 1000)"},{"name":"transmission_score","type":"integer","description":"Step C score (1, 10, 100, 200, 500, or 1000)"},{"name":"volume_modifier","type":"integer","description":"Step D modifier (100, 10, 5, 3, or 1)"},{"name":"z","type":"integer","description":"A * B * C"},{"name":"basic_risk","type":"number","description":"1/Z, 9 decimals"},{"name":"total_risk","type":"number","description":"basic_risk * D, 9 decimals"},{"name":"risk_one_in","type":"integer","description":"Nearest integer 1/total_risk (Z/D) for Table 2 fraction notation"},{"name":"risk_level","type":"string","description":"definitely_indicated, recommended_optional, optional_not_recommended, or not_indicated"},{"name":"suggested_treatment","type":"string","description":"Vertesi 2003 Table 2 suggested-treatment wording for that risk level"},{"name":"citation","type":"object","description":"Vertesi 2003 CJEM citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"inoculum_type":"fresh_blood","inoculum_volume":"small_small_bore_lt_22g","source_population":"known_hiv_asymptomatic","transmission":"deep_transcutaneous_visible_bleeding"},{"inoculum_type":"fresh_blood","inoculum_volume":"small_small_bore_lt_22g","source_population":"known_hiv_asymptomatic","transmission":"deep_transcutaneous_visible_bleeding"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rasp","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rasp?source_population=known_hiv_asymptomatic&inoculum_type=fresh_blood&transmission=deep_transcutaneous_visible_bleeding&inoculum_volume=small_small_bore_lt_22g","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rasp","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/sf-syncope","description":"San Francisco Syncope Rule (CHESS) from history of CHF, hematocrit, abnormal ECG, shortness of breath, and systolic BP. Returns a 0-5 criterion count and rule-positive if any CHESS item is present. Deterministic published score with citation; not a disposition protocol.","parameters":[{"in":"query","name":"chf","type":"boolean","description":"History of congestive heart failure (C). true or false.","required":true,"example":"false"},{"in":"query","name":"hematocrit_percent","type":"number","description":"Hematocrit in percent (10-70). Scores 1 when <30; 30 is negative.","required":true,"example":"40"},{"in":"query","name":"abnormal_ecg","type":"boolean","description":"Abnormal ECG (E). true or false. Caller-assigned; magent does not read tracings.","required":true,"example":"false"},{"in":"query","name":"shortness_of_breath","type":"boolean","description":"Shortness of breath (S). true or false.","required":true,"example":"false"},{"in":"query","name":"systolic_bp_mm_hg","type":"number","description":"Systolic BP in mm Hg (50-250). Scores 1 when <90; 90 is negative.","required":true,"example":"120"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_hematocrit","message":"hematocrit_percent must be a number from 10 to 70. Returned before settlement; you are not charged.","status":400},{"code":"invalid_systolic_bp","message":"systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/sf-syncope","citation":{"authors":"Quinn JV, Stiell IG, McDermott DA, Sellers KL, Kohn MA, Wells GA","doi":"10.1016/S0196-0644(03)00823-0","id":"quinn-2004","source":"Ann Emerg Med. 2004;43(2):224-232","title":"Derivation of the San Francisco Syncope Rule to predict patients with short-term serious outcomes","url":"https://doi.org/10.1016/S0196-0644(03)00823-0"},"formula_expression":"CHESS = chf + hematocrit_lt_30 + abnormal_ecg + shortness_of_breath + systolic_bp_lt_90; rule-positive if score ≥ 1; max 5","purpose":"Compute the San Francisco Syncope Rule (CHESS) criterion count and rule-positive flag from published cutoffs.","markdown_url":"https://magentlab.com/docs/sf-syncope.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"sf_syncope"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Count of positive CHESS criteria (0-5)"},{"name":"max_score","type":"integer","description":"Always 5"},{"name":"rule_positive","type":"boolean","description":"true when score ≥ 1 (any CHESS criterion). Not a diagnosis."},{"name":"hematocrit_percent","type":"number","description":"Hematocrit used for the <30 cutoff"},{"name":"systolic_bp_mm_hg","type":"number","description":"Systolic BP used for the <90 cutoff"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Ann Emerg Med 2004 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"abnormal_ecg":"false","chf":"false","hematocrit_percent":"40","shortness_of_breath":"false","systolic_bp_mm_hg":"120"},{"abnormal_ecg":"false","chf":"false","hematocrit_percent":"40","shortness_of_breath":"false","systolic_bp_mm_hg":"120"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/sf-syncope","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/sf-syncope?chf=false&hematocrit_percent=40&abnormal_ecg=false&shortness_of_breath=false&systolic_bp_mm_hg=120","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/sf-syncope","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/egsys","description":"Del Rosso 2008 EGSYS: palpitations +4, abnormal ECG or heart disease +3, syncope during effort +3, syncope while supine +2, absence of autonomic prodromes −1, absence of predisposing and/or precipitating factors −1. Range −2 to 12. Discriminator is score ≥3 versus <3 (cardiac-syncope triage). Caller assigns six flags. Not a medical device, not a cardiac-syncope diagnosis, and magent does not take a history.","parameters":[{"in":"query","name":"palpitations","type":"boolean","description":"Palpitations preceding syncope (Del Rosso 2008, +4). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"false"},{"in":"query","name":"abnormal_ecg_or_heart_disease","type":"boolean","description":"Abnormal ECG and/or heart disease (Del Rosso 2008, +3). true or false as assigned by the caller. magent does not read an ECG.","required":true,"example":"false"},{"in":"query","name":"syncope_during_effort","type":"boolean","description":"Syncope during effort (Del Rosso 2008, +3). true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"syncope_supine","type":"boolean","description":"Syncope while supine (Del Rosso 2008, +2). true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"no_autonomic_prodromes","type":"boolean","description":"Absence of autonomic prodromes (Del Rosso 2008, −1). true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"no_precipitating_factors","type":"boolean","description":"Absence of predisposing and/or precipitating factors (Del Rosso 2008, −1). true or false as assigned by the caller.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/egsys","citation":{"authors":"Del Rosso A, Ungar A, Maggi R, Giada F, Petix NR, De Santo T, Menozzi C, Brignole M","doi":"10.1136/hrt.2008.143123","id":"del-rosso-2008","pmid":"18519550","source":"Heart. 2008;94(12):1620-1626","title":"Clinical predictors of cardiac syncope at initial evaluation in patients referred urgently to a general hospital: the EGSYS score","url":"https://doi.org/10.1136/hrt.2008.143123"},"formula_expression":"EGSYS = 4*palpitations + 3*abnormal_ecg_or_heart_disease + 3*syncope_during_effort + 2*syncope_supine - 1*no_autonomic_prodromes - 1*no_precipitating_factors; range -2 to 12; score_ge_3 iff total >= 3 (Del Rosso 2008)","purpose":"Sum the six Del Rosso 2008 EGSYS flags and return whether the total is ≥3 (published cardiac-syncope triage discriminator).","markdown_url":"https://magentlab.com/docs/egsys.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"egsys"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"EGSYS points -2 to 12"},{"name":"max_score","type":"integer","description":"12"},{"name":"score_ge_3","type":"boolean","description":"true iff score ≥ 3 (Del Rosso 2008 cardiac-syncope triage discriminator). Not a diagnosis."},{"name":"components","type":"array","description":"Per-flag points"},{"name":"citation","type":"object","description":"Del Rosso et al. Heart 2008 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"abnormal_ecg_or_heart_disease":"false","no_autonomic_prodromes":"false","no_precipitating_factors":"false","palpitations":"false","syncope_during_effort":"false","syncope_supine":"false"},{"abnormal_ecg_or_heart_disease":"false","no_autonomic_prodromes":"false","no_precipitating_factors":"false","palpitations":"false","syncope_during_effort":"false","syncope_supine":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/egsys","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/egsys?palpitations=false&abnormal_ecg_or_heart_disease=false&syncope_during_effort=false&syncope_supine=false&no_autonomic_prodromes=false&no_precipitating_factors=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/egsys","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rose","description":"Reed 2010 ROSE (BRACES) for ED syncope: BNP ≥300 pg/mL, heart rate ≤50, fecal occult blood, hemoglobin ≤90 g/L, chest pain associated with syncope, Q wave not in lead III, and room-air SpO2 ≤94%. Each present criterion is 1 point (score 0-7). High-risk if any item is present. Caller assigns labs, vitals, FOB, chest pain, and the Q-wave flag. Not a medical device or disposition protocol; magent does not measure BNP, hemoglobin, or SpO2, and does not read an ECG.","parameters":[{"in":"query","name":"bnp_pg_ml","type":"number","description":"BNP in pg/mL (0-35000). Reed 2010 BRACES scores 1 when ≥300; 300 is high-risk. magent does not measure BNP.","required":true,"example":"50"},{"in":"query","name":"heart_rate_bpm","type":"integer","description":"Heart rate in beats/min (integer 30-220). Reed 2010 bradycardia ≤50 (ED or pre-hospital in the paper; this tool takes one integer). 50 scores 1. magent does not measure heart rate.","required":true,"example":"70"},{"in":"query","name":"fecal_occult_blood","type":"boolean","description":"Rectal exam showing fecal occult blood if GI-bleed suspicion (Reed 2010 R). true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"hemoglobin_g_l","type":"number","description":"Hemoglobin in g/L (30-220). Reed 2010 anemia scores 1 when ≤90; 90 is high-risk. magent does not assay hemoglobin.","required":true,"example":"130"},{"in":"query","name":"chest_pain","type":"boolean","description":"Chest pain associated with syncope (Reed 2010 C). true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"q_wave_not_lead_iii","type":"boolean","description":"Q wave not in lead III (Reed 2010 E). true or false as assigned by the caller. magent does not read an ECG.","required":true,"example":"false"},{"in":"query","name":"spo2_percent","type":"number","description":"Room-air SpO2 percent (50-100). Reed 2010 scores 1 when ≤94; 94 is high-risk. magent does not measure SpO2.","required":true,"example":"98"}],"errors":[{"code":"invalid_bnp_pg_ml","message":"bnp_pg_ml must be a number from 0 to 35000 (Reed 2010 ROSE). Returned before settlement; you are not charged.","status":400},{"code":"invalid_heart_rate","message":"heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_hemoglobin","message":"hemoglobin_g_l (30-220) or hemoglobin_g_dl (3-22) is required, not both. Returned before settlement; you are not charged.","status":400},{"code":"invalid_spo2","message":"spo2_percent must be a number from 50 to 100. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rose","citation":{"authors":"Reed MJ, Newby DE, Coull AJ, Prescott RJ, Jacques KG, Gray AJ","doi":"10.1016/j.jacc.2009.09.049","id":"reed-2010","pmid":"20170806","source":"J Am Coll Cardiol. 2010;55(8):713-721","title":"The ROSE (Risk Stratification of Syncope in the Emergency Department) Study","url":"https://doi.org/10.1016/j.jacc.2009.09.049"},"formula_expression":"ROSE = bnp_ge_300 + heart_rate_le_50 + fecal_occult_blood + hemoglobin_le_90 + chest_pain + q_wave_not_lead_iii + spo2_le_94; each 1 if present; rose_high_risk iff score >= 1; max 7 (Reed 2010 BRACES)","purpose":"Compute the Reed 2010 ROSE (BRACES) criterion count and high-risk flag from published cutoffs.","markdown_url":"https://magentlab.com/docs/rose.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rose"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Count of positive BRACES criteria (0-7)"},{"name":"max_score","type":"integer","description":"Always 7"},{"name":"rose_high_risk","type":"boolean","description":"true when score ≥ 1 (any BRACES criterion). Not a diagnosis or disposition."},{"name":"bnp_pg_ml","type":"number","description":"BNP used for the ≥300 pg/mL cutoff"},{"name":"heart_rate_bpm","type":"integer","description":"Heart rate used for the ≤50 cutoff"},{"name":"hemoglobin_g_l","type":"number","description":"Hemoglobin used for the ≤90 g/L cutoff"},{"name":"spo2_percent","type":"number","description":"Room-air SpO2 used for the ≤94% cutoff"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Reed et al. JACC 2010 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"bnp_pg_ml":"50","chest_pain":"false","fecal_occult_blood":"false","heart_rate_bpm":"70","hemoglobin_g_l":"130","q_wave_not_lead_iii":"false","spo2_percent":"98"},{"bnp_pg_ml":"50","chest_pain":"false","fecal_occult_blood":"false","heart_rate_bpm":"70","hemoglobin_g_l":"130","q_wave_not_lead_iii":"false","spo2_percent":"98"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rose","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rose?bnp_pg_ml=50&heart_rate_bpm=70&fecal_occult_blood=false&hemoglobin_g_l=130&chest_pain=false&q_wave_not_lead_iii=false&spo2_percent=98","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rose","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/oesil","description":"Colivicchi 2003 OESIL: 1 point each for age >65 years, history of cardiovascular disease, syncope without prodromes, and abnormal ECG. Arithmetic sum 0-4. Caller assigns three flags; magent does not read an ECG. Score only; derivation-cohort 12-month mortality percents are not an individual prediction. Not a medical device and not a disposition protocol.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Age >65 scores 1; age 65 scores 0. 18 is an implementation clamp.","required":true,"example":"50"},{"in":"query","name":"cardiovascular_disease","type":"boolean","description":"History of cardiovascular disease (Colivicchi 2003, 1 point). true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"syncope_without_prodromes","type":"boolean","description":"Syncope without prodromes (Colivicchi 2003, 1 point). true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"abnormal_ecg","type":"boolean","description":"Abnormal ECG (Colivicchi 2003, 1 point). true or false as assigned by the caller. magent does not read an ECG.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/oesil","citation":{"authors":"Colivicchi F, Ammirati F, Melina D, Guido V, Imperoli G, Santini M","doi":"10.1016/S0195-668X(02)00827-8","id":"colivicchi-2003","pmid":"12727148","source":"Eur Heart J. 2003;24(9):811-819","title":"Development and prospective validation of a risk stratification system for patients with syncope in the emergency department: the OESIL risk score","url":"https://doi.org/10.1016/S0195-668X(02)00827-8"},"formula_expression":"OESIL = age_gt_65 + cardiovascular_disease + syncope_without_prodromes + abnormal_ecg; 1 point each; range 0-4 (Colivicchi 2003)","purpose":"Compute the Osservatorio Epidemiologico sulla Sincope nel Lazio (OESIL) risk score as the Colivicchi 2003 arithmetic sum of four predictors: age >65 years, history of cardiovascular disease, syncope without prodromes, and abnormal ECG.","markdown_url":"https://magentlab.com/docs/oesil.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"oesil"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"OESIL points 0-4"},{"name":"max_score","type":"integer","description":"Always 4"},{"name":"age_years","type":"integer","description":"Age used for the >65 criterion"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Colivicchi et al. Eur Heart J 2003 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"abnormal_ecg":"false","age":"50","cardiovascular_disease":"false","syncope_without_prodromes":"false"},{"abnormal_ecg":"false","age":"50","cardiovascular_disease":"false","syncope_without_prodromes":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/oesil","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/oesil?age=50&cardiovascular_disease=false&syncope_without_prodromes=false&abnormal_ecg=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/oesil","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/boston-syncope","description":"Grossman 2007 Boston Syncope from eight caller-assigned flags: ACS signs/symptoms, conduction disease, worrisome cardiac history, valvular heart disease, family history of sudden death, persistent abnormal ED vitals, volume depletion, and primary CNS event. high_risk (Boston-positive) iff any is true; low_risk iff none. Adult (enrolled 18+). Not a disposition or admission order. magent does not examine the patient or interpret ECG/hematocrit. Not San Francisco Syncope, EGSYS, ROSE, or OESIL.","parameters":[{"in":"query","name":"acs_signs_symptoms","type":"boolean","description":"Signs and symptoms of acute coronary syndrome as assigned by the caller (Grossman 2007). true is a Boston-positive flag. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"conduction_disease","type":"boolean","description":"Signs of conduction disease as assigned by the caller (Grossman 2007). true is a Boston-positive flag. magent does not interpret an ECG.","required":true,"example":"false"},{"in":"query","name":"worrisome_cardiac_history","type":"boolean","description":"Worrisome cardiac history as assigned by the caller (Grossman 2007). true is a Boston-positive flag. magent does not take a history.","required":true,"example":"false"},{"in":"query","name":"valvular_heart_disease","type":"boolean","description":"Valvular heart disease by history or physical examination as assigned by the caller (Grossman 2007). true is a Boston-positive flag. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"family_history_sudden_death","type":"boolean","description":"Family history of sudden death as assigned by the caller (Grossman 2007). true is a Boston-positive flag. magent does not take a history.","required":true,"example":"false"},{"in":"query","name":"persistent_abnormal_vitals","type":"boolean","description":"Persistent abnormal vital signs in the ED as assigned by the caller (Grossman 2007). true is a Boston-positive flag. magent does not measure vital signs.","required":true,"example":"false"},{"in":"query","name":"volume_depletion","type":"boolean","description":"Volume depletion (persistent dehydration, GI bleeding, or hematocrit <30) as assigned by the caller (Grossman 2007). true is a Boston-positive flag. magent does not assay hematocrit.","required":true,"example":"false"},{"in":"query","name":"primary_cns_event","type":"boolean","description":"Primary central nervous system event as assigned by the caller (Grossman 2007). true is a Boston-positive flag. magent does not interpret imaging.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/boston-syncope","citation":{"authors":"Grossman SA, Fischer C, Lipsitz LA, et al.","doi":"10.1016/j.jemermed.2007.04.001","id":"grossman-2007","pmid":"17976548","source":"J Emerg Med. 2007;33(3):233-239","title":"Predicting adverse outcomes in syncope","url":"https://doi.org/10.1016/j.jemermed.2007.04.001"},"formula_expression":"high_risk iff acs_signs_symptoms or conduction_disease or worrisome_cardiac_history or valvular_heart_disease or family_history_sudden_death or persistent_abnormal_vitals or volume_depletion or primary_cns_event; low_risk iff not high_risk (Grossman 2007 Boston Syncope; Boston-positive iff any of eight caller-assigned flags)","purpose":"Apply the Grossman 2007 Boston Syncope criteria from eight caller-assigned flags and return whether any high-risk (Boston-positive) flag is present.","markdown_url":"https://magentlab.com/docs/boston-syncope.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"boston_syncope"},{"name":"formula_expression","type":"string","description":"Grossman 2007 Boston Syncope: high_risk if any of the eight caller-assigned flags"},{"name":"high_risk","type":"boolean","description":"true iff any of the eight flags is true (Boston-positive). Not a disposition or admission order."},{"name":"low_risk","type":"boolean","description":"true iff none of the eight flags is true (not high_risk)"},{"name":"criteria","type":"array","description":"Per-flag rows plus high_risk_any (met iff any of the eight flags is true)"},{"name":"citation","type":"object","description":"Grossman 2007 J Emerg Med citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"acs_signs_symptoms":"false","conduction_disease":"false","family_history_sudden_death":"false","persistent_abnormal_vitals":"false","primary_cns_event":"false","valvular_heart_disease":"false","volume_depletion":"false","worrisome_cardiac_history":"false"},{"acs_signs_symptoms":"false","conduction_disease":"false","family_history_sudden_death":"false","persistent_abnormal_vitals":"false","primary_cns_event":"false","valvular_heart_disease":"false","volume_depletion":"false","worrisome_cardiac_history":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/boston-syncope","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/boston-syncope?acs_signs_symptoms=false&conduction_disease=false&worrisome_cardiac_history=false&valvular_heart_disease=false&family_history_sudden_death=false&persistent_abnormal_vitals=false&volume_depletion=false&primary_cns_event=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/boston-syncope","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/ottawa-ankle","description":"Ottawa ankle rule (Stiell 1992). Ankle x-ray is indicated when there is malleolar-zone pain and any of: bone tenderness at the posterior edge or tip of the lateral or medial malleolus, or inability to bear weight both immediately after injury and in the emergency department (four steps). One weight-bearing failure alone is not enough. Not a diagnosis of fracture, not the Ottawa foot rule, and not the Pittsburgh knee rule. magent does not examine the ankle.","parameters":[{"in":"query","name":"malleolar_pain","type":"boolean","description":"Pain in the malleolar zone as assigned by the caller. true or false. Ankle x-ray is not indicated when false, even if tenderness flags are true.","required":true,"example":"false"},{"in":"query","name":"lateral_malleolus_tenderness","type":"boolean","description":"Bone tenderness at the posterior edge or tip of the lateral malleolus. true or false. Applies only inside the malleolar zone.","required":true,"example":"false"},{"in":"query","name":"medial_malleolus_tenderness","type":"boolean","description":"Bone tenderness at the posterior edge or tip of the medial malleolus. true or false. Applies only inside the malleolar zone.","required":true,"example":"false"},{"in":"query","name":"unable_to_bear_weight_immediately","type":"boolean","description":"Unable to bear weight immediately after injury (four steps). true or false. Counts only when also unable in the emergency department.","required":true,"example":"false"},{"in":"query","name":"unable_to_bear_weight_in_ed","type":"boolean","description":"Unable to bear weight in the emergency department (four steps). true or false. Counts only when also unable immediately after injury.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/ottawa-ankle","citation":{"authors":"Stiell IG, Greenberg GH, McKnight RD, Nair RC, McDowell I, Worthington JR","doi":"10.1016/S0196-0644(05)82656-3","id":"stiell-1992","source":"Ann Emerg Med. 1992;21(4):384-390","title":"A study to develop clinical decision rules for the use of radiography in acute ankle injuries","url":"https://doi.org/10.1016/S0196-0644(05)82656-3"},"formula_expression":"Ankle x-ray indicated iff malleolar_pain and (lateral_malleolus_tenderness or medial_malleolus_tenderness or (unable_to_bear_weight_immediately and unable_to_bear_weight_in_ed))","purpose":"Apply the Stiell 1992 Ottawa ankle rule and return whether an ankle x-ray series is indicated from caller-assigned malleolar pain, malleolar bone tenderness, and inability to bear weight.","markdown_url":"https://magentlab.com/docs/ottawa-ankle.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"ottawa_ankle"},{"name":"formula_expression","type":"string","description":"Stiell 1992 ankle-series indication rule"},{"name":"xray_indicated","type":"boolean","description":"true when malleolar pain is present and any zone criterion is met. Not a diagnosis of fracture."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met; unable_to_bear_weight_both is both unable flags"},{"name":"citation","type":"object","description":"Stiell 1992 Ann Emerg Med citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"lateral_malleolus_tenderness":"false","malleolar_pain":"false","medial_malleolus_tenderness":"false","unable_to_bear_weight_immediately":"false","unable_to_bear_weight_in_ed":"false"},{"lateral_malleolus_tenderness":"false","malleolar_pain":"false","medial_malleolus_tenderness":"false","unable_to_bear_weight_immediately":"false","unable_to_bear_weight_in_ed":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/ottawa-ankle","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/ottawa-ankle?malleolar_pain=false&lateral_malleolus_tenderness=false&medial_malleolus_tenderness=false&unable_to_bear_weight_immediately=false&unable_to_bear_weight_in_ed=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/ottawa-ankle","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/ottawa-knee","description":"Ottawa knee rule (Stiell 1995). Knee x-ray is indicated when any of: age 55 or older, bone tenderness at the fibular head, isolated patellar tenderness (caller-applied), inability to flex to 90 degrees, or inability to bear weight both immediately after injury and in the emergency department (four steps). One weight-bearing failure alone is not enough. Not a diagnosis of fracture, not the Ottawa ankle or foot rule, and not the Pittsburgh knee rule. magent does not examine the knee.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Age ≥55 meets this criterion; 54 does not.","required":true,"example":"40"},{"in":"query","name":"fibular_head_tenderness","type":"boolean","description":"Bone tenderness at the head of the fibula. true or false.","required":true,"example":"false"},{"in":"query","name":"isolated_patellar_tenderness","type":"boolean","description":"Isolated patellar tenderness as assigned by the caller. true or false. magent does not infer isolation from other flags.","required":true,"example":"false"},{"in":"query","name":"flexion_less_than_90","type":"boolean","description":"Inability to flex the knee to 90 degrees. true or false.","required":true,"example":"false"},{"in":"query","name":"unable_to_bear_weight_immediately","type":"boolean","description":"Unable to bear weight immediately after injury (four steps). true or false. Counts only when also unable in the emergency department.","required":true,"example":"false"},{"in":"query","name":"unable_to_bear_weight_in_ed","type":"boolean","description":"Unable to bear weight in the emergency department (four steps). true or false. Counts only when also unable immediately after injury.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/ottawa-knee","citation":{"authors":"Stiell IG, Greenberg GH, Wells GA, et al.","doi":"10.1016/S0196-0644(95)70106-0","id":"stiell-1995","source":"Ann Emerg Med. 1995;26(4):405-413","title":"Derivation of a decision rule for the use of radiography in acute knee injuries","url":"https://doi.org/10.1016/S0196-0644(95)70106-0"},"formula_expression":"Knee x-ray indicated iff age >= 55 or fibular_head_tenderness or isolated_patellar_tenderness or flexion_less_than_90 or (unable_to_bear_weight_immediately and unable_to_bear_weight_in_ed)","purpose":"Apply the Stiell 1995 Ottawa knee rule and return whether a knee x-ray series is indicated from age and caller-assigned bone tenderness, flexion, and weight-bearing findings.","markdown_url":"https://magentlab.com/docs/ottawa-knee.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"ottawa_knee"},{"name":"formula_expression","type":"string","description":"Stiell 1995 knee-series indication rule"},{"name":"xray_indicated","type":"boolean","description":"true when any published criterion is met. Not a diagnosis of fracture."},{"name":"age_years","type":"integer","description":"Age used for the ≥55 criterion"},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met; unable_to_bear_weight_both is both unable flags"},{"name":"citation","type":"object","description":"Stiell 1995 Ann Emerg Med citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"40","fibular_head_tenderness":"false","flexion_less_than_90":"false","isolated_patellar_tenderness":"false","unable_to_bear_weight_immediately":"false","unable_to_bear_weight_in_ed":"false"},{"age":"40","fibular_head_tenderness":"false","flexion_less_than_90":"false","isolated_patellar_tenderness":"false","unable_to_bear_weight_immediately":"false","unable_to_bear_weight_in_ed":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/ottawa-knee","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/ottawa-knee?age=40&fibular_head_tenderness=false&isolated_patellar_tenderness=false&flexion_less_than_90=false&unable_to_bear_weight_immediately=false&unable_to_bear_weight_in_ed=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/ottawa-knee","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/pittsburgh-knee","description":"Pittsburgh knee rule (Seaberg 1994): after fall or blunt trauma, a knee radiograph is indicated if the patient cannot walk four weight-bearing steps or is younger than 12 or older than 50. Deterministic published rule with citation. Not a diagnosis; not the Ottawa knee rule.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (0-120). Seaberg 1994: younger than 12 or older than 50 meets the age limb; 12 and 50 do not.","required":true,"example":"30"},{"in":"query","name":"blunt_trauma_or_fall","type":"boolean","description":"Fall or blunt trauma mechanism (Seaberg 1994). true or false as assigned by the caller. The rule does not indicate a film without this mechanism.","required":true,"example":"true"},{"in":"query","name":"unable_to_walk_four_steps","type":"boolean","description":"Inability to ambulate four weight-bearing steps (Seaberg 1994). true or false as assigned by the caller.","required":true,"example":"false"}],"errors":[{"code":"invalid_pittsburgh_age","message":"age must be an integer from 0 to 120 (Seaberg 1994 includes children). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/pittsburgh-knee","citation":{"authors":"Seaberg DC, Jackson R","doi":"10.1016/0735-6757(94)90274-7","id":"seaberg-1994","source":"Am J Emerg Med. 1994;12(5):541-543","title":"Clinical decision rule for knee radiographs","url":"https://doi.org/10.1016/0735-6757(94)90274-7"},"formula_expression":"Knee x-ray indicated iff blunt_trauma_or_fall and (unable_to_walk_four_steps or age < 12 or age > 50)","purpose":"Apply the Seaberg 1994 Pittsburgh knee rule: a knee radiograph is indicated after fall or blunt trauma if the patient cannot walk four weight-bearing steps or is younger than 12 or older than 50.","markdown_url":"https://magentlab.com/docs/pittsburgh-knee.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"pittsburgh_knee"},{"name":"formula_expression","type":"string","description":"Seaberg 1994 rule"},{"name":"xray_indicated","type":"boolean","description":"Whether the rule indicates a knee series"},{"name":"age_years","type":"integer","description":"Caller age"},{"name":"blunt_trauma_or_fall","type":"boolean","description":"Mechanism limb"},{"name":"unable_to_walk_four_steps","type":"boolean","description":"Ambulation limb"},{"name":"criteria","type":"array","description":"Evaluated criteria"},{"name":"citation","type":"object","description":"Seaberg 1994"},{"name":"disclaimer","type":"string","description":"Not a medical device"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"30","blunt_trauma_or_fall":"true","unable_to_walk_four_steps":"false"},{"age":"30","blunt_trauma_or_fall":"true","unable_to_walk_four_steps":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/pittsburgh-knee","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/pittsburgh-knee?age=30&blunt_trauma_or_fall=true&unable_to_walk_four_steps=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/pittsburgh-knee","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/nexus","description":"NEXUS C-spine rule (Hoffman 2000). The patient is NEXUS low-risk, and imaging is not indicated by this rule, only when all five hold: no posterior midline cervical-spine tenderness, no focal neurologic deficit, normal alertness, no intoxication, and no painful distracting injury. Any failed criterion means x-ray is indicated. Not a diagnosis, not the Canadian C-spine rule, and not NEXUS chest. Blunt-trauma adults as published. magent does not examine the patient.","parameters":[{"in":"query","name":"midline_cervical_tenderness","type":"boolean","description":"Posterior midline cervical-spine tenderness. true means tenderness is present and the low-risk criterion fails. true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"focal_neuro_deficit","type":"boolean","description":"Focal neurologic deficit. true means a deficit is present and the low-risk criterion fails. true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"normal_alertness","type":"boolean","description":"Normal alertness. true means alertness is normal and the low-risk criterion holds; false is altered alertness and the criterion fails.","required":true,"example":"true"},{"in":"query","name":"intoxication","type":"boolean","description":"Intoxication. true means intoxicated and the low-risk criterion fails. true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"distracting_injury","type":"boolean","description":"Painful, distracting injury. true means a distracting injury is present and the low-risk criterion fails. true or false as assigned by the caller.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/nexus","citation":{"authors":"Hoffman JR, Mower WR, Wolfson AB, Todd KH, Zucker MI; National Emergency X-Radiography Utilization Study Group","doi":"10.1056/NEJM200007133430203","id":"hoffman-2000","source":"N Engl J Med. 2000;343(2):94-99","title":"Validity of a set of clinical criteria to rule out injury to the cervical spine in patients with blunt trauma","url":"https://doi.org/10.1056/NEJM200007133430203"},"formula_expression":"NEXUS low-risk iff no posterior midline cervical-spine tenderness and no focal neurologic deficit and normal alertness and no intoxication and no painful distracting injury","purpose":"Apply the Hoffman 2000 NEXUS C-spine rule and return whether the five low-risk criteria all hold (imaging not indicated by this rule).","markdown_url":"https://magentlab.com/docs/nexus.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"nexus"},{"name":"formula_expression","type":"string","description":"Hoffman 2000 five low-risk criteria"},{"name":"nexus_low_risk","type":"boolean","description":"true only when all five low-risk criteria hold. Imaging is not indicated by this rule when true. Not a diagnosis."},{"name":"xray_indicated","type":"boolean","description":"true when nexus_low_risk is false. Not a diagnosis of cervical-spine injury."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met; met is true when that NEXUS low-risk item holds"},{"name":"citation","type":"object","description":"Hoffman 2000 N Engl J Med citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"distracting_injury":"false","focal_neuro_deficit":"false","intoxication":"false","midline_cervical_tenderness":"false","normal_alertness":"true"},{"distracting_injury":"false","focal_neuro_deficit":"false","intoxication":"false","midline_cervical_tenderness":"false","normal_alertness":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/nexus","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/nexus?midline_cervical_tenderness=false&focal_neuro_deficit=false&normal_alertness=true&intoxication=false&distracting_injury=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/nexus","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/nexus-chest","description":"NEXUS Chest (Rodriguez 2011). Chest radiography is not indicated by this instrument only when all seven caller-assigned findings are absent: chest pain, distracting injury, chest-wall tenderness, intoxication, age >60, rapid deceleration, and altered mental status. Any one present means chest x-ray is indicated. Not a diagnosis, not Hoffman 2000 NEXUS C-spine, and not a NEXUS Chest CT instrument. Derivation enrolled blunt trauma age >14. magent does not examine the patient.","parameters":[{"in":"query","name":"chest_pain","type":"boolean","description":"Chest pain. true means chest pain is present and the low-risk criterion fails. true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"distracting_injury","type":"boolean","description":"Painful, distracting injury. true means a distracting injury is present and the low-risk criterion fails. true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"chest_wall_tenderness","type":"boolean","description":"Tenderness to chest-wall palpation. true means tenderness is present and the low-risk criterion fails. true or false as assigned by the caller. magent does not palpate the chest.","required":true,"example":"false"},{"in":"query","name":"intoxication","type":"boolean","description":"Intoxication. true means intoxicated and the low-risk criterion fails. true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"age_gt_60","type":"boolean","description":"Age greater than 60 years as assigned by the caller (a NEXUS Chest criterion, not a numeric age input). true means age >60 and the low-risk criterion fails. true or false. magent does not take numeric age.","required":true,"example":"false"},{"in":"query","name":"rapid_deceleration","type":"boolean","description":"Rapid deceleration mechanism (paper: fall from >20 feet or motor vehicle crash >40 mph) as assigned by the caller. true means the mechanism is present and the low-risk criterion fails. true or false. magent does not classify mechanism.","required":true,"example":"false"},{"in":"query","name":"altered_mental_status","type":"boolean","description":"Altered alertness or mental status. true means altered mental status is present and the low-risk criterion fails. true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/nexus-chest","citation":{"authors":"Rodriguez RM, Hendey GW, Mower W, et al.","doi":"10.1097/TA.0b013e3181f2ac9d","id":"rodriguez-2011","pmid":"21045745","source":"J Trauma. 2011;71(3):549-553","title":"Derivation of a decision instrument for selective chest radiography in blunt trauma","url":"https://doi.org/10.1097/TA.0b013e3181f2ac9d"},"formula_expression":"NEXUS Chest low-risk iff no chest pain and no distracting injury and no chest-wall tenderness and no intoxication and age not >60 and no rapid deceleration and no altered mental status","purpose":"Apply the Rodriguez 2011 NEXUS Chest decision instrument and return whether the seven low-risk criteria all hold (chest radiography not indicated by this instrument).","markdown_url":"https://magentlab.com/docs/nexus-chest.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"nexus_chest"},{"name":"formula_expression","type":"string","description":"Rodriguez 2011 seven low-risk criteria"},{"name":"nexus_chest_low_risk","type":"boolean","description":"true only when all seven low-risk criteria hold. Chest radiography is not indicated by this instrument when true. Not a diagnosis."},{"name":"chest_xray_indicated","type":"boolean","description":"true when nexus_chest_low_risk is false. Not a diagnosis of thoracic injury."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met; met is true when that NEXUS Chest low-risk item holds (the finding is absent)"},{"name":"citation","type":"object","description":"Rodriguez 2011 J Trauma citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age_gt_60":"false","altered_mental_status":"false","chest_pain":"false","chest_wall_tenderness":"false","distracting_injury":"false","intoxication":"false","rapid_deceleration":"false"},{"age_gt_60":"false","altered_mental_status":"false","chest_pain":"false","chest_wall_tenderness":"false","distracting_injury":"false","intoxication":"false","rapid_deceleration":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/nexus-chest","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/nexus-chest?chest_pain=false&distracting_injury=false&chest_wall_tenderness=false&intoxication=false&age_gt_60=false&rapid_deceleration=false&altered_mental_status=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/nexus-chest","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/nexus-chest-ct","description":"NEXUS Chest CT (Rodriguez 2015). Chest CT-Major is negative only when abnormal CXR, distracting injury, chest-wall, sternal, thoracic-spine, and scapular tenderness are all absent. Chest CT-All is negative only when those six and rapid deceleration mechanism are absent. Presence of a criterion does not mandate CT. Not a diagnosis, not the NEXUS Chest CXR instrument, and not Hoffman 2000 NEXUS C-spine. Enrolled blunt trauma age >14. magent does not examine the patient or read a radiograph.","parameters":[{"in":"query","name":"abnormal_cxr","type":"boolean","description":"Abnormal chest radiograph as assigned by the caller (paper: any thoracic injury including clavicle fracture, or a widened mediastinum). true means the finding is present and Chest CT-Major is not negative. true or false. magent does not read a radiograph.","required":true,"example":"false"},{"in":"query","name":"distracting_injury","type":"boolean","description":"Painful, distracting injury as assigned by the caller. true means a distracting injury is present and Chest CT-Major is not negative. true or false. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"chest_wall_tenderness","type":"boolean","description":"Chest-wall tenderness to palpation as assigned by the caller. true means tenderness is present and Chest CT-Major is not negative. true or false. magent does not palpate the chest.","required":true,"example":"false"},{"in":"query","name":"sternal_tenderness","type":"boolean","description":"Sternal tenderness to palpation as assigned by the caller. true means tenderness is present and Chest CT-Major is not negative. true or false. magent does not palpate the sternum.","required":true,"example":"false"},{"in":"query","name":"thoracic_spine_tenderness","type":"boolean","description":"Thoracic-spine tenderness to palpation as assigned by the caller. true means tenderness is present and Chest CT-Major is not negative. true or false. magent does not palpate the thoracic spine.","required":true,"example":"false"},{"in":"query","name":"scapular_tenderness","type":"boolean","description":"Scapular tenderness to palpation as assigned by the caller. true means tenderness is present and Chest CT-Major is not negative. true or false. magent does not palpate the scapula.","required":true,"example":"false"},{"in":"query","name":"rapid_deceleration_mechanism","type":"boolean","description":"Rapid deceleration mechanism as assigned by the caller (paper: fall from >20 feet or motor vehicle crash >40 mph with sudden deceleration). true means the finding is present and Chest CT-All is not negative. true or false. magent does not classify mechanism.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/nexus-chest-ct","citation":{"authors":"Rodriguez RM, Langdorf MI, Nishijima D, Baumann BM, Hendey GW, Medak AJ, Raja AS, Adelman EE, Mower WR","doi":"10.1371/journal.pmed.1001883","id":"rodriguez-2015","pmid":"26440607","source":"PLoS Med. 2015;12(10):e1001883","title":"Derivation and Validation of Two Decision Instruments for Selective Chest CT in Blunt Trauma: A Multicenter Prospective Observational Study (NEXUS Chest CT)","url":"https://doi.org/10.1371/journal.pmed.1001883"},"formula_expression":"ct_major_negative iff no abnormal_cxr and no distracting_injury and no chest_wall_tenderness and no sternal_tenderness and no thoracic_spine_tenderness and no scapular_tenderness; ct_all_negative iff Major-negative and no rapid_deceleration_mechanism","purpose":"Apply the Rodriguez 2015 NEXUS Chest CT-Major and Chest CT-All decision instruments and return whether each is negative (all of that instrument's caller-assigned criteria absent). Does not order a CT.","markdown_url":"https://magentlab.com/docs/nexus-chest-ct.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"nexus_chest_ct"},{"name":"formula_expression","type":"string","description":"Rodriguez 2015 Chest CT-Major six criteria and Chest CT-All seven criteria"},{"name":"ct_major_negative","type":"boolean","description":"true only when all six Chest CT-Major findings are absent. Does not order a CT. Presence of a criterion does not mandate CT. Not a diagnosis."},{"name":"ct_all_negative","type":"boolean","description":"true only when the six Major findings and rapid_deceleration_mechanism are absent. Does not order a CT. Presence of a criterion does not mandate CT. Not a diagnosis."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met; met is true when that finding is absent (the low-risk item holds)"},{"name":"citation","type":"object","description":"Rodriguez 2015 PLoS Med citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"abnormal_cxr":"false","chest_wall_tenderness":"false","distracting_injury":"false","rapid_deceleration_mechanism":"false","scapular_tenderness":"false","sternal_tenderness":"false","thoracic_spine_tenderness":"false"},{"abnormal_cxr":"false","chest_wall_tenderness":"false","distracting_injury":"false","rapid_deceleration_mechanism":"false","scapular_tenderness":"false","sternal_tenderness":"false","thoracic_spine_tenderness":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/nexus-chest-ct","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/nexus-chest-ct?abnormal_cxr=false&distracting_injury=false&chest_wall_tenderness=false&sternal_tenderness=false&thoracic_spine_tenderness=false&scapular_tenderness=false&rapid_deceleration_mechanism=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/nexus-chest-ct","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/nexus-head-ct","description":"NEXUS Head CT (Mower 2017). Low-risk, and CT may be omitted by this instrument, only when all eight are absent: age 65 or older, evidence of skull fracture, scalp hematoma, neurologic deficit, altered alertness, abnormal behavior, coagulopathy, and persistent vomiting. Age 65 is high-risk; age 64 is not on age alone. Not a diagnosis, not a CT order, not Hoffman 2000 NEXUS C-spine, and not the Canadian CT Head Rule. magent does not examine the patient.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (integer 18-120). Age ≥ 65 is a high-risk criterion; 64 is not high-risk on age alone. Low-risk age criterion holds when age < 65.","required":true,"example":"40"},{"in":"query","name":"skull_fracture","type":"boolean","description":"Evidence of skull fracture as assigned by the caller. true means a skull-fracture finding is present and low_risk is false. true or false. magent does not examine the patient or read a radiograph.","required":true,"example":"false"},{"in":"query","name":"scalp_hematoma","type":"boolean","description":"Scalp hematoma as assigned by the caller. true means a scalp hematoma is present and low_risk is false. true or false. magent does not examine the scalp.","required":true,"example":"false"},{"in":"query","name":"neurologic_deficit","type":"boolean","description":"Neurologic deficit (neurosurgical deficits) as assigned by the caller. true means a deficit is present and low_risk is false. true or false. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"altered_alertness","type":"boolean","description":"Altered level of alertness as assigned by the caller. true means alertness is altered and low_risk is false. true or false. magent does not assign GCS.","required":true,"example":"false"},{"in":"query","name":"abnormal_behavior","type":"boolean","description":"Abnormal behavior as assigned by the caller. true means abnormal behavior is present and low_risk is false. true or false. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"coagulopathy","type":"boolean","description":"Coagulopathy as assigned by the caller. true means coagulopathy is present and low_risk is false. true or false. magent does not interpret a coagulation assay.","required":true,"example":"false"},{"in":"query","name":"persistent_vomiting","type":"boolean","description":"Persistent vomiting as assigned by the caller. true means persistent vomiting is present and low_risk is false. true or false. magent does not take a vomit count.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/nexus-head-ct","citation":{"authors":"Mower WR, Gupta M, Rodriguez R, Hendey GW","doi":"10.1371/journal.pmed.1002313","id":"mower-2017","pmid":"28700585","source":"PLoS Med. 2017;14(7):e1002313","title":"Validation of the sensitivity of the National Emergency X-Radiography Utilization Study (NEXUS) Head computed tomographic (CT) decision instrument for selective imaging of blunt head injury patients: An observational study","url":"https://doi.org/10.1371/journal.pmed.1002313"},"formula_expression":"low_risk iff age < 65 and no skull_fracture and no scalp_hematoma and no neurologic_deficit and no altered_alertness and no abnormal_behavior and no coagulopathy and no persistent_vomiting","purpose":"Apply the Mower 2017 NEXUS Head CT eight-criterion decision instrument and return whether the patient is low-risk (all eight caller-assigned criteria absent). CT may be omitted by this instrument when low-risk. Does not order a CT.","markdown_url":"https://magentlab.com/docs/nexus-head-ct.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"nexus_head_ct"},{"name":"formula_expression","type":"string","description":"Mower 2017 eight-criterion NEXUS Head CT decision instrument"},{"name":"low_risk","type":"boolean","description":"true only when all eight criteria are absent. CT may be omitted by this instrument when true. Does not order a CT. Presence of a criterion does not mandate CT. Not a diagnosis."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met; met is true when that low-risk item holds (age < 65 or the named finding is absent). age_lt_65 includes value"},{"name":"citation","type":"object","description":"Mower 2017 PLoS Med citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"abnormal_behavior":"false","age":"40","altered_alertness":"false","coagulopathy":"false","neurologic_deficit":"false","persistent_vomiting":"false","scalp_hematoma":"false","skull_fracture":"false"},{"abnormal_behavior":"false","age":"40","altered_alertness":"false","coagulopathy":"false","neurologic_deficit":"false","persistent_vomiting":"false","scalp_hematoma":"false","skull_fracture":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/nexus-head-ct","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/nexus-head-ct?age=40&skull_fracture=false&scalp_hematoma=false&neurologic_deficit=false&altered_alertness=false&abnormal_behavior=false&coagulopathy=false&persistent_vomiting=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/nexus-head-ct","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/wisconsin-criteria","description":"Sitzman 2011 Wisconsin Criteria. Meets criteria if any one of five caller-assigned findings is true: bony step-off or instability, periorbital swelling or contusion, GCS < 14, malocclusion, or tooth absence. All five false does not meet. Returns meets_criteria and criteria_present (0–5). Not a diagnosis, not an imaging order, and not NEXUS, PECARN head, or Canadian CT Head. magent does not examine the face or assign GCS.","parameters":[{"in":"query","name":"bony_stepoff_or_instability","type":"boolean","description":"Bony step-off or instability of the facial skeleton as assigned by the caller. true or false. magent does not examine the face.","required":true,"example":"false"},{"in":"query","name":"periorbital_swelling_or_contusion","type":"boolean","description":"Periorbital swelling or contusion as assigned by the caller. true or false. magent does not examine the face.","required":true,"example":"false"},{"in":"query","name":"gcs_lt_14","type":"boolean","description":"Glasgow Coma Scale less than 14 as assigned by the caller. true or false. magent does not take a GCS integer or assign GCS.","required":true,"example":"false"},{"in":"query","name":"malocclusion","type":"boolean","description":"Malocclusion as assigned by the caller. true or false. magent does not examine occlusion.","required":true,"example":"false"},{"in":"query","name":"tooth_absence","type":"boolean","description":"Tooth absence as assigned by the caller. true or false. magent does not examine the dentition.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/wisconsin-criteria","citation":{"authors":"Sitzman TJ, Hanson SE, Al-Sheikhi N, et al.","doi":"10.1097/PRS.0b013e3182043ad8","id":"sitzman-2011","source":"Plast Reconstr Surg. 2011;127(3):1270-1278","title":"Clinical criteria for obtaining maxillofacial computed tomography in trauma patients","url":"https://doi.org/10.1097/PRS.0b013e3182043ad8"},"formula_expression":"meets_criteria iff bony_stepoff_or_instability or periorbital_swelling_or_contusion or gcs_lt_14 or malocclusion or tooth_absence","purpose":"Apply the Sitzman 2011 Wisconsin Criteria and return whether any of five caller-assigned maxillofacial trauma findings is present (meets_criteria) and how many (criteria_present 0–5).","markdown_url":"https://magentlab.com/docs/wisconsin-criteria.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"wisconsin_criteria"},{"name":"formula_expression","type":"string","description":"Sitzman 2011 any-one-of-five Wisconsin Criteria"},{"name":"meets_criteria","type":"boolean","description":"true when any of the five caller-assigned flags is true. Not a diagnosis. Not an imaging order."},{"name":"criteria_present","type":"integer","description":"Count of true flags, integer 0–5. Not a risk class."},{"name":"citation","type":"object","description":"Sitzman 2011 Plast Reconstr Surg citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"bony_stepoff_or_instability":"false","gcs_lt_14":"false","malocclusion":"false","periorbital_swelling_or_contusion":"false","tooth_absence":"false"},{"bony_stepoff_or_instability":"false","gcs_lt_14":"false","malocclusion":"false","periorbital_swelling_or_contusion":"false","tooth_absence":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/wisconsin-criteria","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/wisconsin-criteria?bony_stepoff_or_instability=false&periorbital_swelling_or_contusion=false&gcs_lt_14=false&malocclusion=false&tooth_absence=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/wisconsin-criteria","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/pediatric-nexus-ii","description":"Pediatric NEXUS II (Gupta 2018). Low-risk iff all seven flags are false: skull fracture, scalp hematoma, neurologic deficit, altered alertness, abnormal behavior, persistent vomiting, and coagulopathy. Age 0-17 is required but is not a criterion; adult NEXUS Head CT age >= 65 is dropped. Not a diagnosis, not a CT order, not Mower 2017 adult NEXUS Head CT, not PECARN, CATCH, or CHALICE, and not Hoffman 2000 NEXUS C-spine. magent does not examine the patient.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (integer 0-17). Required to match the Gupta 2018 pediatric population but is not a score criterion. Age 18 is rejected. Adult NEXUS Head CT age ≥ 65 is dropped.","required":true,"example":"10"},{"in":"query","name":"skull_fracture","type":"boolean","description":"Evidence of skull fracture as assigned by the caller. true means a skull-fracture finding is present and low_risk is false. true or false. magent does not examine the patient or read a radiograph.","required":true,"example":"false"},{"in":"query","name":"scalp_hematoma","type":"boolean","description":"Scalp hematoma as assigned by the caller. true means a scalp hematoma is present and low_risk is false. true or false. magent does not examine the scalp.","required":true,"example":"false"},{"in":"query","name":"neurologic_deficit","type":"boolean","description":"Neurologic deficit (neurosurgical deficits) as assigned by the caller. true means a deficit is present and low_risk is false. true or false. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"altered_alertness","type":"boolean","description":"Altered level of alertness as assigned by the caller. true means alertness is altered and low_risk is false. true or false. magent does not assign GCS.","required":true,"example":"false"},{"in":"query","name":"abnormal_behavior","type":"boolean","description":"Abnormal behavior as assigned by the caller. true means abnormal behavior is present and low_risk is false. true or false. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"persistent_vomiting","type":"boolean","description":"Persistent vomiting as assigned by the caller. true means persistent vomiting is present and low_risk is false. true or false. magent does not take a vomit count.","required":true,"example":"false"},{"in":"query","name":"coagulopathy","type":"boolean","description":"Coagulopathy as assigned by the caller. true means coagulopathy is present and low_risk is false. true or false. magent does not interpret a coagulation assay.","required":true,"example":"false"}],"errors":[{"code":"invalid_pediatric_nexus_age","message":"age must be an integer from 0 to 17 (Gupta 2018 Pediatric NEXUS II; age 18 is rejected). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/pediatric-nexus-ii","citation":{"authors":"Gupta M, Mower WR, Rodriguez RM, Hendey GW","doi":"10.1111/acem.13431","id":"gupta-2018","pmid":"29665151","source":"Acad Emerg Med. 2018;25(7):729-737","title":"Validation of the Pediatric NEXUS II Head Computed Tomography Decision Instrument for Selective Imaging of Pediatric Patients with Blunt Head Trauma.","url":"https://doi.org/10.1111/acem.13431"},"formula_expression":"low_risk iff no skull_fracture and no scalp_hematoma and no neurologic_deficit and no altered_alertness and no abnormal_behavior and no persistent_vomiting and no coagulopathy","purpose":"Apply the Gupta 2018 Pediatric NEXUS II seven-criterion decision instrument and return whether the child is low-risk (all seven caller-assigned flags false). Age 0-17 is required but is not a score criterion. CT may be omitted by this instrument when low-risk. Does not order a CT.","markdown_url":"https://magentlab.com/docs/pediatric-nexus-ii.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"pediatric_nexus_ii"},{"name":"formula_expression","type":"string","description":"Gupta 2018 seven-criterion Pediatric NEXUS II decision instrument"},{"name":"low_risk","type":"boolean","description":"true only when all seven flags are false. CT may be omitted by this instrument when true. Does not order a CT. Presence of a criterion does not mandate CT. Age is not a criterion. Not a diagnosis."},{"name":"age_years","type":"integer","description":"Age in years used to match the Gupta 2018 pediatric population; not a score criterion"},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met; met is true when that named finding is absent (no_skull_fracture, no_scalp_hematoma, no_neurologic_deficit, no_altered_alertness, no_abnormal_behavior, no_persistent_vomiting, no_coagulopathy)"},{"name":"citation","type":"object","description":"Gupta 2018 Acad Emerg Med citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"abnormal_behavior":"false","age":"10","altered_alertness":"false","coagulopathy":"false","neurologic_deficit":"false","persistent_vomiting":"false","scalp_hematoma":"false","skull_fracture":"false"},{"abnormal_behavior":"false","age":"10","altered_alertness":"false","coagulopathy":"false","neurologic_deficit":"false","persistent_vomiting":"false","scalp_hematoma":"false","skull_fracture":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/pediatric-nexus-ii","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/pediatric-nexus-ii?age=10&skull_fracture=false&scalp_hematoma=false&neurologic_deficit=false&altered_alertness=false&abnormal_behavior=false&persistent_vomiting=false&coagulopathy=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/pediatric-nexus-ii","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/denver-bcvi","description":"Modified Denver BCVI (Cothren 2005). Positive if any sign (arterial hemorrhage; cervical bruit age <50; expanding cervical hematoma; focal deficit; neuro exam incongruous with head CT; stroke on secondary CT) or any risk factor (LeFort II/III; C-spine subluxation, transverse foramen, or C1-C3; basilar skull with carotid canal; DAI with GCS <6; near hanging with anoxia). Imaging indicated when positive. Not Biffl grade, expanded Denver, NEXUS, or Canadian C-spine. magent does not read CTA.","parameters":[{"in":"query","name":"arterial_hemorrhage","type":"boolean","description":"Arterial hemorrhage as assigned by the caller (Cothren 2005 Table 1 sign). true or false. A true flag is a published indication for imaging. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"cervical_bruit_age_lt_50","type":"boolean","description":"Cervical bruit in a patient younger than 50 years as assigned by the caller (Cothren 2005 Table 1 sign). true or false. Caller assigns the published <50 indication; magent does not take numeric age.","required":true,"example":"false"},{"in":"query","name":"expanding_cervical_hematoma","type":"boolean","description":"Expanding cervical hematoma as assigned by the caller (Cothren 2005 Table 1 sign). true or false. A true flag is a published indication for imaging. magent does not examine the neck.","required":true,"example":"false"},{"in":"query","name":"focal_neuro_deficit","type":"boolean","description":"Focal neurologic deficit as assigned by the caller (Cothren 2005 Table 1 sign). true or false. A true flag is a published indication for imaging. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"neuro_exam_incongruous_head_ct","type":"boolean","description":"Neurologic exam incongruous with head CT scan findings as assigned by the caller (Cothren 2005 Table 1 sign). true or false. magent does not read a head CT.","required":true,"example":"false"},{"in":"query","name":"stroke_on_secondary_ct","type":"boolean","description":"Stroke on secondary CT scan as assigned by the caller (Cothren 2005 Table 1 sign). true or false. magent does not read a CT scan.","required":true,"example":"false"},{"in":"query","name":"lefort_ii_or_iii","type":"boolean","description":"High-energy transfer with LeFort II or III fracture as assigned by the caller (Cothren 2005 Table 1 risk factor). true or false. A true flag is a published indication for imaging. magent does not interpret facial imaging.","required":true,"example":"false"},{"in":"query","name":"cspine_subluxation_transverse_foramen_or_c1_c3","type":"boolean","description":"High-energy transfer with the published C-spine patterns (subluxation, fracture extending into the transverse foramen, or fracture of C1-C3) as assigned by the caller (Cothren 2005 Table 1 risk factor). true or false. Not any cervical-spine fracture. magent does not interpret C-spine imaging.","required":true,"example":"false"},{"in":"query","name":"basilar_skull_fracture_carotid_canal","type":"boolean","description":"High-energy transfer with basilar skull fracture with carotid canal involvement as assigned by the caller (Cothren 2005 Table 1 risk factor). true or false. magent does not interpret skull imaging.","required":true,"example":"false"},{"in":"query","name":"dai_gcs_lt_6","type":"boolean","description":"High-energy transfer with diffuse axonal injury and GCS <6 as assigned by the caller (Cothren 2005 Table 1 risk factor). true or false. Caller assigns the published compound; magent does not take a GCS integer.","required":true,"example":"false"},{"in":"query","name":"near_hanging_anoxic_brain_injury","type":"boolean","description":"High-energy transfer with near hanging and anoxic brain injury as assigned by the caller (Cothren 2005 Table 1 risk factor). true or false. magent does not classify mechanism.","required":true,"example":"false"}],"errors":[{"code":"invalid_denver_bcvi","message":"Modified Denver BCVI screening needs the published mechanism and sign flags from the cited trauma paper. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/denver-bcvi","citation":{"authors":"Cothren CC, Moore EE","doi":"10.1590/S1807-59322005000600011","id":"cothren-2005","pmid":"16358140","source":"Clinics (Sao Paulo). 2005;60(6):489-496","title":"Blunt cerebrovascular injuries","url":"https://doi.org/10.1590/S1807-59322005000600011"},"formula_expression":"screen positive iff any published sign (arterial hemorrhage, cervical bruit age <50, expanding cervical hematoma, focal neurologic deficit, neurologic exam incongruous with head CT, or stroke on secondary CT) or any published high-energy risk factor (LeFort II or III, C-spine subluxation or transverse-foramen or C1-C3 fracture, basilar skull fracture with carotid canal, DAI with GCS <6, or near hanging with anoxic brain injury); imaging indicated when screen positive","purpose":"Apply the Cothren 2005 modified Denver BCVI screening list and return whether any published sign or high-energy risk factor is present (imaging indicated by this screen).","markdown_url":"https://magentlab.com/docs/denver-bcvi.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"denver_bcvi"},{"name":"formula_expression","type":"string","description":"Cothren 2005 Table 1 any published sign or high-energy risk factor"},{"name":"screen_positive","type":"boolean","description":"true when any published Cothren 2005 Table 1 sign or high-energy risk factor is present. Imaging is indicated by this screen when true. Not a diagnosis. Not a Biffl grade."},{"name":"imaging_indicated","type":"boolean","description":"true when screen_positive is true. magent does not read a CT angiogram and does not assign Biffl grade I-V."},{"name":"sign_positive","type":"boolean","description":"true when any of the six published Table 1 signs is present"},{"name":"risk_factor_positive","type":"boolean","description":"true when any of the five published Table 1 high-energy risk factors is present"},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met; met is true when that Cothren 2005 Table 1 indication is present"},{"name":"citation","type":"object","description":"Cothren 2005 Clinics citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"arterial_hemorrhage":"false","basilar_skull_fracture_carotid_canal":"false","cervical_bruit_age_lt_50":"false","cspine_subluxation_transverse_foramen_or_c1_c3":"false","dai_gcs_lt_6":"false","expanding_cervical_hematoma":"false","focal_neuro_deficit":"false","lefort_ii_or_iii":"false","near_hanging_anoxic_brain_injury":"false","neuro_exam_incongruous_head_ct":"false","stroke_on_secondary_ct":"false"},{"arterial_hemorrhage":"false","basilar_skull_fracture_carotid_canal":"false","cervical_bruit_age_lt_50":"false","cspine_subluxation_transverse_foramen_or_c1_c3":"false","dai_gcs_lt_6":"false","expanding_cervical_hematoma":"false","focal_neuro_deficit":"false","lefort_ii_or_iii":"false","near_hanging_anoxic_brain_injury":"false","neuro_exam_incongruous_head_ct":"false","stroke_on_secondary_ct":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/denver-bcvi","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/denver-bcvi?arterial_hemorrhage=false&cervical_bruit_age_lt_50=false&expanding_cervical_hematoma=false&focal_neuro_deficit=false&neuro_exam_incongruous_head_ct=false&stroke_on_secondary_ct=false&lefort_ii_or_iii=false&cspine_subluxation_transverse_foramen_or_c1_c3=false&basilar_skull_fracture_carotid_canal=false&dai_gcs_lt_6=false&near_hanging_anoxic_brain_injury=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/denver-bcvi","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/tlics","description":"Vaccaro 2005 TLICS: morphology compression 1 / burst 2 / translational_rotational 3 / distraction 4 (single most severe) + plc intact 0 / suspected_indeterminate 2 / injured 3 + neuro intact 0 / nerve_root 2 / complete_cord_conus 2 / incomplete_cord_conus 3 / cauda_equina 3. Max 10. Bands 0-3 nonoperative, 4 equivocal, >=5 operative guidance. Not a surgical order. Not AO spine. Not SINS (neoplastic). magent does not read imaging. Not a medical device.","parameters":[{"in":"query","name":"morphology","type":"string","enum":["compression","burst","translational_rotational","distraction"],"description":"Caller-assigned single most severe injury morphology (Vaccaro 2005). compression scores 1; burst scores 2; translational_rotational scores 3; distraction scores 4. Do not sum multiple morphologies. magent does not read imaging.","required":true,"example":"compression"},{"in":"query","name":"plc","type":"string","enum":["intact","suspected_indeterminate","injured"],"description":"Caller-assigned posterior ligamentous complex integrity (Vaccaro 2005). intact scores 0; suspected_indeterminate scores 2; injured scores 3. magent does not examine the patient or read imaging.","required":true,"example":"intact"},{"in":"query","name":"neuro","type":"string","enum":["intact","nerve_root","complete_cord_conus","incomplete_cord_conus","cauda_equina"],"description":"Caller-assigned neurologic status (Vaccaro 2005). intact scores 0; nerve_root scores 2; complete_cord_conus scores 2; incomplete_cord_conus scores 3; cauda_equina scores 3. magent does not examine the patient.","required":true,"example":"intact"}],"errors":[{"code":"invalid_tlics","message":"morphology must be compression, burst, translational_rotational, or distraction; plc must be intact, suspected_indeterminate, or injured; neuro must be intact, nerve_root, complete_cord_conus, incomplete_cord_conus, or cauda_equina (Vaccaro 2005 TLICS). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/tlics","citation":{"authors":"Vaccaro AR, Lehman RA Jr, Hurlbert RJ, et al.","doi":"10.1097/01.brs.0000182986.43345.cb","id":"vaccaro-2005","pmid":"16227897","source":"Spine (Phila Pa 1976). 2005;30(20):2325-2333","title":"A new classification of thoracolumbar injuries: the importance of injury morphology, the integrity of the posterior ligamentous complex, and neurologic status.","url":"https://doi.org/10.1097/01.brs.0000182986.43345.cb"},"formula_expression":"TLICS = morphology (compression 1, burst 2, translational_rotational 3, distraction 4) + plc (intact 0, suspected_indeterminate 2, injured 3) + neuro (intact 0, nerve_root 2, complete_cord_conus 2, incomplete_cord_conus 3, cauda_equina 3); Vaccaro 2005; max 10; caller assigns the single most severe morphology; bands 0-3 / 4 / ge_5","purpose":"Sum the Vaccaro 2005 Thoracolumbar Injury Classification and Severity (TLICS) score from caller-assigned injury morphology, posterior ligamentous complex integrity, and neurologic status, and return the published 0–10 total and treatment-guidance band.","markdown_url":"https://magentlab.com/docs/tlics.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"tlics"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Vaccaro 2005 TLICS total 0-10"},{"name":"max_score","type":"integer","description":"10"},{"name":"tlics_band","type":"string","description":"Vaccaro 2005 Table 2 band: 0-3 (nonoperative guidance), 4 (equivocal), or ge_5 (operative guidance). Not a surgical order."},{"name":"components","type":"array","description":"Per-factor Vaccaro 2005 points"},{"name":"citation","type":"object","description":"Vaccaro et al. Spine 2005 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"morphology":"compression","neuro":"intact","plc":"intact"},{"morphology":"compression","neuro":"intact","plc":"intact"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/tlics","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/tlics?morphology=compression&plc=intact&neuro=intact","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/tlics","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/slics","description":"Vaccaro 2007 SLICS: morphology none 0 / compression 1 / burst 2 / distraction 3 / rotation_translation 4 (single most severe) + dlc intact 0 / indeterminate 1 / disrupted 2 + neuro intact 0 / root 1 / complete 2 / incomplete 3 + continuous_cord_compression +1 only with a deficit. Max 10. Bands 0-3 / 4 / >=5 treatment guidance. Not a surgical order. Not TLICS (thoracolumbar). Not AO spine. Not SINS. magent does not read imaging. Not a medical device.","parameters":[{"in":"query","name":"morphology","type":"string","enum":["none","compression","burst","distraction","rotation_translation"],"description":"Caller-assigned single most severe injury morphology (Vaccaro 2007). none scores 0; compression scores 1; burst scores 2; distraction scores 3; rotation_translation scores 4. Burst already includes compression; do not sum morphologies. magent does not read imaging.","required":true,"example":"none"},{"in":"query","name":"dlc","type":"string","enum":["intact","indeterminate","disrupted"],"description":"Caller-assigned disco-ligamentous complex integrity (Vaccaro 2007). intact scores 0; indeterminate scores 1; disrupted scores 2. Not TLICS PLC (0/2/3). magent does not examine the patient or read imaging.","required":true,"example":"intact"},{"in":"query","name":"neuro","type":"string","enum":["intact","root","complete","incomplete"],"description":"Caller-assigned neurologic status (Vaccaro 2007). intact scores 0; root scores 1; complete scores 2; incomplete scores 3. magent does not examine the patient.","required":true,"example":"intact"},{"in":"query","name":"continuous_cord_compression","type":"boolean","description":"Adds 1 only when neuro is not intact (Vaccaro 2007). Must be false when neuro is intact. true or false. magent does not read imaging.","required":true,"example":"false"}],"errors":[{"code":"invalid_slics","message":"morphology must be none, compression, burst, distraction, or rotation_translation; dlc must be intact, indeterminate, or disrupted; neuro must be intact, root, complete, or incomplete; continuous_cord_compression must be true or false and may be true only when neuro is not intact (Vaccaro 2007 SLICS). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/slics","citation":{"authors":"Vaccaro AR, Hulbert RJ, Patel AA, et al.","doi":"10.1097/brs.0b013e3181557b92","id":"vaccaro-2007","pmid":"17906580","source":"Spine. 2007;32(21):2365-2374","title":"The subaxial cervical spine injury classification system: a novel approach to recognize the importance of morphology, neurology, and integrity of the disco-ligamentous complex","url":"https://doi.org/10.1097/brs.0b013e3181557b92"},"formula_expression":"SLICS = morphology (none 0, compression 1, burst 2, distraction 3, rotation_translation 4) + dlc (intact 0, indeterminate 1, disrupted 2) + neuro (intact 0, root 1, complete 2, incomplete 3) + continuous_cord_compression (+1 only when neuro is not intact); Vaccaro 2007; max 10; caller assigns the single most severe morphology; bands 0-3 / 4 / ge_5","purpose":"Sum the Vaccaro 2007 Subaxial Cervical Spine Injury Classification (SLICS) score from caller-assigned injury morphology, disco-ligamentous complex integrity, neurologic status, and continuous cord compression, and return the published 0–10 total and treatment-guidance band.","markdown_url":"https://magentlab.com/docs/slics.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"slics"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Vaccaro 2007 SLICS total 0-10"},{"name":"max_score","type":"integer","description":"10"},{"name":"slics_band","type":"string","description":"Vaccaro 2007 treatment-guidance band: 0-3, 4, or ge_5 (>=5). Not a surgical order."},{"name":"components","type":"array","description":"Per-factor Vaccaro 2007 points"},{"name":"citation","type":"object","description":"Vaccaro et al. Spine 2007 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"continuous_cord_compression":"false","dlc":"intact","morphology":"none","neuro":"intact"},{"continuous_cord_compression":"false","dlc":"intact","morphology":"none","neuro":"intact"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/slics","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/slics?morphology=none&dlc=intact&neuro=intact&continuous_cord_compression=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/slics","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/sins","description":"Fisher 2010 SINS. Location junctional 3 / mobile 2 / semirigid 1 / rigid 0. Pain mechanical 3 / occasional_not_mechanical 1 / pain_free 0. Bone lytic 2 / mixed 1 / blastic 0. Alignment subluxation_translation 4 / de_novo_deformity 2 / normal 0. Collapse gt_50 3 / le_50 2 / no_collapse_gt_50pct_body 1 / none 0. Posterolateral bilateral 3 / unilateral 1 / none 0. Max 18. Integer sum only; not later SOSG strata, not TLICS, not an operative order. magent does not read imaging. Not a medical device.","parameters":[{"in":"query","name":"location","type":"string","enum":["junctional","mobile","semirigid","rigid"],"description":"Caller-assigned SINS location (Fisher 2010 Table 8). junctional (occiput-C2, C7–T2, T11–L1, L5–S1) scores 3; mobile (C3–C6, L2–L4) scores 2; semirigid (T3–T10) scores 1; rigid (S2–S5) scores 0. magent does not read imaging.","required":true,"example":"rigid"},{"in":"query","name":"pain","type":"string","enum":["mechanical","occasional_not_mechanical","pain_free"],"description":"Caller-assigned pain (Fisher 2010): pain relief with recumbency and/or pain with movement/loading. mechanical (yes) scores 3; occasional_not_mechanical (occasional pain but not mechanical) scores 1; pain_free scores 0. magent does not interview the patient.","required":true,"example":"pain_free"},{"in":"query","name":"bone","type":"string","enum":["lytic","mixed","blastic"],"description":"Caller-assigned bone lesion quality (Fisher 2010). lytic scores 2; mixed scores 1; blastic scores 0. magent does not read imaging.","required":true,"example":"blastic"},{"in":"query","name":"alignment","type":"string","enum":["subluxation_translation","de_novo_deformity","normal"],"description":"Caller-assigned radiographic spinal alignment (Fisher 2010). subluxation_translation scores 4; de_novo_deformity (kyphosis/scoliosis) scores 2; normal scores 0. magent does not read imaging.","required":true,"example":"normal"},{"in":"query","name":"collapse","type":"string","enum":["gt_50","le_50","no_collapse_gt_50pct_body","none"],"description":"Caller-assigned vertebral body collapse (Fisher 2010). gt_50 (>50% collapse) scores 3; le_50 (≤50% collapse) scores 2; no_collapse_gt_50pct_body (no collapse with >50% body involved) scores 1; none scores 0. magent does not read imaging.","required":true,"example":"none"},{"in":"query","name":"posterolateral","type":"string","enum":["bilateral","unilateral","none"],"description":"Caller-assigned posterolateral involvement of spinal elements (facet, pedicle, or costovertebral joint fracture or replacement with tumor; Fisher 2010). bilateral scores 3; unilateral scores 1; none scores 0. magent does not read imaging.","required":true,"example":"none"}],"errors":[{"code":"invalid_sins","message":"SINS items must use Fisher 2010 values (location junctional/mobile/semirigid/rigid; pain mechanical/occasional_not_mechanical/pain_free; bone lytic/mixed/blastic; alignment subluxation_translation/de_novo_deformity/normal; collapse gt_50/le_50/no_collapse_gt_50pct_body/none; posterolateral bilateral/unilateral/none). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/sins","citation":{"authors":"Fisher CG, DiPaola CP, Ryken TC, et al.","doi":"10.1097/BRS.0b013e3181e16ae2","id":"fisher-2010","pmid":"20562730","source":"Spine (Phila Pa 1976). 2010;35(22):E1221-E1229","title":"A novel classification system for spinal instability in neoplastic disease: an evidence-based approach and expert consensus from the Spine Oncology Study Group.","url":"https://doi.org/10.1097/BRS.0b013e3181e16ae2"},"formula_expression":"SINS = location (junctional 3, mobile 2, semirigid 1, rigid 0) + pain (mechanical 3, occasional_not_mechanical 1, pain_free 0) + bone (lytic 2, mixed 1, blastic 0) + alignment (subluxation_translation 4, de_novo_deformity 2, normal 0) + collapse (gt_50 3, le_50 2, no_collapse_gt_50pct_body 1, none 0) + posterolateral (bilateral 3, unilateral 1, none 0); Fisher 2010 Table 8; max 18","purpose":"Sum the Fisher 2010 Spinal Instability Neoplastic Score from six caller-assigned items and return the published 0–18 integer total. Not later SOSG stability strata and not an operative order.","markdown_url":"https://magentlab.com/docs/sins.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"sins"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Fisher 2010 SINS integer sum 0-18. Not later SOSG stability strata."},{"name":"max_score","type":"integer","description":"18"},{"name":"location","type":"string","description":"Caller-assigned location used (junctional, mobile, semirigid, or rigid)"},{"name":"pain","type":"string","description":"Caller-assigned pain used (mechanical, occasional_not_mechanical, or pain_free)"},{"name":"bone","type":"string","description":"Caller-assigned bone lesion quality used (lytic, mixed, or blastic)"},{"name":"alignment","type":"string","description":"Caller-assigned alignment used (subluxation_translation, de_novo_deformity, or normal)"},{"name":"collapse","type":"string","description":"Caller-assigned vertebral body collapse used (gt_50, le_50, no_collapse_gt_50pct_body, or none)"},{"name":"posterolateral","type":"string","description":"Caller-assigned posterolateral involvement used (bilateral, unilateral, or none)"},{"name":"components","type":"array","description":"Per-factor Fisher 2010 Table 8 points"},{"name":"citation","type":"object","description":"Fisher et al. Spine 2010 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"alignment":"normal","bone":"blastic","collapse":"none","location":"rigid","pain":"pain_free","posterolateral":"none"},{"alignment":"normal","bone":"blastic","collapse":"none","location":"rigid","pain":"pain_free","posterolateral":"none"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/sins","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/sins?location=rigid&pain=pain_free&bone=blastic&alignment=normal&collapse=none&posterolateral=none","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/sins","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/mirels","description":"Mirels 1989 impending pathologic fracture score. Site upper 1 / lower 2 / peritrochanteric 3. Size lt_one_third 1 / one_to_two_thirds 2 / gt_two_thirds 3. Nature blastic 1 / mixed 2 / lytic 3. Pain mild 1 / moderate 2 / functional 3 (not severe). Sum 4-12. Bands le_7 (<=7), 8, ge_9 (>=9). Not an operative order. Not SINS. magent does not read radiographs. Not a medical device.","parameters":[{"in":"query","name":"site","type":"string","enum":["upper","lower","peritrochanteric"],"description":"Caller-assigned site (Mirels 1989). upper (upper limb) scores 1; lower (lower limb) scores 2; peritrochanteric scores 3. magent does not read radiographs.","required":true,"example":"upper"},{"in":"query","name":"size","type":"string","enum":["lt_one_third","one_to_two_thirds","gt_two_thirds"],"description":"Caller-assigned lesion size relative to bone diameter (Mirels 1989). lt_one_third (<1/3) scores 1; one_to_two_thirds (1/3–2/3) scores 2; gt_two_thirds (>2/3) scores 3. magent does not read radiographs.","required":true,"example":"lt_one_third"},{"in":"query","name":"nature","type":"string","enum":["blastic","mixed","lytic"],"description":"Caller-assigned lesion nature (Mirels 1989). blastic scores 1; mixed scores 2; lytic scores 3. magent does not read radiographs.","required":true,"example":"blastic"},{"in":"query","name":"pain","type":"string","enum":["mild","moderate","functional"],"description":"Caller-assigned pain (Mirels 1989). mild scores 1; moderate scores 2; functional (pain that is functional) scores 3. Not severe. magent does not interview the patient.","required":true,"example":"mild"}],"errors":[{"code":"invalid_mirels","message":"site must be upper, lower, or peritrochanteric; size must be lt_one_third, one_to_two_thirds, or gt_two_thirds; nature must be blastic, mixed, or lytic; pain must be mild, moderate, or functional (Mirels 1989). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/mirels","citation":{"authors":"Mirels H","id":"mirels-1989","pmid":"2684463","source":"Clin Orthop Relat Res. 1989;(249):256-264","title":"Metastatic disease in long bones. A proposed scoring system for diagnosing impending pathologic fractures.","url":"https://pubmed.ncbi.nlm.nih.gov/2684463"},"formula_expression":"Mirels = site (upper 1, lower 2, peritrochanteric 3) + size (lt_one_third 1, one_to_two_thirds 2, gt_two_thirds 3) + nature (blastic 1, mixed 2, lytic 3) + pain (mild 1, moderate 2, functional 3); Mirels 1989; sum 4-12; bands le_7 (<=7), 8, ge_9 (>=9)","purpose":"Sum the Mirels 1989 score for diagnosing impending pathologic fractures in long-bone metastatic disease from four caller-assigned items and return the published 4–12 integer total and band (≤7 / 8 / ≥9). Not an operative order and not SINS.","markdown_url":"https://magentlab.com/docs/mirels.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"mirels"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Mirels 1989 integer sum 4-12. Not an operative order."},{"name":"max_score","type":"integer","description":"12"},{"name":"mirels_band","type":"string","description":"Mirels 1989 band: le_7 (score ≤7), 8 (score 8), or ge_9 (score ≥9). Not a surgical order."},{"name":"site","type":"string","description":"Caller-assigned site used (upper, lower, or peritrochanteric)"},{"name":"size","type":"string","description":"Caller-assigned size used (lt_one_third, one_to_two_thirds, or gt_two_thirds)"},{"name":"nature","type":"string","description":"Caller-assigned nature used (blastic, mixed, or lytic)"},{"name":"pain","type":"string","description":"Caller-assigned pain used (mild, moderate, or functional)"},{"name":"components","type":"array","description":"Per-factor Mirels 1989 points"},{"name":"citation","type":"object","description":"Mirels Clin Orthop Relat Res 1989 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"nature":"blastic","pain":"mild","site":"upper","size":"lt_one_third"},{"nature":"blastic","pain":"mild","site":"upper","size":"lt_one_third"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/mirels","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/mirels?site=upper&size=lt_one_third&nature=blastic&pain=mild","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/mirels","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/tokuhashi","description":"Revised Tokuhashi 2005 (0-15). KPS poor/moderate/good 0/1/2. Extraspinal ge_3/one_or_two/none 0/1/2. Vertebral ge_3/two/one 0/1/2. Visceral unremovable/removable/none 0/1/2. Primary lung osteosarcoma stomach bladder esophagus pancreas 0; liver gallbladder unidentified 1; others 2; kidney uterus 3; rectum 4; thyroid prostate breast carcinoid 5. Palsy complete/incomplete/none 0/1/2. Bands 0-8/9-11/12-15. Not an operative order. Not 1990. Not SINS. Does not read imaging. Not a medical device.","parameters":[{"in":"query","name":"kps","type":"string","enum":["poor","moderate","good"],"description":"Caller-assigned Karnofsky performance status band (Tokuhashi 2005). poor (KPS 10–40%) scores 0; moderate (50–70%) scores 1; good (80–100%) scores 2. magent does not observe the patient.","required":true,"example":"poor"},{"in":"query","name":"extraspinal","type":"string","enum":["ge_3","one_or_two","none"],"description":"Caller-assigned number of extraspinal bone metastases (Tokuhashi 2005). ge_3 (≥3) scores 0; one_or_two scores 1; none scores 2. magent does not read imaging.","required":true,"example":"ge_3"},{"in":"query","name":"vertebral","type":"string","enum":["ge_3","two","one"],"description":"Caller-assigned number of vertebral metastases (Tokuhashi 2005). ge_3 (≥3) scores 0; two scores 1; one scores 2. There is no vertebral none token. magent does not read imaging.","required":true,"example":"ge_3"},{"in":"query","name":"visceral","type":"string","enum":["unremovable","removable","none"],"description":"Caller-assigned metastases to major internal organs (Tokuhashi 2005). unremovable scores 0; removable scores 1; none scores 2. magent does not read imaging.","required":true,"example":"unremovable"},{"in":"query","name":"primary","type":"string","enum":["lung","osteosarcoma","stomach","bladder","esophagus","pancreas","liver","gallbladder","unidentified","others","kidney","uterus","rectum","thyroid","prostate","breast","carcinoid"],"description":"Caller-assigned Tokuhashi 2005 primary site group. lung, osteosarcoma, stomach, bladder, esophagus, pancreas score 0; liver, gallbladder, unidentified score 1; others scores 2; kidney, uterus score 3; rectum scores 4; thyroid, prostate, breast, carcinoid score 5. others is the published catch-all token. magent does not infer histology.","required":true,"example":"lung"},{"in":"query","name":"palsy","type":"string","enum":["complete","incomplete","none"],"description":"Caller-assigned spinal cord palsy (Tokuhashi 2005). complete (Frankel A/B) scores 0; incomplete (Frankel C/D) scores 1; none (Frankel E) scores 2. magent does not examine the patient.","required":true,"example":"complete"}],"errors":[{"code":"invalid_tokuhashi","message":"kps must be poor, moderate, or good; extraspinal must be ge_3, one_or_two, or none; vertebral must be ge_3, two, or one; visceral must be unremovable, removable, or none; primary must be a Tokuhashi 2005 site group; palsy must be complete, incomplete, or none (revised Tokuhashi 0-15). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/tokuhashi","citation":{"authors":"Tokuhashi Y, Matsuzaki H, Oda H, Oshima M, Ryu J","doi":"10.1097/01.brs.0000180401.06919.a5","id":"tokuhashi-2005","pmid":"16205345","source":"Spine (Phila Pa 1976). 2005;30(19):2186-2191","title":"A revised scoring system for preoperative evaluation of metastatic spine tumor prognosis.","url":"https://doi.org/10.1097/01.brs.0000180401.06919.a5"},"formula_expression":"Tokuhashi = kps (poor 0, moderate 1, good 2) + extraspinal (ge_3 0, one_or_two 1, none 2) + vertebral (ge_3 0, two 1, one 2) + visceral (unremovable 0, removable 1, none 2) + primary (lung osteosarcoma stomach bladder esophagus pancreas 0; liver gallbladder unidentified 1; others 2; kidney uterus 3; rectum 4; thyroid prostate breast carcinoid 5) + palsy (complete 0, incomplete 1, none 2); Tokuhashi 2005 revised; max 15; bands 0-8 (<6 months), 9-11 (>=6 months), 12-15 (>=12 months)","purpose":"Sum the revised Tokuhashi 2005 score for preoperative evaluation of metastatic spine tumor prognosis from six caller-assigned items and return the published 0–15 integer total and predicted-survival band (0–8 / 9–11 / 12–15). Not an operative order and not original Tokuhashi 1990.","markdown_url":"https://magentlab.com/docs/tokuhashi.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"tokuhashi"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Revised Tokuhashi 2005 integer sum 0-15. Not an operative order."},{"name":"max_score","type":"integer","description":"15"},{"name":"tokuhashi_band","type":"string","description":"Tokuhashi 2005 predicted-survival band: 0-8 (score 0–8, <6 months), 9-11 (score 9–11, ≥6 months), or 12-15 (score 12–15, ≥12 months). Not a surgical order."},{"name":"kps","type":"string","description":"Caller-assigned KPS band used (poor, moderate, or good)"},{"name":"extraspinal","type":"string","description":"Caller-assigned extraspinal bone mets used (ge_3, one_or_two, or none)"},{"name":"vertebral","type":"string","description":"Caller-assigned vertebral mets used (ge_3, two, or one)"},{"name":"visceral","type":"string","description":"Caller-assigned visceral mets used (unremovable, removable, or none)"},{"name":"primary","type":"string","description":"Caller-assigned Tokuhashi 2005 primary site group used"},{"name":"palsy","type":"string","description":"Caller-assigned palsy used (complete, incomplete, or none)"},{"name":"components","type":"array","description":"Per-factor Tokuhashi 2005 points"},{"name":"citation","type":"object","description":"Tokuhashi et al. Spine 2005 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"extraspinal":"ge_3","kps":"poor","palsy":"complete","primary":"lung","vertebral":"ge_3","visceral":"unremovable"},{"extraspinal":"ge_3","kps":"poor","palsy":"complete","primary":"lung","vertebral":"ge_3","visceral":"unremovable"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/tokuhashi","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/tokuhashi?kps=poor&extraspinal=ge_3&vertebral=ge_3&visceral=unremovable&primary=lung&palsy=complete","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/tokuhashi","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/fracture-index","description":"Black 2001 FRACTURE Index with known total-hip T-score. Age <65 0 through >=85 5. T >= -1 0; -2 <= T < -1 2; -2.5 <= T < -2 3; T < -2.5 4. Fracture after 50, maternal hip after 50, weight <=125 lb, smoker +1 each; arms to stand +2. Max 15. 5-year hip/vertebral/nonvertebral percents from printed quintiles 1-2, 3-4, 5, 6-7, 8-13. Age 18-120; T -5.0 to 4.0. Not a device, not FRAX, not a DXA order. Postmenopausal derivation; magent does not DXA-scan or take a history.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (integer 18-120). Black 2001 FRACTURE Index: <65 scores 0; 65-69 scores 1; 70-74 scores 2; 75-79 scores 3; 80-84 scores 4; >=85 scores 5. Derivation was postmenopausal SOF women age 65 or older; the published instrument still lists <65 as 0.","required":true,"example":"60"},{"in":"query","name":"bmd_t_score","type":"number","description":"Caller-assigned total-hip BMD T-score (number -5.0 to 4.0). Black 2001 with-BMD instrument: T >= -1 scores 0; -2 <= T < -1 scores 2; -2.5 <= T < -2 scores 3; T < -2.5 scores 4. magent does not DXA-scan.","required":true,"example":"-0.5"},{"in":"query","name":"fracture_after_50","type":"boolean","description":"Any fracture after age 50 (Black 2001). true scores 1; false scores 0. true or false. magent does not take a history.","required":true,"example":"false"},{"in":"query","name":"maternal_hip_fracture_after_50","type":"boolean","description":"Maternal hip fracture after age 50 (Black 2001). true scores 1; false scores 0. true or false. magent does not take a history.","required":true,"example":"false"},{"in":"query","name":"weight_le_125_lb","type":"boolean","description":"Weight 125 pounds (57 kg) or less (Black 2001). true scores 1; false scores 0. true or false. magent does not weigh the patient.","required":true,"example":"false"},{"in":"query","name":"current_smoker","type":"boolean","description":"Current smoker (Black 2001). true scores 1; false scores 0. true or false. magent does not take a smoking history.","required":true,"example":"false"},{"in":"query","name":"arms_to_stand","type":"boolean","description":"Usually needs arms to stand from a chair (Black 2001). true scores 2; false scores 0. true or false. magent does not examine the patient.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_t_score","message":"bmd_t_score must be a number from -5.0 to 4.0 (Black 2001 Fracture Index T-score). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/fracture-index","citation":{"authors":"Black DM, Steinbuch M, Palermo L, et al.","doi":"10.1007/s001980170072","id":"black-2001","pmid":"11527048","source":"Osteoporos Int. 2001;12(7):519-528","title":"An assessment tool for predicting fracture risk in postmenopausal women","url":"https://doi.org/10.1007/s001980170072"},"formula_expression":"FRACTURE Index (with BMD) = age (<65 0, 65-69 1, 70-74 2, 75-79 3, 80-84 4, >=85 5) + total_hip_T (>= -1 0, -2 <= T < -1 2, -2.5 <= T < -2 3, T < -2.5 4) + fracture_after_50 1 + maternal_hip_fracture_after_50 1 + weight_le_125_lb 1 + current_smoker 1 + arms_to_stand 2; Black 2001; max 15; 5-year hip/vertebral/nonvertebral percents by printed quintiles 1-2, 3-4, 5, 6-7, 8-13 (score >=8 maps to 8-13); score 0 unpublished","purpose":"Sum the Black 2001 FRACTURE Index with known total-hip BMD T-score from age, T-score, fracture after 50, maternal hip fracture after 50, weight ≤125 lb, current smoking, and arms to stand, then return the integer total and the printed 5-year hip, vertebral, and nonvertebral percents for that quintile.","markdown_url":"https://magentlab.com/docs/fracture-index.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"fracture_index"},{"name":"formula_expression","type":"string","description":"Exact Black 2001 with-BMD FRACTURE Index expression"},{"name":"score","type":"integer","description":"FRACTURE Index points with known BMD; published range 0-15"},{"name":"max_score","type":"integer","description":"15 (5 + 4 + 1 + 1 + 1 + 1 + 2)"},{"name":"score_group","type":"string","description":"Black 2001 with-BMD printed quintile: 1-2, 3-4, 5, 6-7, or 8-13. Score >=8 maps to 8-13. Null when score is 0 (no printed cell)."},{"name":"hip_risk_5y_percent","type":"number","description":"Black 2001 with-BMD 5-year hip fracture percent for that printed quintile; null when score is 0"},{"name":"vertebral_risk_5y_percent","type":"number","description":"Black 2001 with-BMD 5-year vertebral fracture percent for that printed quintile; null when score is 0"},{"name":"nonvertebral_risk_5y_percent","type":"number","description":"Black 2001 with-BMD 5-year nonvertebral fracture percent for that printed quintile; null when score is 0"},{"name":"age","type":"integer","description":"Caller-supplied age in years used for age points"},{"name":"bmd_t_score","type":"number","description":"Caller-supplied total-hip T-score used for T-score points"},{"name":"fracture_after_50","type":"boolean","description":"Caller-supplied fracture-after-50 flag; true scores 1"},{"name":"maternal_hip_fracture_after_50","type":"boolean","description":"Caller-supplied maternal hip-fracture-after-50 flag; true scores 1"},{"name":"weight_le_125_lb","type":"boolean","description":"Caller-supplied weight <=125 lb flag; true scores 1"},{"name":"current_smoker","type":"boolean","description":"Caller-supplied current-smoker flag; true scores 1"},{"name":"arms_to_stand","type":"boolean","description":"Caller-supplied arms-to-stand flag; true scores 2"},{"name":"age_score","type":"integer","description":"Age band points: 0, 1, 2, 3, 4, or 5"},{"name":"t_score_points","type":"integer","description":"Total-hip T-score points: 0, 2, 3, or 4"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Black 2001 Osteoporos Int citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"60","arms_to_stand":"false","bmd_t_score":"-0.5","current_smoker":"false","fracture_after_50":"false","maternal_hip_fracture_after_50":"false","weight_le_125_lb":"false"},{"age":"60","arms_to_stand":"false","bmd_t_score":"-0.5","current_smoker":"false","fracture_after_50":"false","maternal_hip_fracture_after_50":"false","weight_le_125_lb":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/fracture-index","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/fracture-index?age=60&bmd_t_score=-0.5&fracture_after_50=false&maternal_hip_fracture_after_50=false&weight_le_125_lb=false&current_smoker=false&arms_to_stand=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/fracture-index","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/canadian-c-spine","description":"Canadian C-spine rule (Stiell 2001). Cervical radiography is indicated if any high-risk factor is present (age ≥65, dangerous mechanism, or paresthesias in the extremities). If none, radiography is indicated unless at least one low-risk factor allows safe range-of-motion assessment and the patient can rotate the neck 45° left and right. Not a diagnosis, not NEXUS, and not pediatric. For alert, stable blunt-trauma adults with GCS 15. magent does not examine the neck.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Age ≥65 is a high-risk factor that mandates radiography; 64 does not.","required":true,"example":"40"},{"in":"query","name":"dangerous_mechanism","type":"boolean","description":"Dangerous mechanism as assigned by the caller. true or false. High-risk; when true, radiography is indicated without range-of-motion assessment.","required":true,"example":"false"},{"in":"query","name":"paresthesias_extremities","type":"boolean","description":"Paresthesias in the extremities. true or false as assigned by the caller. High-risk; when true, radiography is indicated without range-of-motion assessment.","required":true,"example":"false"},{"in":"query","name":"simple_rear_end_mvc","type":"boolean","description":"Simple rear-end motor vehicle collision as assigned by the caller. true or false. A low-risk factor that can allow safe range-of-motion assessment.","required":true,"example":"false"},{"in":"query","name":"sitting_in_ed","type":"boolean","description":"Sitting position in the emergency department. true or false as assigned by the caller. A low-risk factor that can allow safe range-of-motion assessment.","required":true,"example":"false"},{"in":"query","name":"ambulatory_since_injury","type":"boolean","description":"Ambulatory at any time since injury. true or false as assigned by the caller. A low-risk factor that can allow safe range-of-motion assessment.","required":true,"example":"false"},{"in":"query","name":"delayed_neck_pain","type":"boolean","description":"Delayed onset of neck pain. true or false as assigned by the caller. A low-risk factor that can allow safe range-of-motion assessment.","required":true,"example":"true"},{"in":"query","name":"midline_cspine_tenderness","type":"boolean","description":"Midline cervical-spine tenderness. true or false as assigned by the caller. Absence of midline tenderness (false) is a low-risk factor that can allow safe range-of-motion assessment.","required":true,"example":"true"},{"in":"query","name":"able_to_rotate_45","type":"boolean","description":"Able to actively rotate the neck 45 degrees left and right. true or false as assigned by the caller. Consulted only when there is no high-risk factor and at least one low-risk factor.","required":true,"example":"true"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/canadian-c-spine","citation":{"authors":"Stiell IG, Wells GA, Vandemheen KL, et al.","doi":"10.1001/jama.286.15.1841","id":"stiell-2001","source":"JAMA. 2001;286(15):1841-1848","title":"The Canadian C-spine rule for radiography in alert and stable trauma patients","url":"https://doi.org/10.1001/jama.286.15.1841"},"formula_expression":"xray indicated if any high-risk (age >= 65 or dangerous_mechanism or paresthesias_extremities); else if no low-risk allowing ROM (simple_rear_end_mvc or sitting_in_ed or ambulatory_since_injury or delayed_neck_pain or midline_cspine_tenderness false); else if not able_to_rotate_45","purpose":"Apply the Stiell 2001 Canadian C-spine rule and return whether cervical radiography is indicated from caller-assigned age, high-risk factors, low-risk factors, and neck rotation.","markdown_url":"https://magentlab.com/docs/canadian-c-spine.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"canadian_c_spine"},{"name":"formula_expression","type":"string","description":"Stiell 2001 ordered high-risk, low-risk, then rotation rule"},{"name":"xray_indicated","type":"boolean","description":"true when the ordered Canadian C-spine rule indicates cervical radiography. Not a diagnosis of injury."},{"name":"high_risk","type":"boolean","description":"true when age ≥65, dangerous_mechanism, or paresthesias_extremities. Mandates radiography."},{"name":"low_risk_allows_rom","type":"boolean","description":"true when at least one published low-risk factor allows safe range-of-motion assessment"},{"name":"able_to_rotate_45","type":"boolean","description":"Caller-assigned ability to rotate the neck 45 degrees left and right"},{"name":"age_years","type":"integer","description":"Age used for the ≥65 high-risk factor"},{"name":"criteria","type":"array","description":"Ordered tree rows for high_risk, low_risk_allows_rom, and able_to_rotate_45 with factor and met"},{"name":"citation","type":"object","description":"Stiell 2001 JAMA citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"able_to_rotate_45":"true","age":"40","ambulatory_since_injury":"false","dangerous_mechanism":"false","delayed_neck_pain":"true","midline_cspine_tenderness":"true","paresthesias_extremities":"false","simple_rear_end_mvc":"false","sitting_in_ed":"false"},{"able_to_rotate_45":"true","age":"40","ambulatory_since_injury":"false","dangerous_mechanism":"false","delayed_neck_pain":"true","midline_cspine_tenderness":"true","paresthesias_extremities":"false","simple_rear_end_mvc":"false","sitting_in_ed":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/canadian-c-spine","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/canadian-c-spine?age=40&dangerous_mechanism=false&paresthesias_extremities=false&simple_rear_end_mvc=false&sitting_in_ed=false&ambulatory_since_injury=false&delayed_neck_pain=true&midline_cspine_tenderness=true&able_to_rotate_45=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/canadian-c-spine","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/canadian-ct-head","description":"Canadian CT Head Rule (Stiell 2001). CT is indicated if any high-risk factor (GCS <15 at 2 hours, suspected open or depressed skull fracture, any sign of basal skull fracture, vomiting 2 or more times, or age 65 or older) or any medium-risk factor (amnesia before impact >30 min, or dangerous mechanism as assigned by the caller). Not a diagnosis, not NEXUS, not PECARN, not CATCH, and not pediatric. magent does not examine the patient.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (16-120). Age ≥65 is a high-risk factor that indicates CT; 64 does not. The published rule is for patients ≥16 years.","required":true,"example":"40"},{"in":"query","name":"gcs_lt_15_at_2h","type":"boolean","description":"GCS <15 at 2 hours after injury. true or false as assigned by the caller. High-risk. magent does not take a GCS integer.","required":true,"example":"false"},{"in":"query","name":"suspected_open_or_depressed_skull_fx","type":"boolean","description":"Suspected open or depressed skull fracture. true or false as assigned by the caller. High-risk.","required":true,"example":"false"},{"in":"query","name":"any_sign_basal_skull_fx","type":"boolean","description":"Any sign of basal skull fracture (hemotympanum, raccoon eyes, CSF otorrhea/rhinorrhea, or Battle's sign). true or false as assigned by the caller. High-risk.","required":true,"example":"false"},{"in":"query","name":"vomiting_two_or_more","type":"boolean","description":"Two or more episodes of vomiting. true or false as assigned by the caller. High-risk.","required":true,"example":"false"},{"in":"query","name":"amnesia_before_impact_gt_30min","type":"boolean","description":"Amnesia before impact of more than 30 minutes. true or false as assigned by the caller. Medium-risk.","required":true,"example":"false"},{"in":"query","name":"dangerous_mechanism","type":"boolean","description":"Dangerous mechanism as assigned by the caller. true or false. Medium-risk. Published list: pedestrian struck by a motor vehicle, occupant ejected from a motor vehicle, fall from elevation >3 feet or 5 stairs. magent does not classify mechanism.","required":true,"example":"false"}],"errors":[{"code":"invalid_canadian_ct_age","message":"age must be an integer from 16 to 120. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/canadian-ct-head","citation":{"authors":"Stiell IG, Wells GA, Vandemheen K, et al.","doi":"10.1016/S0140-6736(00)04561-X","id":"stiell-2001-ct-head","source":"Lancet. 2001;357(9266):1391-1396","title":"The Canadian CT Head Rule for patients with minor head injury","url":"https://doi.org/10.1016/S0140-6736(00)04561-X"},"formula_expression":"ct indicated if any high-risk (gcs_lt_15_at_2h or suspected_open_or_depressed_skull_fx or any_sign_basal_skull_fx or vomiting_two_or_more or age >= 65) or any medium-risk (amnesia_before_impact_gt_30min or dangerous_mechanism)","purpose":"Apply the Stiell 2001 Canadian CT Head Rule and return whether CT is indicated from caller-assigned high-risk and medium-risk findings after minor blunt head injury.","markdown_url":"https://magentlab.com/docs/canadian-ct-head.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"canadian_ct_head"},{"name":"formula_expression","type":"string","description":"Stiell 2001 high-risk or medium-risk CT indication rule"},{"name":"ct_indicated","type":"boolean","description":"true when any high-risk or medium-risk factor is met (published imaging rule for clinically important brain injury). Not a diagnosis."},{"name":"high_risk","type":"boolean","description":"true when any high-risk factor is met (GCS <15 at 2 h, suspected open or depressed skull fracture, any basal skull fracture sign, vomiting ≥2, or age ≥65). Predicts need for neurological intervention."},{"name":"medium_risk","type":"boolean","description":"true when any medium-risk factor is met (amnesia before impact >30 min or dangerous mechanism), independent of high_risk"},{"name":"age_years","type":"integer","description":"Age used for the ≥65 high-risk factor"},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met; age_ge_65 is computed from age (value is age_years)"},{"name":"citation","type":"object","description":"Stiell 2001 Lancet citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"40","amnesia_before_impact_gt_30min":"false","any_sign_basal_skull_fx":"false","dangerous_mechanism":"false","gcs_lt_15_at_2h":"false","suspected_open_or_depressed_skull_fx":"false","vomiting_two_or_more":"false"},{"age":"40","amnesia_before_impact_gt_30min":"false","any_sign_basal_skull_fx":"false","dangerous_mechanism":"false","gcs_lt_15_at_2h":"false","suspected_open_or_depressed_skull_fx":"false","vomiting_two_or_more":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/canadian-ct-head","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/canadian-ct-head?age=40&gcs_lt_15_at_2h=false&suspected_open_or_depressed_skull_fx=false&any_sign_basal_skull_fx=false&vomiting_two_or_more=false&amnesia_before_impact_gt_30min=false&dangerous_mechanism=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/canadian-ct-head","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/chip","description":"Smits 2007 CHIP rule (adults ≥16, GCS 13-15). CT if ≥1 major (pedestrian/cyclist vs vehicle, ejected, vomiting, PTA ≥4 h, skull-fracture signs, GCS <15, GCS drop ≥2 at 1 h, anticoagulants, posttraumatic seizure, age ≥60) or ≥2 minor (fall from elevation, persistent anterograde amnesia, PTA 2 to <4 h, skull contusion, neurologic deficit, LOC, GCS drop of 1 at 1 h, age 40-60). Not a diagnosis; not Canadian CT Head, NEXUS, PECARN, or 2022 CHIP. magent does not examine the patient.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (integer 16-120). Age ≥60 is a major criterion. Age 40-59 is the 40-60 y minor band; 39 is neither. The published rule is for patients ≥16 years.","required":true,"example":"30"},{"in":"query","name":"gcs","type":"integer","description":"Glasgow Coma Scale integer 13-15 as published. GCS 13 or 14 (GCS <15) is a major criterion; 15 is not. magent does not assign GCS from an exam.","required":true,"example":"15"},{"in":"query","name":"pedestrian_or_cyclist_vs_vehicle","type":"boolean","description":"Pedestrian or cyclist versus vehicle (Smits 2007 major). true or false as assigned by the caller. magent does not classify mechanism.","required":true,"example":"false"},{"in":"query","name":"ejected_from_vehicle","type":"boolean","description":"Ejected from vehicle (Smits 2007 major). true or false as assigned by the caller. magent does not classify mechanism.","required":true,"example":"false"},{"in":"query","name":"vomiting","type":"boolean","description":"Vomiting (Smits 2007 major). true or false as assigned by the caller. magent does not take a vomit count.","required":true,"example":"false"},{"in":"query","name":"pta_ge_4h","type":"boolean","description":"Posttraumatic amnesia ≥4 hours (Smits 2007 major). true or false as assigned by the caller. Mutually exclusive with pta_2_to_lt_4h. magent does not measure amnesia duration.","required":true,"example":"false"},{"in":"query","name":"clinical_signs_skull_fracture","type":"boolean","description":"Clinical signs of skull fracture (Smits 2007 major): any injury that suggests a skull fracture, such as palpable discontinuity of the skull, leakage of cerebrospinal fluid, raccoon-eye bruising, and bleeding from the ear, as assigned by the caller. true or false. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"gcs_deterioration_ge_2","type":"boolean","description":"GCS deterioration ≥2 points 1 hour after presentation (Smits 2007 major). true or false as assigned by the caller. Mutually exclusive with gcs_deterioration_1. magent does not assign GCS change.","required":true,"example":"false"},{"in":"query","name":"anticoagulant_therapy","type":"boolean","description":"Use of anticoagulant therapy (Smits 2007 major). true or false as assigned by the caller. This is the 2007 simple rule, not the 2022 CHIP update. magent does not interpret a coagulation assay.","required":true,"example":"false"},{"in":"query","name":"posttraumatic_seizure","type":"boolean","description":"Posttraumatic seizure (Smits 2007 major). true or false as assigned by the caller. magent does not witness a seizure.","required":true,"example":"false"},{"in":"query","name":"fall_from_any_elevation","type":"boolean","description":"Fall from any elevation (Smits 2007 minor). true or false as assigned by the caller. magent does not classify mechanism.","required":true,"example":"false"},{"in":"query","name":"persistent_anterograde_amnesia","type":"boolean","description":"Persistent anterograde amnesia, any deficit of short-term memory (Smits 2007 minor). true or false as assigned by the caller. magent does not test memory.","required":true,"example":"false"},{"in":"query","name":"pta_2_to_lt_4h","type":"boolean","description":"Posttraumatic amnesia of 2 to <4 hours (Smits 2007 minor). true or false as assigned by the caller. Mutually exclusive with pta_ge_4h. magent does not measure amnesia duration.","required":true,"example":"false"},{"in":"query","name":"skull_contusion","type":"boolean","description":"Contusion of the skull (Smits 2007 minor). true or false as assigned by the caller. magent does not examine the scalp.","required":true,"example":"false"},{"in":"query","name":"neurologic_deficit","type":"boolean","description":"Neurologic deficit (Smits 2007 minor). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"loss_of_consciousness","type":"boolean","description":"Loss of consciousness (Smits 2007 minor). true or false as assigned by the caller. magent does not take a history.","required":true,"example":"false"},{"in":"query","name":"gcs_deterioration_1","type":"boolean","description":"GCS deterioration of 1 point 1 hour after presentation (Smits 2007 minor). true or false as assigned by the caller. Mutually exclusive with gcs_deterioration_ge_2. magent does not assign GCS change.","required":true,"example":"false"}],"errors":[{"code":"invalid_chip","message":"CHIP inputs must match Smits 2007 simple major/minor criteria from that paper only. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/chip","citation":{"authors":"Smits M, Dippel DW, Steyerberg EW, et al.","doi":"10.7326/0003-4819-146-6-200703200-00004","id":"smits-2007","pmid":"17371884","source":"Ann Intern Med. 2007;146(6):397-405","title":"Predicting intracranial traumatic findings on computed tomography in patients with minor head injury: the CHIP prediction rule","url":"https://doi.org/10.7326/0003-4819-146-6-200703200-00004"},"formula_expression":"ct indicated if ≥1 major (pedestrian_or_cyclist_vs_vehicle, ejected_from_vehicle, vomiting, pta_ge_4h, clinical_signs_skull_fracture, gcs < 15, gcs_deterioration_ge_2, anticoagulant_therapy, posttraumatic_seizure, age ≥ 60) or ≥2 minor (fall_from_any_elevation, persistent_anterograde_amnesia, pta_2_to_lt_4h, skull_contusion, neurologic_deficit, loss_of_consciousness, gcs_deterioration_1, age 40-60)","purpose":"Apply the Smits 2007 simple CHIP rule and return whether CT is indicated from caller-assigned major and minor findings plus GCS and age after minor head injury.","markdown_url":"https://magentlab.com/docs/chip.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"chip"},{"name":"formula_expression","type":"string","description":"Smits 2007 simple CHIP rule: CT if ≥1 major or ≥2 minor"},{"name":"ct_indicated","type":"boolean","description":"true when ≥1 major criterion or ≥2 minor criteria are met (Smits 2007 simple rule). Not a diagnosis and not a CT order."},{"name":"major_count","type":"integer","description":"Count of major criteria met (0-10)"},{"name":"minor_count","type":"integer","description":"Count of minor criteria met (0-8)"},{"name":"gcs","type":"integer","description":"GCS integer used for the GCS <15 major criterion"},{"name":"age_years","type":"integer","description":"Age used for the ≥60 major and 40-60 y minor bands"},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met; gcs_lt_15 includes value (gcs); age_ge_60 and age_40_to_60 include value (age_years)"},{"name":"citation","type":"object","description":"Smits 2007 Ann Intern Med citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"30","anticoagulant_therapy":"false","clinical_signs_skull_fracture":"false","ejected_from_vehicle":"false","fall_from_any_elevation":"false","gcs":"15","gcs_deterioration_1":"false","gcs_deterioration_ge_2":"false","loss_of_consciousness":"false","neurologic_deficit":"false","pedestrian_or_cyclist_vs_vehicle":"false","persistent_anterograde_amnesia":"false","posttraumatic_seizure":"false","pta_2_to_lt_4h":"false","pta_ge_4h":"false","skull_contusion":"false","vomiting":"false"},{"age":"30","anticoagulant_therapy":"false","clinical_signs_skull_fracture":"false","ejected_from_vehicle":"false","fall_from_any_elevation":"false","gcs":"15","gcs_deterioration_1":"false","gcs_deterioration_ge_2":"false","loss_of_consciousness":"false","neurologic_deficit":"false","pedestrian_or_cyclist_vs_vehicle":"false","persistent_anterograde_amnesia":"false","posttraumatic_seizure":"false","pta_2_to_lt_4h":"false","pta_ge_4h":"false","skull_contusion":"false","vomiting":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/chip","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/chip?age=30&gcs=15&pedestrian_or_cyclist_vs_vehicle=false&ejected_from_vehicle=false&vomiting=false&pta_ge_4h=false&clinical_signs_skull_fracture=false&gcs_deterioration_ge_2=false&anticoagulant_therapy=false&posttraumatic_seizure=false&fall_from_any_elevation=false&persistent_anterograde_amnesia=false&pta_2_to_lt_4h=false&skull_contusion=false&neurologic_deficit=false&loss_of_consciousness=false&gcs_deterioration_1=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/chip","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/pecarn-head","description":"PECARN pediatric head CT (Kuppermann 2009). Two age trees (under 2 vs 2-17). High if any age-applicable high-risk factor (GCS <=14 or altered mental status in both; palpable skull fracture if under 2; signs of basilar skull fracture if 2 or older), else intermediate if any age-applicable intermediate factor, else low. CT recommended only when high. Not a diagnosis. Not Canadian CT Head, CATCH, CHALICE, NEXUS, or PECARN IAI/febrile/c-spine. magent does not examine the patient.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (0-17). Age 0 and 1 use the lt_2 tree; age 2 through 17 use the ge_2 tree. Age 18 is rejected.","required":true,"example":"10"},{"in":"query","name":"gcs_le_14","type":"boolean","description":"GCS <=14 as assigned by the caller. true or false. High-risk in both trees. GCS 15 is not <=14. magent does not take a GCS integer.","required":true,"example":"false"},{"in":"query","name":"altered_mental_status","type":"boolean","description":"Altered mental status as assigned by the caller (paper: agitation, somnolence, repetitive questioning, or slow response). true or false. High-risk in both trees.","required":true,"example":"false"},{"in":"query","name":"palpable_skull_fracture","type":"boolean","description":"Palpable skull fracture as assigned by the caller. true or false. High-risk only on the lt_2 tree; parsed but not scored when age >= 2.","required":true,"example":"false"},{"in":"query","name":"signs_basilar_skull_fracture","type":"boolean","description":"Signs of basilar skull fracture as assigned by the caller. true or false. High-risk only on the ge_2 tree; parsed but not scored when age < 2.","required":true,"example":"false"},{"in":"query","name":"nonfrontal_scalp_hematoma","type":"boolean","description":"Occipital, parietal, or temporal scalp hematoma (not frontal) as assigned by the caller. true or false. Intermediate only on the lt_2 tree; parsed but not scored when age >= 2.","required":true,"example":"false"},{"in":"query","name":"loc_ge_5_seconds","type":"boolean","description":"Loss of consciousness >=5 seconds as assigned by the caller. true or false. Intermediate only on the lt_2 tree; parsed but not scored when age >= 2.","required":true,"example":"false"},{"in":"query","name":"not_acting_normally","type":"boolean","description":"Not acting normally per parent report as assigned by the caller. true or false. Intermediate only on the lt_2 tree; parsed but not scored when age >= 2.","required":true,"example":"false"},{"in":"query","name":"history_of_loc","type":"boolean","description":"History of loss of consciousness as assigned by the caller. true or false. Intermediate only on the ge_2 tree; parsed but not scored when age < 2.","required":true,"example":"false"},{"in":"query","name":"history_of_vomiting","type":"boolean","description":"History of vomiting as assigned by the caller. true or false. Intermediate only on the ge_2 tree; parsed but not scored when age < 2.","required":true,"example":"false"},{"in":"query","name":"severe_headache","type":"boolean","description":"Severe headache as assigned by the caller. true or false. Intermediate only on the ge_2 tree; parsed but not scored when age < 2.","required":true,"example":"false"},{"in":"query","name":"severe_mechanism","type":"boolean","description":"Severe mechanism as assigned by the caller. true or false. Intermediate in both trees. Paper list: MVC ejection/rollover/death of another passenger; unhelmeted pedestrian or bicyclist struck by a motorized vehicle; fall >3 ft if <2 years or >5 ft if >=2 years; head struck by a high-impact object. magent does not classify mechanism or take fall height.","required":true,"example":"false"}],"errors":[{"code":"invalid_pecarn_age","message":"age must be an integer from 0 to 17. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/pecarn-head","citation":{"authors":"Kuppermann N, Holmes JF, Dayan PS, et al.","doi":"10.1016/S0140-6736(09)61558-0","id":"kuppermann-2009","source":"Lancet. 2009;374(9696):1160-1170","title":"Identification of children at very low risk of clinically-important brain injuries after head trauma: a prospective cohort study","url":"https://doi.org/10.1016/S0140-6736(09)61558-0"},"formula_expression":"high if any age-applicable high-risk factor, else intermediate if any age-applicable intermediate factor, else low; lt_2 tree if age < 2, ge_2 tree if age 2-17","purpose":"Apply the Kuppermann 2009 PECARN prediction trees and return high, intermediate, or low risk of clinically important brain injury from caller-assigned findings after pediatric head trauma.","markdown_url":"https://magentlab.com/docs/pecarn-head.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"pecarn_head"},{"name":"formula_expression","type":"string","description":"Kuppermann 2009 two-tree high then intermediate then low rule"},{"name":"age_years","type":"integer","description":"Age used to choose lt_2 vs ge_2"},{"name":"age_band","type":"string","description":"lt_2 when age < 2; ge_2 when age is 2 through 17"},{"name":"risk_tier","type":"string","description":"high, intermediate, or low from the age-applicable tree"},{"name":"ct_recommended","type":"boolean","description":"true when risk_tier is high"},{"name":"observation_vs_ct","type":"boolean","description":"true when risk_tier is intermediate"},{"name":"ct_not_recommended","type":"boolean","description":"true when risk_tier is low"},{"name":"criteria","type":"array","description":"Age-applicable factors only, high-risk first then intermediate, each with factor and met"},{"name":"citation","type":"object","description":"Kuppermann 2009 Lancet citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"10","altered_mental_status":"false","gcs_le_14":"false","history_of_loc":"false","history_of_vomiting":"false","loc_ge_5_seconds":"false","nonfrontal_scalp_hematoma":"false","not_acting_normally":"false","palpable_skull_fracture":"false","severe_headache":"false","severe_mechanism":"false","signs_basilar_skull_fracture":"false"},{"age":"10","altered_mental_status":"false","gcs_le_14":"false","history_of_loc":"false","history_of_vomiting":"false","loc_ge_5_seconds":"false","nonfrontal_scalp_hematoma":"false","not_acting_normally":"false","palpable_skull_fracture":"false","severe_headache":"false","severe_mechanism":"false","signs_basilar_skull_fracture":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/pecarn-head","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/pecarn-head?age=10&gcs_le_14=false&altered_mental_status=false&palpable_skull_fracture=false&signs_basilar_skull_fracture=false&nonfrontal_scalp_hematoma=false&loc_ge_5_seconds=false&not_acting_normally=false&history_of_loc=false&history_of_vomiting=false&severe_headache=false&severe_mechanism=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/pecarn-head","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/mbig","description":"Khan 2020 modified Brain Injury Guidelines (mBIG), not original Joseph 2014 BIG. First-match worst-wins tier 3 then 2 then 1 from caller-assigned GCS, focal or pupillary abnormality, anticoagulant or antiplatelet excluding aspirin alone, EtOH >80 mg/dL, skull fracture, SDH mm, IPH mm and multiple IPH, SAH pattern and mm, any EDH, and IVH. Any EDH is mBIG 3. magent does not read CT. Adults with mild TBI and traumatic ICH. Not a diagnosis or neurosurgical plan. Not a medical device.","parameters":[{"in":"query","name":"gcs","type":"integer","description":"Caller-assigned Glasgow Coma Scale total, integer 3-15. Khan 2020 methods: GCS of 12 or less is an abnormal neurologic examination and is mBIG 3. magent does not compute eye, verbal, or motor GCS.","required":true,"example":"15"},{"in":"query","name":"focal_neuro_or_pupillary_abnormality","type":"boolean","description":"Focal neurologic deficit or abnormal pupillary findings as assigned by the caller (Khan 2020 abnormal neurologic examination). true or false. true is mBIG 3. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"ac_ap_excluding_aspirin","type":"boolean","description":"Anticoagulant or antiplatelet therapy excluding aspirin alone, as assigned by the caller. true or false. true is mBIG 3. Aspirin monotherapy is false. magent does not read a medication list.","required":true,"example":"false"},{"in":"query","name":"etoh_gt_80","type":"boolean","description":"Blood alcohol concentration >80 mg/dL as assigned by the caller (Khan 2020 intoxication definition, US legal driving limit). true or false. true excludes mBIG 1 (mBIG 2 unless a mBIG 3 feature is also met). magent does not assay ethanol.","required":true,"example":"false"},{"in":"query","name":"skull_fracture","type":"string","enum":["none","nondisplaced","displaced"],"description":"Skull fracture as assigned by the caller from CT: none (mBIG 1 row), nondisplaced (mBIG 2), or displaced (mBIG 3). magent does not read CT.","required":true,"example":"none"},{"in":"query","name":"sdh_mm","type":"number","description":"Largest subdural hematoma thickness in millimetres as assigned by the caller (0-40). mBIG 1 if <4, mBIG 2 if >=4 and <8, mBIG 3 if >=8. magent does not measure SDH or read CT.","required":true,"example":"3"},{"in":"query","name":"iph_mm","type":"number","description":"Largest intraparenchymal hemorrhage size in millimetres as assigned by the caller (0-40). mBIG 1 if <4, mBIG 2 if >=4 and <8, mBIG 3 if >=8. Use 0 when no IPH. magent does not measure IPH or read CT.","required":true,"example":"0"},{"in":"query","name":"multiple_iph","type":"boolean","description":"Multiple intraparenchymal hemorrhages as assigned by the caller. true or false. true is mBIG 3. magent does not count lesions on CT.","required":true,"example":"false"},{"in":"query","name":"sah_pattern","type":"string","enum":["none_or_trace","localized","scattered"],"description":"Traumatic SAH pattern as assigned by the caller from Khan 2020 sulci/hemisphere definitions that replace original BIG trace/localized/scattered: none_or_trace (<=3 sulci and <1 mm), localized (one hemisphere, >3 sulci, 1-3 mm), or scattered (bi-hemispheric or >3 mm). magent does not read CT.","required":true,"example":"none_or_trace"},{"in":"query","name":"sah_mm","type":"number","description":"SAH thickness in millimetres as assigned by the caller (0-20). mBIG 1 if <1, mBIG 2 if 1-3, mBIG 3 if >3. Use 0 when none. Combined with sah_pattern; either scattered pattern or >3 mm is mBIG 3. magent does not measure SAH.","required":true,"example":"0"},{"in":"query","name":"edh","type":"boolean","description":"Any epidural hematoma as assigned by the caller. true or false. Any EDH is mBIG 3 (Khan 2020 safety modification versus original BIG size bands). magent does not read CT.","required":true,"example":"false"},{"in":"query","name":"ivh","type":"boolean","description":"Intraventricular hemorrhage as assigned by the caller. true or false. true is mBIG 3. magent does not read CT.","required":true,"example":"false"}],"errors":[{"code":"invalid_gcs_total","message":"gcs must be an integer from 3 to 15. Returned before settlement; you are not charged.","status":400},{"code":"invalid_sdh_mm","message":"sdh_mm must be a number from 0 to 40 (Khan 2020 mBIG subdural thickness mm). Returned before settlement; you are not charged.","status":400},{"code":"invalid_iph_mm","message":"iph_mm must be a number from 0 to 40 (Khan 2020 mBIG intraparenchymal hemorrhage mm). Returned before settlement; you are not charged.","status":400},{"code":"invalid_sah_mm","message":"sah_mm must be a number from 0 to 20 (Khan 2020 mBIG subarachnoid thickness mm). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/mbig","citation":{"authors":"Khan AD, Elseth AJ, Brosius JA, et al.","doi":"10.1136/tsaco-2020-000483","id":"khan-2020","pmid":"32537518","source":"Trauma Surg Acute Care Open. 2020;5(1):e000483","title":"Multicenter assessment of the Brain Injury Guidelines and a proposal of guideline modifications","url":"https://doi.org/10.1136/tsaco-2020-000483"},"formula_expression":"first-match worst-wins mBIG 3 then 2 then 1 (Khan 2020 modified criteria): mBIG 3 if GCS <= 12 or focal_neuro_or_pupillary_abnormality or ac_ap_excluding_aspirin or displaced skull fracture or sdh_mm >= 8 or iph_mm >= 8 or multiple_iph or sah scattered or sah_mm > 3 or any EDH or IVH; else mBIG 2 if etoh_gt_80 or nondisplaced skull fracture or sdh_mm >= 4 or iph_mm >= 4 or sah localized or sah_mm >= 1; else mBIG 1","purpose":"Apply the Khan 2020 modified Brain Injury Guidelines and return mBIG tier 1, 2, or 3 from caller-assigned GCS, neurologic findings, medications, ethanol, skull fracture, and hematoma sizes.","markdown_url":"https://magentlab.com/docs/mbig.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"mbig"},{"name":"formula_expression","type":"string","description":"Khan 2020 first-match worst-wins mBIG 3 then 2 then 1 rule"},{"name":"mbig_tier","type":"integer","description":"1, 2, or 3 from the modified criteria. Not a diagnosis or neurosurgical plan."},{"name":"gcs","type":"integer","description":"GCS total used (3-15)"},{"name":"sdh_mm","type":"number","description":"SDH thickness in mm used"},{"name":"iph_mm","type":"number","description":"IPH size in mm used"},{"name":"sah_mm","type":"number","description":"SAH thickness in mm used"},{"name":"skull_fracture","type":"string","description":"none, nondisplaced, or displaced as used"},{"name":"sah_pattern","type":"string","description":"none_or_trace, localized, or scattered as used"},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met; GCS, SDH, IPH, SAH mm, skull_fracture, and sah_pattern rows include value"},{"name":"citation","type":"object","description":"Khan 2020 TSACO citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"ac_ap_excluding_aspirin":"false","edh":"false","etoh_gt_80":"false","focal_neuro_or_pupillary_abnormality":"false","gcs":"15","iph_mm":"0","ivh":"false","multiple_iph":"false","sah_mm":"0","sah_pattern":"none_or_trace","sdh_mm":"3","skull_fracture":"none"},{"ac_ap_excluding_aspirin":"false","edh":"false","etoh_gt_80":"false","focal_neuro_or_pupillary_abnormality":"false","gcs":"15","iph_mm":"0","ivh":"false","multiple_iph":"false","sah_mm":"0","sah_pattern":"none_or_trace","sdh_mm":"3","skull_fracture":"none"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/mbig","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/mbig?gcs=15&focal_neuro_or_pupillary_abnormality=false&ac_ap_excluding_aspirin=false&etoh_gt_80=false&skull_fracture=none&sdh_mm=3&iph_mm=0&multiple_iph=false&sah_pattern=none_or_trace&sah_mm=0&edh=false&ivh=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/mbig","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/infant-scalp","description":"Greenes 2001 infant scalp score: age points (0-2 months → 3; 3-5 → 2; 6-11 → 1; 12-24 months → 0) plus caller-assigned hematoma size (0 none, 1 small, 2 medium, 3 large) and location (0 frontal, 1 occipital, 2 temporal/parietal). Total 0-8. magent does not examine the scalp, measure the hematoma, or decide CT. Does not apply later ≥4 clinically important TBI cuts.","parameters":[{"in":"query","name":"age_months","type":"integer","description":"Age in completed months, integer 0-24 as in Greenes 2001 (infants 0-24 months). Points: 0-2 months → 3; 3-5 → 2; 6-11 → 1; ≥12 → 0. magent does not convert years or days.","required":true,"example":"13"},{"in":"query","name":"hematoma_size","type":"integer","description":"Caller-assigned hematoma size points 0-3 (0 none, 1 small, 2 medium, 3 large). magent does not measure the hematoma or invent centimeter cuts.","required":true,"example":"0"},{"in":"query","name":"hematoma_location","type":"integer","description":"Caller-assigned hematoma location points (0 frontal, 1 occipital, 2 temporal/parietal). magent does not examine the scalp.","required":true,"example":"0"}],"errors":[{"code":"invalid_infant_scalp","message":"Infant scalp score inputs must match Greenes 2001 age, hematoma size, and hematoma location from that paper. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/infant-scalp","citation":{"authors":"Greenes DS, Schutzman SA","doi":"10.1097/00006565-200104000-00002","id":"greenes-2001","pmid":"11334100","source":"Pediatr Emerg Care. 2001;17(2):88-92","title":"Clinical significance of scalp abnormalities in asymptomatic head-injured infants","url":"https://doi.org/10.1097/00006565-200104000-00002"},"formula_expression":"Infant Scalp Score = age_points + hematoma_size + hematoma_location; age 0-2 mo → 3, 3-5 → 2, 6-11 → 1, ≥12 → 0; size caller-assigned 0-3; location 0 frontal / 1 occipital / 2 temporal-parietal; max 8","purpose":"Return the Greenes 2001 infant scalp score as age points plus caller-assigned hematoma-size and hematoma-location points (total 0-8).","markdown_url":"https://magentlab.com/docs/infant-scalp.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"infant_scalp"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Total points 0-8"},{"name":"max_score","type":"integer","description":"Always 8"},{"name":"components","type":"array","description":"Age, hematoma-size, and location points"},{"name":"citation","type":"object","description":"Greenes and Schutzman 2001 citation"},{"name":"disclaimer","type":"string","description":"Not a medical device"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age_months":"13","hematoma_location":"0","hematoma_size":"0"},{"age_months":"13","hematoma_location":"0","hematoma_size":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/infant-scalp","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/infant-scalp?age_months=13&hematoma_size=0&hematoma_location=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/infant-scalp","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/pecarn-iai","description":"PECARN pediatric IAI (Holmes 2013). Very low risk of IAI requiring acute intervention only when all seven caller-assigned findings are absent: abdominal wall trauma or seatbelt sign, GCS <14, abdominal tenderness, thoracic wall trauma, abdominal pain, decreased breath sounds, and vomiting. Presence of a criterion does not mandate CT. Not a diagnosis. Not PECARN head. magent does not examine the patient.","parameters":[{"in":"query","name":"abdominal_wall_trauma_or_seatbelt_sign","type":"boolean","description":"Evidence of abdominal wall trauma or seatbelt sign as assigned by the caller (Holmes 2013 first-ranked criterion). true means the finding is present and very_low_risk_iai_intervention is false. true or false. magent does not examine the abdomen.","required":true,"example":"false"},{"in":"query","name":"gcs_less_than_14","type":"boolean","description":"GCS score <14 as assigned by the caller (paper: GCS <14; equivalently GCS >13 is the low-risk direction). true means GCS <14 and very_low_risk_iai_intervention is false. true or false. This is not the PECARN head GCS <=14 flag. magent does not take a GCS integer.","required":true,"example":"false"},{"in":"query","name":"abdominal_tenderness","type":"boolean","description":"Abdominal tenderness as assigned by the caller. true means tenderness is present and very_low_risk_iai_intervention is false. true or false. magent does not palpate the abdomen.","required":true,"example":"false"},{"in":"query","name":"thoracic_wall_trauma","type":"boolean","description":"Evidence of thoracic wall trauma as assigned by the caller. true means the finding is present and very_low_risk_iai_intervention is false. true or false. magent does not examine the chest.","required":true,"example":"false"},{"in":"query","name":"abdominal_pain","type":"boolean","description":"Complaints of abdominal pain as assigned by the caller. true means pain is present and very_low_risk_iai_intervention is false. true or false. magent does not take a pain score.","required":true,"example":"false"},{"in":"query","name":"decreased_breath_sounds","type":"boolean","description":"Decreased breath sounds as assigned by the caller. true means decreased breath sounds are present and very_low_risk_iai_intervention is false. true or false. magent does not auscultate the chest.","required":true,"example":"false"},{"in":"query","name":"vomiting","type":"boolean","description":"History of vomiting as assigned by the caller. true means vomiting is present and very_low_risk_iai_intervention is false. true or false. magent does not take a vomit count.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/pecarn-iai","citation":{"authors":"Holmes JF, Lillis K, Monroe D, Borgialli D, Kerrey BT, Mahajan P, Adelgais K, Ellison AM, Yen K, Atabaki S, Menaker J, Bonsu B, Quayle KS, Garcia M, Rogers A, Blumberg S, Lee L, Tunik M, Kooistra J, Kwok M, Cook LJ, Dean JM, Sokolove PE, Wisner DH, Ehrlich P, Cooper A, Dayan PS, Wootton-Gorges S, Kuppermann N","doi":"10.1016/j.annemergmed.2012.11.009","id":"holmes-2013","source":"Ann Emerg Med. 2013;62(2):107-116.e2","title":"Identifying children at very low risk of clinically important blunt abdominal injuries","url":"https://doi.org/10.1016/j.annemergmed.2012.11.009"},"formula_expression":"very_low_risk_iai_intervention iff no abdominal_wall_trauma_or_seatbelt_sign and no gcs_less_than_14 and no abdominal_tenderness and no thoracic_wall_trauma and no abdominal_pain and no decreased_breath_sounds and no vomiting","purpose":"Apply the Holmes 2013 PECARN seven-variable prediction rule and return whether the child is at very low risk of intra-abdominal injury requiring acute intervention (all seven caller-assigned findings absent). Does not order a CT.","markdown_url":"https://magentlab.com/docs/pecarn-iai.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"pecarn_iai"},{"name":"formula_expression","type":"string","description":"Holmes 2013 seven-variable very-low-risk prediction rule"},{"name":"very_low_risk_iai_intervention","type":"boolean","description":"true only when all seven caller-assigned findings are absent. Does not order a CT. Presence of a criterion does not mandate CT. Not a diagnosis."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met; met is true when that Holmes 2013 finding is absent (the very-low-risk item holds)"},{"name":"citation","type":"object","description":"Holmes 2013 Ann Emerg Med citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"abdominal_pain":"false","abdominal_tenderness":"false","abdominal_wall_trauma_or_seatbelt_sign":"false","decreased_breath_sounds":"false","gcs_less_than_14":"false","thoracic_wall_trauma":"false","vomiting":"false"},{"abdominal_pain":"false","abdominal_tenderness":"false","abdominal_wall_trauma_or_seatbelt_sign":"false","decreased_breath_sounds":"false","gcs_less_than_14":"false","thoracic_wall_trauma":"false","vomiting":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/pecarn-iai","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/pecarn-iai?abdominal_wall_trauma_or_seatbelt_sign=false&gcs_less_than_14=false&abdominal_tenderness=false&thoracic_wall_trauma=false&abdominal_pain=false&decreased_breath_sounds=false&vomiting=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/pecarn-iai","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/pedsrc","description":"PedSRC blunt abdomen (Streck 2017). Very low risk of blunt intra-abdominal injury only when none of five caller-assigned findings is present: AST >200 U/L, abnormal abdominal examination (wall trauma, distension, or tenderness), abnormal chest x-ray, abdominal pain, and abnormal pancreatic enzymes (amylase or lipase). Presence of a criterion does not mandate CT. Not a diagnosis. Not Holmes 2013 PECARN IAI. magent does not examine the child or assay AST, amylase, or lipase.","parameters":[{"in":"query","name":"ast_u_l","type":"number","description":"Aspartate aminotransferase in U/L (number 1-10000). Positive Streck 2017 variable iff >200 U/L (200 is not positive). magent does not assay AST.","required":true,"example":"80"},{"in":"query","name":"abnormal_abdominal_exam","type":"boolean","description":"Abnormal abdominal examination (wall trauma, distension, or tenderness) as assigned by the caller. true means the finding is present and very_low_risk is false. true or false. magent does not examine the child.","required":true,"example":"false"},{"in":"query","name":"abnormal_chest_xray","type":"boolean","description":"Abnormal chest x-ray as assigned by the caller. true means the finding is present and very_low_risk is false. true or false. magent does not read a radiograph.","required":true,"example":"false"},{"in":"query","name":"abdominal_pain","type":"boolean","description":"Reported abdominal pain as assigned by the caller. true means pain is present and very_low_risk is false. true or false. magent does not take a pain score.","required":true,"example":"false"},{"in":"query","name":"abnormal_pancreatic_enzymes","type":"boolean","description":"Abnormal amylase or lipase as assigned by the caller. true means the finding is present and very_low_risk is false. true or false. magent does not assay amylase or lipase.","required":true,"example":"false"}],"errors":[{"code":"invalid_ast","message":"ast_u_l must be a number from 1 to 10000 Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/pedsrc","citation":{"authors":"Streck CJ, Blakely ML, Huang EY, Vogel AM, Santore MT, Tsao K, Falcone RA, Dassinger MS, Haynes JH, Russell RT, Naik-Mathuria BJ, St Peter SD, Mooney DP, Upperman JS; Pediatric Surgery Research Collaborative","doi":"10.1016/j.jamcollsurg.2016.12.041","id":"streck-2017","pmid":"28130170","source":"J Am Coll Surg. 2017;224(4):449-458.e3","title":"Identifying Children at Very Low Risk for Blunt Intra-Abdominal Injury in Whom CT of the Abdomen Can Be Avoided Safely","url":"https://doi.org/10.1016/j.jamcollsurg.2016.12.041"},"formula_expression":"very_low_risk iff no ast_gt_200 and no abnormal_abdominal_exam and no abnormal_chest_xray and no abdominal_pain and no abnormal_pancreatic_enzymes","purpose":"Apply the Streck 2017 Pediatric Surgery Research Collaborative five-variable prediction rule and return whether the child is at very low risk of blunt intra-abdominal injury (none of five caller-assigned findings present). Does not order a CT.","markdown_url":"https://magentlab.com/docs/pedsrc.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"pedsrc"},{"name":"formula_expression","type":"string","description":"Streck 2017 five-variable very-low-risk prediction rule"},{"name":"very_low_risk","type":"boolean","description":"true only when none of the five caller-assigned findings is present. Does not order a CT. Presence of a criterion does not mandate CT. Not a diagnosis."},{"name":"ast_u_l","type":"number","description":"AST in U/L used for the >200 U/L Streck 2017 variable"},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met; met is true when that Streck 2017 finding is absent (no_ast_gt_200, no_abnormal_abdominal_exam, no_abnormal_chest_xray, no_abdominal_pain, no_abnormal_pancreatic_enzymes)"},{"name":"citation","type":"object","description":"Streck 2017 J Am Coll Surg citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"abdominal_pain":"false","abnormal_abdominal_exam":"false","abnormal_chest_xray":"false","abnormal_pancreatic_enzymes":"false","ast_u_l":"80"},{"abdominal_pain":"false","abnormal_abdominal_exam":"false","abnormal_chest_xray":"false","abnormal_pancreatic_enzymes":"false","ast_u_l":"80"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/pedsrc","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/pedsrc?ast_u_l=80&abnormal_abdominal_exam=false&abnormal_chest_xray=false&abdominal_pain=false&abnormal_pancreatic_enzymes=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/pedsrc","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/pecarn-cspine","description":"PECARN pediatric C-spine (Leonard 2024). No age split. High (consider CT) if GCS 3-8 or AVPU U; abnormal airway, breathing, or circulation; or focal neurologic deficit. Else intermediate (consider x-rays) if neck pain; AMS GCS 9-14; substantial head or torso injury; or midline neck tenderness. Else low (consider clinical clearance). High-risk beats intermediate. Not NEXUS, Canadian C-spine, PECARN head, or PECARN IAI. Not a medical device. magent does not examine the patient.","parameters":[{"in":"query","name":"gcs_3_to_8_or_avpu_u","type":"boolean","description":"GCS 3-8 or AVPU = U as assigned by the caller (Leonard 2024 high-risk; paper: factors associated with >10% CSI). true or false. High-risk; consider CT when any high-risk factor is true. This is not the intermediate GCS 9-14 / AVPU V or P / other AMS flag. magent does not take a GCS integer or AVPU letter.","required":true,"example":"false"},{"in":"query","name":"abnormal_airway_breathing_or_circulation","type":"boolean","description":"Abnormal airway, breathing, or circulation as assigned by the caller (Leonard 2024 high-risk). true or false. High-risk; consider CT when any high-risk factor is true. magent does not examine airway, breathing, or circulation.","required":true,"example":"false"},{"in":"query","name":"focal_neurologic_deficit","type":"boolean","description":"Focal neurologic deficit (paresthesia, numbness, or weakness) as assigned by the caller (Leonard 2024 high-risk). true or false. High-risk; consider CT when any high-risk factor is true. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"neck_pain","type":"boolean","description":"Self-reported neck pain as assigned by the caller (Leonard 2024 CART non-negligible / intermediate). true or false. Consider x-rays when any intermediate factor is true and no high-risk factor is true. magent does not take a pain score.","required":true,"example":"false"},{"in":"query","name":"altered_mental_status_gcs_9_to_14","type":"boolean","description":"Altered mental status as GCS 9-14, AVPU V or P, or other AMS (not the high-risk U / GCS 3-8 flag) as assigned by the caller (Leonard 2024 CART non-negligible / intermediate). true or false. magent does not take a GCS integer or AVPU letter.","required":true,"example":"false"},{"in":"query","name":"substantial_head_injury","type":"boolean","description":"Substantial head injury as assigned by the caller (Leonard 2024 CART non-negligible / intermediate). Paper: injuries warranting inpatient observation or surgical intervention (example: skull fracture). true or false. Caller assigns the boolean; magent does not interpret imaging.","required":true,"example":"false"},{"in":"query","name":"substantial_torso_injury","type":"boolean","description":"Substantial torso injury as assigned by the caller (Leonard 2024 CART non-negligible / intermediate). Paper: injuries warranting inpatient observation or surgical intervention (examples: pneumothorax; solid-organ injury; T/L/S spine fracture; pelvic fracture). true or false. Caller assigns the boolean; magent does not interpret imaging.","required":true,"example":"false"},{"in":"query","name":"midline_neck_tenderness","type":"boolean","description":"Midline neck tenderness as assigned by the caller (Leonard 2024 CART non-negligible / intermediate). true or false. magent does not palpate the neck.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/pecarn-cspine","citation":{"authors":"Leonard JC, Harding M, Cook LJ, et al.","doi":"10.1016/S2352-4642(24)00104-4","id":"leonard-2024","pmid":"38843852","source":"Lancet Child Adolesc Health. 2024;8(7):482-490","title":"PECARN prediction rule for cervical spine imaging of children presenting to the emergency department with blunt trauma: a multicentre prospective observational study","url":"https://doi.org/10.1016/S2352-4642(24)00104-4"},"formula_expression":"high if any high-risk factor (gcs_3_to_8_or_avpu_u, abnormal_airway_breathing_or_circulation, or focal_neurologic_deficit), else intermediate if any CART non-negligible factor (neck_pain, altered_mental_status_gcs_9_to_14, substantial_head_injury, substantial_torso_injury, or midline_neck_tenderness), else low; high-risk beats intermediate; no age split (Leonard 2024)","purpose":"Apply the Leonard 2024 PECARN cervical-spine imaging prediction rule and return high (consider CT), intermediate (consider x-rays), or low (consider clinical clearance) from eight caller-assigned findings after pediatric blunt trauma. No age split.","markdown_url":"https://magentlab.com/docs/pecarn-cspine.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"pecarn_cspine"},{"name":"formula_expression","type":"string","description":"Leonard 2024 one-tree high then intermediate then low C-spine rule"},{"name":"risk_tier","type":"string","description":"high, intermediate, or low. High-risk beats intermediate. No age split."},{"name":"consider_ct","type":"boolean","description":"true when risk_tier is high (consider CT)"},{"name":"consider_xray","type":"boolean","description":"true when risk_tier is intermediate (consider x-rays)"},{"name":"consider_clinical_clearance","type":"boolean","description":"true when risk_tier is low (consider clinical clearance)"},{"name":"criteria","type":"array","description":"Eight caller-assigned flags, high-risk first then intermediate, each with factor and met"},{"name":"citation","type":"object","description":"Leonard 2024 Lancet Child Adolesc Health citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"abnormal_airway_breathing_or_circulation":"false","altered_mental_status_gcs_9_to_14":"false","focal_neurologic_deficit":"false","gcs_3_to_8_or_avpu_u":"false","midline_neck_tenderness":"false","neck_pain":"false","substantial_head_injury":"false","substantial_torso_injury":"false"},{"abnormal_airway_breathing_or_circulation":"false","altered_mental_status_gcs_9_to_14":"false","focal_neurologic_deficit":"false","gcs_3_to_8_or_avpu_u":"false","midline_neck_tenderness":"false","neck_pain":"false","substantial_head_injury":"false","substantial_torso_injury":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/pecarn-cspine","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/pecarn-cspine?gcs_3_to_8_or_avpu_u=false&abnormal_airway_breathing_or_circulation=false&focal_neurologic_deficit=false&neck_pain=false&altered_mental_status_gcs_9_to_14=false&substantial_head_injury=false&substantial_torso_injury=false&midline_neck_tenderness=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/pecarn-cspine","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/pecarn-febrile","description":"Kuppermann 2019 PECARN prediction rule for febrile infants 60 days and younger. Low-risk only if all three hold: caller-assigned negative urinalysis, ANC 4090/uL or less, and serum procalcitonin 1.71 ng/mL or less. Age 0-60 pins the published population and is not a tree variable. Returns low_risk. magent does not assay UA, ANC, or PCT. Not Rochester, Boston, Philadelphia, Step-by-Step, later AAP/PECARN cutoffs, or pecarn-head. Not a medical device and not a discharge or LP order.","parameters":[{"in":"query","name":"age_days","type":"integer","description":"Chronological age in days (integer 0-60). Kuppermann 2019 studied febrile infants 60 days and younger. Age pins the published population and is not a tree variable; age 0 and age 60 can both be low-risk when the three laboratory criteria hold.","required":true,"example":"36"},{"in":"query","name":"negative_urinalysis","type":"boolean","description":"Caller-assigned negative urinalysis as used in Kuppermann 2019. true means the UA is negative. true or false. magent does not assay UA.","required":true,"example":"true"},{"in":"query","name":"anc_per_ul","type":"number","description":"Absolute neutrophil count in cells/µL. Range 0-100000. Low-risk requires ANC 4090/µL or less (4090 meets; 4091 does not). magent does not assay ANC.","required":true,"example":"3000"},{"in":"query","name":"pct_ng_ml","type":"number","description":"Serum procalcitonin in ng/mL. Range 0.01-100. Low-risk requires 1.71 ng/mL or less (1.71 meets; 1.72 does not). magent does not assay procalcitonin.","required":true,"example":"0.5"}],"errors":[{"code":"invalid_pecarn_febrile","message":"age_days must be an integer 0-60, anc_per_ul a number 0-100000, and pct_ng_ml a number 0.01-100 (Kuppermann 2019 PECARN febrile infants ≤60 days). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/pecarn-febrile","citation":{"authors":"Kuppermann N, Dayan PS, Levine DA, et al.","doi":"10.1001/jamapediatrics.2018.5501","id":"kuppermann-2019","pmid":"30776077","source":"JAMA Pediatr. 2019;173(4):342-351","title":"A Clinical Prediction Rule to Identify Febrile Infants 60 Days and Younger at Low Risk for Serious Bacterial Infections.","url":"https://doi.org/10.1001/jamapediatrics.2018.5501"},"formula_expression":"low_risk iff negative_urinalysis and anc_per_ul <= 4090 and pct_ng_ml <= 1.71; age_days 0-60 pins the published population and is not a tree variable (Kuppermann 2019)","purpose":"Apply the Kuppermann 2019 PECARN clinical prediction rule and return low_risk only when a febrile infant 60 days or younger has a caller-assigned negative urinalysis, ANC ≤4090/µL, and serum procalcitonin ≤1.71 ng/mL.","markdown_url":"https://magentlab.com/docs/pecarn-febrile.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"pecarn_febrile"},{"name":"formula_expression","type":"string","description":"Kuppermann 2019 three-variable PECARN low-risk rule"},{"name":"low_risk","type":"boolean","description":"true only when negative_urinalysis, anc_per_ul <= 4090, and pct_ng_ml <= 1.71 all hold. false is not_low_risk. Not an SBI probability and not a discharge or LP order."},{"name":"age_days","type":"integer","description":"Age in days used to pin the published 0-60 day population. Not a tree criterion."},{"name":"anc_per_ul","type":"number","description":"ANC in cells/µL used for the <=4090 cutoff"},{"name":"pct_ng_ml","type":"number","description":"Serum procalcitonin in ng/mL used for the <=1.71 cutoff"},{"name":"criteria","type":"array","description":"Per-criterion rows with factor and met: negative_urinalysis, anc_le_4090, pct_le_1_71. low_risk iff all are met. Age is not a criterion."},{"name":"citation","type":"object","description":"Kuppermann et al. JAMA Pediatr 2019 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age_days":"36","anc_per_ul":"3000","negative_urinalysis":"true","pct_ng_ml":"0.5"},{"age_days":"36","anc_per_ul":"3000","negative_urinalysis":"true","pct_ng_ml":"0.5"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/pecarn-febrile","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/pecarn-febrile?age_days=36&negative_urinalysis=true&anc_per_ul=3000&pct_ng_ml=0.5","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/pecarn-febrile","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/heads-ed","description":"Cappelli 2012 HEADS-ED from seven caller-assigned 0-2 domains (Home, Education, Activities/peers, Drugs/alcohol, Suicidality, Emotions/behavior, Discharge resources). 0 no action needed, 1 needs action but not immediately, 2 needs immediate action. magent sums only (max 14) and does not interview a child. No labeled high-risk band. Not a medical device or psychiatric admission order.","parameters":[{"in":"query","name":"home","type":"integer","description":"Caller-assigned Cappelli 2012 Home (integer 0-2): 0 no action needed (supportive); 1 needs action but not immediately (conflicts); 2 needs immediate action (chaotic/dysfunctional). magent does not interview a child.","required":true,"example":"0"},{"in":"query","name":"education","type":"integer","description":"Caller-assigned Cappelli 2012 Education (integer 0-2): 0 no action needed (on track); 1 needs action but not immediately (grades dropping or absenteeism); 2 needs immediate action (failing/not attending). magent does not interview a child.","required":true,"example":"0"},{"in":"query","name":"activities","type":"integer","description":"Caller-assigned Cappelli 2012 Activities/peers (integer 0-2): 0 no action needed (no change); 1 needs action but not immediately (reduction in activities/increased peer conflicts); 2 needs immediate action (increasingly to fully withdrawn/significant peer conflicts). magent does not interview a child.","required":true,"example":"0"},{"in":"query","name":"drugs","type":"integer","description":"Caller-assigned Cappelli 2012 Drugs/alcohol (integer 0-2): 0 no action needed (none or infrequent); 1 needs action but not immediately (occasional); 2 needs immediate action (frequent/daily). magent does not interview a child.","required":true,"example":"0"},{"in":"query","name":"suicidality","type":"integer","description":"Caller-assigned Cappelli 2012 Suicidality (integer 0-2): 0 no action needed (no thoughts); 1 needs action but not immediately (ideation); 2 needs immediate action (plan or gesture). magent does not interview a child.","required":true,"example":"0"},{"in":"query","name":"emotions","type":"integer","description":"Caller-assigned Cappelli 2012 Emotions/behavior (integer 0-2): 0 no action needed (mildly anxious/sad/acting out); 1 needs action but not immediately (moderately anxious/sad/acting out); 2 needs immediate action (significantly distressed/unable to function/out of control). magent does not interview a child.","required":true,"example":"0"},{"in":"query","name":"discharge_resources","type":"integer","description":"Caller-assigned Cappelli 2012 Discharge resources (integer 0-2): 0 no action needed (ongoing/well connected); 1 needs action but not immediately (some/not meeting needs); 2 needs immediate action (none/on waitlist). magent does not interview a child.","required":true,"example":"0"}],"errors":[{"code":"invalid_heads_ed","message":"HEADS-ED inputs must match Cappelli 2012 home, education, activities, drugs, suicidality, emotions, and discharge resource items from that paper. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/heads-ed","citation":{"authors":"Cappelli M, Gray C, Zemek R, Cloutier P, Kennedy A, Glennie E, Doucet G, Lyons JS","doi":"10.1542/peds.2011-3798","id":"cappelli-2012","pmid":"22826567","source":"Pediatrics. 2012;130(2):e321-e327","title":"The HEADS-ED: a rapid mental health screening tool for pediatric patients in the emergency department","url":"https://doi.org/10.1542/peds.2011-3798"},"formula_expression":"HEADS-ED = home + education + activities + drugs + suicidality + emotions + discharge_resources; each caller-assigned 0-2 (0 no action needed, 1 needs action but not immediately, 2 needs immediate action); max 14","purpose":"Sum seven caller-assigned Cappelli 2012 HEADS-ED integers (0-2) and return the published 0-14 total and per-item scores.","markdown_url":"https://magentlab.com/docs/heads-ed.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"heads_ed"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"HEADS-ED points 0-14"},{"name":"max_score","type":"integer","description":"Always 14"},{"name":"home","type":"integer","description":"Caller-assigned Home points 0-2"},{"name":"education","type":"integer","description":"Caller-assigned Education points 0-2"},{"name":"activities","type":"integer","description":"Caller-assigned Activities/peers points 0-2"},{"name":"drugs","type":"integer","description":"Caller-assigned Drugs/alcohol points 0-2"},{"name":"suicidality","type":"integer","description":"Caller-assigned Suicidality points 0-2"},{"name":"emotions","type":"integer","description":"Caller-assigned Emotions/behavior points 0-2"},{"name":"discharge_resources","type":"integer","description":"Caller-assigned Discharge resources points 0-2"},{"name":"components","type":"array","description":"Per-item caller-assigned points"},{"name":"citation","type":"object","description":"Cappelli et al. Pediatrics 2012 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"activities":"0","discharge_resources":"0","drugs":"0","education":"0","emotions":"0","home":"0","suicidality":"0"},{"activities":"0","discharge_resources":"0","drugs":"0","education":"0","emotions":"0","home":"0","suicidality":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/heads-ed","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/heads-ed?home=0&education=0&activities=0&drugs=0&suicidality=0&emotions=0&discharge_resources=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/heads-ed","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/step-by-step","description":"Gomez 2016 Step-by-Step for febrile infants 90 days and younger (derivation Mintegi 2014). High if ill-appearing, age 21 days or younger, leukocyturia, or PCT >=0.5 ng/mL; else intermediate if CRP >20 mg/L or ANC >10000/uL; else low. Returns risk, low_risk, high_risk, and intermediate_risk. magent does not examine the infant or assay UA, PCT, CRP, or ANC. Not Rochester, Boston, Philadelphia, or PECARN febrile. Not a medical device and not a discharge, admission, LP, or antibiotic order.","parameters":[{"in":"query","name":"age_days","type":"integer","description":"Chronological age in days (integer 0-90). Gomez 2016 studied febrile infants 90 days and younger. Age 21 days or younger is high-risk. Age 22 can be low-risk when remaining low-risk criteria hold.","required":true,"example":"47"},{"in":"query","name":"well_appearing","type":"boolean","description":"Caller-assigned well-appearing as used in Gomez 2016. true or false. Ill-appearing (well_appearing=false) is high-risk. magent does not examine the infant.","required":true,"example":"true"},{"in":"query","name":"leukocyturia","type":"boolean","description":"Caller-assigned leukocyturia (urine dipstick / UA leukocytes) as used in Gomez 2016. true means leukocytes are present and is high-risk. true or false. magent does not assay UA.","required":true,"example":"false"},{"in":"query","name":"pct_ng_ml","type":"number","description":"Serum procalcitonin in ng/mL. Range 0.01-100. High-risk if 0.5 ng/mL or greater (0.5 is high). Low-risk requires less than 0.5. magent does not assay procalcitonin.","required":true,"example":"0.2"},{"in":"query","name":"crp_mg_l","type":"number","description":"C-reactive protein in mg/L. Range 0-500. Intermediate (when not already high) if greater than 20 mg/L (20 is not intermediate). magent does not assay CRP.","required":true,"example":"5"},{"in":"query","name":"anc_per_ul","type":"number","description":"Absolute neutrophil count in cells/µL. Range 0-100000. Intermediate (when not already high) if greater than 10000/µL (10000 is not intermediate). magent does not assay ANC.","required":true,"example":"4000"}],"errors":[{"code":"invalid_step_by_step","message":"age_days must be an integer 0-90, pct_ng_ml a number 0.01-100, crp_mg_l a number 0-500, and anc_per_ul a number 0-100000 (Gomez 2016 Step-by-Step). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/step-by-step","citation":{"authors":"Gomez B, Mintegi S, Bressan S, Da Dalt L, Gervaix A, Lacroix L","doi":"10.1542/peds.2015-4381","id":"gomez-2016","pmid":"27382134","source":"Pediatrics. 2016;138(2):e20154381","title":"Validation of the \"Step-by-Step\" Approach in the Management of Young Febrile Infants","url":"https://doi.org/10.1542/peds.2015-4381"},"formula_expression":"risk = high if not well_appearing or age_days <= 21 or leukocyturia or pct_ng_ml >= 0.5; else intermediate if crp_mg_l > 20 or anc_per_ul > 10000; else low; low_risk iff well_appearing and age_gt_21 and no_leukocyturia and pct_lt_0_5 and crp_le_20 and anc_le_10000 (Gomez 2016 Step-by-Step; derivation Mintegi 2014)","purpose":"Apply the Gomez 2016 sequential Step-by-Step approach and return high, intermediate, or low IBI-risk tier for a febrile infant 90 days or younger.","markdown_url":"https://magentlab.com/docs/step-by-step.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"step_by_step"},{"name":"formula_expression","type":"string","description":"Gomez 2016 sequential Step-by-Step three-tier rule"},{"name":"risk","type":"string","description":"high, intermediate, or low. Sequential: high before intermediate. Not an IBI probability and not a discharge, admission, LP, or antibiotic order."},{"name":"low_risk","type":"boolean","description":"true only when risk is low (every tree criterion holds). false is not a discharge order."},{"name":"high_risk","type":"boolean","description":"true only when risk is high (ill-appearing, age_days <= 21, leukocyturia, or PCT >= 0.5). High beats intermediate."},{"name":"intermediate_risk","type":"boolean","description":"true only when risk is intermediate (CRP > 20 or ANC > 10000 and no high-risk criterion). CRP 20 and ANC 10000 are not intermediate."},{"name":"age_days","type":"integer","description":"Age in days used for the age_days <= 21 high-risk cutoff"},{"name":"pct_ng_ml","type":"number","description":"Serum procalcitonin in ng/mL used for the >=0.5 high-risk cutoff"},{"name":"crp_mg_l","type":"number","description":"CRP in mg/L used for the >20 intermediate cutoff"},{"name":"anc_per_ul","type":"number","description":"ANC in cells/µL used for the >10000 intermediate cutoff"},{"name":"criteria","type":"array","description":"Per-criterion rows with factor and met: well_appearing, age_gt_21, no_leukocyturia, pct_lt_0_5, crp_le_20, anc_le_10000. low_risk iff all are met. If any of well_appearing, age_gt_21, no_leukocyturia, or pct_lt_0_5 is unmet, risk is high even when CRP or ANC is also elevated."},{"name":"citation","type":"object","description":"Gomez et al. Pediatrics 2016 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age_days":"47","anc_per_ul":"4000","crp_mg_l":"5","leukocyturia":"false","pct_ng_ml":"0.2","well_appearing":"true"},{"age_days":"47","anc_per_ul":"4000","crp_mg_l":"5","leukocyturia":"false","pct_ng_ml":"0.2","well_appearing":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/step-by-step","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/step-by-step?age_days=47&well_appearing=true&leukocyturia=false&pct_ng_ml=0.2&crp_mg_l=5&anc_per_ul=4000","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/step-by-step","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/sipa","description":"Acker 2015 SIPA: heart rate in bpm divided by cuff systolic pressure in mm Hg, rounded to two decimals. Elevated if the ratio exceeds the age-band cutoff: 1.22 (ages 4-6), 1.0 (7-12), or 0.9 (13-16). Ages 4-16 only; not for infants or adults 17 and older. Not a diagnosis of shock and not the adult shock-index greater-than-0.9 rule. magent does not measure vitals.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (integer 4-16). Acker 2015 SIPA cohort only. Ages 4-6 use cutoff 1.22, 7-12 use 1.0, and 13-16 use 0.9. Not for infants or adults 17 and older.","required":true,"example":"10"},{"in":"query","name":"heart_rate_bpm","type":"integer","description":"Heart rate in beats per minute (integer 30-220). magent does not measure vitals; the caller assigns the number.","required":true,"example":"80"},{"in":"query","name":"systolic_mm_hg","type":"number","description":"Cuff systolic blood pressure in mm Hg (50-250). magent does not measure vitals.","required":true,"example":"100"}],"errors":[{"code":"invalid_sipa_age","message":"age must be an integer from 4 to 16 (Acker 2015 SIPA cohort). Returned before settlement; you are not charged.","status":400},{"code":"invalid_heart_rate","message":"heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.","status":400},{"code":"invalid_systolic_bp","message":"systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/sipa","citation":{"authors":"Acker SN, Ross JT, Partrick DA, Tong S, Bensard DD","doi":"10.1016/j.jpedsurg.2014.08.009","id":"acker-2015","pmid":"25638631","source":"J Pediatr Surg. 2015;50(2):331-334","title":"Pediatric specific shock index accurately identifies severely injured children","url":"https://doi.org/10.1016/j.jpedsurg.2014.08.009"},"formula_expression":"sipa = heart_rate_bpm / systolic_mm_hg; elevated iff sipa > cutoff (Acker 2015: age 4-6 → 1.22, 7-12 → 1.0, 13-16 → 0.9)","purpose":"Compute Acker 2015 SIPA as heart rate in bpm divided by cuff systolic pressure in mm Hg, then compare the ratio with the published age-band cutoff.","markdown_url":"https://magentlab.com/docs/sipa.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"sipa"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"age","type":"integer","description":"Age in years used (4-16)"},{"name":"heart_rate_bpm","type":"integer","description":"Heart rate used, bpm"},{"name":"systolic_mm_hg","type":"number","description":"Systolic pressure used, mm Hg"},{"name":"sipa","type":"number","description":"Heart rate divided by systolic pressure, 2 decimals"},{"name":"cutoff","type":"number","description":"Acker 2015 age-band cutoff: 1.22 (ages 4-6), 1.0 (7-12), or 0.9 (13-16)"},{"name":"elevated","type":"boolean","description":"true only when sipa is strictly greater than the age-band cutoff"},{"name":"criteria","type":"array","description":"age_4_6, age_7_12, and age_13_16 rows with factor, met, and cutoff value"},{"name":"citation","type":"object","description":"Acker 2015 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"10","heart_rate_bpm":"80","systolic_mm_hg":"100"},{"age":"10","heart_rate_bpm":"80","systolic_mm_hg":"100"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/sipa","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/sipa?age=10&heart_rate_bpm=80&systolic_mm_hg=100","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/sipa","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/new-orleans-head","description":"New Orleans Head CT Rule (Haydel 2000). CT is indicated if any of seven findings: headache, vomiting, age over 60, drug or alcohol intoxication, short-term memory deficit (anterograde amnesia), physical evidence of trauma above the clavicles, or seizure. Published for GCS 15 minor head injury in adults; magent does not take GCS or examine the patient. Not a diagnosis, not the Canadian CT Head Rule, not PECARN, and not pediatric.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Age >60 is a CT indication; 60 does not. The published rule is GCS 15 minor head injury in adults; magent does not take GCS.","required":true,"example":"40"},{"in":"query","name":"headache","type":"boolean","description":"Headache. true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"vomiting","type":"boolean","description":"Vomiting. true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"drug_or_alcohol_intoxication","type":"boolean","description":"Drug or alcohol intoxication. true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"short_term_memory_deficit","type":"boolean","description":"Deficit in short-term memory (anterograde amnesia). true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"trauma_above_clavicles","type":"boolean","description":"Physical evidence of trauma above the clavicles. true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"seizure","type":"boolean","description":"Seizure. true or false as assigned by the caller.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/new-orleans-head","citation":{"authors":"Haydel MJ, Preston CA, Mills TJ, Luber S, Blaudeau E, DeBlieux PM","doi":"10.1056/NEJM200007133430204","id":"haydel-2000","source":"N Engl J Med. 2000;343(2):100-105","title":"Indications for computed tomography in patients with minor head injury","url":"https://doi.org/10.1056/NEJM200007133430204"},"formula_expression":"ct indicated if any of headache, vomiting, age > 60, drug_or_alcohol_intoxication, short_term_memory_deficit, trauma_above_clavicles, or seizure","purpose":"Apply the Haydel 2000 New Orleans Head CT Rule and return whether CT is indicated from age and six caller-assigned findings after minor head injury.","markdown_url":"https://magentlab.com/docs/new-orleans-head.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"new_orleans_head"},{"name":"formula_expression","type":"string","description":"Haydel 2000 seven-factor CT indication rule"},{"name":"ct_indicated","type":"boolean","description":"true when any of the seven published findings is present. Not a diagnosis."},{"name":"age_years","type":"integer","description":"Age used for the >60 criterion"},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met; age_gt_60 is computed from age (value is age_years)"},{"name":"citation","type":"object","description":"Haydel 2000 N Engl J Med citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"40","drug_or_alcohol_intoxication":"false","headache":"false","seizure":"false","short_term_memory_deficit":"false","trauma_above_clavicles":"false","vomiting":"false"},{"age":"40","drug_or_alcohol_intoxication":"false","headache":"false","seizure":"false","short_term_memory_deficit":"false","trauma_above_clavicles":"false","vomiting":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/new-orleans-head","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/new-orleans-head?age=40&headache=false&vomiting=false&drug_or_alcohol_intoxication=false&short_term_memory_deficit=false&trauma_above_clavicles=false&seizure=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/new-orleans-head","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/catch","description":"CATCH (Osmond 2010). CT indicated if any of 7 caller-assigned findings after pediatric minor head injury. High (neurologic intervention): GCS <15 at 2h, open/depressed skull fracture, worsening headache, irritability. Medium if not high (brain injury on CT): basal skull fracture, large boggy scalp hematoma, dangerous mechanism. Low if none. Not PECARN, CHALICE, Canadian CT Head, NEXUS, or CATCH-2. magent does not examine the child or read CT. Not a diagnosis or medical device.","parameters":[{"in":"query","name":"gcs_lt_15_at_2h","type":"boolean","description":"GCS score <15 at two hours after injury. true or false as assigned by the caller. High-risk (need for neurologic intervention). magent does not take a GCS integer.","required":true,"example":"false"},{"in":"query","name":"suspected_open_or_depressed_skull_fracture","type":"boolean","description":"Suspected open or depressed skull fracture. true or false as assigned by the caller. High-risk (need for neurologic intervention). magent does not examine the child.","required":true,"example":"false"},{"in":"query","name":"worsening_headache","type":"boolean","description":"History of worsening headache. true or false as assigned by the caller. High-risk (need for neurologic intervention).","required":true,"example":"false"},{"in":"query","name":"irritability","type":"boolean","description":"Irritability on examination. true or false as assigned by the caller. High-risk (need for neurologic intervention). magent does not examine the child.","required":true,"example":"false"},{"in":"query","name":"basal_skull_fracture","type":"boolean","description":"Any sign of basal skull fracture. true or false as assigned by the caller. Medium-risk (brain injury on CT). magent does not examine the child.","required":true,"example":"false"},{"in":"query","name":"large_boggy_scalp_hematoma","type":"boolean","description":"Large, boggy hematoma of the scalp. true or false as assigned by the caller. Medium-risk (brain injury on CT). magent does not examine the child.","required":true,"example":"false"},{"in":"query","name":"dangerous_mechanism","type":"boolean","description":"Dangerous mechanism of injury as assigned by the caller. true or false. Medium-risk (brain injury on CT). Paper examples: motor vehicle collision, fall from elevation ≥3 ft / ≥91 cm or 5 stairs, fall from bicycle with no helmet. magent does not classify mechanism.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/catch","citation":{"authors":"Osmond MH, Klassen TP, Wells GA, et al.","doi":"10.1503/cmaj.091421","id":"osmond-2010","pmid":"20142371","source":"CMAJ. 2010;182(4):341-348","title":"CATCH: a clinical decision rule for the use of computed tomography in children with minor head injury","url":"https://doi.org/10.1503/cmaj.091421"},"formula_expression":"high if any of gcs_lt_15_at_2h, suspected_open_or_depressed_skull_fracture, worsening_headache, irritability; else medium if any of basal_skull_fracture, large_boggy_scalp_hematoma, dangerous_mechanism; else low; CT indicated if high or medium","purpose":"Apply the Osmond 2010 CATCH derivation and return high, medium, or low risk plus whether CT of the head is indicated from seven caller-assigned findings after pediatric minor head injury.","markdown_url":"https://magentlab.com/docs/catch.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"catch"},{"name":"formula_expression","type":"string","description":"Osmond 2010 CATCH high then medium then low CT indication rule"},{"name":"catch_high_risk","type":"boolean","description":"true when any high-risk finding is present (GCS <15 at 2 h, suspected open or depressed skull fracture, worsening headache, or irritability). Predicts need for neurologic intervention. Not a diagnosis."},{"name":"catch_medium_risk","type":"boolean","description":"true when any medium-risk finding is present (basal skull fracture sign, large boggy scalp hematoma, or dangerous mechanism) and no high-risk finding is present. Predicts brain injury on CT. Not a diagnosis."},{"name":"catch_low_risk","type":"boolean","description":"true when none of the seven published findings is present"},{"name":"ct_indicated","type":"boolean","description":"true when catch_high_risk or catch_medium_risk is true (any of the seven findings). Not a diagnosis."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met; met is true when that Osmond 2010 CATCH finding is present"},{"name":"citation","type":"object","description":"Osmond 2010 CMAJ citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"basal_skull_fracture":"false","dangerous_mechanism":"false","gcs_lt_15_at_2h":"false","irritability":"false","large_boggy_scalp_hematoma":"false","suspected_open_or_depressed_skull_fracture":"false","worsening_headache":"false"},{"basal_skull_fracture":"false","dangerous_mechanism":"false","gcs_lt_15_at_2h":"false","irritability":"false","large_boggy_scalp_hematoma":"false","suspected_open_or_depressed_skull_fracture":"false","worsening_headache":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/catch","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/catch?gcs_lt_15_at_2h=false&suspected_open_or_depressed_skull_fracture=false&worsening_headache=false&irritability=false&basal_skull_fracture=false&large_boggy_scalp_hematoma=false&dangerous_mechanism=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/catch","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/chalice","description":"CHALICE (Dunning 2006). CT required in children 0-15 if any history, exam, or mechanism criterion is present; else low risk. GCS <14, or GCS <15 if age <1 year. Bruise/swelling/laceration >5 cm only if age <1 year. Mechanism is caller-assigned (paper: high-speed RTA >40 mph as occupant/pedestrian/cyclist; fall >3 m; high-speed projectile or object). NAI is caller-assigned. Not PECARN, CATCH, or Canadian CT Head. magent does not examine the child. Not a diagnosis or medical device.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in whole years (0-15). CHALICE is for children younger than 16. Age 0 is younger than 1 year (GCS <15 and bruise >5 cm apply). Age 1-15 uses GCS <14. Age 16 is rejected.","required":true,"example":"10"},{"in":"query","name":"gcs","type":"integer","description":"Glasgow Coma Scale total, integer 3-15 as assigned by the caller. Examination criterion: GCS <14, or GCS <15 if age <1 year.","required":true,"example":"15"},{"in":"query","name":"loc_gt_5_min","type":"boolean","description":"Witnessed loss of consciousness >5 minutes. true or false as assigned by the caller. History criterion. magent does not take a duration integer.","required":true,"example":"false"},{"in":"query","name":"amnesia_gt_5_min","type":"boolean","description":"Amnesia (anterograde or retrograde) >5 minutes. true or false as assigned by the caller. History criterion. magent does not take a duration integer.","required":true,"example":"false"},{"in":"query","name":"abnormal_drowsiness","type":"boolean","description":"Abnormal drowsiness. true or false as assigned by the caller. History criterion. magent does not examine the child.","required":true,"example":"false"},{"in":"query","name":"vomits_ge_3","type":"boolean","description":"Three or more vomits after the head injury. true or false as assigned by the caller. History criterion.","required":true,"example":"false"},{"in":"query","name":"suspicion_nai","type":"boolean","description":"Suspicion of non-accidental injury as assigned by the caller. true or false. History criterion. magent does not diagnose NAI.","required":true,"example":"false"},{"in":"query","name":"seizure_no_epilepsy","type":"boolean","description":"Seizure after the head injury in a child with no history of epilepsy. true or false as assigned by the caller. History criterion.","required":true,"example":"false"},{"in":"query","name":"penetrating_depressed_or_tense_fontanelle","type":"boolean","description":"Suspicion of penetrating or depressed skull injury or tense fontanelle. true or false as assigned by the caller. Examination criterion. magent does not examine the child.","required":true,"example":"false"},{"in":"query","name":"basal_skull_fracture","type":"boolean","description":"Signs of basal skull fracture. true or false as assigned by the caller. Examination criterion. magent does not examine the child.","required":true,"example":"false"},{"in":"query","name":"focal_neurology","type":"boolean","description":"Positive focal neurology. true or false as assigned by the caller. Examination criterion. magent does not examine the child.","required":true,"example":"false"},{"in":"query","name":"bruise_swelling_laceration_gt_5cm","type":"boolean","description":"Bruise, swelling, or laceration >5 cm. true or false as assigned by the caller. Examination criterion that scores only when age <1 year; parsed but not scored when age >= 1. magent does not measure the lesion.","required":true,"example":"false"},{"in":"query","name":"high_speed_rta","type":"boolean","description":"High-speed road traffic accident as occupant, pedestrian, or cyclist as assigned by the caller (paper: speed >40 mph). true or false. Mechanism criterion. magent does not classify mechanism.","required":true,"example":"false"},{"in":"query","name":"fall_gt_3m","type":"boolean","description":"Fall >3 m as assigned by the caller. true or false. Mechanism criterion. magent does not classify mechanism or take a height integer.","required":true,"example":"false"},{"in":"query","name":"high_speed_projectile_or_object","type":"boolean","description":"High-speed injury from a projectile or object as assigned by the caller. true or false. Mechanism criterion. magent does not classify mechanism.","required":true,"example":"false"}],"errors":[{"code":"invalid_chalice_age","message":"age must be an integer from 0 to 15 (Dunning 2006 CHALICE, children younger than 16). Returned before settlement; you are not charged.","status":400},{"code":"invalid_gcs_total","message":"gcs must be an integer from 3 to 15. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/chalice","citation":{"authors":"Dunning J, Daly JP, Lomas JP, Lecky F, Batchelor J, Mackway-Jones K","doi":"10.1136/adc.2005.083980","id":"dunning-2006","pmid":"17056862","source":"Arch Dis Child. 2006;91(11):885-891","title":"Derivation of the children's head injury algorithm for the prediction of important clinical events decision rule for head injury in children","url":"https://doi.org/10.1136/adc.2005.083980"},"formula_expression":"CT required if any history, examination, or mechanism criterion is present; else low risk. GCS <14, or GCS <15 if age <1 year. Bruise, swelling, or laceration >5 cm only if age <1 year. Mechanism is caller-assigned.","purpose":"Apply the Dunning 2006 CHALICE rule and return whether CT is required from caller-assigned history, examination, and mechanism findings after head injury in a child younger than 16.","markdown_url":"https://magentlab.com/docs/chalice.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"chalice"},{"name":"formula_expression","type":"string","description":"Dunning 2006 CHALICE any-criterion CT rule"},{"name":"age_years","type":"integer","description":"Age in years used for age-gated criteria"},{"name":"gcs","type":"integer","description":"GCS total used for the GCS criterion"},{"name":"chalice_ct_required","type":"boolean","description":"true when any published CHALICE criterion is met. Not a diagnosis and not an order for CT."},{"name":"chalice_low_risk","type":"boolean","description":"true when no published CHALICE criterion is met (the negation of chalice_ct_required)"},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met. gcs_criterion is computed from age and GCS. bruise_swelling_laceration_gt_5cm is met only when age <1 year and the flag is true."},{"name":"citation","type":"object","description":"Dunning 2006 Arch Dis Child citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"abnormal_drowsiness":"false","age":"10","amnesia_gt_5_min":"false","basal_skull_fracture":"false","bruise_swelling_laceration_gt_5cm":"false","fall_gt_3m":"false","focal_neurology":"false","gcs":"15","high_speed_projectile_or_object":"false","high_speed_rta":"false","loc_gt_5_min":"false","penetrating_depressed_or_tense_fontanelle":"false","seizure_no_epilepsy":"false","suspicion_nai":"false","vomits_ge_3":"false"},{"abnormal_drowsiness":"false","age":"10","amnesia_gt_5_min":"false","basal_skull_fracture":"false","bruise_swelling_laceration_gt_5cm":"false","fall_gt_3m":"false","focal_neurology":"false","gcs":"15","high_speed_projectile_or_object":"false","high_speed_rta":"false","loc_gt_5_min":"false","penetrating_depressed_or_tense_fontanelle":"false","seizure_no_epilepsy":"false","suspicion_nai":"false","vomits_ge_3":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/chalice","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/chalice?age=10&gcs=15&loc_gt_5_min=false&amnesia_gt_5_min=false&abnormal_drowsiness=false&vomits_ge_3=false&suspicion_nai=false&seizure_no_epilepsy=false&penetrating_depressed_or_tense_fontanelle=false&basal_skull_fracture=false&focal_neurology=false&bruise_swelling_laceration_gt_5cm=false&high_speed_rta=false&fall_gt_3m=false&high_speed_projectile_or_object=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/chalice","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/palchak","description":"Palchak 2003. High risk after blunt head trauma in children 0-17 if any applicable predictor: abnormal mental status, clinical signs of skull fracture, history of vomiting, scalp hematoma (only if age <=2), or headache. Else low risk. ct_not_low_risk iff high. Scalp hematoma is parsed at all ages but scores only when age is 0, 1, or 2. Not PECARN, CATCH, CHALICE, Canadian CT Head, or NEXUS. magent does not examine the child or order CT. Not a diagnosis or medical device.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (integer 0-17). Scalp hematoma is a high-risk predictor only when age is 0, 1, or 2; age 3-17 parse scalp_hematoma but do not score it. Age 18 is rejected.","required":true,"example":"10"},{"in":"query","name":"abnormal_mental_status","type":"boolean","description":"Abnormal mental status as assigned by the caller. true or false. High-risk at all ages 0-17. magent does not examine the child or assign GCS.","required":true,"example":"false"},{"in":"query","name":"clinical_signs_skull_fracture","type":"boolean","description":"Clinical signs of skull fracture as assigned by the caller. true or false. High-risk at all ages 0-17. magent does not examine the child or read a radiograph.","required":true,"example":"false"},{"in":"query","name":"history_of_vomiting","type":"boolean","description":"History of vomiting as assigned by the caller. true or false. High-risk at all ages 0-17.","required":true,"example":"false"},{"in":"query","name":"scalp_hematoma","type":"boolean","description":"Scalp hematoma as assigned by the caller. true or false. High-risk only when age is 0, 1, or 2; parsed but not scored when age >= 3. magent does not examine the scalp.","required":true,"example":"false"},{"in":"query","name":"headache","type":"boolean","description":"Headache as assigned by the caller. true or false. High-risk at all ages 0-17 (Palchak 2003 listed headache as a predictor). magent does not examine the child.","required":true,"example":"false"}],"errors":[{"code":"invalid_palchak_age","message":"age must be an integer from 0 to 17 (Palchak 2003 pediatric blunt head trauma). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/palchak","citation":{"authors":"Palchak MJ, Holmes JF, Vance CW, et al.","doi":"10.1067/S0196-0644(03)00425-6","id":"palchak-2003","pmid":"14520320","source":"Ann Emerg Med. 2003;42(4):492-506","title":"A decision rule for identifying children at low risk for brain injuries after blunt head trauma","url":"https://doi.org/10.1067/S0196-0644(03)00425-6"},"formula_expression":"high if any applicable predictor (abnormal_mental_status, clinical_signs_skull_fracture, history_of_vomiting, scalp_hematoma only if age <= 2, headache); else low; ct_not_low_risk iff high","purpose":"Apply the Palchak 2003 derivation and return high or low risk of brain injury from five caller-assigned findings after blunt head trauma in a child 0-17 years. Scalp hematoma scores only when age is 0, 1, or 2.","markdown_url":"https://magentlab.com/docs/palchak.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"palchak"},{"name":"formula_expression","type":"string","description":"Palchak 2003 any-applicable-predictor high then low rule"},{"name":"age_years","type":"integer","description":"Age in years used for the scalp-hematoma age gate (scores only if age <= 2)"},{"name":"high_risk","type":"boolean","description":"true when any age-applicable Palchak 2003 predictor is present. Mutually exclusive with low_risk. Not a diagnosis and not a CT order."},{"name":"low_risk","type":"boolean","description":"true when no age-applicable Palchak 2003 predictor is present (the negation of high_risk)"},{"name":"ct_not_low_risk","type":"boolean","description":"true when high_risk is true. Not a CT order. magent does not order CT."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met. scalp_hematoma is met only when the flag is true and age is 0, 1, or 2."},{"name":"citation","type":"object","description":"Palchak 2003 Ann Emerg Med citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"abnormal_mental_status":"false","age":"10","clinical_signs_skull_fracture":"false","headache":"false","history_of_vomiting":"false","scalp_hematoma":"false"},{"abnormal_mental_status":"false","age":"10","clinical_signs_skull_fracture":"false","headache":"false","history_of_vomiting":"false","scalp_hematoma":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/palchak","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/palchak?age=10&abnormal_mental_status=false&clinical_signs_skull_fracture=false&history_of_vomiting=false&scalp_hematoma=false&headache=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/palchak","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/ottawa-sah","description":"Ottawa SAH Rule (Perry 2013 JAMA). Investigate when any of six findings is present: age 40 or older, neck pain or stiffness, witnessed loss of consciousness, onset during exertion, thunderclap headache (instantly peaking pain), or limited neck flexion on examination. Not a diagnosis of SAH, not Hunt-Hess, and not Fisher grade. For alert, neurologically intact adults with nontraumatic headache peaking within 1 hour as published. magent does not examine the neck.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Age ≥40 meets this criterion; 39 does not.","required":true,"example":"30"},{"in":"query","name":"neck_pain_or_stiffness","type":"boolean","description":"Neck pain or stiffness as assigned by the caller. true or false.","required":true,"example":"false"},{"in":"query","name":"witnessed_loc","type":"boolean","description":"Witnessed loss of consciousness. true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"onset_during_exertion","type":"boolean","description":"Onset during exertion. true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"thunderclap_headache","type":"boolean","description":"Thunderclap headache (instantly peaking pain as published). true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"limited_neck_flexion","type":"boolean","description":"Limited neck flexion on examination as assigned by the caller. true or false. magent does not examine the neck.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/ottawa-sah","citation":{"authors":"Perry JJ, Stiell IG, Sivilotti MLA, et al.","doi":"10.1001/jama.2013.278018","id":"perry-2013","source":"JAMA. 2013;310(12):1248-1255","title":"Clinical decision rules to rule out subarachnoid hemorrhage for acute headache","url":"https://doi.org/10.1001/jama.2013.278018"},"formula_expression":"Investigation indicated iff age >= 40 or neck_pain_or_stiffness or witnessed_loc or onset_during_exertion or thunderclap_headache or limited_neck_flexion","purpose":"Apply the Perry 2013 Ottawa SAH Rule and return whether investigation is indicated from age and five caller-assigned high-risk findings.","markdown_url":"https://magentlab.com/docs/ottawa-sah.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"ottawa_sah"},{"name":"formula_expression","type":"string","description":"Perry 2013 six-variable investigation rule"},{"name":"investigation_indicated","type":"boolean","description":"true when any published high-risk finding is present. Not a diagnosis of SAH."},{"name":"age_years","type":"integer","description":"Age used for the ≥40 criterion"},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met; age_ge_40 includes the age value"},{"name":"citation","type":"object","description":"Perry 2013 JAMA citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"30","limited_neck_flexion":"false","neck_pain_or_stiffness":"false","onset_during_exertion":"false","thunderclap_headache":"false","witnessed_loc":"false"},{"age":"30","limited_neck_flexion":"false","neck_pain_or_stiffness":"false","onset_during_exertion":"false","thunderclap_headache":"false","witnessed_loc":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/ottawa-sah","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/ottawa-sah?age=30&neck_pain_or_stiffness=false&witnessed_loc=false&onset_during_exertion=false&thunderclap_headache=false&limited_neck_flexion=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/ottawa-sah","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/stone-score","description":"Moore 2014 STONE score for ED prediction of uncomplicated ureteral stone. Table 3 integer points: sex female 0 male 2; timing gt_24h 0, 6_to_24h 1, lt_6h 3; origin black 0, nonblack 3 (caller-assigned as used in Moore 2014; magent does not assign race); nausea none 0, nausea_alone 1, vomiting 2; hematuria absent 0, present 3. Sum 0-13; 0-5 low, 6-9 moderate, 10-13 high. Not a CT order or stone diagnosis. Not S.T.O.N.E. nephrolithometry.","parameters":[{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"Caller-assigned sex (Moore 2014 Table 3). female scores 0; male scores 2. magent does not assign sex.","required":true,"example":"male"},{"in":"query","name":"timing","type":"string","enum":["gt_24h","6_to_24h","lt_6h"],"description":"Caller-assigned duration of pain to presentation (Moore 2014 Table 3). gt_24h scores 0; 6_to_24h scores 1; lt_6h scores 3. magent does not timestamp onset.","required":true,"example":"lt_6h"},{"in":"query","name":"origin","type":"string","enum":["black","nonblack"],"description":"Caller-assigned origin as used in Moore 2014 Table 3 (Race: Black 0, Non-black 3). black scores 0; nonblack scores 3. magent does not assign race.","required":true,"example":"nonblack"},{"in":"query","name":"nausea","type":"string","enum":["none","nausea_alone","vomiting"],"description":"Caller-assigned nausea (Moore 2014 Table 3). none scores 0; nausea_alone scores 1; vomiting scores 2 (Table 3 vomiting alone). If vomiting is present use vomiting even if nausea is also present. magent does not take a history.","required":true,"example":"vomiting"},{"in":"query","name":"hematuria","type":"boolean","description":"Caller-assigned erythrocytes / hematuria on urine dipstick (Moore 2014 Table 3). false (absent) scores 0; true (present) scores 3. Binary dipstick as in Table 3, not graded RBC counts. magent does not read a dipstick.","required":true,"example":"true"}],"errors":[{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_stone_score","message":"STONE inputs must match Moore 2014 sex, timing, origin, nausea, and dipstick hematuria. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/stone-score","citation":{"authors":"Moore CL, Bomann S, Daniels B, Luty S, Molinaro A, Singh D, Gross CP","doi":"10.1136/bmj.g2191","id":"moore-2014-stone","pmid":"24671981","source":"BMJ. 2014;348:g2191","title":"Derivation and validation of a clinical prediction rule for uncomplicated ureteral stone—the STONE score: retrospective and prospective observational cohort studies","url":"https://doi.org/10.1136/bmj.g2191"},"formula_expression":"STONE = sex (female 0, male 2) + timing (gt_24h 0, 6_to_24h 1, lt_6h 3) + origin (black 0, nonblack 3) + nausea (none 0, nausea_alone 1, vomiting 2) + hematuria (absent 0, present 3); Moore 2014 Table 3; sum 0-13; 0-5 low, 6-9 moderate, 10-13 high","purpose":"Sum the Moore 2014 STONE score for uncomplicated ureteral stone from five caller-assigned Table 3 items and return the 0-13 total plus low (0-5), moderate (6-9), or high (10-13) probability.","markdown_url":"https://magentlab.com/docs/stone-score.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"stone_score"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Moore 2014 STONE integer 0-13. Not a CT order or stone diagnosis."},{"name":"max_score","type":"integer","description":"13"},{"name":"probability","type":"string","description":"low when score is 0-5, moderate when 6-9, high when 10-13 (Moore 2014 derivation/validation bands). Not a stone diagnosis."},{"name":"derivation_stone_percent","type":"number","description":"Moore 2014 derivation ureteral-stone percent for the band: 8.3 (low), 51.6 (moderate), 89.6 (high). One decimal from that paper."},{"name":"sex","type":"string","description":"Caller-assigned sex used (female or male)"},{"name":"timing","type":"string","description":"Caller-assigned timing used (gt_24h, 6_to_24h, or lt_6h)"},{"name":"origin","type":"string","description":"Caller-assigned origin used (black or nonblack)"},{"name":"nausea","type":"string","description":"Caller-assigned nausea used (none, nausea_alone, or vomiting)"},{"name":"hematuria","type":"boolean","description":"Caller-assigned dipstick hematuria used (true present, false absent)"},{"name":"components","type":"array","description":"Per-item Moore 2014 Table 3 points"},{"name":"citation","type":"object","description":"Moore et al. BMJ 2014 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"hematuria":"true","nausea":"vomiting","origin":"nonblack","sex":"male","timing":"lt_6h"},{"hematuria":"true","nausea":"vomiting","origin":"nonblack","sex":"male","timing":"lt_6h"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/stone-score","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/stone-score?sex=male&timing=lt_6h&origin=nonblack&nausea=vomiting&hematuria=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/stone-score","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rcri","description":"Lee 1999 revised cardiac risk index: six 1-point factors (high-risk surgery, ischemic heart disease, heart failure, cerebrovascular disease, insulin diabetes, creatinine >2.0 mg/dL) and class I–IV. Deterministic published arithmetic with citation; not operative clearance.","parameters":[{"in":"query","name":"high_risk_surgery","type":"boolean","description":"Intraperitoneal, intrathoracic, or suprainguinal vascular surgery (Lee 1999). true or false.","required":true,"example":"false"},{"in":"query","name":"ischemic_heart_disease","type":"boolean","description":"History of myocardial infarction, positive exercise test, current chest pain from ischemia, nitrate use, or Q waves (Lee 1999). true or false.","required":true,"example":"false"},{"in":"query","name":"congestive_heart_failure","type":"boolean","description":"History of heart failure, pulmonary edema, PND, rales, S3, or chest radiograph with vascular redistribution (Lee 1999). true or false.","required":true,"example":"false"},{"in":"query","name":"cerebrovascular_disease","type":"boolean","description":"History of stroke or TIA (Lee 1999). true or false.","required":true,"example":"false"},{"in":"query","name":"insulin_diabetes","type":"boolean","description":"Preoperative insulin therapy for diabetes (Lee 1999). true or false.","required":true,"example":"false"},{"in":"query","name":"creatinine_gt_2","type":"boolean","description":"Preoperative serum creatinine >2.0 mg/dL (Lee 1999). true or false.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rcri","citation":{"authors":"Lee TH, Marcantonio ER, Mangione CM, et al.","doi":"10.1161/01.CIR.100.10.1043","id":"lee-1999","source":"Circulation. 1999;100(10):1043-1049","title":"Derivation and prospective validation of a simple index for prediction of cardiac risk of major noncardiac surgery","url":"https://doi.org/10.1161/01.CIR.100.10.1043"},"formula_expression":"RCRI = high_risk_surgery + ischemic_heart_disease + congestive_heart_failure + cerebrovascular_disease + insulin_diabetes + creatinine_gt_2; each 1; max 6","purpose":"Sum the six Lee 1999 revised cardiac risk index factors and return class I–IV.","markdown_url":"https://magentlab.com/docs/rcri.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rcri"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"RCRI points 0-6"},{"name":"max_score","type":"integer","description":"6"},{"name":"rcri_class","type":"string","description":"Lee 1999 class I (0), II (1), III (2), or IV (≥3). A class, not clearance."},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Lee et al. Circulation 1999 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"cerebrovascular_disease":"false","congestive_heart_failure":"false","creatinine_gt_2":"false","high_risk_surgery":"false","insulin_diabetes":"false","ischemic_heart_disease":"false"},{"cerebrovascular_disease":"false","congestive_heart_failure":"false","creatinine_gt_2":"false","high_risk_surgery":"false","insulin_diabetes":"false","ischemic_heart_disease":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rcri","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rcri?high_risk_surgery=false&ischemic_heart_disease=false&congestive_heart_failure=false&cerebrovascular_disease=false&insulin_diabetes=false&creatinine_gt_2=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rcri","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/gupta-mica","description":"Gupta 2011 Table 2 logistic probability of 30-day myocardial infarction or cardiac arrest after surgery from age, ASA class, functional status, creatinine category (normal, abnormal >1.5 mg/dL, or missing), and surgery type (hernia reference). Returns logit and estimated_probability_percent. Not a medical device, not a diagnosis, not surgical clearance, and not RCRI. Gupta 2011 publishes no low/high cutoff.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Gupta 2011 Table 2: +0.02 per year.","required":true,"example":"40"},{"in":"query","name":"functional_status","type":"string","enum":["independent","partially_dependent","totally_dependent"],"description":"Gupta 2011 functional status as assigned by the caller: independent (reference, 0), partially_dependent (+0.65), or totally_dependent (+1.03). magent does not examine the patient.","required":true,"example":"independent"},{"in":"query","name":"asa_class","type":"integer","description":"ASA physical status 1-5 (Gupta 2011 Table 2; class 5 is the reference). class 1 -5.17, class 2 -3.29, class 3 -1.92, class 4 -0.95, class 5 adds 0. Caller-assigned integer.","required":true,"example":"2"},{"in":"query","name":"creatinine","type":"string","enum":["normal","abnormal","missing"],"description":"Gupta 2011 creatinine category as assigned by the caller: normal (reference, 0), abnormal (>1.5 mg/dL, +0.61), or missing (-0.10). Do not send a creatinine number.","required":true,"example":"normal"},{"in":"query","name":"surgery","type":"string","enum":["hernia","anorectal","aortic","bariatric","brain","breast","cardiac","ent","foregut_hpb","gbaas","intestinal","neck","obstetric_gynecologic","orthopedic","other_abdomen","peripheral_vascular","skin","spine","thoracic","vein","urology"],"description":"Gupta 2011 Table 2 procedure category as assigned by the caller. hernia is the reference (0). gbaas is gallbladder, adrenal, appendix, or spleen (laparoscopic cholecystectomy in the paper example). magent does not classify a CPT code.","required":true,"example":"gbaas"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_gupta_mica","message":"each Gupta 2011 MICA item must be a published category for that field. Returned before settlement; you are not charged.","status":400},{"code":"invalid_gupta_surgery","message":"surgery must be a Gupta 2011 Table 2 procedure category (hernia is the reference). Returned before settlement; you are not charged.","status":400},{"code":"invalid_asa_class","message":"asa_class must be an integer from 1 to 5 (Gupta 2011 ASA physical status). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/gupta-mica","citation":{"authors":"Gupta PK, Gupta H, Sundaram A, et al.","doi":"10.1161/CIRCULATIONAHA.110.015701","id":"gupta-2011","pmid":"21730309","source":"Circulation. 2011;124(4):381-387","title":"Development and validation of a risk calculator for prediction of cardiac risk after surgery","url":"https://doi.org/10.1161/CIRCULATIONAHA.110.015701"},"formula_expression":"L = -5.25 + 0.02*age + functional_status + asa_class + creatinine + surgery (Gupta 2011 Table 2); independent 0, partially_dependent 0.65, totally_dependent 1.03; ASA1 -5.17, ASA2 -3.29, ASA3 -1.92, ASA4 -0.95, ASA5 0; creatinine normal 0, abnormal 0.61, missing -0.10; hernia 0, anorectal -0.16, aortic 1.60, bariatric -0.25, brain 1.40, breast -1.61, cardiac 1.01, ent 0.71, foregut_hpb 1.39, gbaas 0.59, intestinal 1.14, neck 0.18, obstetric_gynecologic 0.76, orthopedic 0.80, other_abdomen 1.13, peripheral_vascular 0.86, skin 0.54, spine 0.21, thoracic 0.40, vein -1.09, urology -0.26; estimated_probability_percent = 100 * exp(L) / (1 + exp(L))","purpose":"Compute the Gupta 2011 Table 2 logistic probability of 30-day myocardial infarction or cardiac arrest after surgery from age, ASA class, functional status, creatinine category, and surgery type.","markdown_url":"https://magentlab.com/docs/gupta-mica.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"gupta_mica"},{"name":"formula_expression","type":"string","description":"Gupta 2011 Table 2 logistic expression"},{"name":"age_years","type":"integer","description":"Input age in years"},{"name":"functional_status","type":"string","description":"independent, partially_dependent, or totally_dependent"},{"name":"asa_class","type":"integer","description":"ASA physical status 1-5"},{"name":"creatinine","type":"string","description":"normal, abnormal, or missing"},{"name":"surgery","type":"string","description":"Gupta 2011 Table 2 procedure category"},{"name":"logit","type":"number","description":"Gupta 2011 Table 2 linear predictor L, 4 decimal places"},{"name":"estimated_probability_percent","type":"number","description":"100 * exp(L) / (1 + exp(L)) from the unrounded logit, 2 decimal places. A probability, not a clearance."},{"name":"citation","type":"object","description":"Gupta et al. Circulation 2011 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"40","asa_class":"2","creatinine":"normal","functional_status":"independent","surgery":"gbaas"},{"age":"40","asa_class":"2","creatinine":"normal","functional_status":"independent","surgery":"gbaas"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/gupta-mica","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/gupta-mica?age=40&functional_status=independent&asa_class=2&creatinine=normal&surgery=gbaas","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/gupta-mica","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/gupta-prf","description":"Gupta 2011 Chest logistic probability of postoperative respiratory failure (mechanical ventilation >48 h after surgery or unplanned intubation within 30 days) from ASA class, functional status, preoperative sepsis, emergency case, and surgery type (hernia reference). Returns logit and estimated_probability_percent. Not a medical device, not a diagnosis, not a ventilator order, and not ARISCAT. Gupta 2011 publishes no low/high cutoff.","parameters":[{"in":"query","name":"functional_status","type":"string","enum":["independent","partially_dependent","totally_dependent"],"description":"Gupta 2011 Chest functional status as assigned by the caller: independent (reference, 0), partially_dependent (+0.7678), or totally_dependent (+1.4046). magent does not examine the patient.","required":true,"example":"independent"},{"in":"query","name":"asa_class","type":"integer","description":"ASA physical status 1-5 (Gupta 2011 Chest logistic table; class 5 is the reference). class 1 -3.5265, class 2 -2.0008, class 3 -0.6201, class 4 +0.2441, class 5 adds 0. Caller-assigned integer.","required":true,"example":"2"},{"in":"query","name":"sepsis","type":"string","enum":["none","sirs","sepsis","septic_shock"],"description":"Gupta 2011 Chest preoperative sepsis category as assigned by the caller: none (-0.7840), sirs (reference, 0), sepsis (+0.2752), or septic_shock (+0.9035). magent does not diagnose sepsis.","required":true,"example":"none"},{"in":"query","name":"emergency","type":"boolean","description":"Gupta 2011 Chest emergency case as assigned by the caller: true (reference, 0) or false (elective, -0.5739).","required":true,"example":"false"},{"in":"query","name":"surgery","type":"string","enum":["hernia","anorectal","aortic","bariatric","brain","breast","cardiac","ent","foregut_hpb","gbaas","intestinal","neck","obstetric_gynecologic","orthopedic","other_abdomen","peripheral_vascular","skin","spine","thoracic","vein","urology"],"description":"Gupta 2011 Chest procedure category as assigned by the caller. hernia (ventral, inguinal, or femoral) is the reference (0). gbaas is gallbladder, appendix, adrenal, or spleen. thoracic is non-esophageal thoracic. orthopedic is orthopedic or non-vascular extremity. ent excludes thyroid/parathyroid (neck). magent does not classify a CPT code.","required":true,"example":"hernia"}],"errors":[{"code":"invalid_gupta_prf","message":"Gupta postoperative respiratory failure needs the published NSQIP predictors in range. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/gupta-prf","citation":{"authors":"Gupta H, Gupta PK, Fang X, Miller WJ, Cemaj S, Forse RA, Morrow LE","doi":"10.1378/chest.11-0466","id":"gupta-2011-prf","pmid":"21757571","source":"Chest. 2011;140(5):1207-1215","title":"Development and validation of a risk calculator predicting postoperative respiratory failure","url":"https://doi.org/10.1378/chest.11-0466"},"formula_expression":"L = -1.7397 + functional_status + asa_class + sepsis + emergency + surgery (Gupta 2011 Chest logistic table); independent 0, partially_dependent 0.7678, totally_dependent 1.4046; ASA1 -3.5265, ASA2 -2.0008, ASA3 -0.6201, ASA4 0.2441, ASA5 0; sepsis none -0.7840, sirs 0, sepsis 0.2752, septic_shock 0.9035; elective -0.5739, emergency 0; hernia 0, anorectal -1.3530, aortic 1.0781, bariatric -1.0112, brain 0.7336, breast -2.6462, cardiac 0.2744, ent 0.1060, foregut_hpb 0.9694, gbaas -0.5668, intestinal 0.5737, neck -0.5271, obstetric_gynecologic -1.2431, orthopedic -0.8577, other_abdomen 0.2416, peripheral_vascular -0.2389, skin -0.3206, spine -0.5220, thoracic 0.6715, vein -2.0080, urology 0.3093; estimated_probability_percent = 100 * exp(L) / (1 + exp(L))","purpose":"Compute the Gupta 2011 Chest logistic probability of postoperative respiratory failure (mechanical ventilation >48 h after surgery or unplanned intubation within 30 days) from ASA class, functional status, preoperative sepsis, emergency case, and surgery type.","markdown_url":"https://magentlab.com/docs/gupta-prf.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"gupta_prf"},{"name":"formula_expression","type":"string","description":"Gupta 2011 Chest logistic expression"},{"name":"functional_status","type":"string","description":"independent, partially_dependent, or totally_dependent"},{"name":"asa_class","type":"integer","description":"ASA physical status 1-5"},{"name":"sepsis","type":"string","description":"none, sirs, sepsis, or septic_shock"},{"name":"emergency","type":"boolean","description":"true if the case is an emergency"},{"name":"surgery","type":"string","description":"Gupta 2011 Chest procedure category"},{"name":"logit","type":"number","description":"Gupta 2011 Chest linear predictor L, 4 decimal places"},{"name":"estimated_probability_percent","type":"number","description":"100 * exp(L) / (1 + exp(L)) from the unrounded logit, 2 decimal places. A probability, not a ventilator order."},{"name":"citation","type":"object","description":"Gupta et al. Chest 2011 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"asa_class":"2","emergency":"false","functional_status":"independent","sepsis":"none","surgery":"hernia"},{"asa_class":"2","emergency":"false","functional_status":"independent","sepsis":"none","surgery":"hernia"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/gupta-prf","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/gupta-prf?functional_status=independent&asa_class=2&sepsis=none&emergency=false&surgery=hernia","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/gupta-prf","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/gupta-pneumonia","description":"Gupta 2013 Mayo Clin Proc logistic probability of postoperative pneumonia from age, COPD, ASA class, functional status, preoperative sepsis, smoking in the last year, and surgery type (hernia reference). Returns logit and estimated_probability_percent. Not a medical device, not a diagnosis, not an antibiotic order, and not a ventilator order. Gupta 2013 publishes no low/high cutoff and does not use race.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Gupta 2013 Mayo Clin Proc: +0.0144 per year.","required":true,"example":"40"},{"in":"query","name":"copd","type":"boolean","description":"Gupta 2013 COPD causing functional disability or hospitalization, or FEV1 <75%, as assigned by the caller: true (reference, 0) or false (-0.4553). magent does not diagnose COPD.","required":true,"example":"false"},{"in":"query","name":"functional_status","type":"string","enum":["independent","partially_dependent","totally_dependent"],"description":"Gupta 2013 Mayo Clin Proc functional status as assigned by the caller: independent (reference, 0), partially_dependent (+0.7653), or totally_dependent (+0.9400). magent does not examine the patient.","required":true,"example":"independent"},{"in":"query","name":"asa_class","type":"integer","description":"ASA physical status 1-5 (Gupta 2013 Mayo Clin Proc logistic table; class 5 is the reference). class 1 -3.0225, class 2 -1.6057, class 3 -0.4915, class 4 +0.0123, class 5 adds 0. Caller-assigned integer.","required":true,"example":"2"},{"in":"query","name":"sepsis","type":"string","enum":["none","sirs","sepsis","septic_shock"],"description":"Gupta 2013 Mayo Clin Proc preoperative sepsis category as assigned by the caller: none (-0.7641), sirs (reference, 0), sepsis (-0.0842), or septic_shock (+0.1048). magent does not diagnose sepsis.","required":true,"example":"none"},{"in":"query","name":"smoking","type":"boolean","description":"Gupta 2013 smoking within the last year as assigned by the caller: true (reference, 0) or false (-0.4306).","required":true,"example":"false"},{"in":"query","name":"surgery","type":"string","enum":["hernia","anorectal","aortic","bariatric","brain","breast","cardiac","ent","foregut_hpb","gbaas","intestinal","neck","obstetric_gynecologic","orthopedic","other_abdomen","peripheral_vascular","skin","spine","thoracic","vein","urology"],"description":"Gupta 2013 Mayo Clin Proc procedure category as assigned by the caller. hernia (ventral, inguinal, or femoral) is the reference (0). gbaas is gallbladder, appendix, adrenal, or spleen. thoracic is non-esophageal thoracic. orthopedic is orthopedic or non-vascular extremity. ent excludes thyroid/parathyroid (neck). magent does not classify a CPT code.","required":true,"example":"hernia"}],"errors":[{"code":"invalid_gupta_pneumonia","message":"Gupta pneumonia needs Gupta 2013 age, COPD, functional status, ASA, sepsis, smoking, and surgery type in published ranges. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/gupta-pneumonia","citation":{"authors":"Gupta H, Gupta PK, Schuller D, Fang X, Miller WJ, Modrykamien A, Wichman TO, Morrow LE","doi":"10.1016/j.mayocp.2013.06.027","id":"gupta-2013-pneumonia","pmid":"24182703","source":"Mayo Clin Proc. 2013;88(11):1241-1249","title":"Development and validation of a risk calculator for predicting postoperative pneumonia","url":"https://doi.org/10.1016/j.mayocp.2013.06.027"},"formula_expression":"L = -2.8977 + 0.0144*age + copd + functional_status + asa_class + sepsis + smoking + surgery (Gupta 2013 Mayo Clin Proc logistic table); COPD no -0.4553, yes 0; independent 0, partially_dependent 0.7653, totally_dependent 0.9400; ASA1 -3.0225, ASA2 -1.6057, ASA3 -0.4915, ASA4 0.0123, ASA5 0; sepsis none -0.7641, sirs 0, sepsis -0.0842, septic_shock 0.1048; smoking no -0.4306, yes 0; hernia 0, anorectal -0.8470, aortic 0.7178, bariatric -0.6282, brain 0.6841, breast -2.3318, cardiac 0.1382, ent -0.3665, foregut_hpb 1.0660, gbaas -0.3951, intestinal 0.6169, neck -0.0872, obstetric_gynecologic -0.4101, orthopedic -0.5415, other_abdomen 0.4021, peripheral_vascular -0.4519, skin -0.5075, spine -0.5672, thoracic 0.8901, vein -1.4760, urology 0.1076; estimated_probability_percent = 100 * exp(L) / (1 + exp(L))","purpose":"Compute the Gupta 2013 Mayo Clin Proc logistic probability of postoperative pneumonia from age, COPD, ASA class, functional status, preoperative sepsis, smoking in the last year, and surgery type.","markdown_url":"https://magentlab.com/docs/gupta-pneumonia.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"gupta_pneumonia"},{"name":"formula_expression","type":"string","description":"Gupta 2013 Mayo Clin Proc logistic expression"},{"name":"age_years","type":"integer","description":"Input age in years"},{"name":"copd","type":"boolean","description":"true if Gupta 2013 COPD criterion is present"},{"name":"functional_status","type":"string","description":"independent, partially_dependent, or totally_dependent"},{"name":"asa_class","type":"integer","description":"ASA physical status 1-5"},{"name":"sepsis","type":"string","description":"none, sirs, sepsis, or septic_shock"},{"name":"smoking","type":"boolean","description":"true if the caller assigns smoking within the last year"},{"name":"surgery","type":"string","description":"Gupta 2013 Mayo Clin Proc procedure category"},{"name":"logit","type":"number","description":"Gupta 2013 Mayo Clin Proc linear predictor L, 4 decimal places"},{"name":"estimated_probability_percent","type":"number","description":"100 * exp(L) / (1 + exp(L)) from the unrounded logit, 2 decimal places. A probability, not an antibiotic order."},{"name":"citation","type":"object","description":"Gupta et al. Mayo Clin Proc 2013 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"40","asa_class":"2","copd":"false","functional_status":"independent","sepsis":"none","smoking":"false","surgery":"hernia"},{"age":"40","asa_class":"2","copd":"false","functional_status":"independent","sepsis":"none","smoking":"false","surgery":"hernia"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/gupta-pneumonia","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/gupta-pneumonia?age=40&copd=false&functional_status=independent&asa_class=2&sepsis=none&smoking=false&surgery=hernia","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/gupta-pneumonia","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/resect-90","description":"Taylor 2021 RESECT-90 logistic 90-day mortality after lung resection from age, sex, ECOG, percent predicted DLCO, BMI, creatinine (umol/L), anaemia, arrhythmia, laterality, thoracotomy vs VATS, diagnosis, and resected segments. Returns logit and estimated_mortality_percent. Not a medical device, not an operative go/no-go, and not a published cutoff. magent does not assign ECOG or read spirometry.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Taylor 2021 Table 3 coefficient 0.041 per year. magent does not read a chart.","required":true,"example":"65"},{"in":"query","name":"sex","type":"string","enum":["male","female"],"description":"Sex as assigned by the caller. female is the reference (0). male adds 0.493 (Taylor 2021 Table 3). This is a published sex coefficient, not race.","required":true,"example":"male"},{"in":"query","name":"ecog","type":"integer","description":"ECOG / WHO performance status 0-4 as assigned by the caller (Taylor 2021 Table 3 coefficient 0.183 per point). magent does not assign ECOG.","required":true,"example":"0"},{"in":"query","name":"dlco_percent","type":"number","description":"Percent predicted DLCO (10-200). Taylor 2021 Table 3 subtracts 0.029 per percent. magent does not read spirometry or a gas-transfer tracing.","required":true,"example":"73"},{"in":"query","name":"bmi","type":"number","description":"Body-mass index in kg/m2 (10-80). Taylor 2021 Table 3 subtracts 0.056 per kg/m2. magent does not weigh the patient.","required":true,"example":"27"},{"in":"query","name":"creatinine_umol_l","type":"number","description":"Serum creatinine in µmol/L as published (20-2000). Taylor 2021 Table 3 coefficient 0.005 per µmol/L. Not mg/dL.","required":true,"example":"74"},{"in":"query","name":"anemia","type":"boolean","description":"Taylor 2021 WHO anaemia as assigned by the caller: haemoglobin <120 g/L for women or <130 g/L for men (+0.242). true or false. magent does not read a haemoglobin.","required":true,"example":"false"},{"in":"query","name":"arrhythmia","type":"boolean","description":"Preoperative arrhythmia as assigned by the caller (Taylor 2021 Table 3 +0.608). true or false. magent does not read an ECG.","required":true,"example":"false"},{"in":"query","name":"laterality","type":"string","enum":["left","right"],"description":"Resection laterality as assigned by the caller. left is the reference (0). right adds 0.379 (Taylor 2021 Table 3). magent does not read an operative note.","required":true,"example":"left"},{"in":"query","name":"surgical_approach","type":"string","enum":["vats","thoracotomy"],"description":"Approach as assigned by the caller. vats is the non-thoracotomy reference (0). thoracotomy adds 0.634 (Taylor 2021 Table 3). magent does not classify the incision.","required":true,"example":"vats"},{"in":"query","name":"diagnosis","type":"string","enum":["benign","malignant"],"description":"Diagnosis as assigned by the caller. benign is the reference (0). malignant (confirmed or suspected) adds 0.769 (Taylor 2021 Table 3).","required":true,"example":"benign"},{"in":"query","name":"resected_segments","type":"integer","description":"Number of resected bronchopulmonary segments (0-19). Taylor 2021 Table 3 coefficient 0.179 per segment. magent does not map a procedure to segments.","required":true,"example":"3"}],"errors":[{"code":"invalid_resect_90","message":"RESECT-90 needs Taylor 2021 lung-resection predictors in published ranges. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/resect-90","citation":{"authors":"Taylor M, Martin GP, Abah U, Sperrin M, Smith MO, Bhullar D, Shackcloth M, Woolley S, West D, Shah R, Grant SW; North West Thoracic Surgery Collaborative (NWTSC)","doi":"10.1093/icvts/ivab200","id":"taylor-2021","pmid":"34324664","source":"Interact Cardiovasc Thorac Surg. 2021;33(6):921-927","title":"Development and internal validation of a clinical prediction model for 90-day mortality after lung resection: the RESECT-90 score","url":"https://doi.org/10.1093/icvts/ivab200"},"formula_expression":"L = -6.036 + 0.041*age + 0.493*male + 0.183*ecog - 0.029*dlco_percent - 0.056*bmi + 0.005*creatinine_umol_l + 0.242*anemia + 0.608*arrhythmia + 0.379*right + 0.179*resected_segments + 0.634*thoracotomy + 0.769*malignant (Taylor 2021 Table 3 / PMC8632783); estimated_mortality_percent = 100 / (1 + exp(-L)) from the unrounded logit, 2 decimals","purpose":"Compute the Taylor 2021 RESECT-90 logistic estimated 90-day mortality after lung resection from the twelve published preoperative variables in Table 3.","markdown_url":"https://magentlab.com/docs/resect-90.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"resect_90"},{"name":"formula_expression","type":"string","description":"Taylor 2021 Table 3 logistic expression"},{"name":"age_years","type":"integer","description":"Age in years"},{"name":"sex","type":"string","description":"male or female"},{"name":"ecog","type":"integer","description":"Caller-assigned ECOG 0-4"},{"name":"dlco_percent","type":"number","description":"Percent predicted DLCO"},{"name":"bmi","type":"number","description":"BMI in kg/m2"},{"name":"creatinine_umol_l","type":"number","description":"Creatinine in µmol/L as published"},{"name":"anemia","type":"boolean","description":"true if WHO anaemia is present"},{"name":"arrhythmia","type":"boolean","description":"true if preoperative arrhythmia"},{"name":"laterality","type":"string","description":"left or right"},{"name":"surgical_approach","type":"string","description":"vats or thoracotomy"},{"name":"diagnosis","type":"string","description":"benign or malignant"},{"name":"resected_segments","type":"integer","description":"Number of resected bronchopulmonary segments"},{"name":"logit","type":"number","description":"Taylor 2021 Table 3 linear predictor L, 4 decimal places"},{"name":"estimated_mortality_percent","type":"number","description":"100 / (1 + exp(-L)) from the unrounded logit, 2 decimal places. Estimated 90-day mortality percent, not an operative go/no-go."},{"name":"citation","type":"object","description":"Taylor et al. ICVTS 2021 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"65","anemia":"false","arrhythmia":"false","bmi":"27","creatinine_umol_l":"74","diagnosis":"benign","dlco_percent":"73","ecog":"0","laterality":"left","resected_segments":"3","sex":"male","surgical_approach":"vats"},{"age":"65","anemia":"false","arrhythmia":"false","bmi":"27","creatinine_umol_l":"74","diagnosis":"benign","dlco_percent":"73","ecog":"0","laterality":"left","resected_segments":"3","sex":"male","surgical_approach":"vats"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/resect-90","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/resect-90?age=65&sex=male&ecog=0&dlco_percent=73&bmi=27&creatinine_umol_l=74&anemia=false&arrhythmia=false&laterality=left&surgical_approach=vats&diagnosis=benign&resected_segments=3","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/resect-90","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/lace","description":"LACE (van Walraven 2010 CMAJ Table 3) from length of stay in days (<1 0; 1 1; 2 2; 3 3; 4-6 4; 7-13 5; >=14 7), acute (emergent) admission (true 3), caller-supplied Charlson comorbidity index (0-3 identity; >=4 5), and ED visits in the previous 6 months (0-3 identity; >=4 4). Score 0-19 only; no unpublished high-risk class. Not a discharge order. magent does not compute Charlson.","parameters":[{"in":"query","name":"length_of_stay_days","type":"integer","description":"Length of stay in days (integer 0-365). van Walraven 2010 Table 3 L: <1 → 0, 1 → 1, 2 → 2, 3 → 3, 4-6 → 4, 7-13 → 5, ≥14 → 7. 0 days is the <1 bin.","required":true,"example":"1"},{"in":"query","name":"acute_admission","type":"boolean","description":"Acute (emergent) admission as assigned by the caller (true or false). van Walraven 2010 Table 3 A: true → 3, false → 0.","required":true,"example":"false"},{"in":"query","name":"charlson","type":"integer","description":"Caller-supplied Charlson comorbidity index (integer 0-37). magent does not compute Charlson. van Walraven 2010 Table 3 C: 0 → 0, 1 → 1, 2 → 2, 3 → 3, ≥4 → 5.","required":true,"example":"0"},{"in":"query","name":"ed_visits_6mo","type":"integer","description":"Emergency-department visits in the previous 6 months (integer 0-30). van Walraven 2010 Table 3 E: 0 → 0, 1 → 1, 2 → 2, 3 → 3, ≥4 → 4.","required":true,"example":"0"}],"errors":[{"code":"invalid_length_of_stay","message":"length_of_stay_days must be an integer from 0 to 365 (van Walraven 2010 LACE). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_charlson","message":"charlson must be an integer from 0 to 37 (van Walraven 2010 LACE uses the Charlson score as input). Returned before settlement; you are not charged.","status":400},{"code":"invalid_ed_visits","message":"ed_visits_6mo must be an integer from 0 to 30 (van Walraven 2010 LACE). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/lace","citation":{"authors":"van Walraven C, Dhalla IA, Bell C, Etchells E, Stiell IG, Zarnke K, Austin PC, Forster AJ","doi":"10.1503/cmaj.091117","id":"van-walraven-2010","pmid":"20194559","source":"CMAJ. 2010;182(6):551-557","title":"Derivation and validation of an index to predict early death or unplanned readmission after discharge from hospital to the community","url":"https://doi.org/10.1503/cmaj.091117"},"formula_expression":"LACE = los_points + acute_admission_points + charlson_points + ed_visits_points; van Walraven 2010 Table 3; LOS <1 0, 1 1, 2 2, 3 3, 4-6 4, 7-13 5, >=14 7; acute true 3; Charlson 0-3 identity, >=4 5; ED 0-3 identity, >=4 4; max 19","purpose":"Sum van Walraven 2010 Table 3 LACE points from length of stay, acute (emergent) admission, a caller-supplied Charlson integer, and ED visits in the previous 6 months.","markdown_url":"https://magentlab.com/docs/lace.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"lace"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"LACE points 0-19 (Table 3 only)"},{"name":"max_score","type":"integer","description":"Always 19"},{"name":"length_of_stay_days","type":"integer","description":"Length of stay in days used for Table 3 L"},{"name":"acute_admission","type":"boolean","description":"Acute (emergent) admission flag used for Table 3 A"},{"name":"charlson","type":"integer","description":"Caller-supplied Charlson integer used for Table 3 C"},{"name":"ed_visits_6mo","type":"integer","description":"ED visits in the previous 6 months used for Table 3 E"},{"name":"components","type":"array","description":"Per-letter Table 3 points"},{"name":"citation","type":"object","description":"van Walraven et al. CMAJ 2010 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"acute_admission":"false","charlson":"0","ed_visits_6mo":"0","length_of_stay_days":"1"},{"acute_admission":"false","charlson":"0","ed_visits_6mo":"0","length_of_stay_days":"1"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/lace","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/lace?length_of_stay_days=1&acute_admission=false&charlson=0&ed_visits_6mo=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/lace","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/hospital","description":"HOSPITAL (Donze 2013 JAMA Intern Med acronym table): hemoglobin_lt_12 (last Hb <12 g/dL) 1; oncology_service 2; sodium_lt_135 (last Na <135 mmol/L) 1; procedure (any ICD-coded procedure during the stay) 1; urgent_or_emergent_admission 1; admissions_12mo 0-1→0, 2-5→2, >5→5; los_ge_5_days 2. Max 13. Bands 0-4 low, 5-6 intermediate, >=7 high for potentially avoidable 30-day readmission (SQLape), not all-cause. Flags and counts are caller-assigned. Not a discharge order or diagnosis.","parameters":[{"in":"query","name":"hemoglobin_lt_12","type":"boolean","description":"Last hemoglobin <12 g/dL as assigned by the caller (Donze 2013 H). true scores 1. magent does not assay hemoglobin. Do not send a hemoglobin number.","required":true,"example":"false"},{"in":"query","name":"oncology_service","type":"boolean","description":"Discharge from an oncology service as assigned by the caller (Donze 2013 O). true scores 2.","required":true,"example":"false"},{"in":"query","name":"sodium_lt_135","type":"boolean","description":"Last sodium <135 mmol/L as assigned by the caller (Donze 2013 S). true scores 1. magent does not assay sodium. Do not send a sodium number.","required":true,"example":"false"},{"in":"query","name":"procedure","type":"boolean","description":"Any ICD-coded procedure during the stay as assigned by the caller (Donze 2013 P). true scores 1. magent does not read the chart.","required":true,"example":"false"},{"in":"query","name":"urgent_or_emergent_admission","type":"boolean","description":"Index admission type urgent or emergent, not elective, as assigned by the caller (Donze 2013 I). true scores 1.","required":true,"example":"false"},{"in":"query","name":"admissions_12mo","type":"integer","description":"Hospital admissions during the previous year (integer 0-50, magent clamp). Donze 2013 A: 0-1 scores 0; 2-5 scores 2; >5 scores 5. Count 0 and 1 both score 0; 2 scores 2; 5 scores 2; 6 scores 5.","required":true,"example":"0"},{"in":"query","name":"los_ge_5_days","type":"boolean","description":"Length of stay ≥5 days as assigned by the caller (Donze 2013 L). true scores 2. magent does not compute length of stay from dates.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_admissions_12mo","message":"admissions_12mo must be an integer from 0 to 50 (Donze 2013 prior-year count; magent clamp). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/hospital","citation":{"authors":"Donze J, Aujesky D, Williams D, Schnipper JL","doi":"10.1001/jamainternmed.2013.3023","id":"donze-2013","pmid":"23529115","source":"JAMA Intern Med. 2013;173(8):632-638","title":"Potentially Avoidable 30-Day Hospital Readmissions in Medical Patients: Derivation and Validation of a Prediction Model","url":"https://doi.org/10.1001/jamainternmed.2013.3023"},"formula_expression":"HOSPITAL = hemoglobin_lt_12 (1) + oncology_service (2) + sodium_lt_135 (1) + procedure (1) + urgent_or_emergent_admission (1) + admissions_12mo (0-1: 0, 2-5: 2, >5: 5) + los_ge_5_days (2); Donze 2013 acronym table; max 13; 0-4 low, 5-6 intermediate, >=7 high","purpose":"Sum the Donze 2013 HOSPITAL integer score (acronym table, max 13) from caller-assigned flags and prior-year admissions and return the derivation-study band (low / intermediate / high).","markdown_url":"https://magentlab.com/docs/hospital.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"hospital"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"HOSPITAL points 0-13 (Donze 2013)"},{"name":"max_score","type":"integer","description":"Always 13"},{"name":"risk_band","type":"string","description":"Donze 2013 derivation band: low (0-4), intermediate (5-6), or high (>=7). A band, not a measured readmission percent for this discharge."},{"name":"admissions_12mo","type":"integer","description":"Prior-year hospital admission count used for Donze 2013 A"},{"name":"components","type":"array","description":"Per-factor HOSPITAL acronym points"},{"name":"citation","type":"object","description":"Donze et al. JAMA Intern Med 2013 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"admissions_12mo":"0","hemoglobin_lt_12":"false","los_ge_5_days":"false","oncology_service":"false","procedure":"false","sodium_lt_135":"false","urgent_or_emergent_admission":"false"},{"admissions_12mo":"0","hemoglobin_lt_12":"false","los_ge_5_days":"false","oncology_service":"false","procedure":"false","sodium_lt_135":"false","urgent_or_emergent_admission":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/hospital","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/hospital?hemoglobin_lt_12=false&oncology_service=false&sodium_lt_135=false&procedure=false&urgent_or_emergent_admission=false&admissions_12mo=0&los_ge_5_days=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/hospital","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/nedocs","description":"Weiss 2004 National ED Overcrowding Study (NEDOCS) reduced five-variable model: ED patients indexed to ED beds, boarding indexed to hospital beds, respirators, longest admitted-patient hours since registration, and last-called registration-to-bed hours. Returns the linear score (1 decimal) and the published ≥100 overcrowding cutoff. Caller supplies counts and hours; magent does not count beds or wait times. Not a medical device and not a diversion or ambulance-bypass order.","parameters":[{"in":"query","name":"ed_patients","type":"integer","description":"Total patients in the ED (integer 0-200). Weiss 2004 patindex numerator (full rooms + hallways + doubled-up). magent does not count patients.","required":true,"example":"0"},{"in":"query","name":"ed_beds","type":"integer","description":"Number of ED beds (integer 1-300). Weiss 2004 patindex denominator. The paper's average academic ED was 50 ED beds. magent does not count beds.","required":true,"example":"50"},{"in":"query","name":"boarding_patients","type":"integer","description":"Patients in the ED awaiting inpatient beds (integer 0-200). Weiss 2004 admit-index numerator. magent does not count boarding patients.","required":true,"example":"0"},{"in":"query","name":"hospital_beds","type":"integer","description":"Number of hospital beds (integer 1-3000). Weiss 2004 admit-index denominator. The paper's average academic hospital was 500 beds. magent does not count beds.","required":true,"example":"500"},{"in":"query","name":"respirators","type":"integer","description":"Patients on respirators in the ED (integer 0-20). Weiss 2004 reduced-model respirators term. magent does not count ventilators.","required":true,"example":"0"},{"in":"query","name":"admit_time_hours","type":"number","description":"Hours the longest-waiting admitted patient has been in the ED since registration (0-120). Weiss 2004 reduced-model admit time. Not time since the admission order (that bed-time variable was omitted). magent does not measure wait times.","required":true,"example":"0"},{"in":"query","name":"reg_time_hours","type":"number","description":"Hours from registration until the last patient called from the waiting room was called to a bed (0-48). Weiss 2004 reduced-model reg time. magent does not measure wait times.","required":true,"example":"0"}],"errors":[{"code":"invalid_nedocs","message":"NEDOCS inputs must match Weiss 2004 census, bed, wait, boarding, and critical-care terms from that paper. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/nedocs","citation":{"authors":"Weiss SJ, Derlet R, Arndahl J, Ernst AA, Richards J, Fernandez-Frankelton M, Schwab R, Stair TO, Vicellio P, Levy D, Brautigan M, Johnson A, Nick TG","doi":"10.1197/j.aem.2003.07.017","id":"weiss-2004","pmid":"14709427","source":"Acad Emerg Med. 2004;11(1):38-50","title":"Estimating the degree of emergency department overcrowding in academic medical centers: results of the National ED Overcrowding Study (NEDOCS)","url":"https://doi.org/10.1197/j.aem.2003.07.017"},"formula_expression":"nedocs_score = -20 + 85.8 * (ed_patients / ed_beds) + 600 * (boarding_patients / hospital_beds) + 13.4 * respirators + 0.93 * admit_time_hours + 5.64 * reg_time_hours","purpose":"Compute the Weiss 2004 NEDOCS reduced five-variable score from caller-supplied ED patients, ED beds, boarding patients, hospital beds, respirators, longest admitted-patient hours, and last-called registration-to-bed hours, and return the published ≥100 overcrowding cutoff.","markdown_url":"https://magentlab.com/docs/nedocs.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"nedocs"},{"name":"formula_expression","type":"string","description":"Weiss 2004 reduced five-variable linear expression"},{"name":"ed_patients","type":"integer","description":"Caller-supplied total ED patients used as the patindex numerator"},{"name":"ed_beds","type":"integer","description":"Caller-supplied ED beds used as the patindex denominator"},{"name":"boarding_patients","type":"integer","description":"Caller-supplied patients awaiting inpatient beds"},{"name":"hospital_beds","type":"integer","description":"Caller-supplied hospital beds used as the admit-index denominator"},{"name":"respirators","type":"integer","description":"Caller-supplied ED respirator count"},{"name":"admit_time_hours","type":"number","description":"Caller-supplied longest admitted-patient hours since registration"},{"name":"reg_time_hours","type":"number","description":"Caller-supplied last-called registration-to-bed hours"},{"name":"patindex","type":"number","description":"ed_patients / ed_beds, 4 decimals (Weiss 2004 patindex)"},{"name":"admit_index","type":"number","description":"boarding_patients / hospital_beds, 4 decimals (Weiss 2004 admit index)"},{"name":"nedocs_score","type":"number","description":"Weiss 2004 reduced-model score, 1 decimal. The paper's interpretation scale is 0-200; the linear combination is not clamped."},{"name":"overcrowded","type":"boolean","description":"true iff nedocs_score >= 100. Weiss 2004: 100 is the overcrowding cutoff (over 100 represents overcrowding). Not a diversion order."},{"name":"citation","type":"object","description":"Weiss 2004 Acad Emerg Med citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"admit_time_hours":"0","boarding_patients":"0","ed_beds":"50","ed_patients":"0","hospital_beds":"500","reg_time_hours":"0","respirators":"0"},{"admit_time_hours":"0","boarding_patients":"0","ed_beds":"50","ed_patients":"0","hospital_beds":"500","reg_time_hours":"0","respirators":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/nedocs","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/nedocs?ed_patients=0&ed_beds=50&boarding_patients=0&hospital_beds=500&respirators=0&admit_time_hours=0&reg_time_hours=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/nedocs","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/cedocs","description":"Weiss 2014 Community ED Overcrowding Scale (CEDOCS) reduced model: critical-care patients, longest admitted-patient hours since admission, waiting-room count, ED patients indexed to ED beds, and annual ED visits with a restricted cubic spline. Returns the 1-decimal score on the paper's 0-100 scale without clamping or named class bands. Caller supplies counts and hours; magent does not count patients or wait times. Not a medical device and not a diversion or ambulance-bypass order.","parameters":[{"in":"query","name":"critical_care_patients","type":"integer","description":"Critical-care patients in the ED (integer 0-20). Weiss 2014 reduced-model A. magent does not count patients.","required":true,"example":"0"},{"in":"query","name":"admit_time_hours","type":"number","description":"Hours the longest-waiting admitted patient has been in the ED since admission (0-120). Weiss 2014 reduced-model B. Not time since registration. magent does not measure wait times.","required":true,"example":"0"},{"in":"query","name":"waiting_room_patients","type":"integer","description":"Patients in the waiting room (integer 0-200). Weiss 2014 reduced-model C. magent does not count waiting-room patients.","required":true,"example":"0"},{"in":"query","name":"ed_patients","type":"integer","description":"Total patients in the ED (integer 0-200). Weiss 2014 occupancy numerator (beds plus doubled-up or hallway). magent does not count patients.","required":true,"example":"0"},{"in":"query","name":"ed_beds","type":"integer","description":"Number of ED beds (integer 1-300). Weiss 2014 occupancy denominator. magent does not count beds.","required":true,"example":"20"},{"in":"query","name":"ed_visits_per_year","type":"integer","description":"ED visits per year (integer 1000-200000). Weiss 2014 reduced-model E with restricted cubic spline knots at 18811, 43012, 49466, and 67273. The paper's spline worked example uses 46000. magent does not count visits.","required":true,"example":"46000"}],"errors":[{"code":"invalid_cedocs","message":"CEDOCS needs Weiss 2014 community ED occupancy, wait, and annual-visit inputs in published ranges. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/cedocs","citation":{"authors":"Weiss SJ, Rogers DB, Maas F, Ernst AA, Nick TG","doi":"10.1016/j.ajem.2014.08.035","id":"weiss-2014","pmid":"25234796","source":"Am J Emerg Med. 2014;32(11):1357-1363","title":"Evaluating community ED crowding: the Community ED Overcrowding Scale study","url":"https://doi.org/10.1016/j.ajem.2014.08.035"},"formula_expression":"cedocs_score = -30.39 + 3.00 * critical_care_patients + 0.53 * admit_time_hours + 1.16 * waiting_room_patients + 20.66 * (ed_patients / ed_beds) + 0.00126 * ed_visits_per_year - 1.11e-12 * pmax(ed_visits_per_year - 18811, 0)^3 + 8.23e-12 * pmax(ed_visits_per_year - 43012, 0)^3 - 8.20e-12 * pmax(ed_visits_per_year - 49466, 0)^3 + 1.08e-12 * pmax(ed_visits_per_year - 67273, 0)^3","purpose":"Compute the Weiss 2014 CEDOCS reduced-model score from caller-supplied critical-care patients, longest admitted-patient hours since admission, waiting-room count, ED patients, ED beds, and annual ED visits.","markdown_url":"https://magentlab.com/docs/cedocs.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"cedocs"},{"name":"formula_expression","type":"string","description":"Weiss 2014 reduced-model expression with annual-visit cubic spline"},{"name":"critical_care_patients","type":"integer","description":"Caller-supplied critical-care patients in the ED (A)"},{"name":"admit_time_hours","type":"number","description":"Caller-supplied longest admitted-patient hours since admission (B)"},{"name":"waiting_room_patients","type":"integer","description":"Caller-supplied waiting-room count (C)"},{"name":"ed_patients","type":"integer","description":"Caller-supplied total ED patients used as the occupancy numerator"},{"name":"ed_beds","type":"integer","description":"Caller-supplied ED beds used as the occupancy denominator"},{"name":"ed_visits_per_year","type":"integer","description":"Caller-supplied annual ED visits (E)"},{"name":"occupancy","type":"number","description":"ed_patients / ed_beds, 4 decimals (Weiss 2014 D)"},{"name":"cedocs_score","type":"number","description":"Weiss 2014 reduced-model score, 1 decimal. The paper's outcome scale is 0-100; the linear combination is not clamped."},{"name":"citation","type":"object","description":"Weiss 2014 Am J Emerg Med citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"admit_time_hours":"0","critical_care_patients":"0","ed_beds":"20","ed_patients":"0","ed_visits_per_year":"46000","waiting_room_patients":"0"},{"admit_time_hours":"0","critical_care_patients":"0","ed_beds":"20","ed_patients":"0","ed_visits_per_year":"46000","waiting_room_patients":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/cedocs","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/cedocs?critical_care_patients=0&admit_time_hours=0&waiting_room_patients=0&ed_patients=0&ed_beds=20&ed_visits_per_year=46000","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/cedocs","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/pedocs","description":"Weiss 2007 Pediatric Emergency Department Overcrowding Scale (PEDOCS) two-variable model: waiting-room patients and total registered patients. Returns the 1-decimal score on the paper's 0-200 scale without clamping or 20/60/100 named class bands. Caller supplies counts; magent does not count patients. Not a medical device and not a diversion or ambulance-bypass order.","parameters":[{"in":"query","name":"waiting_room_patients","type":"integer","description":"Patients in the waiting room (integer 0-200). Cannot exceed total_registered_patients. Weiss 2007 two-variable model. magent does not count waiting-room patients.","required":true,"example":"0"},{"in":"query","name":"total_registered_patients","type":"integer","description":"Total patients currently registered in the pediatric ED, including those in the waiting room (integer 0-400). Must be at least waiting_room_patients. Weiss 2007 two-variable model. magent does not count patients.","required":true,"example":"0"}],"errors":[{"code":"invalid_pedocs","message":"PEDOCS needs Weiss 2007 pediatric waiting-room and registered-patient counts in published ranges. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/pedocs","citation":{"authors":"Weiss SJ, Ernst AA, Sills MR, Quinn BJ, Johnson A, Nick TG","doi":"10.1097/PEC.0b013e31814a69e2","id":"weiss-2007","pmid":"17876254","source":"Pediatr Emerg Care. 2007;23(9):641-645","title":"Development of a novel measure of overcrowding in a pediatric emergency department","url":"https://doi.org/10.1097/PEC.0b013e31814a69e2"},"formula_expression":"pedocs_score = 33.3 * (0.11 + 0.07 * waiting_room_patients + 0.04 * total_registered_patients)","purpose":"Compute the Weiss 2007 PEDOCS two-variable score from caller-supplied waiting-room patients and total registered patients.","markdown_url":"https://magentlab.com/docs/pedocs.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"pedocs"},{"name":"formula_expression","type":"string","description":"Weiss 2007 reduced two-variable linear expression"},{"name":"waiting_room_patients","type":"integer","description":"Caller-supplied waiting-room count"},{"name":"total_registered_patients","type":"integer","description":"Caller-supplied total registered patients, including the waiting room"},{"name":"pedocs_score","type":"number","description":"Weiss 2007 two-variable score, 1 decimal. The paper's expert-consensus outcome scale is 0-200 with Likert anchors at 0/40/80/120/160/200; the linear combination is not clamped."},{"name":"citation","type":"object","description":"Weiss 2007 Pediatr Emerg Care citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"total_registered_patients":"0","waiting_room_patients":"0"},{"total_registered_patients":"0","waiting_room_patients":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/pedocs","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/pedocs?waiting_room_patients=0&total_registered_patients=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/pedocs","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/charlson","description":"Charlson 1987 original weighted comorbidity index. Nineteen caller-assigned flags with published weights 1, 2, 3, or 6 (max 37). 1-year mortality groups: 0, 1–2, 3–4, ≥5. Flags are independent (overlapping pairs are not dropped). Not a diagnosis, not Deyo or Quan ICD mapping, not age-adjusted Charlson. LACE takes the integer this tool returns. magent does not diagnose.","parameters":[{"in":"query","name":"myocardial_infarction","type":"boolean","description":"Myocardial infarction as assigned by the caller (Charlson 1987). true scores 1. magent does not diagnose infarction.","required":true,"example":"false"},{"in":"query","name":"congestive_heart_failure","type":"boolean","description":"Congestive heart failure as assigned by the caller (Charlson 1987). true scores 1. magent does not diagnose heart failure.","required":true,"example":"false"},{"in":"query","name":"peripheral_vascular_disease","type":"boolean","description":"Peripheral vascular disease as assigned by the caller (Charlson 1987). true scores 1. magent does not diagnose vascular disease.","required":true,"example":"false"},{"in":"query","name":"cerebrovascular_disease","type":"boolean","description":"Cerebrovascular disease as assigned by the caller (Charlson 1987). true scores 1. magent does not diagnose stroke or TIA.","required":true,"example":"false"},{"in":"query","name":"dementia","type":"boolean","description":"Dementia as assigned by the caller (Charlson 1987). true scores 1. magent does not diagnose dementia.","required":true,"example":"false"},{"in":"query","name":"chronic_pulmonary_disease","type":"boolean","description":"Chronic pulmonary disease as assigned by the caller (Charlson 1987). true scores 1. magent does not diagnose lung disease.","required":true,"example":"false"},{"in":"query","name":"connective_tissue_disease","type":"boolean","description":"Connective tissue disease as assigned by the caller (Charlson 1987). true scores 1. magent does not diagnose connective-tissue disease.","required":true,"example":"false"},{"in":"query","name":"peptic_ulcer_disease","type":"boolean","description":"Peptic ulcer disease as assigned by the caller (Charlson 1987). true scores 1. magent does not diagnose ulcer disease.","required":true,"example":"false"},{"in":"query","name":"mild_liver_disease","type":"boolean","description":"Mild liver disease as assigned by the caller (Charlson 1987). true scores 1. magent does not grade liver disease.","required":true,"example":"false"},{"in":"query","name":"diabetes","type":"boolean","description":"Diabetes without end-organ damage as assigned by the caller (Charlson 1987). true scores 1. Independent of diabetes_end_organ. magent does not diagnose diabetes.","required":true,"example":"false"},{"in":"query","name":"hemiplegia","type":"boolean","description":"Hemiplegia as assigned by the caller (Charlson 1987). true scores 2. magent does not diagnose hemiplegia.","required":true,"example":"false"},{"in":"query","name":"moderate_severe_renal_disease","type":"boolean","description":"Moderate or severe renal disease as assigned by the caller (Charlson 1987). true scores 2. magent does not grade kidney disease.","required":true,"example":"false"},{"in":"query","name":"diabetes_end_organ","type":"boolean","description":"Diabetes with end-organ damage as assigned by the caller (Charlson 1987). true scores 2. Independent of diabetes. magent does not diagnose diabetes.","required":true,"example":"false"},{"in":"query","name":"any_tumor","type":"boolean","description":"Any tumor (solid tumor without metastasis) as assigned by the caller (Charlson 1987). true scores 2. Independent of metastatic_solid_tumor. magent does not diagnose cancer.","required":true,"example":"false"},{"in":"query","name":"leukemia","type":"boolean","description":"Leukemia as assigned by the caller (Charlson 1987). true scores 2. magent does not diagnose leukemia.","required":true,"example":"false"},{"in":"query","name":"lymphoma","type":"boolean","description":"Lymphoma as assigned by the caller (Charlson 1987). true scores 2. magent does not diagnose lymphoma.","required":true,"example":"false"},{"in":"query","name":"moderate_severe_liver_disease","type":"boolean","description":"Moderate or severe liver disease as assigned by the caller (Charlson 1987). true scores 3. Independent of mild_liver_disease. magent does not grade liver disease.","required":true,"example":"false"},{"in":"query","name":"metastatic_solid_tumor","type":"boolean","description":"Metastatic solid tumor as assigned by the caller (Charlson 1987). true scores 6. Independent of any_tumor. magent does not diagnose cancer.","required":true,"example":"false"},{"in":"query","name":"aids","type":"boolean","description":"AIDS as assigned by the caller (Charlson 1987). true scores 6. magent does not diagnose AIDS.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/charlson","citation":{"authors":"Charlson ME, Pompei P, Ales KL, MacKenzie CR","doi":"10.1016/0021-9681(87)90171-8","id":"charlson-1987","pmid":"3558716","source":"J Chronic Dis. 1987;40(5):373-383","title":"A new method of classifying prognostic comorbidity in longitudinal studies: development and validation","url":"https://doi.org/10.1016/0021-9681(87)90171-8"},"formula_expression":"CCI = myocardial_infarction 1 + congestive_heart_failure 1 + peripheral_vascular_disease 1 + cerebrovascular_disease 1 + dementia 1 + chronic_pulmonary_disease 1 + connective_tissue_disease 1 + peptic_ulcer_disease 1 + mild_liver_disease 1 + diabetes 1 + hemiplegia 2 + moderate_severe_renal_disease 2 + diabetes_end_organ 2 + any_tumor 2 + leukemia 2 + lymphoma 2 + moderate_severe_liver_disease 3 + metastatic_solid_tumor 6 + aids 6; Charlson 1987 original weighted index; max 37; 1-year mortality groups 0 / 1-2 / 3-4 / >=5; flags independent","purpose":"Sum the nineteen Charlson 1987 original comorbidity weights and return the published 1-year mortality group.","markdown_url":"https://magentlab.com/docs/charlson.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"charlson"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Charlson 1987 points 0-37"},{"name":"max_score","type":"integer","description":"37"},{"name":"charlson_band","type":"string","description":"Charlson 1987 1-year mortality group: score_0 (0), score_1_2 (1-2), score_3_4 (3-4), or score_ge_5 (≥5). A group, not a diagnosis."},{"name":"components","type":"array","description":"Per-flag points"},{"name":"citation","type":"object","description":"Charlson et al. J Chronic Dis 1987 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"aids":"false","any_tumor":"false","cerebrovascular_disease":"false","chronic_pulmonary_disease":"false","congestive_heart_failure":"false","connective_tissue_disease":"false","dementia":"false","diabetes":"false","diabetes_end_organ":"false","hemiplegia":"false","leukemia":"false","lymphoma":"false","metastatic_solid_tumor":"false","mild_liver_disease":"false","moderate_severe_liver_disease":"false","moderate_severe_renal_disease":"false","myocardial_infarction":"false","peptic_ulcer_disease":"false","peripheral_vascular_disease":"false"},{"aids":"false","any_tumor":"false","cerebrovascular_disease":"false","chronic_pulmonary_disease":"false","congestive_heart_failure":"false","connective_tissue_disease":"false","dementia":"false","diabetes":"false","diabetes_end_organ":"false","hemiplegia":"false","leukemia":"false","lymphoma":"false","metastatic_solid_tumor":"false","mild_liver_disease":"false","moderate_severe_liver_disease":"false","moderate_severe_renal_disease":"false","myocardial_infarction":"false","peptic_ulcer_disease":"false","peripheral_vascular_disease":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/charlson","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/charlson?myocardial_infarction=false&congestive_heart_failure=false&peripheral_vascular_disease=false&cerebrovascular_disease=false&dementia=false&chronic_pulmonary_disease=false&connective_tissue_disease=false&peptic_ulcer_disease=false&mild_liver_disease=false&diabetes=false&hemiplegia=false&moderate_severe_renal_disease=false&diabetes_end_organ=false&any_tumor=false&leukemia=false&lymphoma=false&moderate_severe_liver_disease=false&metastatic_solid_tumor=false&aids=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/charlson","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/cirs-g","description":"Miller 1992 CIRS-G from 14 caller-assigned organ-system integers 0-4 (heart, vascular, hematopoietic, respiratory, EENT, upper GI, lower GI, liver, renal, genitourinary, musculoskeletal, neurologic, endocrine-metabolic, psychiatric). magent does not examine the patient. Total 0-56 plus count of categories rated ≥3. No total-score class. Not Charlson. Not a diagnosis.","parameters":[{"in":"query","name":"heart","type":"integer","description":"Caller-assigned Miller 1992 CIRS-G heart (integer 0-4: 0 no problem, 1 current mild or past significant, 2 moderate disability or first-line therapy, 3 severe or uncontrollable chronic, 4 extremely severe, immediate treatment, or end-organ failure). magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"vascular","type":"integer","description":"Caller-assigned Miller 1992 CIRS-G vascular (integer 0-4: 0 no problem through 4 extremely severe). magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"hematopoietic","type":"integer","description":"Caller-assigned Miller 1992 CIRS-G hematopoietic — blood, marrow, spleen, lymphatics (integer 0-4: 0 no problem through 4 extremely severe). magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"respiratory","type":"integer","description":"Caller-assigned Miller 1992 CIRS-G respiratory — lungs, bronchi, trachea below the larynx (integer 0-4: 0 no problem through 4 extremely severe). magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"eent","type":"integer","description":"Caller-assigned Miller 1992 CIRS-G EENT — eyes, ears, nose, throat, and larynx (integer 0-4: 0 no problem through 4 extremely severe). magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"upper_gi","type":"integer","description":"Caller-assigned Miller 1992 CIRS-G upper GI — esophagus, stomach, duodenum (integer 0-4: 0 no problem through 4 extremely severe). magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"lower_gi","type":"integer","description":"Caller-assigned Miller 1992 CIRS-G lower GI — intestines, hernias (integer 0-4: 0 no problem through 4 extremely severe). magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"liver","type":"integer","description":"Caller-assigned Miller 1992 CIRS-G liver — including biliary and pancreatic trees (integer 0-4: 0 no problem through 4 extremely severe). magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"renal","type":"integer","description":"Caller-assigned Miller 1992 CIRS-G renal — kidneys only (integer 0-4: 0 no problem through 4 extremely severe). magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"genitourinary","type":"integer","description":"Caller-assigned Miller 1992 CIRS-G genitourinary — ureters, bladder, urethra, prostate, genitals, uterus, ovaries (integer 0-4: 0 no problem through 4 extremely severe). magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"musculoskeletal","type":"integer","description":"Caller-assigned Miller 1992 CIRS-G musculoskeletal/integument — muscles, bone, and skin (integer 0-4: 0 no problem through 4 extremely severe). magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"neurologic","type":"integer","description":"Caller-assigned Miller 1992 CIRS-G neurologic — brain, spinal cord, and nerves (integer 0-4: 0 no problem through 4 extremely severe). magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"endocrine_metabolic","type":"integer","description":"Caller-assigned Miller 1992 CIRS-G endocrine/metabolic and breast (integer 0-4: 0 no problem through 4 extremely severe). magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"psychiatric","type":"integer","description":"Caller-assigned Miller 1992 CIRS-G psychiatric illness (integer 0-4: 0 no problem through 4 extremely severe). magent does not examine the patient.","required":true,"example":"0"}],"errors":[{"code":"invalid_cirs_g_item","message":"each CIRS-G organ-system rating must be an integer from 0 to 4 (Miller 1992). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/cirs-g","citation":{"authors":"Miller MD, Paradis CF, Houck PR, et al.","doi":"10.1016/0165-1781(92)90005-N","id":"miller-1992","pmid":"1594710","source":"Psychiatry Res. 1992;41(3):237-248","title":"Rating chronic medical illness burden in geropsychiatric practice and research: application of the Cumulative Illness Rating Scale","url":"https://doi.org/10.1016/0165-1781(92)90005-N"},"formula_expression":"CIRS-G = heart + vascular + hematopoietic + respiratory + eent + upper_gi + lower_gi + liver + renal + genitourinary + musculoskeletal + neurologic + endocrine_metabolic + psychiatric; each caller-assigned 0-4; max 56; Miller 1992; categories_endorsed is count of ratings ≥1; categories_ge_3 is count of ratings ≥3; no total-score class","purpose":"Sum fourteen caller-assigned Miller 1992 CIRS-G organ-system integers (each 0-4) and return the published total (max 56), the count of categories endorsed (rating ≥1), and the count of categories rated ≥3.","markdown_url":"https://magentlab.com/docs/cirs-g.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"cirs_g"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Miller 1992 CIRS-G total: sum of fourteen caller-assigned 0-4 organ-system ratings (0-56)"},{"name":"max_score","type":"integer","description":"Always 56"},{"name":"categories_endorsed","type":"integer","description":"Count of the fourteen organ systems with caller-assigned rating ≥1 (Miller 1992 / CIRS-G scoring sheet: total number of categories endorsed). 0-14."},{"name":"categories_ge_3","type":"integer","description":"Count of organ systems with caller-assigned rating ≥3 (Miller 1992 / CIRS-G scoring sheet counts at severity 3 and at severity 4; this field is those counts combined). 0-14. Not a class."},{"name":"components","type":"array","description":"Per-system caller-assigned points"},{"name":"citation","type":"object","description":"Miller et al. Psychiatry Res 1992 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"eent":"0","endocrine_metabolic":"0","genitourinary":"0","heart":"0","hematopoietic":"0","liver":"0","lower_gi":"0","musculoskeletal":"0","neurologic":"0","psychiatric":"0","renal":"0","respiratory":"0","upper_gi":"0","vascular":"0"},{"eent":"0","endocrine_metabolic":"0","genitourinary":"0","heart":"0","hematopoietic":"0","liver":"0","lower_gi":"0","musculoskeletal":"0","neurologic":"0","psychiatric":"0","renal":"0","respiratory":"0","upper_gi":"0","vascular":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/cirs-g","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/cirs-g?heart=0&vascular=0&hematopoietic=0&respiratory=0&eent=0&upper_gi=0&lower_gi=0&liver=0&renal=0&genitourinary=0&musculoskeletal=0&neurologic=0&endocrine_metabolic=0&psychiatric=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/cirs-g","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/g8","description":"Bellera 2012 G8 geriatric screening tool: seven MNA items (A, B, C, E, F, H, P) plus age. Food intake 0–2, weight loss 0–3, mobility 0–2, neuropsychological 0–2, BMI 0–3, more than 3 medications 0 if true else 1, health vs peers 0/0.5/1/2, age 0–2. Total 0–17, higher is better. Score ≤14 is an impaired screen. Not a CGA, chemotherapy order, Soubeyran 2014 ONCODAGE, or VES-13. magent does not interview or weigh the patient.","parameters":[{"in":"query","name":"food_intake","type":"string","description":"Bellera 2012 G8 food-intake decline over 3 months (MNA item A) as assigned by the caller. severe_decrease 0, moderate_decrease 1, no_decrease 2. magent does not interview the patient.","required":true,"example":"no_decrease"},{"in":"query","name":"weight_loss","type":"string","description":"Bellera 2012 G8 weight loss during the last 3 months (MNA item B) as assigned by the caller. gt_3kg 0, unknown 1, 1_to_3kg 2, none 3. magent does not weigh the patient.","required":true,"example":"none"},{"in":"query","name":"mobility","type":"string","description":"Bellera 2012 G8 mobility (MNA item C) as assigned by the caller. bed_or_chair 0, bed_chair_no_out 1, goes_out 2. magent does not examine the patient.","required":true,"example":"goes_out"},{"in":"query","name":"neuropsychological","type":"string","description":"Bellera 2012 G8 neuropsychological problems (MNA item E) as assigned by the caller. severe 0, mild 1, none 2. magent does not interview the patient.","required":true,"example":"none"},{"in":"query","name":"bmi","type":"string","description":"Bellera 2012 G8 BMI band (MNA item F) as assigned by the caller. lt_19 0, 19_to_lt_21 1, 21_to_lt_23 2, ge_23 3. magent does not weigh the patient or compute BMI.","required":true,"example":"ge_23"},{"in":"query","name":"more_than_3_medications","type":"boolean","description":"Bellera 2012 G8 takes more than 3 medications per day (MNA item H) as assigned by the caller. true scores 0; false scores 1. magent does not review the medication list.","required":true,"example":"false"},{"in":"query","name":"health_vs_peers","type":"string","description":"Bellera 2012 G8 self-rated health versus people of the same age (MNA item P) as assigned by the caller. not_as_good 0, unknown 0.5, as_good 1, better 2. Half-point on unknown is not integer-rounded. magent does not interview the patient.","required":true,"example":"better"},{"in":"query","name":"age_band","type":"string","description":"Bellera 2012 G8 age band as assigned by the caller. gt_85 0, 80_to_85 1, lt_80 2. magent does not assign the age band from a numeric age.","required":true,"example":"lt_80"}],"errors":[{"code":"invalid_g8","message":"G8 geriatric screening inputs must match Bellera 2012 food intake, weight loss, mobility, neuropsychological, BMI, medications, health, and age bands from that paper. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/g8","citation":{"authors":"Bellera CA, Rainfray M, Mathoulin-Pélissier S, et al.","doi":"10.1093/annonc/mdr587","id":"bellera-2012","pmid":"22250183","source":"Ann Oncol. 2012;23(8):2166-2172","title":"Screening older cancer patients: first evaluation of the G-8 geriatric screening tool","url":"https://doi.org/10.1093/annonc/mdr587"},"formula_expression":"G8 (Bellera 2012) = food_intake (severe_decrease 0, moderate_decrease 1, no_decrease 2) + weight_loss (gt_3kg 0, unknown 1, 1_to_3kg 2, none 3) + mobility (bed_or_chair 0, bed_chair_no_out 1, goes_out 2) + neuropsychological (severe 0, mild 1, none 2) + bmi (lt_19 0, 19_to_lt_21 1, 21_to_lt_23 2, ge_23 3) + more_than_3_medications (true 0, false 1) + health_vs_peers (not_as_good 0, unknown 0.5, as_good 1, better 2) + age_band (gt_85 0, 80_to_85 1, lt_80 2); seven MNA items A,B,C,E,F,H,P plus age; max 17; higher is better; <=14 impaired screen; half-point on health unknown; not Soubeyran 2014 ONCODAGE; not VES-13","purpose":"Sum the eight Bellera 2012 G8 items (seven MNA items A, B, C, E, F, H, P plus age) and return whether the published ≤14 impaired-screen cutoff is met.","markdown_url":"https://magentlab.com/docs/g8.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"g8"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"number","description":"Bellera 2012 G8 points 0-17 (higher is better; half-points allowed on health unknown)"},{"name":"max_score","type":"integer","description":"Always 17"},{"name":"at_or_below_cutoff","type":"boolean","description":"true when score is <=14 (Bellera 2012 impaired screen that maximized AUC). Not a CGA and not a chemotherapy order."},{"name":"food_intake","type":"string","description":"severe_decrease, moderate_decrease, or no_decrease"},{"name":"weight_loss","type":"string","description":"gt_3kg, unknown, 1_to_3kg, or none"},{"name":"mobility","type":"string","description":"bed_or_chair, bed_chair_no_out, or goes_out"},{"name":"neuropsychological","type":"string","description":"severe, mild, or none"},{"name":"bmi","type":"string","description":"lt_19, 19_to_lt_21, 21_to_lt_23, or ge_23"},{"name":"more_than_3_medications","type":"boolean","description":"true if more than 3 medications per day"},{"name":"health_vs_peers","type":"string","description":"not_as_good, unknown, as_good, or better"},{"name":"age_band","type":"string","description":"gt_85, 80_to_85, or lt_80"},{"name":"components","type":"array","description":"Per-item points"},{"name":"citation","type":"object","description":"Bellera 2012 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age_band":"lt_80","bmi":"ge_23","food_intake":"no_decrease","health_vs_peers":"better","mobility":"goes_out","more_than_3_medications":"false","neuropsychological":"none","weight_loss":"none"},{"age_band":"lt_80","bmi":"ge_23","food_intake":"no_decrease","health_vs_peers":"better","mobility":"goes_out","more_than_3_medications":"false","neuropsychological":"none","weight_loss":"none"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/g8","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/g8?food_intake=no_decrease&weight_loss=none&mobility=goes_out&neuropsychological=none&bmi=ge_23&more_than_3_medications=false&health_vs_peers=better&age_band=lt_80","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/g8","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/carg-tt","description":"Hurria 2011 Table 5 CARG toxicity: age ≥72 (+2), GI/GU (+2, not inverted), standard dose (+2), polychemotherapy (+2), Hb male <11 or female <10 g/dL (+3), caller-assigned Jelliffe CrCl <34 (+3; magent does not compute Jelliffe), hearing fair/worse (+2), ≥1 fall in 6 months (+3), limited walking 1 block (+2), help with meds (+1), decreased social activity (+1). Max 19. 0-5 low 30%, 6-9 intermediate 52%, 10-19 high 83%. Not the 2016 revision, not CRASH, not a chemo order.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Hurria 2011 Table 5: ≥72 scores 2. Derived in patients ≥65; magent still applies the ≥72 rule at any accepted age.","required":true,"example":"75"},{"in":"query","name":"gi_or_gu","type":"boolean","description":"GI or GU cancer as assigned by the caller (Hurria 2011 Table 5). true scores 2. Lung, breast, GYN, and other cancers are 0. This is a risk factor present (+2), not inverted. magent does not assign cancer type from histology text.","required":true,"example":"true"},{"in":"query","name":"standard_dose","type":"boolean","description":"Standard chemotherapy dose as assigned by the caller (Hurria 2011 Table 5). true scores 2. Dose-reduced is 0. magent does not read a chemo order.","required":true,"example":"true"},{"in":"query","name":"polychemotherapy","type":"boolean","description":"Polychemotherapy as assigned by the caller (Hurria 2011 Table 5). true scores 2.","required":true,"example":"true"},{"in":"query","name":"hemoglobin_g_dl","type":"number","description":"Hemoglobin in g/dL (3-22). Male <11 or female <10 scores 3 (Hurria 2011 Table 5). 11.0 male and 10.0 female do not score.","required":true,"example":"12"},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"Sex used for the hemoglobin cutoff (female or male). Male <11 g/dL or female <10 g/dL scores 3.","required":true,"example":"male"},{"in":"query","name":"jelliffe_crcl_ml_min","type":"number","description":"Jelliffe ideal-weight creatinine clearance in mL/min as assigned by the caller (1-300). <34 scores 3 (Hurria 2011 Table 5). 34 does not score. magent does not compute Jelliffe.","required":true,"example":"50"},{"in":"query","name":"hearing_fair_or_worse","type":"boolean","description":"Hearing fair or worse as assigned by the caller (Hurria 2011 Table 5). true scores 2. magent does not examine hearing.","required":true,"example":"false"},{"in":"query","name":"falls_last_6_months","type":"boolean","description":"≥1 fall in the last 6 months as assigned by the caller (Hurria 2011 Table 5). true scores 3. magent does not take a fall history.","required":true,"example":"false"},{"in":"query","name":"limited_walking_one_block","type":"boolean","description":"MOS walking 1 block somewhat limited or limited a lot as assigned by the caller (Hurria 2011 Table 5). true scores 2. magent does not administer MOS.","required":true,"example":"false"},{"in":"query","name":"needs_help_with_medications","type":"boolean","description":"IADL taking medications some help or unable as assigned by the caller (Hurria 2011 Table 5). true scores 1. magent does not administer IADL.","required":true,"example":"false"},{"in":"query","name":"decreased_social_activity","type":"boolean","description":"MOS decreased social activity limited at least sometimes as assigned by the caller (Hurria 2011 Table 5). true scores 1. magent does not administer MOS.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_hemoglobin","message":"hemoglobin_g_l (30-220) or hemoglobin_g_dl (3-22) is required, not both. Returned before settlement; you are not charged.","status":400},{"code":"invalid_jelliffe_crcl","message":"jelliffe_crcl_ml_min must be a number from 1 to 300 (Hurria 2011 Jelliffe ideal-weight creatinine clearance as assigned by the caller; magent does not compute Jelliffe). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/carg-tt","citation":{"authors":"Hurria A, Togawa K, Mohile SG, et al.","doi":"10.1200/JCO.2011.34.7625","id":"hurria-2011","pmid":"21810685","source":"J Clin Oncol. 2011;29(25):3457-3465","title":"Predicting chemotherapy toxicity in older adults with cancer: a prospective multicenter study","url":"https://doi.org/10.1200/JCO.2011.34.7625"},"formula_expression":"CARG-TT = age_ge_72 (2) + gi_or_gu (2) + standard_dose (2) + polychemotherapy (2) + hemoglobin_low (3; male <11 g/dL or female <10 g/dL) + jelliffe_crcl_lt_34 (3) + hearing_fair_or_worse (2) + falls_last_6_months (3) + limited_walking_one_block (2) + needs_help_with_medications (1) + decreased_social_activity (1); Hurria 2011 Table 5; max 19; 0-5 low 30%, 6-9 intermediate 52%, 10-19 high 83%; GI/GU is +2 when present (not inverted); not CARG-TT 2016; not CRASH","purpose":"Sum Hurria 2011 Table 5 CARG chemotherapy-toxicity weights and return low (0-5, 30%), intermediate (6-9, 52%), or high (10-19, 83%) grade 3-5 toxicity risk.","markdown_url":"https://magentlab.com/docs/carg-tt.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"carg_tt"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Hurria 2011 Table 5 points (published max 19)"},{"name":"max_score","type":"integer","description":"19"},{"name":"risk_group","type":"string","description":"low (0-5), intermediate (6-9), or high (10-19) from the Hurria 2011 derivation. Not 10-23. Not a chemotherapy order."},{"name":"grade_3_to_5_toxicity_percent","type":"integer","description":"Derivation grade 3-5 toxicity percent: 30 (low), 52 (intermediate), or 83 (high)."},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Hurria 2011 J Clin Oncol citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"75","decreased_social_activity":"false","falls_last_6_months":"false","gi_or_gu":"true","hearing_fair_or_worse":"false","hemoglobin_g_dl":"12","jelliffe_crcl_ml_min":"50","limited_walking_one_block":"false","needs_help_with_medications":"false","polychemotherapy":"true","sex":"male","standard_dose":"true"},{"age":"75","decreased_social_activity":"false","falls_last_6_months":"false","gi_or_gu":"true","hearing_fair_or_worse":"false","hemoglobin_g_dl":"12","jelliffe_crcl_ml_min":"50","limited_walking_one_block":"false","needs_help_with_medications":"false","polychemotherapy":"true","sex":"male","standard_dose":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/carg-tt","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/carg-tt?age=75&gi_or_gu=true&standard_dose=true&polychemotherapy=true&hemoglobin_g_dl=12&sex=male&jelliffe_crcl_ml_min=50&hearing_fair_or_worse=false&falls_last_6_months=false&limited_walking_one_block=false&needs_help_with_medications=false&decreased_social_activity=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/carg-tt","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/crash","description":"Extermann 2012 CRASH chemotherapy toxicity score (not trauma CRASH): diastolic BP, IADL, LDH versus ULN, caller-assigned MAX2 Chemotox, ECOG, Mini-Mental Status, Mini-Nutritional Assessment. Hematologic 0–6, nonhematologic 0–8, combined 0–12 counting Chemotox once. Four-level low/medium_low/medium_high/high bands with derivation incidences. Not a chemotherapy order and not CARG-TT. magent does not look up regimens.","parameters":[{"in":"query","name":"diastolic_mm_hg","type":"number","description":"Diastolic blood pressure in mm Hg (20-160). Extermann 2012 Table 4: ≤72 → 0, >72 → 1 hematologic point. magent does not measure blood pressure.","required":true,"example":"80"},{"in":"query","name":"iadl","type":"integer","description":"Instrumental activities of daily living integer 10-29 (Extermann 2012 CRASH IADL). 26-29 → 0, 10-25 → 1 hematologic point. magent does not interview the patient.","required":true,"example":"20"},{"in":"query","name":"ldh_u_l","type":"number","description":"Lactate dehydrogenase in U/L (1-20000). +2 hematologic points if ldh_u_l > 0.74 × ldh_uln_u_l, else 0 (empty 1-point column). magent does not assay LDH.","required":true,"example":"500"},{"in":"query","name":"ldh_uln_u_l","type":"number","description":"Laboratory LDH upper limit of normal in U/L (50-2000). Used only as 0.74 × ULN for the LDH rule. No special-case ULN value. magent does not assay LDH.","required":true,"example":"618"},{"in":"query","name":"chemotox","type":"number","description":"Caller-assigned MAX2 Chemotox from 0 to 1. 0-0.44 → 0, 0.45-0.57 → 1, >0.57 → 2. Counted once in the combined score. magent does not look up regimens.","required":true,"example":"0.50"},{"in":"query","name":"ecog","type":"integer","description":"ECOG performance status integer 0-4. Extermann 2012: 0 → 0, 1-2 → 1, 3-4 → 2 nonhematologic points. magent does not assign performance status.","required":true,"example":"1"},{"in":"query","name":"mms","type":"integer","description":"Mini-Mental Status integer 0-30. Extermann 2012: 30 → 0, <30 → 2 nonhematologic points. magent does not administer the Mini-Mental Status.","required":true,"example":"28"},{"in":"query","name":"mna","type":"integer","description":"Mini-Nutritional Assessment integer 0-30. Extermann 2012: 28-30 → 0, <28 → 2 nonhematologic points. magent does not administer the Mini-Nutritional Assessment.","required":true,"example":"26"}],"errors":[{"code":"invalid_diastolic_bp","message":"diastolic_mm_hg must be a number from 20 to 160. Returned before settlement; you are not charged.","status":400},{"code":"invalid_crash_iadl","message":"iadl must be an integer from 10 to 29 (Extermann 2012 CRASH IADL). Returned before settlement; you are not charged.","status":400},{"code":"invalid_ldh","message":"ldh_u_l must be a number from 1 to 20000 (Extermann 2012 LDH U/L). Returned before settlement; you are not charged.","status":400},{"code":"invalid_ldh_uln","message":"ldh_uln_u_l must be a number from 50 to 2000. Returned before settlement; you are not charged.","status":400},{"code":"invalid_crash_chemotox","message":"chemotox must be a number from 0 to 1 (Extermann 2012 MAX2 Chemotox as assigned by the caller). Returned before settlement; you are not charged.","status":400},{"code":"invalid_ecog","message":"ecog must be an integer from 0 to 4 (Shipp 1993 IPI). Returned before settlement; you are not charged.","status":400},{"code":"invalid_crash_mms","message":"mms must be an integer from 0 to 30 (Extermann 2012 Mini-Mental Status). Returned before settlement; you are not charged.","status":400},{"code":"invalid_crash_mna","message":"mna must be an integer from 0 to 30 (Extermann 2012 Mini-Nutritional Assessment). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/crash","citation":{"authors":"Extermann M, Boler I, Reich RR, et al.","doi":"10.1002/cncr.26646","id":"extermann-2012","pmid":"22072065","source":"Cancer. 2012;118(13):3377-3386","title":"Predicting the risk of chemotherapy toxicity in older patients: the Chemotherapy Risk Assessment Scale for High-Age Patients (CRASH) score","url":"https://doi.org/10.1002/cncr.26646"},"formula_expression":"CRASH (Extermann 2012 Table 4) hematologic = diastolic_mm_hg (<=72 0, >72 1) + iadl (26-29 0, 10-25 1) + ldh (ldh_u_l > 0.74 * ldh_uln_u_l 2 else 0; empty 1-point column) + chemotox (0-0.44 0, 0.45-0.57 1, >0.57 2); max 6; nonhematologic = ecog (0 → 0, 1-2 → 1, 3-4 → 2) + mms (30 → 0, <30 → 2) + mna (28-30 → 0, <28 → 2) + chemotox (same); max 8; combined = hematologic + nonhematologic - chemotox (count Chemotox once; max 12 not 14); H 0-1 low 7%, 2-3 medium_low 23%, 4-5 medium_high 54%, 6 high 100%; NH 0-2 low 33%, 3-4 medium_low 46%, 5-6 medium_high 67%, 7-8 high 93%; combined 0-3 low 50%, 4-6 medium_low 58%, 7-9 medium_high 77%, 10-12 high 79%; not trauma CRASH; not CARG-TT; Chemotox is caller-assigned MAX2","purpose":"Sum Extermann 2012 Table 4 CRASH points into hematologic (0–6), nonhematologic (0–8), and combined (0–12, Chemotox once) scores with published four-level risk bands.","markdown_url":"https://magentlab.com/docs/crash.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"crash"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"hematologic_score","type":"integer","description":"Extermann 2012 hematologic points 0-6"},{"name":"nonhematologic_score","type":"integer","description":"Extermann 2012 nonhematologic points 0-8"},{"name":"combined_score","type":"integer","description":"Hematologic + nonhematologic minus Chemotox once; 0-12"},{"name":"max_hematologic_score","type":"integer","description":"Always 6"},{"name":"max_nonhematologic_score","type":"integer","description":"Always 8"},{"name":"max_combined_score","type":"integer","description":"Always 12"},{"name":"hematologic_risk","type":"string","description":"low, medium_low, medium_high, or high (H-toxicity derivation split)"},{"name":"nonhematologic_risk","type":"string","description":"low, medium_low, medium_high, or high (non-H derivation split)"},{"name":"combined_risk","type":"string","description":"low, medium_low, medium_high, or high (combined derivation split)"},{"name":"hematologic_incidence_percent","type":"integer","description":"Derivation H-toxicity incidence 7, 23, 54, or 100; not a patient probability"},{"name":"nonhematologic_incidence_percent","type":"integer","description":"Derivation non-H incidence 33, 46, 67, or 93; not a patient probability"},{"name":"combined_incidence_percent","type":"integer","description":"Derivation combined incidence 50, 58, 77, or 79; not a patient probability"},{"name":"diastolic_mm_hg","type":"number","description":"Diastolic BP used, mm Hg"},{"name":"iadl","type":"integer","description":"IADL integer used"},{"name":"ldh_u_l","type":"number","description":"LDH used, U/L"},{"name":"ldh_uln_u_l","type":"number","description":"LDH ULN used, U/L"},{"name":"chemotox","type":"number","description":"Caller-assigned MAX2 Chemotox used"},{"name":"ecog","type":"integer","description":"ECOG used"},{"name":"mms","type":"integer","description":"Mini-Mental Status used"},{"name":"mna","type":"integer","description":"Mini-Nutritional Assessment used"},{"name":"components","type":"array","description":"Per-factor points with Chemotox listed once"},{"name":"citation","type":"object","description":"Extermann 2012 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"chemotox":"0.50","diastolic_mm_hg":"80","ecog":"1","iadl":"20","ldh_u_l":"500","ldh_uln_u_l":"618","mms":"28","mna":"26"},{"chemotox":"0.50","diastolic_mm_hg":"80","ecog":"1","iadl":"20","ldh_u_l":"500","ldh_uln_u_l":"618","mms":"28","mna":"26"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/crash","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/crash?diastolic_mm_hg=80&iadl=20&ldh_u_l=500&ldh_uln_u_l=618&chemotox=0.50&ecog=1&mms=28&mna=26","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/crash","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/nri","description":"VA TPN 1991 Nutritional Risk Index (NEJM): NRI = 1.519*albumin_g_l + 41.7*(current/usual weight). Malnourished if NRI <= 100. Strata: not_malnourished if NRI > 100; borderline_malnourished if 97.5 < NRI <= 100; mildly_malnourished if 83.5 <= NRI <= 97.5; severely_malnourished if NRI < 83.5. Does not cap current/usual at 1. Not a malnutrition diagnosis or TPN order. magent does not assay albumin or weigh the patient. Not GNRI or PNI.","parameters":[{"in":"query","name":"albumin_g_l","type":"number","description":"Serum albumin in g/L (10-60). Provide this or albumin_g_dl, not both. VA TPN 1991 NRI uses g/L. magent does not assay albumin.","required":false,"example":"40"},{"in":"query","name":"albumin_g_dl","type":"number","description":"Serum albumin in g/dL (1-6). Converted as g/L = g/dL × 10. Provide this or albumin_g_l, not both.","required":false,"example":"4.0"},{"in":"query","name":"current_weight_kg","type":"number","description":"Current weight in kg (1-500). Not capped at usual weight. magent does not weigh the patient.","required":true,"example":"70"},{"in":"query","name":"usual_weight_kg","type":"number","description":"Usual weight in kg (1-500). Must be greater than 0. magent does not weigh the patient.","required":true,"example":"70"}],"errors":[{"code":"invalid_albumin","message":"albumin_g_dl (1-6) or albumin_g_l (10-60) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_weight","message":"weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_usual_weight","message":"usual_weight_kg must be a number from 1 to 500 (VA TPN 1991 NRI). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/nri","citation":{"authors":"Veterans Affairs Total Parenteral Nutrition Cooperative Study Group","doi":"10.1056/NEJM199108223250801","id":"va-tpn-1991","pmid":"1906987","source":"N Engl J Med. 1991;325(8):525-532","title":"Perioperative total parenteral nutrition in surgical patients","url":"https://doi.org/10.1056/NEJM199108223250801"},"formula_expression":"NRI = 1.519 × albumin_g_l + 0.417 × (current_weight_kg / usual_weight_kg) × 100","purpose":"Apply the VA TPN Cooperative Study 1991 Nutritional Risk Index from caller-supplied albumin and current/usual weight.","markdown_url":"https://magentlab.com/docs/nri.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"nri"},{"name":"formula_expression","type":"string","description":"VA TPN 1991 NRI expression in g/L and kg"},{"name":"albumin_g_l","type":"number","description":"Serum albumin used in g/L (after g/dL conversion when supplied)"},{"name":"current_weight_kg","type":"number","description":"Current weight used in kg (not capped at usual weight)"},{"name":"usual_weight_kg","type":"number","description":"Usual weight used in kg"},{"name":"nri","type":"number","description":"Nutritional Risk Index, 1 decimal"},{"name":"screening","type":"string","description":"malnourished if NRI ≤ 100; not_malnourished if NRI > 100 (VA TPN 1991)"},{"name":"stratification","type":"string","description":"not_malnourished if NRI > 100; borderline_malnourished if 97.5 < NRI ≤ 100; mildly_malnourished if 83.5 ≤ NRI ≤ 97.5; severely_malnourished if NRI < 83.5"},{"name":"citation","type":"object","description":"VA TPN Cooperative Study 1991 NEJM citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"albumin_g_l":"40","current_weight_kg":"70","usual_weight_kg":"70"},{"albumin_g_l":"40","current_weight_kg":"70","usual_weight_kg":"70"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/nri","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/nri?albumin_g_l=40&current_weight_kg=70&usual_weight_kg=70","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/nri","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/nrs-2002","description":"Kondrup 2003 NRS-2002: nutrition_status (0-3) + disease_severity (0-3) + 1 if age ≥70 (70 scores); max 7. at_risk true iff score ≥3. Caller assigns published grades (highest undernutrition indicator). Hospitalized adults. Not a medical device, not a diet order, not NRI. magent does not weigh the patient.","parameters":[{"in":"query","name":"nutrition_status","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Kondrup 2003 impaired nutritional status 0-3. If BMI, intake, and weight-loss grades differ, use the highest. 0 absent. 1 mild (weight loss >5% in 3 months or food intake 50-75% of requirement last week). 2 moderate (weight loss >5% in 2 months or BMI 18.5-20.5 plus impaired general condition or intake 25-60%). 3 severe (weight loss >5% in 1 month / >15% in 3 months or BMI <18.5 plus impaired general condition or intake 0-25%). magent does not weigh the patient or compute BMI, weight-loss, or intake.","required":true,"example":"0"},{"in":"query","name":"disease_severity","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Kondrup 2003 disease severity 0-3. 0 absent (normal requirements). 1 mild (e.g. hip fracture; chronic illness with complications: cirrhosis, COPD, chronic hemodialysis, diabetes, oncology). 2 moderate (e.g. major abdominal surgery, stroke, severe pneumonia, hematologic malignancy). 3 severe (e.g. head injury, bone marrow transplant, ICU APACHE >10). magent does not assign the diagnosis.","required":true,"example":"0"},{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Kondrup 2003: add 1 point when age ≥70. Age 70 scores. Age 69 does not.","required":true,"example":"50"}],"errors":[{"code":"invalid_nrs_nutrition","message":"nutrition_status must be an integer 0, 1, 2, or 3 (Kondrup 2003 NRS-2002). Returned before settlement; you are not charged.","status":400},{"code":"invalid_nrs_severity","message":"disease_severity must be an integer 0, 1, 2, or 3 (Kondrup 2003 NRS-2002). Returned before settlement; you are not charged.","status":400},{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/nrs-2002","citation":{"authors":"Kondrup J, Rasmussen HH, Hamberg O, Stanga Z, Ad Hoc ESPEN Working Group","doi":"10.1016/s0261-5614(02)00214-5","id":"kondrup-2003","pmid":"12765673","source":"Clin Nutr. 2003;22(3):321-336","title":"Nutritional risk screening (NRS 2002): a new method based on an analysis of controlled clinical trials","url":"https://doi.org/10.1016/s0261-5614(02)00214-5"},"formula_expression":"NRS-2002 = nutrition_status (0–3) + disease_severity (0–3) + 1 if age ≥ 70; max 7; at_risk if score ≥ 3","purpose":"Sum Kondrup 2003 NRS-2002 impaired nutritional status (0–3), disease severity (0–3), and 1 if age ≥70, and return whether the total is at nutritional risk (score ≥3).","markdown_url":"https://magentlab.com/docs/nrs-2002.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"nrs_2002"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"NRS-2002 points 0-7"},{"name":"max_score","type":"integer","description":"7"},{"name":"at_risk","type":"boolean","description":"true iff score ≥ 3 (Kondrup 2003 / ESPEN NRS-2002). Not a diet order. No other bands."},{"name":"nutrition_status","type":"integer","description":"Caller-assigned impaired nutritional status 0-3 used"},{"name":"disease_severity","type":"integer","description":"Caller-assigned disease severity 0-3 used"},{"name":"age_years","type":"integer","description":"Age used for the ≥70 point"},{"name":"components","type":"array","description":"Per-item Kondrup 2003 points"},{"name":"citation","type":"object","description":"Kondrup et al. Clin Nutr 2003 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"50","disease_severity":"0","nutrition_status":"0"},{"age":"50","disease_severity":"0","nutrition_status":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/nrs-2002","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/nrs-2002?nutrition_status=0&disease_severity=0&age=50","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/nrs-2002","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/nutric","description":"Heyland 2011 original 6-variable NUTRIC (Nutrition Risk in the Critically Ill) including IL-6, Table 4 overall: age 0-2, APACHE II 0-3 (28 scores 2), SOFA 0-2, comorbidities 0-1, hospital days to ICU 0-1, IL-6 pg/mL 0-1; max 10. high_risk true iff score ≥6. Caller supplies APACHE II and SOFA integers. Not a medical device, not a feeding order, not Rahman 2015 mNUTRIC.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Heyland 2011 Table 4 overall: <50 → 0; 50–<75 → 1; ≥75 → 2. Age 50 scores 1. Age 74 scores 1. Age 75 scores 2.","required":true,"example":"40"},{"in":"query","name":"apache_ii","type":"integer","description":"Caller-supplied APACHE II total (integer 0-71). Heyland 2011 Table 4 overall: <15 → 0; 15–<20 → 1; 20–28 inclusive → 2; ≥29 → 3. APACHE II 28 scores 2 (the 20–28 row, not the overlapping ≥28 row). magent does not compute APACHE II.","required":true,"example":"10"},{"in":"query","name":"sofa","type":"integer","description":"Caller-supplied SOFA total (integer 0-24). Heyland 2011 Table 4 overall: <6 → 0; 6–<10 → 1; ≥10 → 2. magent does not compute SOFA.","required":true,"example":"4"},{"in":"query","name":"comorbidities","type":"integer","description":"Number of comorbidities (integer 0-20). Heyland 2011 Table 4 overall: 0–1 → 0; ≥2 → 1.","required":true,"example":"0"},{"in":"query","name":"hospital_days_to_icu","type":"number","description":"Days from hospital admission to ICU admission (0-365). Heyland 2011 Table 4 overall: 0–<1 → 0; ≥1 → 1. 0.9 scores 0. 1.0 scores 1.","required":true,"example":"0"},{"in":"query","name":"il6_pg_ml","type":"number","description":"Serum IL-6 in pg/mL (0-100000). Heyland 2011 Table 4 overall original 6-variable NUTRIC: 0–<400 → 0; ≥400 → 1. 399.9 scores 0. 400 scores 1. This is not Rahman 2015 mNUTRIC (IL-6 omitted).","required":true,"example":"100"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_apache_ii","message":"apache_ii must be an integer from 0 to 71 (Heyland 2011 NUTRIC); APACHE II needs Knaus 1985 physiologic, age, and chronic-health integers in published ranges. Returned before settlement; you are not charged.","status":400},{"code":"invalid_sofa_total","message":"sofa must be an integer from 0 to 24 (Heyland 2011 NUTRIC). Returned before settlement; you are not charged.","status":400},{"code":"invalid_comorbidity_count","message":"comorbidities or comorbidity_count must be an integer from 0 to 20 (Heyland 2011 NUTRIC comorbidities; Knight 2020 4C comorbidity_count, caller-assigned Charlson-plus-obesity, not computed). Returned before settlement; you are not charged.","status":400},{"code":"invalid_hospital_days","message":"hospital_days_to_icu must be a number from 0 to 365 (Heyland 2011 NUTRIC). Returned before settlement; you are not charged.","status":400},{"code":"invalid_il6","message":"il6_pg_ml must be a number from 0 to 100000 (Heyland 2011 NUTRIC). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/nutric","citation":{"authors":"Heyland DK, Dhaliwal R, Jiang X, Day AG","doi":"10.1186/cc10546","id":"heyland-2011","pmid":"22085763","source":"Crit Care. 2011;15(6):R268","title":"Identifying critically ill patients who benefit the most from nutrition therapy: the development and initial validation of a novel risk assessment tool","url":"https://doi.org/10.1186/cc10546"},"formula_expression":"NUTRIC = age (0–2) + apache_ii (0–3) + sofa (0–2) + comorbidities (0–1) + hospital_days_to_icu (0–1) + il6_pg_ml (0–1); Heyland 2011 Table 4 overall including IL-6; max 10; high_risk if score ≥ 6","purpose":"Sum Heyland 2011 original 6-variable NUTRIC (Nutrition Risk in the Critically Ill) Table 4 overall points, including IL-6, and return whether the total is high nutrition risk (score ≥6).","markdown_url":"https://magentlab.com/docs/nutric.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"nutric"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"NUTRIC points 0-10"},{"name":"max_score","type":"integer","description":"10"},{"name":"high_risk","type":"boolean","description":"true iff score ≥ 6 (Heyland 2011 original 6-variable NUTRIC with IL-6). Not a feeding order. Not the Rahman 2015 mNUTRIC 5–9 cutoff."},{"name":"age_years","type":"integer","description":"Age used for the 0–2 age points"},{"name":"apache_ii","type":"integer","description":"Caller-supplied APACHE II total used for the 0–3 points"},{"name":"sofa","type":"integer","description":"Caller-supplied SOFA total used for the 0–2 points"},{"name":"comorbidities","type":"integer","description":"Comorbidity count used for the 0–1 points"},{"name":"hospital_days_to_icu","type":"number","description":"Hospital days to ICU used for the 0–1 points"},{"name":"il6_pg_ml","type":"number","description":"IL-6 pg/mL used for the 0–1 points"},{"name":"components","type":"array","description":"Per-item Heyland 2011 Table 4 overall points"},{"name":"citation","type":"object","description":"Heyland et al. Crit Care 2011 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"40","apache_ii":"10","comorbidities":"0","hospital_days_to_icu":"0","il6_pg_ml":"100","sofa":"4"},{"age":"40","apache_ii":"10","comorbidities":"0","hospital_days_to_icu":"0","il6_pg_ml":"100","sofa":"4"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/nutric","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/nutric?age=40&apache_ii=10&sofa=4&comorbidities=0&hospital_days_to_icu=0&il6_pg_ml=100","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/nutric","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/apache-ii","description":"Knaus 1985 APACHE II integer: 12 Acute Physiology Score items (worst in 24 hours as assigned by the caller) plus age and chronic-health points, max 71. Oxygenation uses A-aDO2 when FiO2 is at least 0.5 and PaO2 when FiO2 is below 0.5. Creatinine points double in acute renal failure. Does not compute predicted death risk. magent does not measure vitals.","parameters":[{"in":"query","name":"temperature_c","type":"number","description":"Rectal temperature in °C (20-46) as assigned by the caller (Knaus 1985 Table 1). ≥41 → 4; 39-40.9 → 3; 38.5-38.9 → 1; 36-38.4 → 0; 34-35.9 → 1; 32-33.9 → 2; 30-31.9 → 3; ≤29.9 → 4. magent does not measure temperature or convert Fahrenheit.","required":true,"example":"37.0"},{"in":"query","name":"map_mm_hg","type":"number","description":"Mean arterial pressure in mm Hg (20-250). ≥160 → 4; 130-159 → 3; 110-129 → 2; 70-109 → 0; 50-69 → 2; ≤49 → 4. magent does not measure blood pressure.","required":true,"example":"90"},{"in":"query","name":"heart_rate","type":"integer","description":"Heart rate, ventricular response, integer 20-250. ≥180 → 4; 140-179 → 3; 110-139 → 2; 70-109 → 0; 55-69 → 2; 40-54 → 3; ≤39 → 4.","required":true,"example":"80"},{"in":"query","name":"respiratory_rate","type":"integer","description":"Respiratory rate, non-ventilated or ventilated, integer 0-80. ≥50 → 4; 35-49 → 3; 25-34 → 1; 12-24 → 0; 10-11 → 1; 6-9 → 2; ≤5 → 4.","required":true,"example":"16"},{"in":"query","name":"fio2","type":"number","description":"Inspired oxygen as a fraction 0.21-1.00, not a percent. If fio2 ≥ 0.5, oxygenation uses aa_gradient. If fio2 < 0.5, oxygenation uses pao2_mm_hg. The unused gas parameter is ignored.","required":true,"example":"0.21"},{"in":"query","name":"aa_gradient","type":"number","description":"A-aDO2 in mm Hg (0-800). Required when fio2 ≥ 0.5. ≥500 → 4; 350-499 → 3; 200-349 → 2; <200 → 0. Ignored when fio2 < 0.5. magent does not compute A-aDO2 from PaO2.","required":false,"example":"100"},{"in":"query","name":"pao2_mm_hg","type":"number","description":"Arterial PaO2 in mm Hg (20-700). Required when fio2 < 0.5. >70 → 0; 61-70 → 1; 55-60 → 3; <55 → 4. Ignored when fio2 ≥ 0.5.","required":false,"example":"90"},{"in":"query","name":"arterial_ph","type":"number","description":"Arterial pH (6.5-8.0). ≥7.70 → 4; 7.60-7.69 → 3; 7.50-7.59 → 1; 7.33-7.49 → 0; 7.25-7.32 → 2; 7.15-7.24 → 3; <7.15 → 4. Venous HCO3 substitution from Table 1 is not accepted.","required":true,"example":"7.40"},{"in":"query","name":"sodium_mmol_l","type":"number","description":"Serum sodium in mmol/L (90-200). ≥180 → 4; 160-179 → 3; 155-159 → 2; 150-154 → 1; 130-149 → 0; 120-129 → 2; 111-119 → 3; ≤110 → 4.","required":true,"example":"140"},{"in":"query","name":"potassium_mmol_l","type":"number","description":"Serum potassium in mmol/L (1-12). ≥7.0 → 4; 6.0-6.9 → 3; 5.5-5.9 → 1; 3.5-5.4 → 0; 3.0-3.4 → 1; 2.5-2.9 → 2; <2.5 → 4.","required":true,"example":"4.0"},{"in":"query","name":"creatinine_mg_dl","type":"number","description":"Serum creatinine in mg/dL (0.1-20). ≥3.5 → 4; 2.0-3.4 → 3; 1.5-1.9 → 2; 0.6-1.4 → 0; <0.6 → 2. Double that row when acute_renal_failure is true.","required":true,"example":"1.0"},{"in":"query","name":"hematocrit_percent","type":"number","description":"Hematocrit percent (5-80). ≥60 → 4; 50-59.9 → 2; 46-49.9 → 1; 30-45.9 → 0; 20-29.9 → 2; <20 → 4.","required":true,"example":"40"},{"in":"query","name":"wbc_k_ul","type":"number","description":"White blood count in thousands per mm^3 (0.1-100). ≥40 → 4; 20-39.9 → 2; 15-19.9 → 1; 3-14.9 → 0; 1-2.9 → 2; <1 → 4.","required":true,"example":"8.0"},{"in":"query","name":"gcs","type":"integer","description":"Glasgow Coma Scale total as assigned by the caller (integer 3-15). APS GCS points = 15 minus gcs. magent does not examine the patient.","required":true,"example":"15"},{"in":"query","name":"age","type":"integer","description":"Age in years, integer 16-120. ≤44 → 0; 45-54 → 2; 55-64 → 3; 65-74 → 5; ≥75 → 6.","required":true,"example":"40"},{"in":"query","name":"chronic_health","type":"boolean","description":"true if the caller assigns severe organ insufficiency or immunocompromise as defined in Knaus 1985. false → 0 chronic-health points and elective_postop must be false.","required":true,"example":"false"},{"in":"query","name":"elective_postop","type":"boolean","description":"true only for elective postoperative patients with chronic_health true (+2). false with chronic_health true is nonoperative or emergency postoperative (+5). Must be false when chronic_health is false.","required":true,"example":"false"},{"in":"query","name":"acute_renal_failure","type":"boolean","description":"true doubles the creatinine Table 1 points (Knaus 1985). false leaves creatinine points unchanged. magent does not diagnose renal failure.","required":true,"example":"false"}],"errors":[{"code":"invalid_apache_ii","message":"apache_ii must be an integer from 0 to 71 (Heyland 2011 NUTRIC); APACHE II needs Knaus 1985 physiologic, age, and chronic-health integers in published ranges. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/apache-ii","citation":{"authors":"Knaus WA, Draper EA, Wagner DP, Zimmerman JE","doi":"10.1097/00003246-198510000-00009","id":"knaus-1985","pmid":"3928249","source":"Crit Care Med. 1985;13(10):818-829","title":"APACHE II: a severity of disease classification system","url":"https://doi.org/10.1097/00003246-198510000-00009"},"formula_expression":"APACHE II = APS + age_points + chronic_health_points; APS is the sum of 12 Knaus 1985 Table 1 items (worst values in 24h as assigned by the caller): temperature_c, map_mm_hg, heart_rate, respiratory_rate, oxygenation (A-aDO2 if fio2 >= 0.5, PaO2 if fio2 < 0.5), arterial_ph, sodium_mmol_l, potassium_mmol_l, creatinine_mg_dl (doubled if acute_renal_failure), hematocrit_percent, wbc_k_ul, and 15-gcs; age <=44 → 0, 45-54 → 2, 55-64 → 3, 65-74 → 5, >=75 → 6; chronic health 0 if none, else +5 nonoperative or emergency postoperative or +2 elective postoperative; max 71","purpose":"Compute the Knaus 1985 APACHE II integer from 12 Acute Physiology Score items, age points, and chronic-health points.","markdown_url":"https://magentlab.com/docs/apache-ii.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"apache_ii"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"APACHE II integer 0-71"},{"name":"max_score","type":"integer","description":"Always 71"},{"name":"components","type":"array","description":"Twelve APS rows plus age and chronic health"},{"name":"citation","type":"object","description":"Knaus 1985 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"acute_renal_failure":"false","age":"40","arterial_ph":"7.40","chronic_health":"false","creatinine_mg_dl":"1.0","elective_postop":"false","fio2":"0.21","gcs":"15","heart_rate":"80","hematocrit_percent":"40","map_mm_hg":"90","pao2_mm_hg":"90","potassium_mmol_l":"4.0","respiratory_rate":"16","sodium_mmol_l":"140","temperature_c":"37.0","wbc_k_ul":"8.0"},{"acute_renal_failure":"false","age":"40","arterial_ph":"7.40","chronic_health":"false","creatinine_mg_dl":"1.0","elective_postop":"false","fio2":"0.21","gcs":"15","heart_rate":"80","hematocrit_percent":"40","map_mm_hg":"90","pao2_mm_hg":"90","potassium_mmol_l":"4.0","respiratory_rate":"16","sodium_mmol_l":"140","temperature_c":"37.0","wbc_k_ul":"8.0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/apache-ii","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/apache-ii?temperature_c=37.0&map_mm_hg=90&heart_rate=80&respiratory_rate=16&fio2=0.21&pao2_mm_hg=90&arterial_ph=7.40&sodium_mmol_l=140&potassium_mmol_l=4.0&creatinine_mg_dl=1.0&hematocrit_percent=40&wbc_k_ul=8.0&gcs=15&age=40&chronic_health=false&elective_postop=false&acute_renal_failure=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/apache-ii","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/msofa","description":"Modified SOFA (mSOFA) from Grissom 2010 Table 2: SpO2/FiO2 respiration, caller-assigned scleral icterus or jaundice (0 or 3), MAP and adrenergic agents, caller-assigned GCS, and creatinine; five organs, coagulation not scored, max 19. Deterministic published score with citation; not Vincent 1996 SOFA, not qSOFA, and not a Sepsis-3 diagnosis.","parameters":[{"in":"query","name":"spo2_percent","type":"number","description":"Pulse-oximeter SpO2 in percent (50-100), not a fraction. Respiration uses SpO2/FiO2: >400 scores 0; ≤400 scores 1; ≤315 scores 2; ≤235 scores 3; ≤150 scores 4 (Grissom 2010 Table 2). magent does not read a probe.","required":true,"example":"96"},{"in":"query","name":"fio2","type":"number","description":"Inspired oxygen as a fraction (0.21-1.0), not a percent. For nasal cannula, Grissom 2010 estimated FiO2 as 0.21 + 0.03 × L/min; the caller supplies the fraction.","required":true,"example":"0.21"},{"in":"query","name":"scleral_icterus_or_jaundice","type":"boolean","description":"Scleral icterus or jaundice as assigned by the caller (Grissom 2010 Table 2). true or false. Absent scores 0; present scores 3. Not serum bilirubin. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"map_mm_hg","type":"number","description":"Mean arterial pressure in mm Hg (30-180). MAP <70 scores 1 unless a higher cardiovascular band applies.","required":true,"example":"80"},{"in":"query","name":"dopamine_ug_kg_min","type":"number","description":"Dopamine in µg/kg·min (0-50) when provided. Absent is 0. 0 < dose ≤5 scores 2; >5 scores 3; >15 scores 4.","required":false,"example":"0"},{"in":"query","name":"dobutamine","type":"boolean","description":"Any dobutamine. true or false when provided; absent is false. true scores cardiovascular 2 unless a higher band applies.","required":false,"example":"false"},{"in":"query","name":"epinephrine_ug_kg_min","type":"number","description":"Epinephrine in µg/kg·min (0-2) when provided. Absent is 0. 0 < dose ≤0.1 scores 3; >0.1 scores 4.","required":false,"example":"0"},{"in":"query","name":"norepinephrine_ug_kg_min","type":"number","description":"Norepinephrine in µg/kg·min (0-2) when provided. Absent is 0. 0 < dose ≤0.1 scores 3; >0.1 scores 4.","required":false,"example":"0"},{"in":"query","name":"gcs","type":"integer","description":"Glasgow Coma Scale total as assigned by the caller (integer 3-15). 15 scores 0; 13-14 scores 1; 10-12 scores 2; 6-9 scores 3; <6 scores 4.","required":true,"example":"15"},{"in":"query","name":"creatinine_mg_dl","type":"number","description":"Creatinine in mg/dL (0.1-20). Provide this or creatinine_umol_l. <1.2 scores 0; 1.2-1.9 scores 1; 2.0-3.4 scores 2; 3.5-4.9 scores 3; ≥5.0 scores 4. Table 2 lists creatinine only (not urine output).","required":false,"example":"1.0"},{"in":"query","name":"creatinine_umol_l","type":"number","description":"Creatinine in µmol/L. Converted as mg/dL = µmol/L / 88.42.","required":false,"example":"88.42"}],"errors":[{"code":"invalid_msofa","message":"mSOFA needs Grissom modified SOFA organ scores in published ranges (SpO2/FiO2 not PaO2/FiO2). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/msofa","citation":{"authors":"Grissom CK, Brown SM, Kuttler KG, Boltax JP, Jones J, Jephson AR, Orme JF Jr","doi":"10.1001/dmp.2010.40","id":"grissom-2010","pmid":"21149228","source":"Disaster Med Public Health Prep. 2010;4(4):277-284","title":"A modified sequential organ failure assessment score for critical care triage","url":"https://doi.org/10.1001/dmp.2010.40"},"formula_expression":"mSOFA = respiration + liver + cardiovascular + cns + renal; respiration SpO2/FiO2 >400 → 0, ≤400 → 1, ≤315 → 2, ≤235 → 3, ≤150 → 4; liver no scleral icterus or jaundice → 0, present → 3; cardiovascular, CNS (GCS), and renal (creatinine) 0-4 as SOFA; coagulation not scored; max 19","purpose":"Compute the Grissom 2010 modified SOFA (mSOFA) total from SpO2/FiO2, caller-assigned scleral icterus or jaundice, MAP and adrenergic agents, caller-assigned GCS, and creatinine.","markdown_url":"https://magentlab.com/docs/msofa.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"msofa"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Total points 0-19"},{"name":"max_score","type":"integer","description":"Always 19"},{"name":"components","type":"array","description":"Per-organ points"},{"name":"citation","type":"object","description":"Grissom 2010 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"creatinine_mg_dl":"1.0","fio2":"0.21","gcs":"15","map_mm_hg":"80","scleral_icterus_or_jaundice":"false","spo2_percent":"96"},{"creatinine_mg_dl":"1.0","fio2":"0.21","gcs":"15","map_mm_hg":"80","scleral_icterus_or_jaundice":"false","spo2_percent":"96"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/msofa","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/msofa?spo2_percent=96&fio2=0.21&scleral_icterus_or_jaundice=false&map_mm_hg=80&gcs=15&creatinine_mg_dl=1.0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/msofa","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/saps-ii","description":"Le Gall 1993 Simplified Acute Physiology Score II from 12 physiology variables (worst values in the first 24 hours as assigned by the caller), age, type of admission, and one chronic disease (AIDS, metastatic cancer, or hematologic malignancy). Max 163. Converts the integer to hospital-mortality probability with the paper's logit. PaO2/FiO2 is scored only if ventilated or CPAP. Not SAPS 3. Not APACHE. magent does not measure vitals.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years, integer 18-120 (Le Gall 1993 excluded patients younger than 18). <40 → 0; 40-59 → 7; 60-69 → 12; 70-74 → 15; 75-79 → 16; ≥80 → 18.","required":true,"example":"35"},{"in":"query","name":"heart_rate","type":"integer","description":"Heart rate in beats/min, integer 20-250, worst in 24h as assigned by the caller. <40 → 11; 40-69 → 2; 70-119 → 0; 120-159 → 4; ≥160 → 7. magent does not measure pulse.","required":true,"example":"80"},{"in":"query","name":"systolic_bp_mm_hg","type":"number","description":"Systolic blood pressure in mm Hg (20-300), worst in 24h as assigned by the caller. <70 → 13; 70-99 → 5; 100-199 → 0; ≥200 → 2. magent does not measure blood pressure.","required":true,"example":"120"},{"in":"query","name":"temperature_c","type":"number","description":"Body temperature in °C (20-46). <39 → 0; ≥39 → 3. The 1993 table has no hypothermia points. magent does not measure temperature or convert Fahrenheit.","required":true,"example":"37.0"},{"in":"query","name":"ventilated","type":"boolean","description":"true if the caller assigns mechanical ventilation or CPAP in the first 24h (Le Gall 1993 PaO2/FiO2 row). false → 0 oxygenation points and pao2_fio2 is ignored. Ventilated or CPAP scores at least 6 even when PaO2/FiO2 is ≥200.","required":true,"example":"false"},{"in":"query","name":"pao2_fio2","type":"number","description":"PaO2/FiO2 ratio in mm Hg (10-800). Required when ventilated is true. <100 → 11; 100-199 → 9; ≥200 → 6. Ignored when ventilated is false. magent does not compute the ratio from PaO2 and FiO2.","required":false,"example":"250"},{"in":"query","name":"urine_output_l_day","type":"number","description":"Urine output in L/24h (0-20) as assigned by the caller. <0.500 → 11; 0.500-0.999 → 4; ≥1.000 → 0. magent does not measure urine.","required":true,"example":"1.5"},{"in":"query","name":"urea_mmol_l","type":"number","description":"Serum urea in mmol/L (0.1-80). One of urea_mmol_l or bun_mg_dl is required. If both are sent, urea_mmol_l is scored and bun_mg_dl is ignored. <10.0 → 0; 10.0-29.9 → 6; ≥30.0 → 10.","required":false,"example":"5.0"},{"in":"query","name":"bun_mg_dl","type":"number","description":"Blood urea nitrogen in mg/dL (1-250). Alternate to urea_mmol_l (Le Gall 1993 US column). Ignored when urea_mmol_l is present. <28 → 0; 28-83 → 6; ≥84 → 10. magent does not convert BUN to urea.","required":false,"example":"15"},{"in":"query","name":"wbc_k_ul","type":"number","description":"White blood count in thousands per mm^3 (0-100). <1.0 → 12; 1.0-19.9 → 0; ≥20.0 → 3.","required":true,"example":"8.0"},{"in":"query","name":"potassium_mmol_l","type":"number","description":"Serum potassium in mmol/L (1-12). <3.0 → 3; 3.0-4.9 → 0; ≥5.0 → 3.","required":true,"example":"4.0"},{"in":"query","name":"sodium_mmol_l","type":"number","description":"Serum sodium in mmol/L (90-200). <125 → 5; 125-144 → 0; ≥145 → 1.","required":true,"example":"140"},{"in":"query","name":"bicarbonate_meq_l","type":"number","description":"Serum bicarbonate in mEq/L (2-60). <15 → 6; 15-19 → 3; ≥20 → 0. Arterial pH is not a SAPS II variable.","required":true,"example":"24"},{"in":"query","name":"bilirubin_mg_dl","type":"number","description":"Serum bilirubin in mg/dL (0-40). One of bilirubin_mg_dl or bilirubin_umol_l is required. If both are sent, bilirubin_mg_dl is scored and bilirubin_umol_l is ignored. <4.0 → 0; 4.0-5.9 → 4; ≥6.0 → 9.","required":false,"example":"0.8"},{"in":"query","name":"bilirubin_umol_l","type":"number","description":"Serum bilirubin in µmol/L (0-684). Alternate to bilirubin_mg_dl (Le Gall 1993 SI column). Ignored when bilirubin_mg_dl is present. <68.4 → 0; 68.4-102.5 → 4; ≥102.6 → 9. magent does not convert units.","required":false,"example":"14"},{"in":"query","name":"gcs","type":"integer","description":"Glasgow Coma Scale total as assigned by the caller (integer 3-15). <6 → 26; 6-8 → 13; 9-10 → 7; 11-13 → 5; 14-15 → 0. magent does not examine the patient.","required":true,"example":"15"},{"in":"query","name":"admission_type","type":"string","enum":["scheduled_surgical","medical","unscheduled_surgical"],"description":"Le Gall 1993 type of admission as assigned by the caller: scheduled_surgical (0), medical (6), or unscheduled_surgical (8). magent does not classify the admission.","required":true,"example":"scheduled_surgical"},{"in":"query","name":"chronic_disease","type":"string","enum":["none","metastatic_cancer","hematologic_malignancy","aids"],"description":"Le Gall 1993 chronic-disease row as assigned by the caller: none (0), metastatic_cancer (9), hematologic_malignancy (10), or aids (17). One token; the paper's table is not additive. magent does not diagnose.","required":true,"example":"none"}],"errors":[{"code":"invalid_saps_ii","message":"SAPS II needs Le Gall 1993 physiologic, age, admission-type, and chronic-disease values in published ranges. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/saps-ii","citation":{"authors":"Le Gall JR, Lemeshow S, Saulnier F","doi":"10.1001/jama.270.24.2957","id":"le-gall-1993","pmid":"8254858","source":"JAMA. 1993;270(24):2957-2963","title":"A new Simplified Acute Physiology Score (SAPS II) based on a European/North American multicenter study","url":"https://doi.org/10.1001/jama.270.24.2957"},"formula_expression":"SAPS II = sum of 17 Le Gall 1993 variables (worst values in 24h as assigned by the caller): heart_rate (<40 → 11, 40-69 → 2, 70-119 → 0, 120-159 → 4, ≥160 → 7), systolic_bp_mm_hg (<70 → 13, 70-99 → 5, 100-199 → 0, ≥200 → 2), temperature_c (<39 → 0, ≥39 → 3), PaO2/FiO2 mm Hg if ventilated or CPAP (<100 → 11, 100-199 → 9, ≥200 → 6) else 0, urine_output_l_day (<0.500 → 11, 0.500-0.999 → 4, ≥1.000 → 0), urea_mmol_l (<10.0 → 0, 10.0-29.9 → 6, ≥30.0 → 10) or bun_mg_dl (<28 → 0, 28-83 → 6, ≥84 → 10), wbc_k_ul (<1.0 → 12, 1.0-19.9 → 0, ≥20.0 → 3), potassium_mmol_l (<3.0 or ≥5.0 → 3, 3.0-4.9 → 0), sodium_mmol_l (<125 → 5, 125-144 → 0, ≥145 → 1), bicarbonate_meq_l (<15 → 6, 15-19 → 3, ≥20 → 0), bilirubin_mg_dl (<4.0 → 0, 4.0-5.9 → 4, ≥6.0 → 9) or bilirubin_umol_l (<68.4 → 0, 68.4-102.5 → 4, ≥102.6 → 9), gcs (<6 → 26, 6-8 → 13, 9-10 → 7, 11-13 → 5, 14-15 → 0), age (<40 → 0, 40-59 → 7, 60-69 → 12, 70-74 → 15, 75-79 → 16, ≥80 → 18), admission_type (scheduled_surgical → 0, medical → 6, unscheduled_surgical → 8), chronic_disease (none → 0, metastatic_cancer → 9, hematologic_malignancy → 10, aids → 17, one row not additive); logit = -7.7631 + 0.0737*SAPS_II + 0.9971*ln(SAPS_II+1); hospital_mortality_probability = exp(logit)/(1+exp(logit)); max 163","purpose":"Compute the Le Gall 1993 SAPS II integer from 12 physiology variables, age, type of admission, and one chronic disease, then the paper's logit hospital-mortality probability.","markdown_url":"https://magentlab.com/docs/saps-ii.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"saps_ii"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"SAPS II integer 0-163"},{"name":"max_score","type":"integer","description":"Always 163"},{"name":"logit","type":"number","description":"Le Gall 1993 logit, 4 decimal places"},{"name":"hospital_mortality_probability","type":"number","description":"exp(logit)/(1+exp(logit)) from the unrounded logit, 6 decimal places. A probability, not a named class."},{"name":"components","type":"array","description":"Fifteen Table 1 rows (chronic diseases share one row)"},{"name":"citation","type":"object","description":"Le Gall 1993 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"admission_type":"scheduled_surgical","age":"35","bicarbonate_meq_l":"24","bilirubin_mg_dl":"0.8","chronic_disease":"none","gcs":"15","heart_rate":"80","potassium_mmol_l":"4.0","sodium_mmol_l":"140","systolic_bp_mm_hg":"120","temperature_c":"37.0","urea_mmol_l":"5.0","urine_output_l_day":"1.5","ventilated":"false","wbc_k_ul":"8.0"},{"admission_type":"scheduled_surgical","age":"35","bicarbonate_meq_l":"24","bilirubin_mg_dl":"0.8","chronic_disease":"none","gcs":"15","heart_rate":"80","potassium_mmol_l":"4.0","sodium_mmol_l":"140","systolic_bp_mm_hg":"120","temperature_c":"37.0","urea_mmol_l":"5.0","urine_output_l_day":"1.5","ventilated":"false","wbc_k_ul":"8.0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/saps-ii","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/saps-ii?age=35&heart_rate=80&systolic_bp_mm_hg=120&temperature_c=37.0&ventilated=false&urine_output_l_day=1.5&urea_mmol_l=5.0&wbc_k_ul=8.0&potassium_mmol_l=4.0&sodium_mmol_l=140&bicarbonate_meq_l=24&bilirubin_mg_dl=0.8&gcs=15&admission_type=scheduled_surgical&chronic_disease=none","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/saps-ii","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/saps-3","description":"Moreno 2005 SAPS 3 admission score from caller-assigned ICU-hour boxes (age, comorbidities, stay, location, vasoactive drugs, admission circumstances, and ten physiology items) plus the published 16-point offset. Converts the integer to hospital-mortality percent with the Part 2 global logit. Not SAPS II. Not APACHE. magent does not measure vitals.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years, integer 18-120, as assigned at ICU admission. <40 → 0; 40-59 → 5; 60-69 → 9; 70-74 → 13; 75-79 → 15; ≥80 → 18.","required":true,"example":"35"},{"in":"query","name":"los_days","type":"integer","description":"Hospital stay in days before ICU admission as assigned by the caller (integer 0-365). <14 → 0; 14-27 → 6; ≥28 → 7. magent does not subtract timestamps.","required":true,"example":"1"},{"in":"query","name":"location","type":"string","enum":["operating_room","emergency_room","other_icu","other"],"description":"Intra-hospital location before ICU admission: operating_room (0), emergency_room (5), other_icu (7; intermediate/high-dependency, other ICU, or recovery), or other (8; ward or other). magent does not classify the bed.","required":true,"example":"operating_room"},{"in":"query","name":"vasoactive_drugs","type":"boolean","description":"true if the caller assigns vasoactive drugs before ICU admission (+3). false → 0. magent does not inspect the medication list.","required":true,"example":"false"},{"in":"query","name":"icu_admission","type":"string","enum":["planned","unplanned"],"description":"Planned (0) or unplanned (3) ICU admission as assigned by the caller. magent does not classify the admission.","required":true,"example":"planned"},{"in":"query","name":"surgical_status","type":"string","enum":["scheduled_surgery","emergency_surgery","no_surgery"],"description":"Surgical status at ICU admission: scheduled_surgery (0), emergency_surgery (6), or no_surgery (5).","required":true,"example":"scheduled_surgery"},{"in":"query","name":"surgery_site","type":"string","enum":["all_others","transplantation","trauma_isolated","trauma_multiple","cabg_no_valve","neurosurgery_cva"],"description":"Anatomical site of surgery as assigned: all_others (0), transplantation (-11), trauma_isolated or trauma_multiple (-8), cabg_no_valve (-6), or neurosurgery_cva (5). One token. magent does not classify a procedure.","required":true,"example":"all_others"},{"in":"query","name":"gcs","type":"integer","description":"Lowest estimated Glasgow Coma Scale, integer 3-15, within ±1 h of ICU admission as assigned by the caller. 3-4 → 15; 5 → 10; 6 → 7; 7-12 → 2; ≥13 → 0. magent does not examine the patient.","required":true,"example":"15"},{"in":"query","name":"bilirubin_mg_dl","type":"number","description":"Highest total bilirubin in mg/dL (0-40). One of bilirubin_mg_dl or bilirubin_umol_l is required. If both are sent, bilirubin_mg_dl is scored. <2 → 0; 2-<6 → 4; ≥6 → 5.","required":false,"example":"0.8"},{"in":"query","name":"bilirubin_umol_l","type":"number","description":"Highest total bilirubin in µmol/L (0-684). Alternate to bilirubin_mg_dl. Ignored when bilirubin_mg_dl is present. <34.2 → 0; 34.2-<102.6 → 4; ≥102.6 → 5. magent does not convert units.","required":false,"example":"14"},{"in":"query","name":"temperature_c","type":"number","description":"Highest body temperature in °C (20-46) within ±1 h as assigned. <35 → 7; ≥35 → 0. The scoresheet has no hyperthermia points. magent does not measure temperature or convert Fahrenheit.","required":true,"example":"37.0"},{"in":"query","name":"creatinine_mg_dl","type":"number","description":"Highest creatinine in mg/dL (0.1-20). One of creatinine_mg_dl or creatinine_umol_l is required. If both are sent, creatinine_mg_dl is scored. <1.2 → 0; 1.2-<2 → 2; 2-<3.5 → 7; ≥3.5 → 8.","required":false,"example":"1.0"},{"in":"query","name":"creatinine_umol_l","type":"number","description":"Highest creatinine in µmol/L (9-1768). Alternate to creatinine_mg_dl. Ignored when creatinine_mg_dl is present. <106.1 → 0; 106.1-<176.8 → 2; 176.8-<309.4 → 7; ≥309.4 → 8. magent does not convert units.","required":false,"example":"88"},{"in":"query","name":"heart_rate","type":"integer","description":"Highest heart rate in beats/min, integer 20-250. <120 → 0; 120-159 → 5; ≥160 → 7. magent does not measure pulse.","required":true,"example":"80"},{"in":"query","name":"leukocytes_g_l","type":"number","description":"Lowest leukocytes in G/L (0.1-200), numerically equal to 10^9/L. <15 → 0; ≥15 → 2. magent does not count cells.","required":true,"example":"8.0"},{"in":"query","name":"arterial_ph","type":"number","description":"Lowest arterial pH (6.5-8.0). ≤7.25 → 3; >7.25 → 0.","required":true,"example":"7.40"},{"in":"query","name":"platelets_g_l","type":"number","description":"Lowest platelets in G/L (0-2000). <20 → 13; 20-<50 → 8; 50-<100 → 5; ≥100 → 0.","required":true,"example":"250"},{"in":"query","name":"systolic_bp_mm_hg","type":"number","description":"Lowest systolic blood pressure in mm Hg (20-300). <40 → 11; 40-<70 → 8; 70-<120 → 3; ≥120 → 0. magent does not measure blood pressure.","required":true,"example":"120"},{"in":"query","name":"mechanical_ventilation","type":"boolean","description":"true if the caller assigns mechanical ventilation at ICU admission. true scores PaO2/FiO2 (pao2_fio2 required). false scores PaO2 (pao2_mm_hg required) and pao2_fio2 is ignored.","required":true,"example":"false"},{"in":"query","name":"pao2_fio2","type":"number","description":"PaO2/FiO2 ratio in mm Hg (10-800). Required when mechanical_ventilation is true. <100 → 11; ≥100 → 7. Ignored when mechanical_ventilation is false. magent does not compute the ratio.","required":false,"example":"250"},{"in":"query","name":"pao2_mm_hg","type":"number","description":"Lowest PaO2 in mm Hg (20-700). Required when mechanical_ventilation is false. <60 → 5; ≥60 → 0. Ignored when mechanical_ventilation is true.","required":false,"example":"90"},{"in":"query","name":"cancer_therapy","type":"boolean","description":"Chemotherapy, other immunosuppression, radiotherapy, or steroid treatment as assigned (+3). Additive with other comorbidity flags. Omit or false → 0.","required":false,"example":"false"},{"in":"query","name":"metastatic_cancer","type":"boolean","description":"Metastatic cancer as assigned (+11). Additive. Omit or false → 0. magent does not diagnose.","required":false,"example":"false"},{"in":"query","name":"hematologic_cancer","type":"boolean","description":"Haematological cancer as assigned (+6). Additive. Omit or false → 0.","required":false,"example":"false"},{"in":"query","name":"chronic_hf_nyha_iv","type":"boolean","description":"Chronic heart failure NYHA class IV as assigned (+6). Additive. Omit or false → 0.","required":false,"example":"false"},{"in":"query","name":"cirrhosis","type":"boolean","description":"Cirrhosis as assigned (+8). Additive with aids. Omit or false → 0.","required":false,"example":"false"},{"in":"query","name":"aids","type":"boolean","description":"AIDS as assigned (+8). Additive with cirrhosis. Omit or false → 0.","required":false,"example":"false"},{"in":"query","name":"rhythm_disturbances","type":"boolean","description":"Cardiovascular reason: rhythm disturbances (-5). If seizures is also true, only -4 is scored. Omit or false → 0.","required":false,"example":"false"},{"in":"query","name":"hypovolemic_shock","type":"boolean","description":"Hypovolemic hemorrhagic or non-hemorrhagic shock as one Box II row (+3). Additive with acute_abdomen. Omit or false → 0.","required":false,"example":"false"},{"in":"query","name":"septic_shock","type":"boolean","description":"Septic shock as a reason for ICU admission (+5). Additive. Omit or false → 0.","required":false,"example":"false"},{"in":"query","name":"anaphylactic_or_mixed_shock","type":"boolean","description":"Anaphylactic, mixed, or undefined shock (+5). Additive. Omit or false → 0.","required":false,"example":"false"},{"in":"query","name":"liver_failure","type":"boolean","description":"Hepatic liver failure as a reason for ICU admission (+6). Omit or false → 0.","required":false,"example":"false"},{"in":"query","name":"severe_pancreatitis","type":"boolean","description":"Severe pancreatitis (+9). Omit or false → 0.","required":false,"example":"false"},{"in":"query","name":"acute_abdomen","type":"boolean","description":"Digestive acute abdomen or other digestive (not pancreatitis) as one Box II row (+3). Additive with hypovolemic_shock. Omit or false → 0.","required":false,"example":"false"},{"in":"query","name":"intracranial_mass_effect","type":"boolean","description":"Neurologic intracranial mass effect (+10). Additive. Omit or false → 0.","required":false,"example":"false"},{"in":"query","name":"focal_neurologic_deficit","type":"boolean","description":"Focal neurologic deficit (+7). Additive. Omit or false → 0.","required":false,"example":"false"},{"in":"query","name":"seizures","type":"boolean","description":"Seizures (-4). If rhythm_disturbances is also true, only -4 is scored. Omit or false → 0.","required":false,"example":"false"},{"in":"query","name":"coma_stupor_agitation","type":"boolean","description":"Coma, stupor, obtunded, agitation, vigilance disturbance, confusion, or delirium (+4). Omit or false → 0.","required":false,"example":"false"},{"in":"query","name":"nosocomial_infection","type":"boolean","description":"Hospital-acquired infection at ICU admission (+4). Additive with respiratory_infection. Omit or false → 0.","required":false,"example":"false"},{"in":"query","name":"respiratory_infection","type":"boolean","description":"Lower respiratory tract infection at ICU admission (+5). Additive with nosocomial_infection. Omit or false → 0.","required":false,"example":"false"}],"errors":[{"code":"invalid_saps_3","message":"SAPS 3 needs Moreno 2005 ICU admission predictors in published ranges. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/saps-3","citation":{"authors":"Moreno RP, Metnitz PGH, Almeida E, et al; SAPS 3 Investigators","doi":"10.1007/s00134-005-2763-5","id":"moreno-2005","pmid":"16132893","source":"Intensive Care Med. 2005;31(10):1345-1355","title":"SAPS 3—From evaluation of the patient to evaluation of the intensive care unit. Part 2: Development of a prognostic model for hospital mortality at ICU admission","url":"https://doi.org/10.1007/s00134-005-2763-5"},"formula_expression":"SAPS 3 = 16 (admission offset) + Box I + Box II + Box III (Moreno 2005 Part 2 scoresheet). Box I: age (<40 → 0, 40-59 → 5, 60-69 → 9, 70-74 → 13, 75-79 → 15, ≥80 → 18); los_days (<14 → 0, 14-27 → 6, ≥28 → 7); location (operating_room → 0, emergency_room → 5, other_icu → 7, other → 8); comorbidities additive (cancer_therapy → 3, metastatic_cancer → 11, hematologic_cancer → 6, chronic_hf_nyha_iv → 6, cirrhosis → 8, aids → 8); vasoactive_drugs → 3. Box II: unplanned ICU admission → 3; reasons additive (rhythm_disturbances → -5, hypovolemic_shock → 3, septic_shock → 5, anaphylactic_or_mixed_shock → 5, liver_failure → 6, severe_pancreatitis → 9, acute_abdomen → 3, intracranial_mass_effect → 10, focal_neurologic_deficit → 7, seizures → -4, coma_stupor_agitation → 4; if rhythm and seizures both, only -4; hypovolemic_shock plus acute_abdomen scores both); surgical_status (scheduled_surgery → 0, emergency_surgery → 6, no_surgery → 5); surgery_site (transplantation → -11, trauma_isolated or trauma_multiple → -8, cabg_no_valve → -6, neurosurgery_cva → 5, all_others → 0); nosocomial_infection → 4, respiratory_infection → 5. Box III within ±1 h as assigned: GCS (3-4 → 15, 5 → 10, 6 → 7, 7-12 → 2, ≥13 → 0); bilirubin_mg_dl (<2 → 0, 2-<6 → 4, ≥6 → 5) or bilirubin_umol_l (<34.2 → 0, 34.2-<102.6 → 4, ≥102.6 → 5); temperature_c (<35 → 7, ≥35 → 0); creatinine_mg_dl (<1.2 → 0, 1.2-<2 → 2, 2-<3.5 → 7, ≥3.5 → 8) or creatinine_umol_l (<106.1 → 0, 106.1-<176.8 → 2, 176.8-<309.4 → 7, ≥309.4 → 8); heart_rate (<120 → 0, 120-159 → 5, ≥160 → 7); leukocytes_g_l (<15 → 0, ≥15 → 2); arterial_ph (≤7.25 → 3, >7.25 → 0); platelets_g_l (<20 → 13, 20-<50 → 8, 50-<100 → 5, ≥100 → 0); systolic_bp_mm_hg (<40 → 11, 40-<70 → 8, 70-<120 → 3, ≥120 → 0); oxygenation (PaO2/FiO2 <100 and MV → 11, PaO2/FiO2 ≥100 and MV → 7, PaO2 <60 and no MV → 5, else 0). logit = -32.6659 + ln(SAPS_3 + 20.5958) × 7.3068; estimated_probability_percent = 100 × exp(logit)/(1+exp(logit)); max 217","purpose":"Compute the Moreno 2005 SAPS 3 admission integer from Box I, Box II, and Box III at ICU admission, then the Part 2 global logit hospital-mortality percent.","markdown_url":"https://magentlab.com/docs/saps-3.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"saps_3"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"SAPS 3 integer 0-217"},{"name":"max_score","type":"integer","description":"Always 217"},{"name":"logit","type":"number","description":"Moreno 2005 Part 2 global logit, 4 decimal places"},{"name":"estimated_probability_percent","type":"number","description":"100*exp(logit)/(1+exp(logit)) from the unrounded logit, 2 decimal places. A percent, not a named class."},{"name":"components","type":"array","description":"Admission offset plus Box I, Box II, and Box III rows"},{"name":"citation","type":"object","description":"Moreno 2005 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"35","arterial_ph":"7.40","bilirubin_mg_dl":"0.8","creatinine_mg_dl":"1.0","gcs":"15","heart_rate":"80","icu_admission":"planned","leukocytes_g_l":"8.0","location":"operating_room","los_days":"1","mechanical_ventilation":"false","pao2_mm_hg":"90","platelets_g_l":"250","surgery_site":"all_others","surgical_status":"scheduled_surgery","systolic_bp_mm_hg":"120","temperature_c":"37.0","vasoactive_drugs":"false"},{"age":"35","arterial_ph":"7.40","bilirubin_mg_dl":"0.8","creatinine_mg_dl":"1.0","gcs":"15","heart_rate":"80","icu_admission":"planned","leukocytes_g_l":"8.0","location":"operating_room","los_days":"1","mechanical_ventilation":"false","pao2_mm_hg":"90","platelets_g_l":"250","surgery_site":"all_others","surgical_status":"scheduled_surgery","systolic_bp_mm_hg":"120","temperature_c":"37.0","vasoactive_drugs":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/saps-3","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/saps-3?age=35&los_days=1&location=operating_room&vasoactive_drugs=false&icu_admission=planned&surgical_status=scheduled_surgery&surgery_site=all_others&gcs=15&bilirubin_mg_dl=0.8&temperature_c=37.0&creatinine_mg_dl=1.0&heart_rate=80&leukocytes_g_l=8.0&arterial_ph=7.40&platelets_g_l=250&systolic_bp_mm_hg=120&mechanical_ventilation=false&pao2_mm_hg=90","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/saps-3","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/braden","description":"Bergstrom 1987 Braden Scale: six caller-assigned subscales — sensory_perception, moisture, activity, mobility, nutrition (each 1-4) and friction_shear (1-3). magent sums only (range 6-23; lower is higher pressure-sore risk) and returns at_risk true iff score ≤16, the only cutoff in that paper's predictive-validity studies. magent does not examine the patient. Not a medical device, not a diagnosis, and not a treatment plan.","parameters":[{"in":"query","name":"sensory_perception","type":"integer","description":"Caller-assigned Bergstrom 1987 Braden sensory perception (integer 1-4): 1 completely limited; 2 very limited; 3 slightly limited; 4 no impairment. magent does not examine the patient.","required":true,"example":"1"},{"in":"query","name":"moisture","type":"integer","description":"Caller-assigned Bergstrom 1987 Braden moisture (integer 1-4): 1 constantly moist; 2 very moist; 3 occasionally moist; 4 rarely moist. magent does not examine the patient.","required":true,"example":"1"},{"in":"query","name":"activity","type":"integer","description":"Caller-assigned Bergstrom 1987 Braden activity (integer 1-4): 1 bedfast; 2 chairfast; 3 walks occasionally; 4 walks frequently. magent does not examine the patient.","required":true,"example":"1"},{"in":"query","name":"mobility","type":"integer","description":"Caller-assigned Bergstrom 1987 Braden mobility (integer 1-4): 1 completely immobile; 2 very limited; 3 slightly limited; 4 no limitations. magent does not examine the patient.","required":true,"example":"1"},{"in":"query","name":"nutrition","type":"integer","description":"Caller-assigned Bergstrom 1987 Braden nutrition (integer 1-4): 1 very poor; 2 probably inadequate; 3 adequate; 4 excellent. magent does not examine the patient.","required":true,"example":"1"},{"in":"query","name":"friction_shear","type":"integer","description":"Caller-assigned Bergstrom 1987 Braden friction and shear (integer 1-3 only): 1 problem; 2 potential problem; 3 no apparent problem. magent does not examine the patient.","required":true,"example":"1"}],"errors":[{"code":"invalid_braden_item","message":"sensory_perception, moisture, activity, mobility, and nutrition must each be 1-4, and friction_shear must be 1-3 (Bergstrom 1987). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/braden","citation":{"authors":"Bergstrom N, Braden BJ, Laguzza A, Holman V","doi":"10.1097/00006199-198707000-00002","id":"bergstrom-1987","pmid":"3299278","source":"Nurs Res. 1987;36(4):205-210","title":"The Braden Scale for Predicting Pressure Sore Risk","url":"https://doi.org/10.1097/00006199-198707000-00002"},"formula_expression":"Braden = sensory_perception + moisture + activity + mobility + nutrition + friction_shear; Bergstrom 1987 caller-assigned points; 1-4 except friction_shear 1-3; range 6-23; at_risk iff score ≤ 16","purpose":"Sum six caller-assigned Bergstrom 1987 Braden Scale subscale points and return at_risk when the total is ≤16.","markdown_url":"https://magentlab.com/docs/braden.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"braden"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Braden Scale points 6-23"},{"name":"max_score","type":"integer","description":"Always 23"},{"name":"at_risk","type":"boolean","description":"true iff Bergstrom 1987 score ≤16 (100% sensitivity cutoff in both predictive-validity studies). Not a diagnosis."},{"name":"components","type":"array","description":"Per-subscale caller-assigned points"},{"name":"citation","type":"object","description":"Bergstrom et al. Nurs Res 1987 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"activity":"1","friction_shear":"1","mobility":"1","moisture":"1","nutrition":"1","sensory_perception":"1"},{"activity":"1","friction_shear":"1","mobility":"1","moisture":"1","nutrition":"1","sensory_perception":"1"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/braden","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/braden?sensory_perception=1&moisture=1&activity=1&mobility=1&nutrition=1&friction_shear=1","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/braden","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/ehmrg","description":"Lee 2012 EHMRG 7-day ED model (Table 3 integer score): 2*age + 60 if EMS transport - min(SBP,160) + clamp(HR,80-120) - 2*min(SpO2,92) + 20*creatinine_mg_dl + K (<=3.9: +5; 4.0-4.5: 0; >=4.6: +30) + 60 if troponin>ULN + 45 if active cancer + 60 if home metolazone + 12. Groups 1/2/3/4/5a/5b. Dialysis-dependent excluded. Not EHMRG30-ST, not ADHERE CART, not a discharge or admission order.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (integer 18-120). Lee 2012 Table 3 adds +2 per year. magent does not assign age.","required":true,"example":"70"},{"in":"query","name":"ems_transport","type":"boolean","description":"Transported by EMS as assigned by the caller (true or false). Lee 2012 Table 3: +60 if true.","required":true,"example":"false"},{"in":"query","name":"systolic_mm_hg","type":"integer","description":"Initial/triage systolic blood pressure in mm Hg (integer 50-250). Lee 2012 Table 3 scores -1 * min(SBP, 160); values above 160 mm Hg are capped. magent does not measure blood pressure.","required":true,"example":"160"},{"in":"query","name":"heart_rate_bpm","type":"integer","description":"Heart rate in beats/min (integer 30-220). Lee 2012 Table 3 scores +1 * clamp(HR, 80, 120): floor 80, ceiling 120. magent does not measure heart rate.","required":true,"example":"80"},{"in":"query","name":"spo2_percent","type":"number","description":"Lowest initial/triage oxygen saturation percent (50-100). Lee 2012 Table 3 scores -2 * min(SpO2, 92); values above 92% are capped. magent does not measure saturation.","required":true,"example":"92"},{"in":"query","name":"creatinine_mg_dl","type":"number","description":"Serum creatinine in mg/dL (0.1-20). Provide this or creatinine_umol_l, not both. Lee 2012 Table 3 adds +20 per mg/dL. magent does not measure creatinine.","required":false,"example":"1.0"},{"in":"query","name":"creatinine_umol_l","type":"number","description":"Serum creatinine in µmol/L (9-1768). Converted as mg/dL = µmol/L / 88.42. Provide this or creatinine_mg_dl, not both.","required":false,"example":"88.4"},{"in":"query","name":"potassium_mmol_l","type":"number","description":"Serum potassium in mmol/L (1.5-8.0). Lee 2012 Table 3: 4.0-4.5 inclusive → 0; >=4.6 → +30; <=3.9 → +5. Unpublished 3.91-3.99 pin with <=3.9; 4.51-4.59 pin with >=4.6. magent does not measure potassium.","required":true,"example":"4.2"},{"in":"query","name":"troponin_gt_uln","type":"boolean","description":"Troponin above the local upper limit of normal as assigned by the caller (true or false). Lee 2012 Table 3: +60 if true.","required":true,"example":"false"},{"in":"query","name":"active_cancer","type":"boolean","description":"Active cancer as assigned by the caller (true or false). Lee 2012 Table 3: +45 if true.","required":true,"example":"false"},{"in":"query","name":"metolazone","type":"boolean","description":"Metolazone at home as assigned by the caller (true or false). Lee 2012 Table 3: +60 if true.","required":true,"example":"false"},{"in":"query","name":"dialysis_dependent","type":"boolean","description":"Dialysis dependence as assigned by the caller (true or false). Lee 2012 excludes dialysis-dependent patients; true returns HTTP 400. magent does not determine dialysis status.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_systolic_bp","message":"systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.","status":400},{"code":"invalid_heart_rate","message":"heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.","status":400},{"code":"invalid_spo2","message":"spo2_percent must be a number from 50 to 100. Returned before settlement; you are not charged.","status":400},{"code":"invalid_creatinine","message":"creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_potassium","message":"potassium_mmol_l must be a number from 1.5 to 8.0. Returned before settlement; you are not charged.","status":400},{"code":"invalid_ehmrg_dialysis","message":"EHMRG is not for dialysis-dependent patients (Lee 2012). dialysis_dependent must be false to score. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/ehmrg","citation":{"authors":"Lee DS, Stitt A, Austin PC, Stukel TA, Schull MJ, Chong A, Newton GE, Lee JS, Tu JV","doi":"10.7326/0003-4819-156-11-201206050-00003","id":"lee-2012","pmid":"22665814","source":"Ann Intern Med. 2012;156(11):767-775","title":"Prediction of heart failure mortality in emergent care: a cohort study","url":"https://doi.org/10.7326/0003-4819-156-11-201206050-00003"},"formula_expression":"ehmrg_score = 2*age_years + 60*(ems_transport) - min(systolic_mm_hg, 160) + clamp(heart_rate_bpm, 80, 120) - 2*min(spo2_percent, 92) + 20*creatinine_mg_dl + K(<=3.9:5, 4.0-4.5:0, >=4.6:30) + 60*(troponin_gt_uln) + 45*(active_cancer) + 60*(metolazone) + 12; Lee 2012 Table 3 7-day ED model; dialysis-dependent excluded; risk_group 1 (score <= -49.1), 2 (-49.0 to -15.9), 3 (-15.8 to 17.9), 4 (18.0 to 56.5), 5a (56.6 to 89.3), 5b (>= 89.4)","purpose":"Compute the Lee 2012 Emergency Heart Failure Mortality Risk Grade 7-day emergency-department integer score from age, EMS transport, initial systolic BP, heart rate, oxygen saturation, creatinine, potassium, troponin above ULN, active cancer, and home metolazone.","markdown_url":"https://magentlab.com/docs/ehmrg.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"ehmrg"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"ehmrg_score","type":"number","description":"Lee 2012 Table 3 7-day ED integer-score sum. Exact arithmetic; may be a float when creatinine is a float."},{"name":"risk_group","type":"string","description":"Lee 2012 derivation cutpoints: 1 if score <= -49.1; 2 if -49.0 to -15.9; 3 if -15.8 to 17.9; 4 if 18.0 to 56.5; 5a if 56.6 to 89.3; 5b if >= 89.4"},{"name":"age_years","type":"integer","description":"Age used, years"},{"name":"ems_transport","type":"boolean","description":"EMS transport flag used"},{"name":"systolic_mm_hg","type":"integer","description":"Initial/triage systolic BP used, mm Hg (capped at 160 for scoring)"},{"name":"heart_rate_bpm","type":"integer","description":"Heart rate used, bpm (scored after clamp 80-120)"},{"name":"spo2_percent","type":"number","description":"Oxygen saturation used, percent (capped at 92 for scoring)"},{"name":"creatinine_mg_dl","type":"number","description":"Serum creatinine used in mg/dL (after µmol/L conversion when supplied)"},{"name":"potassium_mmol_l","type":"number","description":"Serum potassium used, mmol/L"},{"name":"troponin_gt_uln","type":"boolean","description":"Troponin above ULN flag used"},{"name":"active_cancer","type":"boolean","description":"Active cancer flag used"},{"name":"metolazone","type":"boolean","description":"Home metolazone flag used"},{"name":"dialysis_dependent","type":"boolean","description":"Always false on HTTP 200; true is excluded"},{"name":"citation","type":"object","description":"Lee 2012 Annals citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"active_cancer":"false","age":"70","creatinine_mg_dl":"1.0","dialysis_dependent":"false","ems_transport":"false","heart_rate_bpm":"80","metolazone":"false","potassium_mmol_l":"4.2","spo2_percent":"92","systolic_mm_hg":"160","troponin_gt_uln":"false"},{"active_cancer":"false","age":"70","creatinine_mg_dl":"1.0","dialysis_dependent":"false","ems_transport":"false","heart_rate_bpm":"80","metolazone":"false","potassium_mmol_l":"4.2","spo2_percent":"92","systolic_mm_hg":"160","troponin_gt_uln":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/ehmrg","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/ehmrg?age=70&ems_transport=false&systolic_mm_hg=160&heart_rate_bpm=80&spo2_percent=92&creatinine_mg_dl=1.0&potassium_mmol_l=4.2&troponin_gt_uln=false&active_cancer=false&metolazone=false&dialysis_dependent=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/ehmrg","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/pediatric-ett","description":"Cole 1957 uncuffed pediatric endotracheal tube internal diameter: age_years/4 + 4 millimetres. Deterministic published arithmetic with citation; not a device-selection order or length-based tape.","parameters":[{"in":"query","name":"age_years","type":"number","description":"Age in years (0.5-12). Cole uncuffed ID (mm) = age/4 + 4. Not a neonatal-only formula.","required":true,"example":"4"}],"errors":[{"code":"invalid_pediatric_age","message":"age_years must be a number from 0.5 to 12. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/pediatric-ett","citation":{"authors":"Cole F","doi":"10.1001/archpedi.1957.04030070084009","id":"cole-1957","pmid":"13478300","source":"AMA J Dis Child. 1957;94(6):672-673","title":"Pediatric formulas for the anesthesiologist","url":"https://doi.org/10.1001/archpedi.1957.04030070084009"},"formula_expression":"ett_id_mm = age_years / 4 + 4","purpose":"Compute Cole 1957 uncuffed pediatric endotracheal tube internal diameter from age in years.","markdown_url":"https://magentlab.com/docs/pediatric-ett.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"cole_1957"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"age_years","type":"number","description":"Age in years used"},{"name":"ett_id_mm","type":"number","description":"Uncuffed internal diameter in mm, 1 decimal"},{"name":"citation","type":"object","description":"Cole 1957 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age_years":"4"},{"age_years":"4"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/pediatric-ett","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/pediatric-ett?age_years=4","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/pediatric-ett","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/mallampati","description":"Samsoon 1987 modified Mallampati: caller-assigned integer class 1-4 (I: soft palate, fauces, uvula, pillars; II: soft palate, fauces, uvula; III: soft palate, base of uvula; IV: soft palate not visible). Returns score, max 4, and a stable class label. Not original Mallampati 1985 three-class and not a Cormack-Lehane grade; magent does not look in the mouth or assign an intubation order.","parameters":[{"in":"query","name":"mallampati","type":"integer","description":"Samsoon 1987 modified Mallampati class 1-4 as assigned by the caller (1: soft palate, fauces, uvula, pillars; 2: soft palate, fauces, uvula; 3: soft palate, base of uvula; 4: soft palate not visible at all). Not original Mallampati 1985 three-class. Not a Cormack-Lehane grade. magent does not look in the mouth.","required":true,"example":"1"}],"errors":[{"code":"invalid_mallampati","message":"mallampati must be 1, 2, 3, or 4 (Samsoon 1987 modified Mallampati). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/mallampati","citation":{"authors":"Samsoon GLT, Young JRB","doi":"10.1111/j.1365-2044.1987.tb04039.x","id":"samsoon-1987","pmid":"3592174","source":"Anaesthesia. 1987;42(5):487-490","title":"Difficult tracheal intubation: a retrospective study","url":"https://doi.org/10.1111/j.1365-2044.1987.tb04039.x"},"formula_expression":"Modified Mallampati = caller-assigned integer class 1-4 (Samsoon 1987). Max 4","purpose":"Return the Samsoon 1987 modified Mallampati class 1-4 from a caller-assigned integer, with a stable label.","markdown_url":"https://magentlab.com/docs/mallampati.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"mallampati"},{"name":"formula_expression","type":"string","description":"Published modified Mallampati class rule"},{"name":"score","type":"integer","description":"Same as mallampati (1-4)"},{"name":"max_score","type":"integer","description":"4"},{"name":"mallampati","type":"integer","description":"Caller-assigned Samsoon 1987 modified Mallampati class 1-4"},{"name":"mallampati_label","type":"string","description":"Stable token for that class: class_1, class_2, class_3, or class_4"},{"name":"components","type":"array","description":"mallampati component"},{"name":"citation","type":"object","description":"Samsoon 1987"},{"name":"disclaimer","type":"string","description":"Not a medical device"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"mallampati":"1"},{"mallampati":"1"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/mallampati","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/mallampati?mallampati=1","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/mallampati","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/asa-physical-status","description":"ASA Physical Status Classification System (ASA House of Delegates 2014, last amended 2020). Caller-assigned class 1-6 plus optional emergency suffix E. Returns asa_label (e.g. 1 or 2E) and the published class definition. Classification alone does not predict perioperative risk. Not an anesthetic plan, not Gupta MICA, not Mallampati. magent does not examine the patient.","parameters":[{"in":"query","name":"asa_class","type":"integer","description":"ASA Physical Status class 1-6 as assigned by the caller (1 a normal healthy patient; 2 mild systemic disease; 3 severe systemic disease; 4 severe systemic disease that is a constant threat to life; 5 moribund, not expected to survive without the operation; 6 declared brain-dead organ donor). Not Gupta 2011 MICA (ASA 1-5). magent does not examine the patient.","required":true,"example":"1"},{"in":"query","name":"emergency","type":"boolean","description":"true appends E for emergency surgery: delay in treatment of the patient would lead to a significant increase in the threat to life or body part (ASA 2014/2020). Required. Class 6 may still take E. magent does not examine the patient.","required":true,"example":"false"}],"errors":[{"code":"invalid_asa_physical_status","message":"asa_class must be an integer from 1 to 6 (ASA Physical Status 2014/2020). Do not use Gupta 2011 invalid_asa_class (1-5). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/asa-physical-status","citation":{"authors":"American Society of Anesthesiologists; Committee of Oversight: Economics","id":"asa-2020","source":"Approved by the ASA House of Delegates on October 15, 2014, and last amended on December 13, 2020","title":"ASA Physical Status Classification System","url":"https://www.asahq.org/standards-and-practice-parameters/statement-on-asa-physical-status-classification-system"},"formula_expression":"Caller-assigned ASA Physical Status class 1-6; append E when emergency is true (ASA House of Delegates 2014, last amended 2020)","purpose":"Return the caller-assigned ASA Physical Status class 1-6 with optional emergency suffix E and the published class definition (ASA 2014, last amended 2020).","markdown_url":"https://magentlab.com/docs/asa-physical-status.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"asa_physical_status"},{"name":"formula_expression","type":"string","description":"Published ASA Physical Status class-plus-E rule"},{"name":"asa_class","type":"integer","description":"Caller-assigned class 1-6"},{"name":"emergency","type":"boolean","description":"true when the caller assigns the emergency suffix E"},{"name":"asa_label","type":"string","description":"Class as a string; E is appended when emergency is true (e.g. 1 or 2E)"},{"name":"description","type":"string","description":"ASA 2014/2020 definition for that class"},{"name":"components","type":"array","description":"asa_class and emergency criterion rows"},{"name":"citation","type":"object","description":"ASA Physical Status 2014/2020"},{"name":"disclaimer","type":"string","description":"Not a medical device"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"asa_class":"1","emergency":"false"},{"asa_class":"1","emergency":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/asa-physical-status","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/asa-physical-status?asa_class=1&emergency=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/asa-physical-status","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/em-mdm","description":"2023 emergency medical decision making from AMA CPT Table 1 as reprinted by ACEP. Caller assigns problems, data, and risk as straightforward, low, moderate, or high. Overall MDM is the highest level at which at least 2 of 3 elements are met or exceeded. Not a bill or CPT assignment. magent does not code the chart.","parameters":[{"in":"query","name":"problems","type":"string","enum":["straightforward","low","moderate","high"],"description":"Caller-assigned number and complexity of problems addressed using the printed 2023 MDM column labels straightforward, low, moderate, or high (AMA CPT 2023 Table 1 as reprinted by ACEP). straightforward is the table's minimal column (1 self-limited or minor problem). low includes 1 stable chronic illness, 2 or more self-limited or minor problems, or 1 acute uncomplicated illness or injury. magent does not code the chart.","required":true,"example":"low"},{"in":"query","name":"data","type":"string","enum":["straightforward","low","moderate","high"],"description":"Caller-assigned amount and/or complexity of data to be reviewed and analyzed using the printed 2023 MDM column labels straightforward, low, moderate, or high. straightforward is the table's minimal or none column; low is limited; moderate is moderate; high is extensive. magent does not count tests, notes, or independent historians.","required":true,"example":"low"},{"in":"query","name":"risk","type":"string","enum":["straightforward","low","moderate","high"],"description":"Caller-assigned risk of complications and/or morbidity of management using the printed 2023 MDM column labels straightforward, low, moderate, or high (straightforward is the table's minimal risk column). magent does not determine risk from the record.","required":true,"example":"low"}],"errors":[{"code":"invalid_em_mdm","message":"2023 emergency MDM inputs must match the printed problems, data, and risk columns. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/em-mdm","citation":{"authors":"American Medical Association; American College of Emergency Physicians","id":"acep-2023-em-mdm","source":"AMA CPT 2023 Table 1, Levels of Medical Decision Making, effective January 1, 2023. ACEP reprint.","title":"CPT Evaluation and Management (E/M) Code and Guideline Changes","url":"https://www.acep.org/siteassets/sites/acep/media/reimbursement/2023-e-m-descriptors-guidelines.pdf"},"formula_expression":"Caller-assigned number and complexity of problems addressed, amount and/or complexity of data, and risk of complications and/or morbidity of management using the printed 2023 MDM column labels straightforward, low, moderate, and high; overall MDM is the highest level at which at least 2 of 3 elements are met or exceeded (AMA CPT 2023 Table 1 as reprinted by ACEP)","purpose":"Return the 2023 overall medical decision making level from caller-assigned problems, data, and risk using AMA CPT Table 1 as reprinted by ACEP (highest level at which at least 2 of 3 elements are met or exceeded).","markdown_url":"https://magentlab.com/docs/em-mdm.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"em_mdm"},{"name":"formula_expression","type":"string","description":"Published 2023 MDM 2-of-3 met-or-exceeded rule"},{"name":"problems","type":"string","description":"Caller-assigned problems-addressed column: straightforward, low, moderate, or high"},{"name":"data","type":"string","description":"Caller-assigned data column: straightforward, low, moderate, or high"},{"name":"risk","type":"string","description":"Caller-assigned risk column: straightforward, low, moderate, or high"},{"name":"mdm","type":"string","description":"Overall MDM: highest of straightforward, low, moderate, or high at which at least 2 of 3 elements are met or exceeded"},{"name":"description","type":"string","description":"Published 2023 wording for that overall MDM type"},{"name":"components","type":"array","description":"problems, data, and risk criterion rows; met is true when that element meets or exceeds overall MDM"},{"name":"citation","type":"object","description":"ACEP reprint of AMA CPT 2023 Table 1"},{"name":"disclaimer","type":"string","description":"Not a medical device"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"data":"low","problems":"low","risk":"low"},{"data":"low","problems":"low","risk":"low"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/em-mdm","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/em-mdm?problems=low&data=low&risk=low","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/em-mdm","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/care","description":"Cardiac Anesthesia Risk Evaluation (CARE) score (Dupuis 2001). Caller-assigned class 1-5; emergency suffix E only for classes 3-5 (labels 3E, 4E, 5E). Returns care_label plus Dupuis 2001 Table 4 in-hospital mortality and morbidity percents from the Ottawa reference population. Not an anesthetic plan or surgical booking. magent does not examine the patient. Not Parsonnet, EuroSCORE, or Gupta MICA.","parameters":[{"in":"query","name":"care_class","type":"integer","description":"Dupuis 2001 CARE class 1-5 as assigned by the caller (1 stable cardiac disease, no other medical problem, noncomplex surgery; 2 stable cardiac disease, one or more controlled medical problems, noncomplex surgery; 3 any uncontrolled medical problem or complex surgery; 4 uncontrolled medical problem and complex surgery; 5 chronic or advanced cardiac disease, surgery as last hope). magent does not examine the patient.","required":true,"example":"1"},{"in":"query","name":"emergency","type":"boolean","description":"true appends E for emergency surgery as soon as the diagnosis is made and an operating room is available (Dupuis 2001). Required. E applies only to classes 3-5 (labels 3E, 4E, 5E). Class 1 or 2 with emergency true is rejected. Unstable conditions needing surgery within 24 h but not immediately are uncontrolled medical problems, not E. magent does not examine the patient.","required":true,"example":"false"}],"errors":[{"code":"invalid_care","message":"CARE class must be a caller-assigned integer 1-5; emergency E applies only to classes 3-5 (Dupuis 2001). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/care","citation":{"authors":"Dupuis JY, Wang F, Nathan H, Lam M, Grimes S, Bourke M","doi":"10.1097/00000542-200102000-00006","id":"dupuis-2001","pmid":"11176081","source":"Anesthesiology. 2001;94(2):194-204","title":"The cardiac anesthesia risk evaluation score: a clinically useful predictor of mortality and morbidity after cardiac surgery","url":"https://doi.org/10.1097/00000542-200102000-00006"},"formula_expression":"Caller-assigned CARE class 1-5; append E when emergency is true for classes 3-5 only (Dupuis 2001). Emergency never applies to CARE 1 or 2.","purpose":"Return the caller-assigned Cardiac Anesthesia Risk Evaluation (CARE) class 1-5 with optional emergency suffix E for classes 3-5 and Dupuis 2001 Table 4 mortality and morbidity percents.","markdown_url":"https://magentlab.com/docs/care.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"care"},{"name":"formula_expression","type":"string","description":"Published Dupuis 2001 class-plus-E rule"},{"name":"care_class","type":"integer","description":"Caller-assigned class 1-5"},{"name":"emergency","type":"boolean","description":"true when the caller assigns the emergency suffix E (classes 3-5 only)"},{"name":"care_label","type":"string","description":"Class as a string; E is appended when emergency is true (e.g. 1 or 3E)"},{"name":"description","type":"string","description":"Dupuis 2001 Table 1 wording for that class"},{"name":"mortality_percent","type":"number","description":"Dupuis 2001 Table 4 in-hospital mortality percent (Ottawa reference population logistic regression)"},{"name":"morbidity_percent","type":"number","description":"Dupuis 2001 Table 4 morbidity percent (Ottawa reference population logistic regression)"},{"name":"components","type":"array","description":"care_class and emergency criterion rows"},{"name":"citation","type":"object","description":"Dupuis 2001"},{"name":"disclaimer","type":"string","description":"Not a medical device"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"care_class":"1","emergency":"false"},{"care_class":"1","emergency":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/care","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/care?care_class=1&emergency=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/care","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/egri","description":"El-Ganzouri 1996 simplified airway risk index (0/1/2): mouth opening >4 cm=0, <=4=1; thyromental >6.5 cm=0, 6.0-6.5=1, <6.0=2; original Mallampati 1/2/3 = 0/1/2 (class 4 not used); neck >90 deg=0, 80-90=1, <80=2; can prognath true=0, false=1; weight <90 kg=0, 90-110=1, >110=2; intubation history none/questionable/definite = 0/1/2. Max 12. High risk if score >=4. Not an intubation order; magent does not examine the airway.","parameters":[{"in":"query","name":"mouth_opening_cm","type":"number","description":"Interincisor gap in centimetres (0.5-10) as assigned by the caller. El-Ganzouri 1996: >4 cm scores 0; <=4 cm scores 1. Exactly 4.0 scores 1. magent does not measure mouth opening.","required":true,"example":"5"},{"in":"query","name":"thyromental_cm","type":"number","description":"Thyromental distance in centimetres (2-15) as assigned by the caller. El-Ganzouri 1996: >6.5 cm scores 0; 6.0-6.5 inclusive scores 1; <6.0 cm scores 2. Exactly 6.5 scores 1.","required":true,"example":"7"},{"in":"query","name":"mallampati","type":"integer","description":"Original Mallampati class 1, 2, or 3 as assigned by the caller (El-Ganzouri 1996). 1 scores 0; 2 scores 1; 3 scores 2. Samsoon class 4 is not used and is rejected.","required":true,"example":"1"},{"in":"query","name":"neck_movement_deg","type":"number","description":"Head and neck range of motion in degrees (0-180) as assigned by the caller. El-Ganzouri 1996: >90 scores 0; 80-90 inclusive scores 1; <80 scores 2. Exactly 90 scores 1. magent does not measure neck motion.","required":true,"example":"100"},{"in":"query","name":"can_prognath","type":"boolean","description":"Ability to prognath (jaw protrusion) as assigned by the caller (El-Ganzouri 1996). true scores 0; false scores 1. true or false.","required":true,"example":"true"},{"in":"query","name":"weight_kg","type":"number","description":"Body weight in kilograms (1-500). Provide weight_kg or weight_lb. El-Ganzouri 1996: <90 kg scores 0; 90-110 inclusive scores 1; >110 kg scores 2. Exactly 90 and 110 score 1.","required":false,"example":"70"},{"in":"query","name":"weight_lb","type":"number","description":"Body weight in pounds (2-1100). Converted as kg = lb × 0.45359237, then the El-Ganzouri 1996 kg bands apply. Provide weight_kg or weight_lb.","required":false,"example":"154"},{"in":"query","name":"history_difficult_intubation","type":"string","enum":["none","questionable","definite"],"description":"History of difficult intubation as assigned by the caller (El-Ganzouri 1996): none scores 0, questionable scores 1, definite scores 2.","required":true,"example":"none"}],"errors":[{"code":"invalid_mouth_opening","message":"mouth_opening_cm must be a number from 0.5 to 10 (El-Ganzouri 1996 interincisor gap). Returned before settlement; you are not charged.","status":400},{"code":"invalid_thyromental","message":"thyromental_cm must be a number from 2 to 15 (El-Ganzouri 1996 thyromental distance). Returned before settlement; you are not charged.","status":400},{"code":"invalid_egri_mallampati","message":"mallampati must be 1, 2, or 3 (El-Ganzouri 1996 original Mallampati; Samsoon class 4 is not used). Returned before settlement; you are not charged.","status":400},{"code":"invalid_neck_movement","message":"neck_movement_deg must be a number from 0 to 180 (El-Ganzouri 1996 head/neck range of motion). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_weight","message":"weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_intubation_history","message":"history_difficult_intubation must be none, questionable, or definite (El-Ganzouri 1996). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/egri","citation":{"authors":"el-Ganzouri AR, McCarthy RJ, Tuman KJ, Tanck EN, Ivankovich AD","doi":"10.1097/00000539-199606000-00017","id":"el-ganzouri-1996","pmid":"8638791","source":"Anesth Analg. 1996;82(6):1197-1204","title":"Preoperative airway assessment: predictive value of a multivariate risk index","url":"https://doi.org/10.1097/00000539-199606000-00017"},"formula_expression":"EGRI = mouth_opening (>4 cm: 0, <=4 cm: 1) + thyromental (>6.5 cm: 0, 6.0-6.5: 1, <6.0: 2) + mallampati (1: 0, 2: 1, 3: 2) + neck_movement (>90 deg: 0, 80-90: 1, <80: 2) + can_prognath (true: 0, false: 1) + weight (<90 kg: 0, 90-110: 1, >110: 2) + history_difficult_intubation (none: 0, questionable: 1, definite: 2); max 12; high_risk if score >= 4","purpose":"Sum the El-Ganzouri 1996 simplified airway risk index (seven 0/1/2 items; max 12) and return high_risk when the score is 4 or more.","markdown_url":"https://magentlab.com/docs/egri.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"egri"},{"name":"formula_expression","type":"string","description":"El-Ganzouri 1996 simplified airway risk index"},{"name":"score","type":"integer","description":"EGRI points 0-12"},{"name":"max_score","type":"integer","description":"12"},{"name":"high_risk","type":"boolean","description":"true iff score >= 4 (El-Ganzouri 1996 simplified index value of four for Grade IV vs Mallampati III). Not an intubation order."},{"name":"egri_band","type":"string","description":"lt_4 when score < 4; gte_4 when score >= 4"},{"name":"mouth_opening_cm","type":"number","description":"Caller-assigned interincisor gap in centimetres"},{"name":"thyromental_cm","type":"number","description":"Caller-assigned thyromental distance in centimetres"},{"name":"mallampati","type":"integer","description":"Caller-assigned original Mallampati class 1-3"},{"name":"neck_movement_deg","type":"number","description":"Caller-assigned head/neck range of motion in degrees"},{"name":"can_prognath","type":"boolean","description":"Caller-assigned ability to prognath"},{"name":"weight_kg","type":"number","description":"Weight in kilograms after optional lb conversion"},{"name":"history_difficult_intubation","type":"string","description":"none, questionable, or definite"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"el-Ganzouri et al. Anesth Analg 1996 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"can_prognath":"true","history_difficult_intubation":"none","mallampati":"1","mouth_opening_cm":"5","neck_movement_deg":"100","thyromental_cm":"7","weight_kg":"70"},{"can_prognath":"true","history_difficult_intubation":"none","mallampati":"1","mouth_opening_cm":"5","neck_movement_deg":"100","thyromental_cm":"7","weight_kg":"70"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/egri","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/egri?mouth_opening_cm=5&thyromental_cm=7&mallampati=1&neck_movement_deg=100&can_prognath=true&weight_kg=70&history_difficult_intubation=none","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/egri","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/heaven","description":"Davis 2017 HEAVEN criteria from six caller-assigned flags: hypoxemia (SpO2 ≤93% at initial laryngoscopy as assigned), extremes of size (pediatric ≤8 years or clinical obesity as assigned), anatomic challenges, vomit/blood/fluid, exsanguination, and limited neck mobility. high_risk iff any is true; criteria_met is the count of true flags (0-6); low_risk iff none. Not an intubation order. magent does not measure SpO2 or examine the airway. Not Mallampati, not EGRI.","parameters":[{"in":"query","name":"hypoxemia","type":"boolean","description":"Hypoxemia (SpO2 ≤93% at initial laryngoscopy) as assigned by the caller (Davis 2017). true is a HEAVEN flag. magent does not measure SpO2.","required":true,"example":"false"},{"in":"query","name":"extremes_of_size","type":"boolean","description":"Extremes of size (pediatric ≤8 years or clinical obesity) as assigned by the caller (Davis 2017). true is a HEAVEN flag. magent does not examine the patient or assign age.","required":true,"example":"false"},{"in":"query","name":"anatomic_challenges","type":"boolean","description":"Anatomic challenges that limit laryngoscopy as assigned by the caller (Davis 2017). true is a HEAVEN flag. magent does not examine the airway.","required":true,"example":"false"},{"in":"query","name":"vomit_blood_fluid","type":"boolean","description":"Vomit, blood, or fluid in the pharynx or hypopharynx as assigned by the caller (Davis 2017). true is a HEAVEN flag. magent does not examine the airway.","required":true,"example":"false"},{"in":"query","name":"exsanguination","type":"boolean","description":"Exsanguination (suspected anemia that would accelerate desaturation) as assigned by the caller (Davis 2017). true is a HEAVEN flag. magent does not assay hemoglobin.","required":true,"example":"false"},{"in":"query","name":"neck_mobility_limited","type":"boolean","description":"Limited neck mobility as assigned by the caller (Davis 2017). true is a HEAVEN flag. magent does not examine the neck.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/heaven","citation":{"authors":"Davis DP, Olvera DJ","doi":"10.1016/j.amj.2017.04.001","id":"davis-2017","pmid":"28739243","source":"Air Med J. 2017;36(4):195-197","title":"HEAVEN Criteria: Derivation of a New Difficult Airway Prediction Tool","url":"https://doi.org/10.1016/j.amj.2017.04.001"},"formula_expression":"high_risk iff hypoxemia or extremes_of_size or anatomic_challenges or vomit_blood_fluid or exsanguination or neck_mobility_limited; low_risk iff not high_risk; criteria_met is the count of those six flags that are true (Davis 2017 HEAVEN; high_risk iff any of six caller-assigned flags)","purpose":"Apply the Davis 2017 HEAVEN criteria from six caller-assigned flags and return high_risk iff any is true, plus the count of criteria met (0-6).","markdown_url":"https://magentlab.com/docs/heaven.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"heaven"},{"name":"formula_expression","type":"string","description":"Davis 2017 HEAVEN: high_risk if any of the six caller-assigned flags; criteria_met is the count of true flags (0-6)"},{"name":"high_risk","type":"boolean","description":"true iff any of the six flags is true. Derivation: all failed first-attempt patients had ≥1 HEAVEN criterion. Not an intubation order."},{"name":"low_risk","type":"boolean","description":"true iff none of the six flags is true (not high_risk)"},{"name":"criteria_met","type":"integer","description":"Count of the six HEAVEN flags that are true (0-6)"},{"name":"criteria","type":"array","description":"Per-flag rows plus high_risk_any (met iff any of the six flags is true)"},{"name":"citation","type":"object","description":"Davis 2017 Air Med J citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"anatomic_challenges":"false","exsanguination":"false","extremes_of_size":"false","hypoxemia":"false","neck_mobility_limited":"false","vomit_blood_fluid":"false"},{"anatomic_challenges":"false","exsanguination":"false","extremes_of_size":"false","hypoxemia":"false","neck_mobility_limited":"false","vomit_blood_fluid":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/heaven","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/heaven?hypoxemia=false&extremes_of_size=false&anatomic_challenges=false&vomit_blood_fluid=false&exsanguination=false&neck_mobility_limited=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/heaven","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/c-diva","description":"Bell 2023 C-DIVA from four caller-assigned 0-2 domains (visual appearance, palpable sites, history of difficult access, clinical factors) using that paper's Figure 1 0/1/2 descriptors. magent sums only (max 8) and returns Figure 1 bands low (0-3), medium (4-5), or high (6-8). magent does not examine veins or insert a catheter. Not a vascular-access order, not a medical device.","parameters":[{"in":"query","name":"visual_appearance","type":"integer","description":"Caller-assigned Bell 2023 Figure 1 visual appearance (integer 0-2): 0 many visible veins; 1 few visible veins; 2 no visible veins. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"palpable_sites","type":"integer","description":"Caller-assigned Bell 2023 Figure 1 palpable sites (integer 0-2): 0 many palpable veins; 1 few palpable veins; 2 no palpable veins. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"history_of_difficult_access","type":"integer","description":"Caller-assigned Bell 2023 Figure 1 history of difficult access (integer 0-2): 0 no difficulty; 1 reported difficulty or recent missed attempts; 2 history of major difficulty as evidenced by previous central lines or PICCs. magent does not take a history.","required":true,"example":"0"},{"in":"query","name":"clinical_factors","type":"integer","description":"Caller-assigned Bell 2023 Figure 1 clinical factors (integer 0-2): 0 not applicable; 1 pediatric patients or urgent conditions (ESI 3-4); 2 comorbidities or emergency conditions (ESI 1-2). magent does not assign ESI or examine the patient.","required":true,"example":"0"}],"errors":[{"code":"invalid_c_diva","message":"C-DIVA needs the published vein-visibility, palpability, access-history, and clinical-factor scores. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/c-diva","citation":{"authors":"Bell JA, Campos C, Moureau N","doi":"10.29011/2688-9501.101414","id":"bell-2023","source":"Int J Nurs Health Care Res. 2023;6:1414","title":"Validation and Reliability of the Comprehensive Difficult IV Access Scoring Tool","url":"https://doi.org/10.29011/2688-9501.101414"},"formula_expression":"C-DIVA = visual_appearance + palpable_sites + history_of_difficult_access + clinical_factors; each caller-assigned 0-2 (Bell 2023 Figure 1); max 8","purpose":"Sum four caller-assigned Bell 2023 C-DIVA integers (0-2) and return the published total (max 8) and Figure 1 low/medium/high risk band.","markdown_url":"https://magentlab.com/docs/c-diva.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"c_diva"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"C-DIVA points 0-8"},{"name":"max_score","type":"integer","description":"Always 8"},{"name":"c_diva_band","type":"string","description":"Bell 2023 Figure 1 risk group: low (0-3), medium (4-5), or high (6-8). A score band, not a vascular-access or treatment order."},{"name":"components","type":"array","description":"Per-domain caller-assigned points"},{"name":"citation","type":"object","description":"Bell et al. Int J Nurs Health Care Res 2023 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"clinical_factors":"0","history_of_difficult_access":"0","palpable_sites":"0","visual_appearance":"0"},{"clinical_factors":"0","history_of_difficult_access":"0","palpable_sites":"0","visual_appearance":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/c-diva","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/c-diva?visual_appearance=0&palpable_sites=0&history_of_difficult_access=0&clinical_factors=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/c-diva","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/aldrete","description":"Aldrete 1970 postanesthetic recovery score from five caller-assigned 0-2 signs (activity, respiration, circulation, consciousness, color), summed to 0-10. Returns 0_to_7 (close observation), 8_to_9 (acceptable for recovery-room discharge to the ward), or 10 (ideal). Deterministic published score with citation; not the 1995 SpO2 revision; not PADSS; not a discharge order.","parameters":[{"in":"query","name":"activity","type":"integer","description":"Muscle activity (Aldrete 1970). Integer 0, 1, or 2 as assigned by the caller. 2 = moves 4 extremities voluntarily or on command; 1 = 2 extremities; 0 = none. magent does not examine the patient.","required":true,"example":"2"},{"in":"query","name":"respiration","type":"integer","description":"Respiration (Aldrete 1970). Integer 0, 1, or 2 as assigned by the caller. 2 = able to deep breathe and cough freely; 1 = dyspnea or limited breathing; 0 = apneic. magent does not auscultate.","required":true,"example":"2"},{"in":"query","name":"circulation","type":"integer","description":"Circulation (Aldrete 1970). Integer 0, 1, or 2 as assigned by the caller. 2 = BP within 20% of preanesthetic level; 1 = BP 20-50% of preanesthetic; 0 = BP 50% or more from preanesthetic. magent does not measure blood pressure.","required":true,"example":"2"},{"in":"query","name":"consciousness","type":"integer","description":"Consciousness (Aldrete 1970). Integer 0, 1, or 2 as assigned by the caller. 2 = fully awake; 1 = arousable on calling; 0 = not responding. magent does not examine the patient.","required":true,"example":"2"},{"in":"query","name":"color","type":"integer","description":"Color (Aldrete 1970). Integer 0, 1, or 2 as assigned by the caller. 2 = pink; 1 = pale, dusky, blotchy, jaundiced, or other; 0 = cyanotic. Not the 1995 SpO2 revision. magent does not observe skin color.","required":true,"example":"2"}],"errors":[{"code":"invalid_aldrete_component","message":"activity, respiration, circulation, consciousness, and color must each be 0, 1, or 2 (Aldrete 1970). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/aldrete","citation":{"authors":"Aldrete JA, Kroulik D","doi":"10.1213/00000539-197011000-00020","id":"aldrete-1970","pmid":"5534693","source":"Anesth Analg. 1970;49(6):924-934","title":"A postanesthetic recovery score","url":"https://doi.org/10.1213/00000539-197011000-00020"},"formula_expression":"Aldrete = activity + respiration + circulation + consciousness + color; each 0-2; max 10; 8-9 acceptable for recovery-room discharge to ward; 10 ideal; 0-7 close observation (Aldrete 1970)","purpose":"Compute the Aldrete 1970 postanesthetic recovery score as the sum of five caller-assigned 0-2 signs (activity, respiration, circulation, consciousness, color) and return the 1970 recovery-room band.","markdown_url":"https://magentlab.com/docs/aldrete.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"aldrete"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Total points 0-10"},{"name":"max_score","type":"integer","description":"Always 10"},{"name":"category","type":"string","description":"Aldrete 1970 recovery-room band: 0_to_7 (continuous close observation), 8_to_9 (acceptable for discharge from the recovery room to the ward), or 10 (ideal). Not a discharge order."},{"name":"components","type":"array","description":"Per-sign points"},{"name":"citation","type":"object","description":"Anesth Analg 1970 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"activity":"2","circulation":"2","color":"2","consciousness":"2","respiration":"2"},{"activity":"2","circulation":"2","color":"2","consciousness":"2","respiration":"2"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/aldrete","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/aldrete?activity=2&respiration=2&circulation=2&consciousness=2&color=2","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/aldrete","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/westley-croup","description":"Westley 1978 croup score from five caller-assigned signs (consciousness 0/5, cyanosis 0/4/5, stridor 0-2, air entry 0-2, retractions 0-3; max 17). Deterministic published score with citation. Not a diagnosis; magent does not invent total-score severity bands.","parameters":[{"in":"query","name":"consciousness","type":"integer","description":"Westley 1978 level of consciousness: 0 normal, 5 disoriented. Caller-assigned.","required":true,"example":"0"},{"in":"query","name":"cyanosis","type":"integer","description":"Cyanosis: 0 none, 4 with agitation, 5 at rest. Caller-assigned.","required":true,"example":"0"},{"in":"query","name":"stridor","type":"integer","description":"Stridor: 0 none, 1 with agitation, 2 at rest. Caller-assigned.","required":true,"example":"1"},{"in":"query","name":"air_entry","type":"integer","description":"Air entry: 0 normal, 1 decreased, 2 markedly decreased. Caller-assigned.","required":true,"example":"0"},{"in":"query","name":"retractions","type":"integer","description":"Chest-wall retractions: 0 none, 1 mild, 2 moderate, 3 severe. Caller-assigned.","required":true,"example":"1"}],"errors":[{"code":"invalid_westley_consciousness","message":"consciousness must be 0 (normal) or 5 (disoriented). Returned before settlement; you are not charged.","status":400},{"code":"invalid_westley_cyanosis","message":"cyanosis must be 0 (none), 4 (with agitation), or 5 (at rest). Returned before settlement; you are not charged.","status":400},{"code":"invalid_westley_stridor","message":"stridor must be 0 (none), 1 (with agitation), or 2 (at rest). Returned before settlement; you are not charged.","status":400},{"code":"invalid_westley_air_entry","message":"air_entry must be 0 (normal), 1 (decreased), or 2 (markedly decreased). Returned before settlement; you are not charged.","status":400},{"code":"invalid_westley_retractions","message":"retractions must be 0 (none), 1 (mild), 2 (moderate), or 3 (severe). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/westley-croup","citation":{"authors":"Westley CR, Cotton EK, Brooks JG","doi":"10.1001/archpedi.1978.02120300044008","id":"westley-1978","pmid":"347921","source":"Am J Dis Child. 1978;132(5):484-487","title":"Nebulized racemic epinephrine by IPPB for the treatment of croup: a double-blind study","url":"https://doi.org/10.1001/archpedi.1978.02120300044008"},"formula_expression":"Westley = consciousness + cyanosis + stridor + air_entry + retractions; max 17","purpose":"Sum the Westley 1978 croup clinical score from caller-assigned consciousness, cyanosis, stridor, air entry, and retractions (maximum 17).","markdown_url":"https://magentlab.com/docs/westley-croup.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"westley_croup"},{"name":"formula_expression","type":"string","description":"Westley 1978 sum"},{"name":"score","type":"integer","description":"Total 0-17"},{"name":"max_score","type":"integer","description":"17"},{"name":"consciousness","type":"integer","description":"0 or 5"},{"name":"cyanosis","type":"integer","description":"0, 4, or 5"},{"name":"stridor","type":"integer","description":"0-2"},{"name":"air_entry","type":"integer","description":"0-2"},{"name":"retractions","type":"integer","description":"0-3"},{"name":"components","type":"array","description":"Per-sign points"},{"name":"citation","type":"object","description":"Westley 1978"},{"name":"disclaimer","type":"string","description":"Not a medical device"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"air_entry":"0","consciousness":"0","cyanosis":"0","retractions":"1","stridor":"1"},{"air_entry":"0","consciousness":"0","cyanosis":"0","retractions":"1","stridor":"1"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/westley-croup","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/westley-croup?consciousness=0&cyanosis=0&stridor=1&air_entry=0&retractions=1","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/westley-croup","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/cheops","description":"McGrath 1985 CHEOPS from six caller-assigned observational categories (cry 1-3; facial 0-2; child_verbal 0-2; torso, touch, and legs 1-2). magent sums only (published range 4-13) and does not observe the child. No invented analgesic cutoffs. Not a pain diagnosis or analgesic order. Not FLACC. Not BOPS.","parameters":[{"in":"query","name":"cry","type":"integer","description":"Caller-assigned McGrath 1985 CHEOPS cry (integer 1-3; 0 is not published): 1 no crying; 2 moaning or crying; 3 scream. magent does not observe the child.","required":true,"example":"1"},{"in":"query","name":"facial","type":"integer","description":"Caller-assigned McGrath 1985 CHEOPS facial (integer 0-2): 0 smiling; 1 composed/neutral; 2 grimace. magent does not observe the child.","required":true,"example":"0"},{"in":"query","name":"child_verbal","type":"integer","description":"Caller-assigned McGrath 1985 CHEOPS child verbal (integer 0-2): 0 positive statements; 1 none or other non-pain complaints; 2 pain complaints (both-complaints also 2; there is no published 3). magent does not observe the child.","required":true,"example":"0"},{"in":"query","name":"torso","type":"integer","description":"Caller-assigned McGrath 1985 CHEOPS torso (integer 1-2; 0 is not published): 1 neutral/resting; 2 shifting, tense, shivering, upright, or restrained. magent does not observe the child.","required":true,"example":"1"},{"in":"query","name":"touch","type":"integer","description":"Caller-assigned McGrath 1985 CHEOPS touch (integer 1-2; 0 is not published): 1 not touching wound; 2 reaching, touching, grabbing, or arms restrained. magent does not observe the child.","required":true,"example":"1"},{"in":"query","name":"legs","type":"integer","description":"Caller-assigned McGrath 1985 CHEOPS legs (integer 1-2; 0 is not published): 1 neutral; 2 squirm/kicking, drawn up/tense, standing, or restrained. magent does not observe the child.","required":true,"example":"1"}],"errors":[{"code":"invalid_cheops","message":"CHEOPS needs cry, facial, child_verbal, torso, touch, and legs (McGrath 1985). Returned before settlement; you are not charged.","status":400},{"code":"invalid_cheops_item","message":"each CHEOPS category must be an integer in that category's published range (McGrath 1985). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/cheops","citation":{"authors":"McGrath PJ, Johnson G, Goodman JT, Schillinger J, Dunn J, Chapman J","doi":"10.1016/0304-3959(84)90167-2","id":"mcgrath-1985","source":"In: Fields HL, ed. Advances in Pain Research and Therapy. Vol 9. New York: Raven Press; 1985:395-402","title":"CHEOPS: a behavioral scale for rating postoperative pain in children","url":"https://doi.org/10.1016/0304-3959(84)90167-2"},"formula_expression":"CHEOPS = cry + facial + child_verbal + torso + touch + legs; McGrath 1985 published integers; min 4, max 13","purpose":"Sum six caller-assigned McGrath 1985 CHEOPS category integers and return the published total (range 4-13).","markdown_url":"https://magentlab.com/docs/cheops.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"cheops"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"CHEOPS points 4-13"},{"name":"max_score","type":"integer","description":"Always 13"},{"name":"cry","type":"integer","description":"Caller-assigned cry points 1-3"},{"name":"facial","type":"integer","description":"Caller-assigned facial points 0-2"},{"name":"child_verbal","type":"integer","description":"Caller-assigned child verbal points 0-2"},{"name":"torso","type":"integer","description":"Caller-assigned torso points 1-2"},{"name":"touch","type":"integer","description":"Caller-assigned touch points 1-2"},{"name":"legs","type":"integer","description":"Caller-assigned legs points 1-2"},{"name":"components","type":"array","description":"Per-category caller-assigned points"},{"name":"citation","type":"object","description":"McGrath et al. 1985 CHEOPS chapter citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"child_verbal":"0","cry":"1","facial":"0","legs":"1","torso":"1","touch":"1"},{"child_verbal":"0","cry":"1","facial":"0","legs":"1","torso":"1","touch":"1"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/cheops","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/cheops?cry=1&facial=0&child_verbal=0&torso=1&touch=1&legs=1","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/cheops","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/dhaka","description":"Levine 2015 DHAKA Dehydration Score (Table 3, not the Tree): appearance 0/2/4, respirations 0/2, skin pinch 0/2/4, tears 0/1/2. Max 12. Bands 0-1 / 2-3 / ≥4. Derived in children <5 with acute diarrhea. magent does not examine the child or order fluids. Not a WHO IMCI clone. Not a medical device.","parameters":[{"in":"query","name":"general_appearance","type":"string","enum":["normal","restless_irritable","lethargic_unconscious"],"description":"Caller-assigned Levine 2015 Table 3 general appearance: normal (0), restless_irritable (2), or lethargic_unconscious (4). magent does not examine the child.","required":true,"example":"normal"},{"in":"query","name":"respirations","type":"string","enum":["normal","deep"],"description":"Caller-assigned Levine 2015 Table 3 respirations: normal (0) or deep (2). Table 3 has no very-deep cell. magent does not examine the child.","required":true,"example":"normal"},{"in":"query","name":"skin_pinch","type":"string","enum":["normal","slow","very_slow"],"description":"Caller-assigned Levine 2015 Table 3 skin pinch: normal (0), slow (2), or very_slow (4). magent does not examine the child.","required":true,"example":"normal"},{"in":"query","name":"tears","type":"string","enum":["normal","decreased","absent"],"description":"Caller-assigned Levine 2015 Table 3 tears: normal (0), decreased (1), or absent (2). magent does not examine the child.","required":true,"example":"normal"}],"errors":[{"code":"invalid_dhaka_appearance","message":"general_appearance must be normal, restless_irritable, or lethargic_unconscious (Levine 2015 DHAKA Table 3). Returned before settlement; you are not charged.","status":400},{"code":"invalid_dhaka_respirations","message":"respirations must be normal or deep (Levine 2015 DHAKA Table 3). Returned before settlement; you are not charged.","status":400},{"code":"invalid_dhaka_skin_pinch","message":"skin_pinch must be normal, slow, or very_slow (Levine 2015 DHAKA Table 3). Returned before settlement; you are not charged.","status":400},{"code":"invalid_dhaka_tears","message":"tears must be normal, decreased, or absent (Levine 2015 DHAKA Table 3). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/dhaka","citation":{"authors":"Levine AC, Glavis-Bloom J, Modi P, Nasrin S, Rege S, Chu C, Schmid CH, Alam NH","doi":"10.9745/GHSP-D-15-00097","id":"levine-2015","pmid":"26374802","source":"Glob Health Sci Pract. 2015;3(3):405-418","title":"Empirically Derived Dehydration Scoring and Decision Tree Models for Children With Diarrhea: Assessment and Internal Validation in a Prospective Cohort Study in Dhaka, Bangladesh","url":"https://doi.org/10.9745/GHSP-D-15-00097"},"formula_expression":"DHAKA = general_appearance (normal 0, restless_irritable 2, lethargic_unconscious 4) + respirations (normal 0, deep 2) + skin_pinch (normal 0, slow 2, very_slow 4) + tears (normal 0, decreased 1, absent 2); Levine 2015 Table 3; max 12","purpose":"Sum four caller-assigned Levine 2015 DHAKA Table 3 items and return the published total (max 12) and dehydration band (no, some, or severe).","markdown_url":"https://magentlab.com/docs/dhaka.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"dhaka"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"DHAKA Table 3 points 0-12"},{"name":"max_score","type":"integer","description":"Always 12"},{"name":"dhaka_band","type":"string","description":"Levine 2015 Table 3 category: no_dehydration (0-1), some_dehydration (2-3), or severe_dehydration (≥4). A score band, not a fluids order and not the DHAKA Tree."},{"name":"general_appearance","type":"string","description":"Caller-assigned token used: normal, restless_irritable, or lethargic_unconscious"},{"name":"respirations","type":"string","description":"Caller-assigned token used: normal or deep"},{"name":"skin_pinch","type":"string","description":"Caller-assigned token used: normal, slow, or very_slow"},{"name":"tears","type":"string","description":"Caller-assigned token used: normal, decreased, or absent"},{"name":"components","type":"array","description":"Per-item caller-assigned points"},{"name":"citation","type":"object","description":"Levine et al. Glob Health Sci Pract 2015 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"general_appearance":"normal","respirations":"normal","skin_pinch":"normal","tears":"normal"},{"general_appearance":"normal","respirations":"normal","skin_pinch":"normal","tears":"normal"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/dhaka","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/dhaka?general_appearance=normal&respirations=normal&skin_pinch=normal&tears=normal","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/dhaka","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/nirudak","description":"Barry 2021 NIRUDAK Table 2 integer score (max 13) for patients 5–120 years with acute diarrhea: age, sex, eye_level, radial_pulse, respirations, skin_pinch (rapid/slow/very_slow), vomiting_episodes_24h. Bands 0-3 no, 4-6 some, 7-13 severe dehydration. Not WHO IMCI/IMAI. Not DHAKA. Not PLOS logistic models. magent does not examine the patient or order fluids. Not a medical device.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years, integer 5–120. Barry 2021 Table 2: >59 scores 0, 20–59 scores 1, <20 scores 2. Not the adult 18–120 clamp.","required":true,"example":"70"},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"female (0) or male (1) (Barry 2021 Table 2).","required":true,"example":"female"},{"in":"query","name":"eye_level","type":"string","enum":["normal","sunken"],"description":"Caller-assigned Barry 2021 Table 2 eye level: normal (0) or sunken (1). magent does not examine the patient.","required":true,"example":"normal"},{"in":"query","name":"radial_pulse","type":"string","enum":["strong","decreased","absent"],"description":"Caller-assigned Barry 2021 Table 2 radial pulse: strong (0), decreased (1), or absent (2). magent does not examine the patient.","required":true,"example":"strong"},{"in":"query","name":"respirations","type":"string","enum":["normal","deep"],"description":"Caller-assigned Barry 2021 Table 2 respirations: normal (0) or deep (1). Deep scores 1, not DHAKA Table 3's 2. magent does not examine the patient.","required":true,"example":"normal"},{"in":"query","name":"skin_pinch","type":"string","enum":["rapid","slow","very_slow"],"description":"Caller-assigned Barry 2021 Table 2 skin pinch: rapid (0), slow (2), or very_slow (4). Reference is rapid, not DHAKA normal. magent does not examine the patient.","required":true,"example":"rapid"},{"in":"query","name":"vomiting_episodes_24h","type":"string","enum":["lt_1","1_to_10","gt_10"],"description":"Caller-assigned Barry 2021 Table 2 vomiting episodes in 24 hours: lt_1 (0; <1), 1_to_10 (1), or gt_10 (2; >10).","required":true,"example":"lt_1"}],"errors":[{"code":"invalid_nirudak_age","message":"age must be an integer from 5 to 120 (Barry 2021 NIRUDAK; not the adult 18-120 clamp). Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_nirudak_eyes","message":"eye_level must be normal or sunken (Barry 2021 NIRUDAK Table 2). Returned before settlement; you are not charged.","status":400},{"code":"invalid_nirudak_pulse","message":"radial_pulse must be strong, decreased, or absent (Barry 2021 NIRUDAK Table 2). Returned before settlement; you are not charged.","status":400},{"code":"invalid_dhaka_respirations","message":"respirations must be normal or deep (Levine 2015 DHAKA Table 3). Returned before settlement; you are not charged.","status":400},{"code":"invalid_nirudak_skin_pinch","message":"skin_pinch must be rapid, slow, or very_slow (Barry 2021 NIRUDAK Table 2; rapid is the reference). Returned before settlement; you are not charged.","status":400},{"code":"invalid_nirudak_vomiting","message":"vomiting_episodes_24h must be lt_1, 1_to_10, or gt_10 (Barry 2021 NIRUDAK Table 2). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/nirudak","citation":{"authors":"Barry MA, Garbern SC, Lee JA, Qu K, Gainey M, Schmid CH, Nasrin S, Alam NH, Nelson EJ, Rosen RK, Levine AC","doi":"10.4269/ajtmh.21-0143","id":"barry-2021","pmid":"34398821","source":"Am J Trop Med Hyg. 2021;105(5):1368-1375","title":"Derivation and Internal Validation of a Score to Predict Dehydration Severity in Patients over 5 Years with Acute Diarrhea","url":"https://doi.org/10.4269/ajtmh.21-0143"},"formula_expression":"NIRUDAK = age (>59 0, 20-59 1, <20 2) + sex (female 0, male 1) + eye_level (normal 0, sunken 1) + radial_pulse (strong 0, decreased 1, absent 2) + respirations (normal 0, deep 1) + skin_pinch (rapid 0, slow 2, very_slow 4) + vomiting_episodes_24h (lt_1 0, 1_to_10 1, gt_10 2); Barry 2021 Table 2; max 13","purpose":"Sum seven caller-assigned Barry 2021 NIRUDAK Table 2 items and return the published total (max 13) and dehydration band (no, some, or severe).","markdown_url":"https://magentlab.com/docs/nirudak.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"nirudak"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"NIRUDAK Table 2 points 0-13"},{"name":"max_score","type":"integer","description":"Always 13"},{"name":"nirudak_band","type":"string","description":"Barry 2021 Table 2 category: no_dehydration (0-3), some_dehydration (4-6), or severe_dehydration (7-13). A score band, not a fluids order and not WHO IMCI/IMAI."},{"name":"age_years","type":"integer","description":"Age in years used for the >59 / 20–59 / <20 split"},{"name":"sex","type":"string","description":"female or male"},{"name":"eye_level","type":"string","description":"Caller-assigned token used: normal or sunken"},{"name":"radial_pulse","type":"string","description":"Caller-assigned token used: strong, decreased, or absent"},{"name":"respirations","type":"string","description":"Caller-assigned token used: normal or deep"},{"name":"skin_pinch","type":"string","description":"Caller-assigned token used: rapid, slow, or very_slow"},{"name":"vomiting_episodes_24h","type":"string","description":"Caller-assigned token used: lt_1, 1_to_10, or gt_10"},{"name":"components","type":"array","description":"Per-item caller-assigned points"},{"name":"citation","type":"object","description":"Barry et al. Am J Trop Med Hyg 2021 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"70","eye_level":"normal","radial_pulse":"strong","respirations":"normal","sex":"female","skin_pinch":"rapid","vomiting_episodes_24h":"lt_1"},{"age":"70","eye_level":"normal","radial_pulse":"strong","respirations":"normal","sex":"female","skin_pinch":"rapid","vomiting_episodes_24h":"lt_1"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/nirudak","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/nirudak?age=70&sex=female&eye_level=normal&radial_pulse=strong&respirations=normal&skin_pinch=rapid&vomiting_episodes_24h=lt_1","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/nirudak","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/paradise","description":"Paradise 1984 eligibility frequency for recurrent throat infection. paradise_criteria is true iff qualifying_episode_features and any of ge_7_episodes_preceding_year, ge_5_episodes_each_of_2_years, or ge_3_episodes_each_of_3_years. Caller assigns that counting episodes had fever >38.3 C, cervical adenopathy, tonsillar exudate, or group A beta-hemolytic streptococcus culture. magent does not examine the patient or count episodes. Not a tonsillectomy order. Not AAO-HNS 2019.","parameters":[{"in":"query","name":"ge_7_episodes_preceding_year","type":"boolean","description":"Seven or more episodes of throat infection in the preceding year (Paradise 1984). true or false as assigned by the caller. magent does not count episodes.","required":true,"example":"true"},{"in":"query","name":"ge_5_episodes_each_of_2_years","type":"boolean","description":"Five or more episodes in each of the preceding two years (Paradise 1984). true or false as assigned by the caller. magent does not count episodes.","required":true,"example":"false"},{"in":"query","name":"ge_3_episodes_each_of_3_years","type":"boolean","description":"Three or more episodes in each of the preceding three years (Paradise 1984). true or false as assigned by the caller. magent does not count episodes.","required":true,"example":"false"},{"in":"query","name":"qualifying_episode_features","type":"boolean","description":"Caller assigns that counting episodes had the trial's published features: fever >38.3 C, or cervical adenopathy, or tonsillar exudate, or culture positive for group A beta-hemolytic streptococcus (Paradise 1984). true or false. magent does not examine the patient.","required":true,"example":"true"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/paradise","citation":{"authors":"Paradise JL, Bluestone CD, Bachman RZ, Colborn DK, Bernard BS, Taylor FH, Rogers KD, Schwarzbach RH, Stool SE, Friday GA","doi":"10.1056/NEJM198403153101102","id":"paradise-1984","pmid":"6700642","source":"N Engl J Med. 1984;310(11):674-683","title":"Efficacy of tonsillectomy for recurrent throat infection in severely affected children. Results of parallel randomized and nonrandomized clinical trials","url":"https://doi.org/10.1056/NEJM198403153101102"},"formula_expression":"paradise_criteria iff qualifying_episode_features and (ge_7_episodes_preceding_year or ge_5_episodes_each_of_2_years or ge_3_episodes_each_of_3_years) (Paradise 1984 eligibility frequency for recurrent throat infection)","purpose":"Apply the Paradise 1984 eligibility frequency for recurrent throat infection and return whether paradise_criteria holds (frequency met and qualifying episode features).","markdown_url":"https://magentlab.com/docs/paradise.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"paradise"},{"name":"formula_expression","type":"string","description":"Paradise 1984: paradise_criteria iff qualifying episode features and any of the three frequency flags"},{"name":"frequency_met","type":"boolean","description":"true iff any of ge_7_episodes_preceding_year, ge_5_episodes_each_of_2_years, or ge_3_episodes_each_of_3_years is true"},{"name":"paradise_criteria","type":"boolean","description":"true only when frequency_met and qualifying_episode_features both hold. Not a tonsillectomy order."},{"name":"criteria","type":"array","description":"Per-flag rows for the three frequency flags, frequency_met (any of those three), and qualifying_episode_features"},{"name":"citation","type":"object","description":"Paradise 1984 NEJM citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"ge_3_episodes_each_of_3_years":"false","ge_5_episodes_each_of_2_years":"false","ge_7_episodes_preceding_year":"true","qualifying_episode_features":"true"},{"ge_3_episodes_each_of_3_years":"false","ge_5_episodes_each_of_2_years":"false","ge_7_episodes_preceding_year":"true","qualifying_episode_features":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/paradise","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/paradise?ge_7_episodes_preceding_year=true&ge_5_episodes_each_of_2_years=false&ge_3_episodes_each_of_3_years=false&qualifying_episode_features=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/paradise","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/cage","description":"Ewing 1984 CAGE questionnaire: four caller-assigned yes/no items (cut down, annoyed, guilty, eye-opener), 1 point each, max 4. Screen-positive when two or more answers are affirmative (score ≥2). Deterministic published score with citation; not a diagnosis of alcohol use disorder, not CIWA-Ar, and not AUDIT. magent does not interpret individual items.","parameters":[{"in":"query","name":"cut_down","type":"boolean","description":"Have you ever felt you should Cut down on your drinking? (Ewing 1984). true or false as assigned by the caller. magent does not interpret the item.","required":true,"example":"false"},{"in":"query","name":"annoyed","type":"boolean","description":"Have people Annoyed you by criticizing your drinking? (Ewing 1984). true or false as assigned by the caller. magent does not interpret the item.","required":true,"example":"false"},{"in":"query","name":"guilty","type":"boolean","description":"Have you ever felt bad or Guilty about your drinking? (Ewing 1984). true or false as assigned by the caller. magent does not interpret the item.","required":true,"example":"false"},{"in":"query","name":"eye_opener","type":"boolean","description":"Have you ever had a drink first thing in the morning to steady your nerves or get rid of a hangover (Eye-opener)? (Ewing 1984). true or false as assigned by the caller. magent does not interpret the item.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/cage","citation":{"authors":"Ewing JA","doi":"10.1001/jama.1984.03350140051025","id":"ewing-1984","pmid":"6471323","source":"JAMA. 1984;252(14):1905-1907","title":"Detecting alcoholism. The CAGE questionnaire","url":"https://doi.org/10.1001/jama.1984.03350140051025"},"formula_expression":"CAGE = cut_down + annoyed + guilty + eye_opener; each 1 if true; max 4","purpose":"Sum the four Ewing 1984 CAGE items and return whether two or more answers are affirmative.","markdown_url":"https://magentlab.com/docs/cage.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"cage"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"CAGE points 0-4"},{"name":"max_score","type":"integer","description":"4"},{"name":"screen_positive","type":"boolean","description":"true iff score ≥ 2 (Ewing 1984: two or more affirmative answers). Not a diagnosis."},{"name":"components","type":"array","description":"Per-item points"},{"name":"citation","type":"object","description":"Ewing JAMA 1984 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"annoyed":"false","cut_down":"false","eye_opener":"false","guilty":"false"},{"annoyed":"false","cut_down":"false","eye_opener":"false","guilty":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/cage","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/cage?cut_down=false&annoyed=false&guilty=false&eye_opener=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/cage","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/smast","description":"Selzer 1975 13-item Short Michigan Alcoholism Screening Test (SMAST). Caller-assigned yes/no items; score is the count of answers in the alcoholic direction using that paper's key (feel_normal_drinker, friends_think_normal_drinker, and able_to_stop score 1 if false; the other ten score 1 if true), max 13. Bands 0-1 nonalcoholic, 2 possible, ≥3 alcoholic. Not a diagnosis, not the 25-item MAST, not Pokorny 1972 Brief MAST, and not SMAST-G. magent does not interview the patient.","parameters":[{"in":"query","name":"feel_normal_drinker","type":"boolean","description":"Do you feel you are a normal drinker? (By normal we mean you drink less than or as much as most other people.) (Selzer 1975 SMAST item 1). true or false as assigned by the caller. false is the alcoholic-direction answer and scores 1. magent does not interview the patient.","required":true,"example":"true"},{"in":"query","name":"relative_worry_or_complain","type":"boolean","description":"Does your wife, husband, a parent, or other near relative ever worry or complain about your drinking? (Selzer 1975 SMAST item 2). true or false as assigned by the caller. true is the alcoholic-direction answer and scores 1. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"feel_guilty","type":"boolean","description":"Do you ever feel guilty about your drinking? (Selzer 1975 SMAST item 3). true or false as assigned by the caller. true is the alcoholic-direction answer and scores 1. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"friends_think_normal_drinker","type":"boolean","description":"Do friends or relatives think you are a normal drinker? (Selzer 1975 SMAST item 4). true or false as assigned by the caller. false is the alcoholic-direction answer and scores 1. magent does not interview the patient.","required":true,"example":"true"},{"in":"query","name":"able_to_stop","type":"boolean","description":"Are you able to stop drinking when you want to? (Selzer 1975 SMAST item 5). true or false as assigned by the caller. false is the alcoholic-direction answer and scores 1. magent does not interview the patient.","required":true,"example":"true"},{"in":"query","name":"attended_aa","type":"boolean","description":"Have you ever attended a meeting of Alcoholics Anonymous? (Selzer 1975 SMAST item 6). true or false as assigned by the caller. true is the alcoholic-direction answer and scores 1. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"drinking_created_problems","type":"boolean","description":"Has drinking ever created problems between you and your wife, husband, a parent, or other near relative? (Selzer 1975 SMAST item 7). true or false as assigned by the caller. true is the alcoholic-direction answer and scores 1. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"trouble_at_work","type":"boolean","description":"Have you ever gotten into trouble at work because of drinking? (Selzer 1975 SMAST item 8). true or false as assigned by the caller. true is the alcoholic-direction answer and scores 1. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"neglected_obligations","type":"boolean","description":"Have you ever neglected your obligations, your family, or your work for two or more days in a row because you were drinking? (Selzer 1975 SMAST item 9). true or false as assigned by the caller. true is the alcoholic-direction answer and scores 1. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"gone_for_help","type":"boolean","description":"Have you ever gone to anyone for help about your drinking? (Selzer 1975 SMAST item 10). true or false as assigned by the caller. true is the alcoholic-direction answer and scores 1. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"hospital_because_of_drinking","type":"boolean","description":"Have you ever been in a hospital because of drinking? (Selzer 1975 SMAST item 11). true or false as assigned by the caller. true is the alcoholic-direction answer and scores 1. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"arrested_drunk_driving","type":"boolean","description":"Have you ever been arrested for drunk driving, driving while intoxicated, or driving after drinking? (Selzer 1975 SMAST item 12). true or false as assigned by the caller. true is the alcoholic-direction answer and scores 1. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"arrested_drunken_behavior","type":"boolean","description":"Have you ever been arrested, even for a few hours, because of drunken behavior? (Selzer 1975 SMAST item 13). true or false as assigned by the caller. true is the alcoholic-direction answer and scores 1. magent does not interview the patient.","required":true,"example":"false"}],"errors":[{"code":"invalid_smast","message":"Each SMAST item must be yes or no as in Selzer 1975; reverse-scored items use that paper's key. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/smast","citation":{"authors":"Selzer ML, Vinokur A, van Rooijen L","doi":"10.15288/jsa.1975.36.117","id":"selzer-1975","pmid":"238068","source":"J Stud Alcohol. 1975;36(1):117-126","title":"A self-administered Short Michigan Alcoholism Screening Test (SMAST)","url":"https://doi.org/10.15288/jsa.1975.36.117"},"formula_expression":"SMAST = (1 if not feel_normal_drinker) + relative_worry_or_complain + feel_guilty + (1 if not friends_think_normal_drinker) + (1 if not able_to_stop) + attended_aa + drinking_created_problems + trouble_at_work + neglected_obligations + gone_for_help + hospital_because_of_drinking + arrested_drunk_driving + arrested_drunken_behavior; each 1 in the Selzer 1975 alcoholic direction; max 13","purpose":"Count Selzer 1975 SMAST alcoholic-direction answers and return the published 0-1 nonalcoholic, 2 possible, and ≥3 alcoholic bands.","markdown_url":"https://magentlab.com/docs/smast.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"smast"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"SMAST points 0-13. Count of Selzer 1975 alcoholic-direction answers, not a raw yes count."},{"name":"max_score","type":"integer","description":"13"},{"name":"band","type":"string","description":"Selzer 1975 screen category: nonalcoholic (0-1), possible (2), or alcoholic (≥3). Not a diagnosis."},{"name":"components","type":"array","description":"Per-item points. present is true when the answer is in the alcoholic direction."},{"name":"citation","type":"object","description":"Selzer et al. J Stud Alcohol 1975 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"able_to_stop":"true","arrested_drunk_driving":"false","arrested_drunken_behavior":"false","attended_aa":"false","drinking_created_problems":"false","feel_guilty":"false","feel_normal_drinker":"true","friends_think_normal_drinker":"true","gone_for_help":"false","hospital_because_of_drinking":"false","neglected_obligations":"false","relative_worry_or_complain":"false","trouble_at_work":"false"},{"able_to_stop":"true","arrested_drunk_driving":"false","arrested_drunken_behavior":"false","attended_aa":"false","drinking_created_problems":"false","feel_guilty":"false","feel_normal_drinker":"true","friends_think_normal_drinker":"true","gone_for_help":"false","hospital_because_of_drinking":"false","neglected_obligations":"false","relative_worry_or_complain":"false","trouble_at_work":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/smast","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/smast?feel_normal_drinker=true&relative_worry_or_complain=false&feel_guilty=false&friends_think_normal_drinker=true&able_to_stop=true&attended_aa=false&drinking_created_problems=false&trouble_at_work=false&neglected_obligations=false&gone_for_help=false&hospital_because_of_drinking=false&arrested_drunk_driving=false&arrested_drunken_behavior=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/smast","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/audit-c","description":"Bush 1998 AUDIT-C from three caller-assigned integers 0-4 (frequency, typical drinks, binge frequency); magent does not map drink-count categories. Total 0-12. This paper reported ≥3 as sensitive and ≥4 as more specific for heavy drinking / active abuse or dependence in male VA outpatients (Bush 1998 excluded women). Returns screen_ge_3 and screen_ge_4. Not later sex-specific VA primary-care cutoffs, not the full 10-item AUDIT, and not CIWA-Ar. Not a diagnosis.","parameters":[{"in":"query","name":"frequency","type":"integer","description":"Caller-assigned Bush 1998 AUDIT item 1 points (integer 0-4): how often the patient had a drink containing alcohol in the past year. magent does not map drink-count categories.","required":true,"example":"0"},{"in":"query","name":"typical_drinks","type":"integer","description":"Caller-assigned Bush 1998 AUDIT item 2 points (integer 0-4): how many drinks on a typical drinking day. magent does not map drink-count categories.","required":true,"example":"0"},{"in":"query","name":"binge_frequency","type":"integer","description":"Caller-assigned Bush 1998 AUDIT item 3 points (integer 0-4): how often six or more drinks on one occasion. magent does not map drink-count categories.","required":true,"example":"0"}],"errors":[{"code":"invalid_audit_c_item","message":"frequency, typical_drinks, and binge_frequency must each be an integer from 0 to 4 (caller-assigned Bush 1998 points). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/audit-c","citation":{"authors":"Bush K, Kivlahan DR, McDonell MB, Fihn SD, Bradley KA","doi":"10.1001/archinte.158.16.1789","id":"bush-1998","pmid":"9738608","source":"Arch Intern Med. 1998;158(16):1789-1795","title":"The AUDIT alcohol consumption questions (AUDIT-C): an effective brief screening test for problem drinking","url":"https://doi.org/10.1001/archinte.158.16.1789"},"formula_expression":"AUDIT-C = frequency + typical_drinks + binge_frequency; each caller-assigned 0-4; max 12","purpose":"Sum three caller-assigned Bush 1998 AUDIT-C integers (0-4) and return this paper's ≥3 and ≥4 screens.","markdown_url":"https://magentlab.com/docs/audit-c.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"audit_c"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"AUDIT-C points 0-12"},{"name":"max_score","type":"integer","description":"12"},{"name":"screen_ge_3","type":"boolean","description":"true iff score ≥ 3 (Bush 1998 sensitive threshold for heavy drinking / active abuse or dependence). Not a diagnosis."},{"name":"screen_ge_4","type":"boolean","description":"true iff score ≥ 4 (Bush 1998 more specific threshold). Not later sex-specific cutoffs."},{"name":"components","type":"array","description":"Per-item caller-assigned points"},{"name":"citation","type":"object","description":"Bush et al. Arch Intern Med 1998 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"binge_frequency":"0","frequency":"0","typical_drinks":"0"},{"binge_frequency":"0","frequency":"0","typical_drinks":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/audit-c","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/audit-c?frequency=0&typical_drinks=0&binge_frequency=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/audit-c","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/bam","description":"Cacciola 2013 Brief Addiction Monitor (BAM; public-domain VA instrument). Three subscales only: Use (items 4+5+6, 0-90), Risk (items 1+2+3+8+11+15, 0-102 on Table 1 0-4 Likert plus 0-30 days), Protective (items 9+10+12+13+14+16, 0-98; income No=0 Yes=30). Items 7a-g and 17 collected, not summed. No total BAM score. magent does not interview the patient. Not a diagnosis, level-of-care order, or medical device.","parameters":[{"in":"query","name":"physical_health","type":"integer","description":"Caller-assigned Cacciola 2013 Table 1 item 1 physical-health rating (integer 0-4; 0 excellent, 4 poor). Healthiest published anchor is 0. Kept on Table 1's 0-4 scale (not a 0/8/15/22/30 recode). magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"days_sleep","type":"integer","description":"Caller-assigned Cacciola 2013 Table 1 item 2 days of trouble sleeping in the prior 30 days (integer 0-30). magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"days_psychological","type":"integer","description":"Caller-assigned Cacciola 2013 Table 1 item 3 days of psychological problems in the prior 30 days (integer 0-30). magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"days_alcohol","type":"integer","description":"Caller-assigned Cacciola 2013 Table 1 item 4 days of alcohol use in the prior 30 days (integer 0-30). magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"days_heavy_alcohol","type":"integer","description":"Caller-assigned Cacciola 2013 Table 1 item 5 days of heavy alcohol use in the prior 30 days (integer 0-30). Contingent on item 4 in that paper; this tool accepts 0-30 independently. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"days_drug","type":"integer","description":"Caller-assigned Cacciola 2013 Table 1 item 6 days of drug use in the prior 30 days (integer 0-30). magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"drug_marijuana","type":"boolean","description":"Caller-assigned Cacciola 2013 item 7 checklist slot 7a (marijuana). Collected and not summed. Table 1 names a 6-category checklist without listing categories; 7a-g follow the VA public-domain slots. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"drug_sedatives","type":"boolean","description":"Caller-assigned Cacciola 2013 item 7 checklist slot 7b (sedatives/tranquilizers). Collected and not summed. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"drug_cocaine","type":"boolean","description":"Caller-assigned Cacciola 2013 item 7 checklist slot 7c (cocaine/crack). Collected and not summed. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"drug_stimulants","type":"boolean","description":"Caller-assigned Cacciola 2013 item 7 checklist slot 7d (other stimulants). Collected and not summed. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"drug_opiates","type":"boolean","description":"Caller-assigned Cacciola 2013 item 7 checklist slot 7e (opiates). Collected and not summed. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"drug_inhalants","type":"boolean","description":"Caller-assigned Cacciola 2013 item 7 checklist slot 7f (inhalants). Collected and not summed. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"drug_other","type":"boolean","description":"Caller-assigned Cacciola 2013 item 7 checklist slot 7g (other drugs). Collected and not summed. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"craving","type":"integer","description":"Caller-assigned Cacciola 2013 Table 1 item 8 craving rating (integer 0-4; 0 not at all, 4 extremely). Kept on Table 1's 0-4 scale. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"abstinence_confidence","type":"integer","description":"Caller-assigned Cacciola 2013 Table 1 item 9 abstinence-confidence rating (integer 0-4; 0 not at all, 4 extremely). Kept on Table 1's 0-4 scale. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"days_self_help","type":"integer","description":"Caller-assigned Cacciola 2013 Table 1 item 10 days of self-help group attendance in the prior 30 days (integer 0-30). magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"days_risky","type":"integer","description":"Caller-assigned Cacciola 2013 Table 1 item 11 days in risky situations in the prior 30 days (integer 0-30). magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"religion_support","type":"integer","description":"Caller-assigned Cacciola 2013 Table 1 item 12 religion/spirituality support rating (integer 0-4; 0 not at all, 4 extremely). Kept on Table 1's 0-4 scale. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"days_structured","type":"integer","description":"Caller-assigned Cacciola 2013 Table 1 item 13 days of structured activities in the prior 30 days (integer 0-30). magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"adequate_income","type":"boolean","description":"Caller-assigned Cacciola 2013 Table 1 item 14 adequate income (true or false). No scores 0; Yes scores 30 (VA public-domain BAM-R item-14 map). magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"family_arguments","type":"integer","description":"Caller-assigned Cacciola 2013 Table 1 item 15 arguments with family/friends rating (integer 0-4; 0 not at all, 4 extremely). Kept on Table 1's 0-4 scale. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"days_supportive","type":"integer","description":"Caller-assigned Cacciola 2013 Table 1 item 16 days with supportive family/friends in the prior 30 days (integer 0-30). magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"recovery_satisfaction","type":"integer","description":"Caller-assigned Cacciola 2013 Table 1 item 17 recovery-satisfaction rating (integer 0-4; 0 not at all, 4 extremely). Collected and not summed. magent does not interview the patient.","required":true,"example":"0"}],"errors":[{"code":"invalid_bam","message":"BAM inputs must match Cacciola 2013 Brief Addiction Monitor item ranges from that paper. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/bam","citation":{"authors":"Cacciola JS, Alterman AI, DePhilippis D, et al.","doi":"10.1016/j.jsat.2012.07.013","id":"cacciola-2013","pmid":"22898042","source":"J Subst Abuse Treat. 2013;44(5):492-499","title":"Development and initial evaluation of the Brief Addiction Monitor (BAM)","url":"https://doi.org/10.1016/j.jsat.2012.07.013"},"formula_expression":"Use = days_alcohol + days_heavy_alcohol + days_drug (Cacciola 2013 Table 1 items 4+5+6; each 0-30; max 90); Risk = physical_health + days_sleep + days_psychological + craving + days_risky + family_arguments (items 1+2+3+8+11+15; Table 1 Likert 0-4 kept on Table 1's own scale, day-counts 0-30; max 102); Protective = abstinence_confidence + days_self_help + religion_support + days_structured + adequate_income + days_supportive (items 9+10+12+13+14+16; Table 1 Likert 0-4, day-counts 0-30, income No=0 Yes=30; max 98); items 7a-g and 17 collected and not summed. No single total BAM score. magent does not interview the patient. Not a diagnosis or level-of-care order.","purpose":"Score the three Cacciola 2013 / VA public-domain BAM subscales (Use, Risk, Protective) from caller-assigned Table 1 prior-30-day items. No single total BAM score.","markdown_url":"https://magentlab.com/docs/bam.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"bam"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"use","type":"integer","description":"Cacciola 2013 / VA Use subscale (items 4+5+6), range 0-90"},{"name":"use_max","type":"integer","description":"Always 90"},{"name":"risk","type":"integer","description":"Cacciola 2013 / VA Risk subscale (items 1+2+3+8+11+15). Table 1 Likert 0-4 plus day-counts 0-30; range 0-102. Not the VA BAM-R 0-180 recode."},{"name":"risk_max","type":"integer","description":"Always 102"},{"name":"protective","type":"integer","description":"Cacciola 2013 / VA Protective subscale (items 9+10+12+13+14+16). Table 1 Likert 0-4, day-counts 0-30, income 0/30; range 0-98. Not the VA BAM-R 0-180 recode."},{"name":"protective_max","type":"integer","description":"Always 98"},{"name":"components","type":"array","description":"Per-item caller-assigned points; 7a-g and item 17 contribute 0"},{"name":"citation","type":"object","description":"Cacciola et al. J Subst Abuse Treat 2013 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"abstinence_confidence":"0","adequate_income":"false","craving":"0","days_alcohol":"0","days_drug":"0","days_heavy_alcohol":"0","days_psychological":"0","days_risky":"0","days_self_help":"0","days_sleep":"0","days_structured":"0","days_supportive":"0","drug_cocaine":"false","drug_inhalants":"false","drug_marijuana":"false","drug_opiates":"false","drug_other":"false","drug_sedatives":"false","drug_stimulants":"false","family_arguments":"0","physical_health":"0","recovery_satisfaction":"0","religion_support":"0"},{"abstinence_confidence":"0","adequate_income":"false","craving":"0","days_alcohol":"0","days_drug":"0","days_heavy_alcohol":"0","days_psychological":"0","days_risky":"0","days_self_help":"0","days_sleep":"0","days_structured":"0","days_supportive":"0","drug_cocaine":"false","drug_inhalants":"false","drug_marijuana":"false","drug_opiates":"false","drug_other":"false","drug_sedatives":"false","drug_stimulants":"false","family_arguments":"0","physical_health":"0","recovery_satisfaction":"0","religion_support":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/bam","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/bam?physical_health=0&days_sleep=0&days_psychological=0&days_alcohol=0&days_heavy_alcohol=0&days_drug=0&drug_marijuana=false&drug_sedatives=false&drug_cocaine=false&drug_stimulants=false&drug_opiates=false&drug_inhalants=false&drug_other=false&craving=0&abstinence_confidence=0&days_self_help=0&days_risky=0&religion_support=0&days_structured=0&adequate_income=false&family_arguments=0&days_supportive=0&recovery_satisfaction=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/bam","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/dast-10","description":"Skinner 1982 10-item Drug Abuse Screening Test (DAST-10). Caller-assigned yes/no items; score is the count of answers in the problem direction (able_to_stop scores 1 if false; the other nine score 1 if true), max 10. Degree-of-problems bands 0 no problems, 1-2 low, 3-5 moderate, 6-8 substantial, 9-10 severe. Not a diagnosis, not a toxicology panel, not DAST-20, and not DAST-28. magent does not interpret the items.","parameters":[{"in":"query","name":"used_drugs_nonmedical","type":"boolean","description":"Have you used drugs other than those required for medical reasons? (Skinner 1982 DAST-10 item 1; past 12 months). true or false as assigned by the caller. true is the problem-direction answer and scores 1. magent does not interpret the item.","required":true,"example":"false"},{"in":"query","name":"abuse_more_than_one","type":"boolean","description":"Do you abuse more than one drug at a time? (Skinner 1982 DAST-10 item 2; past 12 months). true or false as assigned by the caller. true is the problem-direction answer and scores 1. magent does not interpret the item.","required":true,"example":"false"},{"in":"query","name":"able_to_stop","type":"boolean","description":"Are you always able to stop using drugs when you want to? (Skinner 1982 DAST-10 item 3; past 12 months). true or false as assigned by the caller. false is the problem-direction answer and scores 1 (reverse-scored). magent does not interpret the item.","required":true,"example":"true"},{"in":"query","name":"blackouts_flashbacks","type":"boolean","description":"Have you had blackouts or flashbacks as a result of drug use? (Skinner 1982 DAST-10 item 4; past 12 months). true or false as assigned by the caller. true is the problem-direction answer and scores 1. magent does not interpret the item.","required":true,"example":"false"},{"in":"query","name":"feel_bad_guilty","type":"boolean","description":"Do you ever feel bad or guilty about your drug use? (Skinner 1982 DAST-10 item 5; past 12 months). true or false as assigned by the caller. true is the problem-direction answer and scores 1. magent does not interpret the item.","required":true,"example":"false"},{"in":"query","name":"others_complain","type":"boolean","description":"Does your spouse (or parents) ever complain about your involvement with drugs? (Skinner 1982 DAST-10 item 6; past 12 months). true or false as assigned by the caller. true is the problem-direction answer and scores 1. magent does not interpret the item.","required":true,"example":"false"},{"in":"query","name":"neglected_family","type":"boolean","description":"Have you neglected your family because of your use of drugs? (Skinner 1982 DAST-10 item 7; past 12 months). true or false as assigned by the caller. true is the problem-direction answer and scores 1. magent does not interpret the item.","required":true,"example":"false"},{"in":"query","name":"illegal_activities","type":"boolean","description":"Have you engaged in illegal activities in order to obtain drugs? (Skinner 1982 DAST-10 item 8; past 12 months). true or false as assigned by the caller. true is the problem-direction answer and scores 1. magent does not interpret the item.","required":true,"example":"false"},{"in":"query","name":"withdrawal","type":"boolean","description":"Have you ever experienced withdrawal symptoms (felt sick) when you stopped taking drugs? (Skinner 1982 DAST-10 item 9; past 12 months). true or false as assigned by the caller. true is the problem-direction answer and scores 1. magent does not interpret the item.","required":true,"example":"false"},{"in":"query","name":"medical_problems","type":"boolean","description":"Have you had medical problems as a result of your drug use (e.g., memory loss, hepatitis, convulsions, bleeding)? (Skinner 1982 DAST-10 item 10; past 12 months). true or false as assigned by the caller. true is the problem-direction answer and scores 1. magent does not interpret the item.","required":true,"example":"false"}],"errors":[{"code":"invalid_dast_item","message":"each DAST-10 item must be true or false (Skinner 1982; item able_to_stop is reverse-scored). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/dast-10","citation":{"authors":"Skinner HA","doi":"10.1016/0306-4603(82)90005-3","id":"skinner-1982","source":"Addict Behav. 1982;7(4):363-371","title":"The drug abuse screening test","url":"https://doi.org/10.1016/0306-4603(82)90005-3"},"formula_expression":"DAST-10 = used_drugs_nonmedical + abuse_more_than_one + (1 if not able_to_stop) + blackouts_flashbacks + feel_bad_guilty + others_complain + neglected_family + illegal_activities + withdrawal + medical_problems; each 1 in the Skinner 1982 problem direction; max 10","purpose":"Count Skinner 1982 DAST-10 problem-direction answers (able_to_stop reverse-scored) and return the published degree-of-problems band (0 none, 1-2 low, 3-5 moderate, 6-8 substantial, 9-10 severe).","markdown_url":"https://magentlab.com/docs/dast-10.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"dast_10"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"DAST-10 points 0-10. Count of Skinner 1982 problem-direction answers, not a raw yes count."},{"name":"max_score","type":"integer","description":"10"},{"name":"dast_band","type":"string","description":"Skinner 1982 DAST-10 degree of problems: no_problems (0), low (1-2), moderate (3-5), substantial (6-8), or severe (9-10). Not a diagnosis."},{"name":"components","type":"array","description":"Per-item points. present is true when the answer is in the problem direction."},{"name":"citation","type":"object","description":"Skinner Addict Behav 1982 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"able_to_stop":"true","abuse_more_than_one":"false","blackouts_flashbacks":"false","feel_bad_guilty":"false","illegal_activities":"false","medical_problems":"false","neglected_family":"false","others_complain":"false","used_drugs_nonmedical":"false","withdrawal":"false"},{"able_to_stop":"true","abuse_more_than_one":"false","blackouts_flashbacks":"false","feel_bad_guilty":"false","illegal_activities":"false","medical_problems":"false","neglected_family":"false","others_complain":"false","used_drugs_nonmedical":"false","withdrawal":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/dast-10","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/dast-10?used_drugs_nonmedical=false&abuse_more_than_one=false&able_to_stop=true&blackouts_flashbacks=false&feel_bad_guilty=false&others_complain=false&neglected_family=false&illegal_activities=false&withdrawal=false&medical_problems=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/dast-10","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/scoff","description":"Morgan 1999 SCOFF questionnaire: five caller-assigned yes/no flags (make yourself sick, lost control over eating, lost more than one stone / 14 lb in 3 months, believe fat when others say thin, food dominates life), 1 point each, max 5. Screen-positive when two or more answers are affirmative (score ≥2). Deterministic published score with citation; not a diagnosis of an eating disorder and not a medical device. magent does not interview the patient or interpret individual items.","parameters":[{"in":"query","name":"make_yourself_sick","type":"boolean","description":"Do you make yourself Sick because you feel uncomfortably full? (Morgan 1999). true or false as assigned by the caller. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"lost_control_over_eating","type":"boolean","description":"Do you worry you have lost Control over how much you eat? (Morgan 1999). true or false as assigned by the caller. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"lost_more_than_one_stone_3_months","type":"boolean","description":"Have you recently lost more than One stone (14 lb) in a 3-month period? (Morgan 1999). true or false as assigned by the caller. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"believe_fat_when_others_say_thin","type":"boolean","description":"Do you believe yourself to be Fat when others say you are too thin? (Morgan 1999). true or false as assigned by the caller. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"food_dominates_life","type":"boolean","description":"Would you say that Food dominates your life? (Morgan 1999). true or false as assigned by the caller. magent does not interview the patient.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/scoff","citation":{"authors":"Morgan JF, Reid F, Lacey JH","doi":"10.1136/bmj.319.7223.1467","id":"morgan-1999","pmid":"10582927","source":"BMJ. 1999;319(7223):1467-1468","title":"The SCOFF questionnaire: assessment of a new screening tool for eating disorders","url":"https://doi.org/10.1136/bmj.319.7223.1467"},"formula_expression":"SCOFF = make_yourself_sick + lost_control_over_eating + lost_more_than_one_stone_3_months + believe_fat_when_others_say_thin + food_dominates_life; each 1 if true; max 5","purpose":"Sum the five Morgan 1999 SCOFF items and return whether two or more answers are affirmative.","markdown_url":"https://magentlab.com/docs/scoff.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"scoff"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"SCOFF points 0-5"},{"name":"max_score","type":"integer","description":"5"},{"name":"screen_positive","type":"boolean","description":"true iff score ≥ 2 (Morgan 1999: two or more affirmative answers). Not a diagnosis."},{"name":"components","type":"array","description":"Per-item points"},{"name":"citation","type":"object","description":"Morgan BMJ 1999 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"believe_fat_when_others_say_thin":"false","food_dominates_life":"false","lost_control_over_eating":"false","lost_more_than_one_stone_3_months":"false","make_yourself_sick":"false"},{"believe_fat_when_others_say_thin":"false","food_dominates_life":"false","lost_control_over_eating":"false","lost_more_than_one_stone_3_months":"false","make_yourself_sick":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/scoff","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/scoff?make_yourself_sick=false&lost_control_over_eating=false&lost_more_than_one_stone_3_months=false&believe_fat_when_others_say_thin=false&food_dominates_life=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/scoff","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/crafft","description":"Knight 2002 CRAFFT: six caller-assigned yes/no flags (car, relax, alone, forget, friends, trouble), 1 point each, max 6. Screen-positive when score ≥2 (optimal cutoff in Knight 2002 for any problem / any disorder / dependence). Deterministic published score with citation; not a diagnosis of a substance use disorder and not a medical device. magent does not interview the patient. Not CAGE and not CRAFFT 2.1 / 2.0 quantity questions.","parameters":[{"in":"query","name":"car","type":"boolean","description":"Have you ever ridden in a CAR driven by someone (including yourself) who was high or had been using alcohol or drugs? (Knight 2002). true or false as assigned by the caller. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"relax","type":"boolean","description":"Do you ever use alcohol or drugs to RELAX, feel better about yourself, or fit in? (Knight 2002). true or false as assigned by the caller. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"alone","type":"boolean","description":"Do you ever use alcohol or drugs while you are by yourself, or ALONE? (Knight 2002). true or false as assigned by the caller. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"forget","type":"boolean","description":"Do you ever FORGET things you did while using alcohol or drugs? (Knight 2002). true or false as assigned by the caller. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"friends","type":"boolean","description":"Do your family or FRIENDS ever tell you that you should cut down on your drinking or drug use? (Knight 2002). true or false as assigned by the caller. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"trouble","type":"boolean","description":"Have you gotten into TROUBLE while using alcohol or drugs? (Knight 2002). true or false as assigned by the caller. magent does not interview the patient.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/crafft","citation":{"authors":"Knight JR, Sherritt L, Shrier LA, Harris SK, Chang G","doi":"10.1001/archpedi.156.6.607","id":"knight-2002","pmid":"12038895","source":"Arch Pediatr Adolesc Med. 2002;156(6):607-614","title":"Validity of the CRAFFT substance abuse screening test among adolescent clinic patients","url":"https://doi.org/10.1001/archpedi.156.6.607"},"formula_expression":"CRAFFT = car + relax + alone + forget + friends + trouble; each 1 if true; max 6","purpose":"Sum the six Knight 2002 CRAFFT items and return whether two or more answers are affirmative.","markdown_url":"https://magentlab.com/docs/crafft.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"crafft"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"CRAFFT points 0-6"},{"name":"max_score","type":"integer","description":"6"},{"name":"screen_positive","type":"boolean","description":"true iff score ≥ 2 (Knight 2002: optimal cutoff for any problem / any disorder / dependence). Not a diagnosis."},{"name":"components","type":"array","description":"Per-item points"},{"name":"citation","type":"object","description":"Knight Arch Pediatr Adolesc Med 2002 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"alone":"false","car":"false","forget":"false","friends":"false","relax":"false","trouble":"false"},{"alone":"false","car":"false","forget":"false","friends":"false","relax":"false","trouble":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/crafft","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/crafft?car=false&relax=false&alone=false&forget=false&friends=false&trouble=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/crafft","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/hits","description":"Sherin 1998 HITS from four caller-assigned integers 1-5 (hurt, insult, threaten, scream; never=1 to frequently=5). magent does not interview the patient or interpret the items. Sum 4-20. Screen-positive when score ≥10. Deterministic published score with citation; not a diagnosis of intimate partner violence and not a medical device.","parameters":[{"in":"query","name":"hurt","type":"integer","description":"Caller-assigned Sherin 1998 HITS Hurt item (integer 1-5; never=1 to frequently=5): how often the partner physically hurt the patient. magent does not interview the patient.","required":true,"example":"1"},{"in":"query","name":"insult","type":"integer","description":"Caller-assigned Sherin 1998 HITS Insult item (integer 1-5; never=1 to frequently=5): how often the partner insulted or talked down to the patient. magent does not interview the patient.","required":true,"example":"1"},{"in":"query","name":"threaten","type":"integer","description":"Caller-assigned Sherin 1998 HITS Threaten item (integer 1-5; never=1 to frequently=5): how often the partner threatened the patient with harm. magent does not interview the patient.","required":true,"example":"1"},{"in":"query","name":"scream","type":"integer","description":"Caller-assigned Sherin 1998 HITS Scream item (integer 1-5; never=1 to frequently=5): how often the partner screamed or cursed at the patient. magent does not interview the patient.","required":true,"example":"1"}],"errors":[{"code":"invalid_hits","message":"hurt, insult, threaten, and scream must each be an integer from 1 to 5 (Sherin 1998 never=1 to frequently=5). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/hits","citation":{"authors":"Sherin KM, Sinacore JM, Li XQ, Zitter RE, Shakil A","id":"sherin-1998","pmid":"9669164","source":"Fam Med. 1998;30(7):508-512","title":"HITS: a short domestic violence screening tool for use in a family practice setting","url":"https://pubmed.ncbi.nlm.nih.gov/9669164"},"formula_expression":"HITS = hurt + insult + threaten + scream; each caller-assigned 1-5 (never=1 to frequently=5); max 20; screen-positive at ≥10","purpose":"Sum four caller-assigned Sherin 1998 HITS integers (hurt, insult, threaten, scream; each 1-5) and return the published total (4-20) and ≥10 screen.","markdown_url":"https://magentlab.com/docs/hits.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"hits"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"HITS points 4-20"},{"name":"max_score","type":"integer","description":"20"},{"name":"screen_positive","type":"boolean","description":"true iff score ≥ 10 (Sherin 1998). Not a diagnosis of intimate partner violence."},{"name":"components","type":"array","description":"Per-item caller-assigned points"},{"name":"citation","type":"object","description":"Sherin Fam Med 1998 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"hurt":"1","insult":"1","scream":"1","threaten":"1"},{"hurt":"1","insult":"1","scream":"1","threaten":"1"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/hits","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/hits?hurt=1&insult=1&threaten=1&scream=1","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/hits","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/hark","description":"Sohal 2007 HARK: four caller-assigned yes/no flags (humiliation, afraid, rape, kick), 1 point each, max 4. Screen-positive when score ≥1 (ROC-optimal cut-off in Sohal 2007). Deterministic published score with citation; not a diagnosis of intimate partner violence and not a medical device. magent does not interview the patient. Not HITS 1-5 scoring. Not the AAS pregnancy item (HARK removed it).","parameters":[{"in":"query","name":"humiliation","type":"boolean","description":"Within the last year, humiliated or emotionally abused in other ways by partner or ex-partner (HARK H; Sohal 2007). true or false as assigned by the caller. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"afraid","type":"boolean","description":"Within the last year, afraid of partner or ex-partner (HARK A; Sohal 2007). true or false as assigned by the caller. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"rape","type":"boolean","description":"Within the last year, raped or forced to have any kind of sexual activity by partner or ex-partner (HARK R; Sohal 2007). true or false as assigned by the caller. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"kick","type":"boolean","description":"Within the last year, kicked, hit, slapped or otherwise physically hurt by partner or ex-partner (HARK K; Sohal 2007). true or false as assigned by the caller. magent does not interview the patient.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/hark","citation":{"authors":"Sohal H, Eldridge S, Feder G","doi":"10.1186/1471-2296-8-49","id":"sohal-2007","pmid":"17727730","source":"BMC Fam Pract. 2007;8:49","title":"The sensitivity and specificity of four questions (HARK) to identify intimate partner violence: a diagnostic accuracy study in general practice","url":"https://doi.org/10.1186/1471-2296-8-49"},"formula_expression":"HARK = humiliation + afraid + rape + kick; each 1 if true; max 4","purpose":"Sum the four Sohal 2007 HARK items and return whether one or more answers are affirmative.","markdown_url":"https://magentlab.com/docs/hark.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"hark"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"HARK points 0-4"},{"name":"max_score","type":"integer","description":"4"},{"name":"screen_positive","type":"boolean","description":"true iff score ≥ 1 (Sohal 2007 ROC-optimal cut-off). Not a diagnosis of intimate partner violence."},{"name":"components","type":"array","description":"Per-item points"},{"name":"citation","type":"object","description":"Sohal BMC Fam Pract 2007 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"afraid":"false","humiliation":"false","kick":"false","rape":"false"},{"afraid":"false","humiliation":"false","kick":"false","rape":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/hark","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/hark?humiliation=false&afraid=false&rape=false&kick=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/hark","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/pc-ptsd-5","description":"Prins 2016 PC-PTSD-5: caller-assigned lifetime trauma-exposure gate plus five past-month yes/no items (nightmare/intrusion, avoidance, hypervigilance/startle, numbing/detachment, guilt/blame). Score 0 if trauma_exposure is false (items required but not counted). If true, each yes is 1 (max 5). Sensitive screen at ≥3. Not a PTSD diagnosis or medical device. magent does not interview.","parameters":[{"in":"query","name":"trauma_exposure","type":"boolean","description":"Caller-assigned Prins 2016 lifetime trauma-exposure gate: whether an unusually or especially frightening, horrible, or traumatic event has ever been experienced (examples in that paper include a serious accident or fire, physical or sexual assault or abuse, earthquake or flood, war, seeing someone killed or seriously injured, or a loved one dying by homicide or suicide). true or false. If false, the five past-month items are not counted (score is 0) but remain required. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"nightmare_or_intrusion","type":"boolean","description":"In the past month, nightmares about the event(s) or unwanted thoughts of the event(s) (Prins 2016). true or false as assigned by the caller. Counted only when trauma_exposure is true. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"avoidance","type":"boolean","description":"In the past month, tried hard not to think about the event(s) or went out of the way to avoid situations that reminded of the event(s) (Prins 2016). true or false as assigned by the caller. Counted only when trauma_exposure is true. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"hypervigilance_or_startle","type":"boolean","description":"In the past month, constantly on guard, watchful, or easily startled (Prins 2016). true or false as assigned by the caller. Counted only when trauma_exposure is true. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"numbing_or_detachment","type":"boolean","description":"In the past month, felt numb or detached from people, activities, or surroundings (Prins 2016). true or false as assigned by the caller. Counted only when trauma_exposure is true. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"guilt_or_blame","type":"boolean","description":"In the past month, felt guilty or unable to stop blaming self or others for the event(s) or problems the event(s) may have caused (Prins 2016). true or false as assigned by the caller. Counted only when trauma_exposure is true. magent does not interview the patient.","required":true,"example":"false"}],"errors":[{"code":"invalid_pc_ptsd_5","message":"PC-PTSD-5 inputs must match Prins 2016 trauma exposure and five past-month symptom items from that paper. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/pc-ptsd-5","citation":{"authors":"Prins A, Bovin MJ, Smolenski DJ, Marx BP, Kimerling R, Jenkins-Guarnieri MA, Kaloupek DG, Schnurr PP, Pless Kaiser A, Leyva YE, Tiet QQ","doi":"10.1007/s11606-016-3703-5","id":"prins-2016","pmid":"27170304","source":"J Gen Intern Med. 2016;31(10):1206-1211","title":"The Primary Care PTSD Screen for DSM-5 (PC-PTSD-5): Development and Evaluation Within a Veteran Primary Care Sample","url":"https://doi.org/10.1007/s11606-016-3703-5"},"formula_expression":"If trauma_exposure is false, PC-PTSD-5 = 0 (five past-month items are required but not counted). If trauma_exposure is true, PC-PTSD-5 = nightmare_or_intrusion + avoidance + hypervigilance_or_startle + numbing_or_detachment + guilt_or_blame; each 1 if true; max 5; at_or_above_sensitive_cutoff iff score ≥ 3 (Prins 2016 optimally sensitive cut; 4 maximized efficiency; 5 maximized specificity)","purpose":"Apply the Prins 2016 PC-PTSD-5 trauma-exposure gate and sum five caller-assigned past-month yes/no items (max 5). Return whether the score is at or above that paper's optimally sensitive cut of 3.","markdown_url":"https://magentlab.com/docs/pc-ptsd-5.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"pc_ptsd_5"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"trauma_exposure","type":"boolean","description":"Prins 2016 lifetime trauma-exposure gate as assigned by the caller. If false, score is 0."},{"name":"score","type":"integer","description":"PC-PTSD-5 points 0-5"},{"name":"max_score","type":"integer","description":"5"},{"name":"at_or_above_sensitive_cutoff","type":"boolean","description":"true iff score ≥ 3 (Prins 2016 optimally sensitive cut). That paper also reported 4 maximized efficiency and 5 maximized specificity; those are not the primary flag. Not a PTSD diagnosis."},{"name":"components","type":"array","description":"Per-item points (weight 0 if no trauma)"},{"name":"citation","type":"object","description":"Prins et al. J Gen Intern Med 2016 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"avoidance":"false","guilt_or_blame":"false","hypervigilance_or_startle":"false","nightmare_or_intrusion":"false","numbing_or_detachment":"false","trauma_exposure":"false"},{"avoidance":"false","guilt_or_blame":"false","hypervigilance_or_startle":"false","nightmare_or_intrusion":"false","numbing_or_detachment":"false","trauma_exposure":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/pc-ptsd-5","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/pc-ptsd-5?trauma_exposure=false&nightmare_or_intrusion=false&avoidance=false&hypervigilance_or_startle=false&numbing_or_detachment=false&guilt_or_blame=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/pc-ptsd-5","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/peg","description":"Krebs 2009 PEG from three caller-assigned integers 0-10 (pain_average, enjoyment_of_life, general_activity). Unweighted mean (range 0-10, one decimal). magent does not interview the patient. Krebs 2009 published no diagnostic cutoff; magent does not invent mild, moderate, or severe bands. Not a pain diagnosis, opioid order, or the full Brief Pain Inventory.","parameters":[{"in":"query","name":"pain_average","type":"integer","description":"Caller-assigned Krebs 2009 PEG item (integer 0-10): \"What number best describes your pain on average in the past week?\" 0 = no pain, 10 = pain as bad as you can imagine. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"enjoyment_of_life","type":"integer","description":"Caller-assigned Krebs 2009 PEG interference with enjoyment of life in the past week (integer 0-10). 0 = does not interfere, 10 = completely interferes. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"general_activity","type":"integer","description":"Caller-assigned Krebs 2009 PEG interference with general activity in the past week (integer 0-10). 0 = does not interfere, 10 = completely interferes. magent does not interview the patient.","required":true,"example":"0"}],"errors":[{"code":"invalid_peg_item","message":"pain_average, enjoyment_of_life, and general_activity must each be an integer from 0 to 10 (Krebs 2009 PEG). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/peg","citation":{"authors":"Krebs EE, Lorenz KA, Bair MJ, Damush TM, Wu J, Sutherland JM, Asch SM, Kroenke K","doi":"10.1007/s11606-009-0981-1","id":"krebs-2009","pmid":"19418100","source":"J Gen Intern Med. 2009;24(6):733-738","title":"Development and initial validation of the PEG, a three-item scale assessing pain intensity and interference","url":"https://doi.org/10.1007/s11606-009-0981-1"},"formula_expression":"PEG = (pain_average + enjoyment_of_life + general_activity) / 3; each caller-assigned 0-10; Krebs 2009; potential range 0-10","purpose":"Compute the Krebs 2009 PEG as the unweighted mean of three caller-assigned 0-10 integers (pain_average, enjoyment_of_life, general_activity). Potential range 0-10. Krebs 2009 did not publish a diagnostic cutoff.","markdown_url":"https://magentlab.com/docs/peg.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"peg"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"number","description":"Unweighted mean of the three items, 1 decimal"},{"name":"max_score","type":"integer","description":"Always 10"},{"name":"pain_average","type":"integer","description":"Caller-assigned average pain in the past week, 0-10"},{"name":"enjoyment_of_life","type":"integer","description":"Caller-assigned enjoyment-of-life interference in the past week, 0-10"},{"name":"general_activity","type":"integer","description":"Caller-assigned general-activity interference in the past week, 0-10"},{"name":"citation","type":"object","description":"Krebs et al. J Gen Intern Med 2009 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"enjoyment_of_life":"0","general_activity":"0","pain_average":"0"},{"enjoyment_of_life":"0","general_activity":"0","pain_average":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/peg","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/peg?pain_average=0&enjoyment_of_life=0&general_activity=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/peg","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/esas-r","description":"Watanabe 2011 ESAS-r from nine caller-assigned integers 0-10 (pain, tiredness, drowsiness, nausea, lack of appetite, shortness of breath, depression, anxiety, wellbeing; now; 0 none/best, 10 worst). magent does not administer the form. Sum 0-90. Watanabe 2011 published no severity classes for that sum. Not Bruera 1991 ESAS, not ESAS-r Renal (itch is not a core item), not a diagnosis or treatment order, and not a medical device.","parameters":[{"in":"query","name":"pain","type":"integer","description":"Caller-assigned Watanabe 2011 ESAS-r pain (integer 0-10): 0 no pain, 10 worst possible pain; how the person feels now. magent does not administer the form.","required":true,"example":"0"},{"in":"query","name":"tiredness","type":"integer","description":"Caller-assigned Watanabe 2011 ESAS-r tiredness (integer 0-10): 0 no tiredness, 10 worst possible tiredness (tiredness = lack of energy); how the person feels now. magent does not administer the form.","required":true,"example":"0"},{"in":"query","name":"drowsiness","type":"integer","description":"Caller-assigned Watanabe 2011 ESAS-r drowsiness (integer 0-10): 0 no drowsiness, 10 worst possible drowsiness (drowsiness = feeling sleepy); how the person feels now. magent does not administer the form.","required":true,"example":"0"},{"in":"query","name":"nausea","type":"integer","description":"Caller-assigned Watanabe 2011 ESAS-r nausea (integer 0-10): 0 no nausea, 10 worst possible nausea; how the person feels now. magent does not administer the form.","required":true,"example":"0"},{"in":"query","name":"lack_of_appetite","type":"integer","description":"Caller-assigned Watanabe 2011 ESAS-r lack of appetite (integer 0-10): 0 no lack of appetite, 10 worst possible lack of appetite; how the person feels now. magent does not administer the form.","required":true,"example":"0"},{"in":"query","name":"shortness_of_breath","type":"integer","description":"Caller-assigned Watanabe 2011 ESAS-r shortness of breath (integer 0-10): 0 no shortness of breath, 10 worst possible shortness of breath; how the person feels now. magent does not administer the form.","required":true,"example":"0"},{"in":"query","name":"depression","type":"integer","description":"Caller-assigned Watanabe 2011 ESAS-r depression (integer 0-10): 0 no depression, 10 worst possible depression (depression = feeling sad); how the person feels now. magent does not administer the form.","required":true,"example":"0"},{"in":"query","name":"anxiety","type":"integer","description":"Caller-assigned Watanabe 2011 ESAS-r anxiety (integer 0-10): 0 no anxiety, 10 worst possible anxiety (anxiety = feeling nervous); how the person feels now. magent does not administer the form.","required":true,"example":"0"},{"in":"query","name":"wellbeing","type":"integer","description":"Caller-assigned Watanabe 2011 ESAS-r wellbeing (integer 0-10): 0 best wellbeing, 10 worst possible wellbeing (wellbeing = how you feel overall); how the person feels now. magent does not administer the form.","required":true,"example":"0"}],"errors":[{"code":"invalid_esas_item","message":"each ESAS-r item must be an integer from 0 to 10 (Watanabe 2011). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/esas-r","citation":{"authors":"Watanabe SM, Nekolaichuk C, Beaumont C, Johnson L, Myers J, Strasser F","doi":"10.1016/j.jpainsymman.2010.04.020","id":"watanabe-2011","pmid":"20832987","source":"J Pain Symptom Manage. 2011;41(2):456-468","title":"A multicenter study comparing two numerical versions of the Edmonton Symptom Assessment System in palliative care patients","url":"https://doi.org/10.1016/j.jpainsymman.2010.04.020"},"formula_expression":"ESAS-r = pain + tiredness + drowsiness + nausea + lack_of_appetite + shortness_of_breath + depression + anxiety + wellbeing; each caller-assigned 0-10; max 90; Watanabe 2011; no total-score severity classes; not Bruera 1991 ESAS","purpose":"Sum nine caller-assigned Watanabe 2011 ESAS-r integers (0-10) and return the total (max 90). Does not invent severity classes for the sum.","markdown_url":"https://magentlab.com/docs/esas-r.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"esas_r"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Watanabe 2011 ESAS-r sum of nine caller-assigned 0-10 items (0-90)"},{"name":"max_score","type":"integer","description":"Always 90"},{"name":"components","type":"array","description":"Per-item caller-assigned points"},{"name":"citation","type":"object","description":"Watanabe et al. J Pain Symptom Manage 2011 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"anxiety":"0","depression":"0","drowsiness":"0","lack_of_appetite":"0","nausea":"0","pain":"0","shortness_of_breath":"0","tiredness":"0","wellbeing":"0"},{"anxiety":"0","depression":"0","drowsiness":"0","lack_of_appetite":"0","nausea":"0","pain":"0","shortness_of_breath":"0","tiredness":"0","wellbeing":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/esas-r","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/esas-r?pain=0&tiredness=0&drowsiness=0&nausea=0&lack_of_appetite=0&shortness_of_breath=0&depression=0&anxiety=0&wellbeing=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/esas-r","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/ace","description":"Felitti 1998 ACE Study: seven caller-assigned exposure categories (psychological abuse, physical abuse, sexual abuse, mother treated violently, household substance abuse, household mental illness, household incarceration), 1 point each, max 7. Returns ace_band 0, 1, 2, 3, or ge_4 (score ≥4). A category count, not a diagnosis, trauma inventory, or 10-item ACE-Q. magent does not interpret the items.","parameters":[{"in":"query","name":"psychological_abuse","type":"boolean","description":"Caller-assigned Felitti 1998 ACE Study psychological-abuse category (a parent or other adult in the household often or very often swore at, insulted, or put the respondent down, or acted in a way that made the respondent afraid of being physically hurt). true or false. magent does not interpret the item.","required":true,"example":"false"},{"in":"query","name":"physical_abuse","type":"boolean","description":"Caller-assigned Felitti 1998 ACE Study physical-abuse category (a parent or other adult in the household often or very often pushed, grabbed, shoved, or slapped the respondent, or often or very often hit the respondent so hard that there were marks or injury). true or false. magent does not interpret the item.","required":true,"example":"false"},{"in":"query","name":"sexual_abuse","type":"boolean","description":"Caller-assigned Felitti 1998 ACE Study sexual-abuse category (an adult or person at least 5 years older touched or fondled the respondent in a sexual way, had the respondent touch their body in a sexual way, or attempted or completed oral, anal, or vaginal intercourse). true or false. magent does not interpret the item.","required":true,"example":"false"},{"in":"query","name":"mother_treated_violently","type":"boolean","description":"Caller-assigned Felitti 1998 ACE Study mother-treated-violently category (mother or stepmother was pushed, grabbed, slapped, had something thrown at her, kicked, bitten, hit with a fist or hard object, repeatedly hit, or threatened or hurt with a knife or gun). true or false. magent does not interpret the item.","required":true,"example":"false"},{"in":"query","name":"household_substance_abuse","type":"boolean","description":"Caller-assigned Felitti 1998 ACE Study household substance-abuse category (lived with anyone who was a problem drinker or alcoholic, or who used street drugs). true or false. magent does not interpret the item.","required":true,"example":"false"},{"in":"query","name":"household_mental_illness","type":"boolean","description":"Caller-assigned Felitti 1998 ACE Study household mental-illness category (a household member was depressed or mentally ill, or a household member attempted suicide). true or false. magent does not interpret the item.","required":true,"example":"false"},{"in":"query","name":"household_incarceration","type":"boolean","description":"Caller-assigned Felitti 1998 ACE Study criminal-behavior-in-household category (a household member went to prison). true or false. magent does not interpret the item.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/ace","citation":{"authors":"Felitti VJ, Anda RF, Nordenberg D, et al.","doi":"10.1016/S0749-3797(98)00017-8","id":"felitti-1998","pmid":"9635069","source":"Am J Prev Med. 1998;14(4):245-258","title":"Relationship of childhood abuse and household dysfunction to many of the leading causes of death in adults. The Adverse Childhood Experiences (ACE) Study","url":"https://doi.org/10.1016/S0749-3797(98)00017-8"},"formula_expression":"ACE = psychological_abuse + physical_abuse + sexual_abuse + mother_treated_violently + household_substance_abuse + household_mental_illness + household_incarceration; each 1 if true; max 7","purpose":"Sum seven caller-assigned Felitti 1998 ACE Study exposure categories (1 point each, max 7) and return the published analysis band (0, 1, 2, 3, or ≥4).","markdown_url":"https://magentlab.com/docs/ace.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"ace"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"ACE category count 0-7"},{"name":"max_score","type":"integer","description":"7"},{"name":"ace_band","type":"string","description":"Felitti 1998 analysis band: 0, 1, 2, 3, or ge_4 (score ≥4). A count of exposure categories, not a diagnosis."},{"name":"components","type":"array","description":"Per-category points"},{"name":"citation","type":"object","description":"Felitti et al. Am J Prev Med 1998 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"household_incarceration":"false","household_mental_illness":"false","household_substance_abuse":"false","mother_treated_violently":"false","physical_abuse":"false","psychological_abuse":"false","sexual_abuse":"false"},{"household_incarceration":"false","household_mental_illness":"false","household_substance_abuse":"false","mother_treated_violently":"false","physical_abuse":"false","psychological_abuse":"false","sexual_abuse":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/ace","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/ace?psychological_abuse=false&physical_abuse=false&sexual_abuse=false&mother_treated_violently=false&household_substance_abuse=false&household_mental_illness=false&household_incarceration=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/ace","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/phq-9","description":"Kroenke 2001 PHQ-9 from nine caller-assigned DSM-IV depression items as integers 0-3 (0 not at all, 1 several days, 2 more than half the days, 3 nearly every day). magent does not interpret the items. Total 0-27. Severity: 0-4 none_minimal, 5-9 mild, 10-14 moderate, 15-19 moderately_severe, 20-27 severe. Returns screen_ge_10 (score ≥10; this paper 88% sensitivity and 88% specificity for major depression). Not a diagnosis, not a treatment order, not GAD-7, and not PHQ-2/PHQ-8.","parameters":[{"in":"query","name":"anhedonia","type":"integer","description":"Caller-assigned Kroenke 2001 PHQ-9 item 1 (integer 0-3): little interest or pleasure in doing things (0 not at all, 1 several days, 2 more than half the days, 3 nearly every day). magent does not interpret the item.","required":true,"example":"0"},{"in":"query","name":"depressed","type":"integer","description":"Caller-assigned Kroenke 2001 PHQ-9 item 2 (integer 0-3): feeling down, depressed, or hopeless. magent does not interpret the item.","required":true,"example":"0"},{"in":"query","name":"sleep","type":"integer","description":"Caller-assigned Kroenke 2001 PHQ-9 item 3 (integer 0-3): trouble falling or staying asleep, or sleeping too much. magent does not interpret the item.","required":true,"example":"0"},{"in":"query","name":"energy","type":"integer","description":"Caller-assigned Kroenke 2001 PHQ-9 item 4 (integer 0-3): feeling tired or having little energy. magent does not interpret the item.","required":true,"example":"0"},{"in":"query","name":"appetite","type":"integer","description":"Caller-assigned Kroenke 2001 PHQ-9 item 5 (integer 0-3): poor appetite or overeating. magent does not interpret the item.","required":true,"example":"0"},{"in":"query","name":"failure","type":"integer","description":"Caller-assigned Kroenke 2001 PHQ-9 item 6 (integer 0-3): feeling bad about yourself — a failure, or having let yourself or your family down. magent does not interpret the item.","required":true,"example":"0"},{"in":"query","name":"concentration","type":"integer","description":"Caller-assigned Kroenke 2001 PHQ-9 item 7 (integer 0-3): trouble concentrating on things such as reading or watching television. magent does not interpret the item.","required":true,"example":"0"},{"in":"query","name":"psychomotor","type":"integer","description":"Caller-assigned Kroenke 2001 PHQ-9 item 8 (integer 0-3): moving or speaking so slowly that other people could have noticed, or being so fidgety or restless that you have been moving around a lot more than usual. magent does not interpret the item.","required":true,"example":"0"},{"in":"query","name":"self_harm","type":"integer","description":"Caller-assigned Kroenke 2001 PHQ-9 item 9 (integer 0-3): thoughts that you would be better off dead, or of hurting yourself in some way. magent does not interpret the item.","required":true,"example":"0"}],"errors":[{"code":"invalid_phq9_item","message":"each PHQ-9 item must be an integer from 0 to 3 (Kroenke 2001: 0 not at all, 1 several days, 2 more than half the days, 3 nearly every day). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/phq-9","citation":{"authors":"Kroenke K, Spitzer RL, Williams JBW","doi":"10.1046/j.1525-1497.2001.016009606.x","id":"kroenke-2001","pmid":"11556941","source":"J Gen Intern Med. 2001;16(9):606-613","title":"The PHQ-9: validity of a brief depression severity measure","url":"https://doi.org/10.1046/j.1525-1497.2001.016009606.x"},"formula_expression":"PHQ-9 = anhedonia + depressed + sleep + energy + appetite + failure + concentration + psychomotor + self_harm; each caller-assigned 0-3; max 27","purpose":"Sum nine caller-assigned Kroenke 2001 PHQ-9 integers (0-3) and return the published total (max 27), severity cutpoints, and ≥10 screen.","markdown_url":"https://magentlab.com/docs/phq-9.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"phq_9"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"PHQ-9 points 0-27"},{"name":"max_score","type":"integer","description":"27"},{"name":"severity","type":"string","description":"Kroenke 2001 cutpoints: none_minimal (0-4), mild (5-9), moderate (10-14), moderately_severe (15-19), severe (20-27). Score 0 is none_minimal. Not a diagnosis."},{"name":"screen_ge_10","type":"boolean","description":"true iff score ≥ 10 (Kroenke 2001: score ≥10 sensitivity 88% and specificity 88% for major depression). Not a diagnosis."},{"name":"components","type":"array","description":"Per-item caller-assigned points"},{"name":"citation","type":"object","description":"Kroenke et al. J Gen Intern Med 2001 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"anhedonia":"0","appetite":"0","concentration":"0","depressed":"0","energy":"0","failure":"0","psychomotor":"0","self_harm":"0","sleep":"0"},{"anhedonia":"0","appetite":"0","concentration":"0","depressed":"0","energy":"0","failure":"0","psychomotor":"0","self_harm":"0","sleep":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/phq-9","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/phq-9?anhedonia=0&depressed=0&sleep=0&energy=0&appetite=0&failure=0&concentration=0&psychomotor=0&self_harm=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/phq-9","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/gad-7","description":"Spitzer 2006 GAD-7 from seven caller-assigned integers 0-3 (nervous, control worry, worry too much, relaxing, restless, irritable, afraid); magent does not interpret the items. Total 0-21. Cut points 5/10/15 (mild/moderate/severe); 0-4 is below the mild cut (minimal). Returns case_finding_ge_10 (score ≥10; paper sensitivity 89% and specificity 82% for GAD). Not a GAD diagnosis, not a treatment order, not PHQ-9, and not GAD-2.","parameters":[{"in":"query","name":"nervous","type":"integer","description":"Caller-assigned Spitzer 2006 GAD-7 item 1 points (integer 0-3): feeling nervous, anxious, or on edge. magent does not interpret the item.","required":true,"example":"0"},{"in":"query","name":"control_worry","type":"integer","description":"Caller-assigned Spitzer 2006 GAD-7 item 2 points (integer 0-3): not being able to stop or control worrying. magent does not interpret the item.","required":true,"example":"0"},{"in":"query","name":"worry_too_much","type":"integer","description":"Caller-assigned Spitzer 2006 GAD-7 item 3 points (integer 0-3): worrying too much about different things. magent does not interpret the item.","required":true,"example":"0"},{"in":"query","name":"relaxing","type":"integer","description":"Caller-assigned Spitzer 2006 GAD-7 item 4 points (integer 0-3): trouble relaxing. magent does not interpret the item.","required":true,"example":"0"},{"in":"query","name":"restless","type":"integer","description":"Caller-assigned Spitzer 2006 GAD-7 item 5 points (integer 0-3): being so restless that it is hard to sit still. magent does not interpret the item.","required":true,"example":"0"},{"in":"query","name":"irritable","type":"integer","description":"Caller-assigned Spitzer 2006 GAD-7 item 6 points (integer 0-3): becoming easily annoyed or irritable. magent does not interpret the item.","required":true,"example":"0"},{"in":"query","name":"afraid","type":"integer","description":"Caller-assigned Spitzer 2006 GAD-7 item 7 points (integer 0-3): feeling afraid as if something awful might happen. magent does not interpret the item.","required":true,"example":"0"}],"errors":[{"code":"invalid_gad7_item","message":"each GAD-7 item must be an integer from 0 to 3 (Spitzer 2006: 0 not at all, 1 several days, 2 more than half the days, 3 nearly every day). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/gad-7","citation":{"authors":"Spitzer RL, Kroenke K, Williams JBW, Löwe B","doi":"10.1001/archinte.166.10.1092","id":"spitzer-2006","pmid":"16717171","source":"Arch Intern Med. 2006;166(10):1092-1097","title":"A brief measure for assessing generalized anxiety disorder: the GAD-7","url":"https://doi.org/10.1001/archinte.166.10.1092"},"formula_expression":"GAD-7 = nervous + control_worry + worry_too_much + relaxing + restless + irritable + afraid; each caller-assigned 0-3; max 21","purpose":"Sum seven caller-assigned Spitzer 2006 GAD-7 integers (0-3) and return the published 0-21 total, 5/10/15 severity cuts, and ≥10 case-finding flag.","markdown_url":"https://magentlab.com/docs/gad-7.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"gad_7"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"GAD-7 points 0-21"},{"name":"max_score","type":"integer","description":"21"},{"name":"severity","type":"string","description":"Spitzer 2006 cut points: minimal (0-4, below the mild cut of 5), mild (5-9), moderate (10-14), severe (15-21). Not extra named classes."},{"name":"case_finding_ge_10","type":"boolean","description":"true iff score ≥ 10 (Spitzer 2006: GAD-7 score ≥10 sensitivity 89% and specificity 82% for GAD). Not a GAD diagnosis."},{"name":"components","type":"array","description":"Per-item caller-assigned points"},{"name":"citation","type":"object","description":"Spitzer et al. Arch Intern Med 2006 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"afraid":"0","control_worry":"0","irritable":"0","nervous":"0","relaxing":"0","restless":"0","worry_too_much":"0"},{"afraid":"0","control_worry":"0","irritable":"0","nervous":"0","relaxing":"0","restless":"0","worry_too_much":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/gad-7","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/gad-7?nervous=0&control_worry=0&worry_too_much=0&relaxing=0&restless=0&irritable=0&afraid=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/gad-7","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/pss-3","description":"Boudreaux 2015 PSS-3 from four caller-assigned flags: depressed_mood (2-week segue, not in the screen), ideation_2_weeks, lifetime_attempt, and attempt_within_6_months. screen_positive if 2-week ideation or a lifetime attempt within 6 months (ED-SAFE / Boudreaux 2016 Am J Prev Med). Depression is not factored into screening results. magent does not interview the patient. Not a diagnosis. Not C-SSRS. Not a medical device.","parameters":[{"in":"query","name":"depressed_mood","type":"boolean","description":"Over the past 2 weeks, felt down, depressed, or hopeless (Boudreaux 2015 PSS-3 segue item). true or false as assigned by the caller. Not factored into screen_positive. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"ideation_2_weeks","type":"boolean","description":"Active suicidal ideation in the past 2 weeks (Boudreaux 2015: over the past 2 weeks, thoughts of killing yourself). true or false as assigned by the caller. screen_positive is true if this is true. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"lifetime_attempt","type":"boolean","description":"Lifetime suicide attempt (Boudreaux 2015: ever attempted to kill yourself). true or false as assigned by the caller. If false, attempt_within_6_months must be false. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"attempt_within_6_months","type":"boolean","description":"Most recent suicide attempt was within 6 months (Boudreaux 2015 timing follow-up). true or false as assigned by the caller. Always required. If lifetime_attempt is false this must be false. screen_positive is true when lifetime_attempt and this are both true. magent does not interview the patient.","required":true,"example":"false"}],"errors":[{"code":"invalid_pss3","message":"PSS-3 needs Boudreaux 2015 depressed_mood, ideation_2_weeks, lifetime_attempt, and attempt_within_6_months as true or false. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/pss-3","citation":{"authors":"Boudreaux ED, Jaques ML, Brady KM, Matson A, Allen MH","doi":"10.1080/13811118.2015.1034604","id":"boudreaux-2015","pmid":"25826715","source":"Arch Suicide Res. 2015;19(2):151-160","title":"The Patient Safety Screener: Validation of a Brief Suicide Risk Screener for Emergency Department Settings","url":"https://doi.org/10.1080/13811118.2015.1034604"},"formula_expression":"screen_positive iff ideation_2_weeks OR (lifetime_attempt AND attempt_within_6_months); depressed_mood (past 2 weeks down/depressed/hopeless) is a segue item and is not factored into screening results; this positive rule is the same-group ED-SAFE definition used with PSS-3 (Boudreaux 2016 Am J Prev Med: ideation past 2 weeks or attempt within 6 months); if lifetime_attempt is false then attempt_within_6_months must be false; four caller-assigned bools; magent does not interview the patient; not a diagnosis; not C-SSRS","purpose":"Apply Boudreaux 2015 PSS-3 from four caller-assigned flags and return screen_positive using the same-group ED-SAFE definition used with PSS-3 (Boudreaux 2016 Am J Prev Med): ideation past 2 weeks or attempt within 6 months. Depression is a segue and is not factored into screening results. magent does not interview the patient. Not a diagnosis. Not C-SSRS.","markdown_url":"https://magentlab.com/docs/pss-3.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"pss_3"},{"name":"formula_expression","type":"string","description":"Published PSS-3 / ED-SAFE screen-positive rule"},{"name":"depressed_mood","type":"boolean","description":"Boudreaux 2015 2-week down/depressed/hopeless segue as assigned by the caller. Not in screen_positive."},{"name":"ideation_2_weeks","type":"boolean","description":"Active suicidal ideation in the past 2 weeks as assigned by the caller"},{"name":"lifetime_attempt","type":"boolean","description":"Lifetime suicide attempt as assigned by the caller"},{"name":"attempt_within_6_months","type":"boolean","description":"Most recent attempt was within 6 months as assigned by the caller"},{"name":"screen_positive","type":"boolean","description":"true iff ideation_2_weeks or (lifetime_attempt and attempt_within_6_months). Same-group ED-SAFE definition used with PSS-3 (Boudreaux 2016 Am J Prev Med). Depression is not factored in. Not a diagnosis. Not C-SSRS."},{"name":"components","type":"array","description":"Per-flag Tree rows depressed_mood, ideation_2_weeks, lifetime_attempt, attempt_within_6_months with factor and met"},{"name":"citation","type":"object","description":"Boudreaux 2015 Arch Suicide Res citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"attempt_within_6_months":"false","depressed_mood":"false","ideation_2_weeks":"false","lifetime_attempt":"false"},{"attempt_within_6_months":"false","depressed_mood":"false","ideation_2_weeks":"false","lifetime_attempt":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/pss-3","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/pss-3?depressed_mood=false&ideation_2_weeks=false&lifetime_attempt=false&attempt_within_6_months=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/pss-3","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/cas","description":"Lee 2020 Coronavirus Anxiety Scale from five caller-assigned integers 0-4 over the past two weeks (dizzy, sleep, paralyzed, appetite, nausea). magent does not interview the patient. 0 not at all, 1 rare less than a day or two, 2 several days, 3 more than 7 days, 4 nearly every day. Total 0-20. Returns screen_ge_9 (score ≥9; this paper 90% sensitivity and 85% specificity). Not a diagnosis, not GAD-7, and not extra mild/moderate bands.","parameters":[{"in":"query","name":"dizzy","type":"integer","description":"Caller-assigned Lee 2020 CAS item 1 (integer 0-4, past two weeks): I felt dizzy, lightheaded, or faint when I read or listened to news about the coronavirus (0 not at all, 1 rare less than a day or two, 2 several days, 3 more than 7 days, 4 nearly every day). magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"sleep","type":"integer","description":"Caller-assigned Lee 2020 CAS item 2 (integer 0-4, past two weeks): I had trouble falling or staying asleep because I was thinking about the coronavirus (0 not at all, 1 rare less than a day or two, 2 several days, 3 more than 7 days, 4 nearly every day). magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"paralyzed","type":"integer","description":"Caller-assigned Lee 2020 CAS item 3 (integer 0-4, past two weeks): I felt paralyzed or frozen when I thought about or was exposed to information about the coronavirus (0 not at all, 1 rare less than a day or two, 2 several days, 3 more than 7 days, 4 nearly every day). magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"appetite","type":"integer","description":"Caller-assigned Lee 2020 CAS item 4 (integer 0-4, past two weeks): I lost interest in eating when I thought about or was exposed to information about the coronavirus (0 not at all, 1 rare less than a day or two, 2 several days, 3 more than 7 days, 4 nearly every day). magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"nausea","type":"integer","description":"Caller-assigned Lee 2020 CAS item 5 (integer 0-4, past two weeks): I felt nauseous or had stomach problems when I thought about or was exposed to information about the coronavirus (0 not at all, 1 rare less than a day or two, 2 several days, 3 more than 7 days, 4 nearly every day). magent does not interview the patient.","required":true,"example":"0"}],"errors":[{"code":"invalid_cas","message":"CAS needs the five Lee 2020 items as integers 0-4 (not at all through nearly every day). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/cas","citation":{"authors":"Lee SA","doi":"10.1080/07481187.2020.1748481","id":"lee-2020","pmid":"32299304","source":"Death Studies. 2020;44(7):393-401","title":"Coronavirus Anxiety Scale: A brief mental health screener for COVID-19 related anxiety","url":"https://doi.org/10.1080/07481187.2020.1748481"},"formula_expression":"CAS = dizzy + sleep + paralyzed + appetite + nausea; each caller-assigned 0-4 (Lee 2020 / DSM-5 cross-cutting: 0 not at all, 1 rare less than a day or two, 2 several days, 3 more than 7 days, 4 nearly every day); past two weeks; max 20; screen_ge_9 iff score ≥ 9","purpose":"Sum five caller-assigned Lee 2020 Coronavirus Anxiety Scale integers (0-4) and return the published total (max 20) and ≥9 screen.","markdown_url":"https://magentlab.com/docs/cas.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"cas"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"CAS points 0-20"},{"name":"max_score","type":"integer","description":"20"},{"name":"screen_ge_9","type":"boolean","description":"true iff score ≥ 9 (Lee 2020 optimized cut: 90% sensitivity and 85% specificity for probable dysfunctional coronavirus-related anxiety). Not a diagnosis. No extra mild/moderate bands."},{"name":"components","type":"array","description":"Per-item caller-assigned points"},{"name":"citation","type":"object","description":"Lee Death Studies 2020 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"appetite":"0","dizzy":"0","nausea":"0","paralyzed":"0","sleep":"0"},{"appetite":"0","dizzy":"0","nausea":"0","paralyzed":"0","sleep":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/cas","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/cas?dizzy=0&sleep=0&paralyzed=0&appetite=0&nausea=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/cas","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/qids","description":"Rush 2003 QIDS-SR16 from 16 caller-assigned integers 0-3 mapped to nine DSM-IV domains. Sleep is the max of four sleep items; appetite/weight is the max of four appetite and weight items; psychomotor is the max of retardation and agitation; remaining items add as published. Total 0-27. Severity: 0-5 none, 6-10 mild, 11-15 moderate, 16-20 severe, 21-27 very_severe. magent does not interpret items or administer a depression interview. Not a diagnosis, not QIDS-C, not IDS-30, and not PHQ-9.","parameters":[{"in":"query","name":"sleep_onset","type":"integer","description":"Caller-assigned Rush 2003 QIDS-SR item 1 (integer 0-3): falling asleep / initial insomnia over the prior 7 days. The sleep domain is the maximum of items 1-4, not the sum. magent does not interpret the item.","required":true,"example":"0"},{"in":"query","name":"mid_nocturnal","type":"integer","description":"Caller-assigned Rush 2003 QIDS-SR item 2 (integer 0-3): sleep during the night / middle insomnia. The sleep domain is the maximum of items 1-4, not the sum. magent does not interpret the item.","required":true,"example":"0"},{"in":"query","name":"early_morning","type":"integer","description":"Caller-assigned Rush 2003 QIDS-SR item 3 (integer 0-3): waking up too early / late insomnia. The sleep domain is the maximum of items 1-4, not the sum. magent does not interpret the item.","required":true,"example":"0"},{"in":"query","name":"hypersomnia","type":"integer","description":"Caller-assigned Rush 2003 QIDS-SR item 4 (integer 0-3): sleeping too much. The sleep domain is the maximum of items 1-4, not the sum. magent does not interpret the item.","required":true,"example":"0"},{"in":"query","name":"sad_mood","type":"integer","description":"Caller-assigned Rush 2003 QIDS-SR item 5 (integer 0-3): feeling sad. Adds as published (one domain). magent does not interpret the item.","required":true,"example":"0"},{"in":"query","name":"decreased_appetite","type":"integer","description":"Caller-assigned Rush 2003 QIDS-SR item 6 (integer 0-3): decreased appetite. The appetite/weight domain is the maximum of items 6-9, not the sum. magent does not interpret the item.","required":true,"example":"0"},{"in":"query","name":"increased_appetite","type":"integer","description":"Caller-assigned Rush 2003 QIDS-SR item 7 (integer 0-3): increased appetite. The appetite/weight domain is the maximum of items 6-9, not the sum. magent does not interpret the item.","required":true,"example":"0"},{"in":"query","name":"decreased_weight","type":"integer","description":"Caller-assigned Rush 2003 QIDS-SR item 8 (integer 0-3): decreased weight. The appetite/weight domain is the maximum of items 6-9, not the sum. magent does not interpret the item.","required":true,"example":"0"},{"in":"query","name":"increased_weight","type":"integer","description":"Caller-assigned Rush 2003 QIDS-SR item 9 (integer 0-3): increased weight. The appetite/weight domain is the maximum of items 6-9, not the sum. magent does not interpret the item.","required":true,"example":"0"},{"in":"query","name":"concentration","type":"integer","description":"Caller-assigned Rush 2003 QIDS-SR item 10 (integer 0-3): concentration / decision making. Adds as published (one domain). magent does not interpret the item.","required":true,"example":"0"},{"in":"query","name":"self_view","type":"integer","description":"Caller-assigned Rush 2003 QIDS-SR item 11 (integer 0-3): view of myself / self-criticism. Adds as published (one domain). magent does not interpret the item.","required":true,"example":"0"},{"in":"query","name":"suicidal_ideation","type":"integer","description":"Caller-assigned Rush 2003 QIDS-SR item 12 (integer 0-3): thoughts of death or suicide. Adds as published (one domain). magent does not interpret the item.","required":true,"example":"0"},{"in":"query","name":"interest","type":"integer","description":"Caller-assigned Rush 2003 QIDS-SR item 13 (integer 0-3): general interest. Adds as published (one domain). magent does not interpret the item.","required":true,"example":"0"},{"in":"query","name":"energy","type":"integer","description":"Caller-assigned Rush 2003 QIDS-SR item 14 (integer 0-3): energy / fatigability. Adds as published (one domain). magent does not interpret the item.","required":true,"example":"0"},{"in":"query","name":"psychomotor_retardation","type":"integer","description":"Caller-assigned Rush 2003 QIDS-SR item 15 (integer 0-3): feeling slowed down. The psychomotor domain is the maximum of items 15-16, not the sum. magent does not interpret the item.","required":true,"example":"0"},{"in":"query","name":"psychomotor_agitation","type":"integer","description":"Caller-assigned Rush 2003 QIDS-SR item 16 (integer 0-3): feeling restless. The psychomotor domain is the maximum of items 15-16, not the sum. magent does not interpret the item.","required":true,"example":"0"}],"errors":[{"code":"invalid_qids","message":"Each QIDS-SR item must be an integer in the Rush 2003 published range; sleep, appetite, and weight domains use the published max-of-group scoring. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/qids","citation":{"authors":"Rush AJ, Trivedi MH, Ibrahim HM, et al.","doi":"10.1016/s0006-3223(02)01866-8","id":"rush-2003","pmid":"12946886","source":"Biol Psychiatry. 2003;54(5):573-583","title":"The 16-Item Quick Inventory of Depressive Symptomatology (QIDS), clinician rating (QIDS-C), and self-report (QIDS-SR): a psychometric evaluation in patients with chronic major depression","url":"https://doi.org/10.1016/s0006-3223(02)01866-8"},"formula_expression":"QIDS-SR16 = max(sleep_onset, mid_nocturnal, early_morning, hypersomnia) + sad_mood + max(decreased_appetite, increased_appetite, decreased_weight, increased_weight) + concentration + self_view + suicidal_ideation + interest + energy + max(psychomotor_retardation, psychomotor_agitation); each caller-assigned 0-3; nine domains; max 27","purpose":"Map 16 caller-assigned Rush 2003 QIDS-SR integers (0-3) to nine DSM-IV domains (sleep, appetite/weight, and psychomotor are each the published max of their items) and return the 0-27 total and IRT severity band.","markdown_url":"https://magentlab.com/docs/qids.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"qids"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"QIDS-SR16 points 0-27"},{"name":"max_score","type":"integer","description":"27"},{"name":"severity","type":"string","description":"Rush 2003 IRT conversion bands: none (0-5), mild (6-10), moderate (11-15), severe (16-20), very_severe (21-27). Not a diagnosis. Not PHQ-9 cutoffs."},{"name":"sleep_points","type":"integer","description":"Sleep domain 0-3: maximum of the four sleep items, not the sum"},{"name":"appetite_weight_points","type":"integer","description":"Appetite/weight domain 0-3: maximum of the four appetite/weight items, not the sum"},{"name":"psychomotor_points","type":"integer","description":"Psychomotor domain 0-3: maximum of psychomotor_retardation and psychomotor_agitation, not the sum"},{"name":"components","type":"array","description":"Nine DSM-IV domain points"},{"name":"citation","type":"object","description":"Rush et al. Biol Psychiatry 2003 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"concentration":"0","decreased_appetite":"0","decreased_weight":"0","early_morning":"0","energy":"0","hypersomnia":"0","increased_appetite":"0","increased_weight":"0","interest":"0","mid_nocturnal":"0","psychomotor_agitation":"0","psychomotor_retardation":"0","sad_mood":"0","self_view":"0","sleep_onset":"0","suicidal_ideation":"0"},{"concentration":"0","decreased_appetite":"0","decreased_weight":"0","early_morning":"0","energy":"0","hypersomnia":"0","increased_appetite":"0","increased_weight":"0","interest":"0","mid_nocturnal":"0","psychomotor_agitation":"0","psychomotor_retardation":"0","sad_mood":"0","self_view":"0","sleep_onset":"0","suicidal_ideation":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/qids","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/qids?sleep_onset=0&mid_nocturnal=0&early_morning=0&hypersomnia=0&sad_mood=0&decreased_appetite=0&increased_appetite=0&decreased_weight=0&increased_weight=0&concentration=0&self_view=0&suicidal_ideation=0&interest=0&energy=0&psychomotor_retardation=0&psychomotor_agitation=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/qids","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/mdi","description":"Bech 2001 MDI: 12 caller-assigned integers 0-5 (at no time to all the time, last 2 weeks) covering 10 ICD-10/DSM-IV depression symptoms. Psychomotor (restless vs subdued) and appetite (reduced vs increased) each add the max of the pair, not the sum. Total 0-50. This paper's optimal total-score cutoff is 26. magent does not interview, apply Olsen 2003 HAM-D mapped bands, DSM-IV/ICD-10 algorithms, PHQ-9, QIDS, or Hamilton depression. Not a diagnosis.","parameters":[{"in":"query","name":"low_spirits","type":"integer","description":"Caller-assigned Bech 2001 MDI item 1 (integer 0-5): felt low in spirits or sad over the last 2 weeks (0 at no time, 1 some of the time, 2 slightly less than half of the time, 3 slightly more than half of the time, 4 most of the time, 5 all the time). Adds as published. magent does not interpret the item.","required":true,"example":"0"},{"in":"query","name":"lost_interest","type":"integer","description":"Caller-assigned Bech 2001 MDI item 2 (integer 0-5): lost interest in daily activities. Adds as published. magent does not interpret the item.","required":true,"example":"0"},{"in":"query","name":"lack_of_energy","type":"integer","description":"Caller-assigned Bech 2001 MDI item 3 (integer 0-5): lacking in energy and strength. Adds as published. magent does not interpret the item.","required":true,"example":"0"},{"in":"query","name":"low_self_confidence","type":"integer","description":"Caller-assigned Bech 2001 MDI item 4 (integer 0-5): felt less self-confident. Adds as published. magent does not interpret the item.","required":true,"example":"0"},{"in":"query","name":"guilt","type":"integer","description":"Caller-assigned Bech 2001 MDI item 5 (integer 0-5): bad conscience or feelings of guilt. Adds as published. magent does not interpret the item.","required":true,"example":"0"},{"in":"query","name":"life_not_worth_living","type":"integer","description":"Caller-assigned Bech 2001 MDI item 6 (integer 0-5): felt that life was not worth living. Adds as published. magent does not interpret the item.","required":true,"example":"0"},{"in":"query","name":"concentration","type":"integer","description":"Caller-assigned Bech 2001 MDI item 7 (integer 0-5): difficulty concentrating, for example when reading the newspaper or watching television. Adds as published. magent does not interpret the item.","required":true,"example":"0"},{"in":"query","name":"restless","type":"integer","description":"Caller-assigned Bech 2001 MDI item 8a (integer 0-5): felt very restless. The psychomotor item is the maximum of restless and subdued, not the sum. magent does not interpret the item.","required":true,"example":"0"},{"in":"query","name":"subdued","type":"integer","description":"Caller-assigned Bech 2001 MDI item 8b (integer 0-5): felt subdued or slowed down. The psychomotor item is the maximum of restless and subdued, not the sum. magent does not interpret the item.","required":true,"example":"0"},{"in":"query","name":"sleep","type":"integer","description":"Caller-assigned Bech 2001 MDI item 9 (integer 0-5): trouble sleeping at night. Adds as published. magent does not interpret the item.","required":true,"example":"0"},{"in":"query","name":"reduced_appetite","type":"integer","description":"Caller-assigned Bech 2001 MDI item 10a (integer 0-5): reduced appetite. The appetite item is the maximum of reduced_appetite and increased_appetite, not the sum. magent does not interpret the item.","required":true,"example":"0"},{"in":"query","name":"increased_appetite","type":"integer","description":"Caller-assigned Bech 2001 MDI item 10b (integer 0-5): increased appetite. The appetite item is the maximum of reduced_appetite and increased_appetite, not the sum. magent does not interpret the item.","required":true,"example":"0"}],"errors":[{"code":"invalid_mdi","message":"Each Major Depression Inventory item must be an integer in the Bech 2001 published range. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/mdi","citation":{"authors":"Bech P, Rasmussen NA, Olsen LR, Noerholm V, Abildgaard W","doi":"10.1016/s0165-0327(00)00309-8","id":"bech-2001","pmid":"11578668","source":"J Affect Disord. 2001;66(2-3):159-164","title":"The sensitivity and specificity of the Major Depression Inventory, using the Present State Examination as the index of diagnostic validity","url":"https://doi.org/10.1016/s0165-0327(00)00309-8"},"formula_expression":"MDI = low_spirits + lost_interest + lack_of_energy + low_self_confidence + guilt + life_not_worth_living + concentration + max(restless, subdued) + sleep + max(reduced_appetite, increased_appetite); each caller-assigned 0-5; ten scored items; max 50; Bech 2001 optimal total-score cutoff 26","purpose":"Map 12 caller-assigned Bech 2001 MDI integers (0-5 over the last 2 weeks) to ten DSM-IV/ICD-10 symptom items (appetite and psychomotor are each the published max of their pair) and return the 0-50 total and whether it meets this paper's optimal cutoff of 26.","markdown_url":"https://magentlab.com/docs/mdi.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"mdi"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"MDI points 0-50"},{"name":"max_score","type":"integer","description":"50"},{"name":"at_or_above_cutoff","type":"boolean","description":"true iff score ≥ 26 (Bech 2001 optimal total-score cutoff). Not a diagnosis. Not Olsen 2003 HAM-D mapped mild/moderate/severe bands."},{"name":"appetite_points","type":"integer","description":"Appetite item 0-5: maximum of reduced_appetite and increased_appetite, not the sum"},{"name":"psychomotor_points","type":"integer","description":"Psychomotor item 0-5: maximum of restless and subdued, not the sum"},{"name":"components","type":"array","description":"Ten scored DSM-IV/ICD-10 symptom points"},{"name":"citation","type":"object","description":"Bech et al. J Affect Disord 2001 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"concentration":"0","guilt":"0","increased_appetite":"0","lack_of_energy":"0","life_not_worth_living":"0","lost_interest":"0","low_self_confidence":"0","low_spirits":"0","reduced_appetite":"0","restless":"0","sleep":"0","subdued":"0"},{"concentration":"0","guilt":"0","increased_appetite":"0","lack_of_energy":"0","life_not_worth_living":"0","lost_interest":"0","low_self_confidence":"0","low_spirits":"0","reduced_appetite":"0","restless":"0","sleep":"0","subdued":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/mdi","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/mdi?low_spirits=0&lost_interest=0&lack_of_energy=0&low_self_confidence=0&guilt=0&life_not_worth_living=0&concentration=0&restless=0&subdued=0&sleep=0&reduced_appetite=0&increased_appetite=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/mdi","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/mdq","description":"Hirschfeld 2000 Mood Disorder Questionnaire (MDQ): thirteen caller-assigned yes/no lifetime manic/hypomanic items, 1 point each, max 13. Positive screen requires score ≥7 AND same_period AND moderate_or_serious_problem (that paper: sensitivity 0.73 and specificity 0.90 in a psychiatric outpatient sample). Not a bipolar diagnosis, not a medical device, and not Hirschfeld 2003 general-population cutoff tweaks. magent does not interview the patient.","parameters":[{"in":"query","name":"felt_hyper","type":"boolean","description":"Hirschfeld 2000 MDQ item 1: a period of time not the usual self when felt so good or so hyper that other people thought they were not the normal self, or so hyper that they got into trouble. true or false as assigned by the caller. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"irritable","type":"boolean","description":"Hirschfeld 2000 MDQ item 2: so irritable that they shouted at people or started fights or arguments. true or false as assigned by the caller. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"more_self_confident","type":"boolean","description":"Hirschfeld 2000 MDQ item 3: felt much more self-confident than usual. true or false as assigned by the caller. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"less_sleep","type":"boolean","description":"Hirschfeld 2000 MDQ item 4: got much less sleep than usual and found they didn't really miss it. true or false as assigned by the caller. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"more_talkative","type":"boolean","description":"Hirschfeld 2000 MDQ item 5: much more talkative or spoke much faster than usual. true or false as assigned by the caller. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"racing_thoughts","type":"boolean","description":"Hirschfeld 2000 MDQ item 6: thoughts raced through their head or they couldn't slow their mind down. true or false as assigned by the caller. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"easily_distracted","type":"boolean","description":"Hirschfeld 2000 MDQ item 7: so easily distracted by things around them that they had trouble concentrating or staying on track. true or false as assigned by the caller. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"more_energy","type":"boolean","description":"Hirschfeld 2000 MDQ item 8: much more energy than usual. true or false as assigned by the caller. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"more_active","type":"boolean","description":"Hirschfeld 2000 MDQ item 9: much more active or did many more things than usual. true or false as assigned by the caller. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"more_social","type":"boolean","description":"Hirschfeld 2000 MDQ item 10: much more social or outgoing than usual (for example, telephoned friends in the middle of the night). true or false as assigned by the caller. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"more_interested_in_sex","type":"boolean","description":"Hirschfeld 2000 MDQ item 11: much more interested in sex than usual. true or false as assigned by the caller. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"unusual_risky","type":"boolean","description":"Hirschfeld 2000 MDQ item 12: did things that were unusual for them or that other people might have thought were excessive, foolish, or risky. true or false as assigned by the caller. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"spending_trouble","type":"boolean","description":"Hirschfeld 2000 MDQ item 13: spending money got them or their family into trouble. true or false as assigned by the caller. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"same_period","type":"boolean","description":"Hirschfeld 2000 question 2: several of the endorsed symptom items happened during the same period of time. true or false as assigned by the caller. Required for the published positive-screen rule. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"moderate_or_serious_problem","type":"boolean","description":"Hirschfeld 2000 question 3 published positive-screen threshold: the symptoms caused a moderate or serious problem (not no problem or a minor problem). true or false as assigned by the caller. magent does not interpret the four-level item. magent does not interview the patient.","required":true,"example":"false"}],"errors":[{"code":"invalid_mdq","message":"Mood Disorder Questionnaire inputs must match Hirschfeld 2000 thirteen symptom items and published screening rule from that paper. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/mdq","citation":{"authors":"Hirschfeld RM, Williams JB, Spitzer RL, Calabrese JR, Flynn L, Keck PE Jr, Lewis L, McElroy SL, Post RM, Rapport DJ, Russell JM, Sachs GS, Zajecka J","doi":"10.1176/appi.ajp.157.11.1873","id":"hirschfeld-2000","pmid":"11058490","source":"Am J Psychiatry. 2000;157(11):1873-1875","title":"Development and validation of a screening instrument for bipolar spectrum disorder: the Mood Disorder Questionnaire","url":"https://doi.org/10.1176/appi.ajp.157.11.1873"},"formula_expression":"MDQ = felt_hyper + irritable + more_self_confident + less_sleep + more_talkative + racing_thoughts + easily_distracted + more_energy + more_active + more_social + more_interested_in_sex + unusual_risky + spending_trouble; each 1 if true; max 13; Hirschfeld 2000 positive screen is score ≥7 AND same_period AND moderate_or_serious_problem","purpose":"Sum thirteen caller-assigned Hirschfeld 2000 MDQ yes/no lifetime manic/hypomanic items and return the published symptom count (max 13) and that paper's positive-screen rule.","markdown_url":"https://magentlab.com/docs/mdq.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"mdq"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Hirschfeld 2000 MDQ symptom count 0-13 (yes = 1). Not a diagnosis."},{"name":"max_score","type":"integer","description":"13"},{"name":"same_period","type":"boolean","description":"Caller-assigned Hirschfeld 2000 question 2 (several symptoms in the same period)."},{"name":"moderate_or_serious_problem","type":"boolean","description":"Caller-assigned Hirschfeld 2000 question 3 threshold (moderate or serious problem)."},{"name":"positive_screen","type":"boolean","description":"true iff score ≥ 7 AND same_period AND moderate_or_serious_problem (Hirschfeld 2000: a screening score of 7 or more items yielded sensitivity 0.73 and specificity 0.90 in that psychiatric outpatient sample; the published positive-screen rule also requires same-period clustering and moderate or serious problem). Not a bipolar diagnosis."},{"name":"components","type":"array","description":"Per-symptom-item points (13 items)"},{"name":"citation","type":"object","description":"Hirschfeld et al. Am J Psychiatry 2000 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"easily_distracted":"false","felt_hyper":"false","irritable":"false","less_sleep":"false","moderate_or_serious_problem":"false","more_active":"false","more_energy":"false","more_interested_in_sex":"false","more_self_confident":"false","more_social":"false","more_talkative":"false","racing_thoughts":"false","same_period":"false","spending_trouble":"false","unusual_risky":"false"},{"easily_distracted":"false","felt_hyper":"false","irritable":"false","less_sleep":"false","moderate_or_serious_problem":"false","more_active":"false","more_energy":"false","more_interested_in_sex":"false","more_self_confident":"false","more_social":"false","more_talkative":"false","racing_thoughts":"false","same_period":"false","spending_trouble":"false","unusual_risky":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/mdq","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/mdq?felt_hyper=false&irritable=false&more_self_confident=false&less_sleep=false&more_talkative=false&racing_thoughts=false&easily_distracted=false&more_energy=false&more_active=false&more_social=false&more_interested_in_sex=false&unusual_risky=false&spending_trouble=false&same_period=false&moderate_or_serious_problem=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/mdq","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/epds","description":"Cox 1987 EPDS: 10 caller-assigned integers 0-3 (past 7 days). laugh, enjoyment, and anxious are reverse-scored in that paper; the caller assigns the published 0-3 (0 = least symptomatic pole after that reverse key). Total 0-30. This paper's threshold is 12/13 (at or above iff score ≥13). magent does not interview, apply later ≥10 community cuts, PHQ-9, QIDS, or MDI. Not a diagnosis.","parameters":[{"in":"query","name":"laugh","type":"integer","description":"Caller-assigned Cox 1987 EPDS item 1 (integer 0-3). Reverse-scored in that paper: ability to laugh and see the funny side of things over the past 7 days. 0 is the least symptomatic published pole after reverse scoring; 3 is the most. magent does not interpret the item.","required":true,"example":"0"},{"in":"query","name":"enjoyment","type":"integer","description":"Caller-assigned Cox 1987 EPDS item 2 (integer 0-3). Reverse-scored in that paper: looking forward with enjoyment to things over the past 7 days. 0 is the least symptomatic published pole after reverse scoring; 3 is the most. magent does not interpret the item.","required":true,"example":"0"},{"in":"query","name":"self_blame","type":"integer","description":"Caller-assigned Cox 1987 EPDS item 3 (integer 0-3): blamed self unnecessarily when things went wrong over the past 7 days. Adds as published (0 least symptomatic pole, 3 most). magent does not interpret the item.","required":true,"example":"0"},{"in":"query","name":"anxious","type":"integer","description":"Caller-assigned Cox 1987 EPDS item 4 (integer 0-3). Reverse-scored in that paper: anxious or worried for no good reason over the past 7 days. 0 is the least symptomatic published pole after reverse scoring; 3 is the most. magent does not interpret the item.","required":true,"example":"0"},{"in":"query","name":"scared","type":"integer","description":"Caller-assigned Cox 1987 EPDS item 5 (integer 0-3): scared or panicky for no very good reason over the past 7 days. Adds as published (0 least symptomatic pole, 3 most). magent does not interpret the item.","required":true,"example":"0"},{"in":"query","name":"coping","type":"integer","description":"Caller-assigned Cox 1987 EPDS item 6 (integer 0-3): things getting on top of the respondent over the past 7 days. Adds as published (0 least symptomatic pole, 3 most). magent does not interpret the item.","required":true,"example":"0"},{"in":"query","name":"sleep","type":"integer","description":"Caller-assigned Cox 1987 EPDS item 7 (integer 0-3): unhappiness with difficulty sleeping over the past 7 days. Adds as published (0 least symptomatic pole, 3 most). magent does not interpret the item.","required":true,"example":"0"},{"in":"query","name":"sad","type":"integer","description":"Caller-assigned Cox 1987 EPDS item 8 (integer 0-3): felt sad or miserable over the past 7 days. Adds as published (0 least symptomatic pole, 3 most). magent does not interpret the item.","required":true,"example":"0"},{"in":"query","name":"crying","type":"integer","description":"Caller-assigned Cox 1987 EPDS item 9 (integer 0-3): crying from unhappiness over the past 7 days. Adds as published (0 least symptomatic pole, 3 most). magent does not interpret the item.","required":true,"example":"0"},{"in":"query","name":"self_harm","type":"integer","description":"Caller-assigned Cox 1987 EPDS item 10 (integer 0-3): thoughts of harming oneself over the past 7 days. Adds as published (0 least symptomatic pole, 3 most). magent does not interpret the item.","required":true,"example":"0"}],"errors":[{"code":"invalid_epds","message":"Each Edinburgh Postnatal Depression Scale item must be an integer in the Cox 1987 published 0-3 range. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/epds","citation":{"authors":"Cox JL, Holden JM, Sagovsky R","doi":"10.1192/bjp.150.6.782","id":"cox-1987","pmid":"3651732","source":"Br J Psychiatry. 1987;150:782-786","title":"Detection of postnatal depression. Development of the 10-item Edinburgh Postnatal Depression Scale","url":"https://doi.org/10.1192/bjp.150.6.782"},"formula_expression":"EPDS = laugh + enjoyment + self_blame + anxious + scared + coping + sleep + sad + crying + self_harm; each caller-assigned 0-3 as in Cox 1987 (laugh, enjoyment, and anxious reverse-scored in that paper; 0 is the least symptomatic published pole); max 30; Cox 1987 threshold 12/13 (at or above iff score ≥ 13)","purpose":"Sum ten caller-assigned Cox 1987 EPDS integers (0-3 over the past 7 days; laugh, enjoyment, and anxious reverse-scored in that paper so 0 is the least symptomatic published pole) and return the 0-30 total and whether it meets this paper's 12/13 threshold (score ≥13).","markdown_url":"https://magentlab.com/docs/epds.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"epds"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"EPDS points 0-30"},{"name":"max_score","type":"integer","description":"30"},{"name":"at_or_above_cutoff","type":"boolean","description":"true iff score ≥ 13 (Cox 1987 threshold 12/13). Not a diagnosis. Not later ≥10 community cuts. Not a cut of score >13 only."},{"name":"components","type":"array","description":"Per-item caller-assigned points (reverse-scored items flagged)"},{"name":"citation","type":"object","description":"Cox et al. Br J Psychiatry 1987 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"anxious":"0","coping":"0","crying":"0","enjoyment":"0","laugh":"0","sad":"0","scared":"0","self_blame":"0","self_harm":"0","sleep":"0"},{"anxious":"0","coping":"0","crying":"0","enjoyment":"0","laugh":"0","sad":"0","scared":"0","self_blame":"0","self_harm":"0","sleep":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/epds","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/epds?laugh=0&enjoyment=0&self_blame=0&anxious=0&scared=0&coping=0&sleep=0&sad=0&crying=0&self_harm=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/epds","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/hamilton-anxiety","description":"Hamilton 1959 HAM-A: 14 caller-assigned integers 0-4 (0 not present, 1 mild, 2 moderate, 3 severe, 4 very severe) for anxious mood, tension, fears, insomnia, intellectual, depressed mood, somatic muscular, somatic sensory, cardiovascular, respiratory, gastrointestinal, genitourinary, autonomic, and behaviour at interview. Sum 0-56. magent does not interview the patient. No total-score severity bands in Hamilton 1959; later 17/24 cutoffs are not applied. Not a diagnosis and not a medical device.","parameters":[{"in":"query","name":"anxious_mood","type":"integer","description":"Caller-assigned Hamilton 1959 anxious mood (integer 0-4: 0 not present, 1 mild, 2 moderate, 3 severe, 4 very severe): worries, anticipation of the worst, fearful anticipation, irritability. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"tension","type":"integer","description":"Caller-assigned Hamilton 1959 tension (integer 0-4): feelings of tension, fatigability, startle response, moved to tears easily, trembling, restlessness, inability to relax. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"fears","type":"integer","description":"Caller-assigned Hamilton 1959 fears (integer 0-4): of dark, of strangers, of being left alone, of animals, of traffic, of crowds. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"insomnia","type":"integer","description":"Caller-assigned Hamilton 1959 insomnia (integer 0-4): difficulty falling asleep, broken sleep, unsatisfying sleep and fatigue on waking, dreams, nightmares, night terrors. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"intellectual","type":"integer","description":"Caller-assigned Hamilton 1959 intellectual / cognitive (integer 0-4): difficulty in concentration, poor memory. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"depressed_mood","type":"integer","description":"Caller-assigned Hamilton 1959 depressed mood (integer 0-4): loss of interest, lack of pleasure in hobbies, depression, early waking, diurnal swing. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"somatic_muscular","type":"integer","description":"Caller-assigned Hamilton 1959 somatic (muscular) (integer 0-4): pains and aches, twitching, stiffness, myoclonic jerks, grinding of teeth, unsteady voice, increased muscular tone. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"somatic_sensory","type":"integer","description":"Caller-assigned Hamilton 1959 somatic (sensory) (integer 0-4): tinnitus, blurring of vision, hot and cold flushes, feelings of weakness, pricking sensation. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"cardiovascular","type":"integer","description":"Caller-assigned Hamilton 1959 cardiovascular symptoms (integer 0-4): tachycardia, palpitations, pain in chest, throbbing of vessels, fainting feelings, missing beat. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"respiratory","type":"integer","description":"Caller-assigned Hamilton 1959 respiratory symptoms (integer 0-4): pressure or constriction in chest, choking feelings, sighing, dyspnea. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"gastrointestinal","type":"integer","description":"Caller-assigned Hamilton 1959 gastro-intestinal symptoms (integer 0-4): difficulty in swallowing, wind, abdominal pain, burning sensations, abdominal fullness, nausea, vomiting, borborygmi, looseness of bowels, loss of weight, constipation. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"genitourinary","type":"integer","description":"Caller-assigned Hamilton 1959 genito-urinary symptoms (integer 0-4): frequency or urgency of micturition, amenorrhea, menorrhagia, development of frigidity, premature ejaculation, loss of libido, impotence. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"autonomic","type":"integer","description":"Caller-assigned Hamilton 1959 autonomic symptoms (integer 0-4): dry mouth, flushing, pallor, tendency to sweat, giddiness, tension headache, raising of hair. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"interview_behavior","type":"integer","description":"Caller-assigned Hamilton 1959 behaviour at interview (integer 0-4): fidgeting, restlessness or pacing, tremor of hands, furrowed brow, strained face, sighing or rapid respiration, facial pallor, swallowing. magent does not interview the patient.","required":true,"example":"0"}],"errors":[{"code":"invalid_hamilton_anxiety","message":"Each Hamilton 1959 anxiety item must be an integer 0–4 as published. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/hamilton-anxiety","citation":{"authors":"Hamilton M","doi":"10.1111/j.2044-8341.1959.tb00467.x","id":"hamilton-1959","pmid":"13638508","source":"Br J Med Psychol. 1959;32(1):50-55","title":"The assessment of anxiety states by rating","url":"https://doi.org/10.1111/j.2044-8341.1959.tb00467.x"},"formula_expression":"HAM-A = anxious_mood + tension + fears + insomnia + intellectual + depressed_mood + somatic_muscular + somatic_sensory + cardiovascular + respiratory + gastrointestinal + genitourinary + autonomic + interview_behavior; each caller-assigned 0-4; max 56; Hamilton 1959; no total-score severity bands","purpose":"Sum fourteen caller-assigned Hamilton 1959 HAM-A items (each integer 0-4) and return the published 0-56 total. Does not apply later total-score severity bands.","markdown_url":"https://magentlab.com/docs/hamilton-anxiety.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"hamilton_anxiety"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Hamilton 1959 HAM-A sum of fourteen caller-assigned 0-4 items (0-56)"},{"name":"max_score","type":"integer","description":"Always 56"},{"name":"components","type":"array","description":"Per-item caller-assigned points"},{"name":"citation","type":"object","description":"Hamilton Br J Med Psychol 1959 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"anxious_mood":"0","autonomic":"0","cardiovascular":"0","depressed_mood":"0","fears":"0","gastrointestinal":"0","genitourinary":"0","insomnia":"0","intellectual":"0","interview_behavior":"0","respiratory":"0","somatic_muscular":"0","somatic_sensory":"0","tension":"0"},{"anxious_mood":"0","autonomic":"0","cardiovascular":"0","depressed_mood":"0","fears":"0","gastrointestinal":"0","genitourinary":"0","insomnia":"0","intellectual":"0","interview_behavior":"0","respiratory":"0","somatic_muscular":"0","somatic_sensory":"0","tension":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/hamilton-anxiety","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/hamilton-anxiety?anxious_mood=0&tension=0&fears=0&insomnia=0&intellectual=0&depressed_mood=0&somatic_muscular=0&somatic_sensory=0&cardiovascular=0&respiratory=0&gastrointestinal=0&genitourinary=0&autonomic=0&interview_behavior=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/hamilton-anxiety","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/hamilton-depression","description":"Hamilton 1960 17-variable depression rating (not the later 21-item form). Eight caller-assigned 0-4 items and nine 0-2 items (agitation is three-point in that paper). Sum 0-50. magent does not interview. Hamilton 1960 printed no total-score severity bands; later 0-7/8-16/17-23/>=24 cutoffs are not applied. Not a diagnosis and not a medical device.","parameters":[{"in":"query","name":"depressed_mood","type":"integer","description":"Caller-assigned Hamilton 1960 depressed mood (integer 0-4: 0 absent, 1 mild or trivial, 2 moderate, 3 severe, 4 extreme): gloomy attitude, pessimism about the future, feeling of sadness, tendency to weep. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"guilt","type":"integer","description":"Caller-assigned Hamilton 1960 guilt (integer 0-4): self-reproach, ideas of guilt, present illness as punishment, delusions or hallucinations of guilt. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"suicide","type":"integer","description":"Caller-assigned Hamilton 1960 suicide (integer 0-4): feels life is not worth living, wishes to be dead, suicidal ideas; an attempt at suicide scores 4 (3 if sudden against little suicidal tendency). magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"insomnia_initial","type":"integer","description":"Caller-assigned Hamilton 1960 insomnia, initial (integer 0-2: 0 absent, 1 slight or doubtful, 2 clearly present): difficulty in falling asleep. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"insomnia_middle","type":"integer","description":"Caller-assigned Hamilton 1960 insomnia, middle (integer 0-2): restless and disturbed during the night, waking during the night. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"insomnia_delayed","type":"integer","description":"Caller-assigned Hamilton 1960 insomnia, delayed (integer 0-2): waking in the early hours of the morning and unable to fall asleep again. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"work_and_interests","type":"integer","description":"Caller-assigned Hamilton 1960 work and interests (integer 0-4): feelings of incapacity, listlessness, loss of interest in hobbies, decreased social activities or productivity; given up work solely because of present illness is 4. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"retardation","type":"integer","description":"Caller-assigned Hamilton 1960 retardation (integer 0-4): slowness of thought, speech, and activity, apathy, stupor (1 slight at interview, 2 obvious, 3 interview difficult, 4 complete stupor). magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"agitation","type":"integer","description":"Caller-assigned Hamilton 1960 agitation (integer 0-2 three-point; a five-point scale was impracticable in that paper): restlessness associated with anxiety. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"anxiety_psychic","type":"integer","description":"Caller-assigned Hamilton 1960 anxiety, psychic (integer 0-4): tension and irritability, worrying about minor matters, apprehensive attitude, fears. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"anxiety_somatic","type":"integer","description":"Caller-assigned Hamilton 1960 anxiety, somatic (integer 0-4): gastrointestinal (wind, indigestion), cardiovascular (palpitations, headaches), respiratory, genito-urinary, and other somatic anxiety. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"somatic_gastrointestinal","type":"integer","description":"Caller-assigned Hamilton 1960 somatic symptoms, gastrointestinal (integer 0-2): loss of appetite, heavy feelings in abdomen, constipation. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"somatic_general","type":"integer","description":"Caller-assigned Hamilton 1960 somatic symptoms, general (integer 0-2): heaviness in limbs, back, or head; diffuse backache; loss of energy and fatiguability. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"genital_symptoms","type":"integer","description":"Caller-assigned Hamilton 1960 genital symptoms (integer 0-2): loss of libido, menstrual disturbances. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"hypochondriasis","type":"integer","description":"Caller-assigned Hamilton 1960 hypochondriasis (integer 0-4): self-absorption (bodily), preoccupation with health, querulous attitude, hypochondriacal delusions. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"insight","type":"integer","description":"Caller-assigned Hamilton 1960 insight (integer 0-2: 0 no loss, 1 partial or doubtful loss, 2 loss of insight), interpreted in terms of the patient's understanding and background. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"loss_of_weight","type":"integer","description":"Caller-assigned Hamilton 1960 loss of weight (integer 0-2 three-point scale as published, because few patients know their normal weight). magent does not weigh the patient.","required":true,"example":"0"}],"errors":[{"code":"invalid_hamilton_depression","message":"Hamilton depression rating items must be integers in the Hamilton 1960 published ranges for those 17 variables. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/hamilton-depression","citation":{"authors":"Hamilton M","doi":"10.1136/jnnp.23.1.56","id":"hamilton-1960","pmid":"14399272","source":"J Neurol Neurosurg Psychiatry. 1960;23(1):56-62","title":"A rating scale for depression","url":"https://doi.org/10.1136/jnnp.23.1.56"},"formula_expression":"HAM-D = depressed_mood + guilt + suicide + insomnia_initial + insomnia_middle + insomnia_delayed + work_and_interests + retardation + agitation + anxiety_psychic + anxiety_somatic + somatic_gastrointestinal + somatic_general + genital_symptoms + hypochondriasis + insight + loss_of_weight; Hamilton 1960 17 variables (not items 18-21); 0-4 five-point for depressed_mood, guilt, suicide, work_and_interests, retardation, anxiety_psychic, anxiety_somatic, hypochondriasis; 0-2 three-point for insomnia_initial, insomnia_middle, insomnia_delayed, agitation, somatic_gastrointestinal, somatic_general, genital_symptoms, insight, loss_of_weight; max 50; no total-score severity bands","purpose":"Sum seventeen caller-assigned Hamilton 1960 items (eight integers 0-4 and nine integers 0-2) and return the published 0-50 total. Does not apply later total-score severity bands or the four excluded 21-item variables.","markdown_url":"https://magentlab.com/docs/hamilton-depression.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"hamilton_depression"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Hamilton 1960 sum of 17 caller-assigned items (eight 0-4 and nine 0-2; total 0-50)"},{"name":"max_score","type":"integer","description":"Always 50"},{"name":"components","type":"array","description":"Per-item caller-assigned points"},{"name":"citation","type":"object","description":"Hamilton J Neurol Neurosurg Psychiatry 1960 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"agitation":"0","anxiety_psychic":"0","anxiety_somatic":"0","depressed_mood":"0","genital_symptoms":"0","guilt":"0","hypochondriasis":"0","insight":"0","insomnia_delayed":"0","insomnia_initial":"0","insomnia_middle":"0","loss_of_weight":"0","retardation":"0","somatic_gastrointestinal":"0","somatic_general":"0","suicide":"0","work_and_interests":"0"},{"agitation":"0","anxiety_psychic":"0","anxiety_somatic":"0","depressed_mood":"0","genital_symptoms":"0","guilt":"0","hypochondriasis":"0","insight":"0","insomnia_delayed":"0","insomnia_initial":"0","insomnia_middle":"0","loss_of_weight":"0","retardation":"0","somatic_gastrointestinal":"0","somatic_general":"0","suicide":"0","work_and_interests":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/hamilton-depression","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/hamilton-depression?depressed_mood=0&guilt=0&suicide=0&insomnia_initial=0&insomnia_middle=0&insomnia_delayed=0&work_and_interests=0&retardation=0&agitation=0&anxiety_psychic=0&anxiety_somatic=0&somatic_gastrointestinal=0&somatic_general=0&genital_symptoms=0&hypochondriasis=0&insight=0&loss_of_weight=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/hamilton-depression","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/madrs","description":"Montgomery 1979 MADRS: ten caller-assigned integers 0-6 (apparent sadness, reported sadness, inner tension, reduced sleep, reduced appetite, concentration difficulties, lassitude, inability to feel, pessimistic thoughts, suicidal thoughts). Sum 0-60. magent does not interview. Montgomery 1979 printed no total-score severity bands; later 0-6/7-19/20-34/35-60 cutoffs are not applied. Not a diagnosis, not Hamilton 1960, not PHQ-9, and not a medical device.","parameters":[{"in":"query","name":"apparent_sadness","type":"integer","description":"Caller-assigned Montgomery 1979 apparent sadness (integer 0-6): despondency, gloom, and despair reflected in speech, facial expression, and posture, rated by depth and inability to brighten up. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"reported_sadness","type":"integer","description":"Caller-assigned Montgomery 1979 reported sadness (integer 0-6): reports of depressed mood, low spirits, despondency, or feeling beyond help, regardless of appearance. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"inner_tension","type":"integer","description":"Caller-assigned Montgomery 1979 inner tension (integer 0-6): ill-defined discomfort, edginess, inner turmoil, or mental tension mounting to panic, dread, or anguish. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"reduced_sleep","type":"integer","description":"Caller-assigned Montgomery 1979 reduced sleep (integer 0-6): reduced duration or depth of sleep compared with the subject's own normal pattern when well. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"reduced_appetite","type":"integer","description":"Caller-assigned Montgomery 1979 reduced appetite (integer 0-6): loss of desire for food or the need to force oneself to eat compared with when well. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"concentration_difficulties","type":"integer","description":"Caller-assigned Montgomery 1979 concentration difficulties (integer 0-6): difficulty collecting one's thoughts mounting to incapacitating lack of concentration. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"lassitude","type":"integer","description":"Caller-assigned Montgomery 1979 lassitude (integer 0-6): difficulty getting started or slowness initiating and performing everyday activities. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"inability_to_feel","type":"integer","description":"Caller-assigned Montgomery 1979 inability to feel (integer 0-6): reduced interest in surroundings or activities that normally give pleasure, or reduced ability to react with adequate emotion. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"pessimistic_thoughts","type":"integer","description":"Caller-assigned Montgomery 1979 pessimistic thoughts (integer 0-6): thoughts of guilt, inferiority, self-reproach, sinfulness, remorse, or ruin. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"suicidal_thoughts","type":"integer","description":"Caller-assigned Montgomery 1979 suicidal thoughts (integer 0-6): feeling that life is not worth living, that a natural death would be welcome, suicidal thoughts, or preparations for suicide. A suicide attempt should not in itself influence the rating. magent does not interview the patient.","required":true,"example":"0"}],"errors":[{"code":"invalid_madrs","message":"MADRS needs ten caller-assigned items, each an integer 0-6 (Montgomery 1979). Returned before settlement; you are not charged.","status":400},{"code":"invalid_madrs_item","message":"each MADRS item must be an integer from 0 to 6 (Montgomery 1979). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/madrs","citation":{"authors":"Montgomery SA, Åsberg M","doi":"10.1192/bjp.134.4.382","id":"montgomery-1979","pmid":"444788","source":"Br J Psychiatry. 1979;134:382-389","title":"A new depression scale designed to be sensitive to change","url":"https://doi.org/10.1192/bjp.134.4.382"},"formula_expression":"MADRS = apparent_sadness + reported_sadness + inner_tension + reduced_sleep + reduced_appetite + concentration_difficulties + lassitude + inability_to_feel + pessimistic_thoughts + suicidal_thoughts; each caller-assigned 0-6; Montgomery 1979 ten items; max 60; no total-score severity bands","purpose":"Sum ten caller-assigned Montgomery 1979 MADRS items (each integer 0-6) and return the published 0-60 total. Does not apply later total-score severity bands.","markdown_url":"https://magentlab.com/docs/madrs.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"madrs"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Montgomery 1979 sum of ten caller-assigned 0-6 items (total 0-60)"},{"name":"max_score","type":"integer","description":"Always 60"},{"name":"components","type":"array","description":"Per-item caller-assigned points"},{"name":"citation","type":"object","description":"Montgomery and Åsberg Br J Psychiatry 1979 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"apparent_sadness":"0","concentration_difficulties":"0","inability_to_feel":"0","inner_tension":"0","lassitude":"0","pessimistic_thoughts":"0","reduced_appetite":"0","reduced_sleep":"0","reported_sadness":"0","suicidal_thoughts":"0"},{"apparent_sadness":"0","concentration_difficulties":"0","inability_to_feel":"0","inner_tension":"0","lassitude":"0","pessimistic_thoughts":"0","reduced_appetite":"0","reduced_sleep":"0","reported_sadness":"0","suicidal_thoughts":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/madrs","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/madrs?apparent_sadness=0&reported_sadness=0&inner_tension=0&reduced_sleep=0&reduced_appetite=0&concentration_difficulties=0&lassitude=0&inability_to_feel=0&pessimistic_thoughts=0&suicidal_thoughts=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/madrs","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/gds-15","description":"Sheikh 1986 GDS-15: fifteen yes/no items as asked. Reverse-scored (false=1): satisfied_with_life, good_spirits, happy_most_of_time, wonderful_to_be_alive, full_of_energy; other ten score 1 if true. Sum 0-15. No later 0-4/5-9/10+ cutoffs. Not a diagnosis, not PHQ-9, not the 30-item GDS, not a medical device. magent does not interview.","parameters":[{"in":"query","name":"satisfied_with_life","type":"boolean","description":"Are you basically satisfied with your life? (Sheikh 1986 GDS-15 item 1). true or false as assigned by the caller. false is the depression-direction answer and scores 1. magent does not interview the patient.","required":true,"example":"true"},{"in":"query","name":"dropped_activities","type":"boolean","description":"Have you dropped many of your activities and interests? (Sheikh 1986 GDS-15 item 2). true or false as assigned by the caller. true is the depression-direction answer and scores 1. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"life_empty","type":"boolean","description":"Do you feel that your life is empty? (Sheikh 1986 GDS-15 item 3). true or false as assigned by the caller. true is the depression-direction answer and scores 1. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"often_bored","type":"boolean","description":"Do you often get bored? (Sheikh 1986 GDS-15 item 4). true or false as assigned by the caller. true is the depression-direction answer and scores 1. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"good_spirits","type":"boolean","description":"Are you in good spirits most of the time? (Sheikh 1986 GDS-15 item 5). true or false as assigned by the caller. false is the depression-direction answer and scores 1. magent does not interview the patient.","required":true,"example":"true"},{"in":"query","name":"afraid_something_bad","type":"boolean","description":"Are you afraid that something bad is going to happen to you? (Sheikh 1986 GDS-15 item 6). true or false as assigned by the caller. true is the depression-direction answer and scores 1. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"happy_most_of_time","type":"boolean","description":"Do you feel happy most of the time? (Sheikh 1986 GDS-15 item 7). true or false as assigned by the caller. false is the depression-direction answer and scores 1. magent does not interview the patient.","required":true,"example":"true"},{"in":"query","name":"often_helpless","type":"boolean","description":"Do you often feel helpless? (Sheikh 1986 GDS-15 item 8). true or false as assigned by the caller. true is the depression-direction answer and scores 1. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"prefer_stay_home","type":"boolean","description":"Do you prefer to stay at home, rather than going out and doing new things? (Sheikh 1986 GDS-15 item 9). true or false as assigned by the caller. true is the depression-direction answer and scores 1. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"more_memory_problems","type":"boolean","description":"Do you feel you have more problems with memory than most? (Sheikh 1986 GDS-15 item 10). true or false as assigned by the caller. true is the depression-direction answer and scores 1. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"wonderful_to_be_alive","type":"boolean","description":"Do you think it is wonderful to be alive now? (Sheikh 1986 GDS-15 item 11). true or false as assigned by the caller. false is the depression-direction answer and scores 1. magent does not interview the patient.","required":true,"example":"true"},{"in":"query","name":"pretty_worthless","type":"boolean","description":"Do you feel pretty worthless the way you are now? (Sheikh 1986 GDS-15 item 12). true or false as assigned by the caller. true is the depression-direction answer and scores 1. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"full_of_energy","type":"boolean","description":"Do you feel full of energy? (Sheikh 1986 GDS-15 item 13). true or false as assigned by the caller. false is the depression-direction answer and scores 1. magent does not interview the patient.","required":true,"example":"true"},{"in":"query","name":"situation_hopeless","type":"boolean","description":"Do you feel that your situation is hopeless? (Sheikh 1986 GDS-15 item 14). true or false as assigned by the caller. true is the depression-direction answer and scores 1. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"most_people_better_off","type":"boolean","description":"Do you think that most people are better off than you are? (Sheikh 1986 GDS-15 item 15). true or false as assigned by the caller. true is the depression-direction answer and scores 1. magent does not interview the patient.","required":true,"example":"false"}],"errors":[{"code":"invalid_gds","message":"GDS-15 needs the fifteen Sheikh 1986 yes/no items as true or false. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/gds-15","citation":{"authors":"Sheikh JI, Yesavage JA","doi":"10.1300/J018v05n01_09","id":"sheikh-1986","source":"Clin Gerontol. 1986;5(1-2):165-173","title":"Geriatric Depression Scale (GDS): recent evidence and development of a shorter version","url":"https://doi.org/10.1300/J018v05n01_09"},"formula_expression":"GDS-15 = (1 if not satisfied_with_life) + dropped_activities + life_empty + often_bored + (1 if not good_spirits) + afraid_something_bad + (1 if not happy_most_of_time) + often_helpless + prefer_stay_home + more_memory_problems + (1 if not wonderful_to_be_alive) + pretty_worthless + (1 if not full_of_energy) + situation_hopeless + most_people_better_off; Sheikh 1986 15-item short form; each yes/no as asked; reverse-scored items 1, 5, 7, 11, 13; max 15; no total-score severity bands","purpose":"Sum fifteen Sheikh 1986 GDS-15 yes/no items using that paper's reverse-scoring key and return the published 0-15 total. Does not apply later total-score severity bands.","markdown_url":"https://magentlab.com/docs/gds-15.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"gds_15"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Sheikh 1986 GDS-15 sum of fifteen yes/no items after reverse scoring (total 0-15)"},{"name":"max_score","type":"integer","description":"Always 15"},{"name":"components","type":"array","description":"Per-item points. present is true when the answer is in the Sheikh 1986 depression direction."},{"name":"citation","type":"object","description":"Sheikh and Yesavage Clin Gerontol 1986 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"afraid_something_bad":"false","dropped_activities":"false","full_of_energy":"true","good_spirits":"true","happy_most_of_time":"true","life_empty":"false","more_memory_problems":"false","most_people_better_off":"false","often_bored":"false","often_helpless":"false","prefer_stay_home":"false","pretty_worthless":"false","satisfied_with_life":"true","situation_hopeless":"false","wonderful_to_be_alive":"true"},{"afraid_something_bad":"false","dropped_activities":"false","full_of_energy":"true","good_spirits":"true","happy_most_of_time":"true","life_empty":"false","more_memory_problems":"false","most_people_better_off":"false","often_bored":"false","often_helpless":"false","prefer_stay_home":"false","pretty_worthless":"false","satisfied_with_life":"true","situation_hopeless":"false","wonderful_to_be_alive":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/gds-15","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/gds-15?satisfied_with_life=true&dropped_activities=false&life_empty=false&often_bored=false&good_spirits=true&afraid_something_bad=false&happy_most_of_time=true&often_helpless=false&prefer_stay_home=false&more_memory_problems=false&wonderful_to_be_alive=true&pretty_worthless=false&full_of_energy=true&situation_hopeless=false&most_people_better_off=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/gds-15","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/asrs","description":"Kessler 2005 Adult ADHD Self-Report Scale (ASRS) v1.1 Part A: six caller-assigned 0-4 items (never to very often). wrap_up, organization, and remembering count at sometimes or more; avoid_delay, fidget, and motor count at often or more. Screen-positive at ≥4 of 6. Not an ADHD diagnosis, not a medical device, and not the 18-item ASRS or later 0-24 sum cutoffs. magent does not interpret the items.","parameters":[{"in":"query","name":"wrap_up","type":"integer","description":"Caller-assigned Kessler 2005 ASRS v1.1 Part A item 1 (integer 0-4): how often do you have trouble wrapping up the fine details of a project, once the challenging parts have been done? (0 never, 1 rarely, 2 sometimes, 3 often, 4 very often). Clinically significant at sometimes or more. magent does not interpret the item.","required":true,"example":"0"},{"in":"query","name":"organization","type":"integer","description":"Caller-assigned Kessler 2005 ASRS v1.1 Part A item 2 (integer 0-4): how often do you have difficulty getting things in order when you have to do a task that requires organization? Clinically significant at sometimes or more. magent does not interpret the item.","required":true,"example":"0"},{"in":"query","name":"remembering","type":"integer","description":"Caller-assigned Kessler 2005 ASRS v1.1 Part A item 3 (integer 0-4): how often do you have problems remembering appointments or obligations? Clinically significant at sometimes or more. magent does not interpret the item.","required":true,"example":"0"},{"in":"query","name":"avoid_delay","type":"integer","description":"Caller-assigned Kessler 2005 ASRS v1.1 Part A item 4 (integer 0-4): when you have a task that requires a lot of thought, how often do you avoid or delay getting started? Clinically significant at often or more. magent does not interpret the item.","required":true,"example":"0"},{"in":"query","name":"fidget","type":"integer","description":"Caller-assigned Kessler 2005 ASRS v1.1 Part A item 5 (integer 0-4): how often do you fidget or squirm with your hands or your feet when you have to sit down for a long time? Clinically significant at often or more. magent does not interpret the item.","required":true,"example":"0"},{"in":"query","name":"motor","type":"integer","description":"Caller-assigned Kessler 2005 ASRS v1.1 Part A item 6 (integer 0-4): how often do you feel overly active and compelled to do things, like you were driven by a motor? Clinically significant at often or more. magent does not interpret the item.","required":true,"example":"0"}],"errors":[{"code":"invalid_asrs","message":"Each ASRS v1.1 Part A item must be an integer 0–4 (Kessler 2005 never to very often). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/asrs","citation":{"authors":"Kessler RC, Adler L, Ames M, et al.","doi":"10.1017/s0033291704002892","id":"kessler-2005","pmid":"15841682","source":"Psychol Med. 2005;35(2):245-256","title":"The World Health Organization Adult ADHD Self-Report Scale (ASRS): a short screening scale for use in the general population","url":"https://doi.org/10.1017/s0033291704002892"},"formula_expression":"ASRS Part A = count of Kessler 2005 clinically significant items among wrap_up, organization, remembering, avoid_delay, fidget, motor; wrap_up/organization/remembering ≥2 (sometimes); avoid_delay/fidget/motor ≥3 (often); screen-positive at ≥4; max 6","purpose":"Count Kessler 2005 clinically significant ASRS v1.1 Part A items (six caller-assigned 0-4 frequencies) and return whether four or more are in the published range.","markdown_url":"https://magentlab.com/docs/asrs.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"asrs"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Count of Kessler 2005 clinically significant Part A items (0-6). Table 4 strata are 0-1, 2-3, and 4-6."},{"name":"max_score","type":"integer","description":"6"},{"name":"screen_positive","type":"boolean","description":"true iff score ≥ 4 (Kessler 2005 Table 4 highest stratum; 68.7% sensitivity and 99.5% specificity for the dichotomous 4-of-6 screen). Not a diagnosis."},{"name":"components","type":"array","description":"Per-item 1 point when in the published clinically significant frequency range"},{"name":"citation","type":"object","description":"Kessler et al. Psychol Med 2005 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"avoid_delay":"0","fidget":"0","motor":"0","organization":"0","remembering":"0","wrap_up":"0"},{"avoid_delay":"0","fidget":"0","motor":"0","organization":"0","remembering":"0","wrap_up":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/asrs","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/asrs?wrap_up=0&organization=0&remembering=0&avoid_delay=0&fidget=0&motor=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/asrs","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/iss","description":"Injury Severity Score (Baker 1974): ISS is the sum of squares of the three highest caller-assigned AIS body-region grades (head, face, chest, abdomen, extremity, external; each 0-6). Any AIS 6 (unsurvivable) is ISS 75. Deterministic published arithmetic with citation; not a triage order and not NISS (which squares the three worst injuries regardless of region).","parameters":[{"in":"query","name":"ais_head","type":"integer","description":"Caller-assigned AIS grade for the head or neck (integer 0-6). magent does not assign AIS from an injury list.","required":true,"example":"3"},{"in":"query","name":"ais_face","type":"integer","description":"Caller-assigned AIS grade for the face (integer 0-6).","required":true,"example":"0"},{"in":"query","name":"ais_chest","type":"integer","description":"Caller-assigned AIS grade for the chest (integer 0-6).","required":true,"example":"2"},{"in":"query","name":"ais_abdomen","type":"integer","description":"Caller-assigned AIS grade for the abdomen or pelvic contents (integer 0-6).","required":true,"example":"1"},{"in":"query","name":"ais_extremity","type":"integer","description":"Caller-assigned AIS grade for the extremities or pelvic girdle (integer 0-6).","required":true,"example":"0"},{"in":"query","name":"ais_external","type":"integer","description":"Caller-assigned AIS grade for external (integer 0-6).","required":true,"example":"0"}],"errors":[{"code":"invalid_ais","message":"ais_head, ais_face, ais_chest, ais_abdomen, ais_extremity, and ais_external must each be an integer from 0 to 6. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/iss","citation":{"authors":"Baker SP, O'Neill B, Haddon W Jr, Long WB","doi":"10.1097/00005373-197403000-00001","id":"baker-1974","pmid":"4814394","source":"J Trauma. 1974;14(3):187-196","title":"The injury severity score: a method for describing patients with multiple injuries and evaluating emergency care","url":"https://doi.org/10.1097/00005373-197403000-00001"},"formula_expression":"ISS = a^2 + b^2 + c^2 for the three highest AIS body-region grades (0-5); any AIS 6 => 75","purpose":"Compute the Baker 1974 Injury Severity Score as the sum of squares of the three highest caller-assigned AIS body-region grades, or 75 if any region is AIS 6.","markdown_url":"https://magentlab.com/docs/iss.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"iss"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"ISS 0-75"},{"name":"max_score","type":"integer","description":"75"},{"name":"ais_head","type":"integer","description":"Caller-assigned AIS head/neck 0-6"},{"name":"ais_face","type":"integer","description":"Caller-assigned AIS face 0-6"},{"name":"ais_chest","type":"integer","description":"Caller-assigned AIS chest 0-6"},{"name":"ais_abdomen","type":"integer","description":"Caller-assigned AIS abdomen/pelvic contents 0-6"},{"name":"ais_extremity","type":"integer","description":"Caller-assigned AIS extremities/pelvic girdle 0-6"},{"name":"ais_external","type":"integer","description":"Caller-assigned AIS external 0-6"},{"name":"used_ais","type":"array","description":"The three highest AIS grades used for the sum of squares (descending)"},{"name":"components","type":"array","description":"Per-region AIS and AIS squared"},{"name":"citation","type":"object","description":"Baker et al. J Trauma 1974 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"ais_abdomen":"1","ais_chest":"2","ais_external":"0","ais_extremity":"0","ais_face":"0","ais_head":"3"},{"ais_abdomen":"1","ais_chest":"2","ais_external":"0","ais_extremity":"0","ais_face":"0","ais_head":"3"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/iss","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/iss?ais_head=3&ais_face=0&ais_chest=2&ais_abdomen=1&ais_extremity=0&ais_external=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/iss","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/ais-inhalation","description":"Endorf 2007 bronchoscopic AIS inhalation injury grade 0-4 as assigned by the caller. Returns ais_grade, the published bronchoscopic description, and high_grade (true when grade is 2-4; those grades had worse survival than 0-1, P = .03). magent does not perform bronchoscopy. Not a diagnosis. Not ISS body-region AIS. Not RADS CT smoke score. Not a medical device.","parameters":[{"in":"query","name":"ais_grade","type":"integer","description":"Endorf 2007 bronchoscopic AIS inhalation grade 0-4 as assigned by the caller (0 no injury: absence of carbonaceous deposits, erythema, edema, bronchorrhea, or obstruction; 1 mild: minor or patchy areas of erythema, carbonaceous deposits in proximal or distal bronchi, any or combination; 2 moderate: moderate degree of erythema, carbonaceous deposits, bronchorrhea, with or without compromise of the bronchi, any or combination; 3 severe: severe inflammation with friability, copious carbonaceous deposits, bronchorrhea, bronchial obstruction, any or combination; 4 massive: evidence of mucosal sloughing, necrosis, endoluminal obliteration, any or combination). Integer 0-4 only; reject 5, 1.5, and roman I. magent does not perform bronchoscopy. Not ISS body-region AIS. Not RADS CT smoke score.","required":true,"example":"0"}],"errors":[{"code":"invalid_ais_inhalation","message":"AIS inhalation needs ais_grade 0-4 as assigned from Endorf 2007 bronchoscopic criteria. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/ais-inhalation","citation":{"authors":"Endorf FW, Gamelli RL","doi":"10.1097/bcr.0b013e31802c889f","id":"endorf-2007","pmid":"17211205","source":"J Burn Care Res. 2007;28(1):80-83","title":"Inhalation injury, pulmonary perturbations, and fluid resuscitation","url":"https://doi.org/10.1097/bcr.0b013e31802c889f"},"formula_expression":"ais_grade in {0, 1, 2, 3, 4} as assigned by the caller (Endorf 2007 bronchoscopic grading derived from AIS criteria). high_grade iff ais_grade >= 2 (grades 2, 3, and 4 had significantly worse survival than grades 0 or 1, P = .03). magent does not perform bronchoscopy. Not ISS body-region AIS. Not RADS CT smoke score.","purpose":"Echo the caller-assigned Endorf 2007 bronchoscopic AIS inhalation grade (0-4) with the published description and high_grade (true when grade is 2-4). magent does not perform bronchoscopy. Not ISS body-region AIS. Not RADS CT smoke score.","markdown_url":"https://magentlab.com/docs/ais-inhalation.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"ais_inhalation"},{"name":"formula_expression","type":"string","description":"Published Endorf 2007 bronchoscopic AIS inhalation-grade rule"},{"name":"ais_grade","type":"integer","description":"Caller-assigned Endorf 2007 bronchoscopic AIS inhalation grade 0-4"},{"name":"description","type":"string","description":"Endorf 2007 bronchoscopic wording for that grade"},{"name":"high_grade","type":"boolean","description":"true iff ais_grade >= 2 (Endorf 2007: grades 2, 3, and 4 had significantly worse survival than grades 0 or 1, P = .03)"},{"name":"components","type":"array","description":"Per-grade Tree rows grade_0, grade_1, grade_2, grade_3, grade_4 with factor and met; exactly one is met"},{"name":"citation","type":"object","description":"Endorf 2007 J Burn Care Res citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"ais_grade":"0"},{"ais_grade":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/ais-inhalation","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/ais-inhalation?ais_grade=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/ais-inhalation","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/pts","description":"Pediatric Trauma Score from Tepas 1987: six caller-assigned items (weight, airway, systolic BP, CNS, skeletal, wound), each +2 / +1 / −1, total −6 to +12 (higher is better). Returns score_le_8 because scores ≤8 were associated with significant mortality and trauma-center care. Deterministic published arithmetic with citation; not ISS or RTS; not a triage order. magent does not examine the child.","parameters":[{"in":"query","name":"weight_kg","type":"number","description":"Weight in kilograms (1-500), the Tepas 1987 size item. Provide weight_kg or weight_lb. >20 → +2; 10-20 inclusive → +1; <10 → −1.","required":false,"example":"25"},{"in":"query","name":"weight_lb","type":"number","description":"Weight in pounds (2-1100). Converted as kg = lb * 0.45359237.","required":false,"example":"55.1156"},{"in":"query","name":"airway","type":"string","enum":["normal","maintainable","unmaintainable"],"description":"Caller-assigned airway (normal, maintainable, or unmaintainable). Tepas 1987: normal → +2, maintainable → +1, unmaintainable → −1. magent does not examine the airway.","required":true,"example":"normal"},{"in":"query","name":"systolic_mm_hg","type":"integer","description":"Systolic blood pressure in mm Hg (integer 0-300). Tepas 1987: >90 → +2; 50-90 inclusive → +1; <50 → −1. 0 is a published −1 band.","required":true,"example":"100"},{"in":"query","name":"cns","type":"string","enum":["awake","obtunded","coma"],"description":"Caller-assigned CNS (awake, obtunded, or coma). Tepas 1987: awake → +2, obtunded → +1, coma → −1. magent does not examine the child.","required":true,"example":"awake"},{"in":"query","name":"skeletal","type":"string","enum":["none","closed","open_or_multiple"],"description":"Caller-assigned skeletal injury (none, closed, or open_or_multiple). Tepas 1987: none → +2, closed → +1, open_or_multiple → −1. magent does not assign fractures.","required":true,"example":"none"},{"in":"query","name":"wound","type":"string","enum":["none","minor","major"],"description":"Caller-assigned cutaneous wound (none, minor, or major). Tepas 1987: none → +2, minor → +1, major → −1. magent does not inspect wounds.","required":true,"example":"none"}],"errors":[{"code":"invalid_weight","message":"weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_pts_airway","message":"airway must be normal, maintainable, or unmaintainable (Tepas 1987 Pediatric Trauma Score). Returned before settlement; you are not charged.","status":400},{"code":"invalid_rts_systolic","message":"systolic_mm_hg must be an integer from 0 to 300. Returned before settlement; you are not charged.","status":400},{"code":"invalid_pts_cns","message":"cns must be awake, obtunded, or coma (Tepas 1987 Pediatric Trauma Score). Returned before settlement; you are not charged.","status":400},{"code":"invalid_pts_skeletal","message":"skeletal must be none, closed, or open_or_multiple (Tepas 1987 Pediatric Trauma Score). Returned before settlement; you are not charged.","status":400},{"code":"invalid_pts_wound","message":"wound must be none, minor, or major (Tepas 1987 Pediatric Trauma Score). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/pts","citation":{"authors":"Tepas JJ, Mollitt DL, Talbert JL, Bryant M","doi":"10.1016/s0022-3468(87)80006-4","id":"tepas-1987","pmid":"3102714","source":"J Pediatr Surg. 1987;22(1):14-18","title":"The pediatric trauma score as a predictor of injury severity in the injured child","url":"https://doi.org/10.1016/s0022-3468(87)80006-4"},"formula_expression":"PTS = weight_points + airway_points + sbp_points + cns_points + skeletal_points + wound_points; Tepas 1987; each +2/+1/−1; total −6 to +12","purpose":"Compute the Tepas 1987 Pediatric Trauma Score from caller-assigned weight, airway, systolic BP, CNS, skeletal, and wound grades.","markdown_url":"https://magentlab.com/docs/pts.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"pts"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"PTS total −6 to +12 (higher is better)"},{"name":"max_score","type":"integer","description":"Always 12"},{"name":"min_score","type":"integer","description":"Always −6"},{"name":"score_le_8","type":"boolean","description":"true when score is ≤8. Tepas 1987 associated scores ≤8 with significant mortality and the need for trauma-center care. Not a triage order."},{"name":"weight_kg","type":"number","description":"Normalized weight in kg"},{"name":"airway","type":"string","description":"Caller-assigned airway used"},{"name":"systolic_mm_hg","type":"integer","description":"Systolic BP used, mm Hg"},{"name":"cns","type":"string","description":"Caller-assigned CNS used"},{"name":"skeletal","type":"string","description":"Caller-assigned skeletal grade used"},{"name":"wound","type":"string","description":"Caller-assigned wound grade used"},{"name":"components","type":"array","description":"Per-item points (always present)"},{"name":"citation","type":"object","description":"Tepas 1987 J Pediatr Surg citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"airway":"normal","cns":"awake","skeletal":"none","systolic_mm_hg":"100","weight_kg":"25","wound":"none"},{"airway":"normal","cns":"awake","skeletal":"none","systolic_mm_hg":"100","weight_kg":"25","wound":"none"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/pts","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/pts?weight_kg=25&airway=normal&systolic_mm_hg=100&cns=awake&skeletal=none&wound=none","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/pts","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/pediatric-big","description":"Borgman 2011 pediatric trauma BIG score: admission base deficit (mmol/L as published; magent does not flip signed base excess) plus 2.5 times INR plus (15 minus GCS). Caller supplies numeric base_deficit, inr, and GCS 3-15. magent does not assay blood gas or INR or compute GCS. Numeric score only; Borgman 2011 does not print a 12.7 or 16 mortality cut. Not a medical device or a trauma-bay disposition order.","parameters":[{"in":"query","name":"base_deficit","type":"number","description":"Admission base deficit in mmol/L as Borgman 2011 uses it (−20 to 30 magent clamp). A larger positive deficit raises the score. magent does not assay blood gas and does not negate a signed base-excess value.","required":true,"example":0},{"in":"query","name":"inr","type":"number","description":"Caller-assigned international normalized ratio (0.8-10.0 magent clamp). magent does not assay INR.","required":true,"example":1.0},{"in":"query","name":"gcs","type":"integer","description":"Caller-assigned Glasgow Coma Scale total, integer 3-15 (published range). magent does not compute eye, verbal, or motor GCS.","required":true,"example":15}],"errors":[{"code":"invalid_pediatric_big","message":"Pediatric BIG score inputs must be numeric base deficit, INR, and GCS in the Borgman 2011 published ranges. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/pediatric-big","citation":{"authors":"Borgman MA, Maegele M, Wade CE, Blackbourne LH, Spinella PC","doi":"10.1542/peds.2010-2439","id":"borgman-2011","pmid":"21422095","source":"Pediatrics. 2011;127(4):e892-e897","title":"Pediatric trauma BIG score: predicting mortality in children after military and civilian trauma","url":"https://doi.org/10.1542/peds.2010-2439"},"formula_expression":"BIG = base_deficit + (2.5 * inr) + (15 - gcs); Borgman 2011; admission base deficit mmol/L as published (not a signed base-excess flip); INR unitless; GCS integer 3-15; magent does not assay blood gas or INR or compute GCS; no later 12.7 or 16 mortality cut","purpose":"Compute the Borgman 2011 pediatric trauma BIG score from caller-assigned admission base deficit in mmol/L, INR, and GCS. Returns the published arithmetic only.","markdown_url":"https://magentlab.com/docs/pediatric-big.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"pediatric_big"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"base_deficit","type":"number","description":"Admission base deficit in mmol/L used (Borgman 2011 sign, not flipped BE)"},{"name":"inr","type":"number","description":"INR used"},{"name":"gcs","type":"integer","description":"GCS total used (3-15)"},{"name":"score","type":"number","description":"Borgman 2011 BIG score, 1 decimal. Numeric score only; no later 12.7 or 16 mortality cut."},{"name":"citation","type":"object","description":"Borgman 2011 Pediatrics citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"base_deficit":"0","gcs":"15","inr":"1.0"},{"base_deficit":"0","gcs":"15","inr":"1.0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/pediatric-big","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/pediatric-big?base_deficit=0&inr=1.0&gcs=15","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/pediatric-big","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/ribscore","description":"Chapman 2016 RibScore from six caller-assigned radiographic flags (≥6 rib fractures, bilateral, flail chest, ≥3 severely bicortical displaced, first rib, and all three anatomic areas). 1 point each, total 0-6. Associated linearly with pneumonia, respiratory failure, and tracheostomy. magent does not read a CT. Deterministic published arithmetic with citation; not a named risk class.","parameters":[{"in":"query","name":"six_or_more_ribs","type":"boolean","description":"Six or more rib fractures as assigned by the caller (Chapman 2016). true or false. magent does not read a CT or count fractures.","required":true,"example":"false"},{"in":"query","name":"bilateral","type":"boolean","description":"Bilateral rib fractures as assigned by the caller (Chapman 2016). true or false. magent does not read a CT.","required":true,"example":"false"},{"in":"query","name":"flail_chest","type":"boolean","description":"Flail chest as assigned by the caller (Chapman 2016). true or false. magent does not read a CT or examine the chest wall.","required":true,"example":"false"},{"in":"query","name":"three_or_more_displaced","type":"boolean","description":"Three or more severely (bicortical) displaced rib fractures as assigned by the caller (Chapman 2016). true or false. magent does not read a CT or grade displacement.","required":true,"example":"false"},{"in":"query","name":"first_rib","type":"boolean","description":"First rib fracture as assigned by the caller (Chapman 2016). true or false. magent does not read a CT.","required":true,"example":"false"},{"in":"query","name":"all_three_areas","type":"boolean","description":"At least one fracture in all three anatomic areas (anterior, lateral, and posterior) as assigned by the caller (Chapman 2016). true or false. magent does not read a CT or assign anatomic zones.","required":true,"example":"false"}],"errors":[{"code":"invalid_ribscore","message":"RibScore inputs must match Chapman 2016 six radiographic flags from that paper. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/ribscore","citation":{"authors":"Chapman BC, Herbert B, Rodil M, et al","doi":"10.1097/TA.0000000000000867","id":"chapman-2016","pmid":"26683395","source":"J Trauma Acute Care Surg. 2016;80(1):95-101","title":"RibScore: A novel radiographic score based on fracture pattern that predicts pneumonia, respiratory failure, and tracheostomy","url":"https://doi.org/10.1097/TA.0000000000000867"},"formula_expression":"RibScore = six_or_more_ribs + bilateral + flail_chest + three_or_more_displaced + first_rib + all_three_areas; each 1; Chapman 2016; max 6; caller-assigned radiographic flags; magent does not read a CT","purpose":"Sum the six Chapman 2016 RibScore radiographic flags and return the integer total 0-6. That paper associated the score linearly with pneumonia, respiratory failure, and tracheostomy.","markdown_url":"https://magentlab.com/docs/ribscore.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"ribscore"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"RibScore points 0-6"},{"name":"max_score","type":"integer","description":"Always 6"},{"name":"components","type":"array","description":"Per-flag Chapman 2016 points"},{"name":"citation","type":"object","description":"Chapman 2016 J Trauma Acute Care Surg citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"all_three_areas":"false","bilateral":"false","first_rib":"false","flail_chest":"false","six_or_more_ribs":"false","three_or_more_displaced":"false"},{"all_three_areas":"false","bilateral":"false","first_rib":"false","flail_chest":"false","six_or_more_ribs":"false","three_or_more_displaced":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/ribscore","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/ribscore?six_or_more_ribs=false&bilateral=false&flail_chest=false&three_or_more_displaced=false&first_rib=false&all_three_areas=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/ribscore","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/ribs","description":"Buchholz 2023 Revised Intensity Battle Score: 2.275 per fractured rib level, 4.08 chest tube, 1.525 pulmonary contusions, 2.83 COPD, 8.137 when GCS <15, rounded to an integer. Age is not a component. Published ICU triage cutoff 12. Not Chapman 2016 RibScore and not Battle 2014 STUMBL. magent does not count ribs or compute GCS. Deterministic published arithmetic with citation; not a diagnosis or surgical plan.","parameters":[{"in":"query","name":"rib_count","type":"integer","description":"Caller-assigned number of fractured rib levels, integer 0–24. Buchholz 2023: 2.275 points per rib level, not per individual fracture (six fractures on three ribs is 3). magent does not read a CT or count ribs.","required":true,"example":"1"},{"in":"query","name":"chest_tube","type":"boolean","description":"Chest tube placed, present, or anticipated as assigned by the caller (Buchholz 2023). true or false. true scores 4.08 before rounding.","required":true,"example":"false"},{"in":"query","name":"pulmonary_contusions","type":"boolean","description":"Pulmonary contusions as assigned by the caller (Buchholz 2023). true or false. true scores 1.525 before rounding. magent does not read a CT.","required":true,"example":"false"},{"in":"query","name":"copd","type":"boolean","description":"History of COPD as assigned by the caller (Buchholz 2023). true or false. true scores 2.83 before rounding. Age is not a component.","required":true,"example":"false"},{"in":"query","name":"gcs","type":"integer","description":"Caller-assigned Glasgow Coma Scale total, integer 3–15. Buchholz 2023 scores 8.137 when GCS <15 and 0 when GCS is 15. magent does not compute eye, verbal, or motor.","required":true,"example":"15"}],"errors":[{"code":"invalid_rib_count","message":"rib_count must be an integer from 0 through 24 (Battle 2014 STUMBL Table 4). Returned before settlement; you are not charged.","status":400},{"code":"invalid_gcs_total","message":"gcs must be an integer from 3 to 15. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/ribs","citation":{"authors":"Buchholz CJ, Jia L, Manea C, Petersen T, Wang H, Stright A, Young JS, Calland JF","doi":"10.1177/00031348221123087","id":"buchholz-2022","pmid":"36120831","source":"Am Surg. 2023;89(10):4668-4674","title":"Revised Intensity Battle Score (RIBS): Development of a Clinical Score for Predicting Poor Outcomes After Rib Fractures","url":"https://doi.org/10.1177/00031348221123087"},"formula_expression":"RIBS = round(2.275*rib_count + 1.525*pulmonary_contusions + 2.83*copd + 4.08*chest_tube + 8.137*(gcs<15)); Buchholz 2023; rib level not fracture count; age is not a component; ICU triage cutoff 12; not Chapman 2016 RibScore; not Battle 2014 STUMBL","purpose":"Sum Buchholz 2023 RIBS regression points from caller-assigned rib-level fracture count, chest tube, pulmonary contusions, COPD, and GCS <15, and return the integer score and the published score-12 ICU triage band.","markdown_url":"https://magentlab.com/docs/ribs.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"ribs"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Buchholz 2023 RIBS, rounded nearest integer"},{"name":"ribs_band","type":"string","description":"below_12 or at_or_above_12. Published ICU triage cutoff is 12. A band, not an ICU order."},{"name":"icu_triage_cutoff","type":"boolean","description":"true when score ≥12 (Buchholz 2023 recommended ICU triage cutoff)"},{"name":"any_complication_percent","type":"number","description":"Published any-complication percent from logit 0.1879*score − 2.8823"},{"name":"unplanned_icu_or_intubation_percent","type":"number","description":"Published unplanned ICU-upgrade or intubation percent"},{"name":"vent_or_tracheostomy_percent","type":"number","description":"Published >7 ventilator-days or tracheostomy percent"},{"name":"pneumonia_or_vap_percent","type":"number","description":"Published pneumonia or VAP percent"},{"name":"mortality_percent","type":"number","description":"Published mortality percent"},{"name":"rib_count","type":"integer","description":"Caller rib-level count used"},{"name":"chest_tube","type":"boolean","description":"Caller chest-tube flag used"},{"name":"pulmonary_contusions","type":"boolean","description":"Caller pulmonary-contusion flag used"},{"name":"copd","type":"boolean","description":"Caller COPD flag used"},{"name":"gcs","type":"integer","description":"Caller GCS total used"},{"name":"gcs_lt_15","type":"boolean","description":"true when caller GCS is 3–14"},{"name":"components","type":"array","description":"Per-predictor Buchholz 2023 points"},{"name":"citation","type":"object","description":"Buchholz 2023 Am Surg citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"chest_tube":"false","copd":"false","gcs":"15","pulmonary_contusions":"false","rib_count":"1"},{"chest_tube":"false","copd":"false","gcs":"15","pulmonary_contusions":"false","rib_count":"1"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/ribs","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/ribs?rib_count=1&chest_tube=false&pulmonary_contusions=false&copd=false&gcs=15","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/ribs","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/scarf","description":"Hardin 2019 SCARF from four caller-assigned flags (incentive spirometry <50% predicted, respiratory rate >20, numeric pain score ≥5, inadequate cough). 1 point each, total 0-4. Proposed threshold is score greater than 2. magent does not measure spirometry or examine the chest. Not a named risk class, analgesia order, or SSRF order.","parameters":[{"in":"query","name":"incentive_spirometry_lt_50_predicted","type":"boolean","description":"Incentive spirometry volume <50% of predicted as assigned by the caller (Hardin 2019). true or false. magent does not measure incentive spirometry.","required":true,"example":"false"},{"in":"query","name":"respiratory_rate_gt_20","type":"boolean","description":"Respiratory rate >20 breaths/min as assigned by the caller (Hardin 2019). true or false. magent does not count respiratory rate.","required":true,"example":"false"},{"in":"query","name":"pain_score_ge_5","type":"boolean","description":"Numeric pain score ≥5 as assigned by the caller (Hardin 2019). true or false. magent does not score pain.","required":true,"example":"false"},{"in":"query","name":"inadequate_cough","type":"boolean","description":"Inadequate cough (unable to clear secretions) as assigned by the caller (Hardin 2019). true or false. magent does not examine the chest or cough.","required":true,"example":"false"}],"errors":[{"code":"invalid_scarf","message":"SCARF needs Hardin 2019 incentive-spirometry, respiratory-rate, pain, and cough flags. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/scarf","citation":{"authors":"Hardin KS, Leasia KN, Haenel J, Moore EE, Burlew CC, Pieracci FM","doi":"10.1097/TA.0000000000002480","id":"hardin-2019","pmid":"31425473","source":"J Trauma Acute Care Surg. 2019;87(6):1260-1268","title":"The Sequential Clinical Assessment of Respiratory Function (SCARF) score: A dynamic pulmonary physiologic score that predicts adverse outcomes in critically ill rib fracture patients","url":"https://doi.org/10.1097/TA.0000000000002480"},"formula_expression":"SCARF = incentive_spirometry_lt_50_predicted + respiratory_rate_gt_20 + pain_score_ge_5 + inadequate_cough; each 1; Hardin 2019; max 4; proposed threshold score > 2 (scarf_gt_2); caller-assigned flags; magent does not measure spirometry or examine the chest","purpose":"Sum the four Hardin 2019 Sequential Clinical Assessment of Respiratory Function (SCARF) flags and return the integer total 0-4 plus whether the score is greater than the paper's proposed threshold of 2.","markdown_url":"https://magentlab.com/docs/scarf.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"scarf"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"SCARF points 0-4"},{"name":"max_score","type":"integer","description":"Always 4"},{"name":"scarf_gt_2","type":"boolean","description":"true iff score > 2 (Hardin 2019 proposed threshold). Not a named risk class and not an analgesia or SSRF order."},{"name":"components","type":"array","description":"Per-flag Hardin 2019 points"},{"name":"citation","type":"object","description":"Hardin 2019 J Trauma Acute Care Surg citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"inadequate_cough":"false","incentive_spirometry_lt_50_predicted":"false","pain_score_ge_5":"false","respiratory_rate_gt_20":"false"},{"inadequate_cough":"false","incentive_spirometry_lt_50_predicted":"false","pain_score_ge_5":"false","respiratory_rate_gt_20":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/scarf","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/scarf?incentive_spirometry_lt_50_predicted=false&respiratory_rate_gt_20=false&pain_score_ge_5=false&inadequate_cough=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/scarf","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rts","description":"Revised Trauma Score (Champion 1989): coded GCS, SBP, and respiratory rate (0-4 each), T-RTS as their sum (0-12), and weighted RTS = 0.9368·GCS + 0.7326·SBP + 0.2908·RR. Deterministic published arithmetic with citation. Not a triage order; not ISS; not the 1981 Trauma Score.","parameters":[{"in":"query","name":"gcs","type":"integer","description":"Glasgow Coma Scale total 3-15 (1976 motor-6 scale as used by Champion 1989). Caller-assigned; magent does not score eye/verbal/motor.","required":true,"example":"15"},{"in":"query","name":"systolic_mm_hg","type":"integer","description":"Systolic blood pressure in mm Hg (0-300). 0 is a published coded band.","required":true,"example":"120"},{"in":"query","name":"respiratory_rate","type":"integer","description":"Respiratory rate in breaths per minute (0-80). 0 is a published coded band.","required":true,"example":"16"}],"errors":[{"code":"invalid_gcs_total","message":"gcs must be an integer from 3 to 15. Returned before settlement; you are not charged.","status":400},{"code":"invalid_rts_systolic","message":"systolic_mm_hg must be an integer from 0 to 300. Returned before settlement; you are not charged.","status":400},{"code":"invalid_rts_respiratory_rate","message":"respiratory_rate must be an integer from 0 to 80. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rts","citation":{"authors":"Champion HR, Sacco WJ, Copes WS, Gann DS, Gennarelli TA, Flanagan ME","doi":"10.1097/00005373-198905000-00017","id":"champion-1989","pmid":"2657085","source":"J Trauma. 1989;29(5):623-629","title":"A revision of the Trauma Score","url":"https://doi.org/10.1097/00005373-198905000-00017"},"formula_expression":"T-RTS = coded_gcs + coded_sbp + coded_rr (each 0-4); RTS = 0.9368*coded_gcs + 0.7326*coded_sbp + 0.2908*coded_rr","purpose":"Compute Champion 1989 coded GCS, SBP, and respiratory-rate values, the triage T-RTS sum, and the weighted RTS used for outcome evaluation.","markdown_url":"https://magentlab.com/docs/rts.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rts"},{"name":"formula_expression","type":"string","description":"Champion 1989 T-RTS and RTS"},{"name":"gcs","type":"integer","description":"Caller GCS total"},{"name":"systolic_mm_hg","type":"integer","description":"Caller SBP"},{"name":"respiratory_rate","type":"integer","description":"Caller respiratory rate"},{"name":"coded_gcs","type":"integer","description":"Coded GCS 0-4"},{"name":"coded_sbp","type":"integer","description":"Coded SBP 0-4"},{"name":"coded_rr","type":"integer","description":"Coded RR 0-4"},{"name":"t_rts","type":"integer","description":"Triage RTS, sum of coded values, 0-12"},{"name":"rts","type":"number","description":"Weighted RTS (4 decimal places)"},{"name":"citation","type":"object","description":"Champion 1989"},{"name":"disclaimer","type":"string","description":"Not a medical device"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"gcs":"15","respiratory_rate":"16","systolic_mm_hg":"120"},{"gcs":"15","respiratory_rate":"16","systolic_mm_hg":"120"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rts","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rts?gcs=15&systolic_mm_hg=120&respiratory_rate=16","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rts","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/triss","description":"TRISS (Boyd 1987): probability of survival from a caller-assigned Champion weighted RTS (0.0-7.8408), ISS (1-75), age (AgeIndex 0 if age < 55 else 1), and blunt or penetrating mechanism using original MTOS coefficients. Deterministic published arithmetic with citation. Not a triage order; not NISS; not ASCOT; not Champion 1995 revised coefficients.","parameters":[{"in":"query","name":"mechanism","type":"string","enum":["blunt","penetrating"],"description":"blunt or penetrating. Selects the Boyd 1987 original MTOS coefficient set. Required; magent does not infer mechanism.","required":true,"example":"blunt"},{"in":"query","name":"rts","type":"number","description":"Caller-assigned Champion weighted Revised Trauma Score (number 0.0-7.8408). magent does not recode GCS, SBP, or respiratory rate here.","required":true,"example":"7.8408"},{"in":"query","name":"iss","type":"integer","description":"Caller-assigned Injury Severity Score integer 1-75. magent does not compute ISS from AIS here.","required":true,"example":"9"},{"in":"query","name":"age","type":"integer","description":"Age in whole years 1-120. AgeIndex is 0 if age < 55 and 1 if age >= 55 (Boyd 1987).","required":true,"example":"30"}],"errors":[{"code":"invalid_triss_mechanism","message":"mechanism must be blunt or penetrating (Boyd 1987 TRISS). Returned before settlement; you are not charged.","status":400},{"code":"invalid_rts_value","message":"rts must be a number from 0.0 to 7.8408 (Champion weighted RTS for TRISS). Returned before settlement; you are not charged.","status":400},{"code":"invalid_iss_total","message":"iss must be an integer from 1 to 75 (Boyd 1987 TRISS). Returned before settlement; you are not charged.","status":400},{"code":"invalid_triss_age","message":"age must be an integer from 1 to 120 (Boyd 1987 TRISS AgeIndex). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/triss","citation":{"authors":"Boyd CR, Tolson MA, Copes WS","doi":"10.1097/00005373-198704000-00005","id":"boyd-1987","pmid":"3106646","source":"J Trauma. 1987;27(4):370-378","title":"Evaluating trauma care: the TRISS method. Trauma Score and the Injury Severity Score","url":"https://doi.org/10.1097/00005373-198704000-00005"},"formula_expression":"Ps = 1 / (1 + e^(-b)); AgeIndex = 0 if age < 55 else 1; blunt: b = -1.2470 + 0.9544*RTS - 0.0768*ISS - 1.9052*AgeIndex; penetrating: b = -0.6029 + 1.1430*RTS - 0.1516*ISS - 2.6676*AgeIndex (Boyd 1987 original MTOS)","purpose":"Compute Boyd 1987 TRISS probability of survival from mechanism, Champion weighted RTS, ISS, and age using the original Major Trauma Outcome Study coefficients printed with that method.","markdown_url":"https://magentlab.com/docs/triss.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"triss"},{"name":"formula_expression","type":"string","description":"Boyd 1987 original MTOS TRISS equations"},{"name":"mechanism","type":"string","description":"blunt or penetrating"},{"name":"rts","type":"number","description":"Caller-assigned weighted RTS"},{"name":"iss","type":"integer","description":"Caller-assigned ISS 1-75"},{"name":"age","type":"integer","description":"Caller age in years 1-120"},{"name":"age_index","type":"integer","description":"0 if age < 55 else 1"},{"name":"b","type":"number","description":"TRISS logit b, 4 decimal places"},{"name":"survival_probability","type":"number","description":"Ps = 1 / (1 + e^(-b)), 4 decimal places"},{"name":"citation","type":"object","description":"Boyd 1987 citation"},{"name":"disclaimer","type":"string","description":"Not a medical device"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"30","iss":"9","mechanism":"blunt","rts":"7.8408"},{"age":"30","iss":"9","mechanism":"blunt","rts":"7.8408"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/triss","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/triss?mechanism=blunt&rts=7.8408&iss=9&age=30","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/triss","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/abc-score","description":"Nunez 2009 ABC (assessment of blood consumption): penetrating mechanism, arrival SBP ≤90 mm Hg, arrival HR ≥120 bpm, and positive FAST; 1 point each, max 4. score_ge_2 is the published ≥2 cutoff (75% sensitive / 86% specific for massive transfusion in that paper). Deterministic published arithmetic with citation; not a transfusion or MTP order; not TASH; not ABC/2 ICH volume.","parameters":[{"in":"query","name":"penetrating","type":"boolean","description":"Penetrating injury mechanism as assigned by the caller (Nunez 2009). true or false. magent does not assign mechanism.","required":true,"example":"false"},{"in":"query","name":"systolic_mm_hg","type":"integer","description":"Arrival systolic blood pressure in mm Hg (integer 0-300). ≤90 scores 1.","required":true,"example":"120"},{"in":"query","name":"heart_rate_bpm","type":"integer","description":"Arrival heart rate in beats per minute (integer 30-220). ≥120 scores 1.","required":true,"example":"80"},{"in":"query","name":"positive_fast","type":"boolean","description":"Positive FAST as assigned by the caller (Nunez 2009). true or false. magent does not interpret FAST images.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_rts_systolic","message":"systolic_mm_hg must be an integer from 0 to 300. Returned before settlement; you are not charged.","status":400},{"code":"invalid_heart_rate","message":"heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/abc-score","citation":{"authors":"Nunez TC, Voskresensky IV, Dossett LA, Shinall R, Dutton WD, Cotton BA","doi":"10.1097/TA.0b013e3181961c35","id":"nunez-2009","pmid":"19204506","source":"J Trauma. 2009;66(2):346-352","title":"Early prediction of massive transfusion in trauma: simple as ABC (assessment of blood consumption)?","url":"https://doi.org/10.1097/TA.0b013e3181961c35"},"formula_expression":"ABC = penetrating + sbp_le_90 + hr_ge_120 + positive_fast; each 1; max 4; score_ge_2 iff score >= 2","purpose":"Sum the four Nunez 2009 ABC (assessment of blood consumption) arrival factors and return score_ge_2 at the published ≥2 cutoff.","markdown_url":"https://magentlab.com/docs/abc-score.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"abc_score"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"ABC points 0-4"},{"name":"max_score","type":"integer","description":"4"},{"name":"score_ge_2","type":"boolean","description":"true when score ≥2. Nunez 2009 classified that cutoff 75% sensitive / 86% specific for massive transfusion. Not an MTP order."},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Nunez et al. J Trauma 2009 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"heart_rate_bpm":"80","penetrating":"false","positive_fast":"false","systolic_mm_hg":"120"},{"heart_rate_bpm":"80","penetrating":"false","positive_fast":"false","systolic_mm_hg":"120"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/abc-score","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/abc-score?penetrating=false&systolic_mm_hg=120&heart_rate_bpm=80&positive_fast=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/abc-score","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/fast","description":"Scalea 1999 FAST four Ps (pericardial, perihepatic, perisplenic, pelvic). Each window is a caller-assigned boolean for free intraperitoneal fluid (perihepatic/Morison, perisplenic, pelvic) or pericardial fluid. positive is true if any window is positive and false only if all four are negative. Sequence is not required. Not eFAST pleural views. Not Huang or McKenney scoring. Not a laparotomy order. magent does not scan or interpret ultrasound. Not a medical device.","parameters":[{"in":"query","name":"perihepatic","type":"boolean","description":"Perihepatic (Morison / right-upper-quadrant) window positive for free intraperitoneal fluid as assigned by the caller (Scalea 1999 four Ps). true or false. magent does not interpret ultrasound.","required":true,"example":false},{"in":"query","name":"perisplenic","type":"boolean","description":"Perisplenic (left-upper-quadrant) window positive for free intraperitoneal fluid as assigned by the caller (Scalea 1999 four Ps). true or false. magent does not interpret ultrasound.","required":true,"example":false},{"in":"query","name":"pelvic","type":"boolean","description":"Pelvic window positive for free intraperitoneal fluid as assigned by the caller (Scalea 1999 four Ps). true or false. magent does not interpret ultrasound.","required":true,"example":false},{"in":"query","name":"pericardial","type":"boolean","description":"Pericardial window positive for pericardial fluid as assigned by the caller (Scalea 1999 four Ps). true or false. magent does not interpret ultrasound.","required":true,"example":false}],"errors":[{"code":"invalid_fast","message":"FAST inputs must match caller-assigned positivity of the published ultrasound windows. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/fast","citation":{"authors":"Scalea TM, Rodriguez A, Chiu WC, Brenneman FD, Fallon WF Jr, Kato K, McKenney MG, Nerlich ML, Ochsner MG, Yoshii H","doi":"10.1097/00005373-199903000-00022","id":"scalea-1999","pmid":"10088853","source":"J Trauma. 1999;46(3):466-472","title":"Focused Assessment with Sonography for Trauma (FAST): results from an international consensus conference","url":"https://doi.org/10.1097/00005373-199903000-00022"},"formula_expression":"positive iff perihepatic or perisplenic or pelvic or pericardial (Scalea 1999 four Ps: pericardial, perihepatic, perisplenic, pelvic). Each flag is caller-assigned free intraperitoneal fluid (perihepatic/Morison, perisplenic, pelvic) or pericardial fluid. Absence of all four is negative. Sequence is not required. Not pleural/eFAST views. Not Huang or McKenney scoring. Not a laparotomy order","purpose":"Apply Scalea 1999 FAST four Ps and return positive when any caller-assigned perihepatic, perisplenic, pelvic, or pericardial window has free fluid.","markdown_url":"https://magentlab.com/docs/fast.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"fast"},{"name":"formula_expression","type":"string","description":"Published Scalea 1999 FAST four-P any-window rule"},{"name":"perihepatic","type":"boolean","description":"Echo of the caller-assigned perihepatic (Morison) window flag"},{"name":"perisplenic","type":"boolean","description":"Echo of the caller-assigned perisplenic window flag"},{"name":"pelvic","type":"boolean","description":"Echo of the caller-assigned pelvic window flag"},{"name":"pericardial","type":"boolean","description":"Echo of the caller-assigned pericardial window flag"},{"name":"positive","type":"boolean","description":"true if any of the four Scalea 1999 windows is positive for free fluid. Not a laparotomy order."},{"name":"components","type":"array","description":"Rows for perihepatic, perisplenic, pelvic, pericardial, and overall positive with factor and met"},{"name":"citation","type":"object","description":"Scalea 1999 J Trauma citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"pelvic":"false","pericardial":"false","perihepatic":"false","perisplenic":"false"},{"pelvic":"false","pericardial":"false","perihepatic":"false","perisplenic":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/fast","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/fast?perihepatic=false&perisplenic=false&pelvic=false&pericardial=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/fast","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/tash","description":"Yücel 2006 TASH (Trauma Associated Severe Hemorrhage): seven independent nested less-than point bands for arrival SBP, hemoglobin, intra-abdominal fluid, complex long-bone/pelvic fracture AIS, heart rate, base excess, and male sex; max 28. Highest matching band only (do not stack). Deterministic published arithmetic with citation; not a transfusion or MTP order; not ABC (assessment of blood consumption). Caller assigns FAST and AIS; magent does not read imaging.","parameters":[{"in":"query","name":"systolic_mm_hg","type":"integer","description":"Arrival systolic blood pressure in mm Hg (integer 0-300). Nested less-than: <100 scores 4; <120 (and not <100) scores 1; ≥120 scores 0. Highest matching band only.","required":true,"example":"110"},{"in":"query","name":"hemoglobin_g_dl","type":"number","description":"Hemoglobin in g/dL (3-22). Provide this or hemoglobin_g_l, not both. Nested less-than: <7 scores 8; <9 scores 6; <10 scores 4; <11 scores 3; <12 scores 2; ≥12 scores 0. Highest matching band only.","required":false,"example":"10.5"},{"in":"query","name":"hemoglobin_g_l","type":"number","description":"Hemoglobin in g/L (30-220). Converted as hemoglobin_g_dl = hemoglobin_g_l / 10. Provide this or hemoglobin_g_dl, not both.","required":false,"example":"105"},{"in":"query","name":"intra_abdominal_fluid","type":"boolean","description":"Intra-abdominal fluid (FAST) as assigned by the caller (Yücel 2006). true or false. true scores 3. magent does not interpret FAST images.","required":true,"example":"false"},{"in":"query","name":"fracture_ais","type":"integer","description":"Caller-assigned AIS for complex long bone and/or pelvic fractures. Must be 0 (none), 3, 4, or 5. 3 or 4 scores 3; 5 scores 6. magent does not assign AIS from imaging.","required":true,"example":"3"},{"in":"query","name":"heart_rate_bpm","type":"integer","description":"Arrival heart rate in beats per minute (integer 30-220). >120 scores 2; 120 does not.","required":true,"example":"110"},{"in":"query","name":"base_excess_mmol_l","type":"number","description":"Admission base excess in mmol/L (−30 to 20). Nested less-than: < −10 scores 4; < −6 scores 3; < −2 scores 1; ≥ −2 scores 0. Highest matching band only.","required":true,"example":"-4"},{"in":"query","name":"sex","type":"string","description":"Sex as assigned by the caller. male scores 1; female scores 0.","required":true,"example":"male"}],"errors":[{"code":"invalid_rts_systolic","message":"systolic_mm_hg must be an integer from 0 to 300. Returned before settlement; you are not charged.","status":400},{"code":"invalid_hemoglobin","message":"hemoglobin_g_l (30-220) or hemoglobin_g_dl (3-22) is required, not both. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_tash_fracture_ais","message":"fracture_ais must be 0 (none), 3, 4, or 5 (Yücel 2006 AIS for complex long bone and/or pelvic fractures). Returned before settlement; you are not charged.","status":400},{"code":"invalid_heart_rate","message":"heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.","status":400},{"code":"invalid_base_excess","message":"base_excess_mmol_l must be a number from -30 to 20. Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/tash","citation":{"authors":"Yücel N, Lefering R, Maegele M, et al.","doi":"10.1097/01.ta.0000220386.84012.bf","id":"yucel-2006","pmid":"16766965","source":"J Trauma. 2006;60(6):1228-1236","title":"Trauma Associated Severe Hemorrhage (TASH)-Score: probability of mass transfusion as surrogate for life threatening hemorrhage after multiple trauma","url":"https://doi.org/10.1097/01.ta.0000220386.84012.bf"},"formula_expression":"TASH = SBP (<100:4, <120:1) + Hb g/dL (<7:8, <9:6, <10:4, <11:3, <12:2) + intra-abdominal fluid 3 + fracture AIS (3-4:3, 5:6) + HR>120:2 + BE mmol/L (<-10:4, <-6:3, <-2:1) + male 1; nested less-than highest band only; max 28","purpose":"Sum the seven Yücel 2006 TASH (Trauma Associated Severe Hemorrhage) nested less-than point bands and return the published 0–28 total as a surrogate for mass transfusion after multiple trauma.","markdown_url":"https://magentlab.com/docs/tash.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"tash"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"TASH points 0-28"},{"name":"max_score","type":"integer","description":"Always 28"},{"name":"systolic_mm_hg","type":"integer","description":"Systolic blood pressure used (mm Hg)"},{"name":"hemoglobin_g_dl","type":"number","description":"Hemoglobin used in g/dL (g/L inputs converted as g/dL = g/L / 10)"},{"name":"intra_abdominal_fluid","type":"boolean","description":"Caller-assigned FAST / intra-abdominal fluid flag used"},{"name":"fracture_ais","type":"integer","description":"Caller-assigned complex long-bone/pelvic fracture AIS used (0, 3, 4, or 5)"},{"name":"heart_rate_bpm","type":"integer","description":"Heart rate used (bpm)"},{"name":"base_excess_mmol_l","type":"number","description":"Base excess used (mmol/L)"},{"name":"sex","type":"string","description":"Sex used: male or female"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Yücel et al. J Trauma 2006 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"base_excess_mmol_l":"-4","fracture_ais":"3","heart_rate_bpm":"110","hemoglobin_g_dl":"10.5","intra_abdominal_fluid":"false","sex":"male","systolic_mm_hg":"110"},{"base_excess_mmol_l":"-4","fracture_ais":"3","heart_rate_bpm":"110","hemoglobin_g_dl":"10.5","intra_abdominal_fluid":"false","sex":"male","systolic_mm_hg":"110"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/tash","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/tash?systolic_mm_hg=110&hemoglobin_g_dl=10.5&intra_abdominal_fluid=false&fracture_ais=3&heart_rate_bpm=110&base_excess_mmol_l=-4&sex=male","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/tash","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/stumbl","description":"Battle 2014 STUMBL integer score after blunt chest wall trauma: 1 point per decade of age starting at 10, 3 per rib fracture, 5 for chronic lung disease, 4 for preinjury anticoagulants, and 2 per 5% SpO2 decrease starting at 94%. Table 5 complication probabilities 13/29/52/70/80/88%. magent does not examine the chest or count ribs. Not a medical device, not a disposition or ICU order.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years, integer 1–120. Battle 2014 Table 4: 1 point per additional 10-year increase starting at 10 (div(age, 10); age 10 scores 1, age 67 scores 6, age 1–9 scores 0). Not the adult 18–120 clamp.","required":true,"example":"67"},{"in":"query","name":"rib_count","type":"integer","description":"Caller-assigned number of rib fractures, integer 0–24. Battle 2014 Table 4: 3 points per additional rib fracture (3 ribs scores 9). magent does not examine the chest or count ribs.","required":true,"example":"3"},{"in":"query","name":"chronic_lung_disease","type":"boolean","description":"Pre-injury chronic lung disease as assigned by the caller (Battle 2014 Table 4). true or false. true scores 5.","required":true,"example":"true"},{"in":"query","name":"preinjury_anticoagulants","type":"boolean","description":"Pre-injury anticoagulant use as assigned by the caller (Battle 2014 Table 4). true or false. true scores 4.","required":true,"example":"false"},{"in":"query","name":"spo2_percent","type":"integer","description":"Oxygen saturation percent, integer 50–100. Battle 2014 Table 4 footnote c: 2 points per 5% decrease starting at 94% (≥95 scores 0; else 2*(1+div(94-spo2_percent, 5)); 87% scores 4). magent does not measure SpO2.","required":true,"example":"87"}],"errors":[{"code":"invalid_stumbl_age","message":"age must be an integer from 1 through 120 (Battle 2014 STUMBL; 1 point per decade starting at 10; not the adult 18-120 clamp). Returned before settlement; you are not charged.","status":400},{"code":"invalid_rib_count","message":"rib_count must be an integer from 0 through 24 (Battle 2014 STUMBL Table 4). Returned before settlement; you are not charged.","status":400},{"code":"invalid_spo2","message":"spo2_percent must be a number from 50 to 100. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/stumbl","citation":{"authors":"Battle CE, Hutchings H, Lovett S, Bouamra O, Jones S, Sen A, Gagg J, Robinson D, Hartford-Beynon J, Williams J, Evans A","doi":"10.1186/cc13873","id":"battle-2014","pmid":"24887537","source":"Crit Care. 2014;18(3):R98","title":"Predicting outcomes after blunt chest wall trauma: development and external validation of a new prognostic model","url":"https://doi.org/10.1186/cc13873"},"formula_expression":"STUMBL = div(age, 10) + 3*rib_count + chronic_lung_disease 5 + preinjury_anticoagulants 4 + spo2 (>=95 0 else 2*(1+div(94-spo2_percent, 5))); Battle 2014 Table 4; Table 5 0-10 13%, 11-15 29%, 16-20 52%, 21-25 70%, 26-30 80%, 31+ 88%","purpose":"Sum Battle 2014 Table 4 STUMBL points from caller-assigned age, rib fracture count, chronic lung disease, preinjury anticoagulants, and SpO2, and return the Table 5 complication-probability band.","markdown_url":"https://magentlab.com/docs/stumbl.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"stumbl"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"STUMBL / Battle integer points"},{"name":"stumbl_band","type":"string","description":"Battle 2014 Table 5 band: band_0_10, band_11_15, band_16_20, band_21_25, band_26_30, or band_31_plus. A probability band, not a disposition or ICU order."},{"name":"complication_probability_percent","type":"integer","description":"Battle 2014 Table 5 predicted complication probability: 13, 29, 52, 70, 80, or 88"},{"name":"at_risk_for_complications","type":"boolean","description":"true when score ≥11 (Battle 2014 at-risk-for-complications cutoff). Not a treatment order."},{"name":"icu_admission_cutoff","type":"boolean","description":"true when score ≥26 (Battle 2014 ICU-admission cutoff). Not an ICU admission order."},{"name":"age_years","type":"integer","description":"Age in years used for div(age, 10)"},{"name":"rib_count","type":"integer","description":"Caller-assigned rib fracture count used"},{"name":"chronic_lung_disease","type":"boolean","description":"Caller-assigned chronic lung disease flag used"},{"name":"preinjury_anticoagulants","type":"boolean","description":"Caller-assigned pre-injury anticoagulant flag used"},{"name":"spo2_percent","type":"integer","description":"Oxygen saturation percent used"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Battle et al. Crit Care 2014 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"67","chronic_lung_disease":"true","preinjury_anticoagulants":"false","rib_count":"3","spo2_percent":"87"},{"age":"67","chronic_lung_disease":"true","preinjury_anticoagulants":"false","rib_count":"3","spo2_percent":"87"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/stumbl","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/stumbl?age=67&rib_count=3&chronic_lung_disease=true&preinjury_anticoagulants=false&spo2_percent=87","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/stumbl","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/mews","description":"MEWS from Subbe 2001 Table 1: systolic BP, heart rate, respiratory rate, temperature (°C), and caller-assigned AVPU (alert/voice/pain/unresponsive) summed to a 0–14 total. Returns score_ge_5 because scores ≥5 were associated with increased risk of death or ICU/HDU. Deterministic published arithmetic with citation; not NEWS2; not an ICU-admission order.","parameters":[{"in":"query","name":"systolic_mm_hg","type":"integer","description":"Systolic blood pressure in mm Hg (integer 0-300). Subbe 2001: ≤70 → 3, 71-80 → 2, 81-100 → 1, 101-199 → 0, ≥200 → 2.","required":true,"example":"120"},{"in":"query","name":"heart_rate_bpm","type":"integer","description":"Heart rate in beats/min (integer 30-220). Subbe 2001: ≤40 → 2, 41-50 → 1, 51-100 → 0, 101-110 → 1, 111-129 → 2, ≥130 → 3.","required":true,"example":"80"},{"in":"query","name":"respiratory_rate","type":"integer","description":"Respiratory rate in breaths/min (integer 0-80). Subbe 2001: <9 → 2, 9-14 → 0, 15-20 → 1, 21-29 → 2, ≥30 → 3.","required":true,"example":"12"},{"in":"query","name":"temperature_c","type":"number","description":"Temperature in °C (30.0-45.0). Subbe 2001: <35 → 2, 35-38.4 → 0, ≥38.5 → 2. magent does not convert Fahrenheit.","required":true,"example":"37.0"},{"in":"query","name":"avpu","type":"string","enum":["alert","voice","pain","unresponsive"],"description":"Caller-assigned AVPU (alert, voice, pain, or unresponsive). Subbe 2001: alert → 0, voice → 1, pain → 2, unresponsive → 3. magent does not compute GCS here.","required":true,"example":"alert"}],"errors":[{"code":"invalid_rts_systolic","message":"systolic_mm_hg must be an integer from 0 to 300. Returned before settlement; you are not charged.","status":400},{"code":"invalid_heart_rate","message":"heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.","status":400},{"code":"invalid_rts_respiratory_rate","message":"respiratory_rate must be an integer from 0 to 80. Returned before settlement; you are not charged.","status":400},{"code":"invalid_temperature","message":"temperature_c must be a number from 30.0 to 45.0. Returned before settlement; you are not charged.","status":400},{"code":"invalid_mews_avpu","message":"avpu must be alert, voice, pain, or unresponsive (Subbe 2001). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/mews","citation":{"authors":"Subbe CP, Kruger M, Rutherford P, Gemmel L","doi":"10.1093/qjmed/94.10.521","id":"subbe-2001","pmid":"11588210","source":"QJM. 2001;94(10):521-526","title":"Validation of a modified Early Warning Score in medical admissions","url":"https://doi.org/10.1093/qjmed/94.10.521"},"formula_expression":"MEWS = sbp_points + hr_points + rr_points + temp_points + avpu_points; Subbe 2001 Table 1; max 14","purpose":"Compute the Subbe 2001 modified Early Warning Score from systolic BP, heart rate, respiratory rate, temperature, and caller-assigned AVPU.","markdown_url":"https://magentlab.com/docs/mews.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"mews"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"MEWS points 0-14"},{"name":"max_score","type":"integer","description":"Always 14"},{"name":"score_ge_5","type":"boolean","description":"true when score is ≥5. Subbe 2001 associated scores of 5 or more with increased risk of death, ICU, or HDU. Not an ICU-admission order."},{"name":"systolic_mm_hg","type":"integer","description":"Systolic BP used, mm Hg"},{"name":"heart_rate_bpm","type":"integer","description":"Heart rate used, bpm"},{"name":"respiratory_rate","type":"integer","description":"Respiratory rate used, breaths/min"},{"name":"temperature_c","type":"number","description":"Temperature used, °C"},{"name":"avpu","type":"string","description":"Caller-assigned AVPU used"},{"name":"components","type":"array","description":"Per-vital points"},{"name":"citation","type":"object","description":"Subbe 2001 QJM citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"avpu":"alert","heart_rate_bpm":"80","respiratory_rate":"12","systolic_mm_hg":"120","temperature_c":"37.0"},{"avpu":"alert","heart_rate_bpm":"80","respiratory_rate":"12","systolic_mm_hg":"120","temperature_c":"37.0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/mews","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/mews?systolic_mm_hg=120&heart_rate_bpm=80&respiratory_rate=12&temperature_c=37.0&avpu=alert","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/mews","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rems","description":"REMS from Olsson 2004 Table 1: MAP, heart rate, respiratory rate, SpO2, GCS (RAPS 0–4, not 15−GCS), and age summed to a 0–26 total for nonsurgical adult ED in-hospital mortality. Deterministic published arithmetic with citation; not MEWS, NEWS, or APACHE II; not an ICU-admission order.","parameters":[{"in":"query","name":"map_mm_hg","type":"integer","description":"Mean arterial pressure in mm Hg (integer 30-180). Olsson 2004 Table 1: ≤49 → 4, 50-69 → 2, 70-109 → 0, 110-129 → 2, 130-159 → 3, ≥160 → 4. magent does not compute MAP from SBP/DBP.","required":true,"example":"90"},{"in":"query","name":"heart_rate_bpm","type":"integer","description":"Heart rate in beats/min (integer 30-220). Olsson 2004 Table 1: ≤39 → 4, 40-54 → 2, 55-69 → 1, 70-109 → 0, 110-139 → 2, 140-179 → 3, ≥180 → 4.","required":true,"example":"80"},{"in":"query","name":"respiratory_rate","type":"integer","description":"Respiratory rate in breaths/min (integer 0-80). Olsson 2004 Table 1: ≤5 → 4, 6-9 → 2, 10-11 → 1, 12-24 → 0, 25-34 → 1, 35-49 → 3, ≥50 → 4.","required":true,"example":"16"},{"in":"query","name":"spo2_percent","type":"integer","description":"Pulse oximetry SpO2 percent (integer 50-100). Olsson 2004 Table 1: >89 → 0, 86-89 → 1, 75-85 → 3, <75 → 4.","required":true,"example":"96"},{"in":"query","name":"gcs","type":"integer","description":"Glasgow Coma Scale total 3-15, caller-assigned. Olsson 2004 REMS/RAPS 0-4: 14-15 → 0, 11-13 → 1, 8-10 → 2, 5-7 → 3, 3-4 → 4. Not APACHE II 15−GCS. magent does not score eye/verbal/motor.","required":true,"example":"15"},{"in":"query","name":"age","type":"integer","description":"Age in years (integer 18-120). Adult ED. Olsson 2004 Table 1: <45 → 0, 45-54 → 2, 55-64 → 3, 65-74 → 5, >74 → 6.","required":true,"example":"40"}],"errors":[{"code":"invalid_map_mm_hg","message":"map_mm_hg must be a number from 30 to 180. Returned before settlement; you are not charged.","status":400},{"code":"invalid_heart_rate","message":"heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.","status":400},{"code":"invalid_rts_respiratory_rate","message":"respiratory_rate must be an integer from 0 to 80. Returned before settlement; you are not charged.","status":400},{"code":"invalid_spo2","message":"spo2_percent must be a number from 50 to 100. Returned before settlement; you are not charged.","status":400},{"code":"invalid_gcs_total","message":"gcs must be an integer from 3 to 15. Returned before settlement; you are not charged.","status":400},{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rems","citation":{"authors":"Olsson T, Terent A, Lind L","doi":"10.1111/j.1365-2796.2004.01321.x","id":"olsson-2004","pmid":"15078500","source":"J Intern Med. 2004;255(5):579-587","title":"Rapid Emergency Medicine score: a new prognostic tool for in-hospital mortality in nonsurgical emergency department patients","url":"https://doi.org/10.1111/j.1365-2796.2004.01321.x"},"formula_expression":"REMS = map_points + hr_points + rr_points + spo2_points + gcs_points + age_points; Olsson 2004 Table 1 (RAPS vitals + SpO2 + age); max 26","purpose":"Compute the Olsson 2004 Rapid Emergency Medicine Score from mean arterial pressure, heart rate, respiratory rate, SpO2, GCS, and age.","markdown_url":"https://magentlab.com/docs/rems.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rems"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"REMS points 0-26"},{"name":"max_score","type":"integer","description":"Always 26"},{"name":"map_mm_hg","type":"integer","description":"Mean arterial pressure used, mm Hg"},{"name":"heart_rate_bpm","type":"integer","description":"Heart rate used, bpm"},{"name":"respiratory_rate","type":"integer","description":"Respiratory rate used, breaths/min"},{"name":"spo2_percent","type":"integer","description":"SpO2 used, percent"},{"name":"gcs","type":"integer","description":"Glasgow Coma Scale total used"},{"name":"age","type":"integer","description":"Age used, years"},{"name":"components","type":"array","description":"Per-vital points"},{"name":"citation","type":"object","description":"Olsson 2004 J Intern Med citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"40","gcs":"15","heart_rate_bpm":"80","map_mm_hg":"90","respiratory_rate":"16","spo2_percent":"96"},{"age":"40","gcs":"15","heart_rate_bpm":"80","map_mm_hg":"90","respiratory_rate":"16","spo2_percent":"96"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rems","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rems?map_mm_hg=90&heart_rate_bpm=80&respiratory_rate=16&spo2_percent=96&gcs=15&age=40","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rems","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/cart","description":"CART integer score from Churpek 2012 Table 3 (beta x 9): maximum respiratory rate, maximum heart rate, minimum diastolic BP, and age, summed to 0-57. magent does not measure vitals; the caller assigns the numbers. Deterministic published arithmetic with citation; not a cardiac-arrest diagnosis and not an RRT order. Does not return risk-band percents.","parameters":[{"in":"query","name":"respiratory_rate","type":"integer","description":"Maximum respiratory rate in breaths/min (integer 0-80). Churpek 2012 Table 3: <21 → 0, 21-23 → 8, 24-25 → 12, 26-29 → 15, >29 → 22. magent does not measure vitals; the caller assigns the number.","required":true,"example":"20"},{"in":"query","name":"heart_rate_bpm","type":"integer","description":"Maximum heart rate in beats/min (integer 30-220). Churpek 2012 Table 3: <110 → 0, 110-139 → 4, >139 → 13. magent does not measure vitals; the caller assigns the number.","required":true,"example":"80"},{"in":"query","name":"diastolic_mm_hg","type":"integer","description":"Minimum diastolic blood pressure in mm Hg (integer 20-160). Churpek 2012 Table 3: >49 → 0, 40-49 → 4, 35-39 → 6, <35 → 13. magent does not measure vitals; the caller assigns the number.","required":true,"example":"80"},{"in":"query","name":"age","type":"integer","description":"Age in years (integer 18-120). Churpek 2012 Table 3: <55 → 0, 55-69 → 4, >69 → 9. magent does not assign age.","required":true,"example":"40"}],"errors":[{"code":"invalid_rts_respiratory_rate","message":"respiratory_rate must be an integer from 0 to 80. Returned before settlement; you are not charged.","status":400},{"code":"invalid_heart_rate","message":"heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.","status":400},{"code":"invalid_diastolic_bp","message":"diastolic_mm_hg must be a number from 20 to 160. Returned before settlement; you are not charged.","status":400},{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/cart","citation":{"authors":"Churpek MM, Yuen TC, Park SY, Meltzer DO, Hall JB, Edelson DP","doi":"10.1097/CCM.0b013e318250aa5a","id":"churpek-2012","pmid":"22584764","source":"Crit Care Med. 2012;40(7):2102-2108","title":"Derivation of a Cardiac Arrest Prediction Model Using Ward Vital Signs","url":"https://doi.org/10.1097/CCM.0b013e318250aa5a"},"formula_expression":"CART = rr_points + hr_points + dbp_points + age_points; Churpek 2012 Table 3 integer score (beta x 9); max 57","purpose":"Compute the Churpek 2012 Cardiac Arrest Risk Triage (CART) integer score from caller-assigned maximum respiratory rate, maximum heart rate, minimum diastolic blood pressure, and age.","markdown_url":"https://magentlab.com/docs/cart.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"cart"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"CART points 0-57"},{"name":"max_score","type":"integer","description":"Always 57 (22+13+13+9)"},{"name":"respiratory_rate","type":"integer","description":"Maximum respiratory rate used, breaths/min"},{"name":"heart_rate_bpm","type":"integer","description":"Maximum heart rate used, bpm"},{"name":"diastolic_mm_hg","type":"integer","description":"Minimum diastolic BP used, mm Hg"},{"name":"age","type":"integer","description":"Age in years used"},{"name":"components","type":"array","description":"Per-vital and age points"},{"name":"citation","type":"object","description":"Churpek 2012 Crit Care Med citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"40","diastolic_mm_hg":"80","heart_rate_bpm":"80","respiratory_rate":"20"},{"age":"40","diastolic_mm_hg":"80","heart_rate_bpm":"80","respiratory_rate":"20"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/cart","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/cart?respiratory_rate=20&heart_rate_bpm=80&diastolic_mm_hg=80&age=40","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/cart","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/news","description":"NEWS from RCP 2012 Chart 1: respiratory rate, SpO2, supplemental oxygen, temperature (°C), systolic BP, heart rate, and caller-assigned AVPU (alert 0; voice, pain, or unresponsive 3 each) summed to a 0–20 total. Returns Chart 2 clinical_risk (low/medium/high) and red_score when any parameter scores 3. Deterministic published arithmetic with citation; not NEWS2; not an ICU-admission order.","parameters":[{"in":"query","name":"systolic_mm_hg","type":"integer","description":"Systolic blood pressure in mm Hg (integer 0-300). RCP NEWS 2012 Chart 1: ≤90 → 3, 91-100 → 2, 101-110 → 1, 111-219 → 0, ≥220 → 3.","required":true,"example":"120"},{"in":"query","name":"heart_rate_bpm","type":"integer","description":"Heart rate in beats/min (integer 30-220). RCP NEWS 2012 Chart 1: ≤40 → 3, 41-50 → 1, 51-90 → 0, 91-110 → 1, 111-130 → 2, ≥131 → 3.","required":true,"example":"70"},{"in":"query","name":"respiratory_rate","type":"integer","description":"Respiratory rate in breaths/min (integer 0-80). RCP NEWS 2012 Chart 1: ≤8 → 3, 9-11 → 1, 12-20 → 0, 21-24 → 2, ≥25 → 3.","required":true,"example":"16"},{"in":"query","name":"temperature_c","type":"number","description":"Temperature in °C (30.0-45.0). RCP NEWS 2012 Chart 1: ≤35.0 → 3, 35.1-36.0 → 1, 36.1-38.0 → 0, 38.1-39.0 → 1, ≥39.1 → 2. magent does not convert Fahrenheit.","required":true,"example":"37.0"},{"in":"query","name":"spo2_percent","type":"number","description":"Oxygen saturation percent (50-100). RCP NEWS 2012 Chart 1 Scale 1: ≤91 → 3, 92-93 → 2, 94-95 → 1, ≥96 → 0. Not NEWS2 Scale 2.","required":true,"example":"98"},{"in":"query","name":"supplemental_oxygen","type":"boolean","description":"Any supplemental oxygen as assigned by the caller (true or false). RCP NEWS 2012 Chart 1: true → 2, false → 0.","required":true,"example":"false"},{"in":"query","name":"avpu","type":"string","enum":["alert","voice","pain","unresponsive"],"description":"Caller-assigned AVPU (alert, voice, pain, or unresponsive). RCP NEWS 2012 Chart 1: alert → 0; voice, pain, or unresponsive → 3 each. magent does not compute GCS here.","required":true,"example":"alert"}],"errors":[{"code":"invalid_rts_systolic","message":"systolic_mm_hg must be an integer from 0 to 300. Returned before settlement; you are not charged.","status":400},{"code":"invalid_heart_rate","message":"heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.","status":400},{"code":"invalid_rts_respiratory_rate","message":"respiratory_rate must be an integer from 0 to 80. Returned before settlement; you are not charged.","status":400},{"code":"invalid_temperature","message":"temperature_c must be a number from 30.0 to 45.0. Returned before settlement; you are not charged.","status":400},{"code":"invalid_spo2","message":"spo2_percent must be a number from 50 to 100. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_news_avpu","message":"avpu must be alert, voice, pain, or unresponsive (RCP NEWS 2012). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/news","citation":{"authors":"Royal College of Physicians","id":"rcp-news-2012","source":"London: RCP; 2012. ISBN 978-1-86016-471-2","title":"National Early Warning Score (NEWS): Standardising the assessment of acute-illness severity in the NHS","url":"https://archive-rcplondon.zedcloud.co.uk/file/32/download"},"formula_expression":"NEWS = rr_points + spo2_points + oxygen_points + temp_points + sbp_points + hr_points + avpu_points; RCP NEWS 2012 Chart 1; max 20","purpose":"Compute the RCP 2012 National Early Warning Score from respiratory rate, SpO2, supplemental oxygen, temperature, systolic BP, heart rate, and caller-assigned AVPU.","markdown_url":"https://magentlab.com/docs/news.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"news"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"NEWS points 0-20"},{"name":"max_score","type":"integer","description":"Always 20"},{"name":"clinical_risk","type":"string","description":"RCP 2012 Chart 2 clinical risk: low, medium, or high. High (aggregate ≥7) wins over medium."},{"name":"red_score","type":"boolean","description":"true when any single parameter scores 3 (Chart 2 RED score). Medium unless aggregate ≥7 (high)."},{"name":"systolic_mm_hg","type":"integer","description":"Systolic BP used, mm Hg"},{"name":"heart_rate_bpm","type":"integer","description":"Heart rate used, bpm"},{"name":"respiratory_rate","type":"integer","description":"Respiratory rate used, breaths/min"},{"name":"temperature_c","type":"number","description":"Temperature used, °C"},{"name":"spo2_percent","type":"number","description":"SpO2 percent used"},{"name":"supplemental_oxygen","type":"boolean","description":"Supplemental oxygen flag used"},{"name":"avpu","type":"string","description":"Caller-assigned AVPU used"},{"name":"components","type":"array","description":"Per-vital points"},{"name":"citation","type":"object","description":"RCP NEWS 2012 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"avpu":"alert","heart_rate_bpm":"70","respiratory_rate":"16","spo2_percent":"98","supplemental_oxygen":"false","systolic_mm_hg":"120","temperature_c":"37.0"},{"avpu":"alert","heart_rate_bpm":"70","respiratory_rate":"16","spo2_percent":"98","supplemental_oxygen":"false","systolic_mm_hg":"120","temperature_c":"37.0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/news","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/news?systolic_mm_hg=120&heart_rate_bpm=70&respiratory_rate=16&temperature_c=37.0&spo2_percent=98&supplemental_oxygen=false&avpu=alert","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/news","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/news2","description":"NEWS2 from RCP 2017 Chart 1: respiratory rate, SpO2 on caller-assigned Scale 1 or Scale 2, supplemental oxygen, temperature (C), systolic BP, heart rate, and caller-assigned ACVPU (alert 0; confusion, voice, pain, or unresponsive 3 each) summed to 0-20. Returns Chart 2 clinical_risk (low / low-medium / medium / high) and red_score. Not NEWS 2012; not an ICU-admission order.","parameters":[{"in":"query","name":"systolic_mm_hg","type":"integer","description":"Systolic blood pressure in mm Hg (integer 0-300). RCP NEWS2 2017 Chart 1: ≤90 → 3, 91-100 → 2, 101-110 → 1, 111-219 → 0, ≥220 → 3.","required":true,"example":"120"},{"in":"query","name":"heart_rate_bpm","type":"integer","description":"Heart rate in beats/min (integer 30-220). RCP NEWS2 2017 Chart 1: ≤40 → 3, 41-50 → 1, 51-90 → 0, 91-110 → 1, 111-130 → 2, ≥131 → 3.","required":true,"example":"70"},{"in":"query","name":"respiratory_rate","type":"integer","description":"Respiratory rate in breaths/min (integer 0-80). RCP NEWS2 2017 Chart 1: ≤8 → 3, 9-11 → 1, 12-20 → 0, 21-24 → 2, ≥25 → 3.","required":true,"example":"16"},{"in":"query","name":"temperature_c","type":"number","description":"Temperature in °C (30.0-45.0). RCP NEWS2 2017 Chart 1: ≤35.0 → 3, 35.1-36.0 → 1, 36.1-38.0 → 0, 38.1-39.0 → 1, ≥39.1 → 2. magent does not convert Fahrenheit.","required":true,"example":"37.0"},{"in":"query","name":"spo2_percent","type":"number","description":"Oxygen saturation percent (50-100). Scale 1: ≤91 → 3, 92-93 → 2, 94-95 → 1, ≥96 → 0. Scale 2: ≤83 → 3, 84-85 → 2, 86-87 → 1, 88-92 → 0; ≥93 on air → 0; 93-94 on oxygen → 1, 95-96 on oxygen → 2, ≥97 on oxygen → 3.","required":true,"example":"98"},{"in":"query","name":"spo2_scale","type":"integer","enum":[1,2],"description":"Caller-assigned SpO2 scale (1 or 2). Scale 1 is the usual target. Scale 2 is only for a prescribed 88-92% target in confirmed hypercapnic respiratory failure. magent does not choose the scale.","required":true,"example":"1"},{"in":"query","name":"supplemental_oxygen","type":"boolean","description":"Any supplemental oxygen as assigned by the caller (true or false). RCP NEWS2 2017 Chart 1: true → 2, false → 0. On Scale 2 this also selects air vs oxygen SpO2 bands at ≥93%.","required":true,"example":"false"},{"in":"query","name":"acvpu","type":"string","enum":["alert","confusion","voice","pain","unresponsive"],"description":"Caller-assigned ACVPU (alert, confusion, voice, pain, or unresponsive). RCP NEWS2 2017 Chart 1: alert → 0; confusion, voice, pain, or unresponsive → 3 each. magent does not compute GCS here.","required":true,"example":"alert"}],"errors":[{"code":"invalid_rts_systolic","message":"systolic_mm_hg must be an integer from 0 to 300. Returned before settlement; you are not charged.","status":400},{"code":"invalid_heart_rate","message":"heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.","status":400},{"code":"invalid_rts_respiratory_rate","message":"respiratory_rate must be an integer from 0 to 80. Returned before settlement; you are not charged.","status":400},{"code":"invalid_temperature","message":"temperature_c must be a number from 30.0 to 45.0. Returned before settlement; you are not charged.","status":400},{"code":"invalid_spo2","message":"spo2_percent must be a number from 50 to 100. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_news2_scale","message":"spo2_scale must be 1 (usual target) or 2 (prescribed 88-92% target in hypercapnic respiratory failure) (RCP NEWS2 2017). Returned before settlement; you are not charged.","status":400},{"code":"invalid_news2_acvpu","message":"acvpu must be alert, confusion, voice, pain, or unresponsive (RCP NEWS2 2017 ACVPU). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/news2","citation":{"authors":"Royal College of Physicians","id":"rcp-news2-2017","source":"London: RCP; 2017. ISBN 978-1-86016-682-2","title":"National Early Warning Score (NEWS) 2: Standardising the assessment of acute-illness severity in the NHS. Updated report of a working party","url":"https://www.rcp.ac.uk/media/a4ibkkbf/news2-final-report_0_0.pdf"},"formula_expression":"NEWS2 = rr_points + spo2_points + oxygen_points + temp_points + sbp_points + hr_points + acvpu_points; RCP NEWS2 2017 Chart 1 (Scale 1 or Scale 2); max 20","purpose":"Compute the RCP 2017 National Early Warning Score 2 from respiratory rate, SpO2 (Scale 1 or Scale 2), supplemental oxygen, temperature, systolic BP, heart rate, and caller-assigned ACVPU.","markdown_url":"https://magentlab.com/docs/news2.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"news2"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"NEWS2 points 0-20"},{"name":"max_score","type":"integer","description":"Always 20"},{"name":"clinical_risk","type":"string","description":"RCP 2017 Chart 2 clinical risk: low, low-medium, medium, or high. High (aggregate ≥7) wins."},{"name":"red_score","type":"boolean","description":"true when any single parameter scores 3 (Chart 2 RED score). low-medium unless aggregate ≥5 (medium) or ≥7 (high)."},{"name":"systolic_mm_hg","type":"integer","description":"Systolic BP used, mm Hg"},{"name":"heart_rate_bpm","type":"integer","description":"Heart rate used, bpm"},{"name":"respiratory_rate","type":"integer","description":"Respiratory rate used, breaths/min"},{"name":"temperature_c","type":"number","description":"Temperature used, °C"},{"name":"spo2_percent","type":"number","description":"SpO2 percent used"},{"name":"spo2_scale","type":"integer","description":"Caller-assigned SpO2 scale used (1 or 2)"},{"name":"supplemental_oxygen","type":"boolean","description":"Supplemental oxygen flag used"},{"name":"acvpu","type":"string","description":"Caller-assigned ACVPU used"},{"name":"components","type":"array","description":"Per-vital points"},{"name":"citation","type":"object","description":"RCP NEWS2 2017 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"acvpu":"alert","heart_rate_bpm":"70","respiratory_rate":"16","spo2_percent":"98","spo2_scale":"1","supplemental_oxygen":"false","systolic_mm_hg":"120","temperature_c":"37.0"},{"acvpu":"alert","heart_rate_bpm":"70","respiratory_rate":"16","spo2_percent":"98","spo2_scale":"1","supplemental_oxygen":"false","systolic_mm_hg":"120","temperature_c":"37.0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/news2","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/news2?systolic_mm_hg=120&heart_rate_bpm=70&respiratory_rate=16&temperature_c=37.0&spo2_percent=98&spo2_scale=1&supplemental_oxygen=false&acvpu=alert","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/news2","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/pews","description":"Monaghan 2005 Brighton PEWS: behaviour, cardiovascular, and respiratory 0-3 each, plus +2 each for quarter-hourly nebulisers and persistent post-surgery vomiting (max 13). HR/RR use APLS 2005 age-group rest ranges as the paper's normal rate and mean. Returns score_ge_3. Not NEWS2; not MEWS; not Bedside PEWS.","parameters":[{"in":"query","name":"age_group","type":"string","enum":["infant","age_1_2","age_2_5","age_5_12","adolescent"],"description":"Caller-assigned APLS 2005 rest-range age group used as Monaghan 2005 'normal rate' (HR) and 'mean'/'normal parameters' (RR). infant (<1 year; HR 110-160, RR 30-40, RR mean 35); age_1_2 (1-2 years; HR 100-150, RR 25-35, mean 30); age_2_5 (2-5 years; HR 95-140, RR 25-30, mean 27); age_5_12 (5-12 years; HR 80-120, RR 20-25, mean 22); adolescent (>12 years; HR 60-100, RR 15-20, mean 17). Monaghan 2005 does not print a numeric vital table. magent does not map chronological age. Not Akre 2010. Not later NHS England PEWS charts.","required":true,"example":"infant"},{"in":"query","name":"behavior","type":"string","enum":["playing","sleeping","irritable","lethargic"],"description":"Caller-assigned Monaghan 2005 behaviour. playing (playing/appropriate) → 0; sleeping → 1; irritable (irritable or parents concerned) → 2; lethargic (lethargic/confused or reduced response to pain) → 3. magent does not observe the child.","required":true,"example":"playing"},{"in":"query","name":"cardiovascular","type":"string","enum":["pink","pale","grey","mottled"],"description":"Caller-assigned Monaghan 2005 colour or capillary refill. pink (pink or CRT 1-2 s) → 0; pale (pale or CRT 3 s) → 1; grey (grey or CRT 4 s) → 2; mottled (grey and mottled or CRT ≥5 s) → 3. The cardiovascular domain is the higher of this band and the HR band. magent does not measure CRT.","required":true,"example":"pink"},{"in":"query","name":"heart_rate_bpm","type":"integer","description":"Heart rate in beats/min (integer 40-300). Monaghan 2005: tachycardia of 20 above the age-group normal rate (APLS 2005 upper rest limit) → 2; tachycardia of 30 above that rate or bradycardia (below the APLS lower rest limit) → 3. The cardiovascular domain is the higher of colour/CRT and HR. magent does not measure heart rate.","required":true,"example":"130"},{"in":"query","name":"respiratory_rate","type":"integer","description":"Respiratory rate in breaths/min (integer 5-120). Monaghan 2005 vs the age-group RR mean (midpoint of the APLS 2005 rest range): >10 above mean → 1; >20 above mean → 2; >30 above mean or 5 below mean → 3. The respiratory domain is the higher of RR, effort, and oxygen. magent does not measure respiratory rate.","required":true,"example":"35"},{"in":"query","name":"respiratory_effort","type":"string","enum":["none","accessory","recessing","sternal_or_grunting"],"description":"Caller-assigned Monaghan 2005 respiratory effort. none (no recession or tracheal tug) → 0; accessory (using accessory muscles) → 1; recessing (recessing, tracheal tug) → 2; sternal_or_grunting (sternal recession, tracheal tug, or grunting) → 3. The respiratory domain is the higher of RR, effort, and oxygen. magent does not examine the chest.","required":true,"example":"none"},{"in":"query","name":"oxygen","type":"string","enum":["none","fio2_30_or_4l","fio2_40_or_6l","fio2_50_or_8l"],"description":"Caller-assigned Monaghan 2005 oxygen. none → 0; fio2_30_or_4l (30+% FiO2 or 4+ L/min) → 1; fio2_40_or_6l (40+% FiO2 or 6+ L/min) → 2; fio2_50_or_8l (50% FiO2 or 8+ L/min) → 3. The respiratory domain is the higher of RR, effort, and oxygen. magent does not measure FiO2.","required":true,"example":"none"},{"in":"query","name":"quarter_hourly_nebulisers","type":"boolean","description":"Quarter-hourly (¼ hourly) nebulisers as in Monaghan 2005. true → +2; false → 0. Independent of the respiratory 0-3 domain. magent does not record medication times.","required":true,"example":"false"},{"in":"query","name":"persistent_vomiting_after_surgery","type":"boolean","description":"Persistent vomiting following surgery as in Monaghan 2005. true → +2; false → 0. Independent of the behaviour 0-3 domain. magent does not observe vomiting.","required":true,"example":"false"}],"errors":[{"code":"invalid_pews","message":"PEWS inputs must match Monaghan 2005 Brighton age-group vital-sign and behavior categories from that paper. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/pews","citation":{"authors":"Monaghan A","doi":"10.7748/paed2005.02.17.1.32.c964","id":"monaghan-2005","pmid":"15751446","source":"Paediatr Nurs. 2005;17(1):32-35","title":"Detecting and managing deterioration in children","url":"https://doi.org/10.7748/paed2005.02.17.1.32.c964"},"formula_expression":"PEWS = behavior_points + cardiovascular_points + respiratory_points + nebuliser_points + vomiting_points; Monaghan 2005 Brighton table (each domain 0-3; extra +2 each for quarter-hourly nebulisers and persistent vomiting following surgery); max 13","purpose":"Compute the Monaghan 2005 Brighton Paediatric Early Warning Score from caller-assigned behaviour, colour/CRT, respiratory effort, oxygen, quarter-hourly nebulisers, and persistent post-surgery vomiting, plus heart rate and respiratory rate against APLS 2005 age-group rest ranges used as that paper's normal rate and mean.","markdown_url":"https://magentlab.com/docs/pews.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"pews"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"PEWS points 0-13"},{"name":"max_score","type":"integer","description":"Always 13"},{"name":"score_ge_3","type":"boolean","description":"true when score is ≥3. Monaghan 2005 Brighton PEWS uses a score of 3 or more as the review trigger. Not a NEWS2 band and not an ICU-admission order."},{"name":"age_group","type":"string","description":"Caller-assigned APLS 2005 age group used"},{"name":"behavior","type":"string","description":"Caller-assigned behaviour used"},{"name":"cardiovascular","type":"string","description":"Caller-assigned colour or CRT category used"},{"name":"heart_rate_bpm","type":"integer","description":"Heart rate used, bpm"},{"name":"respiratory_rate","type":"integer","description":"Respiratory rate used, breaths/min"},{"name":"respiratory_effort","type":"string","description":"Caller-assigned respiratory effort used"},{"name":"oxygen","type":"string","description":"Caller-assigned oxygen band used"},{"name":"quarter_hourly_nebulisers","type":"boolean","description":"Quarter-hourly nebulisers flag used"},{"name":"persistent_vomiting_after_surgery","type":"boolean","description":"Persistent post-surgery vomiting flag used"},{"name":"components","type":"array","description":"Per-domain points"},{"name":"citation","type":"object","description":"Monaghan 2005 Paediatr Nurs citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age_group":"infant","behavior":"playing","cardiovascular":"pink","heart_rate_bpm":"130","oxygen":"none","persistent_vomiting_after_surgery":"false","quarter_hourly_nebulisers":"false","respiratory_effort":"none","respiratory_rate":"35"},{"age_group":"infant","behavior":"playing","cardiovascular":"pink","heart_rate_bpm":"130","oxygen":"none","persistent_vomiting_after_surgery":"false","quarter_hourly_nebulisers":"false","respiratory_effort":"none","respiratory_rate":"35"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/pews","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/pews?age_group=infant&behavior=playing&cardiovascular=pink&heart_rate_bpm=130&respiratory_rate=35&respiratory_effort=none&oxygen=none&quarter_hourly_nebulisers=false&persistent_vomiting_after_surgery=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/pews","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/go-far","description":"Ebell 2013 GO-FAR integer score for CPC 1 after in-hospital CPR. Exclusive age (<70=0, 70-74=2, 75-79=5, 80-84=6, >=85=11) plus 12 caller-assigned flags (intact CPC 1 at admission -15; trauma 10; stroke 8; cancer 7; septicemia 7; medical noncardiac 7; hepatic 6; SNF 6; hypotension 5; renal 4; respiratory 4; pneumonia 1). Range -15 to 76. Bands: >=24 very_low, 14-23 low, -5 to 13 average, <=-6 above_average. Not GO-FAR 2. Not a DNAR order.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Ebell 2013 exclusive bands: younger than 70 scores 0; 70-74 scores 2; 75-79 scores 5; 80-84 scores 6; 85 or older scores 11. Age 69 scores 0; 70 scores 2.","required":true,"example":"60"},{"in":"query","name":"neurologically_intact_or_minimal_deficits","type":"boolean","description":"Neurologically intact or with minimal deficits at admission (CPC 1) as assigned by the caller (Ebell 2013 Table 3). true scores -15. false scores 0. magent does not assign CPC or examine the patient.","required":true,"example":"false"},{"in":"query","name":"major_trauma","type":"boolean","description":"Major trauma as assigned by the caller (Ebell 2013 Table 3). true scores 10. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"acute_stroke","type":"boolean","description":"Acute stroke as assigned by the caller (Ebell 2013 Table 3). true scores 8. magent does not diagnose stroke.","required":true,"example":"false"},{"in":"query","name":"metastatic_or_hematologic_cancer","type":"boolean","description":"Metastatic or hematologic cancer as assigned by the caller (Ebell 2013 Table 3). true scores 7. magent does not diagnose cancer.","required":true,"example":"false"},{"in":"query","name":"septicemia","type":"boolean","description":"Septicemia as assigned by the caller (Ebell 2013 Table 3). true scores 7. magent does not diagnose infection.","required":true,"example":"false"},{"in":"query","name":"medical_noncardiac_diagnosis","type":"boolean","description":"Medical noncardiac diagnosis as assigned by the caller (Ebell 2013 Table 3). true scores 7. Independent of the other flags.","required":true,"example":"false"},{"in":"query","name":"hepatic_insufficiency","type":"boolean","description":"Hepatic insufficiency as assigned by the caller (Ebell 2013 Table 3). true scores 6. magent does not grade liver tests.","required":true,"example":"false"},{"in":"query","name":"admit_from_skilled_nursing","type":"boolean","description":"Admitted from a skilled nursing facility as assigned by the caller (Ebell 2013 Table 3). true scores 6.","required":true,"example":"false"},{"in":"query","name":"hypotension_or_hypoperfusion","type":"boolean","description":"Hypotension or hypoperfusion as assigned by the caller (Ebell 2013 Table 3). true scores 5. magent does not take blood pressure.","required":true,"example":"false"},{"in":"query","name":"renal_insufficiency_or_dialysis","type":"boolean","description":"Renal insufficiency or dialysis as assigned by the caller (Ebell 2013 Table 3). true scores 4. magent does not grade creatinine.","required":true,"example":"false"},{"in":"query","name":"respiratory_insufficiency","type":"boolean","description":"Respiratory insufficiency as assigned by the caller (Ebell 2013 Table 3). true scores 4. magent does not interpret blood gas or ventilator settings.","required":true,"example":"false"},{"in":"query","name":"pneumonia","type":"boolean","description":"Pneumonia as assigned by the caller (Ebell 2013 Table 3). true scores 1. magent does not diagnose pneumonia.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/go-far","citation":{"authors":"Ebell MH, Jang W, Shen Y, Geocadin RG, et al","doi":"10.1001/jamainternmed.2013.10037","id":"ebell-2013","pmid":"24018585","source":"JAMA Intern Med. 2013;173(20):1872-1878","title":"Development and Validation of the Good Outcome Following Attempted Resuscitation (GO-FAR) Score to Predict Neurologically Intact Survival After In-Hospital Cardiopulmonary Resuscitation","url":"https://doi.org/10.1001/jamainternmed.2013.10037"},"formula_expression":"GO-FAR = exclusive age (<70: 0, 70-74: 2, 75-79: 5, 80-84: 6, >=85: 11) + Table 3 flags (neurologically intact -15, major trauma 10, acute stroke 8, metastatic or hematologic cancer 7, septicemia 7, medical noncardiac 7, hepatic insufficiency 6, admit from SNF 6, hypotension or hypoperfusion 5, renal insufficiency or dialysis 4, respiratory insufficiency 4, pneumonia 1); range -15 to 76; >=24 very_low, 14-23 low, -5 to 13 average, <=-6 above_average (Ebell 2013)","purpose":"Sum the Ebell 2013 GO-FAR Table 3 integer score (beta × 10 rounded) from exclusive age and 12 caller-assigned prearrest flags, and return the published likelihood band for CPC 1 after in-hospital CPR.","markdown_url":"https://magentlab.com/docs/go-far.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"go_far"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Ebell 2013 Table 3 GO-FAR points -15 to 76"},{"name":"max_score","type":"integer","description":"76 (all adverse flags, not intact, age >=85)"},{"name":"risk_band","type":"string","description":"Ebell 2013 likelihood of CPC 1 after IHCA: very_low (score >=24), low (14-23), average (-5 to 13), or above_average (score <=-6). A band token, not a measured percent and not a DNAR order."},{"name":"age_years","type":"integer","description":"Age used for the exclusive age band"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Ebell JAMA Intern Med 2013 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"acute_stroke":"false","admit_from_skilled_nursing":"false","age":"60","hepatic_insufficiency":"false","hypotension_or_hypoperfusion":"false","major_trauma":"false","medical_noncardiac_diagnosis":"false","metastatic_or_hematologic_cancer":"false","neurologically_intact_or_minimal_deficits":"false","pneumonia":"false","renal_insufficiency_or_dialysis":"false","respiratory_insufficiency":"false","septicemia":"false"},{"acute_stroke":"false","admit_from_skilled_nursing":"false","age":"60","hepatic_insufficiency":"false","hypotension_or_hypoperfusion":"false","major_trauma":"false","medical_noncardiac_diagnosis":"false","metastatic_or_hematologic_cancer":"false","neurologically_intact_or_minimal_deficits":"false","pneumonia":"false","renal_insufficiency_or_dialysis":"false","respiratory_insufficiency":"false","septicemia":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/go-far","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/go-far?age=60&neurologically_intact_or_minimal_deficits=false&major_trauma=false&acute_stroke=false&metastatic_or_hematologic_cancer=false&septicemia=false&medical_noncardiac_diagnosis=false&hepatic_insufficiency=false&admit_from_skilled_nursing=false&hypotension_or_hypoperfusion=false&renal_insufficiency_or_dialysis=false&respiratory_insufficiency=false&pneumonia=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/go-far","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/hope","description":"Pasquier 2018 HOPE survival probability after ECLS for hypothermic cardiac arrest from sex (published male coefficient, not race), asphyxia, age, potassium, CPR duration, and temperature. Returns logit, estimated_survival_percent from the unrounded logit, and Table 2 HOPE >= 10% flag. Not an ECLS or rewarming order. magent does not cannulate.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years, integer 0-100. Pasquier 2018 coefficient -0.0191 per year. magent does not read an identity document.","required":true,"example":"40"},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"Sex used as the published Pasquier 2018 male coefficient (male = 1, female = 0). Not race. magent does not examine the patient.","required":true,"example":"female"},{"in":"query","name":"asphyxia","type":"boolean","description":"true if the caller assigns an asphyxia-related mechanism: head fully covered by water or snow AND cardiac arrest at extrication (Pasquier 2018). true scores 1 in the logit; false scores 0. magent does not classify the scene.","required":true,"example":"false"},{"in":"query","name":"cpr_duration_min","type":"number","description":"Duration of CPR in minutes from start of CPR to ECLS (1-480). Enters as log2. Must be greater than 0 (0 is invalid). Caller-supplied; magent does not time the arrest.","required":true,"example":"30"},{"in":"query","name":"potassium_mmol_l","type":"number","description":"Serum potassium in mmol/L (0.5-20). Enters as log2. Must be greater than 0. Caller-supplied; magent does not assay potassium.","required":true,"example":"4.0"},{"in":"query","name":"temperature_c","type":"number","description":"Core temperature in C (10-37). Linear and squared Pasquier 2018 terms. Caller-supplied; magent does not measure temperature or convert Fahrenheit.","required":true,"example":"28"}],"errors":[{"code":"invalid_hope","message":"HOPE needs Pasquier 2018 age, sex, asphyxia mechanism, CPR duration, potassium, and core temperature in published ranges. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/hope","citation":{"authors":"Pasquier M, Hugli O, Paal P, Darocha T, Blancher M, Husby P, Silfvast T, Carron PN, Rousson V","doi":"10.1016/j.resuscitation.2018.02.026","id":"pasquier-2018","pmid":"29481910","source":"Resuscitation. 2018;126:58-64","title":"Hypothermia outcome prediction after extracorporeal life support for hypothermic cardiac arrest patients: The HOPE score","url":"https://doi.org/10.1016/j.resuscitation.2018.02.026"},"formula_expression":"logit = 2.44 - 1.55*male - 1.95*asphyxia - 0.0191*age - 2.07*log2(potassium_mmol_l) - 0.573*log2(cpr_duration_min) + 0.937*temperature_c - 0.0247*temperature_c^2; survival_probability = exp(logit)/(1+exp(logit)); estimated_survival_percent = 100 * survival_probability from the unrounded logit, 2 decimals; male is 1 if sex is male else 0; asphyxia is 1 if asphyxia-related (head fully covered by water or snow AND cardiac arrest at extrication) else 0; hope_ge_10_percent is true when survival_probability >= 0.10 (Pasquier 2018 Table 2)","purpose":"Compute the Pasquier 2018 HOPE logistic survival probability after extracorporeal life support for hypothermic cardiac arrest from caller-assigned sex, asphyxia-related mechanism, age, potassium, CPR duration, and core temperature.","markdown_url":"https://magentlab.com/docs/hope.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"hope"},{"name":"formula_expression","type":"string","description":"Pasquier 2018 HOPE logit and survival probability"},{"name":"age_years","type":"integer","description":"Age in years used in the logit"},{"name":"sex","type":"string","description":"female or male"},{"name":"asphyxia","type":"boolean","description":"Caller-assigned asphyxia-related mechanism (head fully covered by water or snow AND cardiac arrest at extrication)"},{"name":"potassium_mmol_l","type":"number","description":"Serum potassium in mmol/L used in log2"},{"name":"cpr_duration_min","type":"number","description":"CPR duration in minutes used in log2"},{"name":"temperature_c","type":"number","description":"Core temperature in C used in the linear and squared terms"},{"name":"logit","type":"number","description":"Pasquier 2018 logit, 2 decimal places. Percent uses the unrounded logit."},{"name":"estimated_survival_percent","type":"number","description":"100 * exp(logit)/(1+exp(logit)) from the unrounded logit, 2 decimals. A population probability, not an ECLS order."},{"name":"hope_ge_10_percent","type":"boolean","description":"true when survival_probability >= 0.10 (Pasquier 2018 Table 2 HOPE >= 0.10). Not a 2019-validation cutoff."},{"name":"citation","type":"object","description":"Pasquier 2018 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"40","asphyxia":"false","cpr_duration_min":"30","potassium_mmol_l":"4.0","sex":"female","temperature_c":"28"},{"age":"40","asphyxia":"false","cpr_duration_min":"30","potassium_mmol_l":"4.0","sex":"female","temperature_c":"28"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/hope","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/hope?age=40&sex=female&asphyxia=false&cpr_duration_min=30&potassium_mmol_l=4.0&temperature_c=28","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/hope","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rescue-ihca","description":"Tonna 2022 RESCUE-IHCA Table 2 integer score for in-hospital death after adult ECPR. Age 2 + 2 per 10 years after 20. Renal +8. Time: day 0, evening +4, night +13. Illness: medical noncardiac 0, medical cardiac -2, surgical noncardiac -6, surgical cardiac -11. Rhythm: asystole 0, PEA -1, pVT -5, VF -8, palpable pulse -5. Duration +2 per 10 min. Table 2 min -17. Integer score only. Not an ECPR order.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Tonna 2022 Table 2: ≤20 → 2; each additional 10 years → +2, implemented as 2 + 2 * max(0, floor((age-20)/10)) so 20 → 2, 29 → 2, 30 → 4, 40 → 6. Adult derivation (excluded age <18). Caller-supplied; magent does not examine the patient.","required":true,"example":"20"},{"in":"query","name":"preexisting_renal_insufficiency","type":"boolean","description":"Preexisting renal insufficiency as assigned by the caller (Tonna 2022 Table 2). true → +8. false → 0. magent does not grade creatinine.","required":true,"example":"false"},{"in":"query","name":"time_of_day","type":"string","description":"Time of day of arrest (Tonna 2022 Table 2). day_0700_1459 (07:00-14:59, reference) → 0; evening_1500_2259 (15:00-22:59) → +4; night_2300_0659 (23:00-06:59) → +13. Caller-assigned; magent does not read a clock.","required":true,"example":"day_0700_1459"},{"in":"query","name":"illness_category","type":"string","description":"Illness category (Tonna 2022 Table 2). medical_noncardiac (reference) → 0; medical_cardiac → -2; surgical_noncardiac → -6; surgical_cardiac → -11. Caller-assigned; magent does not classify the admission.","required":true,"example":"surgical_cardiac"},{"in":"query","name":"presenting_rhythm","type":"string","description":"Presenting rhythm (Tonna 2022 Table 2). asystole (reference) → 0; pea → -1; pvt → -5; vf → -8; palpable_pulse_initially → -5. Caller-assigned; magent does not interpret a monitor.","required":true,"example":"vf"},{"in":"query","name":"duration_min","type":"integer","description":"Duration of cardiac arrest in integer minutes (0-180). Tonna 2022 Table 2: +2 per complete 10 minutes (2 * floor(duration_min/10)). 0-9 → 0; 10-19 → +2; 20-29 → +4. Caller-supplied; magent does not time the arrest.","required":true,"example":"0"}],"errors":[{"code":"invalid_rescue_ihca","message":"RESCUE-IHCA needs Tonna 2022 age, renal history, time of day, illness category, rhythm, and arrest duration in published ranges. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rescue-ihca","citation":{"authors":"Tonna JE, Selzman CH, Girotra S, et al.","doi":"10.1016/j.jcin.2021.09.032","id":"tonna-2022","pmid":"35033471","source":"JACC Cardiovasc Interv. 2022;15(3):237-247","title":"Resuscitation Using ECPR During In-Hospital Cardiac Arrest (RESCUE-IHCA) Mortality Prediction Score and External Validation","url":"https://doi.org/10.1016/j.jcin.2021.09.032"},"formula_expression":"RESCUE-IHCA = age(2 + 2 * max(0, floor((age-20)/10))) + preexisting_renal_insufficiency(yes 8) + time_of_day(day_0700_1459 0, evening_1500_2259 4, night_2300_0659 13) + illness_category(medical_noncardiac 0, medical_cardiac -2, surgical_noncardiac -6, surgical_cardiac -11) + presenting_rhythm(asystole 0, pea -1, pvt -5, vf -8, palpable_pulse_initially -5) + duration_min(2 * floor(duration_min/10)); Tonna 2022 Table 2; theoretical min -17; paper text about -15 to >40; higher score → higher probability of in-hospital death (Figure 3 curve 0.22-0.99); integer score only","purpose":"Sum Tonna 2022 Table 2 RESCUE-IHCA integer cells for in-hospital death after adult ECPR and return the published point total, not a cannulation or ECPR order.","markdown_url":"https://magentlab.com/docs/rescue-ihca.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rescue_ihca"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Tonna 2022 Table 2 RESCUE-IHCA points. Table 2 theoretical min -17; paper text about -15 to >40. Integer total only; not a mortality percent."},{"name":"min_score","type":"integer","description":"-17 (Table 2 cell minimum: age ≤20, surgical cardiac, VF, duration 0)"},{"name":"components","type":"array","description":"Per-cell Table 2 points"},{"name":"citation","type":"object","description":"Tonna et al. JACC Cardiovasc Interv 2022 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"20","duration_min":"0","illness_category":"surgical_cardiac","preexisting_renal_insufficiency":"false","presenting_rhythm":"vf","time_of_day":"day_0700_1459"},{"age":"20","duration_min":"0","illness_category":"surgical_cardiac","preexisting_renal_insufficiency":"false","presenting_rhythm":"vf","time_of_day":"day_0700_1459"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rescue-ihca","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rescue-ihca?age=20&preexisting_renal_insufficiency=false&time_of_day=day_0700_1459&illness_category=surgical_cardiac&presenting_rhythm=vf&duration_min=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rescue-ihca","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/ohfrs","description":"Ottawa Heart Failure Risk Scale (OHFRS; Stiell 2013 derivation). Ten caller-assigned flags (stroke/TIA 1, intubation 2, arrival HR >=110 2, arrival SaO2 <90% 1, walk-test HR >=110 or unable 1, new ischemic ECG 2, urea >=12 mmol/L 1, CO2 >=35 mmol/L 2, troponin at MI level 2, NT-proBNP >=5000 ng/L 1); integer points, max 15. Derivation SAE risk 2.8% to 89.0%. Not a medical device, not a disposition or discharge order, not EHMRG. magent does not walk the patient or read the ECG.","parameters":[{"in":"query","name":"history_stroke_or_tia","type":"boolean","description":"History of stroke or TIA as assigned by the caller (Stiell 2013; 1 point if true). true or false. magent does not take the history.","required":true,"example":"false"},{"in":"query","name":"intubation_respiratory_distress","type":"boolean","description":"Intubation for respiratory distress as assigned by the caller (Stiell 2013; 2 points if true). true or false.","required":true,"example":"false"},{"in":"query","name":"hr_arrival_ge_110","type":"boolean","description":"Heart rate on ED arrival >=110 as assigned by the caller after applying the Stiell 2013 cutoff (2 points if true). true or false. magent does not measure heart rate.","required":true,"example":"false"},{"in":"query","name":"sao2_lt_90_arrival","type":"boolean","description":"Oxygen saturation <90% on ED arrival as assigned by the caller after applying the Stiell 2013 cutoff (1 point if true). true or false. magent does not measure saturation.","required":true,"example":"false"},{"in":"query","name":"walk_test_hr_ge_110_or_unable","type":"boolean","description":"Heart rate >=110 during the 3-minute walk test, or unable to perform the walk test, as assigned by the caller after ED intervention (Stiell 2013; 1 point if true). true or false. magent does not walk the patient.","required":true,"example":"false"},{"in":"query","name":"new_ischemic_ecg","type":"boolean","description":"New ischemic ECG changes as assigned by the caller (Stiell 2013 derivation; 2 points if true). true or false. magent does not interpret the ECG.","required":true,"example":"false"},{"in":"query","name":"urea_ge_12_mmol_l","type":"boolean","description":"Urea >=12 mmol/L as assigned by the caller after applying the Stiell 2013 cutoff (1 point if true). true or false. magent does not assay urea.","required":true,"example":"false"},{"in":"query","name":"co2_ge_35_mmol_l","type":"boolean","description":"Serum CO2 >=35 mmol/L as assigned by the caller after applying the Stiell 2013 cutoff (2 points if true). true or false. magent does not assay CO2.","required":true,"example":"false"},{"in":"query","name":"troponin_mi_level","type":"boolean","description":"Troponin I or T elevated to MI level as assigned by the caller (Stiell 2013; 2 points if true). true or false. magent does not assay troponin.","required":true,"example":"false"},{"in":"query","name":"ntprobnp_ge_5000","type":"boolean","description":"NT-proBNP >=5000 ng/L as assigned by the caller after applying the Stiell 2013 cutoff (1 point if true). true or false. magent does not assay NT-proBNP.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/ohfrs","citation":{"authors":"Stiell IG, Clement CM, Brison RJ, et al.","doi":"10.1111/acem.12056","id":"stiell-2013","pmid":"23570474","source":"Acad Emerg Med. 2013;20(1):17-26","title":"A risk scoring system to identify emergency department patients with heart failure at high risk for serious adverse events","url":"https://doi.org/10.1111/acem.12056"},"formula_expression":"OHFRS = history_stroke_or_tia(1) + intubation_respiratory_distress(2) + hr_arrival_ge_110(2) + sao2_lt_90_arrival(1) + walk_test_hr_ge_110_or_unable(1) + new_ischemic_ecg(2) + urea_ge_12_mmol_l(1) + co2_ge_35_mmol_l(2) + troponin_mi_level(2) + ntprobnp_ge_5000(1); Stiell 2013 derivation; max 15; SAE risk varied from 2.8% to 89.0%; admission thresholds of total score 1, 2, or 3 had sensitivities 95.2 / 80.6 / 64.5%","purpose":"Sum the ten Stiell 2013 Ottawa Heart Failure Risk Scale flags and return the integer point total (max 15).","markdown_url":"https://magentlab.com/docs/ohfrs.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"ohfrs"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"OHFRS points 0-15 (Stiell 2013)"},{"name":"max_score","type":"integer","description":"15"},{"name":"components","type":"array","description":"Per-flag points"},{"name":"citation","type":"object","description":"Stiell et al. Acad Emerg Med 2013 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"co2_ge_35_mmol_l":"false","history_stroke_or_tia":"false","hr_arrival_ge_110":"false","intubation_respiratory_distress":"false","new_ischemic_ecg":"false","ntprobnp_ge_5000":"false","sao2_lt_90_arrival":"false","troponin_mi_level":"false","urea_ge_12_mmol_l":"false","walk_test_hr_ge_110_or_unable":"false"},{"co2_ge_35_mmol_l":"false","history_stroke_or_tia":"false","hr_arrival_ge_110":"false","intubation_respiratory_distress":"false","new_ischemic_ecg":"false","ntprobnp_ge_5000":"false","sao2_lt_90_arrival":"false","troponin_mi_level":"false","urea_ge_12_mmol_l":"false","walk_test_hr_ge_110_or_unable":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/ohfrs","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/ohfrs?history_stroke_or_tia=false&intubation_respiratory_distress=false&hr_arrival_ge_110=false&sao2_lt_90_arrival=false&walk_test_hr_ge_110_or_unable=false&new_ischemic_ecg=false&urea_ge_12_mmol_l=false&co2_ge_35_mmol_l=false&troponin_mi_level=false&ntprobnp_ge_5000=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/ohfrs","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/cahp","description":"Maupain 2016 CAHP nomogram after OHCA. Integer points from age, home vs public arrest, shockable vs non-shockable rhythm, no-flow min, low-flow min, epinephrine tertile (0 / 1-2 / >=3 mg), and arterial pH. Table 3: low <150, medium 150-200, high >200. Figure 2 caption total 177 reads 88% poor outcome. Not a withdrawal-of-care order. magent does not measure pH.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Figure 2 caption: 30 years → 22. Linear nomogram: round(1.1*(age-10)); truncated below 10 and above 100.","required":true,"example":"30"},{"in":"query","name":"arrest_at_home","type":"boolean","description":"Cardiac arrest at home versus public, as assigned by the caller. true scores 25 (Figure 2 caption); false (public) scores 0.","required":true,"example":"true"},{"in":"query","name":"shockable_rhythm","type":"boolean","description":"Initial shockable rhythm (VF or pulseless VT) as assigned by the caller. true scores 0; false (non-shockable) scores 27 (Figure 2 caption).","required":true,"example":"false"},{"in":"query","name":"no_flow_min","type":"integer","description":"Collapse-to-BLS (no-flow) minutes (integer 0-90). Figure 2 caption: 5 min → 14. Linear nomogram: round(2.8*minutes); truncated above 30.","required":true,"example":"5"},{"in":"query","name":"low_flow_min","type":"integer","description":"BLS-to-ROSC (low-flow) minutes (integer 0-180). Figure 2 caption: 10 min → 8. Linear nomogram: round(0.8*minutes); truncated above 60.","required":true,"example":"10"},{"in":"query","name":"epinephrine_mg","type":"integer","description":"Total pre-ROSC epinephrine in mg (integer 0-30). Table 2 tertiles on the nomogram: 0 → 0; 1-2 → 27; ≥3 → 43 (Figure 2 caption 3 mg → 43).","required":true,"example":"3"},{"in":"query","name":"arterial_ph","type":"number","description":"Admission arterial pH (6.5-7.8). Figure 2 caption: 7.10 → 38. Linear nomogram: round(585-77*pH); truncated to 6.5-7.5. magent does not measure pH.","required":true,"example":"7.10"}],"errors":[{"code":"invalid_cahp","message":"CAHP inputs must match Maupain 2016 age, arrest location, initial rhythm, no-flow and low-flow times, epinephrine dose, and arterial pH. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/cahp","citation":{"authors":"Maupain C, Bougouin W, Lamhaut L, et al.","doi":"10.1093/eurheartj/ehv556","id":"maupain-2016-cahp","pmid":"26497161","source":"Eur Heart J. 2016;37(42):3222-3231","title":"The CAHP (Cardiac Arrest Hospital Prognosis) score: a tool for risk stratification after out-of-hospital cardiac arrest","url":"https://doi.org/10.1093/eurheartj/ehv556"},"formula_expression":"CAHP = round(1.1*(age-10)) + 25 if arrest_at_home + 27 if not shockable_rhythm + round(2.8*no_flow_min) + round(0.8*low_flow_min) + epinephrine mg (0 → 0; 1-2 → 27; ≥3 → 43) + round(585-77*arterial_ph); Maupain 2016 Figure 2 nomogram integer points (caption: age 30 → 22, home → 25, non-shockable → 27, no-flow 5 min → 14, low-flow 10 min → 8, epinephrine 3 mg → 43, pH 7.10 → 38, total 177 → 88%); Table 3 low <150, medium 150-200, high >200 (150 and 200 are medium); max 411","purpose":"Sum Maupain 2016 Figure 2 CAHP nomogram integer points from age, arrest location, initial rhythm, no-flow, low-flow, epinephrine tertile, and arterial pH, and return Table 3 low/medium/high strata.","markdown_url":"https://magentlab.com/docs/cahp.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"cahp"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Figure 2 nomogram integer total"},{"name":"max_score","type":"integer","description":"411"},{"name":"cahp_risk","type":"string","description":"Table 3 stratum: low if score <150, medium if 150-200, high if >200. 150 and 200 are medium."},{"name":"nomogram_poor_outcome_percent","type":"integer","description":"Figure 2B printed poor-outcome percent when the total is 177 (88). Omitted for other totals."},{"name":"age_years","type":"integer","description":"Age used"},{"name":"arrest_at_home","type":"boolean","description":"Caller-assigned arrest at home"},{"name":"shockable_rhythm","type":"boolean","description":"Caller-assigned initial shockable rhythm"},{"name":"no_flow_min","type":"integer","description":"No-flow minutes used"},{"name":"low_flow_min","type":"integer","description":"Low-flow minutes used"},{"name":"epinephrine_mg","type":"integer","description":"Epinephrine mg used"},{"name":"arterial_ph","type":"number","description":"Arterial pH used"},{"name":"components","type":"array","description":"Per-factor Figure 2 points"},{"name":"citation","type":"object","description":"Maupain et al. Eur Heart J 2016 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"30","arrest_at_home":"true","arterial_ph":"7.10","epinephrine_mg":"3","low_flow_min":"10","no_flow_min":"5","shockable_rhythm":"false"},{"age":"30","arrest_at_home":"true","arterial_ph":"7.10","epinephrine_mg":"3","low_flow_min":"10","no_flow_min":"5","shockable_rhythm":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/cahp","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/cahp?age=30&arrest_at_home=true&shockable_rhythm=false&no_flow_min=5&low_flow_min=10&epinephrine_mg=3&arterial_ph=7.10","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/cahp","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/ottawa-copd","description":"Ottawa COPD Risk Scale (Stiell 2014 derivation). Ten caller-assigned flags: CABG 1, PVD intervention 1, intubation 2, arrival HR >=110 2, too ill to walk or HR >=120 (SaO2 <90%) 2, ischemic ECG 2, CXR congestion 1, Hb <100 g/L 3, urea >=12 1, serum CO2 >=35 1; max 16. Bands low/medium/high/very high with Table 8 SAE percents when published. Not a medical device or admission order; not BAP-65 or DECAF; not the 2018 validation as formula. magent does not walk the patient or read the ECG or CXR.","parameters":[{"in":"query","name":"cabg","type":"boolean","description":"Prior coronary artery bypass graft as assigned by the caller (Stiell 2014; 1 point if true). true or false.","required":true,"example":"false"},{"in":"query","name":"pvd_intervention","type":"boolean","description":"Peripheral vascular disease intervention as assigned by the caller (Stiell 2014; 1 point if true). true or false.","required":true,"example":"false"},{"in":"query","name":"intubation_respiratory","type":"boolean","description":"Intubation for respiratory distress as assigned by the caller (Stiell 2014; 2 points if true). true or false.","required":true,"example":"false"},{"in":"query","name":"hr_arrival_ge_110","type":"boolean","description":"Heart rate on ED arrival >=110/min as assigned by the caller after applying the Stiell 2014 cutoff (2 points if true). true or false. magent does not measure heart rate.","required":true,"example":"false"},{"in":"query","name":"too_ill_to_walk","type":"boolean","description":"Too ill to do the walk test after ED treatment, or heart rate >=120/min with SaO2 <90%, as assigned by the caller (Stiell 2014; one 2-point item, not two). true or false. magent does not walk the patient.","required":true,"example":"false"},{"in":"query","name":"ischemic_ecg","type":"boolean","description":"Acute ischemic changes on ECG as assigned by the caller (Stiell 2014; 2 points if true). true or false. magent does not interpret the ECG.","required":true,"example":"false"},{"in":"query","name":"pulmonary_congestion","type":"boolean","description":"Pulmonary congestion on chest radiograph as assigned by the caller (Stiell 2014; 1 point if true). true or false. magent does not read the chest radiograph.","required":true,"example":"false"},{"in":"query","name":"hemoglobin_lt_100","type":"boolean","description":"Hemoglobin <100 g/L as assigned by the caller after applying the Stiell 2014 cutoff (3 points if true). true or false. magent does not assay hemoglobin.","required":true,"example":"false"},{"in":"query","name":"urea_ge_12","type":"boolean","description":"Urea >=12 mmol/L as assigned by the caller after applying the Stiell 2014 cutoff (1 point if true). true or false. magent does not assay urea.","required":true,"example":"false"},{"in":"query","name":"serum_co2_ge_35","type":"boolean","description":"Serum CO2 >=35 mmol/L as assigned by the caller after applying the Stiell 2014 cutoff (1 point if true). true or false. magent does not assay CO2.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/ottawa-copd","citation":{"authors":"Stiell IG, Clement CM, Aaron SD, Rowe BH, Perry JJ, Brison RJ, Calder LA, Lang E, Borgundvaag B, Forster AJ, Wells GA","doi":"10.1503/cmaj.130968","id":"stiell-2014","pmid":"24549125","source":"CMAJ. 2014;186(6):E193-E204","title":"Clinical characteristics associated with adverse events in patients with exacerbation of chronic obstructive pulmonary disease: a prospective cohort study","url":"https://doi.org/10.1503/cmaj.130968"},"formula_expression":"ottawa_copd = cabg(1) + pvd_intervention(1) + intubation_respiratory(2) + hr_arrival_ge_110(2) + too_ill_to_walk(2) + ischemic_ecg(2) + pulmonary_congestion(1) + hemoglobin_lt_100(3) + urea_ge_12(1) + serum_co2_ge_35(1); Stiell 2014 derivation Tables 6-8; max 16; SAE 2.2% (score 0) to 91.4% (score 10); score 9 and >10 SAE not published; admission thresholds of total score 1, 2, or 3 had sensitivities 91.2 / 80.9 / 60.3%","purpose":"Sum the ten Stiell 2014 Ottawa COPD Risk Scale flags and return the integer point total (max 16), Table 8 risk band, and tabulated SAE percent when published.","markdown_url":"https://magentlab.com/docs/ottawa-copd.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"ottawa_copd"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Ottawa COPD Risk Scale points 0-16 (Stiell 2014)"},{"name":"max_score","type":"integer","description":"16"},{"name":"ottawa_copd_band","type":"string","description":"low (0), medium (1-2), high (3-4), or very_high (>=5) from Stiell 2014 Table 8"},{"name":"sae_percent","type":"number","description":"Table 8 serious-adverse-event percent when published (scores 0-8 and 10); null for score 9 and >10 (not tabulated; none invented)"},{"name":"components","type":"array","description":"Per-flag points"},{"name":"citation","type":"object","description":"Stiell et al. CMAJ 2014 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"cabg":"false","hemoglobin_lt_100":"false","hr_arrival_ge_110":"false","intubation_respiratory":"false","ischemic_ecg":"false","pulmonary_congestion":"false","pvd_intervention":"false","serum_co2_ge_35":"false","too_ill_to_walk":"false","urea_ge_12":"false"},{"cabg":"false","hemoglobin_lt_100":"false","hr_arrival_ge_110":"false","intubation_respiratory":"false","ischemic_ecg":"false","pulmonary_congestion":"false","pvd_intervention":"false","serum_co2_ge_35":"false","too_ill_to_walk":"false","urea_ge_12":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/ottawa-copd","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/ottawa-copd?cabg=false&pvd_intervention=false&intubation_respiratory=false&hr_arrival_ge_110=false&too_ill_to_walk=false&ischemic_ecg=false&pulmonary_congestion=false&hemoglobin_lt_100=false&urea_ge_12=false&serum_co2_ge_35=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/ottawa-copd","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/kocher","description":"Kocher 1999 four predictors for children with irritable hip: history of fever (oral temperature >38.5 C), non-weight-bearing, ESR >=40 mm/h, and serum WBC >12000/uL; 1 point each, max 4. Returns published predicted probability of septic arthritis vs transient synovitis. Deterministic published score with citation; not a diagnosis, not Caird CRP, not adults, and not an aspiration order.","parameters":[{"in":"query","name":"history_of_fever","type":"boolean","description":"History of fever (oral temperature >38.5°C in Kocher 1999). true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"non_weight_bearing","type":"boolean","description":"Non-weight-bearing on the affected limb (Kocher 1999). true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"esr_mm_h","type":"number","description":"Erythrocyte sedimentation rate in mm/h (1.0-150.0). ≥40 scores 1 (40 scores; 39.9 does not).","required":true,"example":"20"},{"in":"query","name":"wbc_k_ul","type":"number","description":"WBC in 10^3/µL (same as 10^9/L). Provide wbc_k_ul or wbc_ul. Range 0.01-500. >12000/µL scores 1.","required":false,"example":"8.0"},{"in":"query","name":"wbc_ul","type":"number","description":"WBC in cells/µL (same as cells/mm^3). Provide wbc_k_ul or wbc_ul. Range 10-500000. >12000 scores 1 (12000 does not; 12001 does).","required":false,"example":"8000"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_esr","message":"esr_mm_h must be a number from 1 to 150. Returned before settlement; you are not charged.","status":400},{"code":"invalid_wbc","message":"wbc_k_ul (0.01-500) or wbc_ul (10-500000) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/kocher","citation":{"authors":"Kocher MS, Zurakowski D, Kasser JR","doi":"10.2106/00004623-199912000-00002","id":"kocher-1999","pmid":"10608376","source":"J Bone Joint Surg Am. 1999;81(12):1662-1670","title":"Differentiating between septic arthritis and transient synovitis of the hip in children: an evidence-based clinical prediction algorithm","url":"https://doi.org/10.2106/00004623-199912000-00002"},"formula_expression":"Kocher = history_of_fever + non_weight_bearing + (esr_mm_h >= 40) + (wbc_ul > 12000); each 1; max 4; predicted probability 0:<0.2% 1:3.0% 2:40.0% 3:93.1% 4:99.6%","purpose":"Sum the four Kocher 1999 predictors and return the published predicted probability of septic arthritis versus transient synovitis in children with irritable hip.","markdown_url":"https://magentlab.com/docs/kocher.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"kocher"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Kocher predictors present, 0-4"},{"name":"max_score","type":"integer","description":"Always 4"},{"name":"predicted_probability","type":"string","description":"Kocher 1999 predicted probability of septic arthritis vs transient synovitis: <0.2%, 3.0%, 40.0%, 93.1%, or 99.6%. Not a diagnosis."},{"name":"esr_mm_h","type":"number","description":"ESR in mm/h used for the ≥40 cutoff"},{"name":"wbc_ul","type":"number","description":"Normalized WBC in cells/µL used for the >12000 cutoff"},{"name":"components","type":"array","description":"Per-predictor points"},{"name":"citation","type":"object","description":"Kocher et al. JBJS 1999 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"esr_mm_h":"20","history_of_fever":"false","non_weight_bearing":"false","wbc_k_ul":"8.0"},{"esr_mm_h":"20","history_of_fever":"false","non_weight_bearing":"false","wbc_k_ul":"8.0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/kocher","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/kocher?history_of_fever=false&non_weight_bearing=false&esr_mm_h=20&wbc_k_ul=8.0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/kocher","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/gout-rule","description":"Janssens 2010 diagnostic rule for acute gouty arthritis without joint fluid: male 2, previous arthritis attack 2, onset within 1 day 0.5, joint redness 1, MTP1 2.5, hypertension or CVD 1.5, uric acid >5.88 mg/dL or >350 µmol/L 3.5; max 13. Low ≤4, intermediate 4.5–7.5, high ≥8. uric_acid_mg_dl or uric_acid_umol_l, not both. Deterministic published score; not a gout diagnosis; magent does not examine joints or replace synovial crystal analysis.","parameters":[{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"Caller-assigned sex (Janssens 2010). male scores 2.0; female scores 0. magent does not assign sex.","required":true,"example":"female"},{"in":"query","name":"previous_arthritis_attack","type":"boolean","description":"Previous patient-reported arthritis attack (Janssens 2010). true scores 2.0. magent does not take a history.","required":true,"example":"false"},{"in":"query","name":"onset_within_1_day","type":"boolean","description":"Onset within 1 day (Janssens 2010). true scores 0.5. magent does not timestamp onset.","required":true,"example":"false"},{"in":"query","name":"joint_redness","type":"boolean","description":"Joint redness as assigned by the caller (Janssens 2010). true scores 1.0. magent does not examine joints.","required":true,"example":"false"},{"in":"query","name":"mtp1_involvement","type":"boolean","description":"Involvement of the first metatarsophalangeal joint (Janssens 2010). true scores 2.5. magent does not examine joints.","required":true,"example":"false"},{"in":"query","name":"hypertension_or_cvd","type":"boolean","description":"Hypertension or one or more cardiovascular diseases (Janssens 2010). true scores 1.5. magent does not diagnose hypertension or cardiovascular disease.","required":true,"example":"false"},{"in":"query","name":"uric_acid_mg_dl","type":"number","description":"Serum uric acid in mg/dL (1-20). Provide this or uric_acid_umol_l, not both. Scores 3.5 when >5.88; 5.88 does not score. magent does not assay uric acid.","required":false,"example":"5.0"},{"in":"query","name":"uric_acid_umol_l","type":"number","description":"Serum uric acid in µmol/L (60-1190). Provide this or uric_acid_mg_dl, not both. Scores 3.5 when >350; 350 does not score. magent does not assay uric acid.","required":false,"example":"300"}],"errors":[{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_uric_acid","message":"uric_acid_mg_dl (1-20) or uric_acid_umol_l (60-1190) is required, not both. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/gout-rule","citation":{"authors":"Janssens HJEM, Fransen J, van de Lisdonk EH, van Riel PLCM, van Weel C, Janssen M","doi":"10.1001/archinternmed.2010.196","id":"janssens-2010","pmid":"20625017","source":"Arch Intern Med. 2010;170(13):1120-1126","title":"A diagnostic rule for acute gouty arthritis in primary care without joint fluid analysis","url":"https://doi.org/10.1001/archinternmed.2010.196"},"formula_expression":"gout_rule = 2*male + 2*previous_arthritis_attack + 0.5*onset_within_1_day + 1*joint_redness + 2.5*mtp1_involvement + 1.5*hypertension_or_cvd + 3.5*(uric_acid_mg_dl>5.88 | uric_acid_umol_l>350); Janssens 2010; max 13; low ≤4, intermediate 4.5-7.5, high ≥8","purpose":"Sum the Janssens 2010 diagnostic-rule points for acute gouty arthritis without joint-fluid analysis and return low (≤4), intermediate (4.5–7.5), or high (≥8).","markdown_url":"https://magentlab.com/docs/gout-rule.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"gout_rule"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"number","description":"Janssens 2010 points 0-13, 0.5 steps"},{"name":"max_score","type":"integer","description":"Always 13"},{"name":"gout_band","type":"string","description":"low when score is ≤4, intermediate when 4.5-7.5, high when ≥8 (Janssens 2010). Not a gout diagnosis."},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Janssens 2010 Arch Intern Med citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"hypertension_or_cvd":"false","joint_redness":"false","mtp1_involvement":"false","onset_within_1_day":"false","previous_arthritis_attack":"false","sex":"female","uric_acid_mg_dl":"5.0"},{"hypertension_or_cvd":"false","joint_redness":"false","mtp1_involvement":"false","onset_within_1_day":"false","previous_arthritis_attack":"false","sex":"female","uric_acid_mg_dl":"5.0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/gout-rule","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/gout-rule?sex=female&previous_arthritis_attack=false&onset_within_1_day=false&joint_redness=false&mtp1_involvement=false&hypertension_or_cvd=false&uric_acid_mg_dl=5.0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/gout-rule","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/acr-eular-gout","description":"ACR/EULAR 2015 gout classification (Neogi). MSU crystals classify without score ≥8; else score ≥8 (max 23). Pattern 0/1/2, characteristics 0–3, time course 0/1/2, tophus 4, urate −4 to 4, MSU-negative −2, imaging 4+4. Not a diagnosis. Not Janssens 2010. magent does not examine joints or polarizing microscopy.","parameters":[{"in":"query","name":"entry_criterion","type":"boolean","description":"Must be true. ACR/EULAR 2015 entry: at least one episode of swelling, pain, or tenderness in a peripheral joint or bursa. false is invalid. magent does not examine joints.","required":true,"example":"true"},{"in":"query","name":"sufficient_msu","type":"boolean","description":"Presence of MSU crystals in a symptomatic joint or bursa (synovial fluid) or tophus (Neogi 2015 Step 2). true classifies gout without requiring score ≥8. magent does not perform polarizing microscopy.","required":true,"example":"false"},{"in":"query","name":"pattern","type":"string","enum":["other","ankle_midfoot","mtp1"],"description":"Pattern of joint/bursa involvement ever, monoarticular or oligoarticular unless other (Neogi 2015). other (joints/bursa other than ankle, midfoot, or 1st MTP, or only as part of a polyarticular presentation) scores 0. ankle_midfoot (ankle or midfoot without 1st MTP) scores 1. mtp1 (1st MTP) scores 2. magent does not examine joints.","required":true,"example":"other"},{"in":"query","name":"characteristics","type":"integer","enum":[0,1,2,3],"description":"Count (0-3) of symptomatic-episode characteristics ever: erythema overlying the affected joint; cannot bear touch or pressure; great difficulty walking or inability to use the affected joint (Neogi 2015). Points equal the count. magent does not examine joints.","required":true,"example":"0"},{"in":"query","name":"time_course","type":"string","enum":["none","one_typical","recurrent"],"description":"Time course of episode(s) ever (Neogi 2015). A typical episode has ≥2 of: time to maximum pain <24 h; resolution ≤14 days; complete resolution between episodes. none scores 0; one_typical scores 1; recurrent scores 2. magent does not take a history.","required":true,"example":"none"},{"in":"query","name":"tophus","type":"boolean","description":"Clinical evidence of tophus: draining or chalk-like subcutaneous nodule under transparent skin, often with overlying vascularity, in typical locations (joints, ears, olecranon bursae, finger pads, tendons e.g. Achilles) (Neogi 2015). true scores 4; false scores 0. magent does not examine joints.","required":true,"example":"false"},{"in":"query","name":"uric_acid_mg_dl","type":"number","description":"Highest serum urate in mg/dL (uricase method; 1-20). Provide this or uric_acid_umol_l, not both. <4 scores −4; ≥4 and <6 scores 0; 6–<8 scores 2; 8–<10 scores 3; ≥10 scores 4. magent does not assay uric acid.","required":false,"example":"5.0"},{"in":"query","name":"uric_acid_umol_l","type":"number","description":"Highest serum urate in µmol/L (uricase method; 60-1190). Provide this or uric_acid_mg_dl, not both. mmol/L = µmol/L / 1000. <0.24 scores −4; ≥0.24 and <0.36 scores 0; 0.36–<0.48 scores 2; 0.48–<0.60 scores 3; ≥0.60 scores 4. magent does not assay uric acid.","required":false,"example":"300"},{"in":"query","name":"synovial","type":"string","enum":["not_done","msu_negative"],"description":"Synovial fluid of a symptomatic (ever) joint/bursa, trained observer (Neogi 2015). not_done scores 0; msu_negative scores −2. MSU-positive is sufficient_msu, not this field. magent does not perform polarizing microscopy.","required":true,"example":"not_done"},{"in":"query","name":"imaging_urate","type":"string","enum":["absent_or_not_done","present"],"description":"Imaging evidence of urate deposition (ultrasound double-contour or DECT urate) in a symptomatic (ever) joint/bursa (Neogi 2015). present scores 4. If imaging is not available, absent_or_not_done scores 0. magent does not read imaging.","required":true,"example":"absent_or_not_done"},{"in":"query","name":"imaging_erosion","type":"string","enum":["absent_or_not_done","present"],"description":"Conventional radiograph of hands and/or feet with ≥1 gout-related erosion (cortical break with sclerotic margin and overhanging edge; excludes DIP joints and gull-wing) (Neogi 2015). present scores 4; absent_or_not_done scores 0. magent does not read radiographs.","required":true,"example":"absent_or_not_done"}],"errors":[{"code":"invalid_acr_eular_gout","message":"entry_criterion must be true; pattern must be other, ankle_midfoot, or mtp1; characteristics an integer 0-3; time_course none, one_typical, or recurrent; synovial not_done or msu_negative; imaging_urate and imaging_erosion absent_or_not_done or present (Neogi 2015 ACR/EULAR gout). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_uric_acid","message":"uric_acid_mg_dl (1-20) or uric_acid_umol_l (60-1190) is required, not both. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/acr-eular-gout","citation":{"authors":"Neogi T, Jansen TLTA, Dalbeth N, Fransen J, Schumacher HR, Berendsen D, Brown M, Choi H, Edwards NL, Janssens HJEM, Lioté F, Naden RP, Nuki G, Ogdie A, Perez-Ruiz F, Saag K, Singh JA, Sundy JS, Tausche AK, Vazquez-Mellado J, Yarows SA, Taylor WJ","doi":"10.1002/art.39254","id":"neogi-2015","pmid":"26352873","source":"Arthritis Rheumatol. 2015;67(10):2557-2568","title":"2015 Gout Classification Criteria: an American College of Rheumatology/European League Against Rheumatism collaborative initiative","url":"https://doi.org/10.1002/art.39254"},"formula_expression":"ACR/EULAR 2015 gout classification (Neogi Table 2): entry (episode of swelling, pain, or tenderness in a peripheral joint or bursa) required; sufficient MSU in a symptomatic joint/bursa or tophus classifies without score ≥8; else score ≥8 classifies. Score = pattern (other 0, ankle_midfoot 1, mtp1 2) + characteristics 0-3 + time_course (none 0, one_typical 1, recurrent 2) + tophus true 4 + serum urate (<4 mg/dL or <0.24 mmol/L −4; ≥4–<6 or ≥0.24–<0.36 0; 6–<8 or 0.36–<0.48 2; 8–<10 or 0.48–<0.60 3; ≥10 or ≥0.60 4) + synovial (not_done 0, msu_negative −2) + imaging_urate present 4 + imaging_erosion present 4; max 23. Not a diagnosis. Not Janssens 2010","purpose":"Apply the 2015 ACR/EULAR gout classification criteria (Neogi Table 2): require the entry episode, classify immediately if MSU crystals are present, otherwise return the Step 3 score (max 23) and whether score ≥8 classifies gout. Not a gout diagnosis.","markdown_url":"https://magentlab.com/docs/acr-eular-gout.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"acr_eular_gout"},{"name":"formula_expression","type":"string","description":"Neogi 2015 ACR/EULAR gout classification expression"},{"name":"score","type":"number","description":"Step 3 clinical score (may be negative; min −6, max 23). Always computed, including when sufficient_msu is true."},{"name":"max_score","type":"integer","description":"Always 23"},{"name":"classified_gout","type":"boolean","description":"true iff sufficient_msu is true or score ≥8. Classification criteria for research, not a gout diagnosis."},{"name":"sufficient_criterion","type":"boolean","description":"Echo of sufficient_msu (Neogi 2015 Step 2)"},{"name":"gout_band","type":"string","description":"classified when classified_gout is true; not_classified otherwise. Not a gout diagnosis."},{"name":"components","type":"array","description":"Per-domain Neogi 2015 points"},{"name":"citation","type":"object","description":"Neogi 2015 Arthritis Rheumatol citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"characteristics":"0","entry_criterion":"true","imaging_erosion":"absent_or_not_done","imaging_urate":"absent_or_not_done","pattern":"other","sufficient_msu":"false","synovial":"not_done","time_course":"none","tophus":"false","uric_acid_mg_dl":"5.0"},{"characteristics":"0","entry_criterion":"true","imaging_erosion":"absent_or_not_done","imaging_urate":"absent_or_not_done","pattern":"other","sufficient_msu":"false","synovial":"not_done","time_course":"none","tophus":"false","uric_acid_mg_dl":"5.0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/acr-eular-gout","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/acr-eular-gout?entry_criterion=true&sufficient_msu=false&pattern=other&characteristics=0&time_course=none&tophus=false&uric_acid_mg_dl=5.0&synovial=not_done&imaging_urate=absent_or_not_done&imaging_erosion=absent_or_not_done","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/acr-eular-gout","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/acr-eular-pmr","description":"ACR/EULAR 2012 PMR classification (Dasgupta Table 4). Required: age 50–120, bilateral shoulder aching, abnormal CRP or ESR. Score morning stiffness >45 min 2, hip pain or limited ROM 1, RF or ACPA absent 2, other joint pain absent 1. Without ultrasound: max 6, classified iff ≥4. With ultrasound: add shoulder-and-hip 1 and both shoulders 1; max 8, classified iff ≥5. Not a diagnosis (not meant for diagnostic purposes). magent does not assay CRP/ESR/RF/ACPA or perform ultrasound.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years as an integer 50–120 (Dasgupta 2012 required criterion: age ≥50). magent does not date the patient.","required":true,"example":"70"},{"in":"query","name":"bilateral_shoulder_aching","type":"boolean","description":"Must be true. Dasgupta 2012 required criterion: bilateral shoulder aching. false is invalid and is not scored. magent does not examine joints.","required":true,"example":"true"},{"in":"query","name":"abnormal_crp_or_esr","type":"boolean","description":"Must be true. Dasgupta 2012 required criterion: abnormal CRP and/or ESR. false is invalid and is not scored. magent does not assay CRP or ESR.","required":true,"example":"true"},{"in":"query","name":"morning_stiffness_gt_45","type":"boolean","description":"Morning stiffness duration >45 min (Dasgupta 2012 Table 4). true scores 2; false scores 0. magent does not take a history.","required":true,"example":"true"},{"in":"query","name":"hip_pain_or_limited_rom","type":"boolean","description":"Hip pain or limited range of motion (Dasgupta 2012 Table 4). true scores 1; false scores 0. magent does not examine joints.","required":true,"example":"true"},{"in":"query","name":"rf_or_acpa_absent","type":"boolean","description":"Absence of RF or ACPA as assigned by the caller (Dasgupta 2012 Table 4). true scores 2; false scores 0. magent does not assay RF or ACPA.","required":true,"example":"true"},{"in":"query","name":"other_joint_pain_absent","type":"boolean","description":"Absence of other/peripheral joint involvement as assigned by the caller (Dasgupta 2012 Table 4). true scores 1; false scores 0. magent does not examine joints.","required":true,"example":"true"},{"in":"query","name":"include_ultrasound","type":"boolean","description":"Use the optional ultrasound algorithm (Dasgupta 2012 Table 4). false: do not require US flags; max 6; classified iff score ≥4. true: require us_shoulder_and_hip and us_both_shoulders; max 8; classified iff score ≥5. magent does not perform ultrasound.","required":true,"example":"false"},{"in":"query","name":"us_shoulder_and_hip","type":"boolean","description":"At least one shoulder with subdeltoid bursitis and/or biceps tenosynovitis and/or glenohumeral synovitis (posterior or axillary) and at least one hip with synovitis and/or trochanteric bursitis (Dasgupta 2012). true scores 1. Required when include_ultrasound is true; ignored when false. magent does not perform ultrasound.","required":false,"example":"false"},{"in":"query","name":"us_both_shoulders","type":"boolean","description":"Both shoulders with subdeltoid bursitis, biceps tenosynovitis, or glenohumeral synovitis (Dasgupta 2012). true scores 1. Required when include_ultrasound is true; ignored when false. magent does not perform ultrasound.","required":false,"example":"false"}],"errors":[{"code":"invalid_pmr_age","message":"age must be an integer from 50 to 120 (Dasgupta 2012 EULAR/ACR PMR required criterion). Returned before settlement; you are not charged.","status":400},{"code":"invalid_pmr","message":"bilateral_shoulder_aching and abnormal_crp_or_esr must be true; include_ultrasound must be true or false (Dasgupta 2012 required criteria). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/acr-eular-pmr","citation":{"authors":"Dasgupta B, Cimmino MA, Maradit-Kremers H, Schmidt WA, Schirmer M, Salvarani C, Bachta A, Dejaco C, Duftner C, Jensen HS, Poór G, Kaposi NP, Mandl P, Balint PV, Schmidt Z, Iagnocco A, Nannini C, Cantini F, Macchioni P, Pipitone N, Amo MD, Espígol-Frigolé G, Cid MC, Martínez-Taboada VM, Nordborg E, Direskeneli H, Aydin SZ, Ahmed K, Hazleman B, Silverman B, Pease C, Wakefield RJ, Luqmani R, Abril A, Michet CJ, Mazlumzadeh M, Salvarani C","doi":"10.1136/annrheumdis-2011-200329","id":"dasgupta-2012","pmid":"22388996","source":"Ann Rheum Dis. 2012;71(4):484-492","title":"2012 provisional classification criteria for polymyalgia rheumatica: a European League Against Rheumatism/American College of Rheumatology collaborative initiative","url":"https://doi.org/10.1136/annrheumdis-2011-200329"},"formula_expression":"ACR/EULAR 2012 PMR classification (Dasgupta Table 4): required age 50–120, bilateral_shoulder_aching true, abnormal_crp_or_esr true (else do not score). Score = morning_stiffness_gt_45 2 + hip_pain_or_limited_rom 1 + rf_or_acpa_absent 2 + other_joint_pain_absent 1. Without ultrasound: max 6, classified iff score ≥4. With ultrasound: add us_shoulder_and_hip 1 + us_both_shoulders 1; max 8, classified iff score ≥5. Not a diagnosis (not meant for diagnostic purposes)","purpose":"Apply the 2012 EULAR/ACR polymyalgia rheumatica classification criteria (Dasgupta Table 4): require age ≥50, bilateral shoulder aching, and abnormal CRP and/or ESR, then return the clinical score with or without optional ultrasound and whether the published cut point classifies PMR. Not a PMR diagnosis.","markdown_url":"https://magentlab.com/docs/acr-eular-pmr.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"acr_eular_pmr"},{"name":"formula_expression","type":"string","description":"Dasgupta 2012 EULAR/ACR PMR classification expression"},{"name":"score","type":"integer","description":"Dasgupta 2012 Table 4 points. 0–6 without ultrasound; 0–8 with ultrasound."},{"name":"max_score","type":"integer","description":"6 without ultrasound; 8 with ultrasound"},{"name":"classified","type":"boolean","description":"true iff score ≥4 without ultrasound or score ≥5 with ultrasound. Classification criteria for research, not a PMR diagnosis."},{"name":"algorithm","type":"string","description":"without_ultrasound when include_ultrasound is false; with_ultrasound when true"},{"name":"components","type":"array","description":"Per-item Dasgupta 2012 points"},{"name":"citation","type":"object","description":"Dasgupta 2012 Ann Rheum Dis citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"abnormal_crp_or_esr":"true","age":"70","bilateral_shoulder_aching":"true","hip_pain_or_limited_rom":"true","include_ultrasound":"false","morning_stiffness_gt_45":"true","other_joint_pain_absent":"true","rf_or_acpa_absent":"true"},{"abnormal_crp_or_esr":"true","age":"70","bilateral_shoulder_aching":"true","hip_pain_or_limited_rom":"true","include_ultrasound":"false","morning_stiffness_gt_45":"true","other_joint_pain_absent":"true","rf_or_acpa_absent":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/acr-eular-pmr","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/acr-eular-pmr?age=70&bilateral_shoulder_aching=true&abnormal_crp_or_esr=true&morning_stiffness_gt_45=true&hip_pain_or_limited_rom=true&rf_or_acpa_absent=true&other_joint_pain_absent=true&include_ultrasound=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/acr-eular-pmr","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/acr-eular-sjogren","description":"ACR/EULAR 2016 primary Sjögren classification (Shiboski Table 3). Required: inclusion_met true (AECG dryness or ESSDAI domain) and exclusion_present false (no radiation, HCV, AIDS, sarcoid, amyloid, GVHD, IgG4-RD). Score: labial biopsy FS ≥1 3, anti-SSA/Ro 3, ocular staining 1, Schirmer 1, UWS 1; max 9; classified iff ≥4. Not a diagnosis. Not AECG 2002. Not 2012 ACR-only. magent does not stain eyes, measure saliva, or read biopsies.","parameters":[{"in":"query","name":"inclusion_met","type":"boolean","description":"Must be true. Shiboski 2016 inclusion as assigned by the caller: at least one AECG ocular or oral dryness question positive, or suspicion of Sjögren's syndrome from ESSDAI with at least one positive domain item. false is invalid and is not scored. magent does not take a dryness history.","required":true,"example":"true"},{"in":"query","name":"exclusion_present","type":"boolean","description":"Must be false. Shiboski 2016 exclusion as assigned by the caller: none of head and neck radiation, active HCV with PCR confirmation, AIDS, sarcoidosis, amyloidosis, graft-versus-host disease, or IgG4-related disease. true is invalid and is not scored. magent does not diagnose exclusion conditions.","required":true,"example":"false"},{"in":"query","name":"labial_biopsy_fs_ge_1","type":"boolean","description":"Labial salivary gland with focal lymphocytic sialadenitis and focus score ≥1 foci/4 mm² (Shiboski 2016 Table 3). true scores 3; false scores 0. magent does not read biopsies.","required":true,"example":"true"},{"in":"query","name":"anti_ssa_ro","type":"boolean","description":"Anti-SSA/Ro positive as assigned by the caller (Shiboski 2016 Table 3). true scores 3; false scores 0. Anti-SSB/La without SSA is not an item. magent does not assay autoantibodies.","required":true,"example":"false"},{"in":"query","name":"ocular_staining","type":"boolean","description":"Ocular staining score ≥5 or van Bijsterveld ≥4 in at least one eye (Shiboski 2016 Table 3). true scores 1; false scores 0. magent does not stain eyes.","required":true,"example":"true"},{"in":"query","name":"schirmer","type":"boolean","description":"Schirmer's test ≤5 mm/5 minutes in at least one eye (Shiboski 2016 Table 3). true scores 1; false scores 0. magent does not perform Schirmer testing.","required":true,"example":"false"},{"in":"query","name":"uws","type":"boolean","description":"Unstimulated whole saliva flow rate ≤0.1 ml/minute (Shiboski 2016 Table 3). true scores 1; false scores 0. magent does not measure saliva.","required":true,"example":"false"}],"errors":[{"code":"invalid_sjogren","message":"inclusion_met must be true and exclusion_present must be false (Shiboski 2016 ACR/EULAR primary Sjögren inclusion and exclusion). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/acr-eular-sjogren","citation":{"authors":"Shiboski CH, Shiboski SC, Seror R, Criswell LA, Labetoulle M, Lietman TM, Rasmussen A, Scofield H, Vitali C, Bowman SJ, Mariette X, the International Sjögren's Syndrome Criteria Working Group","doi":"10.1002/art.39859","id":"shiboski-2016","pmid":"27785888","source":"Arthritis Rheumatol. 2017;69(1):35-45","title":"2016 American College of Rheumatology/European League Against Rheumatism Classification Criteria for Primary Sjögren's Syndrome: A Consensus and Data-Driven Methodology Involving Three International Patient Cohorts","url":"https://doi.org/10.1002/art.39859"},"formula_expression":"ACR/EULAR 2016 primary Sjögren classification (Shiboski Table 3): required inclusion_met true and exclusion_present false (else do not score). Score = labial_biopsy_fs_ge_1 3 + anti_ssa_ro 3 + ocular_staining 1 + schirmer 1 + uws 1; max 9; classified iff score ≥4. Not a diagnosis. Not AECG 2002. Not 2012 ACR-only criteria","purpose":"Apply the 2016 ACR/EULAR classification criteria for primary Sjögren's syndrome (Shiboski Table 3): require published inclusion and no exclusion, then return the five-item weighted score and whether the ≥4 cut point classifies primary Sjögren's syndrome. Not a diagnosis.","markdown_url":"https://magentlab.com/docs/acr-eular-sjogren.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"acr_eular_sjogren"},{"name":"formula_expression","type":"string","description":"Shiboski 2016 ACR/EULAR primary Sjögren classification expression"},{"name":"score","type":"integer","description":"Shiboski 2016 Table 3 points. Integer 0–9."},{"name":"max_score","type":"integer","description":"9"},{"name":"classified","type":"boolean","description":"true iff score ≥4. Classification criteria for research, not a diagnosis of Sjögren's syndrome. Not AECG 2002. Not 2012 ACR-only criteria."},{"name":"components","type":"array","description":"Per-item Shiboski 2016 points"},{"name":"citation","type":"object","description":"Shiboski 2016 Arthritis Rheumatol citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"anti_ssa_ro":"false","exclusion_present":"false","inclusion_met":"true","labial_biopsy_fs_ge_1":"true","ocular_staining":"true","schirmer":"false","uws":"false"},{"anti_ssa_ro":"false","exclusion_present":"false","inclusion_met":"true","labial_biopsy_fs_ge_1":"true","ocular_staining":"true","schirmer":"false","uws":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/acr-eular-sjogren","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/acr-eular-sjogren?inclusion_met=true&exclusion_present=false&labial_biopsy_fs_ge_1=true&anti_ssa_ro=false&ocular_staining=true&schirmer=false&uws=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/acr-eular-sjogren","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/asas-axial-spa","description":"ASAS 2009 axial SpA classification (Rudwaleit set 3a / fig 2). Required: chronic back pain ≥3 months and age at onset <45. Imaging arm: MRI or modified New York sacroiliitis plus ≥1 of 11 SpA features. Clinical arm: HLA-B27 plus ≥2 other features (HLA-B27 does not count toward those two). Not a diagnosis. Not peripheral ASAS 2011. Not modified New York AS-only. magent does not read films or assay HLA-B27.","parameters":[{"in":"query","name":"chronic_back_pain_ge_3_months","type":"boolean","description":"Must be true. Rudwaleit 2009 entry: chronic back pain ≥3 months. false is invalid and is not returned as classified=false. magent does not take a history.","required":true,"example":"true"},{"in":"query","name":"age_at_onset_years","type":"integer","description":"Age at onset of back pain in years, integer 1–44 (Rudwaleit 2009 entry: age at onset <45). 0 and ≥45 are invalid and are not classified. magent does not date the patient.","required":true,"example":"28"},{"in":"query","name":"mri_sacroiliitis","type":"boolean","description":"Active (acute) inflammation on MRI highly suggestive of SpA-associated sacroiliitis, as assigned by the caller (Rudwaleit 2009). Combined with radiographic_sacroiliitis by OR for sacroiliitis_on_imaging. true or false. magent does not read MRI.","required":true,"example":"true"},{"in":"query","name":"radiographic_sacroiliitis","type":"boolean","description":"Definite radiographic sacroiliitis according to modified New York criteria (bilateral grade ≥2 or unilateral grade 3–4), as assigned by the caller (Rudwaleit 2009). true or false. magent does not read radiographs.","required":true,"example":"false"},{"in":"query","name":"inflammatory_back_pain","type":"boolean","description":"Inflammatory back pain as assigned by the caller (Rudwaleit 2009 fig 2 / table 5). true or false. magent does not take a history or apply a nested IBP questionnaire.","required":true,"example":"true"},{"in":"query","name":"arthritis","type":"boolean","description":"Past or present synovitis diagnosed by a physician, as assigned by the caller (Rudwaleit 2009). true or false. magent does not examine joints.","required":true,"example":"false"},{"in":"query","name":"enthesitis_heel","type":"boolean","description":"Past or present spontaneous pain or tenderness at the insertion of the Achilles tendon or plantar fascia at the calcaneus, as assigned by the caller (Rudwaleit 2009). Heel enthesitis only. true or false. magent does not examine entheses.","required":true,"example":"false"},{"in":"query","name":"uveitis","type":"boolean","description":"Past or present uveitis confirmed by an ophthalmologist, as assigned by the caller (Rudwaleit 2009). true or false. magent does not examine the eye.","required":true,"example":"false"},{"in":"query","name":"dactylitis","type":"boolean","description":"Past or present dactylitis diagnosed by a physician, as assigned by the caller (Rudwaleit 2009). true or false. magent does not examine digits.","required":true,"example":"false"},{"in":"query","name":"psoriasis","type":"boolean","description":"Past or present psoriasis diagnosed by a physician, as assigned by the caller (Rudwaleit 2009). true or false. magent does not examine skin.","required":true,"example":"false"},{"in":"query","name":"ibd","type":"boolean","description":"Past or present Crohn's disease or ulcerative colitis diagnosed by a physician, as assigned by the caller (Rudwaleit 2009). true or false. magent does not diagnose IBD.","required":true,"example":"false"},{"in":"query","name":"nsaid_good_response","type":"boolean","description":"Good response to NSAIDs as assigned by the caller (Rudwaleit 2009): 24–48 h after a full dose of NSAID the back pain is not present anymore or is much better. true or false. magent does not prescribe NSAIDs.","required":true,"example":"false"},{"in":"query","name":"family_history_spa","type":"boolean","description":"Family history of SpA as assigned by the caller (Rudwaleit 2009): first-degree or second-degree relatives with ankylosing spondylitis, psoriasis, acute uveitis, reactive arthritis, or IBD. true or false. magent does not take a pedigree.","required":true,"example":"false"},{"in":"query","name":"hla_b27","type":"boolean","description":"HLA-B27 positive as assigned by the caller (Rudwaleit 2009). Obligatory for the clinical arm; does not count toward the two other SpA features. Counts toward spa_feature_count and the imaging arm. true or false. magent does not assay HLA-B27.","required":true,"example":"false"},{"in":"query","name":"elevated_crp","type":"boolean","description":"CRP above the upper limit of normal in the presence of back pain after exclusion of other causes, as assigned by the caller (Rudwaleit 2009). true or false. magent does not assay CRP.","required":true,"example":"false"}],"errors":[{"code":"invalid_asas","message":"chronic_back_pain_ge_3_months must be true and age_at_onset_years an integer from 1 to 44 (Rudwaleit 2009 ASAS axial SpA entry: back pain ≥3 months, age at onset <45). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/asas-axial-spa","citation":{"authors":"Rudwaleit M, van der Heijde D, Landewé R, Listing J, Akkoc N, Brandt J, Braun J, Chou CT, Collantes-Estevez E, Dougados M, Huang F, Gu J, Khan MA, Kirazli Y, Maksymowych WP, Mielants H, Sørensen IJ, Ozgocmen S, Roussou E, Valle-Oñate R, Weber U, Wei J, Sieper J","doi":"10.1136/ard.2009.108233","id":"rudwaleit-2009","pmid":"19297345","source":"Ann Rheum Dis. 2009;68(6):777-783","title":"The development of Assessment of SpondyloArthritis international Society classification criteria for axial spondyloarthritis (part II): validation and final selection","url":"https://doi.org/10.1136/ard.2009.108233"},"formula_expression":"ASAS 2009 axial SpA classification (Rudwaleit set 3a / fig 2 + table 5): required chronic_back_pain_ge_3_months true and age_at_onset_years 1–44 (age at onset <45). sacroiliitis_on_imaging = mri_sacroiliitis or radiographic_sacroiliitis. spa_feature_count = count of 11 SpA features (inflammatory_back_pain, arthritis, enthesitis_heel, uveitis, dactylitis, psoriasis, ibd, nsaid_good_response, family_history_spa, hla_b27, elevated_crp). other_spa_feature_count = spa_feature_count minus 1 if hla_b27 else spa_feature_count. imaging_arm iff sacroiliitis_on_imaging and spa_feature_count ≥1. clinical_arm iff hla_b27 and other_spa_feature_count ≥2. classified iff imaging_arm or clinical_arm. Not a diagnosis. Not peripheral ASAS 2011. Not modified New York AS-only","purpose":"Apply the 2009 ASAS classification criteria for axial spondyloarthritis (Rudwaleit set 3a / figure 2): require chronic back pain ≥3 months with age at onset <45, then return whether the imaging arm (sacroiliitis plus ≥1 SpA feature) or the clinical arm (HLA-B27 plus ≥2 other SpA features) classifies axial SpA. Not a diagnosis.","markdown_url":"https://magentlab.com/docs/asas-axial-spa.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"asas_axial_spa"},{"name":"formula_expression","type":"string","description":"Rudwaleit 2009 ASAS axial SpA classification expression (set 3a / fig 2)"},{"name":"classified","type":"boolean","description":"true iff imaging_arm or clinical_arm. Classification criteria for research, not a diagnosis of axial SpA. Not peripheral ASAS 2011. Not modified New York AS-only."},{"name":"imaging_arm","type":"boolean","description":"true iff sacroiliitis_on_imaging and spa_feature_count ≥1 (Rudwaleit 2009 fig 2)"},{"name":"clinical_arm","type":"boolean","description":"true iff hla_b27 and other_spa_feature_count ≥2 (Rudwaleit 2009 fig 2). HLA-B27 does not count toward the two other features."},{"name":"spa_feature_count","type":"integer","description":"Count of the 11 SpA features that are true, including HLA-B27 when true."},{"name":"other_spa_feature_count","type":"integer","description":"spa_feature_count minus 1 when hla_b27 is true, else spa_feature_count. Used for the clinical arm."},{"name":"sacroiliitis_on_imaging","type":"boolean","description":"true iff mri_sacroiliitis or radiographic_sacroiliitis"},{"name":"citation","type":"object","description":"Rudwaleit 2009 Ann Rheum Dis citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age_at_onset_years":"28","arthritis":"false","chronic_back_pain_ge_3_months":"true","dactylitis":"false","elevated_crp":"false","enthesitis_heel":"false","family_history_spa":"false","hla_b27":"false","ibd":"false","inflammatory_back_pain":"true","mri_sacroiliitis":"true","nsaid_good_response":"false","psoriasis":"false","radiographic_sacroiliitis":"false","uveitis":"false"},{"age_at_onset_years":"28","arthritis":"false","chronic_back_pain_ge_3_months":"true","dactylitis":"false","elevated_crp":"false","enthesitis_heel":"false","family_history_spa":"false","hla_b27":"false","ibd":"false","inflammatory_back_pain":"true","mri_sacroiliitis":"true","nsaid_good_response":"false","psoriasis":"false","radiographic_sacroiliitis":"false","uveitis":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/asas-axial-spa","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/asas-axial-spa?chronic_back_pain_ge_3_months=true&age_at_onset_years=28&mri_sacroiliitis=true&radiographic_sacroiliitis=false&inflammatory_back_pain=true&arthritis=false&enthesitis_heel=false&uveitis=false&dactylitis=false&psoriasis=false&ibd=false&nsaid_good_response=false&family_history_spa=false&hla_b27=false&elevated_crp=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/asas-axial-spa","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/asdas-crp","description":"van der Heijde 2009 ASDAS-CRP: 0.12*back pain + 0.06*morning stiffness duration + 0.11*patient global + 0.07*peripheral pain/swelling + 0.58*ln(CRP+1). BASDAI 0-10 items and CRP in mg/L. ASAS selected the CRP version as preferred. magent does not examine the patient or assay CRP. Not ASDAS-ESR. Not BASDAI total. Does not apply Machado 2011 1.3/2.1/3.5 activity cuts. Not a diagnosis or biologic order.","parameters":[{"in":"query","name":"back_pain","type":"number","description":"Caller-assigned total back pain on a 0-10 VAS or NRS (van der Heijde 2009; BASDAI question 2, neck/back/hip pain). Number 0-10. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"morning_stiffness_duration","type":"number","description":"Caller-assigned duration of morning stiffness on a 0-10 VAS or NRS (van der Heijde 2009; BASDAI question 6). Number 0-10, not hours. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"patient_global","type":"number","description":"Caller-assigned patient global assessment of disease activity on a 0-10 VAS or NRS (van der Heijde 2009). Number 0-10. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"peripheral_pain_swelling","type":"number","description":"Caller-assigned peripheral pain/swelling on a 0-10 VAS or NRS (van der Heijde 2009; BASDAI question 3, joints other than neck/back/hips). Number 0-10. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"crp_mg_l","type":"number","description":"Caller-assigned C-reactive protein in mg/L (van der Heijde 2009; not mg/dL). Number 0-500 is a magent clamp. The 2009 papers do not floor CRP at 2 mg/L. magent does not assay CRP.","required":true,"example":"0"}],"errors":[{"code":"invalid_asdas_crp","message":"ASDAS-CRP inputs must match van der Heijde 2009 back pain, stiffness, patient global, peripheral complaints, and CRP from that paper. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/asdas-crp","citation":{"authors":"van der Heijde D, Lie E, Kvien TK, Sieper J, Van den Bosch F, Listing J, Braun J, Landewé R; ASAS","doi":"10.1136/ard.2008.100826","id":"van-der-heijde-2009","pmid":"19060001","source":"Ann Rheum Dis. 2009;68(12):1811-1818","title":"ASDAS, a highly discriminatory ASAS-endorsed disease activity score in patients with ankylosing spondylitis","url":"https://doi.org/10.1136/ard.2008.100826"},"formula_expression":"ASDAS-CRP = 0.12*back_pain + 0.06*morning_stiffness_duration + 0.11*patient_global + 0.07*peripheral_pain_swelling + 0.58*ln(crp_mg_l+1); van der Heijde 2009 preferred CRP formula; BASDAI 0-10 items (Q2 back pain, Q6 stiffness duration, Q3 peripheral pain/swelling) and patient global 0-10; CRP mg/L; not ASDAS-ESR; not BASDAI total; no Machado 2011 1.3/2.1/3.5 cuts; magent does not examine the patient or assay CRP","purpose":"Compute the van der Heijde 2009 ASAS-preferred ASDAS-CRP from caller-assigned BASDAI 0–10 back pain, morning stiffness duration, peripheral pain/swelling, patient global, and CRP in mg/L.","markdown_url":"https://magentlab.com/docs/asdas-crp.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"asdas_crp"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"number","description":"van der Heijde 2009 ASDAS-CRP, 2 decimals. 0.12*back_pain+0.06*morning_stiffness_duration+0.11*patient_global+0.07*peripheral_pain_swelling+0.58*ln(crp_mg_l+1)"},{"name":"back_pain","type":"number","description":"Back pain 0-10 used"},{"name":"morning_stiffness_duration","type":"number","description":"Morning stiffness duration 0-10 used"},{"name":"patient_global","type":"number","description":"Patient global 0-10 used"},{"name":"peripheral_pain_swelling","type":"number","description":"Peripheral pain/swelling 0-10 used"},{"name":"crp_mg_l","type":"number","description":"CRP in mg/L used"},{"name":"citation","type":"object","description":"van der Heijde et al. Ann Rheum Dis 2009 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"back_pain":"0","crp_mg_l":"0","morning_stiffness_duration":"0","patient_global":"0","peripheral_pain_swelling":"0"},{"back_pain":"0","crp_mg_l":"0","morning_stiffness_duration":"0","patient_global":"0","peripheral_pain_swelling":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/asdas-crp","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/asdas-crp?back_pain=0&morning_stiffness_duration=0&patient_global=0&peripheral_pain_swelling=0&crp_mg_l=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/asdas-crp","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/asdas-esr","description":"Lukas 2009 ASDAS-ESR: 0.08*back pain + 0.07*morning stiffness duration + 0.11*patient global + 0.09*peripheral pain/swelling + 0.29*sqrt(ESR). BASDAI 0-10 items and ESR in mm/h. magent does not examine the patient or assay ESR. Not ASDAS-CRP. Not BASDAI total. Does not apply Machado 2011 1.3/2.1/3.5 activity cuts. Not a diagnosis or biologic order.","parameters":[{"in":"query","name":"back_pain","type":"number","description":"Caller-assigned total back pain on a 0-10 VAS or NRS (Lukas 2009; BASDAI question 2, neck/back/hip pain). Number 0-10. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"morning_stiffness_duration","type":"number","description":"Caller-assigned duration of morning stiffness on a 0-10 VAS or NRS (Lukas 2009; BASDAI question 6). Number 0-10, not hours. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"patient_global","type":"number","description":"Caller-assigned patient global assessment of disease activity on a 0-10 VAS or NRS (Lukas 2009). Number 0-10. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"peripheral_pain_swelling","type":"number","description":"Caller-assigned peripheral pain/swelling on a 0-10 VAS or NRS (Lukas 2009; BASDAI question 3, joints other than neck/back/hips). Number 0-10. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"esr_mm_h","type":"number","description":"Caller-assigned erythrocyte sedimentation rate in mm/h (Lukas 2009). Number 0-150 is a magent clamp. magent does not assay ESR.","required":true,"example":"0"}],"errors":[{"code":"invalid_asdas_esr","message":"ASDAS-ESR inputs must match Lukas 2009 back pain, stiffness, patient global, peripheral complaints, and ESR from that paper. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/asdas-esr","citation":{"authors":"Lukas C, Landewé R, Sieper J, Dougados M, Davis J, Braun J, van der Linden S, van der Heijde D","doi":"10.1136/ard.2008.094870","id":"lukas-2009","pmid":"18625618","source":"Ann Rheum Dis. 2009;68(1):18-24","title":"Development of an ASAS-endorsed disease activity score (ASDAS) in patients with ankylosing spondylitis","url":"https://doi.org/10.1136/ard.2008.094870"},"formula_expression":"ASDAS-ESR = 0.08*back_pain + 0.07*morning_stiffness_duration + 0.11*patient_global + 0.09*peripheral_pain_swelling + 0.29*sqrt(esr_mm_h); Lukas 2009 development formula; BASDAI 0-10 items (Q2 back pain, Q6 stiffness duration, Q3 peripheral pain/swelling) and patient global 0-10; ESR mm/h; not ASDAS-CRP; not BASDAI total; no Machado 2011 1.3/2.1/3.5 cuts; magent does not examine the patient or assay ESR","purpose":"Compute the Lukas 2009 ASDAS-ESR from caller-assigned BASDAI 0–10 back pain, morning stiffness duration, peripheral pain/swelling, patient global, and ESR in mm/h.","markdown_url":"https://magentlab.com/docs/asdas-esr.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"asdas_esr"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"number","description":"Lukas 2009 ASDAS-ESR, 2 decimals. 0.08*back_pain+0.07*morning_stiffness_duration+0.11*patient_global+0.09*peripheral_pain_swelling+0.29*sqrt(esr_mm_h)"},{"name":"back_pain","type":"number","description":"Back pain 0-10 used"},{"name":"morning_stiffness_duration","type":"number","description":"Morning stiffness duration 0-10 used"},{"name":"patient_global","type":"number","description":"Patient global 0-10 used"},{"name":"peripheral_pain_swelling","type":"number","description":"Peripheral pain/swelling 0-10 used"},{"name":"esr_mm_h","type":"number","description":"ESR in mm/h used"},{"name":"citation","type":"object","description":"Lukas et al. Ann Rheum Dis 2009 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"back_pain":"0","esr_mm_h":"0","morning_stiffness_duration":"0","patient_global":"0","peripheral_pain_swelling":"0"},{"back_pain":"0","esr_mm_h":"0","morning_stiffness_duration":"0","patient_global":"0","peripheral_pain_swelling":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/asdas-esr","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/asdas-esr?back_pain=0&morning_stiffness_duration=0&patient_global=0&peripheral_pain_swelling=0&esr_mm_h=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/asdas-esr","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/asas-peripheral-spa","description":"ASAS 2011 peripheral SpA classification (Rudwaleit set 2D / fig 1 + table 5). Required: current arthritis, enthesitis, or dactylitis. Arm A: ≥1 of psoriasis, IBD, preceding infection, HLA-B27, uveitis, sacroiliitis on imaging. Arm B: ≥2 of arthritis, enthesitis, dactylitis, IBP in the past, family history of SpA. Not a diagnosis. Not ASAS 2009 axial. Not ESSG/Amor. magent does not examine joints or assay HLA-B27.","parameters":[{"in":"query","name":"arthritis","type":"boolean","description":"Current peripheral arthritis (usually asymmetric and/or of lower limbs) as assigned by the caller (Rudwaleit 2011 set 2D entry). Table 5 additional feature is past or present synovitis diagnosed by a physician; the same caller flag counts toward arm B. true or false. magent does not examine joints.","required":true,"example":"true"},{"in":"query","name":"enthesitis","type":"boolean","description":"Current enthesitis as assigned by the caller (Rudwaleit 2011 set 2D entry). Table 5 additional feature is past or present spontaneous pain or tenderness at an enthesis; the same caller flag counts toward arm B. true or false. magent does not examine entheses.","required":true,"example":"false"},{"in":"query","name":"dactylitis","type":"boolean","description":"Current dactylitis as assigned by the caller (Rudwaleit 2011 set 2D entry). Table 5 additional feature is past or present dactylitis diagnosed by a physician; the same caller flag counts toward arm B. true or false. magent does not examine digits.","required":true,"example":"false"},{"in":"query","name":"psoriasis","type":"boolean","description":"Past or present psoriasis diagnosed by a physician, as assigned by the caller (Rudwaleit 2011 arm A). true or false. magent does not examine skin.","required":true,"example":"true"},{"in":"query","name":"ibd","type":"boolean","description":"Past or present Crohn's disease or ulcerative colitis diagnosed by a physician, as assigned by the caller (Rudwaleit 2011 arm A). true or false. magent does not diagnose IBD.","required":true,"example":"false"},{"in":"query","name":"preceding_infection","type":"boolean","description":"Urethritis/cervicitis or diarrhoea within 1 month before arthritis, enthesitis, or dactylitis, as assigned by the caller (Rudwaleit 2011 arm A). true or false. magent does not take a history.","required":true,"example":"false"},{"in":"query","name":"hla_b27","type":"boolean","description":"HLA-B27 positive as assigned by the caller (Rudwaleit 2011 arm A). true or false. magent does not assay HLA-B27.","required":true,"example":"false"},{"in":"query","name":"uveitis","type":"boolean","description":"Past or present uveitis confirmed by an ophthalmologist, as assigned by the caller (Rudwaleit 2011 arm A). true or false. magent does not examine the eye.","required":true,"example":"false"},{"in":"query","name":"sacroiliitis_on_imaging","type":"boolean","description":"Sacroiliitis on imaging as assigned by the caller (Rudwaleit 2011 arm A): definite radiographic sacroiliitis (bilateral grade 2–4 or unilateral grade 3–4) or active inflammation on MRI highly suggestive of SpA-associated sacroiliitis. true or false. magent does not read films.","required":true,"example":"false"},{"in":"query","name":"ibp_past","type":"boolean","description":"Inflammatory back pain in the past according to experts, as assigned by the caller (Rudwaleit 2011 arm B). true or false. magent does not take a history.","required":true,"example":"false"},{"in":"query","name":"family_history_spa","type":"boolean","description":"Family history of SpA as assigned by the caller (Rudwaleit 2011 arm B): first-degree or second-degree relatives with ankylosing spondylitis, psoriasis, acute uveitis, reactive arthritis, or IBD. true or false. magent does not take a pedigree.","required":true,"example":"false"}],"errors":[{"code":"invalid_asas_peripheral","message":"arthritis, enthesitis, or dactylitis must be true (Rudwaleit 2011 ASAS peripheral SpA set 2D entry: current peripheral arthritis, enthesitis, or dactylitis). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/asas-peripheral-spa","citation":{"authors":"Rudwaleit M, van der Heijde D, Landewé R, Akkoc N, Brandt J, Chou CT, Dougados M, Huang F, Gu J, Kirazli Y, Van den Bosch F, Olivieri I, Roussou E, Scarpato S, Sørensen IJ, Valle-Oñate R, Weber U, Wei J, Sieper J","doi":"10.1136/ard.2010.133645","id":"rudwaleit-2011","pmid":"21109520","source":"Ann Rheum Dis. 2011;70(1):25-31","title":"The Assessment of SpondyloArthritis international Society classification criteria for peripheral spondyloarthritis and for spondyloarthritis in general","url":"https://doi.org/10.1136/ard.2010.133645"},"formula_expression":"ASAS 2011 peripheral SpA classification (Rudwaleit set 2D / fig 1 + table 5): required arthritis or enthesitis or dactylitis (current). arm_a iff ≥1 of psoriasis, ibd, preceding_infection, hla_b27, uveitis, sacroiliitis_on_imaging. arm_b iff ≥2 of arthritis, enthesitis, dactylitis, ibp_past, family_history_spa (same caller flags as entry for arthritis/enthesitis/dactylitis). classified iff entry and (arm_a or arm_b). Not a diagnosis. Not ASAS 2009 axial. Not ESSG/Amor","purpose":"Apply the 2011 ASAS classification criteria for peripheral spondyloarthritis (Rudwaleit set 2D / figure 1): require current arthritis, enthesitis, or dactylitis, then return whether arm A (≥1 of 6 SpA features) or arm B (≥2 of 5 additional features) classifies peripheral SpA. Not a diagnosis.","markdown_url":"https://magentlab.com/docs/asas-peripheral-spa.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"asas_peripheral_spa"},{"name":"formula_expression","type":"string","description":"Rudwaleit 2011 ASAS peripheral SpA classification expression (set 2D / fig 1)"},{"name":"classified","type":"boolean","description":"true iff arm_a or arm_b after required current arthritis, enthesitis, or dactylitis. Classification criteria for research, not a diagnosis of peripheral SpA. Not ASAS 2009 axial. Not ESSG/Amor."},{"name":"arm_a","type":"boolean","description":"true iff ≥1 of psoriasis, ibd, preceding_infection, hla_b27, uveitis, sacroiliitis_on_imaging (Rudwaleit 2011 fig 1)"},{"name":"arm_b","type":"boolean","description":"true iff ≥2 of arthritis, enthesitis, dactylitis, ibp_past, family_history_spa (Rudwaleit 2011 fig 1). Arthritis, enthesitis, and dactylitis use the same caller flags as entry."},{"name":"arm_a_count","type":"integer","description":"Count of the 6 arm A SpA features that are true (0–6)."},{"name":"arm_b_count","type":"integer","description":"Count of the 5 arm B additional features that are true (0–5), including arthritis, enthesitis, and dactylitis when true."},{"name":"citation","type":"object","description":"Rudwaleit 2011 Ann Rheum Dis citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"arthritis":"true","dactylitis":"false","enthesitis":"false","family_history_spa":"false","hla_b27":"false","ibd":"false","ibp_past":"false","preceding_infection":"false","psoriasis":"true","sacroiliitis_on_imaging":"false","uveitis":"false"},{"arthritis":"true","dactylitis":"false","enthesitis":"false","family_history_spa":"false","hla_b27":"false","ibd":"false","ibp_past":"false","preceding_infection":"false","psoriasis":"true","sacroiliitis_on_imaging":"false","uveitis":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/asas-peripheral-spa","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/asas-peripheral-spa?arthritis=true&enthesitis=false&dactylitis=false&psoriasis=true&ibd=false&preceding_infection=false&hla_b27=false&uveitis=false&sacroiliitis_on_imaging=false&ibp_past=false&family_history_spa=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/asas-peripheral-spa","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/slicc-sle","description":"SLICC 2012 SLE classification (Petri Table 3). classified iff biopsy-proven lupus nephritis plus ANA or anti-dsDNA, or at least four criteria including at least one clinical and one immunologic. 11 clinical and 6 immunologic caller flags. Direct Coombs counts only in the absence of hemolytic anemia. Criteria need not be concurrent. Not a diagnosis. Not 1997 ACR. Not 2019 EULAR/ACR. magent does not examine skin, assay serologies, or read a biopsy.","parameters":[{"in":"query","name":"acute_cutaneous_lupus","type":"boolean","description":"Acute cutaneous lupus as assigned by the caller (Petri 2012 Table 3): lupus malar rash (do not count if malar discoid), bullous lupus, toxic epidermal necrolysis variant of SLE, maculopapular lupus rash, photosensitive lupus rash in the absence of dermatomyositis, or subacute cutaneous lupus. true or false. magent does not examine skin.","required":true,"example":"true"},{"in":"query","name":"chronic_cutaneous_lupus","type":"boolean","description":"Chronic cutaneous lupus as assigned by the caller (Petri 2012 Table 3): classic discoid (localized or generalized), hypertrophic (verrucous) lupus, lupus panniculitis (profundus), mucosal lupus, lupus erythematosus tumidus, chilblains lupus, or discoid lupus/lichen planus overlap. true or false. magent does not examine skin.","required":true,"example":"false"},{"in":"query","name":"oral_or_nasal_ulcers","type":"boolean","description":"Oral ulcers (palate, buccal, tongue) or nasal ulcers, in the absence of other causes, as assigned by the caller (Petri 2012 Table 3). true or false. magent does not examine mucosa.","required":true,"example":"true"},{"in":"query","name":"nonscarring_alopecia","type":"boolean","description":"Nonscarring alopecia: diffuse thinning or hair fragility with visible broken hairs, in the absence of other causes, as assigned by the caller (Petri 2012 Table 3). true or false. magent does not examine the scalp.","required":true,"example":"false"},{"in":"query","name":"synovitis","type":"boolean","description":"Synovitis involving 2 or more joints, characterized by swelling or effusion, or tenderness in 2 or more joints and at least 30 minutes of morning stiffness, as assigned by the caller (Petri 2012 Table 3). true or false. magent does not examine joints.","required":true,"example":"true"},{"in":"query","name":"serositis","type":"boolean","description":"Serositis as assigned by the caller (Petri 2012 Table 3): typical pleurisy >1 day or pleural effusion or pleural rub, or typical pericardial pain >1 day or pericardial effusion or pericardial rub or pericarditis by electrocardiography, in the absence of other causes. true or false. magent does not examine the chest.","required":true,"example":"false"},{"in":"query","name":"renal","type":"boolean","description":"Renal clinical criterion as assigned by the caller (Petri 2012 Table 3): urine protein-to-creatinine ratio (or 24-hour urine protein) representing 500 mg protein/24 hours, or red blood cell casts. Distinct from biopsy_lupus_nephritis. true or false. magent does not assay urine.","required":true,"example":"false"},{"in":"query","name":"neurologic","type":"boolean","description":"Neurologic criterion as assigned by the caller (Petri 2012 Table 3): seizures, psychosis, mononeuritis multiplex, myelitis, peripheral or cranial neuropathy, or acute confusional state, in the absence of other known causes. true or false. magent does not examine the nervous system.","required":true,"example":"false"},{"in":"query","name":"hemolytic_anemia","type":"boolean","description":"Hemolytic anemia as assigned by the caller (Petri 2012 Table 3). When true, direct_coombs does not count toward immunologic_count. true or false. magent does not assay hemolysis.","required":true,"example":"false"},{"in":"query","name":"leukopenia_or_lymphopenia","type":"boolean","description":"Leukopenia (<4,000/mm³ at least once) in the absence of other known causes, or lymphopenia (<1,000/mm³ at least once) in the absence of other known causes, as assigned by the caller (Petri 2012 Table 3). true or false. magent does not assay blood counts.","required":true,"example":"false"},{"in":"query","name":"thrombocytopenia","type":"boolean","description":"Thrombocytopenia (<100,000/mm³) at least once in the absence of other known causes, as assigned by the caller (Petri 2012 Table 3). true or false. magent does not assay platelets.","required":true,"example":"false"},{"in":"query","name":"ana","type":"boolean","description":"ANA above laboratory reference range as assigned by the caller (Petri 2012 Table 3). With biopsy_lupus_nephritis (or anti_dsdna), fulfills the nephritis shortcut. true or false. magent does not assay ANA.","required":true,"example":"true"},{"in":"query","name":"anti_dsdna","type":"boolean","description":"Anti-dsDNA above laboratory reference range (or >2-fold the reference range if tested by ELISA), as assigned by the caller (Petri 2012 Table 3). true or false. magent does not assay anti-dsDNA.","required":true,"example":"true"},{"in":"query","name":"anti_sm","type":"boolean","description":"Antibody to Sm nuclear antigen as assigned by the caller (Petri 2012 Table 3). true or false. magent does not assay anti-Sm.","required":true,"example":"false"},{"in":"query","name":"antiphospholipid","type":"boolean","description":"Antiphospholipid antibody positivity as assigned by the caller (Petri 2012 Table 3): lupus anticoagulant, false-positive rapid plasma reagin, medium- or high-titer anticardiolipin (IgA, IgG, or IgM), or anti-β2-glycoprotein I (IgA, IgG, or IgM). true or false. magent does not assay antiphospholipid antibodies.","required":true,"example":"false"},{"in":"query","name":"low_complement","type":"boolean","description":"Low C3, low C4, or low CH50 as assigned by the caller (Petri 2012 Table 3). true or false. magent does not assay complement.","required":true,"example":"false"},{"in":"query","name":"direct_coombs","type":"boolean","description":"Direct Coombs’ test as assigned by the caller (Petri 2012 Table 3). Counts toward immunologic_count only when hemolytic_anemia is false. true or false. magent does not run a Coombs test.","required":true,"example":"false"},{"in":"query","name":"biopsy_lupus_nephritis","type":"boolean","description":"Biopsy-proven nephritis compatible with SLE as assigned by the caller (Petri 2012 classification rule). With ANA or anti-dsDNA, classifies without four criteria. Distinct from the renal clinical item. true or false. magent does not read a biopsy.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/slicc-sle","citation":{"authors":"Petri M, Orbai AM, Alarcón GS, Gordon C, Merrill JT, Fortin PR, Bruce IN, Isenberg D, Wallace DJ, Nived O, Sturfelt G, Ramsey-Goldman R, Bae SC, Hanly JG, Sánchez-Guerrero J, Clarke A, Aranow C, Manzi S, Urowitz M, Gladman D, Kalunian K, Costner M, Werth VP, Zoma A, Bernatsky S, Ruiz-Irastorza G, Khamashta MA, Jacobsen S, Buyon JP, Maddison P, Dooley MA, van Vollenhoven RF, Ginzler E, Stoll T, Peschken C, Jorizzo JL, Callen JP, Lim SS, Fessler BJ, Inanc M, Kamen DL, Rahman A, Steinsson K, Franks AG, Sigler L, Hameed S, Fang H, Pham N, Brey R, Weisman MH, McGwin G, Magder LS","doi":"10.1002/art.34473","id":"petri-2012","pmid":"22553077","source":"Arthritis Rheum. 2012;64(8):2677-2686","title":"Derivation and validation of the Systemic Lupus International Collaborating Clinics classification criteria for systemic lupus erythematosus","url":"https://doi.org/10.1002/art.34473"},"formula_expression":"SLICC 2012 SLE classification (Petri Table 3 + classification rule): 11 clinical flags (acute_cutaneous_lupus, chronic_cutaneous_lupus, oral_or_nasal_ulcers, nonscarring_alopecia, synovitis, serositis, renal, neurologic, hemolytic_anemia, leukopenia_or_lymphopenia, thrombocytopenia) and 6 immunologic flags (ana, anti_dsdna, anti_sm, antiphospholipid, low_complement, direct_coombs). clinical_count = count of clinical flags that are true. immunologic_count = count of immunologic flags that are true, except direct_coombs counts only when hemolytic_anemia is false. nephritis_shortcut iff biopsy_lupus_nephritis and (ana or anti_dsdna). classified iff nephritis_shortcut or (clinical_count ≥1 and immunologic_count ≥1 and clinical_count + immunologic_count ≥4). Criteria need not be concurrent. Not a diagnosis. Not 1997 ACR. Not 2019 EULAR/ACR","purpose":"Apply the 2012 SLICC classification criteria for systemic lupus erythematosus (Petri Table 3): return clinical_count, immunologic_count, the biopsy-nephritis shortcut, and whether the published rule classifies SLE. Not a diagnosis.","markdown_url":"https://magentlab.com/docs/slicc-sle.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"slicc_sle"},{"name":"formula_expression","type":"string","description":"Petri 2012 SLICC SLE classification expression (Table 3 + classification rule)"},{"name":"classified","type":"boolean","description":"true iff nephritis_shortcut or (clinical_count ≥1 and immunologic_count ≥1 and clinical_count + immunologic_count ≥4). Classification criteria for research, not a diagnosis of SLE. Not 1997 ACR. Not 2019 EULAR/ACR."},{"name":"clinical_count","type":"integer","description":"Count of the 11 Petri 2012 clinical criteria that are true."},{"name":"immunologic_count","type":"integer","description":"Count of the 6 Petri 2012 immunologic criteria that are true. direct_coombs is included only when hemolytic_anemia is false."},{"name":"nephritis_shortcut","type":"boolean","description":"true iff biopsy_lupus_nephritis and (ana or anti_dsdna) (Petri 2012 classification rule)"},{"name":"citation","type":"object","description":"Petri 2012 Arthritis Rheum citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"acute_cutaneous_lupus":"true","ana":"true","anti_dsdna":"true","anti_sm":"false","antiphospholipid":"false","biopsy_lupus_nephritis":"false","chronic_cutaneous_lupus":"false","direct_coombs":"false","hemolytic_anemia":"false","leukopenia_or_lymphopenia":"false","low_complement":"false","neurologic":"false","nonscarring_alopecia":"false","oral_or_nasal_ulcers":"true","renal":"false","serositis":"false","synovitis":"true","thrombocytopenia":"false"},{"acute_cutaneous_lupus":"true","ana":"true","anti_dsdna":"true","anti_sm":"false","antiphospholipid":"false","biopsy_lupus_nephritis":"false","chronic_cutaneous_lupus":"false","direct_coombs":"false","hemolytic_anemia":"false","leukopenia_or_lymphopenia":"false","low_complement":"false","neurologic":"false","nonscarring_alopecia":"false","oral_or_nasal_ulcers":"true","renal":"false","serositis":"false","synovitis":"true","thrombocytopenia":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/slicc-sle","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/slicc-sle?acute_cutaneous_lupus=true&chronic_cutaneous_lupus=false&oral_or_nasal_ulcers=true&nonscarring_alopecia=false&synovitis=true&serositis=false&renal=false&neurologic=false&hemolytic_anemia=false&leukopenia_or_lymphopenia=false&thrombocytopenia=false&ana=true&anti_dsdna=true&anti_sm=false&antiphospholipid=false&low_complement=false&direct_coombs=false&biopsy_lupus_nephritis=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/slicc-sle","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/sledai-2k","description":"Gladman 2002 SLEDAI-2K: weighted sum of 24 caller-assigned descriptors present in the last 10 days (max 105). magent does not examine the patient. Proteinuria scores if >0.5 g/24 h (not original SLEDAI >3.5 g/24 h only). Rash, alopecia, and mucosal ulcers score if new or persistent (not new only). Not a diagnosis, not SLICC damage, not SELENA-SLEDAI flare rules, and not a medical device.","parameters":[{"in":"query","name":"seizure","type":"boolean","description":"Seizure in the last 10 days as assigned by the caller (Gladman 2002 SLEDAI-2K). Recent onset. Exclude metabolic, infectious, or drug cause. true scores 8. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"psychosis","type":"boolean","description":"Psychosis in the last 10 days as assigned by the caller (Gladman 2002 SLEDAI-2K): altered ability to function in normal activity due to severe disturbance in the perception of reality. Exclude uremia and drug causes. true scores 8. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"organic_brain_syndrome","type":"boolean","description":"Organic brain syndrome in the last 10 days as assigned by the caller (Gladman 2002 SLEDAI-2K): altered mental function with impaired orientation, memory, or other intellectual function, rapid onset and fluctuating features. Exclude metabolic, infectious, or drug causes. true scores 8. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"visual_disturbance","type":"boolean","description":"Visual disturbance in the last 10 days as assigned by the caller (Gladman 2002 SLEDAI-2K): retinal changes of SLE (cytoid bodies, retinal hemorrhages, serous exudate or hemorrhages in the choroid, or optic neuritis). Exclude hypertension, infection, or drug causes. true scores 8. magent does not examine the fundus.","required":true,"example":"false"},{"in":"query","name":"cranial_nerve_disorder","type":"boolean","description":"Cranial nerve disorder in the last 10 days as assigned by the caller (Gladman 2002 SLEDAI-2K): new onset of sensory or motor neuropathy involving cranial nerves. true scores 8. magent does not examine cranial nerves.","required":true,"example":"false"},{"in":"query","name":"lupus_headache","type":"boolean","description":"Lupus headache in the last 10 days as assigned by the caller (Gladman 2002 SLEDAI-2K): severe persistent headache; may be migrainous, but must be nonresponsive to narcotic analgesia. true scores 8. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"cva","type":"boolean","description":"Cerebrovascular accident in the last 10 days as assigned by the caller (Gladman 2002 SLEDAI-2K): new onset of CVA(s). Exclude arteriosclerosis. true scores 8. magent does not read imaging.","required":true,"example":"false"},{"in":"query","name":"vasculitis","type":"boolean","description":"Vasculitis in the last 10 days as assigned by the caller (Gladman 2002 SLEDAI-2K): ulceration, gangrene, tender finger nodules, periungual infarction, splinter hemorrhages, or biopsy or angiogram proof of vasculitis. true scores 8. magent does not examine skin or read a biopsy.","required":true,"example":"false"},{"in":"query","name":"arthritis","type":"boolean","description":"Arthritis in the last 10 days as assigned by the caller (Gladman 2002 SLEDAI-2K): more than 2 joints with pain and signs of inflammation (tenderness, swelling, or effusion). true scores 4. magent does not examine joints.","required":true,"example":"true"},{"in":"query","name":"myositis","type":"boolean","description":"Myositis in the last 10 days as assigned by the caller (Gladman 2002 SLEDAI-2K): proximal muscle aching/weakness with elevated creatine phosphokinase/aldolase, EMG changes, or a biopsy showing myositis. true scores 4. magent does not assay muscle enzymes.","required":true,"example":"false"},{"in":"query","name":"urinary_casts","type":"boolean","description":"Urinary casts in the last 10 days as assigned by the caller (Gladman 2002 SLEDAI-2K): heme-granular or red blood cell casts. true scores 4. magent does not assay urine.","required":true,"example":"false"},{"in":"query","name":"hematuria","type":"boolean","description":"Hematuria in the last 10 days as assigned by the caller (Gladman 2002 SLEDAI-2K): >5 red blood cells/high power field. Exclude stone, infection, or other cause. true scores 4. magent does not assay urine.","required":true,"example":"false"},{"in":"query","name":"proteinuria","type":"boolean","description":"Proteinuria in the last 10 days as assigned by the caller (Gladman 2002 SLEDAI-2K): >0.5 g/24 h (not original SLEDAI >3.5 g/24 h only). true scores 4. magent does not assay urine.","required":true,"example":"false"},{"in":"query","name":"pyuria","type":"boolean","description":"Pyuria in the last 10 days as assigned by the caller (Gladman 2002 SLEDAI-2K): >5 white blood cells/high power field. Exclude infection. true scores 4. magent does not assay urine.","required":true,"example":"false"},{"in":"query","name":"rash","type":"boolean","description":"Rash in the last 10 days as assigned by the caller (Gladman 2002 SLEDAI-2K): inflammatory type rash. Scores if new or persistent (not original SLEDAI new only). true scores 2. magent does not examine skin.","required":true,"example":"true"},{"in":"query","name":"alopecia","type":"boolean","description":"Alopecia in the last 10 days as assigned by the caller (Gladman 2002 SLEDAI-2K): abnormal, patchy or diffuse loss of hair. Scores if new or persistent (not original SLEDAI new only). true scores 2. magent does not examine the scalp.","required":true,"example":"false"},{"in":"query","name":"mucosal_ulcers","type":"boolean","description":"Mucosal ulcers in the last 10 days as assigned by the caller (Gladman 2002 SLEDAI-2K): oral or nasal ulcerations. Scores if new or persistent (not original SLEDAI new only). true scores 2. magent does not examine mucosa.","required":true,"example":"false"},{"in":"query","name":"pleurisy","type":"boolean","description":"Pleurisy in the last 10 days as assigned by the caller (Gladman 2002 SLEDAI-2K): pleuritic chest pain with pleural rub or effusion, or pleural thickening. true scores 2. magent does not examine the chest.","required":true,"example":"false"},{"in":"query","name":"pericarditis","type":"boolean","description":"Pericarditis in the last 10 days as assigned by the caller (Gladman 2002 SLEDAI-2K): pericardial pain with at least one of rub, effusion, or electrocardiogram or echocardiogram confirmation. true scores 2. magent does not examine the heart.","required":true,"example":"false"},{"in":"query","name":"low_complement","type":"boolean","description":"Low complement in the last 10 days as assigned by the caller (Gladman 2002 SLEDAI-2K): CH50, C3, or C4 below the lower limit of normal for the testing laboratory. true scores 2. magent does not assay complement.","required":true,"example":"false"},{"in":"query","name":"increased_dna_binding","type":"boolean","description":"Increased DNA binding in the last 10 days as assigned by the caller (Gladman 2002 SLEDAI-2K): DNA binding by Farr assay above the normal range for the testing laboratory. true scores 2. magent does not assay anti-dsDNA.","required":true,"example":"false"},{"in":"query","name":"fever","type":"boolean","description":"Fever in the last 10 days as assigned by the caller (Gladman 2002 SLEDAI-2K): >38°C. Exclude infectious cause. true scores 1. magent does not measure temperature.","required":true,"example":"false"},{"in":"query","name":"thrombocytopenia","type":"boolean","description":"Thrombocytopenia in the last 10 days as assigned by the caller (Gladman 2002 SLEDAI-2K): <100,000 platelets/mm³. Exclude drug causes. true scores 1. magent does not assay platelets.","required":true,"example":"false"},{"in":"query","name":"leukopenia","type":"boolean","description":"Leukopenia in the last 10 days as assigned by the caller (Gladman 2002 SLEDAI-2K): <3,000 white blood cells/mm³. Exclude drug causes. true scores 1. magent does not assay blood counts.","required":true,"example":"false"}],"errors":[{"code":"invalid_sledai","message":"SLEDAI-2K needs the twenty-four Gladman 2002 descriptors as true or false (last 10 days). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/sledai-2k","citation":{"authors":"Gladman DD, Ibañez D, Urowitz MB","id":"gladman-2002","pmid":"11838846","source":"J Rheumatol. 2002;29(2):288-291","title":"Systemic lupus erythematosus disease activity index 2000","url":"https://pubmed.ncbi.nlm.nih.gov/11838846"},"formula_expression":"SLEDAI-2K = 8*(seizure + psychosis + organic_brain_syndrome + visual_disturbance + cranial_nerve_disorder + lupus_headache + cva + vasculitis) + 4*(arthritis + myositis + urinary_casts + hematuria + proteinuria + pyuria) + 2*(rash + alopecia + mucosal_ulcers + pleurisy + pericarditis + low_complement + increased_dna_binding) + (fever + thrombocytopenia + leukopenia); Gladman 2002; each descriptor present in the last 10 days as assigned by the caller; proteinuria scores if >0.5 g/24 h (not original SLEDAI >3.5 g/24 h only); rash, alopecia, and mucosal ulcers score if new or persistent (not new only); max 105; not a diagnosis","purpose":"Sum Gladman 2002 SLEDAI-2K weights from 24 caller-assigned descriptors present in the last 10 days and return the integer score (max 105). Not a diagnosis.","markdown_url":"https://magentlab.com/docs/sledai-2k.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"sledai_2k"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"SLEDAI-2K weighted sum 0-105 (Gladman 2002). Not a diagnosis."},{"name":"max_score","type":"integer","description":"105"},{"name":"components","type":"array","description":"Per-descriptor points"},{"name":"citation","type":"object","description":"Gladman et al. J Rheumatol 2002 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"alopecia":"false","arthritis":"true","cranial_nerve_disorder":"false","cva":"false","fever":"false","hematuria":"false","increased_dna_binding":"false","leukopenia":"false","low_complement":"false","lupus_headache":"false","mucosal_ulcers":"false","myositis":"false","organic_brain_syndrome":"false","pericarditis":"false","pleurisy":"false","proteinuria":"false","psychosis":"false","pyuria":"false","rash":"true","seizure":"false","thrombocytopenia":"false","urinary_casts":"false","vasculitis":"false","visual_disturbance":"false"},{"alopecia":"false","arthritis":"true","cranial_nerve_disorder":"false","cva":"false","fever":"false","hematuria":"false","increased_dna_binding":"false","leukopenia":"false","low_complement":"false","lupus_headache":"false","mucosal_ulcers":"false","myositis":"false","organic_brain_syndrome":"false","pericarditis":"false","pleurisy":"false","proteinuria":"false","psychosis":"false","pyuria":"false","rash":"true","seizure":"false","thrombocytopenia":"false","urinary_casts":"false","vasculitis":"false","visual_disturbance":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/sledai-2k","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/sledai-2k?seizure=false&psychosis=false&organic_brain_syndrome=false&visual_disturbance=false&cranial_nerve_disorder=false&lupus_headache=false&cva=false&vasculitis=false&arthritis=true&myositis=false&urinary_casts=false&hematuria=false&proteinuria=false&pyuria=false&rash=true&alopecia=false&mucosal_ulcers=false&pleurisy=false&pericarditis=false&low_complement=false&increased_dna_binding=false&fever=false&thrombocytopenia=false&leukopenia=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/sledai-2k","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/itas2010","description":"Misra 2013 ITAS2010: weighted sum of 44 caller-assigned Takayasu clinical-activity items that are new or worsening within 3 months and ascribed to active vasculitis. Seven items score 2 (diastolic hypertension, stroke, bruits, pulse inequality, pulse loss, claudication, carotidodynia); the other 37 score 1. Max 51. active_disease iff score ≥ 2. magent does not examine the patient. Not ITAS-A, not a diagnosis, and not a medical device.","parameters":[{"in":"query","name":"malaise_weight_loss","type":"boolean","description":"Misra 2013 ITAS2010: malaise or weight loss >2 kg, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"myalgia_arthralgia_arthritis","type":"boolean","description":"Misra 2013 ITAS2010: myalgia, arthralgia, or arthritis, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"headache","type":"boolean","description":"Misra 2013 ITAS2010: headache, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"severe_abdominal_pain","type":"boolean","description":"Misra 2013 ITAS2010: severe abdominal pain, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"abortions","type":"boolean","description":"Misra 2013 ITAS2010: abortion (genitourinary item), new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"diastolic_hypertension","type":"boolean","description":"Misra 2013 ITAS2010: diastolic blood pressure >90 mmHg, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. Weighted item (scores 2). true scores 2. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"systolic_hypertension","type":"boolean","description":"Misra 2013 ITAS2010: systolic blood pressure >140 mmHg, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"stroke","type":"boolean","description":"Misra 2013 ITAS2010: stroke, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. Weighted item (scores 2). true scores 2. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"seizures","type":"boolean","description":"Misra 2013 ITAS2010: seizures (not hypertensive), new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"syncope","type":"boolean","description":"Misra 2013 ITAS2010: syncope, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"vertigo_dizziness","type":"boolean","description":"Misra 2013 ITAS2010: vertigo or dizziness, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"bruits","type":"boolean","description":"Misra 2013 ITAS2010: bruits (weighted parent item), new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. Weighted item (scores 2). true scores 2. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"bruit_right_carotid","type":"boolean","description":"Misra 2013 ITAS2010: right carotid bruit, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"bruit_left_carotid","type":"boolean","description":"Misra 2013 ITAS2010: left carotid bruit, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"bruit_right_subclavian","type":"boolean","description":"Misra 2013 ITAS2010: right subclavian bruit, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"bruit_left_subclavian","type":"boolean","description":"Misra 2013 ITAS2010: left subclavian bruit, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"bruit_right_renal","type":"boolean","description":"Misra 2013 ITAS2010: right renal bruit, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"bruit_left_renal","type":"boolean","description":"Misra 2013 ITAS2010: left renal bruit, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"pulse_inequality","type":"boolean","description":"Misra 2013 ITAS2010: pulse inequality, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. Weighted item (scores 2). true scores 2. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"bp_inequality","type":"boolean","description":"Misra 2013 ITAS2010: blood-pressure inequality, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"pulse_loss","type":"boolean","description":"Misra 2013 ITAS2010: new loss of pulses (weighted parent item), new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. Weighted item (scores 2). true scores 2. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"pulse_loss_right_carotid","type":"boolean","description":"Misra 2013 ITAS2010: new loss of the right carotid pulse, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"pulse_loss_left_carotid","type":"boolean","description":"Misra 2013 ITAS2010: new loss of the left carotid pulse, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"pulse_loss_right_subclavian","type":"boolean","description":"Misra 2013 ITAS2010: new loss of the right subclavian pulse, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"pulse_loss_left_subclavian","type":"boolean","description":"Misra 2013 ITAS2010: new loss of the left subclavian pulse, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"pulse_loss_right_brachial","type":"boolean","description":"Misra 2013 ITAS2010: new loss of the right brachial pulse, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"pulse_loss_left_brachial","type":"boolean","description":"Misra 2013 ITAS2010: new loss of the left brachial pulse, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"pulse_loss_right_radial","type":"boolean","description":"Misra 2013 ITAS2010: new loss of the right radial pulse, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"pulse_loss_left_radial","type":"boolean","description":"Misra 2013 ITAS2010: new loss of the left radial pulse, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"pulse_loss_right_femoral","type":"boolean","description":"Misra 2013 ITAS2010: new loss of the right femoral pulse, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"pulse_loss_left_femoral","type":"boolean","description":"Misra 2013 ITAS2010: new loss of the left femoral pulse, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"pulse_loss_right_popliteal","type":"boolean","description":"Misra 2013 ITAS2010: new loss of the right popliteal pulse, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"pulse_loss_left_popliteal","type":"boolean","description":"Misra 2013 ITAS2010: new loss of the left popliteal pulse, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"pulse_loss_right_posterior_tibial","type":"boolean","description":"Misra 2013 ITAS2010: new loss of the right posterior tibial pulse, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"pulse_loss_left_posterior_tibial","type":"boolean","description":"Misra 2013 ITAS2010: new loss of the left posterior tibial pulse, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"pulse_loss_right_dorsalis_pedis","type":"boolean","description":"Misra 2013 ITAS2010: new loss of the right dorsalis pedis pulse, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"pulse_loss_left_dorsalis_pedis","type":"boolean","description":"Misra 2013 ITAS2010: new loss of the left dorsalis pedis pulse, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"claudication","type":"boolean","description":"Misra 2013 ITAS2010: claudication (weighted parent item), new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. Weighted item (scores 2). true scores 2. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"claudication_arm","type":"boolean","description":"Misra 2013 ITAS2010: arm claudication, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"claudication_leg","type":"boolean","description":"Misra 2013 ITAS2010: leg claudication, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"carotidodynia","type":"boolean","description":"Misra 2013 ITAS2010: carotidodynia, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. Weighted item (scores 2). true scores 2. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"aortic_incompetence","type":"boolean","description":"Misra 2013 ITAS2010: aortic incompetence, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"myocardial_infarct_angina","type":"boolean","description":"Misra 2013 ITAS2010: myocardial infarction or angina, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"cardiomyopathy_cardiac_failure","type":"boolean","description":"Misra 2013 ITAS2010: cardiomyopathy or cardiac failure, new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller. true scores 1. magent does not examine the patient.","required":true,"example":"false"}],"errors":[{"code":"invalid_itas2010","message":"ITAS2010 needs Misra 2013 Takayasu clinical-activity items as true or false or the paper's tokens. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/itas2010","citation":{"authors":"Misra R, Danda D, Rajappa SM, et al; Indian Rheumatology Vasculitis (IRAVAS) group","doi":"10.1093/rheumatology/ket128","id":"misra-2013","pmid":"23594468","source":"Rheumatology (Oxford). 2013;52(10):1795-1801","title":"Development and initial validation of the Indian Takayasu Clinical Activity Score (ITAS2010)","url":"https://doi.org/10.1093/rheumatology/ket128"},"formula_expression":"ITAS2010 = 2*(diastolic_hypertension + stroke + bruits + pulse_inequality + pulse_loss + claudication + carotidodynia) + malaise_weight_loss + myalgia_arthralgia_arthritis + headache + severe_abdominal_pain + abortions + systolic_hypertension + seizures + syncope + vertigo_dizziness + bruit_right_carotid + bruit_left_carotid + bruit_right_subclavian + bruit_left_subclavian + bruit_right_renal + bruit_left_renal + bp_inequality + pulse_loss_right_carotid + pulse_loss_left_carotid + pulse_loss_right_subclavian + pulse_loss_left_subclavian + pulse_loss_right_brachial + pulse_loss_left_brachial + pulse_loss_right_radial + pulse_loss_left_radial + pulse_loss_right_femoral + pulse_loss_left_femoral + pulse_loss_right_popliteal + pulse_loss_left_popliteal + pulse_loss_right_posterior_tibial + pulse_loss_left_posterior_tibial + pulse_loss_right_dorsalis_pedis + pulse_loss_left_dorsalis_pedis + claudication_arm + claudication_leg + aortic_incompetence + myocardial_infarct_angina + cardiomyopathy_cardiac_failure; Misra 2013; each item true only if new or worsening within 3 months and ascribed to active vasculitis as assigned by the caller; magent does not examine the patient; active_disease iff score ≥ 2; max 51; not ITAS-A; not a diagnosis","purpose":"Sum Misra 2013 ITAS2010 weights from 44 caller-assigned clinical items (new or worsening within 3 months and ascribed to active vasculitis) and return the integer score (max 51) plus active_disease (true iff score ≥ 2). Not a diagnosis.","markdown_url":"https://magentlab.com/docs/itas2010.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"itas2010"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"ITAS2010 weighted sum 0-51 (Misra 2013). Not a diagnosis."},{"name":"max_score","type":"integer","description":"51"},{"name":"active_disease","type":"boolean","description":"true iff score ≥ 2 (Misra 2013 published ITAS2010 active-disease cut). Not a diagnosis. No extra mild/moderate/severe bands. Not ITAS-A."},{"name":"components","type":"array","description":"Per-item points"},{"name":"citation","type":"object","description":"Misra et al. Rheumatology (Oxford) 2013 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"bruit_right_renal":"false","malaise_weight_loss":"false","pulse_loss_left_carotid":"false","pulse_loss_right_radial":"false","stroke":"false","claudication_leg":"false","pulse_loss_left_subclavian":"false","pulse_loss_left_posterior_tibial":"false","claudication":"false","diastolic_hypertension":"false","bruit_right_carotid":"false","pulse_loss_right_posterior_tibial":"false","bruit_left_subclavian":"false","pulse_loss_left_brachial":"false","pulse_loss_left_femoral":"false","cardiomyopathy_cardiac_failure":"false","pulse_loss_right_dorsalis_pedis":"false","carotidodynia":"false","pulse_loss_right_femoral":"false","pulse_loss_left_dorsalis_pedis":"false","seizures":"false","pulse_loss_right_popliteal":"false","abortions":"false","severe_abdominal_pain":"false","pulse_inequality":"false","pulse_loss_left_radial":"false","bruits":"false","bruit_left_carotid":"false","pulse_loss_right_subclavian":"false","pulse_loss":"false","aortic_incompetence":"false","claudication_arm":"false","myocardial_infarct_angina":"false","systolic_hypertension":"false","pulse_loss_right_carotid":"false","bp_inequality":"false","vertigo_dizziness":"false","pulse_loss_right_brachial":"false","bruit_left_renal":"false","myalgia_arthralgia_arthritis":"false","syncope":"false","headache":"false","bruit_right_subclavian":"false","pulse_loss_left_popliteal":"false"},{"bruit_right_renal":"false","malaise_weight_loss":"false","pulse_loss_left_carotid":"false","pulse_loss_right_radial":"false","stroke":"false","claudication_leg":"false","pulse_loss_left_subclavian":"false","pulse_loss_left_posterior_tibial":"false","claudication":"false","diastolic_hypertension":"false","bruit_right_carotid":"false","pulse_loss_right_posterior_tibial":"false","bruit_left_subclavian":"false","pulse_loss_left_brachial":"false","pulse_loss_left_femoral":"false","cardiomyopathy_cardiac_failure":"false","pulse_loss_right_dorsalis_pedis":"false","carotidodynia":"false","pulse_loss_right_femoral":"false","pulse_loss_left_dorsalis_pedis":"false","seizures":"false","pulse_loss_right_popliteal":"false","abortions":"false","severe_abdominal_pain":"false","pulse_inequality":"false","pulse_loss_left_radial":"false","bruits":"false","bruit_left_carotid":"false","pulse_loss_right_subclavian":"false","pulse_loss":"false","aortic_incompetence":"false","claudication_arm":"false","myocardial_infarct_angina":"false","systolic_hypertension":"false","pulse_loss_right_carotid":"false","bp_inequality":"false","vertigo_dizziness":"false","pulse_loss_right_brachial":"false","bruit_left_renal":"false","myalgia_arthralgia_arthritis":"false","syncope":"false","headache":"false","bruit_right_subclavian":"false","pulse_loss_left_popliteal":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/itas2010","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/itas2010?malaise_weight_loss=false&myalgia_arthralgia_arthritis=false&headache=false&severe_abdominal_pain=false&abortions=false&diastolic_hypertension=false&systolic_hypertension=false&stroke=false&seizures=false&syncope=false&vertigo_dizziness=false&bruits=false&bruit_right_carotid=false&bruit_left_carotid=false&bruit_right_subclavian=false&bruit_left_subclavian=false&bruit_right_renal=false&bruit_left_renal=false&pulse_inequality=false&bp_inequality=false&pulse_loss=false&pulse_loss_right_carotid=false&pulse_loss_left_carotid=false&pulse_loss_right_subclavian=false&pulse_loss_left_subclavian=false&pulse_loss_right_brachial=false&pulse_loss_left_brachial=false&pulse_loss_right_radial=false&pulse_loss_left_radial=false&pulse_loss_right_femoral=false&pulse_loss_left_femoral=false&pulse_loss_right_popliteal=false&pulse_loss_left_popliteal=false&pulse_loss_right_posterior_tibial=false&pulse_loss_left_posterior_tibial=false&pulse_loss_right_dorsalis_pedis=false&pulse_loss_left_dorsalis_pedis=false&claudication=false&claudication_arm=false&claudication_leg=false&carotidodynia=false&aortic_incompetence=false&myocardial_infarct_angina=false&cardiomyopathy_cardiac_failure=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/itas2010","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/sdai","description":"Aletaha 2005 Simplified Disease Activity Index (SDAI): sjc28 + tjc28 + patient global (0–10 cm) + evaluator global (0–10 cm) + CRP mg/dL. Newly proposed states: ≤3.3 remission, ≤11 low, ≤26 moderate, >26 high (not original 5/20/40). magent does not count joints or assay CRP. Not CDAI. Not a rheumatoid arthritis diagnosis.","parameters":[{"in":"query","name":"sjc28","type":"integer","description":"Caller-assigned swollen joint count on the 28-joint set (Aletaha 2005). Integer 0-28. magent does not count joints.","required":true,"example":"0"},{"in":"query","name":"tjc28","type":"integer","description":"Caller-assigned tender joint count on the 28-joint set (Aletaha 2005). Integer 0-28. magent does not count joints.","required":true,"example":"0"},{"in":"query","name":"pga","type":"number","description":"Caller-assigned patient global assessment on a 0-10 cm VAS (Aletaha 2005). Number 0-10. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"ega","type":"number","description":"Caller-assigned evaluator global assessment on a 0-10 cm VAS (Aletaha 2005). Number 0-10. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"crp_mg_dl","type":"number","description":"Caller-assigned C-reactive protein in mg/dL (Aletaha 2005; not mg/L). Number 0-30 is a magent clamp. magent does not assay CRP.","required":true,"example":"0.4"}],"errors":[{"code":"invalid_sdai","message":"sjc28 and tjc28 must be integers 0–28; pga and ega numbers 0–10; crp_mg_dl a number 0–30 (Aletaha 2005 SDAI disease-activity states). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/sdai","citation":{"authors":"Aletaha D, Ward MM, Machold KP, Nell VPK, Stamm T, Smolen JS","doi":"10.1002/art.21235","id":"aletaha-2005","pmid":"16142705","source":"Arthritis Rheum. 2005;52(9):2625-2636","title":"Remission and active disease in rheumatoid arthritis: defining criteria for disease activity states","url":"https://doi.org/10.1002/art.21235"},"formula_expression":"SDAI = sjc28 + tjc28 + pga + ega + crp_mg_dl; Aletaha 2005 newly proposed definition; ≤3.3 remission, >3.3 and ≤11 low, >11 and ≤26 moderate, >26 high; half points allowed; not original 5/20/40; magent does not count joints or assay CRP","purpose":"Sum caller-assigned 28-joint swollen and tender counts, 0–10 cm patient and evaluator globals, and CRP in mg/dL, and return the Aletaha 2005 SDAI with the newly proposed activity state.","markdown_url":"https://magentlab.com/docs/sdai.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"sdai"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"number","description":"SDAI sum sjc28 + tjc28 + pga + ega + crp_mg_dl. Not integer-rounded; half points allowed. Theoretical max 106."},{"name":"max_score","type":"integer","description":"Always 106 (28+28+10+10+30 magent CRP clamp)"},{"name":"sdai_band","type":"string","description":"Aletaha 2005 newly proposed SDAI state: remission (≤3.3), low (>3.3 and ≤11), moderate (>11 and ≤26), or high (>26). Not original 5/20/40."},{"name":"sjc28","type":"integer","description":"Swollen 28-joint count used"},{"name":"tjc28","type":"integer","description":"Tender 28-joint count used"},{"name":"pga","type":"number","description":"Patient global 0-10 cm VAS used"},{"name":"ega","type":"number","description":"Evaluator global 0-10 cm VAS used"},{"name":"crp_mg_dl","type":"number","description":"CRP in mg/dL used"},{"name":"components","type":"array","description":"Per-variable points"},{"name":"citation","type":"object","description":"Aletaha et al. Arthritis Rheum 2005 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"crp_mg_dl":"0.4","ega":"0","pga":"0","sjc28":"0","tjc28":"0"},{"crp_mg_dl":"0.4","ega":"0","pga":"0","sjc28":"0","tjc28":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/sdai","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/sdai?sjc28=0&tjc28=0&pga=0&ega=0&crp_mg_dl=0.4","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/sdai","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/cdai-ra","description":"Aletaha 2005 Clinical Disease Activity Index (CDAI) for rheumatoid arthritis: SJC28 + TJC28 + patient global (0–10 cm) + evaluator global (0–10 cm). No CRP. Half points allowed; the sum is not integer-rounded. magent does not count joints. Arthritis Res Ther 2005 (ar1740) validates the sum and does not publish activity-state cutoffs. Not SDAI. Not Crohn's CDAI. Not a rheumatoid arthritis diagnosis.","parameters":[{"in":"query","name":"sjc28","type":"integer","description":"Caller-assigned swollen joint count on the 28-joint set (Aletaha 2005 CDAI). Integer 0-28. magent does not count joints.","required":true,"example":"0"},{"in":"query","name":"tjc28","type":"integer","description":"Caller-assigned tender joint count on the 28-joint set (Aletaha 2005 CDAI). Integer 0-28. magent does not count joints.","required":true,"example":"0"},{"in":"query","name":"pga","type":"number","description":"Caller-assigned patient global assessment on a 0-10 cm VAS (Aletaha 2005 CDAI). Number 0-10. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"ega","type":"number","description":"Caller-assigned evaluator global assessment on a 0-10 cm VAS (Aletaha 2005 CDAI). Number 0-10. magent does not examine the patient.","required":true,"example":"0"}],"errors":[{"code":"invalid_cdai_ra","message":"sjc28 and tjc28 must be integers 0–28; pga and ega numbers 0–10 cm (Aletaha 2005 CDAI = SJC + TJC + PGA + EGA). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/cdai-ra","citation":{"authors":"Aletaha D, Nell VPK, Stamm T, et al.","doi":"10.1186/ar1740","id":"aletaha-2005-cdai","pmid":"15987481","source":"Arthritis Res Ther. 2005;7(4):R796-R806","title":"Acute phase reactants add little to composite disease activity indices for rheumatoid arthritis: validation of a clinical activity score","url":"https://doi.org/10.1186/ar1740"},"formula_expression":"CDAI = sjc28 + tjc28 + pga + ega; Aletaha 2005 Arthritis Res Ther (ar1740); PGA and EGA in cm on a 0-10 VAS; half points allowed; not integer-rounded; max 76; magent does not count joints; not SDAI; not Crohn's CDAI; no published activity-state cutoffs","purpose":"Sum caller-assigned 28-joint swollen and tender counts and 0–10 cm patient and evaluator globals and return the Aletaha 2005 Clinical Disease Activity Index. Does not add CRP and does not return activity-state cutoffs.","markdown_url":"https://magentlab.com/docs/cdai-ra.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"cdai_ra"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"number","description":"CDAI sum sjc28 + tjc28 + pga + ega. Not integer-rounded; half points allowed. Theoretical max 76. No activity-state cutoffs."},{"name":"max_score","type":"integer","description":"Always 76 (28+28+10+10)"},{"name":"sjc28","type":"integer","description":"Swollen 28-joint count used"},{"name":"tjc28","type":"integer","description":"Tender 28-joint count used"},{"name":"pga","type":"number","description":"Patient global 0-10 cm VAS used"},{"name":"ega","type":"number","description":"Evaluator global 0-10 cm VAS used"},{"name":"components","type":"array","description":"Per-variable points"},{"name":"citation","type":"object","description":"Aletaha et al. Arthritis Res Ther 2005 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"ega":"0","pga":"0","sjc28":"0","tjc28":"0"},{"ega":"0","pga":"0","sjc28":"0","tjc28":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/cdai-ra","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/cdai-ra?sjc28=0&tjc28=0&pga=0&ega=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/cdai-ra","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/das28-esr","description":"Prevoo 1995 DAS28-ESR: 0.56*sqrt(tjc28) + 0.28*sqrt(sjc28) + 0.70*ln(esr_mm_h) + 0.014*gh (0-100 mm VAS, not 0-10 CDAI/SDAI). Caller-assigned 28-joint counts 0-28; ESR strictly >0 (typical 1-150). magent does not count joints or assay ESR. Score only; Prevoo 1995 does not publish later EULAR 2.6/3.2/5.1 cutoffs. Not SDAI, not CDAI, not DAS28-CRP. Not a rheumatoid arthritis diagnosis.","parameters":[{"in":"query","name":"tjc28","type":"integer","description":"Caller-assigned tender joint count on the 28-joint set (Prevoo 1995). Integer 0-28. magent does not count joints.","required":true,"example":0},{"in":"query","name":"sjc28","type":"integer","description":"Caller-assigned swollen joint count on the 28-joint set (Prevoo 1995). Integer 0-28. magent does not count joints.","required":true,"example":0},{"in":"query","name":"esr_mm_h","type":"number","description":"Caller-assigned erythrocyte sedimentation rate in mm/h. Strictly >0 (typical 1-150 magent clamp). Natural log in the formula. magent does not assay ESR.","required":true,"example":10},{"in":"query","name":"gh","type":"number","description":"Caller-assigned patient general health on a 0-100 mm VAS (Prevoo 1995). Number 0-100. Not 0-10 CDAI/SDAI centimetres. magent does not examine the patient.","required":true,"example":0}],"errors":[{"code":"invalid_das28_esr","message":"DAS28-ESR inputs must match Prevoo 1995 28-joint counts, ESR, and 0-100 general health. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/das28-esr","citation":{"authors":"Prevoo ML, van 't Hof MA, Kuper HH, van Leeuwen MA, van de Putte LB, van Riel PL","doi":"10.1002/art.1780380107","id":"prevoo-1995","pmid":"7818570","source":"Arthritis Rheum. 1995;38(1):44-48","title":"Modified disease activity scores that include twenty-eight-joint counts. Development and validation in a prospective longitudinal study of patients with rheumatoid arthritis","url":"https://doi.org/10.1002/art.1780380107"},"formula_expression":"DAS28-ESR = 0.56*sqrt(tjc28) + 0.28*sqrt(sjc28) + 0.70*ln(esr_mm_h) + 0.014*gh; Prevoo 1995; TJC28 and SJC28 integers 0-28; ESR mm/h strictly >0 (typical 1-150, natural log); GH 0-100 mm VAS (not 0-10 CDAI/SDAI); magent does not count joints or assay ESR; no EULAR 2.6/3.2/5.1 cutoffs","purpose":"Compute the Prevoo 1995 28-joint DAS with ESR from caller-assigned tender and swollen 28-joint counts, ESR in mm/h, and patient general health on a 0-100 mm VAS. Returns the published score only.","markdown_url":"https://magentlab.com/docs/das28-esr.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"das28_esr"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"number","description":"Prevoo 1995 DAS28-ESR, 4 decimals. No EULAR 2.6/3.2/5.1 activity-state cutoffs."},{"name":"tjc28","type":"integer","description":"Tender 28-joint count used"},{"name":"sjc28","type":"integer","description":"Swollen 28-joint count used"},{"name":"esr_mm_h","type":"number","description":"ESR in mm/h used"},{"name":"gh","type":"number","description":"Patient general health 0-100 mm VAS used"},{"name":"citation","type":"object","description":"Prevoo et al. Arthritis Rheum 1995 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"esr_mm_h":"10","gh":"0","sjc28":"0","tjc28":"0"},{"esr_mm_h":"10","gh":"0","sjc28":"0","tjc28":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/das28-esr","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/das28-esr?tjc28=0&sjc28=0&esr_mm_h=10&gh=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/das28-esr","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/das28-crp","description":"Wells 2009 DAS28(CRP): 0.56*sqrt(TJC28)+0.28*sqrt(SJC28)+0.014*GH+0.36*ln(CRP+1)+0.96. CRP is mg/L, not SDAI mg/dL. GH is 0-100 mm VAS, not 0-10. The +0.96 constant is required. Remission is DAS28<2.6 as stated in that paper. magent does not count joints or assay CRP. Not DAS28-ESR, SDAI, or CDAI. Not a rheumatoid arthritis diagnosis.","parameters":[{"in":"query","name":"tjc28","type":"integer","description":"Caller-assigned tender joint count on the 28-joint set (Wells 2009 DAS28-CRP). Integer 0-28. magent does not count joints.","required":true,"example":"0"},{"in":"query","name":"sjc28","type":"integer","description":"Caller-assigned swollen joint count on the 28-joint set (Wells 2009 DAS28-CRP). Integer 0-28. magent does not count joints.","required":true,"example":"0"},{"in":"query","name":"crp_mg_l","type":"number","description":"Caller-assigned C-reactive protein in mg/L (Wells 2009; not mg/dL SDAI). Number 0-500 is a magent clamp. magent does not assay CRP.","required":true,"example":"1"},{"in":"query","name":"gh","type":"number","description":"Caller-assigned general health (patient assessment) on a 0-100 mm VAS (Wells 2009; 0=best, 100=worst). Number 0-100. Not 0-10 cm SDAI PGA. magent does not examine the patient.","required":true,"example":"0"}],"errors":[{"code":"invalid_das28_crp","message":"DAS28-CRP inputs must match Wells 2009 28-joint counts, CRP mg/L, and 0-100 general health. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/das28-crp","citation":{"authors":"Wells G, Becker JC, Teng J, Dougados M, Schiff M, Smolen J, Aletaha D, van Riel PLCM","doi":"10.1136/ard.2007.084459","id":"wells-2009","pmid":"18490431","source":"Ann Rheum Dis. 2009;68(6):954-960","title":"Validation of the 28-joint Disease Activity Score (DAS28) and European League Against Rheumatism response criteria based on C-reactive protein against disease progression in patients with rheumatoid arthritis, and comparison with the DAS28 based on erythrocyte sedimentation rate","url":"https://doi.org/10.1136/ard.2007.084459"},"formula_expression":"DAS28(CRP) = 0.56*sqrt(tjc28) + 0.28*sqrt(sjc28) + 0.014*gh + 0.36*ln(crp_mg_l+1) + 0.96; Wells 2009; CRP mg/L; GH 0-100 mm VAS; remission DAS28<2.6; not DAS28-ESR; not SDAI; not CDAI; magent does not count joints or assay CRP","purpose":"Compute the Wells 2009 28-joint Disease Activity Score based on C-reactive protein from caller-assigned TJC28, SJC28, CRP in mg/L, and 0–100 mm general health, including the +0.96 constant, and return DAS28-defined remission when the score is <2.6.","markdown_url":"https://magentlab.com/docs/das28-crp.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"das28_crp"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"number","description":"Wells 2009 DAS28(CRP), 2 decimals. 0.56*sqrt(tjc28)+0.28*sqrt(sjc28)+0.014*gh+0.36*ln(crp_mg_l+1)+0.96"},{"name":"das28_crp_band","type":"string","description":"Wells 2009 DAS28-defined remission when score < 2.6; otherwise not_remission. Does not apply EULAR 3.2/5.1 present-score cutoffs as single-visit activity bands."},{"name":"tjc28","type":"integer","description":"Tender 28-joint count used"},{"name":"sjc28","type":"integer","description":"Swollen 28-joint count used"},{"name":"crp_mg_l","type":"number","description":"CRP in mg/L used"},{"name":"gh","type":"number","description":"General health 0-100 mm VAS used"},{"name":"citation","type":"object","description":"Wells et al. Ann Rheum Dis 2009 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"crp_mg_l":"1","gh":"0","sjc28":"0","tjc28":"0"},{"crp_mg_l":"1","gh":"0","sjc28":"0","tjc28":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/das28-crp","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/das28-crp?tjc28=0&sjc28=0&crp_mg_l=1&gh=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/das28-crp","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/caspar","description":"Taylor 2006 CASPAR classification criteria for psoriatic arthritis. Required: inflammatory_articular_disease true (joint, spine, or enthesis). Score: current psoriasis 2; personal history 1 only if current is false; family history 1 only if current and personal are false; nail dystrophy 1; RF-negative 1; dactylitis (current or history) 1; juxtaarticular new bone 1. Classified iff score ≥3 (max 8). Not a diagnosis. Not Moll and Wright. magent does not examine skin or read films.","parameters":[{"in":"query","name":"inflammatory_articular_disease","type":"boolean","description":"Must be true. Taylor 2006 CASPAR entry: established inflammatory articular disease of joint, spine, or enthesis as assigned by the caller. false is invalid and is not classified=false. magent does not examine joints.","required":true,"example":"true"},{"in":"query","name":"current_psoriasis","type":"boolean","description":"Current psoriasis as assigned by the caller (Taylor 2006): psoriatic skin or scalp disease present today as judged by a rheumatologist or dermatologist. true scores 2. When true, personal_history_psoriasis and family_history_psoriasis do not add. magent does not examine skin.","required":true,"example":"true"},{"in":"query","name":"personal_history_psoriasis","type":"boolean","description":"Personal history of psoriasis as assigned by the caller (Taylor 2006): a history that may be obtained from the patient, family physician, dermatologist, rheumatologist, or other qualified health care provider. true scores 1 only if current_psoriasis is false. magent does not examine skin.","required":true,"example":"false"},{"in":"query","name":"family_history_psoriasis","type":"boolean","description":"Family history of psoriasis as assigned by the caller (Taylor 2006): first- or second-degree relative according to patient report. true scores 1 only if current_psoriasis is false and personal_history_psoriasis is false. magent does not take a pedigree.","required":true,"example":"false"},{"in":"query","name":"nail_dystrophy","type":"boolean","description":"Typical psoriatic nail dystrophy including onycholysis, pitting, and hyperkeratosis on current examination, as assigned by the caller (Taylor 2006). true scores 1. magent does not examine nails.","required":true,"example":"false"},{"in":"query","name":"rheumatoid_factor_negative","type":"boolean","description":"Negative rheumatoid factor by any method except latex, preferably ELISA or nephelometry according to the local laboratory reference range, as assigned by the caller (Taylor 2006). true scores 1. magent does not assay rheumatoid factor.","required":true,"example":"true"},{"in":"query","name":"dactylitis","type":"boolean","description":"Current swelling of an entire digit, or a history of dactylitis recorded by a rheumatologist, as assigned by the caller (Taylor 2006). true scores 1. magent does not examine digits.","required":true,"example":"true"},{"in":"query","name":"juxtaarticular_new_bone","type":"boolean","description":"Radiographic ill-defined ossification near joint margins, excluding osteophyte formation, on plain radiographs of the hand or foot, as assigned by the caller (Taylor 2006). true scores 1. magent does not read films.","required":true,"example":"false"}],"errors":[{"code":"invalid_caspar","message":"inflammatory_articular_disease must be true (Taylor 2006 CASPAR entry: established inflammatory articular disease of joint, spine, or enthesis). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/caspar","citation":{"authors":"Taylor W, Gladman D, Helliwell P, Marchesoni A, Mease P, Mielants H, CASPAR Study Group","doi":"10.1002/art.21972","id":"taylor-2006","pmid":"16871531","source":"Arthritis Rheum. 2006;54(8):2665-2673","title":"Classification criteria for psoriatic arthritis: development of new criteria from a large international study","url":"https://doi.org/10.1002/art.21972"},"formula_expression":"Taylor 2006 CASPAR: required inflammatory_articular_disease true (established inflammatory articular disease of joint, spine, or enthesis; else do not score). Score = current_psoriasis 2 + personal_history_psoriasis 1 (only if current_psoriasis false) + family_history_psoriasis 1 (only if current_psoriasis false and personal_history_psoriasis false) + nail_dystrophy 1 + rheumatoid_factor_negative 1 + dactylitis 1 + juxtaarticular_new_bone 1; max 8; classified iff score ≥3. Not a diagnosis. Not Moll and Wright","purpose":"Apply the Taylor 2006 CASPAR classification criteria for psoriatic arthritis: require established inflammatory articular disease, then return the published point total (max 8) and whether score ≥3 classifies psoriatic arthritis. Not a diagnosis.","markdown_url":"https://magentlab.com/docs/caspar.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"caspar"},{"name":"formula_expression","type":"string","description":"Taylor 2006 CASPAR classification expression"},{"name":"score","type":"integer","description":"Taylor 2006 CASPAR points. Integer 0–8."},{"name":"max_score","type":"integer","description":"8"},{"name":"classified","type":"boolean","description":"true iff score ≥3. Classification criteria for research, not a diagnosis of psoriatic arthritis. Not Moll and Wright."},{"name":"band","type":"string","description":"classified when score ≥3; not_classified otherwise. Not a diagnosis. Not Moll and Wright."},{"name":"components","type":"array","description":"Per-item Taylor 2006 CASPAR points"},{"name":"citation","type":"object","description":"Taylor 2006 Arthritis Rheum citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"current_psoriasis":"true","dactylitis":"true","family_history_psoriasis":"false","inflammatory_articular_disease":"true","juxtaarticular_new_bone":"false","nail_dystrophy":"false","personal_history_psoriasis":"false","rheumatoid_factor_negative":"true"},{"current_psoriasis":"true","dactylitis":"true","family_history_psoriasis":"false","inflammatory_articular_disease":"true","juxtaarticular_new_bone":"false","nail_dystrophy":"false","personal_history_psoriasis":"false","rheumatoid_factor_negative":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/caspar","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/caspar?inflammatory_articular_disease=true&current_psoriasis=true&personal_history_psoriasis=false&family_history_psoriasis=false&nail_dystrophy=false&rheumatoid_factor_negative=true&dactylitis=true&juxtaarticular_new_bone=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/caspar","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/leiden-arthritis","description":"van der Helm-van Mil 2007 Leiden prediction rule for recent-onset undifferentiated arthritis (Figure 1 / Table 2). Age × 0.02, female 1, small joints 0.5, symmetric 0.5, upper 1 or upper-and-lower 1.5, 100-mm morning-stiffness VAS 0/1/2, tender and swollen counts 0/0.5/1, CRP mg/L 0/0.5/1.5, RF 1, anti-CCP 2. Round to nearest 0.0 or 0.5. Bands ≤6 low, >6 and <8 indeterminate, ≥8 high. Not a diagnosis of RA. magent does not examine joints or assay serologies.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years as an integer from 18 to 120 (van der Helm-van Mil 2007). Scores age_years × 0.02. magent does not assign age.","required":true,"example":"48"},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"Caller-assigned sex (van der Helm-van Mil 2007). female scores 1; male scores 0. magent does not assign sex.","required":true,"example":"female"},{"in":"query","name":"small_joints_hands_feet","type":"boolean","description":"Involvement of small joints of the hands or feet (van der Helm-van Mil 2007). true scores 0.5 and may stack with symmetric and the extremity row. magent does not examine joints.","required":true,"example":"true"},{"in":"query","name":"symmetric","type":"boolean","description":"Symmetric joint involvement (van der Helm-van Mil 2007). true scores 0.5 and may stack with small-joint and extremity rows. magent does not examine joints.","required":true,"example":"true"},{"in":"query","name":"upper_extremities","type":"boolean","description":"Involvement of upper extremities only (van der Helm-van Mil 2007). true scores 1 unless upper_and_lower_extremities is true, in which case this row is ignored. Mutually exclusive with the 1.5 upper-and-lower row. magent does not examine joints.","required":true,"example":"true"},{"in":"query","name":"upper_and_lower_extremities","type":"boolean","description":"Involvement of upper and lower extremities (van der Helm-van Mil 2007). true scores 1.5 and ignores upper_extremities. magent does not examine joints.","required":true,"example":"false"},{"in":"query","name":"morning_stiffness_vas_mm","type":"number","description":"Morning-stiffness severity on a 100-mm VAS (van der Helm-van Mil 2007), not duration in minutes. Number 0–100. 0–25 scores 0; 26–90 scores 1; >90 scores 2. magent does not take a history.","required":true,"example":"50"},{"in":"query","name":"tender_joint_count","type":"integer","description":"Caller-assigned tender joint count (van der Helm-van Mil 2007). Integer 0–68. <4 scores 0; 4–10 scores 0.5; ≥11 scores 1. magent does not examine joints.","required":true,"example":"8"},{"in":"query","name":"swollen_joint_count","type":"integer","description":"Caller-assigned swollen joint count (van der Helm-van Mil 2007). Integer 0–66. <4 scores 0; 4–10 scores 0.5; ≥11 scores 1. magent does not examine joints.","required":true,"example":"8"},{"in":"query","name":"crp_mg_l","type":"number","description":"Caller-assigned C-reactive protein in mg/L (van der Helm-van Mil 2007). Number 0–500. 0–4 scores 0; 5–50 scores 0.5; ≥51 scores 1.5. magent does not assay CRP.","required":true,"example":"60"},{"in":"query","name":"rheumatoid_factor_positive","type":"boolean","description":"Caller-assigned rheumatoid factor positivity (van der Helm-van Mil 2007). true scores 1. magent does not assay serologies.","required":true,"example":"false"},{"in":"query","name":"anti_ccp_positive","type":"boolean","description":"Caller-assigned anti-CCP (ACPA) positivity (van der Helm-van Mil 2007). true scores 2. magent does not assay serologies.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_leiden","message":"morning_stiffness_vas_mm must be 0–100; tender_joint_count an integer 0–68; swollen_joint_count an integer 0–66; crp_mg_l a number 0–500 (van der Helm-van Mil 2007 Leiden UA rule). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/leiden-arthritis","citation":{"authors":"van der Helm-van Mil AH, le Cessie S, van Dongen H, Breedveld FC, Toes RE, Huizinga TW","doi":"10.1002/art.22380","id":"van-der-helm-van-mil-2007","pmid":"17265478","source":"Arthritis Rheum. 2007;56(2):433-440","title":"A prediction rule for disease outcome in patients with recent-onset undifferentiated arthritis: how to guide individual treatment decisions","url":"https://doi.org/10.1002/art.22380"},"formula_expression":"Leiden UA score (van der Helm-van Mil 2007 Figure 1 / Table 2) = age_years*0.02 + female 1 + small_joints_hands_feet 0.5 + symmetric 0.5 + (upper_and_lower_extremities 1.5 else upper_extremities 1) + morning_stiffness_vas_mm (0–25 → 0; 26–90 → 1; >90 → 2) + tender_joint_count (<4 → 0; 4–10 → 0.5; ≥11 → 1) + swollen_joint_count (<4 → 0; 4–10 → 0.5; ≥11 → 1) + crp_mg_l (0–4 → 0; 5–50 → 0.5; ≥51 → 1.5) + rheumatoid_factor_positive 1 + anti_ccp_positive 2; round to nearest 0.0 or 0.5; ≤6 low, >6 and <8 indeterminate, ≥8 high; max 14; not a diagnosis of RA","purpose":"Sum the van der Helm-van Mil 2007 simplified Leiden prediction score for recent-onset undifferentiated arthritis and return the paper’s ≤6 / 6–8 / ≥8 decision band.","markdown_url":"https://magentlab.com/docs/leiden-arthritis.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"leiden_arthritis"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"number","description":"van der Helm-van Mil 2007 simplified prediction score rounded to the nearest 0.0 or 0.5 (Table 3 grouping). Half-points allowed."},{"name":"max_score","type":"integer","description":"14"},{"name":"leiden_band","type":"string","description":"Paper decision cutoffs on the rounded score: low (≤6), indeterminate (>6 and <8), or high (≥8). Not a diagnosis of RA."},{"name":"components","type":"array","description":"Per-factor points before rounding"},{"name":"citation","type":"object","description":"van der Helm-van Mil et al. Arthritis Rheum 2007 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"48","anti_ccp_positive":"false","crp_mg_l":"60","morning_stiffness_vas_mm":"50","rheumatoid_factor_positive":"false","sex":"female","small_joints_hands_feet":"true","swollen_joint_count":"8","symmetric":"true","tender_joint_count":"8","upper_and_lower_extremities":"false","upper_extremities":"true"},{"age":"48","anti_ccp_positive":"false","crp_mg_l":"60","morning_stiffness_vas_mm":"50","rheumatoid_factor_positive":"false","sex":"female","small_joints_hands_feet":"true","swollen_joint_count":"8","symmetric":"true","tender_joint_count":"8","upper_and_lower_extremities":"false","upper_extremities":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/leiden-arthritis","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/leiden-arthritis?age=48&sex=female&small_joints_hands_feet=true&symmetric=true&upper_extremities=true&upper_and_lower_extremities=false&morning_stiffness_vas_mm=50&tender_joint_count=8&swollen_joint_count=8&crp_mg_l=60&rheumatoid_factor_positive=false&anti_ccp_positive=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/leiden-arthritis","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/acr-eular-ra","description":"ACR/EULAR 2010 RA classification (Aletaha Table 3). Required: clinical_synovitis true. Score: joint involvement 0/1/2/3/5 + serology 0/2/3 + abnormal CRP or ESR 1 + duration ≥6 weeks 1; max 10. classified false if another disease better explains synovitis; else true if typical RA erosions or score ≥6. Not a diagnosis. Not 1987 ACR RA. Not SDAI. magent does not examine joints or titer RF/ACPA.","parameters":[{"in":"query","name":"clinical_synovitis","type":"boolean","description":"Must be true. Aletaha 2010 entry: at least one joint with definite clinical synovitis (swelling) as assigned by the caller. false is invalid and is not classified=false. magent does not examine joints.","required":true,"example":"true"},{"in":"query","name":"alternative_diagnosis_better","type":"boolean","description":"Synovitis better explained by another disease (Aletaha 2010 target population). true still returns the Table 3 score but classified is false. magent does not assign an alternative diagnosis.","required":true,"example":"false"},{"in":"query","name":"erosive_disease_typical_of_ra","type":"boolean","description":"Erosive disease typical of RA with a history compatible with prior fulfillment of the 2010 criteria (Aletaha 2010 footnote). true classifies even if score <6. magent does not read films.","required":true,"example":"false"},{"in":"query","name":"joint_involvement","type":"string","enum":["one_large","two_to_ten_large","one_to_three_small","four_to_ten_small","gt_ten_with_small"],"description":"Caller-assigned highest Aletaha 2010 Table 3 joint-involvement category. magent does not count joints. Large = shoulders, elbows, hips, knees, ankles. Small = MCP, PIP, 2nd–5th MTP, thumb IP, wrists. DIP, 1st CMC, and 1st MTP are excluded. one_large scores 0; two_to_ten_large scores 1; one_to_three_small (with or without large) scores 2; four_to_ten_small (with or without large) scores 3; gt_ten_with_small (>10 joints, at least 1 small) scores 5.","required":true,"example":"four_to_ten_small"},{"in":"query","name":"serology","type":"string","enum":["negative","low_positive","high_positive"],"description":"Caller-assigned Aletaha 2010 Table 3 serology row (at least one RF or ACPA test). High-positive RF or ACPA takes the high row. negative scores 0; low_positive scores 2; high_positive scores 3. magent does not titer RF or ACPA.","required":true,"example":"high_positive"},{"in":"query","name":"abnormal_apr","type":"boolean","description":"Abnormal CRP or ESR as assigned by the caller (Aletaha 2010 Table 3). true scores 1; false (normal CRP and ESR) scores 0. magent does not assay CRP or ESR.","required":true,"example":"true"},{"in":"query","name":"duration_ge_6_weeks","type":"boolean","description":"Duration of symptoms ≥6 weeks as assigned by the caller (Aletaha 2010 Table 3). true scores 1; false scores 0. magent does not date symptom onset.","required":true,"example":"true"}],"errors":[{"code":"invalid_acr_eular_ra","message":"clinical_synovitis must be true; joint_involvement one_large, two_to_ten_large, one_to_three_small, four_to_ten_small, or gt_ten_with_small; serology negative, low_positive, or high_positive (Aletaha 2010 ACR/EULAR RA Table 3). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/acr-eular-ra","citation":{"authors":"Aletaha D, Neogi T, Silman AJ, Funovits J, Felson DT, Bingham CO 3rd, Birnbaum NS, Burmester GR, Bykerk VP, Cohen MD, Combe B, Costenbader KH, Dougados M, Emery P, Ferraccioli G, Hazes JMW, Hobbs K, Huizinga TWJ, Kavanaugh A, Kay J, Kvien TK, Laing T, Mease P, Ménard HA, Moreland LW, Naden RP, Pincus T, Smolen JS, Stanislawska-Biernat E, Symmons D, Tak PP, Upchurch KS, Vencovský J, Wolfe F, Hawker G","doi":"10.1136/ard.2010.138461","id":"aletaha-2010","pmid":"20699241","source":"Ann Rheum Dis. 2010;69(9):1580-1588","title":"2010 Rheumatoid arthritis classification criteria: an American College of Rheumatology/European League Against Rheumatism collaborative initiative","url":"https://doi.org/10.1136/ard.2010.138461"},"formula_expression":"ACR/EULAR 2010 RA classification (Aletaha Table 3): required clinical_synovitis true (at least one joint with definite clinical synovitis/swelling; else do not score). Score = joint_involvement (one_large 0, two_to_ten_large 1, one_to_three_small 2, four_to_ten_small 3, gt_ten_with_small 5) + serology (negative 0, low_positive 2, high_positive 3) + abnormal_apr 1 + duration_ge_6_weeks 1; max 10. classified false if alternative_diagnosis_better; else true if erosive_disease_typical_of_ra or score ≥6. Not a diagnosis. Not 1987 ACR RA. Not SDAI","purpose":"Apply the 2010 ACR/EULAR rheumatoid arthritis classification criteria (Aletaha Table 3): require definite clinical synovitis, sum joint involvement, serology, acute-phase reactants, and symptom duration (max 10), and return whether score ≥6 or typical RA erosions classify RA. Not a diagnosis.","markdown_url":"https://magentlab.com/docs/acr-eular-ra.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"acr_eular_ra"},{"name":"formula_expression","type":"string","description":"Aletaha 2010 ACR/EULAR RA classification expression"},{"name":"score","type":"integer","description":"Aletaha 2010 Table 3 points. Integer 0–10."},{"name":"max_score","type":"integer","description":"10"},{"name":"classified","type":"boolean","description":"false if alternative_diagnosis_better; else true if erosive_disease_typical_of_ra or score ≥6. Classification criteria for research, not a diagnosis of RA. Not 1987 ACR RA. Not SDAI."},{"name":"band","type":"string","description":"classified when classified is true; not_classified otherwise. Not a diagnosis. Not 1987 ACR RA. Not SDAI."},{"name":"components","type":"array","description":"Per-item Aletaha 2010 Table 3 points"},{"name":"citation","type":"object","description":"Aletaha 2010 Ann Rheum Dis citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"abnormal_apr":"true","alternative_diagnosis_better":"false","clinical_synovitis":"true","duration_ge_6_weeks":"true","erosive_disease_typical_of_ra":"false","joint_involvement":"four_to_ten_small","serology":"high_positive"},{"abnormal_apr":"true","alternative_diagnosis_better":"false","clinical_synovitis":"true","duration_ge_6_weeks":"true","erosive_disease_typical_of_ra":"false","joint_involvement":"four_to_ten_small","serology":"high_positive"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/acr-eular-ra","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/acr-eular-ra?clinical_synovitis=true&alternative_diagnosis_better=false&erosive_disease_typical_of_ra=false&joint_involvement=four_to_ten_small&serology=high_positive&abnormal_apr=true&duration_ge_6_weeks=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/acr-eular-ra","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/burch-wartofsky","description":"Burch 1993 points: °F (<99→0, 99.0–99.9→5, 100.0–100.9→10, 101.0–101.9→15, 102.0–102.9→20, 103.0–103.9→25, ≥104→30); CNS 0/10/20/30; GI-hepatic 0/10/20; HR (<90→0, 90–109→5, 110–119→10, 120–129→15, 130–139→20, ≥140→25); HF 0/5/10/15; AF 10; precipitant 10. Max 140. <25 unlikely, 25–44 impending, ≥45 highly suggestive. temperature_f or temperature_c, not both. Not a diagnosis or ICU order. magent does not measure temperature or an ECG.","parameters":[{"in":"query","name":"temperature_f","type":"number","description":"Temperature in °F (90-110). Provide this or temperature_c, not both. Burch 1993: <99.0 → 0, 99.0-99.9 → 5, 100.0-100.9 → 10, 101.0-101.9 → 15, 102.0-102.9 → 20, 103.0-103.9 → 25, ≥104.0 → 30. magent does not measure temperature.","required":false,"example":"98.6"},{"in":"query","name":"temperature_c","type":"number","description":"Temperature in °C (32.2-43.3). Converted as F = C×9/5+32, then scored on the Burch 1993 Fahrenheit table. Provide this or temperature_f, not both. magent does not measure temperature.","required":false,"example":"37.0"},{"in":"query","name":"cns_effects","type":"string","enum":["none","mild","moderate","severe"],"description":"Caller-assigned CNS effects (Burch 1993). none → 0; mild (agitation) → 10; moderate (delirium, psychosis, extreme lethargy) → 20; severe (seizure or coma) → 30. magent does not examine the patient.","required":true,"example":"none"},{"in":"query","name":"gi_hepatic","type":"string","enum":["none","moderate","severe"],"description":"Caller-assigned GI-hepatic dysfunction (Burch 1993). none → 0; moderate (diarrhea, nausea/vomiting, abdominal pain) → 10; severe (unexplained jaundice) → 20. magent does not examine the patient.","required":true,"example":"none"},{"in":"query","name":"heart_rate_bpm","type":"integer","description":"Heart rate in beats/min (integer 30-220). Burch 1993: <90 → 0, 90-109 → 5, 110-119 → 10, 120-129 → 15, 130-139 → 20, ≥140 → 25. Bins start at 90, not 99. magent does not read an ECG.","required":true,"example":"80"},{"in":"query","name":"heart_failure","type":"string","enum":["none","mild","moderate","severe"],"description":"Caller-assigned heart-failure grade (Burch 1993). none → 0; mild (pedal edema) → 5; moderate (bibasilar rales) → 10; severe (pulmonary edema) → 15. magent does not examine the patient.","required":true,"example":"none"},{"in":"query","name":"atrial_fibrillation","type":"boolean","description":"Atrial fibrillation as assigned by the caller (true or false). Burch 1993: true → 10. magent does not read an ECG.","required":true,"example":"false"},{"in":"query","name":"precipitating_event","type":"boolean","description":"Precipitating event as assigned by the caller (true or false). Burch 1993: true → 10. magent does not take a history.","required":true,"example":"false"}],"errors":[{"code":"invalid_bwps_temperature","message":"temperature_f (90-110) or temperature_c (32.2-43.3) is required, not both (Burch 1993). Returned before settlement; you are not charged.","status":400},{"code":"invalid_cns_effects","message":"cns_effects must be none, mild, moderate, or severe (Burch 1993). Returned before settlement; you are not charged.","status":400},{"code":"invalid_gi_hepatic","message":"gi_hepatic must be none, moderate, or severe (Burch 1993). Returned before settlement; you are not charged.","status":400},{"code":"invalid_heart_rate","message":"heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.","status":400},{"code":"invalid_heart_failure_grade","message":"heart_failure must be none, mild, moderate, or severe (Burch 1993). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/burch-wartofsky","citation":{"authors":"Burch HB, Wartofsky L","doi":"10.1016/S0889-8529(18)30165-8","id":"burch-1993","pmid":"8325286","source":"Endocrinol Metab Clin North Am. 1993;22(2):263-277","title":"Life-threatening thyrotoxicosis. Thyroid storm","url":"https://doi.org/10.1016/S0889-8529(18)30165-8"},"formula_expression":"BWPS = temp_F(<99.0→0, 99.0–99.9→5, 100.0–100.9→10, 101.0–101.9→15, 102.0–102.9→20, 103.0–103.9→25, ≥104.0→30) + CNS(none→0, mild→10, moderate→20, severe→30) + GI-hepatic(none→0, moderate→10, severe→20) + HR(<90→0, 90–109→5, 110–119→10, 120–129→15, 130–139→20, ≥140→25) + HF(none→0, mild→5, moderate→10, severe→15) + 10*AF + 10*precipitant; Burch 1993; max 140; <25 unlikely, 25–44 impending, ≥45 highly_suggestive","purpose":"Sum Burch 1993 thyroid-storm points from temperature, CNS effects, GI-hepatic dysfunction, heart rate, heart failure, atrial fibrillation, and precipitating event and return unlikely (<25), impending (25–44), or highly suggestive (≥45).","markdown_url":"https://magentlab.com/docs/burch-wartofsky.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"burch_wartofsky"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Burch 1993 points 0-140"},{"name":"max_score","type":"integer","description":"Always 140"},{"name":"bwps_band","type":"string","description":"unlikely when score is <25, impending when 25-44, highly_suggestive when ≥45 (Burch 1993). Not a thyroid-storm diagnosis or ICU/treatment order."},{"name":"temperature_f","type":"number","description":"Temperature in °F used for Burch 1993 bins (converted from °C when given)"},{"name":"cns_effects","type":"string","description":"Caller-assigned CNS grade used"},{"name":"gi_hepatic","type":"string","description":"Caller-assigned GI-hepatic grade used"},{"name":"heart_rate_bpm","type":"integer","description":"Heart rate used, bpm"},{"name":"heart_failure","type":"string","description":"Caller-assigned heart-failure grade used"},{"name":"atrial_fibrillation","type":"boolean","description":"Atrial fibrillation flag used"},{"name":"precipitating_event","type":"boolean","description":"Precipitating-event flag used"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Burch 1993 Endocrinol Metab Clin citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"atrial_fibrillation":"false","cns_effects":"none","gi_hepatic":"none","heart_failure":"none","heart_rate_bpm":"80","precipitating_event":"false","temperature_f":"98.6"},{"atrial_fibrillation":"false","cns_effects":"none","gi_hepatic":"none","heart_failure":"none","heart_rate_bpm":"80","precipitating_event":"false","temperature_f":"98.6"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/burch-wartofsky","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/burch-wartofsky?temperature_f=98.6&cns_effects=none&gi_hepatic=none&heart_rate_bpm=80&heart_failure=none&atrial_fibrillation=false&precipitating_event=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/burch-wartofsky","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/pas","description":"Samuel 2002 pediatric appendicitis score from eight caller-assigned findings, ages 4-15, max 10. Cough/percussion/hopping RLQ and RIF tenderness score 2; anorexia, pyrexia, nausea/emesis, leukocytosis, neutrophilia, and migration score 1. Fever and labs are flags, not unpublished cutoffs. Not Alvarado (MANTRELS). Not a diagnosis or operating-room protocol. magent does not examine the abdomen.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years as an integer from 4 to 15 (Samuel 2002 derivation cohort). Age does not add points. 3 and 16 are rejected.","required":true,"example":"10"},{"in":"query","name":"cough_percussion_hopping_rlq","type":"boolean","description":"Cough, percussion, or hopping tenderness in the right lower quadrant (Samuel physical sign 1). true scores 2; false scores 0.","required":true,"example":"false"},{"in":"query","name":"anorexia","type":"boolean","description":"Anorexia (Samuel). true scores 1; false scores 0.","required":true,"example":"false"},{"in":"query","name":"pyrexia","type":"boolean","description":"Caller-assigned pyrexia (Samuel named pyrexia; the derivation paper does not publish a °C cutoff). true scores 1; false scores 0.","required":true,"example":"false"},{"in":"query","name":"nausea_emesis","type":"boolean","description":"Nausea or emesis (Samuel). true scores 1; false scores 0.","required":true,"example":"false"},{"in":"query","name":"rif_tenderness","type":"boolean","description":"Tenderness over the right iliac fossa (Samuel physical sign 5). true scores 2; false scores 0.","required":true,"example":"false"},{"in":"query","name":"leukocytosis","type":"boolean","description":"Caller-assigned leukocytosis (Samuel 2002; no published WBC cutoff). true scores 1; false scores 0.","required":true,"example":"false"},{"in":"query","name":"neutrophilia","type":"boolean","description":"Caller-assigned neutrophilia (Samuel 2002; no published percent or count cutoff). true scores 1; false scores 0.","required":true,"example":"false"},{"in":"query","name":"migration","type":"boolean","description":"Migration of pain (Samuel). true scores 1; false scores 0.","required":true,"example":"false"}],"errors":[{"code":"invalid_pas_age","message":"age must be an integer from 4 to 15 (Samuel 2002). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/pas","citation":{"authors":"Samuel M","doi":"10.1053/jpsu.2002.32893","id":"samuel-2002","pmid":"12037754","source":"J Pediatr Surg. 2002;37(6):877-881","title":"Pediatric appendicitis score","url":"https://doi.org/10.1053/jpsu.2002.32893"},"formula_expression":"PAS = 2*cough_percussion_hopping_rlq + anorexia + pyrexia + nausea_emesis + 2*rif_tenderness + leukocytosis + neutrophilia + migration; max 10","purpose":"Compute the Samuel 2002 pediatric appendicitis score from eight caller-assigned findings in children aged 4-15.","markdown_url":"https://magentlab.com/docs/pas.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"pas"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Total points 0-10"},{"name":"max_score","type":"integer","description":"Always 10"},{"name":"age","type":"integer","description":"Age in years used (4-15). Age does not add points."},{"name":"components","type":"array","description":"Per-factor Samuel 2002 points"},{"name":"citation","type":"object","description":"Samuel 2002 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"10","anorexia":"false","cough_percussion_hopping_rlq":"false","leukocytosis":"false","migration":"false","nausea_emesis":"false","neutrophilia":"false","pyrexia":"false","rif_tenderness":"false"},{"age":"10","anorexia":"false","cough_percussion_hopping_rlq":"false","leukocytosis":"false","migration":"false","nausea_emesis":"false","neutrophilia":"false","pyrexia":"false","rif_tenderness":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/pas","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/pas?age=10&cough_percussion_hopping_rlq=false&anorexia=false&pyrexia=false&nausea_emesis=false&rif_tenderness=false&leukocytosis=false&neutrophilia=false&migration=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/pas","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/pas-ra","description":"Wolfe 2005 Patient Activity Scale (PAS): (haq * 3.33 + pain_vas + patient_global_vas) / 3. HAQ 0-3 (not HAQ-II); pain and patient global 0-10 VAS. magent does not administer the HAQ. Not PAS-II, Samuel 2002 pediatric appendicitis PAS, DAS28, or CDAI. Not a diagnosis. PAS total only; no remission or severity cutoffs.","parameters":[{"in":"query","name":"haq","type":"number","description":"Caller-assigned HAQ disability index (Wolfe 2005 PAS). Number 0-3. Not HAQ-II. magent does not administer the HAQ.","required":true,"example":"0"},{"in":"query","name":"pain_vas","type":"number","description":"Caller-assigned pain visual analog scale (Wolfe 2005 PAS). Number 0-10. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"patient_global_vas","type":"number","description":"Caller-assigned patient global visual analog scale (Wolfe 2005 PAS). Number 0-10. magent does not examine the patient.","required":true,"example":"0"}],"errors":[{"code":"invalid_haq","message":"haq must be a number from 0 to 3 (Wolfe 2005 HAQ 0-3). Returned before settlement; you are not charged.","status":400},{"code":"invalid_pain_vas","message":"pain_vas must be a number from 0 to 10 (Wolfe 2005 pain VAS). Returned before settlement; you are not charged.","status":400},{"code":"invalid_patient_global","message":"patient_global_vas must be a number from 0 to 10 (Wolfe 2005 patient global VAS). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/pas-ra","citation":{"authors":"Wolfe F, Michaud K, Pincus T","id":"wolfe-2005","pmid":"16331773","source":"J Rheumatol. 2005;32(12):2410-2415","title":"A composite disease activity scale for clinical practice, observational studies, and clinical trials: the patient activity scale (PAS/PAS-II)","url":"https://pubmed.ncbi.nlm.nih.gov/16331773"},"formula_expression":"PAS = (haq * 3.33 + pain_vas + patient_global_vas) / 3; Wolfe 2005 Patient Activity Scale (not PAS-II); HAQ 0-3 (not HAQ-II); pain and patient global 0-10 VAS; magent does not administer the HAQ; not Samuel 2002 pediatric appendicitis PAS; not DAS28; not CDAI; not a diagnosis; no published remission/minimal/moderate/severe cutoffs","purpose":"Compute the Wolfe 2005 Patient Activity Scale (PAS) from a caller-assigned HAQ disability index (0-3), pain VAS (0-10), and patient global VAS (0-10). Uses HAQ × 3.33, not HAQ-II. Returns the PAS total only.","markdown_url":"https://magentlab.com/docs/pas-ra.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"pas_ra"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"haq","type":"number","description":"HAQ disability index used (0-3, not HAQ-II)"},{"name":"pain_vas","type":"number","description":"Pain VAS used (0-10)"},{"name":"patient_global_vas","type":"number","description":"Patient global VAS used (0-10)"},{"name":"pas","type":"number","description":"Wolfe 2005 PAS total, 2 decimals: (haq * 3.33 + pain_vas + patient_global_vas) / 3. No activity-state cutoffs."},{"name":"citation","type":"object","description":"Wolfe, Michaud, and Pincus 2005 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"haq":"0","pain_vas":"0","patient_global_vas":"0"},{"haq":"0","pain_vas":"0","patient_global_vas":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/pas-ra","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/pas-ra?haq=0&pain_vas=0&patient_global_vas=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/pas-ra","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/pas-ii","description":"Wolfe 2005 Patient Activity Scale II (PAS-II): (haq_ii * 3.33 + pain_vas + patient_global_vas) / 3. HAQ-II 0-3 (not HAQ); pain and patient global 0-10 VAS. magent does not administer HAQ-II. Not PAS-RA, Samuel 2002 pediatric appendicitis PAS, DAS28, or CDAI. Not a diagnosis. PAS-II total only; no remission or severity cutoffs.","parameters":[{"in":"query","name":"haq_ii","type":"number","description":"Caller-assigned HAQ-II disability index (Wolfe 2005 PAS-II). Number 0-3. Not HAQ. magent does not administer HAQ-II.","required":true,"example":"0"},{"in":"query","name":"pain_vas","type":"number","description":"Caller-assigned pain visual analog scale (Wolfe 2005 PAS-II). Number 0-10. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"patient_global_vas","type":"number","description":"Caller-assigned patient global visual analog scale (Wolfe 2005 PAS-II). Number 0-10. magent does not examine the patient.","required":true,"example":"0"}],"errors":[{"code":"invalid_haq_ii","message":"haq_ii must be a number from 0 to 3 (Wolfe 2005 HAQ-II 0-3). Returned before settlement; you are not charged.","status":400},{"code":"invalid_pain_vas","message":"pain_vas must be a number from 0 to 10 (Wolfe 2005 pain VAS). Returned before settlement; you are not charged.","status":400},{"code":"invalid_patient_global","message":"patient_global_vas must be a number from 0 to 10 (Wolfe 2005 patient global VAS). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/pas-ii","citation":{"authors":"Wolfe F, Michaud K, Pincus T","id":"wolfe-2005","pmid":"16331773","source":"J Rheumatol. 2005;32(12):2410-2415","title":"A composite disease activity scale for clinical practice, observational studies, and clinical trials: the patient activity scale (PAS/PAS-II)","url":"https://pubmed.ncbi.nlm.nih.gov/16331773"},"formula_expression":"PAS-II = (haq_ii * 3.33 + pain_vas + patient_global_vas) / 3; Wolfe 2005 Patient Activity Scale II (not PAS-RA); HAQ-II 0-3 (not HAQ); pain and patient global 0-10 VAS; magent does not administer HAQ-II; not Samuel 2002 pediatric appendicitis PAS; not DAS28; not CDAI; not a diagnosis; no published remission/minimal/moderate/severe cutoffs","purpose":"Compute the Wolfe 2005 Patient Activity Scale II (PAS-II) from a caller-assigned HAQ-II disability index (0-3), pain VAS (0-10), and patient global VAS (0-10). Uses HAQ-II × 3.33, not HAQ. Returns the PAS-II total only.","markdown_url":"https://magentlab.com/docs/pas-ii.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"pas_ii"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"haq_ii","type":"number","description":"HAQ-II disability index used (0-3, not HAQ)"},{"name":"pain_vas","type":"number","description":"Pain VAS used (0-10)"},{"name":"patient_global_vas","type":"number","description":"Patient global VAS used (0-10)"},{"name":"pas_ii","type":"number","description":"Wolfe 2005 PAS-II total, 2 decimals: (haq_ii * 3.33 + pain_vas + patient_global_vas) / 3. No activity-state cutoffs."},{"name":"citation","type":"object","description":"Wolfe, Michaud, and Pincus 2005 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"haq_ii":"0","pain_vas":"0","patient_global_vas":"0"},{"haq_ii":"0","pain_vas":"0","patient_global_vas":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/pas-ii","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/pas-ii?haq_ii=0&pain_vas=0&patient_global_vas=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/pas-ii","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/parc","description":"Kharbanda 2018 Table 3 pediatric appendicitis risk calculator (pARC): logistic probability from sex, age (5-18 years), pain duration, pain with walking, migration of pain to RLQ, maximal RLQ tenderness, abdominal guarding, and ANC (x10^3/uL; 1.77*sqrt(ANC) if <14, else constant 6.62). Returns logit and estimated_probability_percent. Not a medical device, not a diagnosis, not PAS, and not Alvarado. magent does not examine the child.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in whole years from 5 to 18 (Kharbanda 2018 derivation). Age 5-7 maps to 5-7.9 y; male 8-13 and female 8-11 use the age 8-13.9 y term; male 14-18 y and female 12-18 y are the Table 3 reference.","required":true,"example":"15"},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"Caller-assigned sex. Male adds 1.28. Combined with age for the Table 3 age-and-sex terms. magent does not examine the child.","required":true,"example":"female"},{"in":"query","name":"pain_duration","type":"string","enum":["lt_24","24_lt_48","48_96"],"description":"Kharbanda 2018 Table 3 duration of pain as assigned by the caller: lt_24 (reference, 0), 24_lt_48 (+0.47), or 48_96 (+0.10). Derivation excluded pain beyond 96 hours. Do not send a nausea or vomiting flag.","required":true,"example":"lt_24"},{"in":"query","name":"pain_with_walking","type":"boolean","description":"Caller-assigned presence of pain with walking (Kharbanda 2018 Table 3 +1.05). magent does not examine the child.","required":true,"example":"false"},{"in":"query","name":"pain_migration_rlq","type":"boolean","description":"Caller-assigned history of migration of pain to the right-lower quadrant (Kharbanda 2018 Table 3 +0.46). magent does not examine the child.","required":true,"example":"false"},{"in":"query","name":"maximal_tenderness_rlq","type":"boolean","description":"Caller-assigned maximal tenderness in the right-lower quadrant (Kharbanda 2018 Table 3 +1.14). magent does not examine the child.","required":true,"example":"false"},{"in":"query","name":"abdominal_guarding","type":"boolean","description":"Caller-assigned abdominal guarding (Kharbanda 2018 Table 3 +0.67). magent does not examine the child.","required":true,"example":"false"},{"in":"query","name":"anc_10e3_ul","type":"number","description":"Absolute neutrophil count in x10^3/uL (0-80). Kharbanda 2018 Table 3: if ANC < 14, add 1.77*sqrt(ANC); if ANC >= 14, add 6.62 instead of the sqrt term. Required; magent does not impute ANC from WBC.","required":true,"example":"2.0"}],"errors":[{"code":"invalid_parc","message":"pARC needs Kharbanda pediatric appendicitis inputs in published ranges. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/parc","citation":{"authors":"Kharbanda AB, Vazquez-Benitez G, Ballard DW, et al.","doi":"10.1542/peds.2017-2699","id":"kharbanda-2018","pmid":"29535251","source":"Pediatrics. 2018;141(4):e20172699","title":"Development and Validation of a Novel Pediatric Appendicitis Risk Calculator (pARC)","url":"https://doi.org/10.1542/peds.2017-2699"},"formula_expression":"L = -8.7 + 1.28*male + age_sex + pain_duration + 1.05*pain_with_walking + 0.46*pain_migration_rlq + 1.14*maximal_tenderness_rlq + 0.67*abdominal_guarding + anc (Kharbanda 2018 Table 3); age 5-7.9 y 0.38; male 5-7.9 y -1.05; age 8-13.9 y -0.72 (male 8-13.9 y and female 8-11.9 y); reference = male 14-18 y and female 12-18 y; duration lt_24 0, 24_lt_48 0.47, 48_96 0.10; ANC <14 x10^3/uL: 1.77*sqrt(ANC); ANC >=14: 6.62 instead of the sqrt term; estimated_probability = 1 / (1 + exp(-L)); estimated_probability_percent = 100 * estimated_probability","purpose":"Compute the Kharbanda 2018 Table 3 logistic probability of appendicitis from sex, age (5-18 years), pain duration, pain with walking, migration of pain to the RLQ, maximal tenderness in the RLQ, abdominal guarding, and ANC.","markdown_url":"https://magentlab.com/docs/parc.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"parc"},{"name":"formula_expression","type":"string","description":"Kharbanda 2018 Table 3 logistic expression"},{"name":"age_years","type":"integer","description":"Input age in years (5-18)"},{"name":"sex","type":"string","description":"female or male"},{"name":"pain_duration","type":"string","description":"lt_24, 24_lt_48, or 48_96"},{"name":"pain_with_walking","type":"boolean","description":"Caller-assigned pain with walking flag"},{"name":"pain_migration_rlq","type":"boolean","description":"Caller-assigned history of pain migration to the RLQ"},{"name":"maximal_tenderness_rlq","type":"boolean","description":"Caller-assigned maximal tenderness in the RLQ"},{"name":"abdominal_guarding","type":"boolean","description":"Caller-assigned abdominal guarding flag"},{"name":"anc_10e3_ul","type":"number","description":"Input ANC in x10^3/uL"},{"name":"logit","type":"number","description":"Kharbanda 2018 Table 3 linear predictor L, 4 decimal places"},{"name":"estimated_probability","type":"number","description":"1 / (1 + exp(-L)) from the unrounded logit, 6 decimal places. A probability, not a diagnosis."},{"name":"estimated_probability_percent","type":"number","description":"100 * estimated_probability from the unrounded logit, 2 decimal places. A probability, not a diagnosis or imaging order."},{"name":"citation","type":"object","description":"Kharbanda et al. Pediatrics 2018 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"abdominal_guarding":"false","age":"15","anc_10e3_ul":"2.0","maximal_tenderness_rlq":"false","pain_duration":"lt_24","pain_migration_rlq":"false","pain_with_walking":"false","sex":"female"},{"abdominal_guarding":"false","age":"15","anc_10e3_ul":"2.0","maximal_tenderness_rlq":"false","pain_duration":"lt_24","pain_migration_rlq":"false","pain_with_walking":"false","sex":"female"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/parc","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/parc?age=15&sex=female&pain_duration=lt_24&pain_with_walking=false&pain_migration_rlq=false&maximal_tenderness_rlq=false&abdominal_guarding=false&anc_10e3_ul=2.0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/parc","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/surgical-apgar","description":"Intraoperative Surgical Apgar (Gawande 2007 Table 1) from estimated blood loss, lowest mean arterial pressure, and lowest heart rate, summed to a 0–10 total. Returns score_le_4 because scores ≤4 were associated with 58.6% 30-day death or major complication in the validation cohort (9–10 associated with 3.6%). Deterministic published arithmetic with citation; not Virginia Apgar; not operative clearance.","parameters":[{"in":"query","name":"ebl_ml","type":"number","description":"Estimated intraoperative blood loss in mL (0.0-20000.0). Gawande 2007 Table 1: >1000 → 0, 601-1000 → 1, 101-600 → 2, ≤100 → 3.","required":true,"example":"50"},{"in":"query","name":"lowest_map_mm_hg","type":"number","description":"Lowest intraoperative mean arterial pressure in mm Hg (30.0-180.0). Gawande 2007 Table 1: <40 → 0, 40-54 → 1, 55-69 → 2, ≥70 → 3.","required":true,"example":"80"},{"in":"query","name":"lowest_heart_rate_bpm","type":"integer","description":"Lowest intraoperative heart rate in beats/min (integer 30-220). Gawande 2007 Table 1: >85 → 0, 76-85 → 1, 66-75 → 2, 56-65 → 3, ≤55 → 4.","required":true,"example":"60"}],"errors":[{"code":"invalid_ebl_ml","message":"ebl_ml must be a number from 0 to 20000. Returned before settlement; you are not charged.","status":400},{"code":"invalid_surgical_apgar_map","message":"lowest_map_mm_hg must be a number from 30 to 180. Returned before settlement; you are not charged.","status":400},{"code":"invalid_surgical_apgar_heart_rate","message":"lowest_heart_rate_bpm must be an integer from 30 to 220. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/surgical-apgar","citation":{"authors":"Gawande AA, Kwaan MR, Regenbogen SE, Lipsitz SA, Zinner MJ","doi":"10.1016/j.jamcollsurg.2006.11.011","id":"gawande-2007","pmid":"17254923","source":"J Am Coll Surg. 2007;204(2):201-208","title":"An Apgar score for surgery","url":"https://doi.org/10.1016/j.jamcollsurg.2006.11.011"},"formula_expression":"Surgical Apgar = ebl_points + lowest_map_points + lowest_hr_points; Gawande 2007 Table 1; max 10","purpose":"Compute the Gawande 2007 intraoperative Surgical Apgar score from estimated blood loss, lowest mean arterial pressure, and lowest heart rate.","markdown_url":"https://magentlab.com/docs/surgical-apgar.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"surgical_apgar"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Surgical Apgar points 0-10"},{"name":"max_score","type":"integer","description":"Always 10"},{"name":"score_le_4","type":"boolean","description":"true when score is ≤4. Gawande 2007 validation cohort associated scores ≤4 with 58.6% 30-day death or major complication, and scores 9-10 with 3.6%. Not an operative-clearance decision."},{"name":"ebl_ml","type":"number","description":"Estimated blood loss used, mL"},{"name":"lowest_map_mm_hg","type":"number","description":"Lowest intraoperative MAP used, mm Hg"},{"name":"lowest_heart_rate_bpm","type":"integer","description":"Lowest intraoperative heart rate used, bpm"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Gawande 2007 J Am Coll Surg citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"ebl_ml":"50","lowest_heart_rate_bpm":"60","lowest_map_mm_hg":"80"},{"ebl_ml":"50","lowest_heart_rate_bpm":"60","lowest_map_mm_hg":"80"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/surgical-apgar","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/surgical-apgar?ebl_ml=50&lowest_map_mm_hg=80&lowest_heart_rate_bpm=60","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/surgical-apgar","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/possum","description":"Copeland 1991 POSSUM surgical audit: 12 physiologic and 6 operative 1/2/4/8 items (age has no 8; ECG has no 2). Returns physiologic_score, operative_score, and estimated morbidity and mortality percents from the unrounded Copeland logits. Not P-POSSUM (Whiteley), not a diagnosis, not operative consent. magent does not examine the patient.","parameters":[{"in":"query","name":"age_years","type":"integer","description":"Age in years, integer 16-120 (Copeland 1991 Table 1). ≤60 → 1; 61-70 → 2; ≥71 → 4. No 8-point cell.","required":true,"example":"50"},{"in":"query","name":"cardiac","type":"string","enum":["no_failure","diuretic_digoxin_antianginal_or_hypertensive","peripheral_edema_warfarin_or_borderline_cardiomegaly","raised_jvp_or_cardiomegaly"],"description":"Copeland 1991 cardiac signs as assigned by the caller: no_failure (1); diuretic_digoxin_antianginal_or_hypertensive (2); peripheral_edema_warfarin_or_borderline_cardiomegaly (4); raised_jvp_or_cardiomegaly (8). magent does not examine the patient.","required":true,"example":"no_failure"},{"in":"query","name":"respiratory","type":"string","enum":["no_dyspnea","exertional_or_mild_coad","limiting_or_moderate_coad","rest_or_fibrosis_consolidation"],"description":"Copeland 1991 respiratory history as assigned by the caller: no_dyspnea (1); exertional_or_mild_coad (2); limiting_or_moderate_coad (4); rest_or_fibrosis_consolidation (8). magent does not examine the patient.","required":true,"example":"no_dyspnea"},{"in":"query","name":"systolic_bp_mm_hg","type":"number","description":"Systolic blood pressure in mm Hg (20-300). 110-130 → 1; 100-109 or 131-170 → 2; 90-99 or ≥171 → 4; ≤89 → 8. magent does not measure blood pressure.","required":true,"example":"120"},{"in":"query","name":"pulse","type":"integer","description":"Pulse in beats/min, integer 20-250. 50-80 → 1; 81-100 → 2; 40-49 or 101-120 → 4; ≤39 or ≥121 → 8. magent does not measure pulse.","required":true,"example":"70"},{"in":"query","name":"gcs","type":"integer","description":"Glasgow Coma Scale total as assigned by the caller, integer 3-15. 15 → 1; 12-14 → 2; 9-11 → 4; ≤8 → 8. magent does not examine the patient.","required":true,"example":"15"},{"in":"query","name":"hemoglobin_g_dl","type":"number","description":"Haemoglobin in g/dL (3-25). 13-16 → 1; 11.5-12.9 or 16.1-17.0 → 2; 10.0-11.4 or 17.1-18.0 → 4; ≤9.9 or ≥18.1 → 8.","required":true,"example":"14"},{"in":"query","name":"wbc_k_ul","type":"number","description":"White cell count in ×10^9/L (0.1-100). 4.0-10.0 → 1; 10.1-20.0 or 3.1-3.9 → 2; ≥20.1 → 4; ≤3.0 → 8. Table 1 lists 3.1-4.0 on the 2-point cell; 4.0 is scored in the 1-point band.","required":true,"example":"8"},{"in":"query","name":"urea_mmol_l","type":"number","description":"Serum urea in mmol/L (0.5-80). ≤7.5 → 1; 7.6-10.0 → 2; 10.1-15.0 → 4; ≥15.1 → 8.","required":true,"example":"5"},{"in":"query","name":"sodium_mmol_l","type":"number","description":"Serum sodium in mmol/L (90-200). ≥136 → 1; 131-135 → 2; 126-130 → 4; ≤125 → 8.","required":true,"example":"140"},{"in":"query","name":"potassium_mmol_l","type":"number","description":"Serum potassium in mmol/L (1-12). 3.5-5.0 → 1; 3.2-3.4 or 5.1-5.3 → 2; 2.9-3.1 or 5.4-5.9 → 4; ≤2.8 or ≥6.0 → 8.","required":true,"example":"4.0"},{"in":"query","name":"ecg","type":"string","enum":["normal","atrial_fibrillation_60_90","other_abnormal_or_ectopics_or_q_st_t"],"description":"Copeland 1991 electrocardiogram as assigned by the caller: normal (1); atrial_fibrillation_60_90 (4); other_abnormal_or_ectopics_or_q_st_t (8). No 2-point cell. magent does not interpret a tracing.","required":true,"example":"normal"},{"in":"query","name":"operative_severity","type":"string","enum":["minor","moderate","major","major_plus"],"description":"Copeland 1991 Table 2 operative severity as assigned by the caller: minor (1); moderate (2); major (4); major_plus (8). magent does not classify an operative note.","required":true,"example":"minor"},{"in":"query","name":"multiple_procedures","type":"string","enum":["one","two","more_than_two"],"description":"Number of procedures as assigned by the caller: one (1); two (4); more_than_two (8). No 2-point cell.","required":true,"example":"one"},{"in":"query","name":"blood_loss_ml","type":"number","description":"Total blood loss in mL (0-20000). ≤100 → 1; 101-500 → 2; 501-999 → 4; ≥1000 → 8. Table 2 writes <100 then 101-500; 100 mL is scored with the lowest band.","required":true,"example":"50"},{"in":"query","name":"peritoneal_soiling","type":"string","enum":["none","minor_serous","local_pus","free_bowel_pus_blood"],"description":"Copeland 1991 peritoneal soiling as assigned by the caller: none (1); minor_serous (2); local_pus (4); free_bowel_pus_blood (8). magent does not examine the patient.","required":true,"example":"none"},{"in":"query","name":"malignancy","type":"string","enum":["none","primary_only","nodal_metastases","distant_metastases"],"description":"Copeland 1991 presence of malignancy as assigned by the caller: none (1); primary_only (2); nodal_metastases (4); distant_metastases (8). magent does not diagnose.","required":true,"example":"none"},{"in":"query","name":"mode_of_surgery","type":"string","enum":["elective","emergency_resuscitation_gt_2h_or_lt_24h","immediate_lt_2h"],"description":"Copeland 1991 mode of surgery as assigned by the caller: elective (1); emergency_resuscitation_gt_2h_or_lt_24h (4); immediate_lt_2h (8). No 2-point cell.","required":true,"example":"elective"}],"errors":[{"code":"invalid_possum","message":"POSSUM needs Copeland 1991 physiologic and operative severity items in published ranges. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/possum","citation":{"authors":"Copeland GP, Jones D, Walters M","doi":"10.1002/bjs.1800780327","id":"copeland-1991","pmid":"2021856","source":"Br J Surg. 1991;78(3):355-360","title":"POSSUM: a scoring system for surgical audit","url":"https://doi.org/10.1002/bjs.1800780327"},"formula_expression":"physiologic_score = sum of 12 Copeland 1991 Table 1 items (1/2/4/8; age has no 8, ECG has no 2); operative_score = sum of 6 Table 2 items (1/2/4/8; multiple_procedures and mode_of_surgery have no 2); ln[R/(1-R)] morbidity = -5.91 + 0.16*physiologic_score + 0.19*operative_score; ln[R/(1-R)] mortality = -7.04 + 0.13*physiologic_score + 0.16*operative_score; estimated_morbidity_percent and estimated_mortality_percent = 100 * exp(logit)/(1+exp(logit)) from the unrounded logit","purpose":"Sum Copeland 1991 Table 1 physiologic and Table 2 operative severity items, then return the published morbidity and mortality probabilities from the unrounded logits.","markdown_url":"https://magentlab.com/docs/possum.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"possum"},{"name":"formula_expression","type":"string","description":"Copeland 1991 Tables 1-2 and logits"},{"name":"physiologic_score","type":"integer","description":"Sum of 12 Table 1 items (min 12; item maxima sum to 92)"},{"name":"operative_score","type":"integer","description":"Sum of 6 Table 2 items (min 6; item maxima sum to 48)"},{"name":"morbidity_logit","type":"number","description":"Copeland 1991 morbidity logit, 2 decimal places"},{"name":"mortality_logit","type":"number","description":"Copeland 1991 mortality logit, 2 decimal places"},{"name":"estimated_morbidity_percent","type":"number","description":"100 * exp(logit)/(1+exp(logit)) from the unrounded morbidity logit, 2 decimals. An audit probability, not a diagnosis."},{"name":"estimated_mortality_percent","type":"number","description":"100 * exp(logit)/(1+exp(logit)) from the unrounded mortality logit, 2 decimals. An audit probability, not operative consent."},{"name":"components","type":"array","description":"Eighteen Table 1 and Table 2 rows"},{"name":"citation","type":"object","description":"Copeland 1991 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age_years":"50","blood_loss_ml":"50","cardiac":"no_failure","ecg":"normal","gcs":"15","hemoglobin_g_dl":"14","malignancy":"none","mode_of_surgery":"elective","multiple_procedures":"one","operative_severity":"minor","peritoneal_soiling":"none","potassium_mmol_l":"4.0","pulse":"70","respiratory":"no_dyspnea","sodium_mmol_l":"140","systolic_bp_mm_hg":"120","urea_mmol_l":"5","wbc_k_ul":"8"},{"age_years":"50","blood_loss_ml":"50","cardiac":"no_failure","ecg":"normal","gcs":"15","hemoglobin_g_dl":"14","malignancy":"none","mode_of_surgery":"elective","multiple_procedures":"one","operative_severity":"minor","peritoneal_soiling":"none","potassium_mmol_l":"4.0","pulse":"70","respiratory":"no_dyspnea","sodium_mmol_l":"140","systolic_bp_mm_hg":"120","urea_mmol_l":"5","wbc_k_ul":"8"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/possum","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/possum?age_years=50&cardiac=no_failure&respiratory=no_dyspnea&systolic_bp_mm_hg=120&pulse=70&gcs=15&hemoglobin_g_dl=14&wbc_k_ul=8&urea_mmol_l=5&sodium_mmol_l=140&potassium_mmol_l=4.0&ecg=normal&operative_severity=minor&multiple_procedures=one&blood_loss_ml=50&peritoneal_soiling=none&malignancy=none&mode_of_surgery=elective","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/possum","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/pmp","description":"Ghanem 2012 Table 5 bedside preoperative mortality predictor. Inpatient 6, sepsis 4, poor functional status (total ADL assistance) 3, disseminated cancer 1, age (≥80 → 2; 70–79 → 1; 65–69 → 0.5; else 0), cardiac 5, pulmonary 3, renal 1, liver 1, chronic steroid 1, >10% weight loss 1, bleeding disorder 1, DNR 1, obesity −1. Range −1 to 30. Figure 3: <1% died in 0–5, 73% in 20–30. Not a go/no-go for surgery.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Ghanem 2012 Table 5: ≥80 → 2; 70–79 → 1; 65–69 → 0.5; <65 → 0. Age 65 and 69 score 0.5; 70 and 79 score 1; 80 scores 2. Table 5 only (not the Discussion 1 / 1.5 / 2.5 wording).","required":true,"example":"50"},{"in":"query","name":"inpatient","type":"boolean","description":"Inpatient status (Ghanem 2012 Table 5). true scores 6. Caller-assigned; magent does not classify admission status.","required":true,"example":"false"},{"in":"query","name":"sepsis","type":"boolean","description":"Preoperative sepsis as assigned by the caller (Ghanem 2012 Table 5). true scores 4. magent does not diagnose sepsis.","required":true,"example":"false"},{"in":"query","name":"poor_functional_status","type":"boolean","description":"Poor functional status: total assistance required for all daily activities (Ghanem 2012 Table 5 / NSQIP totally dependent). true scores 3. magent does not assign functional status.","required":true,"example":"false"},{"in":"query","name":"disseminated_cancer","type":"boolean","description":"Disseminated cancer as assigned by the caller (Ghanem 2012 Table 5). true scores 1. magent does not diagnose cancer.","required":true,"example":"false"},{"in":"query","name":"cardiac_comorbidity","type":"boolean","description":"Cardiac comorbidity as assigned by the caller (Ghanem 2012: dyspnea, heart failure, myocardial infarction, angina, peripheral artery disease, or hypertension requiring medication). true scores 5. magent does not diagnose cardiac disease.","required":true,"example":"false"},{"in":"query","name":"pulmonary_comorbidity","type":"boolean","description":"Pulmonary comorbidity as assigned by the caller (Ghanem 2012: ventilator, COPD, or current pneumonia). true scores 3. magent does not diagnose lung disease.","required":true,"example":"false"},{"in":"query","name":"renal_comorbidity","type":"boolean","description":"Renal comorbidity as assigned by the caller (Ghanem 2012: dialysis or renal failure). true scores 1. magent does not grade kidney disease.","required":true,"example":"false"},{"in":"query","name":"liver_comorbidity","type":"boolean","description":"Liver comorbidity as assigned by the caller (Ghanem 2012: ascites or esophageal varices). true scores 1. magent does not grade liver disease.","required":true,"example":"false"},{"in":"query","name":"steroid_chronic","type":"boolean","description":"Steroid for a chronic condition (Ghanem 2012 Table 5). true scores 1. magent does not read a medication list.","required":true,"example":"false"},{"in":"query","name":"weight_loss_gt_10_percent","type":"boolean","description":"Loss of >10% body weight in the last 6 months (Ghanem 2012 Table 5). true scores 1. magent does not compute weight change.","required":true,"example":"false"},{"in":"query","name":"bleeding_disorder","type":"boolean","description":"Bleeding disorder as assigned by the caller (Ghanem 2012 Table 5). true scores 1. magent does not diagnose coagulopathy.","required":true,"example":"false"},{"in":"query","name":"dnr","type":"boolean","description":"Do-not-resuscitate directive (Ghanem 2012 Table 5). true scores 1. magent does not read code-status orders.","required":true,"example":"false"},{"in":"query","name":"obesity","type":"boolean","description":"Obesity as assigned by the caller (Ghanem 2012 Table 5). true scores −1. magent does not compute BMI.","required":true,"example":"true"}],"errors":[{"code":"invalid_pmp","message":"PMP needs Ghanem 2012 bedside preoperative flags and age band in published ranges. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/pmp","citation":{"authors":"Vaid S, Bell T, Grim R, Ahuja V","doi":"10.7812/TPP/12-019","id":"ghanem-2012","pmid":"23251111","source":"Perm J. 2012;16(4):10-16","title":"Predicting Risk of Death in General Surgery Patients on the Basis of Preoperative Variables Using American College of Surgeons National Surgical Quality Improvement Program Data","url":"https://doi.org/10.7812/TPP/12-019"},"formula_expression":"PMP = inpatient 6 + sepsis 4 + poor_functional_status 3 + disseminated_cancer 1 + age (>=80 -> 2; 70-79 -> 1; 65-69 -> 0.5; <65 -> 0) + cardiac_comorbidity 5 + pulmonary_comorbidity 3 + renal_comorbidity 1 + liver_comorbidity 1 + steroid_chronic 1 + weight_loss_gt_10_percent 1 + bleeding_disorder 1 + dnr 1 + obesity -1; Ghanem 2012 Table 5 bedside scoresheet; published range -1 through 30; Figure 3 <1% died in 0-5 and 73% died in 20-30; pmp_ge_20 is the 20-30 interval isolate","purpose":"Sum the Ghanem 2012 Table 5 bedside preoperative mortality predictor and return the −1 to 30 total plus the printed Figure 3 0–5 and 20–30 interval facts.","markdown_url":"https://magentlab.com/docs/pmp.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"pmp"},{"name":"formula_expression","type":"string","description":"Exact Ghanem 2012 Table 5 bedside expression"},{"name":"score","type":"number","description":"Table 5 PMP points; published range −1 through 30. Age 65–69 contributes 0.5."},{"name":"max_score","type":"integer","description":"30 (Table 5 highest possible score)"},{"name":"age_years","type":"integer","description":"Age in years used for the age band"},{"name":"pmp_ge_20","type":"boolean","description":"true when score ≥ 20, isolating the Figure 3 20–30 interval (73% died in that cohort group). Not a go/no-go for surgery."},{"name":"score_interval","type":"string","description":"Figure 3 printed intervals only: 0-5 or 20-30. Null when the total is outside those ranges. magent does not invent other labels."},{"name":"figure3_died_percent","type":"string","description":"Published Figure 3 cohort facts: <1% in 0–5, 73% in 20–30. Null outside those intervals. A group percent, not an individual probability."},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Ghanem 2012 Permanente Journal citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"50","bleeding_disorder":"false","cardiac_comorbidity":"false","disseminated_cancer":"false","dnr":"false","inpatient":"false","liver_comorbidity":"false","obesity":"true","poor_functional_status":"false","pulmonary_comorbidity":"false","renal_comorbidity":"false","sepsis":"false","steroid_chronic":"false","weight_loss_gt_10_percent":"false"},{"age":"50","bleeding_disorder":"false","cardiac_comorbidity":"false","disseminated_cancer":"false","dnr":"false","inpatient":"false","liver_comorbidity":"false","obesity":"true","poor_functional_status":"false","pulmonary_comorbidity":"false","renal_comorbidity":"false","sepsis":"false","steroid_chronic":"false","weight_loss_gt_10_percent":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/pmp","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/pmp?age=50&inpatient=false&sepsis=false&poor_functional_status=false&disseminated_cancer=false&cardiac_comorbidity=false&pulmonary_comorbidity=false&renal_comorbidity=false&liver_comorbidity=false&steroid_chronic=false&weight_loss_gt_10_percent=false&bleeding_disorder=false&dnr=false&obesity=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/pmp","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/os-mrs","description":"DeMaria 2007 obesity surgery mortality risk score (OS-MRS): five caller-assigned flags (BMI ≥50 kg/m², male, hypertension, known PE risk, age ≥45), 1 point each, max 5. Class A 0–1, B 2–3, C 4–5. Deterministic published score with citation; not a surgical clearance and not a mortality percentage. magent does not weigh the patient or measure age.","parameters":[{"in":"query","name":"bmi_ge_50","type":"boolean","description":"BMI ≥50 kg/m² (DeMaria 2007). true or false as assigned by the caller. magent does not weigh the patient or compute BMI.","required":true,"example":"false"},{"in":"query","name":"male","type":"boolean","description":"Male sex (DeMaria 2007). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"hypertension","type":"boolean","description":"Hypertension (DeMaria 2007). true or false as assigned by the caller. magent does not measure blood pressure.","required":true,"example":"false"},{"in":"query","name":"pe_risk_factors","type":"boolean","description":"Known PE risk: previous thromboembolism, preoperative vena cava filter, hypoventilation, or pulmonary hypertension (DeMaria 2007). true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"age_ge_45","type":"boolean","description":"Age ≥45 years (DeMaria 2007). true or false as assigned by the caller. magent does not measure age.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/os-mrs","citation":{"authors":"DeMaria EJ, Portenier D, Wolfe L","doi":"10.1016/j.soard.2007.01.005","id":"demaria-2007","pmid":"17386394","source":"Surg Obes Relat Dis. 2007;3(2):134-140","title":"Obesity surgery mortality risk score: proposal for a clinically useful score to predict mortality risk in patients undergoing gastric bypass","url":"https://doi.org/10.1016/j.soard.2007.01.005"},"formula_expression":"OS-MRS = bmi_ge_50 + male + hypertension + pe_risk_factors + age_ge_45; each 1 if true; max 5; class A 0-1, B 2-3, C 4-5","purpose":"Sum the five DeMaria 2007 obesity surgery mortality risk score flags and return class A–C.","markdown_url":"https://magentlab.com/docs/os-mrs.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"os_mrs"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"OS-MRS points 0-5"},{"name":"max_score","type":"integer","description":"5"},{"name":"class","type":"string","description":"DeMaria 2007 class A (0-1), B (2-3), or C (4-5). Not a surgical clearance or mortality probability."},{"name":"components","type":"array","description":"Per-flag points"},{"name":"citation","type":"object","description":"DeMaria Surg Obes Relat Dis 2007 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age_ge_45":"false","bmi_ge_50":"false","hypertension":"false","male":"false","pe_risk_factors":"false"},{"age_ge_45":"false","bmi_ge_50":"false","hypertension":"false","male":"false","pe_risk_factors":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/os-mrs","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/os-mrs?bmi_ge_50=false&male=false&hypertension=false&pe_risk_factors=false&age_ge_45=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/os-mrs","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/ciwa-ar","description":"Sullivan 1989 CIWA-Ar (revised Clinical Institute Withdrawal Assessment for Alcohol). Ten caller-assigned integers: nausea/vomiting, tremor, paroxysmal sweats, anxiety, agitation, tactile, auditory, visual, and headache each 0-7; orientation 0-4 (not 0-7). Max 67. magent sums only and does not observe the patient or apply later protocol treatment cutoffs such as benzodiazepine orders. Not a diagnosis and not a medical device.","parameters":[{"in":"query","name":"nausea_vomiting","type":"integer","description":"Caller-assigned Sullivan 1989 nausea and vomiting points (integer 0-7). magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"tremor","type":"integer","description":"Caller-assigned Sullivan 1989 tremor points (integer 0-7). magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"paroxysmal_sweats","type":"integer","description":"Caller-assigned Sullivan 1989 paroxysmal sweats points (integer 0-7). magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"anxiety","type":"integer","description":"Caller-assigned Sullivan 1989 anxiety points (integer 0-7). magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"agitation","type":"integer","description":"Caller-assigned Sullivan 1989 agitation points (integer 0-7). magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"tactile","type":"integer","description":"Caller-assigned Sullivan 1989 tactile disturbances points (integer 0-7). magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"auditory","type":"integer","description":"Caller-assigned Sullivan 1989 auditory disturbances points (integer 0-7). magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"visual","type":"integer","description":"Caller-assigned Sullivan 1989 visual disturbances points (integer 0-7). magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"headache","type":"integer","description":"Caller-assigned Sullivan 1989 headache / fullness in head points (integer 0-7). magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"orientation","type":"integer","description":"Caller-assigned Sullivan 1989 orientation and clouding of sensorium (integer 0-4). This item is not 0-7. magent does not observe the patient.","required":true,"example":"0"}],"errors":[{"code":"invalid_ciwa_item","message":"nausea_vomiting, tremor, paroxysmal_sweats, anxiety, agitation, tactile, auditory, visual, and headache must each be an integer from 0 to 7 (Sullivan 1989). Returned before settlement; you are not charged.","status":400},{"code":"invalid_ciwa_orientation","message":"orientation must be an integer from 0 to 4 (Sullivan 1989). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/ciwa-ar","citation":{"authors":"Sullivan JT, Sykora K, Schneiderman J, Naranjo CA, Sellers EM","doi":"10.1111/j.1360-0443.1989.tb00737.x","id":"sullivan-1989","pmid":"2597811","source":"Br J Addict. 1989;84(11):1353-1357","title":"Assessment of alcohol withdrawal: the revised clinical institute withdrawal assessment for alcohol scale (CIWA-Ar)","url":"https://doi.org/10.1111/j.1360-0443.1989.tb00737.x"},"formula_expression":"CIWA-Ar = nausea_vomiting + tremor + paroxysmal_sweats + anxiety + agitation + tactile + auditory + visual + headache + orientation; nine items 0-7, orientation 0-4; max 67","purpose":"Sum the ten Sullivan 1989 CIWA-Ar items (nine caller-assigned 0-7 plus orientation 0-4) and return the published total (max 67).","markdown_url":"https://magentlab.com/docs/ciwa-ar.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"ciwa_ar"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"CIWA-Ar points 0-67"},{"name":"max_score","type":"integer","description":"67"},{"name":"components","type":"array","description":"Per-item caller-assigned points"},{"name":"citation","type":"object","description":"Sullivan et al. Br J Addict 1989 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"agitation":"0","anxiety":"0","auditory":"0","headache":"0","nausea_vomiting":"0","orientation":"0","paroxysmal_sweats":"0","tactile":"0","tremor":"0","visual":"0"},{"agitation":"0","anxiety":"0","auditory":"0","headache":"0","nausea_vomiting":"0","orientation":"0","paroxysmal_sweats":"0","tactile":"0","tremor":"0","visual":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/ciwa-ar","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/ciwa-ar?nausea_vomiting=0&tremor=0&paroxysmal_sweats=0&anxiety=0&agitation=0&tactile=0&auditory=0&visual=0&headache=0&orientation=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/ciwa-ar","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/mminds","description":"DeCarolis 2007 MINDS (Minnesota Detoxification Scale) 0-46: pulse and diastolic BP lt_90/90_to_110/gt_110 → 0/1/2; tremor and sweat 0/2/4/6; hallucinations 0-3; agitation 0/3/6/9; orientation 0/2/4/6 (intubated 0); delusions and seizures 6 if true. magent publishes those DeCarolis 2007 weights, not a RASS modification, and does not examine the patient. Not a benzodiazepine order.","parameters":[{"in":"query","name":"pulse","type":"string","enum":["lt_90","90_to_110","gt_110"],"description":"Caller-assigned DeCarolis 2007 pulse band: lt_90 (0; pulse <90), 90_to_110 (1), or gt_110 (2; pulse >110). magent does not measure pulse.","required":true,"example":"lt_90"},{"in":"query","name":"diastolic_bp","type":"string","enum":["lt_90","90_to_110","gt_110"],"description":"Caller-assigned DeCarolis 2007 diastolic blood-pressure band: lt_90 (0; DBP <90), 90_to_110 (1), or gt_110 (2; DBP >110). magent does not measure blood pressure.","required":true,"example":"lt_90"},{"in":"query","name":"tremor","type":"string","enum":["absent","visible","moderate","severe"],"description":"Caller-assigned DeCarolis 2007 tremor: absent (0), visible (2), moderate (4), or severe (6). magent does not examine the patient.","required":true,"example":"absent"},{"in":"query","name":"sweat","type":"string","enum":["absent","moist_palms","beads","drenching"],"description":"Caller-assigned DeCarolis 2007 sweat: absent (0), moist_palms (2), beads (4), or drenching (6). magent does not examine the patient.","required":true,"example":"absent"},{"in":"query","name":"hallucinations","type":"string","enum":["absent","mild","moderate_intermittent","severe_continuous"],"description":"Caller-assigned DeCarolis 2007 hallucinations: absent (0), mild (1), moderate_intermittent (2), or severe_continuous (3). magent does not examine the patient.","required":true,"example":"absent"},{"in":"query","name":"agitation","type":"string","enum":["normal","somewhat_greater","moderately_fidgety","pacing_thrashing"],"description":"Caller-assigned DeCarolis 2007 agitation: normal (0), somewhat_greater (3), moderately_fidgety (6), or pacing_thrashing (9). Not a RASS item. magent does not examine the patient.","required":true,"example":"normal"},{"in":"query","name":"orientation","type":"string","enum":["x3","x2","x1","disoriented","intubated"],"description":"Caller-assigned DeCarolis 2007 orientation: x3 (0), x2 (2), x1 (4), disoriented (6), or intubated (0). magent does not examine the patient.","required":true,"example":"x3"},{"in":"query","name":"delusions","type":"boolean","description":"Caller-assigned DeCarolis 2007 delusions. true scores 6. magent does not examine the patient.","required":true,"example":false},{"in":"query","name":"seizures","type":"boolean","description":"Caller-assigned DeCarolis 2007 seizures. true scores 6. magent does not examine the patient.","required":true,"example":false}],"errors":[{"code":"invalid_mminds","message":"MINDS inputs must match DeCarolis 2007 pulse, diastolic blood pressure, tremor, sweat, hallucinations, agitation, orientation, delusions, and seizures. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/mminds","citation":{"authors":"DeCarolis DD, Rice KL, Ho L, Willenbring ML, Stock CJ","doi":"10.1592/phco.27.4.510","id":"decarolis-2007-minds","pmid":"17381377","source":"Pharmacotherapy. 2007;27(4):510-518","title":"Symptom-driven lorazepam protocol for treatment of severe alcohol withdrawal delirium in the intensive care unit","url":"https://doi.org/10.1592/phco.27.4.510"},"formula_expression":"MINDS = pulse (lt_90 0, 90_to_110 1, gt_110 2) + diastolic_bp (lt_90 0, 90_to_110 1, gt_110 2) + tremor (absent 0, visible 2, moderate 4, severe 6) + sweat (absent 0, moist_palms 2, beads 4, drenching 6) + hallucinations (absent 0, mild 1, moderate_intermittent 2, severe_continuous 3) + agitation (normal 0, somewhat_greater 3, moderately_fidgety 6, pacing_thrashing 9) + orientation (x3 0, x2 2, x1 4, disoriented 6, intubated 0) + delusions (true 6) + seizures (true 6); DeCarolis 2007 Minnesota Detoxification Scale; max 46; not a RASS modification; no published total-score severity or lorazepam-dose bands","purpose":"Sum nine caller-assigned DeCarolis 2007 MINDS items and return the published total (max 46). Does not return severity bands, lorazepam doses, or a RASS-mapped agitation item.","markdown_url":"https://magentlab.com/docs/mminds.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"mminds"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"DeCarolis 2007 MINDS points 0-46"},{"name":"max_score","type":"integer","description":"Always 46"},{"name":"components","type":"array","description":"Per-item caller-assigned DeCarolis 2007 points"},{"name":"citation","type":"object","description":"DeCarolis et al. Pharmacotherapy 2007 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"agitation":"normal","delusions":"false","diastolic_bp":"lt_90","hallucinations":"absent","orientation":"x3","pulse":"lt_90","seizures":"false","sweat":"absent","tremor":"absent"},{"agitation":"normal","delusions":"false","diastolic_bp":"lt_90","hallucinations":"absent","orientation":"x3","pulse":"lt_90","seizures":"false","sweat":"absent","tremor":"absent"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/mminds","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/mminds?pulse=lt_90&diastolic_bp=lt_90&tremor=absent&sweat=absent&hallucinations=absent&agitation=normal&orientation=x3&delusions=false&seizures=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/mminds","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/hii","description":"Hack 2014 H-Impairment Index (HII). Five caller-assigned bedside tasks (gross motor, mentation and speech, tracing curve, nystagmus, finger-to-nose), each integer 0-4. HII is completed-sum / (4 × completed tasks); denominator 20 if all five; range 0-1. Omit a task that was not attempted. Serial decline is not modeled. Does not take blood alcohol concentration. Not a diagnosis, discharge order, or legal sobriety test. magent does not examine the patient.","parameters":[{"in":"query","name":"gross_motor","type":"integer","enum":[0,1,2,3,4],"description":"Caller-assigned Hack 2014 HII gross motor function (integer 0-4). Omit when that task was not attempted. magent does not examine the patient.","required":false,"example":"0"},{"in":"query","name":"mentation_speech","type":"integer","enum":[0,1,2,3,4],"description":"Caller-assigned Hack 2014 HII mentation and speech (integer 0-4). Omit when that task was not attempted. magent does not examine the patient.","required":false,"example":"0"},{"in":"query","name":"tracing_curve","type":"integer","enum":[0,1,2,3,4],"description":"Caller-assigned Hack 2014 HII tracing curve (integer 0-4). Omit when that task was not attempted. magent does not examine the patient.","required":false,"example":"0"},{"in":"query","name":"nystagmus","type":"integer","enum":[0,1,2,3,4],"description":"Caller-assigned Hack 2014 HII nystagmus (integer 0-4). Omit when that task was not attempted. magent does not examine the patient.","required":false,"example":"0"},{"in":"query","name":"finger_to_nose","type":"integer","enum":[0,1,2,3,4],"description":"Caller-assigned Hack 2014 HII finger-to-nose (integer 0-4). Omit when that task was not attempted. magent does not examine the patient.","required":false,"example":"0"}],"errors":[{"code":"invalid_hii_task","message":"each Hack 2014 HII task must be an integer from 0 to 4 (or omitted when that task was not attempted). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/hii","citation":{"authors":"Hack JB, Goldlust EJ, Gibbs F, Zink BJ","doi":"10.3109/00952990.2013.865034","id":"hack-2014","pmid":"24555813","source":"Am J Drug Alcohol Abuse. 2014;40(2):111-117","title":"The H-Impairment Index (HII): a standardized assessment of alcohol-induced impairment in the Emergency Department","url":"https://doi.org/10.3109/00952990.2013.865034"},"formula_expression":"HII = (gross_motor + mentation_speech + tracing_curve + nystagmus + finger_to_nose) / (4 × tasks_completed); each completed task a caller-assigned integer 0-4; omitted tasks excluded from numerator and denominator; max denominator 20 if all five completed; range 0-1; current index only","purpose":"Return the Hack 2014 H-Impairment Index (sum of completed 0-4 task scores divided by 4 times the number of tasks completed).","markdown_url":"https://magentlab.com/docs/hii.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"hii"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"number","description":"Hack 2014 HII (completed sum / (4 × tasks completed)); range 0-1"},{"name":"max_score","type":"integer","description":"Always 1 (published HII ceiling)"},{"name":"task_sum","type":"integer","description":"Sum of completed caller-assigned task scores"},{"name":"tasks_completed","type":"integer","description":"Count of tasks that were attempted (1-5)"},{"name":"max_points","type":"integer","description":"4 × tasks_completed (20 if all five completed)"},{"name":"components","type":"array","description":"Per-task points; omitted tasks have present false and do not enter the index"},{"name":"citation","type":"object","description":"Hack et al. Am J Drug Alcohol Abuse 2014 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"finger_to_nose":"0","gross_motor":"0","mentation_speech":"0","nystagmus":"0","tracing_curve":"0"},{"finger_to_nose":"0","gross_motor":"0","mentation_speech":"0","nystagmus":"0","tracing_curve":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/hii","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/hii?gross_motor=0&mentation_speech=0&tracing_curve=0&nystagmus=0&finger_to_nose=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/hii","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/ciwa-b","description":"Busto 1989 CIWA-B: twenty caller-assigned 0-4 items summed (max 80). Optional hours of sleep and minutes to fall asleep are recorded only and are not in the total. magent does not observe the patient and does not apply later mild-to-very-severe manuals. Not a benzodiazepine prescription and not a medical device.","parameters":[{"in":"query","name":"restlessness","type":"integer","description":"Caller-assigned Busto 1989 observation of restlessness and agitation (integer 0-4). magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"tremor","type":"integer","description":"Caller-assigned Busto 1989 tremor with arms extended and fingers apart (integer 0-4). magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"sweating","type":"integer","description":"Caller-assigned Busto 1989 sweating, including palms (integer 0-4). magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"irritability","type":"integer","description":"Caller-assigned Busto 1989 irritability (Do you feel irritable?; integer 0-4). magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"fatigue","type":"integer","description":"Caller-assigned Busto 1989 fatigue (Do you feel fatigued / tired?; integer 0-4). magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"tension","type":"integer","description":"Caller-assigned Busto 1989 tension (Do you feel tense?; integer 0-4). magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"concentration","type":"integer","description":"Caller-assigned Busto 1989 difficulty concentrating (integer 0-4). magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"appetite","type":"integer","description":"Caller-assigned Busto 1989 loss of appetite (integer 0-4). magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"numbness","type":"integer","description":"Caller-assigned Busto 1989 numbness or burning in the face, hands, or feet (integer 0-4). magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"palpitations","type":"integer","description":"Caller-assigned Busto 1989 heart racing / palpitations (integer 0-4). magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"headache","type":"integer","description":"Caller-assigned Busto 1989 head full or achy (integer 0-4). magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"muscle_aches","type":"integer","description":"Caller-assigned Busto 1989 muscle aches or stiffness (integer 0-4). magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"anxiety","type":"integer","description":"Caller-assigned Busto 1989 anxious, nervous, or jittery (integer 0-4). magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"upset","type":"integer","description":"Caller-assigned Busto 1989 upset (Do you feel upset?; integer 0-4). magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"sleep_restfulness","type":"integer","description":"Caller-assigned Busto 1989 how restful was your sleep last night (integer 0-4). magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"weakness","type":"integer","description":"Caller-assigned Busto 1989 weakness (Do you feel weak?; integer 0-4). magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"enough_sleep","type":"integer","description":"Caller-assigned Busto 1989 whether you had enough sleep last night (integer 0-4). magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"visual_disturbances","type":"integer","description":"Caller-assigned Busto 1989 visual disturbances (sensitivity to light, blurred vision; integer 0-4). magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"fear","type":"integer","description":"Caller-assigned Busto 1989 fear (Are you fearful?; integer 0-4). magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"worry","type":"integer","description":"Caller-assigned Busto 1989 worrying about possible misfortunes lately (integer 0-4). magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"hours_of_sleep","type":"integer","description":"Optional Busto 1989 recorded hours of sleep last night (integer 0-24). Not added to the CIWA-B total. magent does not observe the patient.","required":false,"example":"8"},{"in":"query","name":"minutes_to_fall_asleep","type":"integer","description":"Optional Busto 1989 recorded minutes to fall asleep last night (integer 0-1440). Not added to the CIWA-B total. magent does not observe the patient.","required":false,"example":"15"}],"errors":[{"code":"invalid_ciwa_b","message":"CIWA-B needs the twenty Busto 1989 0-4 items (not a benzodiazepine prescription). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/ciwa-b","citation":{"authors":"Busto UE, Sykora K, Sellers EM","doi":"10.1097/00004714-198912000-00005","id":"busto-1989","pmid":"2574193","source":"J Clin Psychopharmacol. 1989;9(6):412-416","title":"A clinical scale to assess benzodiazepine withdrawal","url":"https://doi.org/10.1097/00004714-198912000-00005"},"formula_expression":"CIWA-B = restlessness + tremor + sweating + irritability + fatigue + tension + concentration + appetite + numbness + palpitations + headache + muscle_aches + anxiety + upset + sleep_restfulness + weakness + enough_sleep + visual_disturbances + fear + worry; each caller-assigned 0-4; max 80; Busto 1989; hours_of_sleep and minutes_to_fall_asleep recorded only, not in the total; no published total-score severity bands","purpose":"Sum the twenty Busto 1989 CIWA-B items (each caller-assigned integer 0-4) and return the published total (max 80). Hours of sleep and minutes to fall asleep are recorded only.","markdown_url":"https://magentlab.com/docs/ciwa-b.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"ciwa_b"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Busto 1989 CIWA-B sum of twenty caller-assigned 0-4 items (0-80)"},{"name":"max_score","type":"integer","description":"Always 80"},{"name":"components","type":"array","description":"Per-item caller-assigned points"},{"name":"hours_of_sleep","type":"integer","description":"Optional recorded hours of sleep last night; not in the total"},{"name":"minutes_to_fall_asleep","type":"integer","description":"Optional recorded minutes to fall asleep last night; not in the total"},{"name":"citation","type":"object","description":"Busto et al. J Clin Psychopharmacol 1989 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"anxiety":"0","appetite":"0","concentration":"0","enough_sleep":"0","fatigue":"0","fear":"0","headache":"0","irritability":"0","muscle_aches":"0","numbness":"0","palpitations":"0","restlessness":"0","sleep_restfulness":"0","sweating":"0","tension":"0","tremor":"0","upset":"0","visual_disturbances":"0","weakness":"0","worry":"0"},{"anxiety":"0","appetite":"0","concentration":"0","enough_sleep":"0","fatigue":"0","fear":"0","headache":"0","irritability":"0","muscle_aches":"0","numbness":"0","palpitations":"0","restlessness":"0","sleep_restfulness":"0","sweating":"0","tension":"0","tremor":"0","upset":"0","visual_disturbances":"0","weakness":"0","worry":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/ciwa-b","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/ciwa-b?restlessness=0&tremor=0&sweating=0&irritability=0&fatigue=0&tension=0&concentration=0&appetite=0&numbness=0&palpitations=0&headache=0&muscle_aches=0&anxiety=0&upset=0&sleep_restfulness=0&weakness=0&enough_sleep=0&visual_disturbances=0&fear=0&worry=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/ciwa-b","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/bars","description":"Swift 2002 Behavioural Activity Rating Scale (BARS): caller-assigned integer 1-7 (difficult or unable to rouse; asleep but responds normally to verbal or physical contact; drowsy, appears sedated; quiet and awake, normal activity; signs of overt physical or verbal activity, calms with instructions; extremely or continuously active, not requiring restraint; violent, requires restraint). Returns score, max 7, and a stable label. Not RASS and not a diagnosis. magent does not observe the patient.","parameters":[{"in":"query","name":"bars","type":"integer","description":"Swift 2002 Behavioural Activity Rating Scale integer 1, 2, 3, 4, 5, 6, or 7 as assigned by the caller (1 difficult or unable to rouse; 2 asleep but responds normally to verbal or physical contact; 3 drowsy, appears sedated; 4 quiet and awake, normal level of activity; 5 signs of overt physical or verbal activity, calms with instructions; 6 extremely or continuously active, not requiring restraint; 7 violent, requires restraint). magent does not observe the patient.","required":true,"example":"4"}],"errors":[{"code":"invalid_bars","message":"BARS needs bars as an integer from 1 to 7 (Swift 2002). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/bars","citation":{"authors":"Swift RH, Harrigan EP, Cappelleri JC, Kramer D, Chandler LP","doi":"10.1016/s0022-3956(01)00052-8","id":"swift-2002","pmid":"11777497","source":"J Psychiatr Res. 2002;36(2):87-95","title":"Validation of the Behavioural Activity Rating Scale (BARS): a novel measure of activity in agitated patients","url":"https://doi.org/10.1016/s0022-3956(01)00052-8"},"formula_expression":"BARS = caller-assigned integer 1, 2, 3, 4, 5, 6, or 7 (Swift 2002); max 7","purpose":"Return the Swift 2002 Behavioural Activity Rating Scale (BARS) 1-7 from a caller-assigned integer, with a stable label.","markdown_url":"https://magentlab.com/docs/bars.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"bars"},{"name":"formula_expression","type":"string","description":"Published BARS integer rule"},{"name":"score","type":"integer","description":"Same as bars (1-7)"},{"name":"max_score","type":"integer","description":"7"},{"name":"bars","type":"integer","description":"Caller-assigned Swift 2002 BARS integer 1-7"},{"name":"bars_label","type":"string","description":"Stable token for that integer: difficult_to_rouse, asleep_but_responds, drowsy_appears_sedated, quiet_and_awake, signs_of_overt_activity, extremely_or_continuously_active, or violent_requires_restraint"},{"name":"components","type":"array","description":"bars component"},{"name":"citation","type":"object","description":"Swift 2002"},{"name":"disclaimer","type":"string","description":"Not a medical device"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"bars":"4"},{"bars":"4"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/bars","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/bars?bars=4","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/bars","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/baws","description":"Rastegar 2017 Brief Alcohol Withdrawal Scale (BAWS): five caller-assigned integers 0-3 (tremor, diaphoresis, agitation, orientation, hallucinations), summed 0-15. BAWS >=3 predicted CIWA-Ar >=8 in that paper (sensitivity 85.3%, specificity 65.8%). magent does not examine the patient or order benzodiazepines. Not later ICU dose bands. Not a medical device.","parameters":[{"in":"query","name":"tremor","type":"integer","description":"Caller-assigned Rastegar 2017 BAWS tremor points (integer 0-3). magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"diaphoresis","type":"integer","description":"Caller-assigned Rastegar 2017 BAWS diaphoresis (sweats) points (integer 0-3). magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"agitation","type":"integer","description":"Caller-assigned Rastegar 2017 BAWS agitation points (integer 0-3). magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"orientation","type":"integer","description":"Caller-assigned Rastegar 2017 BAWS confusion/orientation points (integer 0-3). magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"hallucinations","type":"integer","description":"Caller-assigned Rastegar 2017 BAWS hallucinations points (integer 0-3). One item, not separate CIWA-Ar tactile/auditory/visual scores. magent does not examine the patient.","required":true,"example":"0"}],"errors":[{"code":"invalid_baws","message":"BAWS items must be integers in the Rastegar 2017 published 0-3 range for those five signs. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/baws","citation":{"authors":"Rastegar DA, Applewhite D, Alvanzo AAH, Welsh C, Niessen T, Chen ES","doi":"10.1080/08897077.2017.1354119","id":"rastegar-2017","pmid":"28699845","source":"Subst Abus. 2017;38(4):394-400","title":"Development and Implementation of an Alcohol Withdrawal Protocol using a 5-Item Scale, the Brief Alcohol Withdrawal Scale (BAWS)","url":"https://doi.org/10.1080/08897077.2017.1354119"},"formula_expression":"BAWS = tremor + diaphoresis + agitation + orientation + hallucinations; each a caller-assigned integer 0-3; max 15; Rastegar 2017; predicts_ciwa_ar_ge_8 iff score >= 3","purpose":"Sum the five Rastegar 2017 Brief Alcohol Withdrawal Scale items (tremor, diaphoresis, agitation, orientation, hallucinations; each caller-assigned integer 0-3) and return the published 0-15 total plus whether BAWS >=3, the cut that predicted CIWA-Ar >=8 in that paper.","markdown_url":"https://magentlab.com/docs/baws.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"baws"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Rastegar 2017 BAWS points 0-15 (sum of five caller-assigned 0-3 items)"},{"name":"max_score","type":"integer","description":"Always 15"},{"name":"predicts_ciwa_ar_ge_8","type":"boolean","description":"true iff score >= 3 (Rastegar 2017 BAWS >=3 predicted CIWA-Ar >=8; sensitivity 85.3%, specificity 65.8% in that paper). Not a benzodiazepine order and not later ICU dose bands."},{"name":"components","type":"array","description":"Per-item caller-assigned points"},{"name":"citation","type":"object","description":"Rastegar et al. Subst Abus 2017 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"agitation":"0","diaphoresis":"0","hallucinations":"0","orientation":"0","tremor":"0"},{"agitation":"0","diaphoresis":"0","hallucinations":"0","orientation":"0","tremor":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/baws","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/baws?tremor=0&diaphoresis=0&agitation=0&orientation=0&hallucinations=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/baws","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/gmaws","description":"McPherson 2012 GMAWS from five caller-assigned 0-2 items (tremor, sweating, hallucination, orientation, agitation) using that paper's Figure 1 0/1/2 descriptors. magent sums only (max 10) and returns Figure 1 bands zero, 1_to_3, 4_to_8, or 9_to_10. Temperature is not an item. magent does not observe the patient. Not a benzodiazepine or treatment order.","parameters":[{"in":"query","name":"tremor","type":"integer","description":"Caller-assigned McPherson 2012 Figure 1 tremor (integer 0-2): 0 no tremor; 1 on movement; 2 at rest. magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"sweating","type":"integer","description":"Caller-assigned McPherson 2012 Figure 1 sweating (integer 0-2): 0 no sweat visible; 1 moist; 2 drenching sweats. magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"hallucination","type":"integer","description":"Caller-assigned McPherson 2012 Figure 1 hallucination (integer 0-2): 0 not present; 1 dissuadable; 2 not dissuadable. magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"orientation","type":"integer","description":"Caller-assigned McPherson 2012 Figure 1 orientation (integer 0-2): 0 orientated; 1 vague/detached; 2 disorientated, no contact. magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"agitation","type":"integer","description":"Caller-assigned McPherson 2012 Figure 1 agitation (integer 0-2): 0 calm; 1 anxious; 2 panicky. magent does not observe the patient.","required":true,"example":"0"}],"errors":[{"code":"invalid_gmaws","message":"tremor, sweating, hallucination, orientation, and agitation must each be an integer 0, 1, or 2 (McPherson 2012 GMAWS Figure 1). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/gmaws","citation":{"authors":"McPherson A, Benson G, Forrest EH","doi":"10.1093/qjmed/hcs020","id":"mcpherson-2012","pmid":"22328545","source":"QJM. 2012;105(7):649-656","title":"Appraisal of the Glasgow assessment and management of alcohol guideline: a comprehensive alcohol management protocol for use in general hospitals","url":"https://doi.org/10.1093/qjmed/hcs020"},"formula_expression":"GMAWS = tremor + sweating + hallucination + orientation + agitation; each caller-assigned 0-2; max 10","purpose":"Sum five caller-assigned McPherson 2012 GMAWS integers (0-2) and return the published total (max 10) and Figure 1 score-group band.","markdown_url":"https://magentlab.com/docs/gmaws.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"gmaws"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"GMAWS points 0-10"},{"name":"max_score","type":"integer","description":"Always 10"},{"name":"gmaws_band","type":"string","description":"McPherson 2012 Figure 1 score group: zero (0), 1_to_3 (1-3), 4_to_8 (4-8), or 9_to_10 (9-10). A score-group band, not a benzodiazepine or treatment order."},{"name":"components","type":"array","description":"Per-item caller-assigned points"},{"name":"citation","type":"object","description":"McPherson et al. QJM 2012 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"agitation":"0","hallucination":"0","orientation":"0","sweating":"0","tremor":"0"},{"agitation":"0","hallucination":"0","orientation":"0","sweating":"0","tremor":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/gmaws","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/gmaws?tremor=0&sweating=0&hallucination=0&orientation=0&agitation=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/gmaws","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/pawss","description":"Maldonado 2014 PAWSS. Required 0-point threshold (any alcohol in the last 30 days or positive BAL on admission): if false, score 0 and band outside_window even if other flags are true. If true, ten yes/no items score 1 each (max 10); 0-3 low, >=4 high risk for complicated alcohol withdrawal. Not a diagnosis or prophylaxis order. magent does not interview the patient or measure BAL.","parameters":[{"in":"query","name":"alcohol_last_30d_or_positive_bal","type":"boolean","description":"Part A threshold (0 points). Caller-assigned: consumed any alcohol in the last 30 days or a positive BAL on admission (Maldonado 2014). If false, score is 0 and pawss_band is outside_window; the ten items are not added. magent does not interview the patient or measure BAL.","required":true,"example":"false"},{"in":"query","name":"recently_intoxicated_30d","type":"boolean","description":"Recently intoxicated or drunk within the last 30 days as assigned by the caller (Maldonado 2014). true scores 1 when the Part A threshold is true. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"alcohol_rehab","type":"boolean","description":"Ever alcohol-use-disorder rehabilitation or AA as assigned by the caller (Maldonado 2014). true scores 1 when the Part A threshold is true. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"previous_withdrawal","type":"boolean","description":"Any previous alcohol withdrawal as assigned by the caller (Maldonado 2014). true scores 1 when the Part A threshold is true. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"blackouts","type":"boolean","description":"Ever blackouts as assigned by the caller (Maldonado 2014). true scores 1 when the Part A threshold is true. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"withdrawal_seizures","type":"boolean","description":"Ever alcohol withdrawal seizures as assigned by the caller (Maldonado 2014). true scores 1 when the Part A threshold is true. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"delirium_tremens","type":"boolean","description":"Ever delirium tremens as assigned by the caller (Maldonado 2014). true scores 1 when the Part A threshold is true. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"combined_downers_90d","type":"boolean","description":"Combined alcohol with benzodiazepines or barbiturates in the last 90 days as assigned by the caller (Maldonado 2014). true scores 1 when the Part A threshold is true. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"combined_other_substances_90d","type":"boolean","description":"Combined alcohol with any other substance of abuse in the last 90 days as assigned by the caller (Maldonado 2014). true scores 1 when the Part A threshold is true. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"bal_ge_200","type":"boolean","description":"BAL on presentation ≥200 as assigned by the caller (Maldonado 2014). true scores 1 when the Part A threshold is true. magent does not measure BAL.","required":true,"example":"false"},{"in":"query","name":"increased_autonomic_activity","type":"boolean","description":"Increased autonomic activity as assigned by the caller (Maldonado 2014), for example HR>120, tremor, sweating, agitation, or nausea. true scores 1 when the Part A threshold is true. magent does not observe the patient.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/pawss","citation":{"authors":"Maldonado JR, Sher Y, Ashouri JF, Hills-Evans K, Swendsen H, Lolak S, Miller AC","doi":"10.1016/j.alcohol.2014.01.004","id":"maldonado-2014","pmid":"24657098","source":"Alcohol. 2014;48(4):375-390","title":"The \"Prediction of Alcohol Withdrawal Severity Scale\" (PAWSS): systematic literature review and pilot study of a new scale for the prediction of complicated alcohol withdrawal syndrome","url":"https://doi.org/10.1016/j.alcohol.2014.01.004"},"formula_expression":"PAWSS = if alcohol_last_30d_or_positive_bal then recently_intoxicated_30d + alcohol_rehab + previous_withdrawal + blackouts + withdrawal_seizures + delirium_tremens + combined_downers_90d + combined_other_substances_90d + bal_ge_200 + increased_autonomic_activity else 0; each item 1 if true; Part A threshold 0 points; max 10; threshold false → outside_window; 0-3 low; >=4 high; Maldonado 2014","purpose":"Apply the Maldonado 2014 PAWSS Part A threshold and ten yes/no items and return the published 0–10 total with the ≥4 high-risk band.","markdown_url":"https://magentlab.com/docs/pawss.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"pawss"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"PAWSS points 0-10"},{"name":"max_score","type":"integer","description":"10"},{"name":"pawss_band","type":"string","description":"outside_window when the Part A threshold is false; low when the threshold is true and score is 0-3; high when the threshold is true and score is ≥4 (Maldonado 2014 cutoff for complicated AWS). Not a diagnosis."},{"name":"components","type":"array","description":"Part A threshold (0 points) then per-item points"},{"name":"citation","type":"object","description":"Maldonado et al. Alcohol 2014 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"alcohol_last_30d_or_positive_bal":"false","alcohol_rehab":"false","bal_ge_200":"false","blackouts":"false","combined_downers_90d":"false","combined_other_substances_90d":"false","delirium_tremens":"false","increased_autonomic_activity":"false","previous_withdrawal":"false","recently_intoxicated_30d":"false","withdrawal_seizures":"false"},{"alcohol_last_30d_or_positive_bal":"false","alcohol_rehab":"false","bal_ge_200":"false","blackouts":"false","combined_downers_90d":"false","combined_other_substances_90d":"false","delirium_tremens":"false","increased_autonomic_activity":"false","previous_withdrawal":"false","recently_intoxicated_30d":"false","withdrawal_seizures":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/pawss","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/pawss?alcohol_last_30d_or_positive_bal=false&recently_intoxicated_30d=false&alcohol_rehab=false&previous_withdrawal=false&blackouts=false&withdrawal_seizures=false&delirium_tremens=false&combined_downers_90d=false&combined_other_substances_90d=false&bal_ge_200=false&increased_autonomic_activity=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/pawss","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/cows","description":"Wesson 2003 Clinical Opiate Withdrawal Scale (COWS). Eleven caller-assigned appendix integers (pulse 0/1/2/4, GI 0/1/2/3/5, sweating 0-4, tremor 0/1/2/4, restlessness 0/1/3/5, yawning 0/1/2/4, pupils 0/1/2/5, anxiety 0/1/2/4, aches 0/1/2/4, gooseflesh 0/3/5, rhinorrhea/tearing 0/1/4). Max 48. Severity 5-12 mild, 13-24 moderate, 25-36 moderately severe, >36 severe; 0-4 below mild (none). magent does not observe the patient. Not a buprenorphine induction protocol.","parameters":[{"in":"query","name":"resting_pulse_rate","type":"integer","description":"Caller-assigned Wesson 2003 resting pulse rate points (integer 0, 1, 2, or 4). magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"gi_upset","type":"integer","description":"Caller-assigned Wesson 2003 GI upset points (integer 0, 1, 2, 3, or 5). magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"sweating","type":"integer","description":"Caller-assigned Wesson 2003 sweating points (integer 0, 1, 2, 3, or 4). magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"tremor","type":"integer","description":"Caller-assigned Wesson 2003 tremor points (integer 0, 1, 2, or 4). magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"restlessness","type":"integer","description":"Caller-assigned Wesson 2003 restlessness points (integer 0, 1, 3, or 5). magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"yawning","type":"integer","description":"Caller-assigned Wesson 2003 yawning points (integer 0, 1, 2, or 4). magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"pupil_size","type":"integer","description":"Caller-assigned Wesson 2003 pupil size points (integer 0, 1, 2, or 5). magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"anxiety_or_irritability","type":"integer","description":"Caller-assigned Wesson 2003 anxiety or irritability points (integer 0, 1, 2, or 4). magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"bone_or_joint_aches","type":"integer","description":"Caller-assigned Wesson 2003 bone or joint aches points (integer 0, 1, 2, or 4). magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"gooseflesh_skin","type":"integer","description":"Caller-assigned Wesson 2003 gooseflesh skin points (integer 0, 3, or 5). magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"runny_nose_or_tearing","type":"integer","description":"Caller-assigned Wesson 2003 runny nose or tearing points (integer 0, 1, or 4). magent does not observe the patient.","required":true,"example":"0"}],"errors":[{"code":"invalid_cows_item","message":"each COWS item must be a Wesson 2003 appendix integer for that sign (not an arbitrary 0-5). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/cows","citation":{"authors":"Wesson DR, Ling W","doi":"10.1080/02791072.2003.10400007","id":"wesson-2003","pmid":"12924748","source":"J Psychoactive Drugs. 2003;35(2):253-259","title":"The Clinical Opiate Withdrawal Scale (COWS)","url":"https://doi.org/10.1080/02791072.2003.10400007"},"formula_expression":"COWS = resting_pulse_rate + gi_upset + sweating + tremor + restlessness + yawning + pupil_size + anxiety_or_irritability + bone_or_joint_aches + gooseflesh_skin + runny_nose_or_tearing; Wesson 2003 appendix integers only; max 48","purpose":"Sum the eleven Wesson 2003 Clinical Opiate Withdrawal Scale (COWS) items from caller-assigned appendix integers and return the published total (max 48) with the published severity cutoffs.","markdown_url":"https://magentlab.com/docs/cows.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"cows"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"COWS points 0-48"},{"name":"max_score","type":"integer","description":"48"},{"name":"severity","type":"string","description":"Wesson 2003 appendix: none (0-4, below mild), mild (5-12), moderate (13-24), moderately_severe (25-36), severe (>36)"},{"name":"components","type":"array","description":"Per-item caller-assigned points"},{"name":"citation","type":"object","description":"Wesson and Ling J Psychoactive Drugs 2003 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"anxiety_or_irritability":"0","bone_or_joint_aches":"0","gi_upset":"0","gooseflesh_skin":"0","pupil_size":"0","resting_pulse_rate":"0","restlessness":"0","runny_nose_or_tearing":"0","sweating":"0","tremor":"0","yawning":"0"},{"anxiety_or_irritability":"0","bone_or_joint_aches":"0","gi_upset":"0","gooseflesh_skin":"0","pupil_size":"0","resting_pulse_rate":"0","restlessness":"0","runny_nose_or_tearing":"0","sweating":"0","tremor":"0","yawning":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/cows","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/cows?resting_pulse_rate=0&gi_upset=0&sweating=0&tremor=0&restlessness=0&yawning=0&pupil_size=0&anxiety_or_irritability=0&bone_or_joint_aches=0&gooseflesh_skin=0&runny_nose_or_tearing=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/cows","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/wat-1","description":"Franck 2008 WAT-1 (Withdrawal Assessment Tool-1). Eleven caller-assigned integers: ten 0/1 signs plus time_to_calm 0-2. Sum 0-12. Cutoff WAT-1 ≥3 vs NRS ≥4. magent does not observe the child. Pediatric iatrogenic opioid/benzodiazepine withdrawal monitoring only. Not a diagnosis, not NAS, not COWS, not CIWA-Ar, and not a medical device.","parameters":[{"in":"query","name":"loose_watery_stools","type":"integer","description":"Caller-assigned Franck 2008 Table 4 loose/watery stools from the record in the previous 12 hours (integer 0 or 1): 0 none, 1 any loose or watery stools. magent does not observe the child.","required":true,"example":"0"},{"in":"query","name":"vomiting_retching_gagging","type":"integer","description":"Caller-assigned Franck 2008 Table 4 vomiting, retching, or gagging from the record in the previous 12 hours (integer 0 or 1): 0 none, 1 any vomiting, retching, or gagging. magent does not observe the child.","required":true,"example":"0"},{"in":"query","name":"temperature_gt_37_8","type":"integer","description":"Caller-assigned Franck 2008 Table 4 modal temperature > 37.8°C from the record in the previous 12 hours (integer 0 or 1): 0 no, 1 yes. magent does not observe the child.","required":true,"example":"0"},{"in":"query","name":"state","type":"integer","description":"Caller-assigned Franck 2008 Table 4 2-minute pre-stimulus state (integer 0 or 1): 0 SBS ≤0 or asleep/awake/calm, 1 SBS ≥+1 or awake/distressed. magent does not observe the child.","required":true,"example":"0"},{"in":"query","name":"tremor","type":"integer","description":"Caller-assigned Franck 2008 Table 4 2-minute pre-stimulus tremor (integer 0 or 1): 0 none/mild, 1 moderate/severe. magent does not observe the child.","required":true,"example":"0"},{"in":"query","name":"sweating","type":"integer","description":"Caller-assigned Franck 2008 Table 4 2-minute pre-stimulus sweating (integer 0 or 1): 0 no, 1 any sweating. magent does not observe the child.","required":true,"example":"0"},{"in":"query","name":"uncoordinated_repetitive_movement","type":"integer","description":"Caller-assigned Franck 2008 Table 4 2-minute pre-stimulus uncoordinated or repetitive movement (integer 0 or 1): 0 none/mild, 1 moderate/severe. magent does not observe the child.","required":true,"example":"0"},{"in":"query","name":"yawning_or_sneezing","type":"integer","description":"Caller-assigned Franck 2008 Table 4 2-minute pre-stimulus yawning or sneezing (integer 0 or 1): 0 none or 1 yawn/sneeze, 1 two or more. magent does not observe the child.","required":true,"example":"0"},{"in":"query","name":"startle_to_touch","type":"integer","description":"Caller-assigned Franck 2008 Table 4 1-minute stimulus startle to touch (integer 0 or 1): 0 none/mild, 1 moderate/severe. magent does not observe the child.","required":true,"example":"0"},{"in":"query","name":"muscle_tone","type":"integer","description":"Caller-assigned Franck 2008 Table 4 1-minute stimulus muscle tone (integer 0 or 1): 0 normal, 1 increased. magent does not observe the child.","required":true,"example":"0"},{"in":"query","name":"time_to_calm","type":"integer","description":"Caller-assigned Franck 2008 Table 4 post-stimulus time to gain a calm state (integer 0, 1, or 2): 0 if <2 min, 1 if 2-5 min, 2 if >5 min. magent does not observe the child.","required":true,"example":"0"}],"errors":[{"code":"invalid_wat","message":"WAT-1 needs the eleven Franck 2008 items (ten 0/1 signs and time_to_calm 0-2). Returned before settlement; you are not charged.","status":400},{"code":"invalid_wat_item","message":"each WAT-1 sign is 0 or 1; time_to_calm is 0, 1, or 2 (Franck 2008). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/wat-1","citation":{"authors":"Franck LS, Harris SK, Soetenga DJ, Amling JK, Curley MAQ","doi":"10.1097/PCC.0b013e31818c8328","id":"franck-2008","pmid":"18838937","source":"Pediatr Crit Care Med. 2008;9(6):573-580","title":"The Withdrawal Assessment Tool-1 (WAT-1): an assessment instrument for monitoring opioid and benzodiazepine withdrawal symptoms in pediatric patients","url":"https://doi.org/10.1097/PCC.0b013e31818c8328"},"formula_expression":"WAT-1 = loose_watery_stools + vomiting_retching_gagging + temperature_gt_37_8 + state + tremor + sweating + uncoordinated_repetitive_movement + yawning_or_sneezing + startle_to_touch + muscle_tone + time_to_calm; ten signs 0 or 1; time_to_calm 0, 1, or 2; Franck 2008 Table 4; max 12; wat1_ge_3 iff total >= 3","purpose":"Sum the eleven Franck 2008 WAT-1 items (ten caller-assigned 0/1 signs and time_to_calm 0-2) and return the published 0-12 total plus wat1_ge_3 (true iff score ≥3 versus NRS ≥4).","markdown_url":"https://magentlab.com/docs/wat-1.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"wat_1"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Franck 2008 WAT-1 sum of eleven caller-assigned items (total 0-12)"},{"name":"max_score","type":"integer","description":"Always 12"},{"name":"wat1_ge_3","type":"boolean","description":"true iff score ≥ 3 (Franck 2008 ROC: WAT-1 ≥3 best sensitivity/specificity versus NRS ≥4). Not a diagnosis. Not a mild/moderate/severe stage."},{"name":"components","type":"array","description":"Per-item caller-assigned points"},{"name":"citation","type":"object","description":"Franck et al. Pediatr Crit Care Med 2008 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"loose_watery_stools":"0","muscle_tone":"0","startle_to_touch":"0","state":"0","sweating":"0","temperature_gt_37_8":"0","time_to_calm":"0","tremor":"0","uncoordinated_repetitive_movement":"0","vomiting_retching_gagging":"0","yawning_or_sneezing":"0"},{"loose_watery_stools":"0","muscle_tone":"0","startle_to_touch":"0","state":"0","sweating":"0","temperature_gt_37_8":"0","time_to_calm":"0","tremor":"0","uncoordinated_repetitive_movement":"0","vomiting_retching_gagging":"0","yawning_or_sneezing":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/wat-1","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/wat-1?loose_watery_stools=0&vomiting_retching_gagging=0&temperature_gt_37_8=0&state=0&tremor=0&sweating=0&uncoordinated_repetitive_movement=0&yawning_or_sneezing=0&startle_to_touch=0&muscle_tone=0&time_to_calm=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/wat-1","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/ort","description":"Webster 2005 Opioid Risk Tool from Table 1 sex-specific weights. Ten caller-assigned yes/no flags (absent = 0). Age 16-45 is a flag, not a numeric age. ADD, OCD, bipolar, or schizophrenia is one flag. Preadolescent sexual abuse scores 3 in females and 0 in males. Low 0-3, moderate 4-7, high >=8. Not a medical device, not a diagnosis of opioid use disorder, not the 2019 ORT-OUD revision. magent does not interview the patient or take free-text history.","parameters":[{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"female or male. Webster 2005 Table 1 item weights are sex-specific. Assigned by the caller.","required":true,"example":"female"},{"in":"query","name":"family_alcohol","type":"boolean","description":"Family history of alcohol abuse as assigned by the caller (Webster 2005 Table 1). Female 1, male 3. true or false. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"family_illegal_drugs","type":"boolean","description":"Family history of illegal-drug abuse as assigned by the caller (Webster 2005 Table 1). Female 2, male 3. true or false.","required":true,"example":"false"},{"in":"query","name":"family_prescription_drugs","type":"boolean","description":"Family history of prescription-drug abuse as assigned by the caller (Webster 2005 Table 1). 4 points. true or false.","required":true,"example":"false"},{"in":"query","name":"personal_alcohol","type":"boolean","description":"Personal history of alcohol abuse as assigned by the caller (Webster 2005 Table 1). 3 points. true or false. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"personal_illegal_drugs","type":"boolean","description":"Personal history of illegal-drug abuse as assigned by the caller (Webster 2005 Table 1). 4 points. true or false.","required":true,"example":"false"},{"in":"query","name":"personal_prescription_drugs","type":"boolean","description":"Personal history of prescription-drug abuse as assigned by the caller (Webster 2005 Table 1). 5 points. true or false.","required":true,"example":"false"},{"in":"query","name":"age_16_to_45","type":"boolean","description":"Age 16-45 years as a flag, not a numeric age (Webster 2005 Table 1). true scores 1. Assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"preadolescent_sexual_abuse","type":"boolean","description":"History of preadolescent sexual abuse as assigned by the caller (Webster 2005 Table 1). Female 3, male 0. true or false. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"add_ocd_bipolar_schizophrenia","type":"boolean","description":"ADD, OCD, bipolar disorder, or schizophrenia as one flag (Webster 2005 Table 1). true scores 2. Assigned by the caller. magent does not diagnose.","required":true,"example":"false"},{"in":"query","name":"depression","type":"boolean","description":"Depression as assigned by the caller (Webster 2005 Table 1). true scores 1. magent does not diagnose.","required":true,"example":"false"}],"errors":[{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/ort","citation":{"authors":"Webster LR, Webster RM","doi":"10.1111/j.1526-4637.2005.00072.x","id":"webster-2005","pmid":"16336480","source":"Pain Med. 2005;6(6):432-442","title":"Predicting aberrant behaviors in opioid-treated patients: preliminary validation of the Opioid Risk Tool","url":"https://doi.org/10.1111/j.1526-4637.2005.00072.x"},"formula_expression":"ORT = Webster 2005 Table 1 sex-specific weights; family_alcohol F1/M3 + family_illegal_drugs F2/M3 + family_prescription_drugs 4 + personal_alcohol 3 + personal_illegal_drugs 4 + personal_prescription_drugs 5 + age_16_to_45 1 + preadolescent_sexual_abuse F3/M0 + add_ocd_bipolar_schizophrenia 2 + depression 1; absent = 0; low 0-3, moderate 4-7, high >=8; max 26","purpose":"Sum Webster 2005 Table 1 Opioid Risk Tool item weights for the assigned sex and return the published low, moderate, or high category.","markdown_url":"https://magentlab.com/docs/ort.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"ort"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Webster 2005 Table 1 points 0-26"},{"name":"max_score","type":"integer","description":"26"},{"name":"risk","type":"string","description":"Webster 2005 category: low (0-3), moderate (4-7), or high (>=8). Not a diagnosis of opioid use disorder."},{"name":"sex","type":"string","description":"female or male"},{"name":"components","type":"array","description":"Per-item points for the assigned sex"},{"name":"citation","type":"object","description":"Webster and Webster Pain Medicine 2005 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"add_ocd_bipolar_schizophrenia":"false","age_16_to_45":"false","depression":"false","family_alcohol":"false","family_illegal_drugs":"false","family_prescription_drugs":"false","personal_alcohol":"false","personal_illegal_drugs":"false","personal_prescription_drugs":"false","preadolescent_sexual_abuse":"false","sex":"female"},{"add_ocd_bipolar_schizophrenia":"false","age_16_to_45":"false","depression":"false","family_alcohol":"false","family_illegal_drugs":"false","family_prescription_drugs":"false","personal_alcohol":"false","personal_illegal_drugs":"false","personal_prescription_drugs":"false","preadolescent_sexual_abuse":"false","sex":"female"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/ort","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/ort?sex=female&family_alcohol=false&family_illegal_drugs=false&family_prescription_drugs=false&personal_alcohol=false&personal_illegal_drugs=false&personal_prescription_drugs=false&age_16_to_45=false&preadolescent_sexual_abuse=false&add_ocd_bipolar_schizophrenia=false&depression=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/ort","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/ort-oud","description":"Cheatle 2019 revised Opioid Risk Tool (ORT-OUD): nine unweighted yes/no flags (each 1; max 9). No sex. No preadolescent sexual abuse item. Scores 0-2 are non_oud; 3 or more are oud (integer cutoff for the paper's 2.5). Not Webster 2005 weighted ORT. Cheatle 2019 enrolled only Caucasian patients of European descent (parent-study genotype design); that is a population limit, not a race coefficient. Not a diagnosis of opioid use disorder. magent does not interview the patient. Not a medical device.","parameters":[{"in":"query","name":"family_alcohol","type":"boolean","description":"Family history of alcohol abuse as assigned by the caller (Cheatle 2019). true scores 1. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"family_illegal_drugs","type":"boolean","description":"Family history of illegal-drug abuse as assigned by the caller (Cheatle 2019). true scores 1. true or false.","required":true,"example":"false"},{"in":"query","name":"family_prescription_drugs","type":"boolean","description":"Family history of prescription-drug abuse as assigned by the caller (Cheatle 2019). true scores 1. true or false.","required":true,"example":"false"},{"in":"query","name":"personal_alcohol","type":"boolean","description":"Personal history of alcohol abuse as assigned by the caller (Cheatle 2019). true scores 1. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"personal_illegal_drugs","type":"boolean","description":"Personal history of illegal-drug abuse as assigned by the caller (Cheatle 2019). true scores 1. true or false.","required":true,"example":"false"},{"in":"query","name":"personal_prescription_drugs","type":"boolean","description":"Personal history of prescription-drug abuse as assigned by the caller (Cheatle 2019). true scores 1. true or false.","required":true,"example":"false"},{"in":"query","name":"age_16_to_45","type":"boolean","description":"Age 16-45 years as a flag, not a numeric age (Cheatle 2019). true scores 1. Assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"add_ocd_bipolar_schizophrenia","type":"boolean","description":"ADD, OCD, bipolar disorder, or schizophrenia as one flag (Cheatle 2019). true scores 1. Assigned by the caller. magent does not diagnose.","required":true,"example":"false"},{"in":"query","name":"depression","type":"boolean","description":"Depression as assigned by the caller (Cheatle 2019). true scores 1. magent does not diagnose.","required":true,"example":"false"}],"errors":[{"code":"invalid_ort_oud","message":"ORT-OUD needs nine unweighted yes/no flags (Cheatle 2019; no preadolescent-sexual-abuse item). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/ort-oud","citation":{"authors":"Cheatle MD, Compton PA, Dhingra L, Wasser TE, O'Brien CP","doi":"10.1016/j.jpain.2019.01.011","id":"cheatle-2019","pmid":"30690168","source":"J Pain. 2019;20(7):842-851 (Epub 2019 Jan 26)","title":"Development of the Revised Opioid Risk Tool to Predict Opioid Use Disorder in Patients with Chronic Nonmalignant Pain.","url":"https://doi.org/10.1016/j.jpain.2019.01.011"},"formula_expression":"ORT-OUD = family_alcohol + family_illegal_drugs + family_prescription_drugs + personal_alcohol + personal_illegal_drugs + personal_prescription_drugs + age_16_to_45 + add_ocd_bipolar_schizophrenia + depression; each 1; Cheatle 2019; max 9; oud_class non_oud 0-2, oud >=3; no sex; no preadolescent_sexual_abuse","purpose":"Sum nine unweighted Cheatle 2019 ORT-OUD yes/no flags and return oud_class non_oud (0-2) or oud (>=3).","markdown_url":"https://magentlab.com/docs/ort-oud.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"ort_oud"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Cheatle 2019 unweighted points 0-9"},{"name":"max_score","type":"integer","description":"9"},{"name":"oud_class","type":"string","description":"Cheatle 2019 class: non_oud (score 0-2) or oud (score >=3). Integer cutoff for the paper's 2.5. Not Webster low/moderate/high. Not a diagnosis of opioid use disorder."},{"name":"components","type":"array","description":"Per-item unweighted points"},{"name":"citation","type":"object","description":"Cheatle et al. Journal of Pain 2019 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"add_ocd_bipolar_schizophrenia":"false","age_16_to_45":"false","depression":"false","family_alcohol":"false","family_illegal_drugs":"false","family_prescription_drugs":"false","personal_alcohol":"false","personal_illegal_drugs":"false","personal_prescription_drugs":"false"},{"add_ocd_bipolar_schizophrenia":"false","age_16_to_45":"false","depression":"false","family_alcohol":"false","family_illegal_drugs":"false","family_prescription_drugs":"false","personal_alcohol":"false","personal_illegal_drugs":"false","personal_prescription_drugs":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/ort-oud","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/ort-oud?family_alcohol=false&family_illegal_drugs=false&family_prescription_drugs=false&personal_alcohol=false&personal_illegal_drugs=false&personal_prescription_drugs=false&age_16_to_45=false&add_ocd_bipolar_schizophrenia=false&depression=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/ort-oud","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/dire","description":"Belgrade 2006 DIRE score: Diagnosis, Intractability, and Efficacy each caller-assigned 1-3; Risk is the sum of Psychological, Chemical, Reliability, and Social support (each 1-3, so Risk 4-12). Total 7-21. Scores 14-21 are more suitable for long-term opioid maintenance; 7-13 less suitable. Caller assigns the integers. magent does not take a pain history or write an opioid prescription or taper. Not a medical device.","parameters":[{"in":"query","name":"diagnosis","type":"integer","description":"Caller-assigned Belgrade 2006 Diagnosis (integer 1-3): 1 benign chronic condition with minimal objective findings or no definite diagnosis; 2 slowly progressive condition concordant with moderate pain, or fixed deficit; 3 advanced condition concordant with severe pain with objective findings. magent does not take a pain history.","required":true,"example":"1"},{"in":"query","name":"intractability","type":"integer","description":"Caller-assigned Belgrade 2006 Intractability (integer 1-3): 1 few therapies tried and the patient is passively involved; 2 most appropriate treatments tried with inadequate response and the patient is reasonably involved; 3 patient fully engaged in appropriate treatments with inadequate response. magent does not take a pain history.","required":true,"example":"1"},{"in":"query","name":"psychological","type":"integer","description":"Caller-assigned Belgrade 2006 Risk subcategory Psychological (integer 1-3): 1 serious personality dysfunction or mental illness interfering with care; 2 personality or mental health interferes moderately; 3 good psychological functioning. One of four Risk items (Risk 4-12). magent does not interview the patient.","required":true,"example":"1"},{"in":"query","name":"chemical","type":"integer","description":"Caller-assigned Belgrade 2006 Risk subcategory Chemical (integer 1-3): 1 active or recent substance abuse; 2 chemical coper or history of chemical dependence in remission; 3 no chemical-dependence history. One of four Risk items (Risk 4-12). magent does not interview the patient.","required":true,"example":"1"},{"in":"query","name":"reliability","type":"integer","description":"Caller-assigned Belgrade 2006 Risk subcategory Reliability (integer 1-3): 1 many missed appointments, lacks insight, or poor observer of laws and rules; 2 generally reliable; 3 highly reliable. One of four Risk items (Risk 4-12). magent does not interview the patient.","required":true,"example":"1"},{"in":"query","name":"social_support","type":"integer","description":"Caller-assigned Belgrade 2006 Risk subcategory Social support (integer 1-3): 1 life in chaos, few resources, close relationships dysfunctional; 2 relationships exist but are strained; 3 stable supportive relationships and sufficient resources. One of four Risk items (Risk 4-12). magent does not interview the patient.","required":true,"example":"1"},{"in":"query","name":"efficacy","type":"integer","description":"Caller-assigned Belgrade 2006 Efficacy (integer 1-3): 1 poor function or minimal pain relief despite moderate-to-high doses; 2 moderate benefit with moderate function on moderate doses; 3 good function and pain relief on stable low-to-moderate doses. magent does not take a pain history or write an opioid prescription.","required":true,"example":"1"}],"errors":[{"code":"invalid_dire","message":"DIRE score inputs must be integers in the Belgrade 2006 published 1-3 range for diagnosis, intractability, risk subcategories, and efficacy. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/dire","citation":{"authors":"Belgrade MJ, Schamber CD, Lindgren BR","doi":"10.1016/j.jpain.2006.03.001","id":"belgrade-2006","pmid":"16942953","source":"J Pain. 2006;7(9):671-681","title":"The DIRE score: predicting outcomes of opioid prescribing for chronic pain","url":"https://doi.org/10.1016/j.jpain.2006.03.001"},"formula_expression":"DIRE = diagnosis + intractability + risk + efficacy; diagnosis, intractability, and efficacy each caller-assigned 1-3; risk = psychological + chemical + reliability + social_support (each 1-3, so risk 4-12); total 7-21; Belgrade 2006; score 14-21 more suitable for long-term opioid maintenance, 7-13 less suitable","purpose":"Sum Belgrade 2006 DIRE as Diagnosis + Intractability + Risk + Efficacy. Diagnosis, Intractability, and Efficacy are caller-assigned 1-3. Risk is the sum of Psychological, Chemical, Reliability, and Social support (each 1-3, so Risk 4-12). Total 7-21. Return whether the published score >= 14 cut for long-term opioid maintenance suitability is met.","markdown_url":"https://magentlab.com/docs/dire.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"dire"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Belgrade 2006 DIRE points 7-21 (Diagnosis + Intractability + Risk + Efficacy)"},{"name":"max_score","type":"integer","description":"Always 21"},{"name":"suitable_candidate","type":"boolean","description":"true iff score >= 14 (Belgrade 2006 more suitable for long-term opioid maintenance). Not an opioid prescription or taper order."},{"name":"diagnosis","type":"integer","description":"Caller-assigned Diagnosis points 1-3"},{"name":"intractability","type":"integer","description":"Caller-assigned Intractability points 1-3"},{"name":"psychological","type":"integer","description":"Caller-assigned Psychological Risk points 1-3"},{"name":"chemical","type":"integer","description":"Caller-assigned Chemical Risk points 1-3"},{"name":"reliability","type":"integer","description":"Caller-assigned Reliability Risk points 1-3"},{"name":"social_support","type":"integer","description":"Caller-assigned Social support Risk points 1-3"},{"name":"efficacy","type":"integer","description":"Caller-assigned Efficacy points 1-3"},{"name":"risk","type":"integer","description":"Belgrade 2006 Risk 4-12: psychological + chemical + reliability + social_support"},{"name":"components","type":"array","description":"Per-item caller-assigned points"},{"name":"citation","type":"object","description":"Belgrade et al. J Pain 2006 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"chemical":"1","diagnosis":"1","efficacy":"1","intractability":"1","psychological":"1","reliability":"1","social_support":"1"},{"chemical":"1","diagnosis":"1","efficacy":"1","intractability":"1","psychological":"1","reliability":"1","social_support":"1"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/dire","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/dire?diagnosis=1&intractability=1&psychological=1&chemical=1&reliability=1&social_support=1&efficacy=1","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/dire","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/sms","description":"Gill 2005 Simplified Motor Score (SMS) from one caller-assigned motor category: obeys (2, obeys commands), localizes (1, localizes pain), or withdrawal_or_less (0, withdrawal to pain or less). Companion to GCS, not a replacement protocol and not a triage or intubation order. magent does not examine the patient. Deterministic published score with citation.","parameters":[{"in":"query","name":"motor","type":"string","enum":["obeys","localizes","withdrawal_or_less"],"description":"Gill 2005 Simplified Motor Score motor category as assigned by the caller. obeys (2, obeys commands), localizes (1, localizes pain), or withdrawal_or_less (0, withdrawal to pain or less). magent does not examine the patient.","required":true,"example":"obeys"}],"errors":[{"code":"invalid_sms_motor","message":"motor must be obeys, localizes, or withdrawal_or_less (Gill 2005 SMS). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/sms","citation":{"authors":"Gill M, Windemuth R, Steele R, Green SM","doi":"10.1016/j.annemergmed.2004.07.429","id":"gill-2005","pmid":"15635308","source":"Ann Emerg Med. 2005;45(1):37-42","title":"A comparison of the Glasgow Coma Scale score to simplified alternative scores for the prediction of traumatic brain injury outcomes","url":"https://doi.org/10.1016/j.annemergmed.2004.07.429"},"formula_expression":"SMS = 2 if motor=obeys (obeys commands), 1 if motor=localizes (localizes pain), 0 if motor=withdrawal_or_less (withdrawal to pain or less); Gill 2005 Simplified Motor Score; max 2","purpose":"Return the Gill 2005 Simplified Motor Score (0-2) from a caller-assigned motor category: obeys commands (2), localizes pain (1), or withdrawal to pain or less (0).","markdown_url":"https://magentlab.com/docs/sms.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"sms"},{"name":"formula_expression","type":"string","description":"Published SMS rule"},{"name":"motor","type":"string","description":"Canonical motor category: obeys, localizes, or withdrawal_or_less"},{"name":"score","type":"integer","description":"SMS points 0-2"},{"name":"max_score","type":"integer","description":"2"},{"name":"components","type":"array","description":"Motor component"},{"name":"citation","type":"object","description":"Gill 2005"},{"name":"disclaimer","type":"string","description":"Not a medical device"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"motor":"obeys"},{"motor":"obeys"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/sms","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/sms?motor=obeys","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/sms","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/mess","description":"Johansen 1990 Mangled Extremity Severity Score (MESS): caller-assigned skeletal/soft-tissue energy 1-4, limb ischemia 1-3 (doubled if ischemia time >6 hours), shock 0-2, and age points (<30 → 0, 30-50 → 1, >50 → 2). Max 14. MESS ≥7 predicted amputation with 100% accuracy in that series (mess_band 0-6 or >=7). Deterministic published arithmetic with citation. Not an amputation or limb-salvage protocol; magent does not examine the limb. Not later papers' cutoff of 8.","parameters":[{"in":"query","name":"skeletal_soft_tissue","type":"integer","description":"Caller-assigned Johansen 1990 skeletal/soft-tissue energy (integer 1 low, 2 medium, 3 high, or 4 very high). magent does not examine the limb.","required":true,"example":"1"},{"in":"query","name":"limb_ischemia","type":"integer","description":"Caller-assigned Johansen 1990 limb ischemia (integer 1 pulse reduced but perfusion normal, 2 pulseless with paresthesia, or 3 cool paralyzed insensate). Doubled when ischemia_over_6h is true.","required":true,"example":"1"},{"in":"query","name":"shock","type":"integer","description":"Caller-assigned Johansen 1990 shock (integer 0 SBP always >90, 1 transient <90, or 2 persistent <90).","required":true,"example":"0"},{"in":"query","name":"age","type":"integer","description":"Age in years (integer 0-120). Johansen 1990 points: <30 → 0, 30-50 → 1, >50 → 2. Not the adult 18-120 clamp.","required":true,"example":"25"},{"in":"query","name":"ischemia_over_6h","type":"boolean","description":"true if limb ischemia time is greater than 6 hours (Johansen 1990 doubles the ischemia score). true or false as assigned by the caller.","required":true,"example":"false"}],"errors":[{"code":"invalid_mess_item","message":"skeletal_soft_tissue 1-4, limb_ischemia 1-3, and shock 0-2 (Johansen 1990). Returned before settlement; you are not charged.","status":400},{"code":"invalid_mess_age","message":"age must be an integer from 0 to 120 (Johansen 1990 includes children). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/mess","citation":{"authors":"Johansen K, Daines M, Howey T, Helfet D, Hansen ST","doi":"10.1097/00005373-199005000-00007","id":"johansen-1990","pmid":"2342140","source":"J Trauma. 1990;30(5):568-572","title":"Objective criteria accurately predict amputation following lower extremity trauma","url":"https://doi.org/10.1097/00005373-199005000-00007"},"formula_expression":"MESS = skeletal_soft_tissue (1-4) + limb_ischemia (1-3, doubled if ischemia_over_6h) + shock (0-2) + age_points (<30 → 0, 30-50 → 1, >50 → 2); Johansen 1990 band 0-6 / >=7; max 14","purpose":"Compute the Johansen 1990 Mangled Extremity Severity Score from caller-assigned skeletal/soft-tissue, limb ischemia, shock, and age integers, doubling ischemia when time exceeds 6 hours, and return the published 0-6 / ≥7 band.","markdown_url":"https://magentlab.com/docs/mess.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"mess"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"MESS points 2-14"},{"name":"max_score","type":"integer","description":"14"},{"name":"mess_band","type":"string","description":"Johansen 1990 band: 0-6 or >=7. MESS ≥7 predicted amputation with 100% accuracy in that series. Not an amputation order."},{"name":"skeletal_soft_tissue","type":"integer","description":"Caller-assigned skeletal/soft-tissue energy 1-4"},{"name":"limb_ischemia","type":"integer","description":"Caller-assigned limb ischemia 1-3"},{"name":"shock","type":"integer","description":"Caller-assigned shock 0-2"},{"name":"age","type":"integer","description":"Caller age in years 0-120"},{"name":"age_points","type":"integer","description":"Johansen 1990 age points 0, 1, or 2"},{"name":"ischemia_over_6h","type":"boolean","description":"Whether the published >6 hour ischemia doubling was applied"},{"name":"ischemia_points","type":"integer","description":"Limb ischemia points after the optional >6 hour doubling (1-6)"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Johansen et al. J Trauma 1990 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"25","ischemia_over_6h":"false","limb_ischemia":"1","shock":"0","skeletal_soft_tissue":"1"},{"age":"25","ischemia_over_6h":"false","limb_ischemia":"1","shock":"0","skeletal_soft_tissue":"1"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/mess","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/mess?skeletal_soft_tissue=1&limb_ischemia=1&shock=0&age=25&ischemia_over_6h=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/mess","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/bastion","description":"Bastion classification of lower-limb IED injury (Jacobs 2014). Caller assigns class 1-5 as the most proximal extent. Returns the class description, associated-injury flags (segmental, intraperitoneal abdomen, genital/perineal, pelvic ring, upper limb), and tourniquet_effective (true for class 1-3, false for class 4-5). Not MESS, not ISS AIS, not a treatment protocol. Paper was not designed for mortality or transfusion rates. magent does not examine the casualty.","parameters":[{"in":"query","name":"bastion_class","type":"integer","description":"Bastion class 1-5 as assigned by the caller: most proximal extent of the lower-limb blast injury (1 injury confined to the foot; 2 lower leg, effective below-knee tourniquet; 3 proximal lower leg or thigh, effective above-knee tourniquet; 4 proximal thigh, tourniquet not effective; 5 any injury with buttock involvement). Jacobs 2014. magent does not examine the casualty.","required":true,"example":"1"},{"in":"query","name":"segmental","type":"boolean","description":"true when there is potentially viable tissue distal to the most proximal injury (Jacobs 2014: segmental injuries recognised as a distinct entity). Required. magent does not examine the casualty.","required":true,"example":"false"},{"in":"query","name":"intraperitoneal_abdomen","type":"boolean","description":"true when associated intraperitoneal abdominal injury is present as assigned by the caller (Jacobs 2014). Required. magent does not examine the casualty.","required":true,"example":"false"},{"in":"query","name":"genital_perineal","type":"boolean","description":"true when associated genital or perineal injury is present as assigned by the caller (Jacobs 2014). Required. magent does not examine the casualty.","required":true,"example":"false"},{"in":"query","name":"pelvic_ring","type":"boolean","description":"true when associated pelvic ring injury is present as assigned by the caller (Jacobs 2014). Required. magent does not examine the casualty.","required":true,"example":"false"},{"in":"query","name":"upper_limb","type":"boolean","description":"true when associated upper-limb injury is present as assigned by the caller (Jacobs 2014). Required. magent does not examine the casualty.","required":true,"example":"false"}],"errors":[{"code":"invalid_bastion_class","message":"bastion_class must be an integer from 1 to 5 (Jacobs 2014 most proximal extent). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/bastion","citation":{"authors":"Jacobs N, Rourke K, Rutherford J, Hicks A, Smith SR, Templeton P, Adams SA, Jansen JO","doi":"10.1016/j.injury.2012.05.001","id":"jacobs-2014","pmid":"22613453","source":"Injury. 2014;45(9):1422-1428","title":"Lower limb injuries caused by improvised explosive devices: proposed 'Bastion classification' and prospective validation","url":"https://doi.org/10.1016/j.injury.2012.05.001"},"formula_expression":"Caller-assigned Bastion class 1-5 is the most proximal extent of the lower-limb blast injury; associated flags are segmental, intraperitoneal_abdomen, genital_perineal, pelvic_ring, and upper_limb; tourniquet_effective is true for class 1-3 and false for class 4-5 (Jacobs 2014)","purpose":"Return the caller-assigned Bastion class 1-5 (most proximal extent of the lower-limb blast injury), Jacobs 2014 associated-injury flags, the published class description, and tourniquet_effective (true for class 1-3, false for class 4-5).","markdown_url":"https://magentlab.com/docs/bastion.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"bastion"},{"name":"formula_expression","type":"string","description":"Published Jacobs 2014 Bastion class-plus-flags rule"},{"name":"bastion_class","type":"integer","description":"Caller-assigned class 1-5 (most proximal extent)"},{"name":"description","type":"string","description":"Jacobs 2014 definition for that class"},{"name":"segmental","type":"boolean","description":"Potentially viable tissue distal to the most proximal injury"},{"name":"intraperitoneal_abdomen","type":"boolean","description":"Associated intraperitoneal abdominal injury"},{"name":"genital_perineal","type":"boolean","description":"Associated genital or perineal injury"},{"name":"pelvic_ring","type":"boolean","description":"Associated pelvic ring injury"},{"name":"upper_limb","type":"boolean","description":"Associated upper-limb injury"},{"name":"tourniquet_effective","type":"boolean","description":"true for class 1-3, false for class 4-5 (from the class definitions)"},{"name":"components","type":"array","description":"bastion_class, associated-injury flags, and tourniquet_effective rows"},{"name":"citation","type":"object","description":"Jacobs 2014 Bastion classification"},{"name":"disclaimer","type":"string","description":"Not a medical device"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"bastion_class":"1","genital_perineal":"false","intraperitoneal_abdomen":"false","pelvic_ring":"false","segmental":"false","upper_limb":"false"},{"bastion_class":"1","genital_perineal":"false","intraperitoneal_abdomen":"false","pelvic_ring":"false","segmental":"false","upper_limb":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/bastion","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/bastion?bastion_class=1&segmental=false&intraperitoneal_abdomen=false&genital_perineal=false&pelvic_ring=false&upper_limb=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/bastion","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/apfel","description":"Apfel 1999 simplified PONV risk score. Four caller-assigned predictors, 1 each, max 4: female sex, history of motion sickness or PONV, nonsmoking, postoperative opioids. Male and smokers score 0 on those items. Returns the integer score as bands 0-4. Apfel 1999 reported incidences by score; this tool returns the integer score without those percents. Not a medical device, not a prophylaxis order, not a diagnosis of PONV. Caller assigns history and opioid plan; magent does not take an anesthetic.","parameters":[{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"female or male (Apfel 1999). Female scores 1. Male scores 0. Assigned by the caller.","required":true,"example":"male"},{"in":"query","name":"history_motion_sickness_or_ponv","type":"boolean","description":"History of motion sickness or postoperative nausea and vomiting (Apfel 1999). true or false as assigned by the caller. 1 point if true.","required":true,"example":"false"},{"in":"query","name":"nonsmoker","type":"boolean","description":"Nonsmoking status (Apfel 1999). true scores 1. Smokers (false) score 0. Assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"postoperative_opioids","type":"boolean","description":"Postoperative opioids planned or given (Apfel 1999). true or false as assigned by the caller. 1 point if true. magent does not take an anesthetic.","required":true,"example":"false"}],"errors":[{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/apfel","citation":{"authors":"Apfel CC, Läärä E, Koivuranta M, Greim CA, Roewer N","doi":"10.1097/00000542-199909000-00022","id":"apfel-1999","pmid":"10485781","source":"Anesthesiology. 1999;91(3):693-700","title":"A simplified risk score for predicting postoperative nausea and vomiting: conclusions from cross-validations between two centers.","url":"https://doi.org/10.1097/00000542-199909000-00022"},"formula_expression":"Apfel = female + history_motion_sickness_or_ponv + nonsmoker + postoperative_opioids; each 1 if true; max 4","purpose":"Sum the four Apfel 1999 predictors for postoperative nausea and vomiting and return the published integer score (0-4).","markdown_url":"https://magentlab.com/docs/apfel.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"apfel"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Apfel 1999 points 0-4"},{"name":"max_score","type":"integer","description":"4"},{"name":"band","type":"string","description":"Published Apfel 1999 score stratum as a string: 0, 1, 2, 3, or 4. The integer score, not a prophylaxis order. Percents are not returned."},{"name":"sex","type":"string","description":"female or male"},{"name":"components","type":"array","description":"Per-predictor points"},{"name":"citation","type":"object","description":"Apfel et al. Anesthesiology 1999 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"history_motion_sickness_or_ponv":"false","nonsmoker":"false","postoperative_opioids":"false","sex":"male"},{"history_motion_sickness_or_ponv":"false","nonsmoker":"false","postoperative_opioids":"false","sex":"male"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/apfel","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/apfel?sex=male&history_motion_sickness_or_ponv=false&nonsmoker=false&postoperative_opioids=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/apfel","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/csrs","description":"Thiruganasambandamoorthy 2016 Canadian Syncope Risk Score: vasovagal predisposition −1, heart disease +1, any ED SBP <90 or >180 +2, troponin above the 99th percentile +2, QRS axis < −30° or >100° +1, QRS duration >130 ms +1, QTc >480 ms +2, ED vasovagal diagnosis −2, ED cardiac diagnosis +2. Score −3 to 11. Caller assigns flags and ECG numbers. Not a medical device, not a syncope diagnosis, and not a disposition protocol.","parameters":[{"in":"query","name":"predisposition_vasovagal","type":"boolean","description":"Predisposition to vasovagal syncope (Thiruganasambandamoorthy 2016). true or false. Scores -1 if true.","required":true,"example":"false"},{"in":"query","name":"heart_disease","type":"boolean","description":"History of heart disease (Thiruganasambandamoorthy 2016). true or false. Scores 1 if true.","required":true,"example":"false"},{"in":"query","name":"sbp_lt_90_or_gt_180","type":"boolean","description":"Any ED systolic BP <90 or >180 mm Hg (caller-assigned; SBP 90 and 180 are not out of range). true or false. Scores 2 if true. magent does not take a numeric SBP.","required":true,"example":"false"},{"in":"query","name":"elevated_troponin","type":"boolean","description":"Troponin above the 99th percentile (Thiruganasambandamoorthy 2016). true or false. Scores 2 if true.","required":true,"example":"false"},{"in":"query","name":"qrs_axis_deg","type":"number","description":"QRS axis in degrees (-180 to 180). Scores 1 when < -30 or > 100 (Figure 2 / abstract; not table 110). -30 and 100 do not score; -31 and 101 do.","required":true,"example":"0"},{"in":"query","name":"qrs_duration_ms","type":"number","description":"QRS duration in milliseconds (40-300). Scores 1 when >130. 130 does not score; 131 does.","required":true,"example":"80"},{"in":"query","name":"qtc_ms","type":"number","description":"QTc in milliseconds (200-800). Scores 2 when >480. 480 does not score; 481 does.","required":true,"example":"400"},{"in":"query","name":"ed_vasovagal_syncope","type":"boolean","description":"ED diagnosis of vasovagal syncope (Thiruganasambandamoorthy 2016). true or false. Scores -2 if true. Cannot be true together with ed_cardiac_syncope.","required":true,"example":"false"},{"in":"query","name":"ed_cardiac_syncope","type":"boolean","description":"ED diagnosis of cardiac syncope (Thiruganasambandamoorthy 2016). true or false. Scores 2 if true. Cannot be true together with ed_vasovagal_syncope.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_qrs_axis","message":"qrs_axis_deg must be a number from -180 to 180 (Thiruganasambandamoorthy 2016 CSRS). Returned before settlement; you are not charged.","status":400},{"code":"invalid_qrs_duration","message":"qrs_duration_ms must be a number from 40 to 300 (Thiruganasambandamoorthy 2016 CSRS). Returned before settlement; you are not charged.","status":400},{"code":"invalid_qtc_ms","message":"qtc_ms must be a number from 200 to 800 (Thiruganasambandamoorthy 2016 CSRS). Returned before settlement; you are not charged.","status":400},{"code":"invalid_csrs_ed_diagnosis","message":"ed_vasovagal_syncope and ed_cardiac_syncope cannot both be true (Thiruganasambandamoorthy 2016 CSRS). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/csrs","citation":{"authors":"Thiruganasambandamoorthy V, Kwong K, Wells GA, et al.","doi":"10.1503/cmaj.151469","id":"thiruganasambandamoorthy-2016","pmid":"27378464","source":"CMAJ. 2016;188(12):E289-E298","title":"Development of the Canadian Syncope Risk Score to predict serious adverse events after emergency department assessment of syncope.","url":"https://doi.org/10.1503/cmaj.151469"},"formula_expression":"CSRS = predisposition_vasovagal(-1) + heart_disease(1) + sbp_lt_90_or_gt_180(2) + elevated_troponin(2) + (qrs_axis < -30 or > 100)(1) + (qrs_duration > 130)(1) + (qtc > 480)(2) + ed_vasovagal_syncope(-2) + ed_cardiac_syncope(2); range -3 to 11; max 11; Figure 2 / abstract (axis >100, not table 110)","purpose":"Compute the Thiruganasambandamoorthy 2016 Canadian Syncope Risk Score from caller-assigned ED clinical flags and ECG numbers.","markdown_url":"https://magentlab.com/docs/csrs.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"csrs"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"CSRS points from -3 to 11"},{"name":"max_score","type":"integer","description":"11"},{"name":"qrs_axis_deg","type":"number","description":"QRS axis in degrees used for the < -30 or > 100 cutoff"},{"name":"qrs_duration_ms","type":"number","description":"QRS duration in ms used for the >130 cutoff"},{"name":"qtc_ms","type":"number","description":"QTc in ms used for the >480 cutoff"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Thiruganasambandamoorthy 2016 CMAJ citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"ed_cardiac_syncope":"false","ed_vasovagal_syncope":"false","elevated_troponin":"false","heart_disease":"false","predisposition_vasovagal":"false","qrs_axis_deg":"0","qrs_duration_ms":"80","qtc_ms":"400","sbp_lt_90_or_gt_180":"false"},{"ed_cardiac_syncope":"false","ed_vasovagal_syncope":"false","elevated_troponin":"false","heart_disease":"false","predisposition_vasovagal":"false","qrs_axis_deg":"0","qrs_duration_ms":"80","qtc_ms":"400","sbp_lt_90_or_gt_180":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/csrs","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/csrs?predisposition_vasovagal=false&heart_disease=false&sbp_lt_90_or_gt_180=false&elevated_troponin=false&qrs_axis_deg=0&qrs_duration_ms=80&qtc_ms=400&ed_vasovagal_syncope=false&ed_cardiac_syncope=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/csrs","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/bacterial-meningitis","description":"Nigrovic 2002 Bacterial Meningitis Score: CSF Gram stain (2), CSF ANC ≥1000 cells/µL (1), CSF protein ≥80 mg/dL (1), peripheral ANC ≥10 000 cells/µL (1), seizure (1). Max 6. very_low_risk if 0, not_low_risk if ≥1. Children with CSF pleocytosis as in Nigrovic 2002; not a neonatal score. Not a meningitis diagnosis or an antibiotic/LP order. magent does not stain CSF, count neutrophils, assay protein, or witness a seizure.","parameters":[{"in":"query","name":"csf_gram_stain","type":"boolean","description":"Positive CSF Gram stain as assigned by the caller (Nigrovic 2002). true scores 2, not 1. magent does not stain CSF.","required":true,"example":"false"},{"in":"query","name":"csf_anc_ge_1000","type":"boolean","description":"CSF ANC ≥1000 cells/µL as assigned by the caller (Nigrovic 2002). true scores 1. magent does not count neutrophils.","required":true,"example":"false"},{"in":"query","name":"csf_protein_ge_80","type":"boolean","description":"CSF protein ≥80 mg/dL as assigned by the caller (Nigrovic 2002). true scores 1. magent does not assay protein.","required":true,"example":"false"},{"in":"query","name":"peripheral_anc_ge_10000","type":"boolean","description":"Peripheral ANC ≥10 000 cells/µL as assigned by the caller (Nigrovic 2002). true scores 1. magent does not count neutrophils.","required":true,"example":"false"},{"in":"query","name":"seizure","type":"boolean","description":"Seizure at or before presentation as assigned by the caller (Nigrovic 2002). true scores 1. magent does not witness a seizure.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/bacterial-meningitis","citation":{"authors":"Nigrovic LE, Kuppermann N, Malley R","doi":"10.1542/peds.110.4.712","id":"nigrovic-2002","pmid":"12359784","source":"Pediatrics. 2002;110(4):712-719","title":"Development and validation of a multivariable predictive model to distinguish bacterial from aseptic meningitis in children in the post-Haemophilus influenzae era","url":"https://doi.org/10.1542/peds.110.4.712"},"formula_expression":"Bacterial Meningitis Score = csf_gram_stain 2 + csf_anc_ge_1000 1 + csf_protein_ge_80 1 + peripheral_anc_ge_10000 1 + seizure 1; Nigrovic 2002; max 6; very_low_risk 0, not_low_risk ≥1","purpose":"Sum the Nigrovic 2002 Bacterial Meningitis Score weights for children with CSF pleocytosis and return very_low_risk (0) or not_low_risk (≥1).","markdown_url":"https://magentlab.com/docs/bacterial-meningitis.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"bacterial_meningitis"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Bacterial Meningitis Score points 0-6"},{"name":"max_score","type":"integer","description":"Always 6"},{"name":"bacterial_meningitis_band","type":"string","description":"very_low_risk when score is 0, not_low_risk when score ≥1 (Nigrovic 2002 lack-all-criteria rule). Not a meningitis diagnosis or an antibiotic/LP order."},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Nigrovic 2002 Pediatrics citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"csf_anc_ge_1000":"false","csf_gram_stain":"false","csf_protein_ge_80":"false","peripheral_anc_ge_10000":"false","seizure":"false"},{"csf_anc_ge_1000":"false","csf_gram_stain":"false","csf_protein_ge_80":"false","peripheral_anc_ge_10000":"false","seizure":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/bacterial-meningitis","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/bacterial-meningitis?csf_gram_stain=false&csf_anc_ge_1000=false&csf_protein_ge_80=false&peripheral_anc_ge_10000=false&seizure=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/bacterial-meningitis","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rochester","description":"Dagan 1985 Rochester criteria. Low-risk only if the infant is younger than 3 months (age_days 0-89) and every caller-assigned finding holds: previously healthy term infant, well appearing, no ear/soft-tissue/skeletal infection, WBC 5000-15000/mm3 inclusive, absolute band count <1500/mm3, UA <=10 WBC/hpf, and stool <=5 WBC/hpf if diarrhea. Returns low_risk. magent does not examine the infant. Not Boston, Philadelphia, or PECARN febrile infant 2021. Not a medical device and not a discharge order.","parameters":[{"in":"query","name":"age_days","type":"integer","description":"Chronological age in days (integer 0-90). Dagan 1985 studied infants younger than 3 months; low-risk requires age_days < 90 (0-89). 90 is accepted but is not low-risk.","required":true,"example":"45"},{"in":"query","name":"previously_healthy","type":"boolean","description":"Previously healthy as in Dagan 1985: born at term, no perinatal complications, no previous or underlying disease, and no previous antibiotic therapy. true or false as assigned by the caller. magent does not take a birth history.","required":true,"example":"true"},{"in":"query","name":"well_appearing","type":"boolean","description":"Well appearing / not ill appearing as assigned by the caller. true or false. magent does not examine the infant.","required":true,"example":"true"},{"in":"query","name":"no_focal_infection","type":"boolean","description":"No physical findings consistent with ear, soft tissue, or skeletal infection (Dagan 1985). true means none of those foci are present. true or false as assigned by the caller. magent does not examine the infant.","required":true,"example":"true"},{"in":"query","name":"wbc_k_ul","type":"number","description":"Peripheral WBC in 10^3/µL (same as 10^9/L or 10^3/mm^3). Provide wbc_k_ul or wbc_ul. Range 0.01-500. Low-risk requires 5.0-15.0 inclusive (5000-15000/mm^3; 5.0 and 15.0 meet; 4.99 and 15.01 do not).","required":false,"example":"8.0"},{"in":"query","name":"wbc_ul","type":"number","description":"Peripheral WBC in cells/µL (same as cells/mm^3). Provide wbc_k_ul or wbc_ul. Range 10-500000. Low-risk requires 5000-15000 inclusive (5000 and 15000 meet; 4999 and 15001 do not).","required":false,"example":"8000"},{"in":"query","name":"abc_ul","type":"number","description":"Absolute band count in cells/µL (same as bands/mm^3). Range 0-100000. Dagan 1985 low-risk requires less than 1500 (1499 meets; 1500 does not).","required":true,"example":"200"},{"in":"query","name":"ua_wbc_le_10","type":"boolean","description":"Urinalysis ≤10 WBC/hpf (normal urine findings as used with Dagan 1985 Rochester). true or false as assigned by the caller. magent does not read the sediment.","required":true,"example":"true"},{"in":"query","name":"diarrhea","type":"boolean","description":"Diarrhea is present. true or false as assigned by the caller. When true, stool_wbc_le_5 is required. When false, the stool criterion holds without a stool smear.","required":true,"example":"false"},{"in":"query","name":"stool_wbc_le_5","type":"boolean","description":"Stool ≤5 WBC/hpf. Required when diarrhea is true. true or false as assigned by the caller. Ignored when diarrhea is false. magent does not read the smear.","required":false,"example":"true"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_rochester","message":"each Rochester 1985 febrile-infant criterion must be true or false. Returned before settlement; you are not charged.","status":400},{"code":"invalid_age_days","message":"age_days must be an integer from 0 to 90 (Dagan 1985 Rochester). Returned before settlement; you are not charged.","status":400},{"code":"invalid_wbc","message":"wbc_k_ul (0.01-500) or wbc_ul (10-500000) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rochester","citation":{"authors":"Dagan R, Powell KR, Hall CB, Menegus MA","doi":"10.1016/s0022-3476(85)80175-x","id":"dagan-1985","pmid":"4067741","source":"J Pediatr. 1985;107(6):855-860","title":"Identification of infants unlikely to have serious bacterial infection although hospitalized for suspected sepsis","url":"https://doi.org/10.1016/s0022-3476(85)80175-x"},"formula_expression":"low_risk iff age_days < 90 and previously_healthy and well_appearing and no_focal_infection and 5000 <= wbc_ul <= 15000 and abc_ul < 1500 and ua_wbc_le_10 and (not diarrhea or stool_wbc_le_5) (Dagan 1985)","purpose":"Apply the Dagan 1985 Rochester criteria and return low_risk only when every published criterion holds for an infant younger than 3 months.","markdown_url":"https://magentlab.com/docs/rochester.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rochester"},{"name":"formula_expression","type":"string","description":"Dagan 1985 all-criteria low-risk rule"},{"name":"low_risk","type":"boolean","description":"true only when every Dagan 1985 Rochester low-risk criterion holds. false is not_low_risk. Not an SBI probability and not a discharge order."},{"name":"age_days","type":"integer","description":"Age in days used for the younger-than-3-months (age_days < 90) criterion"},{"name":"wbc_ul","type":"number","description":"Normalized peripheral WBC in cells/µL used for the 5000-15000 inclusive cutoff"},{"name":"abc_ul","type":"number","description":"Absolute band count in cells/µL used for the <1500 cutoff"},{"name":"criteria","type":"array","description":"Per-criterion rows with factor and met: age_lt_90, previously_healthy, well_appearing, no_focal_infection, wbc_5_to_15, abc_lt_1500, ua_wbc_le_10, stool_ok. low_risk iff all are met."},{"name":"citation","type":"object","description":"Dagan et al. J Pediatr 1985 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"abc_ul":"200","age_days":"45","diarrhea":"false","no_focal_infection":"true","previously_healthy":"true","ua_wbc_le_10":"true","wbc_k_ul":"8.0","well_appearing":"true"},{"abc_ul":"200","age_days":"45","diarrhea":"false","no_focal_infection":"true","previously_healthy":"true","ua_wbc_le_10":"true","wbc_k_ul":"8.0","well_appearing":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rochester","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rochester?age_days=45&previously_healthy=true&well_appearing=true&no_focal_infection=true&wbc_k_ul=8.0&abc_ul=200&ua_wbc_le_10=true&diarrhea=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rochester","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rule-7s","description":"Cohn 2012 Rule of 7s. Low-risk for Lyme meningitis iff all three hold: headache duration <7 days, CSF mononuclear cells <70%, and no seventh or other cranial-nerve palsy. Seven days and 70% are not low-risk. The caller assigns duration, CSF differential, and palsy. magent does not examine nerves or count CSF cells. Not a Lyme diagnosis, not a medical device, and not a treatment or discharge order. Does not compute Avery 2006 logistic probabilities.","parameters":[{"in":"query","name":"headache_days","type":"integer","description":"Duration of headache in days (integer 0-90). Low-risk criterion holds when strictly less than 7. Seven days is not low-risk. magent does not take a history.","required":true,"example":"3"},{"in":"query","name":"csf_mononuclear_percent","type":"number","description":"CSF mononuclear cell percent (0-100). Low-risk criterion holds when strictly less than 70. Seventy percent is not low-risk. magent does not count CSF cells.","required":true,"example":"40"},{"in":"query","name":"cranial_nerve_palsy","type":"boolean","description":"Seventh or other cranial-nerve palsy. true or false as assigned by the caller. Low-risk criterion holds when false (palsy absent). magent does not examine nerves.","required":true,"example":"false"}],"errors":[{"code":"invalid_headache_days","message":"headache_days must be an integer from 0 to 90 (Cohn 2012 Rule of 7s). Returned before settlement; you are not charged.","status":400},{"code":"invalid_csf_mononuclear","message":"csf_mononuclear_percent must be a number from 0 to 100 (Cohn 2012 Rule of 7s). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rule-7s","citation":{"authors":"Cohn KA, Thompson AD, Shah SS, Hines EM, Lyons TW, Welsh EJ, Nigrovic LE","doi":"10.1542/peds.2011-1215","id":"cohn-2012","pmid":"22184651","source":"Pediatrics. 2012;129(1):e46-e53","title":"Validation of a clinical prediction rule to distinguish Lyme meningitis from aseptic meningitis","url":"https://doi.org/10.1542/peds.2011-1215"},"formula_expression":"low-risk iff headache_days < 7 and csf_mononuclear_percent < 70 and cranial_nerve_palsy is false","purpose":"Apply the Cohn 2012 Rule of 7s and return whether all three published low-risk criteria hold (rule7s_low_risk).","markdown_url":"https://magentlab.com/docs/rule-7s.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rule_7s"},{"name":"formula_expression","type":"string","description":"Cohn 2012 three-item Rule of 7s low-risk conjunction"},{"name":"rule7s_low_risk","type":"boolean","description":"true only when all three Cohn 2012 low-risk criteria hold. Not a Lyme diagnosis and not a treatment or discharge order."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met; met is true when that Cohn 2012 low-risk criterion holds"},{"name":"citation","type":"object","description":"Cohn 2012 Pediatrics citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"cranial_nerve_palsy":"false","csf_mononuclear_percent":"40","headache_days":"3"},{"cranial_nerve_palsy":"false","csf_mononuclear_percent":"40","headache_days":"3"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rule-7s","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rule-7s?headache_days=3&csf_mononuclear_percent=40&cranial_nerve_palsy=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rule-7s","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/acef-ii","description":"Ranucci 2018 ACEF II for cardiac surgery: ACEF II = age/EF + 2.0 if serum creatinine > 2.0 mg/dL + 3.0 if emergency surgery + 0.2 × (hematocrit points below 36%). Hematocrit ≥ 36% contributes 0. Returns the published score only (4 decimals). Not original ACEF 2009, not a predicted-mortality percent, and not an operative clearance.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). magent clamp; Ranucci 2018 uses age in years.","required":true,"example":"70"},{"in":"query","name":"ejection_fraction_percent","type":"number","description":"Left-ventricular ejection fraction in percent (10-80). magent clamp. Denominator of age/EF.","required":true,"example":"50"},{"in":"query","name":"creatinine_mg_dl","type":"number","description":"Serum creatinine in mg/dL (0.1-20). Provide this or creatinine_umol_l, not both. Extra 2.0 only when strictly greater than 2.0 mg/dL (Ranucci 2018).","required":false,"example":"1.0"},{"in":"query","name":"creatinine_umol_l","type":"number","description":"Serum creatinine in µmol/L (9-1768). Converted as mg/dL = µmol/L / 88.42.","required":false,"example":"88.42"},{"in":"query","name":"emergency_surgery","type":"boolean","description":"true if the operation is emergency cardiac surgery (Ranucci 2018 +3.0). true or false.","required":true,"example":"false"},{"in":"query","name":"hematocrit_percent","type":"number","description":"Preoperative hematocrit in percent (15-60). magent clamp. HCT ≥ 36 contributes 0; each percentage point below 36 adds 0.2.","required":true,"example":"40"}],"errors":[{"code":"invalid_acef_ii","message":"ejection_fraction_percent 10-80, creatinine_mg_dl 0.1-20, and hematocrit_percent 15-60 (Ranucci 2018; magent clamps). Returned before settlement; you are not charged.","status":400},{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_creatinine","message":"creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/acef-ii","citation":{"authors":"Ranucci M, Pistuddi V, Scolletta S, de Vincentiis C, Menicanti L","doi":"10.1093/eurheartj/ehx228","id":"ranucci-2018","pmid":"28498904","source":"Eur Heart J. 2018;39(23):2183-2189","title":"The ACEF II Risk Score for cardiac surgery: updated but still parsimonious","url":"https://doi.org/10.1093/eurheartj/ehx228"},"formula_expression":"ACEF II = age/EF + 2.0 (if serum creatinine > 2.0 mg/dL) + 3.0 (if emergency surgery) + 0.2 × (HCT points below 36%)","purpose":"Compute the Ranucci 2018 ACEF II score from age, left-ventricular ejection fraction, serum creatinine, emergency surgery, and hematocrit.","markdown_url":"https://magentlab.com/docs/acef-ii.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"acef_ii"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"age_years","type":"integer","description":"Age used in years"},{"name":"ejection_fraction_percent","type":"number","description":"Left-ventricular ejection fraction used, percent"},{"name":"creatinine_mg_dl","type":"number","description":"Serum creatinine used in mg/dL (after conversion)"},{"name":"emergency_surgery","type":"boolean","description":"true if emergency cardiac surgery"},{"name":"hematocrit_percent","type":"number","description":"Preoperative hematocrit used, percent"},{"name":"score","type":"number","description":"Ranucci 2018 ACEF II score, 4 decimal places. Not a mortality percent."},{"name":"citation","type":"object","description":"Ranucci 2018 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"70","creatinine_mg_dl":"1.0","ejection_fraction_percent":"50","emergency_surgery":"false","hematocrit_percent":"40"},{"age":"70","creatinine_mg_dl":"1.0","ejection_fraction_percent":"50","emergency_surgery":"false","hematocrit_percent":"40"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/acef-ii","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/acef-ii?age=70&ejection_fraction_percent=50&creatinine_mg_dl=1.0&emergency_surgery=false&hematocrit_percent=40","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/acef-ii","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/euroscore-ii","description":"Nashef 2012 EuroSCORE II Table 6 logistic in-hospital mortality after adult cardiac surgery. Age Xi is 1 if age <= 60, else age - 59. Renal function is a caller-assigned creatinine-clearance band or dialysis; magent does not run Cockcroft-Gault. Returns logit and estimated_probability_percent from the unrounded logit. Not additive EuroSCORE I, not a medical device, and Nashef 2012 publishes no low/intermediate/high percent cuts.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Nashef 2012 Table 6: Xi = 1 if age <= 60; Xi = age - 59 if older (age 61 → 2). Coefficient 0.0285181 on the encoded step, not on raw years.","required":true,"example":"60"},{"in":"query","name":"sex","type":"string","enum":["male","female"],"description":"Sex as assigned by the caller. male is the reference (0). female adds 0.2196434 (Nashef 2012 Table 6).","required":true,"example":"male"},{"in":"query","name":"renal","type":"string","enum":["cc_gt_85","cc_51_85","cc_le_50","dialysis"],"description":"Nashef 2012 renal-function band as assigned by the caller: cc_gt_85 (reference, 0), cc_51_85 (+0.303553), cc_le_50 (+0.8592256), or dialysis (+0.6421508). magent does not run Cockcroft-Gault and does not parse a creatinine number.","required":true,"example":"cc_gt_85"},{"in":"query","name":"nyha","type":"integer","description":"NYHA class 1-4 as assigned by the caller (Nashef 2012 Table 6). class 1 is the reference (0); class 2 +0.1070545; class 3 +0.2958358; class 4 +0.5597929.","required":true,"example":"1"},{"in":"query","name":"lv_function","type":"string","enum":["good","moderate","poor","very_poor"],"description":"Left-ventricular function band as assigned by the caller: good (LVEF 51% or more, reference 0), moderate (31-50%, +0.3150652), poor (21-30%, +0.8084096), or very_poor (20% or less, +0.9346919). magent does not parse an ejection-fraction number.","required":true,"example":"good"},{"in":"query","name":"urgency","type":"string","enum":["elective","urgent","emergency","salvage"],"description":"Nashef 2012 urgency as assigned by the caller: elective (reference, 0), urgent (+0.3174673), emergency (+0.7039121), or salvage (+1.362947).","required":true,"example":"elective"},{"in":"query","name":"weight_of_procedure","type":"string","enum":["isolated_cabg","single_non_cabg","two","three_plus"],"description":"Nashef 2012 weight of the intervention as assigned by the caller: isolated_cabg (reference, 0), single_non_cabg (+0.0062118), two (+0.5521478), or three_plus (+0.9724533). magent does not classify an operative note.","required":true,"example":"isolated_cabg"},{"in":"query","name":"pulmonary_hypertension","type":"string","enum":["none","moderate","severe"],"description":"Nashef 2012 Table 6 PA systolic-pressure band as assigned by the caller: none (reference, 0), moderate (31-55 mmHg, +0.1788899), or severe (>=55 mmHg, +0.3491475). magent does not parse a PA pressure number.","required":true,"example":"none"},{"in":"query","name":"extracardiac_arteriopathy","type":"boolean","description":"true if extracardiac arteriopathy is present (Nashef 2012 Table 6 ECA +0.5360268). true or false.","required":true,"example":"false"},{"in":"query","name":"poor_mobility","type":"boolean","description":"true if severe impairment of mobility secondary to musculoskeletal or neurological dysfunction (Nashef 2012 Table 6 N/M mob +0.2407181). true or false.","required":true,"example":"false"},{"in":"query","name":"previous_cardiac_surgery","type":"boolean","description":"true if one or more previous major cardiac operations involving opening the pericardium (Nashef 2012 Table 6 redo +1.118599). true or false.","required":true,"example":"false"},{"in":"query","name":"chronic_lung_disease","type":"boolean","description":"true if chronic pulmonary dysfunction is present (Nashef 2012 Table 6 CPD +0.1886564). true or false.","required":true,"example":"false"},{"in":"query","name":"active_endocarditis","type":"boolean","description":"true if still on antibiotic treatment for endocarditis at the time of surgery (Nashef 2012 Table 6 AE +0.6194522). true or false.","required":true,"example":"false"},{"in":"query","name":"critical_preoperative_state","type":"boolean","description":"true if a Nashef 2012 critical preoperative state is present (Table 6 +1.086517). true or false. magent does not assign this from a chart.","required":true,"example":"false"},{"in":"query","name":"insulin_dependent_diabetes","type":"boolean","description":"true if insulin-dependent diabetes mellitus (Nashef 2012 Table 6 IDDM +0.3542749). true or false.","required":true,"example":"false"},{"in":"query","name":"ccs_class_4","type":"boolean","description":"true if CCS class 4 angina (Nashef 2012 Table 6 CCS4 +0.2226147). true or false.","required":true,"example":"false"},{"in":"query","name":"recent_mi","type":"boolean","description":"true if myocardial infarction within 90 days before operation (Nashef 2012 Table 6 +0.1528943). true or false.","required":true,"example":"false"},{"in":"query","name":"thoracic_aorta","type":"boolean","description":"true if surgery on the thoracic aorta (Nashef 2012 Table 6 +0.6527205). true or false.","required":true,"example":"false"}],"errors":[{"code":"invalid_euroscore_ii","message":"EuroSCORE II needs Nashef 2012 cardiac-surgery predictors in published ranges. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/euroscore-ii","citation":{"authors":"Nashef SAM, Roques F, Sharples LD, Nilsson J, Smith C, Goldstone AR, Lockowandt U","doi":"10.1093/ejcts/ezs043","id":"nashef-2012","pmid":"22378855","source":"Eur J Cardiothorac Surg. 2012;41(4):734-745","title":"EuroSCORE II","url":"https://doi.org/10.1093/ejcts/ezs043"},"formula_expression":"y = -5.324537 + 0.0285181*age_step + female + renal + extracardiac_arteriopathy + poor_mobility + previous_cardiac_surgery + chronic_lung_disease + active_endocarditis + critical_preoperative_state + insulin_dependent_diabetes + nyha + ccs_class_4 + lv_function + recent_mi + pulmonary_hypertension + urgency + weight_of_procedure + thoracic_aorta (Nashef 2012 Table 6 multivariable); age_step = 1 if age <= 60 else (age - 59); female 0.2196434; renal cc_gt_85 0, cc_51_85 0.303553, cc_le_50 0.8592256, dialysis 0.6421508; extracardiac_arteriopathy 0.5360268; poor_mobility 0.2407181; previous_cardiac_surgery 1.118599; chronic_lung_disease 0.1886564; active_endocarditis 0.6194522; critical_preoperative_state 1.086517; insulin_dependent_diabetes 0.3542749; nyha 1 0, 2 0.1070545, 3 0.2958358, 4 0.5597929; ccs_class_4 0.2226147; lv_function good 0, moderate 0.3150652, poor 0.8084096, very_poor 0.9346919; recent_mi 0.1528943; pulmonary_hypertension none 0, moderate 0.1788899, severe 0.3491475; urgency elective 0, urgent 0.3174673, emergency 0.7039121, salvage 1.362947; weight_of_procedure isolated_cabg 0, single_non_cabg 0.0062118, two 0.5521478, three_plus 0.9724533; thoracic_aorta 0.6527205; estimated_probability_percent = 100 * exp(y) / (1 + exp(y))","purpose":"Compute the Nashef 2012 Table 6 logistic estimated in-hospital mortality after adult cardiac surgery from the published multivariable coefficients.","markdown_url":"https://magentlab.com/docs/euroscore-ii.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"euroscore_ii"},{"name":"formula_expression","type":"string","description":"Nashef 2012 Table 6 logistic expression"},{"name":"age_years","type":"integer","description":"Input age in years"},{"name":"age_step","type":"integer","description":"Nashef 2012 age encoding: 1 if age <= 60, else age - 59"},{"name":"sex","type":"string","description":"male or female"},{"name":"renal","type":"string","description":"cc_gt_85, cc_51_85, cc_le_50, or dialysis"},{"name":"nyha","type":"integer","description":"NYHA class 1-4"},{"name":"lv_function","type":"string","description":"good, moderate, poor, or very_poor"},{"name":"urgency","type":"string","description":"elective, urgent, emergency, or salvage"},{"name":"weight_of_procedure","type":"string","description":"isolated_cabg, single_non_cabg, two, or three_plus"},{"name":"pulmonary_hypertension","type":"string","description":"none, moderate, or severe"},{"name":"extracardiac_arteriopathy","type":"boolean","description":"true if extracardiac arteriopathy"},{"name":"poor_mobility","type":"boolean","description":"true if poor mobility"},{"name":"previous_cardiac_surgery","type":"boolean","description":"true if previous cardiac surgery"},{"name":"chronic_lung_disease","type":"boolean","description":"true if chronic pulmonary dysfunction"},{"name":"active_endocarditis","type":"boolean","description":"true if active endocarditis"},{"name":"critical_preoperative_state","type":"boolean","description":"true if critical preoperative state"},{"name":"insulin_dependent_diabetes","type":"boolean","description":"true if insulin-dependent diabetes"},{"name":"ccs_class_4","type":"boolean","description":"true if CCS class 4 angina"},{"name":"recent_mi","type":"boolean","description":"true if MI within 90 days"},{"name":"thoracic_aorta","type":"boolean","description":"true if surgery on the thoracic aorta"},{"name":"logit","type":"number","description":"Nashef 2012 Table 6 linear predictor y, 4 decimal places"},{"name":"estimated_probability_percent","type":"number","description":"100 * exp(y) / (1 + exp(y)) from the unrounded logit, 2 decimal places. Estimated in-hospital mortality percent, not a clearance."},{"name":"citation","type":"object","description":"Nashef et al. EuroSCORE II 2012 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"active_endocarditis":"false","age":"60","ccs_class_4":"false","chronic_lung_disease":"false","critical_preoperative_state":"false","extracardiac_arteriopathy":"false","insulin_dependent_diabetes":"false","lv_function":"good","nyha":"1","poor_mobility":"false","previous_cardiac_surgery":"false","pulmonary_hypertension":"none","recent_mi":"false","renal":"cc_gt_85","sex":"male","thoracic_aorta":"false","urgency":"elective","weight_of_procedure":"isolated_cabg"},{"active_endocarditis":"false","age":"60","ccs_class_4":"false","chronic_lung_disease":"false","critical_preoperative_state":"false","extracardiac_arteriopathy":"false","insulin_dependent_diabetes":"false","lv_function":"good","nyha":"1","poor_mobility":"false","previous_cardiac_surgery":"false","pulmonary_hypertension":"none","recent_mi":"false","renal":"cc_gt_85","sex":"male","thoracic_aorta":"false","urgency":"elective","weight_of_procedure":"isolated_cabg"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/euroscore-ii","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/euroscore-ii?age=60&sex=male&renal=cc_gt_85&nyha=1&lv_function=good&urgency=elective&weight_of_procedure=isolated_cabg&pulmonary_hypertension=none&extracardiac_arteriopathy=false&poor_mobility=false&previous_cardiac_surgery=false&chronic_lung_disease=false&active_endocarditis=false&critical_preoperative_state=false&insulin_dependent_diabetes=false&ccs_class_4=false&recent_mi=false&thoracic_aorta=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/euroscore-ii","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/brue","description":"BRUE (Tieder 2016 AAP). brue is true iff the infant is younger than 1 year, the episode was sudden, brief, and now resolved, no explanation remains after appropriate history and physical examination, and at least one of: cyanosis or pallor; absent, decreased, or irregular breathing; marked change in tone; altered level of responsiveness. feature_count is 0-4. Caller assigns seven flags. magent does not examine the infant. Not a diagnosis, not ALTE, not SIDS.","parameters":[{"in":"query","name":"age_under_1_year","type":"boolean","description":"Infant younger than 1 year as assigned by the caller (Tieder 2016 BRUE definition). true or false. magent does not examine the infant or take an age in days.","required":true,"example":"true"},{"in":"query","name":"sudden_brief_now_resolved","type":"boolean","description":"Observer reports a sudden, brief, and now resolved episode as assigned by the caller. true or false. magent does not take a history.","required":true,"example":"true"},{"in":"query","name":"cyanosis_or_pallor","type":"boolean","description":"Cyanosis or pallor during the episode (one of four event features; at least one required). true or false as assigned by the caller. magent does not examine the infant.","required":true,"example":"true"},{"in":"query","name":"absent_decreased_irregular_breathing","type":"boolean","description":"Absent, decreased, or irregular breathing during the episode (one of four event features; at least one required). true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"marked_tone_change","type":"boolean","description":"Marked change in tone (hyper- or hypotonia) during the episode (one of four event features; at least one required). true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"altered_responsiveness","type":"boolean","description":"Altered level of responsiveness during the episode (one of four event features; at least one required). true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"unexplained_after_history_exam","type":"boolean","description":"No explanation remains after appropriate history and physical examination as assigned by the caller. true means unexplained and is required for BRUE. true or false. magent does not examine the infant.","required":true,"example":"true"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/brue","citation":{"authors":"Tieder JS, Bonkowsky JL, Etzel RA, et al; American Academy of Pediatrics Subcommittee on Apparent Life-Threatening Events","doi":"10.1542/peds.2016-0590","id":"tieder-2016","pmid":"27244835","source":"Pediatrics. 2016;137(5):e20160590","title":"Brief Resolved Unexplained Events (Formerly Apparent Life-Threatening Events) and Evaluation of Lower-Risk Infants","url":"https://doi.org/10.1542/peds.2016-0590"},"formula_expression":"brue iff age_under_1_year and sudden_brief_now_resolved and unexplained_after_history_exam and feature_count >= 1; feature_count counts cyanosis_or_pallor, absent_decreased_irregular_breathing, marked_tone_change, and altered_responsiveness (Tieder 2016 AAP BRUE definition)","purpose":"Apply the Tieder 2016 AAP BRUE definition and return feature_count (0-4) and whether the published definition box holds (brue).","markdown_url":"https://magentlab.com/docs/brue.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"brue"},{"name":"formula_expression","type":"string","description":"Tieder 2016 AAP BRUE definition box: infant younger than 1 year, sudden brief now resolved, unexplained after history and exam, and at least 1 of 4 event features"},{"name":"feature_count","type":"integer","description":"Count of true event features among cyanosis or pallor, absent/decreased/irregular breathing, marked tone change, and altered responsiveness (0-4)"},{"name":"brue","type":"boolean","description":"true only when age under 1 year, sudden brief now resolved, unexplained after history and exam, and feature_count >= 1 all hold. Not a diagnosis. Not ALTE. Not SIDS."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met; feature_count_ge_1 includes value 0-4"},{"name":"citation","type":"object","description":"Tieder 2016 Pediatrics AAP guideline citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"absent_decreased_irregular_breathing":"false","age_under_1_year":"true","altered_responsiveness":"false","cyanosis_or_pallor":"true","marked_tone_change":"false","sudden_brief_now_resolved":"true","unexplained_after_history_exam":"true"},{"absent_decreased_irregular_breathing":"false","age_under_1_year":"true","altered_responsiveness":"false","cyanosis_or_pallor":"true","marked_tone_change":"false","sudden_brief_now_resolved":"true","unexplained_after_history_exam":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/brue","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/brue?age_under_1_year=true&sudden_brief_now_resolved=true&cyanosis_or_pallor=true&absent_decreased_irregular_breathing=false&marked_tone_change=false&altered_responsiveness=false&unexplained_after_history_exam=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/brue","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/brue-2","description":"Nama 2022 Supplemental Table 7 logistic probabilities of a serious underlying diagnosis and of event recurrence after a brief resolved unexplained event from age in days, similar-event history, abnormal medical history, prematurity, event clusters, color change, abnormal breathing, and tone change. Returns logits and percents from the unrounded logits. Not a medical device. No admission cutoff. magent does not examine the infant.","parameters":[{"in":"query","name":"age_days","type":"integer","description":"Age in days (0-364). Nama 2022 Supplemental Table 7 serious-diagnosis model: +0.0025 per day. Recurrence model does not use age. magent does not examine the infant.","required":true,"example":"90"},{"in":"query","name":"history_of_similar_event","type":"boolean","description":"History of a similar event before the index presentation (Nama 2022 Supplemental Table 7). true or false as assigned by the caller. Serious-diagnosis +0.56; recurrence +0.58. magent does not examine the infant.","required":true,"example":"false"},{"in":"query","name":"abnormal_medical_history","type":"boolean","description":"Abnormal medical history such as previous hospitalization or an underlying medical condition (Nama 2022 Supplemental Table 7). true or false as assigned by the caller. Serious-diagnosis +0.65. Recurrence model does not use this flag.","required":true,"example":"false"},{"in":"query","name":"prematurity","type":"boolean","description":"Prematurity as published: born <32 weeks, or born between 32 and 38 weeks and corrected to <45 weeks (Nama 2022 Supplemental Table 7). true or false as assigned by the caller. Recurrence +0.46.","required":true,"example":"false"},{"in":"query","name":"history_of_event_clusters","type":"boolean","description":"History of multiple events or event clusters before presentation (Nama 2022 Supplemental Table 7). true or false as assigned by the caller. Recurrence +1.17.","required":true,"example":"false"},{"in":"query","name":"color_change","type":"boolean","description":"Color change (cyanosis or pallor) during the event (Nama 2022 Supplemental Table 7). true or false as assigned by the caller. Recurrence +0.36. magent does not examine the infant.","required":true,"example":"false"},{"in":"query","name":"abnormal_respiratory_pattern","type":"boolean","description":"Abnormal respiratory pattern (absent, decreased, or irregular breathing) during the event (Nama 2022 Supplemental Table 7). true or false as assigned by the caller. Recurrence -0.32.","required":true,"example":"false"},{"in":"query","name":"tone_change","type":"boolean","description":"Marked change in tone (hypertonia or hypotonia) during the event (Nama 2022 Supplemental Table 7). true or false as assigned by the caller. Recurrence -0.31.","required":true,"example":"false"}],"errors":[{"code":"invalid_brue_2","message":"BRUE 2.0 needs the published infant event criteria as true or false or the paper's tokens. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/brue-2","citation":{"authors":"Nama N, Hall M, Neuman M, et al.","doi":"10.1542/hpeds.2022-006637","id":"nama-2022","pmid":"35965279","source":"Hosp Pediatr. 2022;12(9):772-785","title":"Risk Prediction After a Brief Resolved Unexplained Event","url":"https://doi.org/10.1542/hpeds.2022-006637"},"formula_expression":"Ls = -3.75 + 0.56*history_of_similar_event + 0.65*abnormal_medical_history + 0.0025*age_days; Lr = -2.44 + 0.46*prematurity + 0.58*history_of_similar_event + 1.17*history_of_event_clusters + 0.36*color_change - 0.32*abnormal_respiratory_pattern - 0.31*tone_change (Nama 2022 Supplemental Table 7); estimated_serious_diagnosis_percent = 100 * exp(Ls) / (1 + exp(Ls)); estimated_event_recurrence_percent = 100 * exp(Lr) / (1 + exp(Lr))","purpose":"Compute the Nama 2022 Supplemental Table 7 logistic probabilities of a serious underlying diagnosis and of event recurrence from age in days, similar-event history, abnormal medical history, prematurity, event clusters, color change, abnormal respiratory pattern, and tone change.","markdown_url":"https://magentlab.com/docs/brue-2.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"brue_2"},{"name":"formula_expression","type":"string","description":"Nama 2022 Supplemental Table 7 logistic expressions"},{"name":"age_days","type":"integer","description":"Input age in days (0-364)"},{"name":"history_of_similar_event","type":"boolean","description":"Caller-assigned similar-event history before the index presentation"},{"name":"abnormal_medical_history","type":"boolean","description":"Caller-assigned abnormal medical history"},{"name":"prematurity","type":"boolean","description":"Caller-assigned published prematurity flag"},{"name":"history_of_event_clusters","type":"boolean","description":"Caller-assigned history of multiple events or event clusters"},{"name":"color_change","type":"boolean","description":"Caller-assigned cyanosis or pallor during the event"},{"name":"abnormal_respiratory_pattern","type":"boolean","description":"Caller-assigned absent, decreased, or irregular breathing during the event"},{"name":"tone_change","type":"boolean","description":"Caller-assigned marked tone change during the event"},{"name":"serious_diagnosis_logit","type":"number","description":"Nama 2022 Supplemental Table 7 serious-diagnosis linear predictor Ls, 4 decimal places"},{"name":"estimated_serious_diagnosis_percent","type":"number","description":"100 * exp(Ls) / (1 + exp(Ls)) from the unrounded logit, 2 decimal places. A probability, not an admission cutoff."},{"name":"event_recurrence_logit","type":"number","description":"Nama 2022 Supplemental Table 7 event-recurrence linear predictor Lr, 4 decimal places"},{"name":"estimated_event_recurrence_percent","type":"number","description":"100 * exp(Lr) / (1 + exp(Lr)) from the unrounded logit, 2 decimal places. Recurrence in the derivation cohort was during the index visit. A probability, not an admission cutoff."},{"name":"citation","type":"object","description":"Nama et al. Hosp Pediatr 2022 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"abnormal_medical_history":"false","abnormal_respiratory_pattern":"false","age_days":"90","color_change":"false","history_of_event_clusters":"false","history_of_similar_event":"false","prematurity":"false","tone_change":"false"},{"abnormal_medical_history":"false","abnormal_respiratory_pattern":"false","age_days":"90","color_change":"false","history_of_event_clusters":"false","history_of_similar_event":"false","prematurity":"false","tone_change":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/brue-2","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/brue-2?age_days=90&history_of_similar_event=false&abnormal_medical_history=false&prematurity=false&history_of_event_clusters=false&color_change=false&abnormal_respiratory_pattern=false&tone_change=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/brue-2","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/scorten","description":"Bastuji-Garin 2000 SCORTEN from seven caller-assigned flags (age >40, malignancy, HR >120, detachment >10% BSA, urea >10 mmol/L, glucose >14 mmol/L, bicarbonate <20 mmol/L); 1 each, max 7. Predicted in-hospital mortality 0–1 3.2%, 2 12.1%, 3 35.3%, 4 58.3%, ≥5 90%. Not a TEN/SJS diagnosis and not an ICU or IVIG order. magent does not measure labs or BSA.","parameters":[{"in":"query","name":"age_gt_40","type":"boolean","description":"Age >40 years (Bastuji-Garin 2000). true or false as assigned by the caller. magent does not compute age.","required":true,"example":"false"},{"in":"query","name":"malignancy","type":"boolean","description":"Presence of malignancy (Bastuji-Garin 2000). true or false as assigned by the caller. magent does not diagnose cancer.","required":true,"example":"false"},{"in":"query","name":"heart_rate_gt_120","type":"boolean","description":"Heart rate >120 beats/min (Bastuji-Garin 2000). true or false as assigned by the caller. magent does not measure heart rate.","required":true,"example":"false"},{"in":"query","name":"epidermal_detachment_gt_10_percent","type":"boolean","description":"Epidermal detachment >10% of body surface area (Bastuji-Garin 2000). true or false as assigned by the caller. magent does not measure BSA.","required":true,"example":"false"},{"in":"query","name":"urea_gt_10_mmol_l","type":"boolean","description":"Serum urea >10 mmol/L (Bastuji-Garin 2000; equivalent BUN >28 mg/dL). true or false as assigned by the caller. magent does not assay urea or convert BUN.","required":true,"example":"false"},{"in":"query","name":"glucose_gt_14_mmol_l","type":"boolean","description":"Serum glucose >14 mmol/L (Bastuji-Garin 2000). true or false as assigned by the caller. magent does not assay glucose.","required":true,"example":"false"},{"in":"query","name":"bicarbonate_lt_20_mmol_l","type":"boolean","description":"Serum bicarbonate <20 mmol/L (Bastuji-Garin 2000). true or false as assigned by the caller. magent does not assay bicarbonate.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/scorten","citation":{"authors":"Bastuji-Garin S, Fouchard N, Bertocchi M, Roujeau JC, Revuz J, Wolkenstein P","doi":"10.1046/j.1523-1747.2000.00061.x","id":"bastuji-garin-2000","pmid":"10951229","source":"J Invest Dermatol. 2000;115(2):149-153","title":"SCORTEN: a severity-of-illness score for toxic epidermal necrolysis","url":"https://doi.org/10.1046/j.1523-1747.2000.00061.x"},"formula_expression":"SCORTEN = age_gt_40 + malignancy + heart_rate_gt_120 + epidermal_detachment_gt_10_percent + urea_gt_10_mmol_l + glucose_gt_14_mmol_l + bicarbonate_lt_20_mmol_l; each 1 if true; Bastuji-Garin 2000; max 7; predicted in-hospital mortality 0-1 3.2%, 2 12.1%, 3 35.3%, 4 58.3%, >=5 90%","purpose":"Sum the seven Bastuji-Garin 2000 SCORTEN risk factors from caller-assigned flags and return the 0–7 score and that paper's predicted in-hospital mortality token.","markdown_url":"https://magentlab.com/docs/scorten.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"scorten"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"SCORTEN points 0-7"},{"name":"max_score","type":"integer","description":"Always 7"},{"name":"predicted_mortality","type":"string","description":"Bastuji-Garin 2000 predicted in-hospital mortality token: 3.2_percent (score 0–1), 12.1_percent (2), 35.3_percent (3), 58.3_percent (4), 90_percent (≥5). Not a TEN/SJS diagnosis and not an ICU or IVIG order."},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Bastuji-Garin 2000 J Invest Dermatol citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age_gt_40":"false","bicarbonate_lt_20_mmol_l":"false","epidermal_detachment_gt_10_percent":"false","glucose_gt_14_mmol_l":"false","heart_rate_gt_120":"false","malignancy":"false","urea_gt_10_mmol_l":"false"},{"age_gt_40":"false","bicarbonate_lt_20_mmol_l":"false","epidermal_detachment_gt_10_percent":"false","glucose_gt_14_mmol_l":"false","heart_rate_gt_120":"false","malignancy":"false","urea_gt_10_mmol_l":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/scorten","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/scorten?age_gt_40=false&malignancy=false&heart_rate_gt_120=false&epidermal_detachment_gt_10_percent=false&urea_gt_10_mmol_l=false&glucose_gt_14_mmol_l=false&bicarbonate_lt_20_mmol_l=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/scorten","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/regiscar","description":"Kardaun 2007 RegiSCAR DRESS scoring letter from ten caller-assigned items (sum -4 to 9). Bands: <2 none, 2-3 possible, 4-5 probable, >=6 definite. Not a DRESS diagnosis, not SCORTEN, not J-SCAR. magent does not count eosinophils or read a biopsy. Biopsy unknown is not offered. Not a medical device.","parameters":[{"in":"query","name":"fever_ge_38_5","type":"boolean","description":"Caller-assigned fever ≥38.5 °C (Kardaun 2007). true scores 0; false scores −1. magent does not measure temperature.","required":true,"example":"true"},{"in":"query","name":"lymphadenopathy_ge_2_sites","type":"boolean","description":"Caller-assigned lymphadenopathy involving ≥2 sites (Kardaun 2007). true scores 1; false scores 0. magent does not examine lymph nodes.","required":true,"example":"false"},{"in":"query","name":"eosinophilia","type":"string","enum":["none","mild","severe"],"description":"Caller-assigned eosinophilia (Kardaun 2007): none (0), mild (1; 700–1499/µL or 10–19%), or severe (2; ≥1500/µL or ≥20%). magent does not count eosinophils.","required":true,"example":"none"},{"in":"query","name":"atypical_lymphocytes","type":"boolean","description":"Caller-assigned atypical lymphocytes (Kardaun 2007). true scores 1; false scores 0. magent does not read a blood film.","required":true,"example":"false"},{"in":"query","name":"rash_gt_50_bsa","type":"boolean","description":"Caller-assigned rash extent >50% body surface area (Kardaun 2007). true scores 1; false scores 0. magent does not measure BSA.","required":true,"example":"false"},{"in":"query","name":"rash_suggestive","type":"boolean","description":"Caller-assigned rash morphology suggestive of DRESS (Kardaun 2007). true scores 1; false scores −1. magent does not examine the skin.","required":true,"example":"false"},{"in":"query","name":"biopsy_compatible","type":"boolean","description":"Caller-assigned skin-biopsy compatibility with DRESS (Kardaun 2007). true scores 0; false scores −1. Unknown is not offered. magent does not read a biopsy.","required":true,"example":"true"},{"in":"query","name":"organs","type":"integer","description":"Caller-assigned organ involvement count (Kardaun 2007): integer 0, 1, or 2 (≥2 organs scores 2). Values outside 0–2 are rejected. magent does not diagnose organ injury.","required":true,"example":"0"},{"in":"query","name":"resolution_ge_15_days","type":"boolean","description":"Caller-assigned resolution ≥15 days (Kardaun 2007). true scores 0; false scores −1. magent does not time the illness.","required":true,"example":"true"},{"in":"query","name":"alternative_causes_excluded","type":"boolean","description":"Caller-assigned exclusion of alternative causes (Kardaun 2007). true scores 1; false scores 0. magent does not exclude infection or other diagnoses.","required":true,"example":"false"}],"errors":[{"code":"invalid_regiscar","message":"RegiSCAR items must use the published Kardaun 2007 values (fever/lymphadenopathy/atypical_lymphocytes/rash flags; eosinophilia none, mild, or severe; organs 0-2; resolution_ge_15_days; alternative_causes_excluded). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/regiscar","citation":{"authors":"Kardaun SH, Sidoroff A, Valeyrie-Allanore L, Halevy S, Davidovici BB, Mockenhaupt M, Roujeau JC","doi":"10.1111/j.1365-2133.2006.07704.x","id":"kardaun-2007","pmid":"17300272","source":"Br J Dermatol. 2007;156(3):609-611","title":"Variability in the clinical pattern of cutaneous side-effects of drugs with systemic symptoms: does a DRESS syndrome really exist?","url":"https://doi.org/10.1111/j.1365-2133.2006.07704.x"},"formula_expression":"RegiSCAR = fever_ge_38_5 (true 0, false −1) + lymphadenopathy_ge_2_sites (true 1, false 0) + eosinophilia (none 0, mild 1, severe 2) + atypical_lymphocytes (true 1, false 0) + rash_gt_50_bsa (true 1, false 0) + rash_suggestive (true 1, false −1) + biopsy_compatible (true 0, false −1) + organs (0/1/≥2 → 0/1/2) + resolution_ge_15_days (true 0, false −1) + alternative_causes_excluded (true 1, false 0); Kardaun 2007 scoring letter; sum −4 to 9; none <2, possible 2–3, probable 4–5, definite ≥6","purpose":"Sum the ten Kardaun 2007 RegiSCAR DRESS scoring-letter items from caller-assigned flags, eosinophilia grade, and organ count, and return the −4 to 9 total and the published none/possible/probable/definite band.","markdown_url":"https://magentlab.com/docs/regiscar.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"regiscar"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Kardaun 2007 RegiSCAR DRESS points −4 to 9"},{"name":"max_score","type":"integer","description":"Always 9"},{"name":"regiscar_band","type":"string","description":"Published validation band: none (<2), possible (2–3), probable (4–5), or definite (≥6). Not a DRESS diagnosis."},{"name":"components","type":"array","description":"Per-item caller-assigned points"},{"name":"citation","type":"object","description":"Kardaun 2007 Br J Dermatol scoring-letter citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"alternative_causes_excluded":"false","atypical_lymphocytes":"false","biopsy_compatible":"true","eosinophilia":"none","fever_ge_38_5":"true","lymphadenopathy_ge_2_sites":"false","organs":"0","rash_gt_50_bsa":"false","rash_suggestive":"false","resolution_ge_15_days":"true"},{"alternative_causes_excluded":"false","atypical_lymphocytes":"false","biopsy_compatible":"true","eosinophilia":"none","fever_ge_38_5":"true","lymphadenopathy_ge_2_sites":"false","organs":"0","rash_gt_50_bsa":"false","rash_suggestive":"false","resolution_ge_15_days":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/regiscar","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/regiscar?fever_ge_38_5=true&lymphadenopathy_ge_2_sites=false&eosinophilia=none&atypical_lymphocytes=false&rash_gt_50_bsa=false&rash_suggestive=false&biopsy_compatible=true&organs=0&resolution_ge_15_days=true&alternative_causes_excluded=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/regiscar","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/uas","description":"Młynek 2008 EAACI/GA2LEN/EDF UAS: seven days of wheals and pruritus integers 0-3. Daily UAS is wheals plus pruritus (0-6). UAS7 is the seven-day sum (0-42). Returns mean_daily_uas. Wheals 0 none, 1 mild (<20/24h), 2 moderate (20-50/24h), 3 intense (>50/24h or confluent). Pruritus 0 none, 1 mild, 2 moderate, 3 intense (interferes with activity or sleep). Seven complete days; no missing-day imputation. Not a diagnosis, not AAS. magent does not count wheals. Not a medical device.","parameters":[{"in":"query","name":"wheals_d1","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Młynek 2008 UAS wheals integer 0-3 for that 24h day: 0 none, 1 mild (<20 wheals/24h), 2 moderate (20-50/24h), 3 intense (>50 wheals/24h or large confluent areas). magent does not count wheals.","required":true,"example":"1"},{"in":"query","name":"wheals_d2","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Młynek 2008 UAS wheals integer 0-3 for that 24h day: 0 none, 1 mild (<20 wheals/24h), 2 moderate (20-50/24h), 3 intense (>50 wheals/24h or large confluent areas). magent does not count wheals.","required":true,"example":"0"},{"in":"query","name":"wheals_d3","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Młynek 2008 UAS wheals integer 0-3 for that 24h day: 0 none, 1 mild (<20 wheals/24h), 2 moderate (20-50/24h), 3 intense (>50 wheals/24h or large confluent areas). magent does not count wheals.","required":true,"example":"0"},{"in":"query","name":"wheals_d4","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Młynek 2008 UAS wheals integer 0-3 for that 24h day: 0 none, 1 mild (<20 wheals/24h), 2 moderate (20-50/24h), 3 intense (>50 wheals/24h or large confluent areas). magent does not count wheals.","required":true,"example":"0"},{"in":"query","name":"wheals_d5","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Młynek 2008 UAS wheals integer 0-3 for that 24h day: 0 none, 1 mild (<20 wheals/24h), 2 moderate (20-50/24h), 3 intense (>50 wheals/24h or large confluent areas). magent does not count wheals.","required":true,"example":"0"},{"in":"query","name":"wheals_d6","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Młynek 2008 UAS wheals integer 0-3 for that 24h day: 0 none, 1 mild (<20 wheals/24h), 2 moderate (20-50/24h), 3 intense (>50 wheals/24h or large confluent areas). magent does not count wheals.","required":true,"example":"0"},{"in":"query","name":"wheals_d7","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Młynek 2008 UAS wheals integer 0-3 for that 24h day: 0 none, 1 mild (<20 wheals/24h), 2 moderate (20-50/24h), 3 intense (>50 wheals/24h or large confluent areas). magent does not count wheals.","required":true,"example":"0"},{"in":"query","name":"pruritus_d1","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Młynek 2008 UAS pruritus integer 0-3 for that 24h day: 0 none, 1 mild (present but not annoying), 2 moderate (troublesome, does not interfere with activity or sleep), 3 intense (interferes with activity or sleep). magent does not grade itch.","required":true,"example":"1"},{"in":"query","name":"pruritus_d2","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Młynek 2008 UAS pruritus integer 0-3 for that 24h day: 0 none, 1 mild (present but not annoying), 2 moderate (troublesome, does not interfere with activity or sleep), 3 intense (interferes with activity or sleep). magent does not grade itch.","required":true,"example":"0"},{"in":"query","name":"pruritus_d3","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Młynek 2008 UAS pruritus integer 0-3 for that 24h day: 0 none, 1 mild (present but not annoying), 2 moderate (troublesome, does not interfere with activity or sleep), 3 intense (interferes with activity or sleep). magent does not grade itch.","required":true,"example":"0"},{"in":"query","name":"pruritus_d4","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Młynek 2008 UAS pruritus integer 0-3 for that 24h day: 0 none, 1 mild (present but not annoying), 2 moderate (troublesome, does not interfere with activity or sleep), 3 intense (interferes with activity or sleep). magent does not grade itch.","required":true,"example":"0"},{"in":"query","name":"pruritus_d5","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Młynek 2008 UAS pruritus integer 0-3 for that 24h day: 0 none, 1 mild (present but not annoying), 2 moderate (troublesome, does not interfere with activity or sleep), 3 intense (interferes with activity or sleep). magent does not grade itch.","required":true,"example":"0"},{"in":"query","name":"pruritus_d6","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Młynek 2008 UAS pruritus integer 0-3 for that 24h day: 0 none, 1 mild (present but not annoying), 2 moderate (troublesome, does not interfere with activity or sleep), 3 intense (interferes with activity or sleep). magent does not grade itch.","required":true,"example":"0"},{"in":"query","name":"pruritus_d7","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Młynek 2008 UAS pruritus integer 0-3 for that 24h day: 0 none, 1 mild (present but not annoying), 2 moderate (troublesome, does not interfere with activity or sleep), 3 intense (interferes with activity or sleep). magent does not grade itch.","required":true,"example":"0"}],"errors":[{"code":"invalid_uas","message":"UAS needs seven consecutive daily wheals and pruritus integers 0-3 (Mlynek 2008). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/uas","citation":{"authors":"Młynek A, Zalewska-Janowska A, Martus P, Staubach P, Zuberbier T, Maurer M","doi":"10.1111/j.1398-9995.2008.01726.x","id":"mlynek-2008","pmid":"18445192","source":"Allergy. 2008;63(6):777-780","title":"How to assess disease activity in patients with chronic urticaria?","url":"https://doi.org/10.1111/j.1398-9995.2008.01726.x"},"formula_expression":"UAS7 = (wheals_d1 + pruritus_d1) + (wheals_d2 + pruritus_d2) + (wheals_d3 + pruritus_d3) + (wheals_d4 + pruritus_d4) + (wheals_d5 + pruritus_d5) + (wheals_d6 + pruritus_d6) + (wheals_d7 + pruritus_d7); each integer 0-3 (Młynek 2008 EAACI/GA2LEN/EDF UAS: wheals 0 none, 1 mild <20 wheals/24h, 2 moderate 20-50/24h, 3 intense >50/24h or large confluent areas; pruritus 0 none, 1 mild present but not annoying, 2 moderate troublesome without interfering with activity or sleep, 3 intense interferes with activity or sleep); daily UAS 0-6; UAS7 0-42; mean_daily_uas = UAS7 / 7; seven complete days required; no missing-day imputation; this paper published no UAS7 activity bands","purpose":"Sum Młynek 2008 EAACI/GA2LEN/EDF urticaria activity score over seven consecutive days: each day wheals 0-3 plus pruritus 0-3 (daily UAS 0-6). Return UAS7 (0-42) and mean_daily_uas. This paper published no UAS7 activity bands.","markdown_url":"https://magentlab.com/docs/uas.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"uas"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Młynek 2008 UAS7: sum of seven daily UAS values (0-42)"},{"name":"max_score","type":"integer","description":"Always 42"},{"name":"mean_daily_uas","type":"number","description":"UAS7 / 7, rounded to four decimal places"},{"name":"daily_d1","type":"integer","description":"Day 1 UAS: wheals_d1 + pruritus_d1 (0-6)"},{"name":"daily_d2","type":"integer","description":"Day 2 UAS: wheals_d2 + pruritus_d2 (0-6)"},{"name":"daily_d3","type":"integer","description":"Day 3 UAS: wheals_d3 + pruritus_d3 (0-6)"},{"name":"daily_d4","type":"integer","description":"Day 4 UAS: wheals_d4 + pruritus_d4 (0-6)"},{"name":"daily_d5","type":"integer","description":"Day 5 UAS: wheals_d5 + pruritus_d5 (0-6)"},{"name":"daily_d6","type":"integer","description":"Day 6 UAS: wheals_d6 + pruritus_d6 (0-6)"},{"name":"daily_d7","type":"integer","description":"Day 7 UAS: wheals_d7 + pruritus_d7 (0-6)"},{"name":"components","type":"array","description":"Per-day caller-assigned wheals and pruritus points"},{"name":"citation","type":"object","description":"Młynek et al. Allergy 2008 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"pruritus_d1":"1","pruritus_d2":"0","pruritus_d3":"0","pruritus_d4":"0","pruritus_d5":"0","pruritus_d6":"0","pruritus_d7":"0","wheals_d1":"1","wheals_d2":"0","wheals_d3":"0","wheals_d4":"0","wheals_d5":"0","wheals_d6":"0","wheals_d7":"0"},{"pruritus_d1":"1","pruritus_d2":"0","pruritus_d3":"0","pruritus_d4":"0","pruritus_d5":"0","pruritus_d6":"0","pruritus_d7":"0","wheals_d1":"1","wheals_d2":"0","wheals_d3":"0","wheals_d4":"0","wheals_d5":"0","wheals_d6":"0","wheals_d7":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/uas","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/uas?wheals_d1=1&wheals_d2=0&wheals_d3=0&wheals_d4=0&wheals_d5=0&wheals_d6=0&wheals_d7=0&pruritus_d1=1&pruritus_d2=0&pruritus_d3=0&pruritus_d4=0&pruritus_d5=0&pruritus_d6=0&pruritus_d7=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/uas","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/easi","description":"Hanifin 2001 EASI from four regions. Each region: area 0-6 and erythema, edema/papulation, excoriation, and lichenification 0-3. Region score = (sum of signs) × area × adult weight (head/neck 0.1, upper extremities 0.2, trunk 0.3, lower extremities 0.4). Total max 72. Adult weights only. magent does not examine the skin. No IGA or later severity bands. Not a diagnosis.","parameters":[{"in":"query","name":"head_neck_area","type":"integer","enum":[0,1,2,3,4,5,6],"description":"Caller-assigned Hanifin 2001 EASI area of involvement for this body region (integer 0-6): 0 none, 1 <10%, 2 10-29%, 3 30-49%, 4 50-69%, 5 70-89%, 6 90-100%. magent does not examine the skin.","required":true,"example":"0"},{"in":"query","name":"head_neck_erythema","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Hanifin 2001 EASI erythema for this region (integer 0-3): 0 none, 1 mild, 2 moderate, 3 severe. magent does not examine the skin.","required":true,"example":"0"},{"in":"query","name":"head_neck_edema_papulation","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Hanifin 2001 EASI edema/papulation for this region (integer 0-3): 0 none, 1 mild, 2 moderate, 3 severe. magent does not examine the skin.","required":true,"example":"0"},{"in":"query","name":"head_neck_excoriation","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Hanifin 2001 EASI excoriation for this region (integer 0-3): 0 none, 1 mild, 2 moderate, 3 severe. magent does not examine the skin.","required":true,"example":"0"},{"in":"query","name":"head_neck_lichenification","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Hanifin 2001 EASI lichenification for this region (integer 0-3): 0 none, 1 mild, 2 moderate, 3 severe. magent does not examine the skin.","required":true,"example":"0"},{"in":"query","name":"upper_extremities_area","type":"integer","enum":[0,1,2,3,4,5,6],"description":"Caller-assigned Hanifin 2001 EASI area of involvement for this body region (integer 0-6): 0 none, 1 <10%, 2 10-29%, 3 30-49%, 4 50-69%, 5 70-89%, 6 90-100%. magent does not examine the skin.","required":true,"example":"0"},{"in":"query","name":"upper_extremities_erythema","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Hanifin 2001 EASI erythema for this region (integer 0-3): 0 none, 1 mild, 2 moderate, 3 severe. magent does not examine the skin.","required":true,"example":"0"},{"in":"query","name":"upper_extremities_edema_papulation","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Hanifin 2001 EASI edema/papulation for this region (integer 0-3): 0 none, 1 mild, 2 moderate, 3 severe. magent does not examine the skin.","required":true,"example":"0"},{"in":"query","name":"upper_extremities_excoriation","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Hanifin 2001 EASI excoriation for this region (integer 0-3): 0 none, 1 mild, 2 moderate, 3 severe. magent does not examine the skin.","required":true,"example":"0"},{"in":"query","name":"upper_extremities_lichenification","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Hanifin 2001 EASI lichenification for this region (integer 0-3): 0 none, 1 mild, 2 moderate, 3 severe. magent does not examine the skin.","required":true,"example":"0"},{"in":"query","name":"trunk_area","type":"integer","enum":[0,1,2,3,4,5,6],"description":"Caller-assigned Hanifin 2001 EASI area of involvement for this body region (integer 0-6): 0 none, 1 <10%, 2 10-29%, 3 30-49%, 4 50-69%, 5 70-89%, 6 90-100%. magent does not examine the skin.","required":true,"example":"0"},{"in":"query","name":"trunk_erythema","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Hanifin 2001 EASI erythema for this region (integer 0-3): 0 none, 1 mild, 2 moderate, 3 severe. magent does not examine the skin.","required":true,"example":"0"},{"in":"query","name":"trunk_edema_papulation","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Hanifin 2001 EASI edema/papulation for this region (integer 0-3): 0 none, 1 mild, 2 moderate, 3 severe. magent does not examine the skin.","required":true,"example":"0"},{"in":"query","name":"trunk_excoriation","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Hanifin 2001 EASI excoriation for this region (integer 0-3): 0 none, 1 mild, 2 moderate, 3 severe. magent does not examine the skin.","required":true,"example":"0"},{"in":"query","name":"trunk_lichenification","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Hanifin 2001 EASI lichenification for this region (integer 0-3): 0 none, 1 mild, 2 moderate, 3 severe. magent does not examine the skin.","required":true,"example":"0"},{"in":"query","name":"lower_extremities_area","type":"integer","enum":[0,1,2,3,4,5,6],"description":"Caller-assigned Hanifin 2001 EASI area of involvement for this body region (integer 0-6): 0 none, 1 <10%, 2 10-29%, 3 30-49%, 4 50-69%, 5 70-89%, 6 90-100%. magent does not examine the skin.","required":true,"example":"0"},{"in":"query","name":"lower_extremities_erythema","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Hanifin 2001 EASI erythema for this region (integer 0-3): 0 none, 1 mild, 2 moderate, 3 severe. magent does not examine the skin.","required":true,"example":"0"},{"in":"query","name":"lower_extremities_edema_papulation","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Hanifin 2001 EASI edema/papulation for this region (integer 0-3): 0 none, 1 mild, 2 moderate, 3 severe. magent does not examine the skin.","required":true,"example":"0"},{"in":"query","name":"lower_extremities_excoriation","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Hanifin 2001 EASI excoriation for this region (integer 0-3): 0 none, 1 mild, 2 moderate, 3 severe. magent does not examine the skin.","required":true,"example":"0"},{"in":"query","name":"lower_extremities_lichenification","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Hanifin 2001 EASI lichenification for this region (integer 0-3): 0 none, 1 mild, 2 moderate, 3 severe. magent does not examine the skin.","required":true,"example":"0"}],"errors":[{"code":"invalid_easi","message":"EASI needs Hanifin 2001 region area (0-6) and erythema, edema/papulation, excoriation, and lichenification (0-3) for each region. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/easi","citation":{"authors":"Hanifin JM, Thurston M, Omoto M, Cherill R, Tofte SJ, Graeber M","doi":"10.1034/j.1600-0625.2001.100102.x","id":"hanifin-2001","pmid":"11168575","source":"Exp Dermatol. 2001;10(1):11-18","title":"The eczema area and severity index (EASI): assessment of reliability in atopic dermatitis","url":"https://doi.org/10.1034/j.1600-0625.2001.100102.x"},"formula_expression":"EASI = 0.1*(head_neck_erythema + head_neck_edema_papulation + head_neck_excoriation + head_neck_lichenification)*head_neck_area + 0.2*(upper_extremities_erythema + upper_extremities_edema_papulation + upper_extremities_excoriation + upper_extremities_lichenification)*upper_extremities_area + 0.3*(trunk_erythema + trunk_edema_papulation + trunk_excoriation + trunk_lichenification)*trunk_area + 0.4*(lower_extremities_erythema + lower_extremities_edema_papulation + lower_extremities_excoriation + lower_extremities_lichenification)*lower_extremities_area; each area integer 0-6 (0 none, 1 <10%, 2 10-29%, 3 30-49%, 4 50-69%, 5 70-89%, 6 90-100%); each sign integer 0-3 (0 none, 1 mild, 2 moderate, 3 severe); adult region weights head/neck 0.1, upper extremities 0.2, trunk 0.3, lower extremities 0.4; max 72; magent uses these adult weights only; this paper published no Investigator Global Assessment or mild-moderate-severe EASI cutoffs","purpose":"Compute Hanifin 2001 EASI from four body regions. For each region the caller assigns area 0-6 and four intensity signs (erythema, edema/papulation, excoriation, lichenification) each 0-3. Region score = (sum of 4 signs) × area × adult weight. Total EASI is the sum (max 72).","markdown_url":"https://magentlab.com/docs/easi.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"easi"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"number","description":"Hanifin 2001 EASI total from four adult-weighted regions (0-72)"},{"name":"max_score","type":"integer","description":"Always 72"},{"name":"head_neck_score","type":"number","description":"Head/neck region: (sum of 4 signs) × area × 0.1"},{"name":"upper_extremities_score","type":"number","description":"Upper extremities region: (sum of 4 signs) × area × 0.2"},{"name":"trunk_score","type":"number","description":"Trunk region: (sum of 4 signs) × area × 0.3"},{"name":"lower_extremities_score","type":"number","description":"Lower extremities region: (sum of 4 signs) × area × 0.4"},{"name":"components","type":"array","description":"Per-region caller-assigned EASI contribution"},{"name":"citation","type":"object","description":"Hanifin et al. Exp Dermatol 2001 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"head_neck_area":"0","head_neck_edema_papulation":"0","head_neck_erythema":"0","head_neck_excoriation":"0","head_neck_lichenification":"0","lower_extremities_area":"0","lower_extremities_edema_papulation":"0","lower_extremities_erythema":"0","lower_extremities_excoriation":"0","lower_extremities_lichenification":"0","trunk_area":"0","trunk_edema_papulation":"0","trunk_erythema":"0","trunk_excoriation":"0","trunk_lichenification":"0","upper_extremities_area":"0","upper_extremities_edema_papulation":"0","upper_extremities_erythema":"0","upper_extremities_excoriation":"0","upper_extremities_lichenification":"0"},{"head_neck_area":"0","head_neck_edema_papulation":"0","head_neck_erythema":"0","head_neck_excoriation":"0","head_neck_lichenification":"0","lower_extremities_area":"0","lower_extremities_edema_papulation":"0","lower_extremities_erythema":"0","lower_extremities_excoriation":"0","lower_extremities_lichenification":"0","trunk_area":"0","trunk_edema_papulation":"0","trunk_erythema":"0","trunk_excoriation":"0","trunk_lichenification":"0","upper_extremities_area":"0","upper_extremities_edema_papulation":"0","upper_extremities_erythema":"0","upper_extremities_excoriation":"0","upper_extremities_lichenification":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/easi","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/easi?head_neck_area=0&head_neck_erythema=0&head_neck_edema_papulation=0&head_neck_excoriation=0&head_neck_lichenification=0&upper_extremities_area=0&upper_extremities_erythema=0&upper_extremities_edema_papulation=0&upper_extremities_excoriation=0&upper_extremities_lichenification=0&trunk_area=0&trunk_erythema=0&trunk_edema_papulation=0&trunk_excoriation=0&trunk_lichenification=0&lower_extremities_area=0&lower_extremities_erythema=0&lower_extremities_edema_papulation=0&lower_extremities_excoriation=0&lower_extremities_lichenification=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/easi","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/pasi","description":"Fredriksson 1978 PASI from four regions. Each region: area 0-6 and erythema, induration, and scaling 0-4. Region score = (sum of three signs) × area × adult weight (head 0.1, upper extremities 0.2, trunk 0.3, lower extremities 0.4). Total max 72. Adult weights only. magent does not examine the skin. No IGA or later severity bands. Not a diagnosis. Not EASI.","parameters":[{"in":"query","name":"head_area","type":"integer","enum":[0,1,2,3,4,5,6],"description":"Caller-assigned Fredriksson 1978 PASI area of involvement for this body region (integer 0-6): 0 none, 1 <10%, 2 10-29%, 3 30-49%, 4 50-69%, 5 70-89%, 6 90-100%. magent does not examine the skin.","required":true,"example":"0"},{"in":"query","name":"head_erythema","type":"integer","enum":[0,1,2,3,4],"description":"Caller-assigned Fredriksson 1978 PASI erythema for this region (integer 0-4): 0 none, 1 slight, 2 moderate, 3 severe, 4 very severe. magent does not examine the skin.","required":true,"example":"0"},{"in":"query","name":"head_induration","type":"integer","enum":[0,1,2,3,4],"description":"Caller-assigned Fredriksson 1978 PASI induration for this region (integer 0-4): 0 none, 1 slight, 2 moderate, 3 severe, 4 very severe. magent does not examine the skin.","required":true,"example":"0"},{"in":"query","name":"head_scaling","type":"integer","enum":[0,1,2,3,4],"description":"Caller-assigned Fredriksson 1978 PASI scaling for this region (integer 0-4): 0 none, 1 slight, 2 moderate, 3 severe, 4 very severe. magent does not examine the skin.","required":true,"example":"0"},{"in":"query","name":"upper_extremities_area","type":"integer","enum":[0,1,2,3,4,5,6],"description":"Caller-assigned Fredriksson 1978 PASI area of involvement for this body region (integer 0-6): 0 none, 1 <10%, 2 10-29%, 3 30-49%, 4 50-69%, 5 70-89%, 6 90-100%. magent does not examine the skin.","required":true,"example":"0"},{"in":"query","name":"upper_extremities_erythema","type":"integer","enum":[0,1,2,3,4],"description":"Caller-assigned Fredriksson 1978 PASI erythema for this region (integer 0-4): 0 none, 1 slight, 2 moderate, 3 severe, 4 very severe. magent does not examine the skin.","required":true,"example":"0"},{"in":"query","name":"upper_extremities_induration","type":"integer","enum":[0,1,2,3,4],"description":"Caller-assigned Fredriksson 1978 PASI induration for this region (integer 0-4): 0 none, 1 slight, 2 moderate, 3 severe, 4 very severe. magent does not examine the skin.","required":true,"example":"0"},{"in":"query","name":"upper_extremities_scaling","type":"integer","enum":[0,1,2,3,4],"description":"Caller-assigned Fredriksson 1978 PASI scaling for this region (integer 0-4): 0 none, 1 slight, 2 moderate, 3 severe, 4 very severe. magent does not examine the skin.","required":true,"example":"0"},{"in":"query","name":"trunk_area","type":"integer","enum":[0,1,2,3,4,5,6],"description":"Caller-assigned Fredriksson 1978 PASI area of involvement for this body region (integer 0-6): 0 none, 1 <10%, 2 10-29%, 3 30-49%, 4 50-69%, 5 70-89%, 6 90-100%. magent does not examine the skin.","required":true,"example":"0"},{"in":"query","name":"trunk_erythema","type":"integer","enum":[0,1,2,3,4],"description":"Caller-assigned Fredriksson 1978 PASI erythema for this region (integer 0-4): 0 none, 1 slight, 2 moderate, 3 severe, 4 very severe. magent does not examine the skin.","required":true,"example":"0"},{"in":"query","name":"trunk_induration","type":"integer","enum":[0,1,2,3,4],"description":"Caller-assigned Fredriksson 1978 PASI induration for this region (integer 0-4): 0 none, 1 slight, 2 moderate, 3 severe, 4 very severe. magent does not examine the skin.","required":true,"example":"0"},{"in":"query","name":"trunk_scaling","type":"integer","enum":[0,1,2,3,4],"description":"Caller-assigned Fredriksson 1978 PASI scaling for this region (integer 0-4): 0 none, 1 slight, 2 moderate, 3 severe, 4 very severe. magent does not examine the skin.","required":true,"example":"0"},{"in":"query","name":"lower_extremities_area","type":"integer","enum":[0,1,2,3,4,5,6],"description":"Caller-assigned Fredriksson 1978 PASI area of involvement for this body region (integer 0-6): 0 none, 1 <10%, 2 10-29%, 3 30-49%, 4 50-69%, 5 70-89%, 6 90-100%. magent does not examine the skin.","required":true,"example":"0"},{"in":"query","name":"lower_extremities_erythema","type":"integer","enum":[0,1,2,3,4],"description":"Caller-assigned Fredriksson 1978 PASI erythema for this region (integer 0-4): 0 none, 1 slight, 2 moderate, 3 severe, 4 very severe. magent does not examine the skin.","required":true,"example":"0"},{"in":"query","name":"lower_extremities_induration","type":"integer","enum":[0,1,2,3,4],"description":"Caller-assigned Fredriksson 1978 PASI induration for this region (integer 0-4): 0 none, 1 slight, 2 moderate, 3 severe, 4 very severe. magent does not examine the skin.","required":true,"example":"0"},{"in":"query","name":"lower_extremities_scaling","type":"integer","enum":[0,1,2,3,4],"description":"Caller-assigned Fredriksson 1978 PASI scaling for this region (integer 0-4): 0 none, 1 slight, 2 moderate, 3 severe, 4 very severe. magent does not examine the skin.","required":true,"example":"0"}],"errors":[{"code":"invalid_pasi","message":"each PASI region needs area 0-6 and erythema, induration, and scaling 0-4 (Fredriksson 1978). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/pasi","citation":{"authors":"Fredriksson T, Pettersson U","doi":"10.1159/000250839","id":"fredriksson-1978","pmid":"357213","source":"Dermatologica. 1978;157(4):238-244","title":"Severe psoriasis--oral therapy with a new retinoid","url":"https://doi.org/10.1159/000250839"},"formula_expression":"PASI = 0.1*(head_erythema + head_induration + head_scaling)*head_area + 0.2*(upper_extremities_erythema + upper_extremities_induration + upper_extremities_scaling)*upper_extremities_area + 0.3*(trunk_erythema + trunk_induration + trunk_scaling)*trunk_area + 0.4*(lower_extremities_erythema + lower_extremities_induration + lower_extremities_scaling)*lower_extremities_area; each area integer 0-6 (0 none, 1 <10%, 2 10-29%, 3 30-49%, 4 50-69%, 5 70-89%, 6 90-100%); each of erythema, induration, and scaling integer 0-4 (0 none, 1 slight, 2 moderate, 3 severe, 4 very severe); adult region weights head 0.1, upper extremities 0.2, trunk 0.3, lower extremities 0.4; max 72; magent uses these adult weights only; this paper published no Investigator Global Assessment or mild-moderate-severe PASI cutoffs","purpose":"Compute Fredriksson 1978 PASI from four body regions. For each region the caller assigns area 0-6 and three intensity signs (erythema, induration, scaling) each 0-4. Region score = (sum of 3 signs) × area × adult weight. Total PASI is the sum (max 72).","markdown_url":"https://magentlab.com/docs/pasi.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"pasi"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"number","description":"Fredriksson 1978 PASI total from four adult-weighted regions (0-72)"},{"name":"max_score","type":"integer","description":"Always 72"},{"name":"head_score","type":"number","description":"Head region: (erythema + induration + scaling) × area × 0.1"},{"name":"upper_extremities_score","type":"number","description":"Upper extremities region: (erythema + induration + scaling) × area × 0.2"},{"name":"trunk_score","type":"number","description":"Trunk region: (erythema + induration + scaling) × area × 0.3"},{"name":"lower_extremities_score","type":"number","description":"Lower extremities region: (erythema + induration + scaling) × area × 0.4"},{"name":"components","type":"array","description":"Per-region caller-assigned PASI contribution"},{"name":"citation","type":"object","description":"Fredriksson and Pettersson Dermatologica 1978 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"head_area":"0","head_erythema":"0","head_induration":"0","head_scaling":"0","lower_extremities_area":"0","lower_extremities_erythema":"0","lower_extremities_induration":"0","lower_extremities_scaling":"0","trunk_area":"0","trunk_erythema":"0","trunk_induration":"0","trunk_scaling":"0","upper_extremities_area":"0","upper_extremities_erythema":"0","upper_extremities_induration":"0","upper_extremities_scaling":"0"},{"head_area":"0","head_erythema":"0","head_induration":"0","head_scaling":"0","lower_extremities_area":"0","lower_extremities_erythema":"0","lower_extremities_induration":"0","lower_extremities_scaling":"0","trunk_area":"0","trunk_erythema":"0","trunk_induration":"0","trunk_scaling":"0","upper_extremities_area":"0","upper_extremities_erythema":"0","upper_extremities_induration":"0","upper_extremities_scaling":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/pasi","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/pasi?head_area=0&head_erythema=0&head_induration=0&head_scaling=0&upper_extremities_area=0&upper_extremities_erythema=0&upper_extremities_induration=0&upper_extremities_scaling=0&trunk_area=0&trunk_erythema=0&trunk_induration=0&trunk_scaling=0&lower_extremities_area=0&lower_extremities_erythema=0&lower_extremities_induration=0&lower_extremities_scaling=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/pasi","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/nhfs","description":"Maxwell 2008 Nottingham hip fracture score: age <=65 0, 66-85 3, >=86 4; male 1; hemoglobin <=10 g/dL 1 (g/L / 10); caller-assigned AMTS <=6, lives in institution, >=2 comorbidities, and malignancy 1 each. Max 10. Integer score only; no predicted 30-day mortality percent. magent does not administer AMTS or clear a patient for surgery. Not the 2012 or 2015 recalibrations.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). ≤65 scores 0; 66-85 scores 3; ≥86 scores 4 (Maxwell 2008).","required":true,"example":"70"},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"female or male. Male scores 1; female scores 0.","required":true,"example":"female"},{"in":"query","name":"hemoglobin_g_dl","type":"number","description":"Hemoglobin in g/dL (3-22). Provide this or hemoglobin_g_l, not both. ≤10 g/dL scores 1 (10.0 scores; 10.1 does not).","required":false,"example":"12"},{"in":"query","name":"hemoglobin_g_l","type":"number","description":"Hemoglobin in g/L (30-220). Converted as hemoglobin_g_dl = hemoglobin_g_l / 10. Provide this or hemoglobin_g_dl, not both.","required":false,"example":"120"},{"in":"query","name":"amts_le_6","type":"boolean","description":"Abbreviated Mental Test Score ≤6/10 as assigned by the caller (Maxwell 2008). true or false. magent does not administer AMTS. 1 point if true.","required":true,"example":"false"},{"in":"query","name":"lives_in_institution","type":"boolean","description":"Lives in an institution as assigned by the caller (Maxwell 2008). true or false. 1 point if true.","required":true,"example":"false"},{"in":"query","name":"comorbidities_ge_2","type":"boolean","description":"Two or more comorbidities as defined in Maxwell 2008, as assigned by the caller. true or false. magent does not enumerate comorbidities. 1 point if true.","required":true,"example":"false"},{"in":"query","name":"malignancy","type":"boolean","description":"Active malignancy (Maxwell 2008: within 20 years) as assigned by the caller. true or false. magent does not take a cancer history. 1 point if true.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_hemoglobin","message":"hemoglobin_g_l (30-220) or hemoglobin_g_dl (3-22) is required, not both. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/nhfs","citation":{"authors":"Maxwell MJ, Moran CG, Moppett IK","doi":"10.1093/bja/aen236","id":"maxwell-2008","pmid":"18723517","source":"Br J Anaesth. 2008;101(4):511-517","title":"Development and validation of a preoperative scoring system to predict 30 day mortality in patients undergoing hip fracture surgery","url":"https://doi.org/10.1093/bja/aen236"},"formula_expression":"NHFS = age (≤65 0, 66-85 3, ≥86 4) + male 1 + (hemoglobin ≤10 g/dL) 1 + amts_le_6 1 + lives_in_institution 1 + comorbidities_ge_2 1 + malignancy 1; Maxwell 2008 integer score; max 10","purpose":"Sum the Maxwell 2008 Nottingham hip fracture score from seven preoperative variables and return the integer total (max 10).","markdown_url":"https://magentlab.com/docs/nhfs.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"nhfs"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Maxwell 2008 integer points 0-10"},{"name":"max_score","type":"integer","description":"Always 10"},{"name":"age_years","type":"integer","description":"Age used (years)"},{"name":"sex","type":"string","description":"Sex used: female or male"},{"name":"hemoglobin_g_dl","type":"number","description":"Hemoglobin used in g/dL (g/L inputs converted as g/dL = g/L / 10)"},{"name":"amts_le_6","type":"boolean","description":"Caller-assigned AMTS ≤6/10 flag used"},{"name":"lives_in_institution","type":"boolean","description":"Caller-assigned lives-in-institution flag used"},{"name":"comorbidities_ge_2","type":"boolean","description":"Caller-assigned ≥2 comorbidities flag used"},{"name":"malignancy","type":"boolean","description":"Caller-assigned malignancy flag used"},{"name":"components","type":"array","description":"Per-item points"},{"name":"citation","type":"object","description":"Maxwell 2008 Br J Anaesth citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"70","amts_le_6":"false","comorbidities_ge_2":"false","hemoglobin_g_dl":"12","lives_in_institution":"false","malignancy":"false","sex":"female"},{"age":"70","amts_le_6":"false","comorbidities_ge_2":"false","hemoglobin_g_dl":"12","lives_in_institution":"false","malignancy":"false","sex":"female"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/nhfs","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/nhfs?age=70&sex=female&hemoglobin_g_dl=12&amts_le_6=false&lives_in_institution=false&comorbidities_ge_2=false&malignancy=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/nhfs","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rapid-hip","description":"Hevesi 2018 hip RAPID: sex (female 0, male 1) + Tonnis 0/1/2 (0, 2, 3 points; grade 3 invalid) + caller-assigned cam (1 if present). Max 5. Bands 0-1 low, 2-3 intermediate, 4-5 high. High-grade (ALAD 3-4) damage percent only at score 0 (10.5) and 5 (88.0). Not Rahman 2014 pleural RAPID. Not a diagnosis or operative plan. magent does not read radiographs or measure alpha angle.","parameters":[{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"female or male (Hevesi 2018 Table 3). Male scores 1; female scores 0.","required":true,"example":"female"},{"in":"query","name":"tonnis_grade","type":"integer","description":"Caller-assigned Tonnis osteoarthritis grade 0, 1, or 2 (Hevesi 2018 Table 3). Grade 0 scores 0; grade 1 scores 2; grade 2 scores 3. Grade 3 is invalid (the derivation had no grade 3). magent does not read radiographs.","required":true,"example":"0"},{"in":"query","name":"cam_morphology","type":"boolean","description":"Caller-assigned cam morphology. true scores 1; false scores 0. Paper univariate used alpha angle >55°; magent does not measure alpha angle. true or false.","required":true,"example":"false"}],"errors":[{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_tonnis","message":"tonnis_grade must be 0, 1, or 2 (Hevesi 2018 RAPID; grade 3 is not scored). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rapid-hip","citation":{"authors":"Hevesi M, Hartigan DE, Wu IT, et al.","doi":"10.1177/2325967118799068","id":"hevesi-2018","pmid":"30302348","source":"Orthop J Sports Med. 2018;6(10):2325967118799068","title":"The Rapidly Assessed Predictor of Intraoperative Damage (RAPID) Score: An In-Clinic Predictive Model for High-Grade Acetabular Chondrolabral Disruption","url":"https://doi.org/10.1177/2325967118799068"},"formula_expression":"RAPID = sex_points + tonnis_points + cam_points; female 0 male 1; Tonnis 0=0, 1=2, 2=3; cam present 1; max 5; bands 0-1 low, 2-3 intermediate, 4-5 high (Hevesi 2018 Table 3 / Figure 2)","purpose":"Sum the Hevesi 2018 RAPID points from sex, Tonnis grade, and cam morphology and return the published low, intermediate, or high band.","markdown_url":"https://magentlab.com/docs/rapid-hip.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rapid_hip"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Hevesi 2018 RAPID points 0-5"},{"name":"max_score","type":"integer","description":"Always 5"},{"name":"risk_band","type":"string","description":"Figure 2 band: low (0-1), intermediate (2-3), or high (4-5)"},{"name":"high_grade_damage_percent","type":"number","description":"Published high-grade (ALAD 3-4) damage rate: 10.5 at score 0 and 88.0 at score 5. Omitted for scores 1-4 (no published rate)."},{"name":"sex","type":"string","description":"Sex used: female or male"},{"name":"tonnis_grade","type":"integer","description":"Tonnis grade used (0, 1, or 2)"},{"name":"cam_morphology","type":"boolean","description":"Whether caller-assigned cam morphology was scored"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Hevesi et al. OJSM 2018 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"cam_morphology":"false","sex":"female","tonnis_grade":"0"},{"cam_morphology":"false","sex":"female","tonnis_grade":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rapid-hip","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rapid-hip?sex=female&tonnis_grade=0&cam_morphology=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rapid-hip","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rhmp-30","description":"de Jong 2025 Rotterdam Hip Fracture Mortality Prediction-30 Days (RHMP-30) LASSO logit from age, sex (published female coefficient, not race), albumin g/L, dementia, Katz-ADL total 0-6, ASA 4, and nursing-home residence. Returns logit and estimated_mortality_percent from the unrounded logit. Not an operative vs nonoperative order. magent does not assign ASA or Katz.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years, integer 40-110. de Jong 2025 coefficient +0.0306 per year. magent does not read an identity document.","required":true,"example":"80"},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"Sex used as the published de Jong 2025 female coefficient (female = 1, male = 0). Not race. magent does not examine the patient.","required":true,"example":"female"},{"in":"query","name":"albumin_g_l","type":"number","description":"Admission serum albumin in g/L (10-60). de Jong 2025 Table I uses g/L (typical 30-45). Not g/dL. Caller-supplied; magent does not assay albumin.","required":true,"example":"38"},{"in":"query","name":"dementia","type":"boolean","description":"true if the caller assigns a history of dementia (de Jong 2025). true scores 1 in the logit; false scores 0. magent does not diagnose dementia.","required":true,"example":"false"},{"in":"query","name":"katz_adl","type":"integer","description":"Katz Index of Independence in Activities of Daily Living total, integer 0-6 (de Jong 2025). 0 = completely dependent; 6 = completely independent. Caller-assigned total; magent does not score bathing, dressing, toileting, transferring, continence, or feeding.","required":true,"example":"6"},{"in":"query","name":"asa_4","type":"boolean","description":"true if the caller assigns ASA physical status 4 (de Jong 2025). true scores 1 in the logit; false scores 0. magent does not assign ASA class.","required":true,"example":"false"},{"in":"query","name":"nursing_home","type":"boolean","description":"true if the caller assigns residence in a nursing home (de Jong 2025). true scores 1 in the logit; false scores 0. magent does not determine residence.","required":true,"example":"false"}],"errors":[{"code":"invalid_rhmp_30","message":"RHMP-30 needs de Jong 2025 age, sex, ASA 4, dementia, albumin, Katz-ADL, and nursing-home residence in published ranges. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rhmp-30","citation":{"authors":"de Jong L, de Haan E, van Rijckevorsel VAJIM, Kuijper TM, Roukema GR","doi":"10.2106/JBJS.23.01397","id":"de-jong-2025","pmid":"39836737","source":"J Bone Joint Surg Am. 2025;107(5):459-468","title":"Multidimensional Approach for Predicting 30-Day Mortality in Patients with a Hip Fracture: Development and External Validation of the Rotterdam Hip Fracture Mortality Prediction-30 Days (RHMP-30)","url":"https://doi.org/10.2106/JBJS.23.01397"},"formula_expression":"logit = -2.69 - 0.0442*albumin_g_l + 0.0306*age_years - 1.012*female + 0.360*dementia - 0.0853*katz_adl + 0.856*asa_4 + 0.726*nursing_home; estimated_mortality_percent = 100 * exp(logit)/(1+exp(logit)) from the unrounded logit, 2 decimals; displayed logit 2 decimals; female is 1 if sex is female else 0; dementia, asa_4, and nursing_home are 1 if true else 0; albumin is g/L (not g/dL); Katz-ADL total 0-6 (6 = independent)","purpose":"Compute the de Jong 2025 Rotterdam Hip Fracture Mortality Prediction-30 Days (RHMP-30) logistic 30-day mortality probability after hip fracture surgery from caller-assigned age, sex, albumin in g/L, dementia, Katz-ADL total, ASA 4, and nursing-home residence.","markdown_url":"https://magentlab.com/docs/rhmp-30.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rhmp_30"},{"name":"formula_expression","type":"string","description":"de Jong 2025 RHMP-30 LASSO logit and 30-day mortality probability"},{"name":"age_years","type":"integer","description":"Age in years used in the logit"},{"name":"sex","type":"string","description":"female or male"},{"name":"albumin_g_l","type":"number","description":"Admission serum albumin in g/L used in the logit"},{"name":"dementia","type":"boolean","description":"Caller-assigned history of dementia"},{"name":"katz_adl","type":"integer","description":"Caller-assigned Katz-ADL total 0-6 used in the logit"},{"name":"asa_4","type":"boolean","description":"Caller-assigned ASA physical status 4"},{"name":"nursing_home","type":"boolean","description":"Caller-assigned nursing-home residence"},{"name":"logit","type":"number","description":"de Jong 2025 logit, 2 decimal places. Percent uses the unrounded logit."},{"name":"estimated_mortality_percent","type":"number","description":"100 * exp(logit)/(1+exp(logit)) from the unrounded logit, 2 decimals. A population probability, not an operative order."},{"name":"citation","type":"object","description":"de Jong 2025 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"80","albumin_g_l":"38","asa_4":"false","dementia":"false","katz_adl":"6","nursing_home":"false","sex":"female"},{"age":"80","albumin_g_l":"38","asa_4":"false","dementia":"false","katz_adl":"6","nursing_home":"false","sex":"female"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rhmp-30","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rhmp-30?age=80&sex=female&albumin_g_l=38&dementia=false&katz_adl=6&asa_4=false&nursing_home=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rhmp-30","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/cfs","description":"Rockwood 2005 CSHA Clinical Frailty Scale 1-7 as assigned by the caller (Box 1). Returns cfs, score, max 7, and the published label. Does not implement the later 9-point CFS (8 very severely frail, 9 terminally ill) or CFS 2.0 label changes. Not a diagnosis; magent does not examine the patient.","parameters":[{"in":"query","name":"cfs","type":"integer","description":"Rockwood 2005 CSHA Clinical Frailty Scale 1-7 as assigned by the caller (1 very fit; 2 well; 3 well, with treated comorbid disease; 4 apparently vulnerable; 5 mildly frail; 6 moderately frail; 7 severely frail, completely dependent or terminally ill). magent does not examine the patient. The later 9-point CFS (8 very severely frail, 9 terminally ill) is not accepted.","required":true,"example":"1"}],"errors":[{"code":"invalid_cfs","message":"cfs must be an integer from 1 to 7 (Rockwood 2005 CSHA Clinical Frailty Scale). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/cfs","citation":{"authors":"Rockwood K, Song X, MacKnight C, Bergman H, Hogan DB, McDowell I, Mitnitski A","doi":"10.1503/cmaj.050051","id":"rockwood-2005","pmid":"16129869","source":"CMAJ. 2005;173(5):489-495","title":"A global clinical measure of fitness and frailty in elderly people","url":"https://doi.org/10.1503/cmaj.050051"},"formula_expression":"CSHA Clinical Frailty Scale 1-7 as assigned by the caller (Rockwood 2005 Box 1); not the later 9-point CFS","purpose":"Return the Rockwood 2005 CSHA Clinical Frailty Scale 1-7 from a caller-assigned integer, with the published Box 1 description.","markdown_url":"https://magentlab.com/docs/cfs.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"cfs"},{"name":"formula_expression","type":"string","description":"Published 1-7 CSHA 2005 rule"},{"name":"cfs","type":"integer","description":"Caller-assigned CSHA Clinical Frailty Scale 1-7"},{"name":"score","type":"integer","description":"Same as cfs"},{"name":"max_score","type":"integer","description":"7"},{"name":"description","type":"string","description":"Rockwood 2005 Box 1 wording for that category"},{"name":"components","type":"array","description":"CFS component"},{"name":"citation","type":"object","description":"Rockwood 2005"},{"name":"disclaimer","type":"string","description":"Not a medical device"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"cfs":"1"},{"cfs":"1"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/cfs","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/cfs?cfs=1","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/cfs","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/must","description":"Stratton 2004 Malnutrition Universal Screening Tool (MUST) for adults. Three additive scores, max 6: BMI (>20 → 0, 18.5–20 → 1 including 20.0, <18.5 → 2); unplanned weight loss % last 3–6 months (<5 → 0, 5–10 → 1 including 10%, >10 → 2); acute disease no nutritional intake >5 days → 2. Risk 0 low, 1 medium, ≥2 high. Caller supplies BMI and weight-loss percent. Not a malnutrition diagnosis, diet order, or MUAC. magent does not weigh the patient.","parameters":[{"in":"query","name":"bmi_kg_m2","type":"number","description":"Body-mass index in kg/m^2 (10-80). Caller-supplied; magent does not weigh the patient or compute BMI. Stratton 2004 MUST: >20 scores 0; 18.5-20 inclusive scores 1; <18.5 scores 2. BMI 20.0 scores 1; 20.1 scores 0.","required":true,"example":"22"},{"in":"query","name":"weight_loss_percent","type":"number","description":"Unplanned weight loss percent over the last 3-6 months (0-50). Caller-supplied; magent does not weigh the patient. Stratton 2004 MUST: <5 scores 0; 5-10 inclusive scores 1; >10 scores 2. 10% scores 1, not 2.","required":true,"example":"0"},{"in":"query","name":"acute_disease_no_intake_gt_5_days","type":"boolean","description":"Acute disease with no nutritional intake for more than 5 days (Stratton 2004 MUST). true scores 2; false scores 0.","required":true,"example":"false"}],"errors":[{"code":"invalid_bmi_kg_m2","message":"bmi_kg_m2 must be a number from 10 to 80. Returned before settlement; you are not charged.","status":400},{"code":"invalid_weight_loss_percent","message":"weight_loss_percent must be a number from 0 to 50 (unplanned percent loss over 3-6 months). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/must","citation":{"authors":"Stratton RJ, Hackston A, Longmore D, Dixon R, Price S, Stroud M, King C, Elia M","doi":"10.1079/BJN20041258","id":"stratton-2004","pmid":"15533269","source":"Br J Nutr. 2004;92(5):799-808","title":"Malnutrition in hospital outpatients and inpatients: prevalence, concurrent validity and ease of use of the 'malnutrition universal screening tool' ('MUST') for adults","url":"https://doi.org/10.1079/BJN20041258"},"formula_expression":"MUST = bmi_score + weight_loss_score + acute_disease_score; BMI >20 -> 0, 18.5-20 inclusive -> 1, <18.5 -> 2; unplanned weight loss % last 3-6 months <5 -> 0, 5-10 inclusive -> 1, >10 -> 2; acute disease no nutritional intake >5 days -> 2 else 0; max 6; risk 0 low, 1 medium, >=2 high","purpose":"Sum Stratton 2004 MUST (BMI, unplanned weight-loss percent, and acute disease with no nutritional intake >5 days) and return score 0–6 with risk low, medium, or high.","markdown_url":"https://magentlab.com/docs/must.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"must"},{"name":"formula_expression","type":"string","description":"Exact Stratton 2004 MUST expression"},{"name":"score","type":"integer","description":"MUST points; published range 0-6"},{"name":"max_score","type":"integer","description":"6 (Stratton 2004 published maximum)"},{"name":"bmi_score","type":"integer","description":"BMI band points: 0 (>20), 1 (18.5-20), or 2 (<18.5)"},{"name":"weight_loss_score","type":"integer","description":"Unplanned weight-loss band points: 0 (<5%), 1 (5-10%), or 2 (>10%)"},{"name":"acute_disease_score","type":"integer","description":"2 if acute disease with no nutritional intake >5 days, else 0"},{"name":"risk","type":"string","description":"low (score 0), medium (score 1), or high (score ≥2). Stratton 2004 / BAPEN screening risk, not a malnutrition diagnosis."},{"name":"bmi_kg_m2","type":"number","description":"Caller-supplied BMI in kg/m^2 used for the BMI band"},{"name":"weight_loss_percent","type":"number","description":"Caller-supplied unplanned weight-loss percent used for the weight-loss band"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Stratton 2004 Br J Nutr citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"acute_disease_no_intake_gt_5_days":"false","bmi_kg_m2":"22","weight_loss_percent":"0"},{"acute_disease_no_intake_gt_5_days":"false","bmi_kg_m2":"22","weight_loss_percent":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/must","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/must?bmi_kg_m2=22&weight_loss_percent=0&acute_disease_no_intake_gt_5_days=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/must","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/aua-si","description":"Barry 1992 AUA-SI: seven caller-assigned integers 0-5 for incomplete emptying, frequency, intermittency, urgency, weak stream, straining (hesitancy), and nocturia. Sum 0-35. magent does not take a voiding history. Barry 1992 published no mild/moderate/severe total-score bands; later AUA-guideline 0-7/8-19/20-35 cuts are not applied. Not the 8-item IPSS quality-of-life question, not a BPH treatment order, and not a medical device.","parameters":[{"in":"query","name":"incomplete_emptying","type":"integer","description":"Caller-assigned Barry 1992 incomplete emptying (integer 0-5: 0 not at all, 1 less than 1 time in 5, 2 less than half the time, 3 about half the time, 4 more than half the time, 5 almost always): sensation of not emptying the bladder completely after finishing urination. magent does not take a voiding history.","required":true,"example":"0"},{"in":"query","name":"frequency","type":"integer","description":"Caller-assigned Barry 1992 frequency (integer 0-5: 0 not at all to 5 almost always): urinating again less than two hours after finishing. magent does not take a voiding history.","required":true,"example":"0"},{"in":"query","name":"intermittency","type":"integer","description":"Caller-assigned Barry 1992 intermittency (integer 0-5: 0 not at all to 5 almost always): stopping and starting again several times when urinating. magent does not take a voiding history.","required":true,"example":"0"},{"in":"query","name":"urgency","type":"integer","description":"Caller-assigned Barry 1992 urgency (integer 0-5: 0 not at all to 5 almost always): difficulty postponing urination. magent does not take a voiding history.","required":true,"example":"0"},{"in":"query","name":"weak_stream","type":"integer","description":"Caller-assigned Barry 1992 weak urinary stream (integer 0-5: 0 not at all to 5 almost always). magent does not take a voiding history.","required":true,"example":"0"},{"in":"query","name":"straining","type":"integer","description":"Caller-assigned Barry 1992 hesitancy/straining (integer 0-5: 0 not at all to 5 almost always): push or strain to begin urination. magent does not take a voiding history.","required":true,"example":"0"},{"in":"query","name":"nocturia","type":"integer","description":"Caller-assigned Barry 1992 nocturia (integer 0-5: 0 none, 1 one time, 2 two times, 3 three times, 4 four times, 5 five or more times): times typically getting up to urinate from bedtime until morning. magent does not take a voiding history.","required":true,"example":"0"}],"errors":[{"code":"invalid_aua_si","message":"AUA symptom index items must be integers in the Barry 1992 published 0-5 range. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/aua-si","citation":{"authors":"Barry MJ, Fowler FJ Jr, O'Leary MP, Bruskewitz RC, Holtgrewe HL, Mebust WK, Cockett AT","doi":"10.1016/S0022-5347(17)36966-5","id":"barry-1992","pmid":"1279218","source":"J Urol. 1992;148(5):1549-1557","title":"The American Urological Association symptom index for benign prostatic hyperplasia","url":"https://doi.org/10.1016/S0022-5347(17)36966-5"},"formula_expression":"AUA-SI = incomplete_emptying + frequency + intermittency + urgency + weak_stream + straining + nocturia; each caller-assigned 0-5; max 35; Barry 1992; no total-score severity bands; not IPSS quality-of-life item","purpose":"Sum seven caller-assigned Barry 1992 AUA-SI items (each integer 0-5) and return the published 0-35 total. Does not apply later total-score severity bands and does not score the IPSS quality-of-life item.","markdown_url":"https://magentlab.com/docs/aua-si.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"aua_si"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Barry 1992 AUA-SI sum of seven caller-assigned 0-5 items (0-35)"},{"name":"max_score","type":"integer","description":"Always 35"},{"name":"components","type":"array","description":"Per-item caller-assigned points"},{"name":"citation","type":"object","description":"Barry et al. J Urol 1992 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"frequency":"0","incomplete_emptying":"0","intermittency":"0","nocturia":"0","straining":"0","urgency":"0","weak_stream":"0"},{"frequency":"0","incomplete_emptying":"0","intermittency":"0","nocturia":"0","straining":"0","urgency":"0","weak_stream":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/aua-si","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/aua-si?incomplete_emptying=0&frequency=0&intermittency=0&urgency=0&weak_stream=0&straining=0&nocturia=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/aua-si","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/ruis","description":"Sansoni 2008 RUIS: five caller-assigned integers for urgency leakage, activity leakage, and drops leakage (each 0-3), leakage frequency (0-4), and leakage amount (0-3). Sum 0-16. magent does not interview the patient. Sansoni 2008 published no mild/moderate/severe RUIS total-score bands; ISI frequency×amount cuts are not applied. Not a diagnosis, not a continence-procedure order, and not a medical device.","parameters":[{"in":"query","name":"urgency_leakage","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Sansoni 2008 RUIS item 1 (integer 0-3: 0 not at all, 1 slightly, 2 moderately, 3 greatly): urine leakage related to the feeling of urgency. magent does not interview the patient.","required":true,"example":0},{"in":"query","name":"activity_leakage","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Sansoni 2008 RUIS item 2 (integer 0-3: 0 not at all, 1 slightly, 2 moderately, 3 greatly): urine leakage related to physical activity, coughing or sneezing. magent does not interview the patient.","required":true,"example":0},{"in":"query","name":"drops_leakage","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Sansoni 2008 RUIS item 3 (integer 0-3: 0 not at all, 1 slightly, 2 moderately, 3 greatly): small amounts of urine leakage (drops). magent does not interview the patient.","required":true,"example":0},{"in":"query","name":"leakage_frequency","type":"integer","enum":[0,1,2,3,4],"description":"Caller-assigned Sansoni 2008 RUIS item 4 (integer 0-4: 0 never, 1 less than once a month, 2 a few times a month, 3 a few times a week, 4 every day and/or night): how often urine leakage is experienced. magent does not interview the patient.","required":true,"example":0},{"in":"query","name":"leakage_amount","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Sansoni 2008 RUIS item 5 (integer 0-3: 0 none, 1 drops, 2 small splashes, 3 more): how much urine is lost each time. magent does not interview the patient.","required":true,"example":0}],"errors":[{"code":"invalid_ruis","message":"RUIS inputs must match the published urinary-incontinence item scores. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/ruis","citation":{"authors":"Sansoni J, Marosszeky N, Sansoni E, Hawthorne G","id":"sansoni-ruis","source":"Centre for Health Service Development, University of Wollongong. 2008","title":"The development of the Revised Urinary Incontinence Scale (RUIS)","url":"https://ro.uow.edu.au/gsbpapers/64"},"formula_expression":"RUIS = urgency_leakage (0-3) + activity_leakage (0-3) + drops_leakage (0-3) + leakage_frequency (0-4) + leakage_amount (0-3); each caller-assigned; max 16; Sansoni 2008; no RUIS total-score severity bands; not ISI frequency×amount","purpose":"Sum five caller-assigned Sansoni 2008 RUIS items (urgency, activity, and drops leakage 0-3; leakage frequency 0-4; leakage amount 0-3) and return the published 0-16 total. Does not apply later total-score severity bands and does not score ISI frequency×amount.","markdown_url":"https://magentlab.com/docs/ruis.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"ruis"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Sansoni 2008 RUIS sum of five caller-assigned items (urgency/activity/drops 0-3, frequency 0-4, amount 0-3; 0-16)"},{"name":"max_score","type":"integer","description":"Always 16"},{"name":"components","type":"array","description":"Per-item caller-assigned points"},{"name":"citation","type":"object","description":"Sansoni et al. 2008 RUIS citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"activity_leakage":"0","drops_leakage":"0","leakage_amount":"0","leakage_frequency":"0","urgency_leakage":"0"},{"activity_leakage":"0","drops_leakage":"0","leakage_amount":"0","leakage_frequency":"0","urgency_leakage":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/ruis","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/ruis?urgency_leakage=0&activity_leakage=0&drops_leakage=0&leakage_frequency=0&leakage_amount=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/ruis","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/pons","description":"Wischmeyer 2018 PONS: four caller-assigned yes/no flags (BMI <18.5 kg/m² if age ≤65 or <20 if age >65; weight loss >10% in 6 months; oral intake reduced >50% in the past week; preoperative albumin <3.0 g/dL), 1 point each, max 4. high_risk true iff score ≥1. Not a medical device, diet order, or malnutrition diagnosis. magent does not weigh the patient, compute BMI, or assay albumin. Not NRS-2002, NUTRIC, or MUST.","parameters":[{"in":"query","name":"bmi_low","type":"boolean","description":"Caller-assigned Wischmeyer 2018 PONS low-BMI flag: BMI <18.5 kg/m² if age ≤65, or BMI <20 kg/m² if age >65. true or false. magent does not take age, weigh the patient, or compute BMI.","required":true,"example":"false"},{"in":"query","name":"weight_loss_gt_10pct_6mo","type":"boolean","description":"Caller-assigned Wischmeyer 2018 PONS flag: weight loss >10% in the past 6 months. true or false. magent does not weigh the patient.","required":true,"example":"false"},{"in":"query","name":"oral_intake_reduced_gt_50pct_week","type":"boolean","description":"Caller-assigned Wischmeyer 2018 PONS flag: reduced oral intake by >50% in the past week. true or false. magent does not measure intake.","required":true,"example":"false"},{"in":"query","name":"albumin_lt_3_g_dl","type":"boolean","description":"Caller-assigned Wischmeyer 2018 PONS flag: preoperative serum albumin <3.0 g/dL (not 3 g/L). true or false. magent does not assay albumin.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/pons","citation":{"authors":"Wischmeyer PE, Carli F, Evans DC, et al.","doi":"10.1213/ANE.0000000000002743","id":"wischmeyer-2018","pmid":"29369092","source":"Anesth Analg. 2018;126(6):1883-1895","title":"American Society for Enhanced Recovery and Perioperative Quality Initiative Joint Consensus Statement on Nutrition Screening and Therapy Within a Surgical Enhanced Recovery Pathway","url":"https://doi.org/10.1213/ANE.0000000000002743"},"formula_expression":"PONS = bmi_low + weight_loss_gt_10pct_6mo + oral_intake_reduced_gt_50pct_week + albumin_lt_3_g_dl; each 1 if true; max 4; high_risk iff score ≥ 1","purpose":"Sum the four Wischmeyer 2018 Perioperative Nutrition Screen (PONS) flags and return whether any item is positive (high nutritional risk).","markdown_url":"https://magentlab.com/docs/pons.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"pons"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"PONS points 0-4"},{"name":"max_score","type":"integer","description":"4"},{"name":"high_risk","type":"boolean","description":"true iff score ≥ 1 (Wischmeyer 2018: any positive PONS screen). Not a diet order or malnutrition diagnosis."},{"name":"components","type":"array","description":"Per-item points"},{"name":"citation","type":"object","description":"Wischmeyer et al. Anesth Analg 2018 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"albumin_lt_3_g_dl":"false","bmi_low":"false","oral_intake_reduced_gt_50pct_week":"false","weight_loss_gt_10pct_6mo":"false"},{"albumin_lt_3_g_dl":"false","bmi_low":"false","oral_intake_reduced_gt_50pct_week":"false","weight_loss_gt_10pct_6mo":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/pons","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/pons?bmi_low=false&weight_loss_gt_10pct_6mo=false&oral_intake_reduced_gt_50pct_week=false&albumin_lt_3_g_dl=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/pons","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/twist","description":"Barbosa 2013 TWIST (Testicular Workup for Ischemia and Suspected Torsion). Five caller-assigned flags: testicular swelling (2), hard testicle (2), absent cremasteric reflex (1), nausea or vomiting (1), high-riding testis (1). Max 7. Risk: 0–2 low, 3–4 intermediate, 5–7 high (cutoffs 2 and 5). Not a torsion diagnosis or an ultrasound or operative order. magent does not examine the patient.","parameters":[{"in":"query","name":"testicular_swelling","type":"boolean","description":"Testicular swelling as assigned by the caller (Barbosa 2013). true scores 2. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"hard_testicle","type":"boolean","description":"Hard testicle as assigned by the caller (Barbosa 2013). true scores 2. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"absent_cremasteric_reflex","type":"boolean","description":"Absent cremasteric reflex as assigned by the caller (Barbosa 2013). true scores 1. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"nausea_or_vomiting","type":"boolean","description":"Nausea or vomiting as assigned by the caller (Barbosa 2013). true scores 1. magent does not take a symptom history.","required":true,"example":"false"},{"in":"query","name":"high_riding_testis","type":"boolean","description":"High-riding testis as assigned by the caller (Barbosa 2013). true scores 1. magent does not examine the patient.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/twist","citation":{"authors":"Barbosa JA, Tiseo BC, Barayan GA, Rosman BM, Torricelli FC, Passerotti CC, Srougi M, Retik AB, Nguyen HT","doi":"10.1016/j.juro.2012.10.056","id":"barbosa-2013","pmid":"23103800","source":"J Urol. 2013;189(5):1859-1864","title":"Development and initial validation of a scoring system to diagnose testicular torsion in children","url":"https://doi.org/10.1016/j.juro.2012.10.056"},"formula_expression":"TWIST = testicular_swelling (true 2) + hard_testicle (true 2) + absent_cremasteric_reflex (true 1) + nausea_or_vomiting (true 1) + high_riding_testis (true 1); Barbosa 2013; max 7; 0-2 low, 3-4 intermediate, 5-7 high (cutoffs 2 and 5)","purpose":"Sum the five Barbosa 2013 TWIST flags for an already-examined acute scrotum and return the 0–7 score and published risk band (low 0–2, intermediate 3–4, high 5–7).","markdown_url":"https://magentlab.com/docs/twist.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"twist"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"TWIST points 0-7"},{"name":"max_score","type":"integer","description":"Always 7"},{"name":"risk","type":"string","description":"Barbosa 2013 risk band: low (0–2), intermediate (3–4), or high (5–7). Cutoffs 2 and 5. Not a torsion diagnosis."},{"name":"components","type":"array","description":"Per-flag points"},{"name":"citation","type":"object","description":"Barbosa 2013 J Urol citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"absent_cremasteric_reflex":"false","hard_testicle":"false","high_riding_testis":"false","nausea_or_vomiting":"false","testicular_swelling":"false"},{"absent_cremasteric_reflex":"false","hard_testicle":"false","high_riding_testis":"false","nausea_or_vomiting":"false","testicular_swelling":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/twist","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/twist?testicular_swelling=false&hard_testicle=false&absent_cremasteric_reflex=false&nausea_or_vomiting=false&high_riding_testis=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/twist","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/newsom","description":"Newsom 2014 modified Rothrock rule for chest radiography in nontraumatic emergency chest pain. CXR indicated if any of: age ≥65 years, history of congestive heart failure, history of alcohol abuse, decreased breath sounds, fever, or tachypnea. Does not include hypoxia, rales, hemoptysis, tuberculosis, or thromboembolic disease (removed in 2014). Not the 2018 prospective refinement. Caller assigns age and five flags. magent does not examine the patient or read a radiograph. Not a diagnosis.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (integer 18-120). The Newsom 2014 age criterion is met at 65 or older; 64 does not meet.","required":true,"example":"40"},{"in":"query","name":"chf","type":"boolean","description":"History of congestive heart failure as assigned by the caller. true or false. true means the Newsom 2014 CXR criterion is met. magent does not diagnose heart failure.","required":true,"example":"false"},{"in":"query","name":"alcohol_abuse","type":"boolean","description":"History of alcohol abuse as assigned by the caller. true or false. true means the Newsom 2014 CXR criterion is met.","required":true,"example":"false"},{"in":"query","name":"decreased_breath_sounds","type":"boolean","description":"Decreased breath sounds on exam as assigned by the caller. true or false. true means the Newsom 2014 CXR criterion is met. magent does not auscultate the chest.","required":true,"example":"false"},{"in":"query","name":"fever","type":"boolean","description":"Fever as assigned by the caller (paper: temperature greater than 100.4 F). true or false. true means the Newsom 2014 CXR criterion is met. magent does not measure temperature.","required":true,"example":"false"},{"in":"query","name":"tachypnea","type":"boolean","description":"Tachypnea as assigned by the caller (original Rothrock: respiratory rate greater than 24 breaths/min; retained as tachypnea in the 2014 modification). true or false. true means the Newsom 2014 CXR criterion is met. magent does not measure respiratory rate.","required":true,"example":"false"}],"errors":[{"code":"invalid_newsom","message":"Newsom CXR-rule inputs must be the six caller-assigned 2014 modified flags (age 65 or older, CHF, alcohol abuse, decreased breath sounds, fever, tachypnea). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/newsom","citation":{"authors":"Newsom C, Jeanmonod R, Weller K, Boutros N, Reiter M, Jeanmonod D","doi":"10.1155/2014/241935","id":"newsom-2014","source":"Adv Emerg Med. 2014;2014:241935","title":"Validation of a Decision Rule and Derivation of a Modified Rule to Obtain Chest Radiograph in Patients with Nontraumatic Chest Pain in the Emergency Department","url":"https://doi.org/10.1155/2014/241935"},"formula_expression":"CXR indicated iff age >= 65 or congestive heart failure or alcohol abuse or decreased breath sounds or fever or tachypnea (Newsom 2014 modified Rothrock; not hypoxia, rales, hemoptysis, TB, or thromboembolic disease; not the 2018 Academic Emergency Medicine prospective refinement)","purpose":"Apply the Newsom 2014 modified Rothrock rule and return whether a chest radiograph is indicated from caller-assigned age and five history or exam flags.","markdown_url":"https://magentlab.com/docs/newsom.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"newsom"},{"name":"formula_expression","type":"string","description":"Newsom 2014 modified Rothrock six-factor any-present rule"},{"name":"cxr_indicated","type":"boolean","description":"true when any of the six Newsom 2014 modified factors is present. Does not order a chest radiograph. Not a diagnosis."},{"name":"criteria","type":"array","description":"Per-factor rows with factor, met, and age value; met is true when that Newsom 2014 factor is present"},{"name":"citation","type":"object","description":"Newsom 2014 Adv Emerg Med citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"40","alcohol_abuse":"false","chf":"false","decreased_breath_sounds":"false","fever":"false","tachypnea":"false"},{"age":"40","alcohol_abuse":"false","chf":"false","decreased_breath_sounds":"false","fever":"false","tachypnea":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/newsom","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/newsom?age=40&chf=false&alcohol_abuse=false&decreased_breath_sounds=false&fever=false&tachypnea=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/newsom","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rip","description":"Hevesi 2019 Recurrent Instability of the Patella (RIP) after first-time dislocation. Age <25 scores 2; skeletal immaturity / open physes 1; trochlear dysplasia Dejour A–D (caller-assigned present) 1; TT-TG/PL ratio ≥0.5 scores 1. Max 5. Bands 0–1 low, 2–3 intermediate, 4+ high (10-year recurrent instability 0.0%, 30.6%, 79.2%). Not a surgical order. Not Balcarek 2013 or later PIP models. magent does not read radiographs.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (integer 8-80; magent clamp, not a published range). Hevesi 2019: age <25 → 2 points; age ≥25 → 0. magent does not assign age.","required":true,"example":"40"},{"in":"query","name":"skeletal_immature","type":"boolean","description":"Caller-assigned skeletal immaturity / open physes (Hevesi 2019). true scores 1. magent does not read radiographs or assign physeal status. true or false.","required":true,"example":"false"},{"in":"query","name":"trochlear_dysplasia","type":"boolean","description":"Caller-assigned trochlear dysplasia Dejour A–D present (Hevesi 2019). true scores 1. magent does not grade trochlea or read radiographs. true or false.","required":true,"example":"false"},{"in":"query","name":"tt_tg_pl_ratio","type":"number","description":"Caller-assigned tibial tubercle–trochlear groove / patellar length (TT-TG/PL) ratio (Hevesi 2019). ≥0.5 inclusive scores 1. Magent clamp 0.1-2.0, not a published range. magent does not measure TT-TG or patellar length.","required":true,"example":"0.3"}],"errors":[{"code":"invalid_rip","message":"RIP-score inputs must be numeric age plus caller-assigned skeletal immaturity, trochlear dysplasia, and TT-TG/PL as used in Hevesi 2019. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rip","citation":{"authors":"Hevesi M, Heidenreich MJ, Camp CL, Hewett TE, Stuart MJ, Dahm DL, Krych AJ","doi":"10.1016/j.arthro.2018.09.017","id":"hevesi-2019","pmid":"30612768","source":"Arthroscopy. 2019;35(3):953-960","title":"The Recurrent Instability of the Patella Score: A Statistically Based Model for Prediction of Long-Term Recurrence Risk After First-Time Dislocation","url":"https://doi.org/10.1016/j.arthro.2018.09.017"},"formula_expression":"RIP = age_points (<25 → 2, ≥25 → 0) + skeletal_immature 1 + trochlear_dysplasia 1 + (tt_tg_pl_ratio ≥ 0.5 → 1); Hevesi 2019; max 5; risk 0-1 low, 2-3 intermediate, 4+ high (10-year recurrent instability 0.0% / 30.6% / 79.2%)","purpose":"Sum the Hevesi 2019 Recurrent Instability of the Patella (RIP) score after first-time patellar dislocation from age, caller-assigned skeletal immaturity, trochlear dysplasia, and TT-TG/PL ratio, and return the published 0–5 point total and 10-year recurrent-instability band.","markdown_url":"https://magentlab.com/docs/rip.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rip"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Hevesi 2019 RIP points 0-5. Not a surgical order."},{"name":"max_score","type":"integer","description":"5"},{"name":"risk","type":"string","description":"Hevesi 2019 10-year recurrent-instability band: low (0-1, 0.0%), intermediate (2-3, 30.6%), or high (4+, 79.2%). Not a reconstruction order."},{"name":"age","type":"integer","description":"Age in years used (8-80)"},{"name":"skeletal_immature","type":"boolean","description":"Caller-assigned skeletal immaturity / open physes used"},{"name":"trochlear_dysplasia","type":"boolean","description":"Caller-assigned trochlear dysplasia (Dejour A–D present) used"},{"name":"tt_tg_pl_ratio","type":"number","description":"Caller-assigned TT-TG/PL ratio used"},{"name":"components","type":"array","description":"Per-factor Hevesi 2019 RIP points"},{"name":"citation","type":"object","description":"Hevesi et al. Arthroscopy 2019 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"40","skeletal_immature":"false","trochlear_dysplasia":"false","tt_tg_pl_ratio":"0.3"},{"age":"40","skeletal_immature":"false","trochlear_dysplasia":"false","tt_tg_pl_ratio":"0.3"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rip","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rip?age=40&skeletal_immature=false&trochlear_dysplasia=false&tt_tg_pl_ratio=0.3","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rip","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/gcs","description":"Glasgow Coma Scale from eye, verbal, and motor integers. edition=1974 (motor 1-5, max 14) or edition=1976 (motor 1-6, max 15) is required; magent does not pick one. Deterministic published score with citation; not a diagnosis.","parameters":[{"in":"query","name":"eye","type":"integer","description":"Eye opening (E). Integer 1-4 as assigned by the caller.","required":true,"example":"4"},{"in":"query","name":"verbal","type":"integer","description":"Verbal response (V). Integer 1-5 as assigned by the caller.","required":true,"example":"5"},{"in":"query","name":"motor","type":"integer","description":"Motor response (M). Integer 1-5 when edition=1974, or 1-6 when edition=1976, as assigned by the caller.","required":true,"example":"6"},{"in":"query","name":"edition","type":"string","enum":["1974","1976"],"description":"Published motor scale. Required; magent does not pick 1974 (motor 1-5) or 1976 (motor 1-6).","required":true,"example":"1976"}],"errors":[{"code":"invalid_gcs_component","message":"eye (1-4), verbal (1-5), and motor (1-5 for edition=1974, 1-6 for edition=1976) must each be integers in range. Returned before settlement; you are not charged.","status":400},{"code":"invalid_gcs_edition","message":"edition must be 1974 or 1976. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/gcs","citation":{"authors":"Teasdale G, Jennett B","doi":"10.1016/S0140-6736(74)91639-0","id":"teasdale-jennett-1974","source":"Lancet. 1974;2(7872):81-84","title":"Assessment of coma and impaired consciousness. A practical scale","url":"https://doi.org/10.1016/S0140-6736(74)91639-0"},"formula_expression":"GCS = eye + verbal + motor; eye 1-4, verbal 1-5, motor 1-6; max 15","purpose":"Compute the Glasgow Coma Scale as the sum of caller-assigned eye, verbal, and motor integers. The 1974 or 1976 edition is required.","markdown_url":"https://magentlab.com/docs/gcs.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"gcs"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"edition","type":"string","description":"1974 or 1976"},{"name":"score","type":"integer","description":"Total points (3-14 or 3-15)"},{"name":"max_score","type":"integer","description":"14 (1974) or 15 (1976)"},{"name":"components","type":"array","description":"Per-sign points"},{"name":"citation","type":"object","description":"Teasdale and Jennett 1974 or 1976"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"edition":"1976","eye":"4","motor":"6","verbal":"5"},{"edition":"1976","eye":"4","motor":"6","verbal":"5"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/gcs","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/gcs?eye=4&verbal=5&motor=6&edition=1976","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/gcs","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/pgcs","description":"Paediatric Glasgow Coma Scale (PGCS) from caller-assigned eye 1-4, verbal 1-5, and motor 1-6 integers (Reilly 1988). Sum 3-15; 1976-style six-point motor. magent does not observe the child, take age, pick age-specific wording, or implement an age-max expected-normal table. Not adult GCS 1974 five-point motor. Not a diagnosis, trauma triage, or intubation order.","parameters":[{"in":"query","name":"eye","type":"integer","description":"Eye opening (E). Integer 1-4 as assigned by the caller after age-appropriate paediatric descriptors. magent does not observe the child.","required":true,"example":"4"},{"in":"query","name":"verbal","type":"integer","description":"Verbal response (V). Integer 1-5 as assigned by the caller after age-appropriate paediatric descriptors. magent does not observe the child.","required":true,"example":"5"},{"in":"query","name":"motor","type":"integer","description":"Motor response (M). Integer 1-6 as assigned by the caller after age-appropriate paediatric descriptors. magent does not observe the child.","required":true,"example":"6"}],"errors":[{"code":"invalid_pgcs_component","message":"eye must be an integer 1-4, verbal 1-5, and motor 1-6 (Reilly 1988 paediatric GCS). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/pgcs","citation":{"authors":"Reilly PL, Simpson DA, Sprod R, Thomas L","doi":"10.1007/BF00274080","id":"reilly-1988","pmid":"3135935","source":"Childs Nerv Syst. 1988;4(1):30-33","title":"Assessing the conscious level in infants and young children: a paediatric version of the Glasgow Coma Scale","url":"https://doi.org/10.1007/BF00274080"},"formula_expression":"PGCS = eye + verbal + motor; eye 1-4, verbal 1-5, motor 1-6; max 15","purpose":"Compute the Reilly 1988 paediatric Glasgow Coma Scale as the sum of caller-assigned eye (1-4), verbal (1-5), and motor (1-6) integers. Max 15.","markdown_url":"https://magentlab.com/docs/pgcs.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"pgcs"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Total points (3-15)"},{"name":"max_score","type":"integer","description":"Always 15"},{"name":"components","type":"array","description":"Per-sign points"},{"name":"citation","type":"object","description":"Reilly 1988 Childs Nerv Syst citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"eye":"4","motor":"6","verbal":"5"},{"eye":"4","motor":"6","verbal":"5"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/pgcs","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/pgcs?eye=4&verbal=5&motor=6","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/pgcs","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/gcs-pupils","description":"GCS-Pupils (GCS-P) as caller-assigned total GCS 3-15 minus pupil reactivity score (unreactive pupils 0, 1, or 2) per Brennan 2018. Returns the index only (GCS-P range 1-15). magent does not examine pupils, assign GCS, compute eye/verbal/motor (use /api/calc/gcs), or implement Part 2 probability charts. Not a medical device and not a TBI-severity diagnosis.","parameters":[{"in":"query","name":"gcs","type":"integer","description":"Caller-assigned total GCS as an integer 3-15 (1976-style total). magent does not assign GCS and does not take eye, verbal, or motor here (use /api/calc/gcs).","required":true,"example":"15"},{"in":"query","name":"unreactive_pupils","type":"integer","description":"Pupil reactivity score (PRS): integer 0, 1, or 2. 0 both pupils reactive, 1 one unreactive, 2 both unreactive. magent does not examine pupils.","required":true,"example":"0"}],"errors":[{"code":"invalid_gcs_total","message":"gcs must be an integer from 3 to 15. Returned before settlement; you are not charged.","status":400},{"code":"invalid_unreactive_pupils","message":"unreactive_pupils must be an integer 0, 1, or 2 (Brennan 2018 pupil reactivity score). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/gcs-pupils","citation":{"authors":"Brennan PM, Murray GD, Teasdale GM","doi":"10.3171/2017.12.JNS172780","id":"brennan-2018","pmid":"29631516","source":"J Neurosurg. 2018;128(6):1612-1620","title":"Simplifying the use of prognostic information in traumatic brain injury. Part 1: The GCS-Pupils score: an extended index of clinical severity","url":"https://doi.org/10.3171/2017.12.JNS172780"},"formula_expression":"GCS-P = GCS - PRS; PRS is the number of unreactive pupils (0, 1, or 2); GCS 3-15; GCS-P range 1-15 (Brennan 2018)","purpose":"Return the Brennan 2018 GCS-Pupils index as caller-assigned total GCS 3-15 minus pupil reactivity score (unreactive pupils 0, 1, or 2).","markdown_url":"https://magentlab.com/docs/gcs-pupils.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"gcs_pupils"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"gcs","type":"integer","description":"Caller-assigned total GCS 3-15"},{"name":"pupil_reactivity_score","type":"integer","description":"PRS: unreactive pupils 0, 1, or 2"},{"name":"gcs_p","type":"integer","description":"GCS minus PRS (range 1-15). Index only."},{"name":"citation","type":"object","description":"Brennan 2018 J Neurosurg citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"gcs":"15","unreactive_pupils":"0"},{"gcs":"15","unreactive_pupils":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/gcs-pupils","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/gcs-pupils?gcs=15&unreactive_pupils=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/gcs-pupils","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/setscore","description":"Schönenberger 2016 SETscore: 15 caller-assigned flags (neurological function, lesion, organ function/procedure). Weights 2–4; max 48. Elevated / setscore_ge_8 iff score ≥ 8 (2016 ROC cut-off). Not a tracheostomy order, not NIHSS, and not SETPOINT2 enrollment >10. magent does not examine the patient, read imaging, or compute APACHE II, LIS, or PaO2/FiO2.","parameters":[{"in":"query","name":"dysphagia","type":"boolean","description":"Dysphagia (Schönenberger 2016 Table 1, +4 if true). true or false as assigned by the caller. magent does not examine swallow.","required":true,"example":"false"},{"in":"query","name":"observed_aspiration","type":"boolean","description":"Observed aspiration (Schönenberger 2016 Table 1, +3 if true). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"gcs_lt_10","type":"boolean","description":"GCS on admission <10 (Schönenberger 2016 Table 1, +3 if true). true or false as assigned by the caller. magent does not compute GCS.","required":true,"example":"false"},{"in":"query","name":"brainstem_lesion","type":"boolean","description":"Brainstem lesion (Schönenberger 2016 Table 1, +4 if true). true or false as assigned by the caller. magent does not read imaging.","required":true,"example":"false"},{"in":"query","name":"space_occupying_cerebellar","type":"boolean","description":"Space-occupying cerebellar lesion (Schönenberger 2016 Table 1, +3 if true). true or false as assigned by the caller. magent does not read imaging.","required":true,"example":"false"},{"in":"query","name":"mca_infarct_gt_two_thirds","type":"boolean","description":"Ischemic infarct >2/3 MCA territory (Schönenberger 2016 Table 1, +4 if true). true or false as assigned by the caller. magent does not read imaging.","required":true,"example":"false"},{"in":"query","name":"ich_volume_gt_25_ml","type":"boolean","description":"ICH volume >25 mL (Schönenberger 2016 Table 1, +4 if true). true or false as assigned by the caller. magent does not measure hematoma volume.","required":true,"example":"false"},{"in":"query","name":"diffuse_lesion","type":"boolean","description":"Diffuse lesion (Schönenberger 2016 Table 1, +3 if true). true or false as assigned by the caller. magent does not read imaging.","required":true,"example":"false"},{"in":"query","name":"hydrocephalus","type":"boolean","description":"Hydrocephalus (Schönenberger 2016 Table 1, +4 if true). true or false as assigned by the caller. magent does not read imaging.","required":true,"example":"false"},{"in":"query","name":"neurosurgical_intervention","type":"boolean","description":"(Neuro)surgical intervention (Schönenberger 2016 Table 1, +2 if true). true or false as assigned by the caller. magent does not record procedures.","required":true,"example":"false"},{"in":"query","name":"additional_respiratory_disease","type":"boolean","description":"Additional respiratory disease (Schönenberger 2016 Table 1, +3 if true). true or false as assigned by the caller. magent does not diagnose lung disease.","required":true,"example":"false"},{"in":"query","name":"pao2_fio2_lt_150","type":"boolean","description":"PaO2/FiO2 <150 (Schönenberger 2016 Table 1, +2 if true). true or false as assigned by the caller. magent does not compute the P/F ratio.","required":true,"example":"false"},{"in":"query","name":"apache_ii_gt_20","type":"boolean","description":"APACHE II acute physiology score >20 (Schönenberger 2016 Table 1, +4 if true). true or false as assigned by the caller. magent does not compute APACHE II.","required":true,"example":"false"},{"in":"query","name":"lung_injury_score_gt_1","type":"boolean","description":"Lung injury score >1 (Schönenberger 2016 Table 1, +2 if true). true or false as assigned by the caller. magent does not compute LIS.","required":true,"example":"false"},{"in":"query","name":"sepsis","type":"boolean","description":"Sepsis (Schönenberger 2016 Table 1, +3 if true). true or false as assigned by the caller. magent does not diagnose sepsis.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/setscore","citation":{"authors":"Schönenberger S, Al-Suwaidan F, Kieser M, Uhlmann L, Bösel J","doi":"10.1007/s12028-015-0235-5","id":"schoenenberger-2016","pmid":"26842719","source":"Neurocrit Care. 2016;25(1):94-104","title":"The SETscore to Predict Tracheostomy Need in Cerebrovascular Neurocritical Care Patients","url":"https://doi.org/10.1007/s12028-015-0235-5"},"formula_expression":"SETscore = 4*dysphagia + 3*observed_aspiration + 3*gcs_lt_10 + 4*brainstem_lesion + 3*space_occupying_cerebellar + 4*mca_infarct_gt_two_thirds + 4*ich_volume_gt_25_ml + 3*diffuse_lesion + 4*hydrocephalus + 2*neurosurgical_intervention + 3*additional_respiratory_disease + 2*pao2_fio2_lt_150 + 4*apache_ii_gt_20 + 2*lung_injury_score_gt_1 + 3*sepsis; max 48; elevated / setscore_ge_8 iff score >= 8 (Schönenberger 2016)","purpose":"Sum the fifteen Schönenberger 2016 SETscore items from caller-assigned flags and return whether the total is elevated (score ≥ 8).","markdown_url":"https://magentlab.com/docs/setscore.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"setscore"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"SETscore points 0-48 (Schönenberger 2016 Table 1)"},{"name":"max_score","type":"integer","description":"48"},{"name":"elevated","type":"boolean","description":"true iff score >= 8 (Schönenberger 2016 ROC cut-off). Not a tracheostomy order."},{"name":"setscore_ge_8","type":"boolean","description":"true iff score >= 8 (Schönenberger 2016 ROC cut-off). Same as elevated. Not SETPOINT2 enrollment >10."},{"name":"components","type":"array","description":"Per-item points"},{"name":"citation","type":"object","description":"Schönenberger et al. Neurocrit Care 2016 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"additional_respiratory_disease":"false","apache_ii_gt_20":"false","brainstem_lesion":"false","diffuse_lesion":"false","dysphagia":"false","gcs_lt_10":"false","hydrocephalus":"false","ich_volume_gt_25_ml":"false","lung_injury_score_gt_1":"false","mca_infarct_gt_two_thirds":"false","neurosurgical_intervention":"false","observed_aspiration":"false","pao2_fio2_lt_150":"false","sepsis":"false","space_occupying_cerebellar":"false"},{"additional_respiratory_disease":"false","apache_ii_gt_20":"false","brainstem_lesion":"false","diffuse_lesion":"false","dysphagia":"false","gcs_lt_10":"false","hydrocephalus":"false","ich_volume_gt_25_ml":"false","lung_injury_score_gt_1":"false","mca_infarct_gt_two_thirds":"false","neurosurgical_intervention":"false","observed_aspiration":"false","pao2_fio2_lt_150":"false","sepsis":"false","space_occupying_cerebellar":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/setscore","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/setscore?dysphagia=false&observed_aspiration=false&gcs_lt_10=false&brainstem_lesion=false&space_occupying_cerebellar=false&mca_infarct_gt_two_thirds=false&ich_volume_gt_25_ml=false&diffuse_lesion=false&hydrocephalus=false&neurosurgical_intervention=false&additional_respiratory_disease=false&pao2_fio2_lt_150=false&apache_ii_gt_20=false&lung_injury_score_gt_1=false&sepsis=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/setscore","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/hints","description":"Kattah 2009 three-step HINTS (Head-Impulse, Nystagmus, Test-of-Skew) for patients already in acute vestibular syndrome (AVS). Three caller-assigned flags: head_impulse_normal, direction_changing_nystagmus, and skew_deviation. dangerous is true if any flag is true (INFARCT: Impulse Normal, Fast-phase Alternating, Refixation on Cover Test). benign iff none. Not HINTS-plus (hearing). Not a stroke diagnosis or a substitute for neuroimaging. magent does not examine the patient.","parameters":[{"in":"query","name":"head_impulse_normal","type":"boolean","description":"Normal horizontal head-impulse test (h-HIT) as assigned by the caller (Kattah 2009). true is a dangerous central sign (INFARCT: Impulse Normal). magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"direction_changing_nystagmus","type":"boolean","description":"Direction-changing nystagmus in eccentric gaze as assigned by the caller (Kattah 2009). true is a dangerous central sign (INFARCT: Fast-phase Alternating). magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"skew_deviation","type":"boolean","description":"Skew deviation / vertical ocular misalignment on cover test as assigned by the caller (Kattah 2009). true is a dangerous central sign (INFARCT: Refixation on Cover Test). magent does not examine the patient.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/hints","citation":{"authors":"Kattah JC, Talkad AV, Wang DZ, Hsieh YH, Newman-Toker DE","doi":"10.1161/STROKEAHA.109.551234","id":"kattah-2009","pmid":"19762709","source":"Stroke. 2009;40(11):3504-3510","title":"HINTS to diagnose stroke in the acute vestibular syndrome: three-step bedside oculomotor examination more sensitive than early MRI diffusion-weighted imaging","url":"https://doi.org/10.1161/STROKEAHA.109.551234"},"formula_expression":"dangerous iff head_impulse_normal or direction_changing_nystagmus or skew_deviation; benign iff not dangerous (Kattah 2009 three-step HINTS for acute vestibular syndrome; INFARCT: Impulse Normal, Fast-phase Alternating, Refixation on Cover Test)","purpose":"Apply the Kattah 2009 three-step HINTS exam (Head-Impulse, Nystagmus, Test-of-Skew) from three caller-assigned flags and return whether any dangerous central sign is present.","markdown_url":"https://magentlab.com/docs/hints.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"hints"},{"name":"formula_expression","type":"string","description":"Kattah 2009 three-step HINTS: dangerous if any of the three caller-assigned central signs"},{"name":"dangerous","type":"boolean","description":"true iff any of head_impulse_normal, direction_changing_nystagmus, or skew_deviation is true (INFARCT). Not a stroke diagnosis."},{"name":"benign","type":"boolean","description":"true iff none of the three central signs is true (not dangerous)"},{"name":"criteria","type":"array","description":"Per-flag rows plus dangerous_any (met iff any of the three flags is true)"},{"name":"citation","type":"object","description":"Kattah 2009 Stroke citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"direction_changing_nystagmus":"false","head_impulse_normal":"false","skew_deviation":"false"},{"direction_changing_nystagmus":"false","head_impulse_normal":"false","skew_deviation":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/hints","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/hints?head_impulse_normal=false&direction_changing_nystagmus=false&skew_deviation=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/hints","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/face-drops","description":"McEntire 2025 FACE DROPS: seven caller-assigned flags for acute Lyme disease-associated facial palsy versus Bell palsy. Fever +8, aches (arthralgia/myalgia) +6, cephalalgia +3, exhaustion +4, dermatomal or radicular pattern +4, otalgia or postauricular pain −1, stiff neck +3. Score −1 to 28. Scores ≤4 favor Bell palsy; ≥7 favor LDFP; 5–6 indeterminate. Not a Lyme test, diagnosis, serology order, or stroke FACE-DROPS mimic score. magent does not examine the face.","parameters":[{"in":"query","name":"fever","type":"boolean","description":"Fever (McEntire 2025, +8 if true). true or false as assigned by the caller. magent does not examine the patient or measure temperature.","required":true,"example":"false"},{"in":"query","name":"aches","type":"boolean","description":"Arthralgia or myalgia (McEntire 2025, +6 if true). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"cephalalgia","type":"boolean","description":"Headache / cephalalgia (McEntire 2025, +3 if true). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"exhaustion","type":"boolean","description":"Unusual fatigue / exhaustion (McEntire 2025, +4 if true). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"dermatomal_or_radicular","type":"boolean","description":"Dermatomal or radicular pattern (transverse myelitis or radiculitis) (McEntire 2025, +4 if true). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"otalgia_or_postauricular_pain","type":"boolean","description":"Otalgia or postauricular pain (McEntire 2025, −1 if true). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"stiff_neck","type":"boolean","description":"Stiff neck / nuchal rigidity (McEntire 2025, +3 if true). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/face-drops","citation":{"authors":"McEntire CRS, Chung SY, Chang B, Barrera KJ, Zhao Y, Joseph JW, Wormser GP, Jowett N, Chwalisz BK","doi":"10.1212/CPJ.0000000000200476","id":"mcentire-2025","pmid":"40290705","source":"Neurol Clin Pract. 2025;15(3):e200476","title":"FACE DROPS: A Clinical Risk Assessment Tool for Differentiation of Acute Lyme Disease-Associated Facial Palsy From Bell Palsy","url":"https://doi.org/10.1212/CPJ.0000000000200476"},"formula_expression":"FACE DROPS = 8*fever + 6*aches + 3*cephalalgia + 4*exhaustion + 4*dermatomal_or_radicular - 1*otalgia_or_postauricular_pain + 3*stiff_neck; range -1 to 28; favors_bell_palsy iff score <= 4; indeterminate iff 5-6; favors_ldfp iff score >= 7 (McEntire 2025)","purpose":"Sum the seven McEntire 2025 FACE DROPS criteria from caller-assigned flags and return whether the total favors Bell palsy (score ≤4), is indeterminate (5–6), or favors Lyme disease-associated facial palsy (score ≥7).","markdown_url":"https://magentlab.com/docs/face-drops.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"face_drops"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"FACE DROPS points -1 to 28 (McEntire 2025)"},{"name":"max_score","type":"integer","description":"28"},{"name":"classification","type":"string","description":"favors_bell_palsy if score ≤4, indeterminate if 5–6, favors_ldfp if score ≥7 (McEntire 2025). Not a diagnosis."},{"name":"components","type":"array","description":"Per-criterion points"},{"name":"citation","type":"object","description":"McEntire et al. Neurol Clin Pract 2025 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"aches":"false","cephalalgia":"false","dermatomal_or_radicular":"false","exhaustion":"false","fever":"false","otalgia_or_postauricular_pain":"false","stiff_neck":"false"},{"aches":"false","cephalalgia":"false","dermatomal_or_radicular":"false","exhaustion":"false","fever":"false","otalgia_or_postauricular_pain":"false","stiff_neck":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/face-drops","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/face-drops?fever=false&aches=false&cephalalgia=false&exhaustion=false&dermatomal_or_radicular=false&otalgia_or_postauricular_pain=false&stiff_neck=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/face-drops","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/sudbury-vertigo","description":"Ohle 2025 Sudbury vertigo ED score (Table 2): male 1, age>65 flag 1, diabetes 1, hypertension 3, motor or sensory deficit 5, cerebellar signs 6, BPPV -5. Returns score (female+BPPV -5, not clamped), max 17, Table 3 bands lt_5 / 5_to_8 / gt_8 (0.0 / 2.1 / 41.0%), and investigate_further if score >4. Not a medical device, stroke diagnosis, CT order, HINTS, or HINTS-plus. magent does not examine the patient. Age is the age>65 flag, not years.","parameters":[{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"female or male (Ohle 2025 Table 2). Male scores 1. Female scores 0. Assigned by the caller. Do not send a male boolean.","required":true,"example":"female"},{"in":"query","name":"age_gt_65","type":"boolean","description":"Age greater than 65 as a published yes/no flag (Ohle 2025 Table 2). true scores 1. Age 65 scores 0. true or false. Do not send years. magent does not measure age.","required":true,"example":"false"},{"in":"query","name":"diabetes","type":"boolean","description":"Diabetes as assigned by the caller (Ohle 2025 Table 2). true or false. 1 point if true. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"hypertension","type":"boolean","description":"Hypertension as assigned by the caller (Ohle 2025 Table 2). true or false. 3 points if true. magent does not measure blood pressure.","required":true,"example":"false"},{"in":"query","name":"motor_or_sensory_deficit","type":"boolean","description":"Motor or sensory deficit as assigned by the caller (Ohle 2025 Table 2). true or false. 5 points if true. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"cerebellar_signs","type":"boolean","description":"Cerebellar signs as assigned by the caller (Ohle 2025 Table 2 footnote: diplopia, dysarthria, dysphagia, dysmetria, ataxia). true or false. 6 points if true. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"bppv_diagnosis","type":"boolean","description":"BPPV diagnosis as assigned by the caller (Ohle 2025 Table 2). true or false. -5 points if true. magent does not examine the patient.","required":true,"example":"false"}],"errors":[{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/sudbury-vertigo","citation":{"authors":"Ohle R, Savage DW, Roy D, et al.","doi":"10.1016/j.annemergmed.2024.06.003","id":"ohle-2025","pmid":"39093245","source":"Ann Emerg Med. 2025;85(2):122-131","title":"Development of a Clinical Risk Score to Risk Stratify for a Serious Cause of Vertigo in Patients Presenting to the Emergency Department","url":"https://doi.org/10.1016/j.annemergmed.2024.06.003"},"formula_expression":"Sudbury vertigo = male 1 + age_gt_65 1 + diabetes 1 + hypertension 3 + motor_or_sensory_deficit 5 + cerebellar_signs 6 + bppv_diagnosis -5; Ohle 2025 Table 2; Table 3 bands score <5 -> 0.0%, 5-8 -> 2.1%, >8 -> 41.0%; investigate_further iff score >4; max 17 (sum of positive weights; BPPV is negative and not in the max); do not clamp","purpose":"Sum Ohle 2025 Table 2 Sudbury vertigo points from sex, age>65 flag, diabetes, hypertension, motor or sensory deficit, cerebellar signs, and BPPV diagnosis, and return the Table 3 serious-cause band and the score>4 investigate_further cutoff.","markdown_url":"https://magentlab.com/docs/sudbury-vertigo.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"sudbury_vertigo"},{"name":"formula_expression","type":"string","description":"Exact Ohle 2025 Table 2 expression"},{"name":"score","type":"integer","description":"Ohle 2025 Table 2 points. Theoretical paper range -4 to 17 (male+BPPV = -4). Female + BPPV only is -5 and is allowed; not clamped."},{"name":"max_score","type":"integer","description":"Always 17 (sum of positive weights; BPPV is negative and not in the max)"},{"name":"sudbury_band","type":"string","description":"Ohle 2025 Table 3 grouped band: lt_5 if score <5, 5_to_8 if 5<=score<=8, gt_8 if score >8. Not a per-integer rate."},{"name":"serious_cause_percent","type":"number","description":"Ohle 2025 Table 3 grouped serious-cause percent for that band (0.0 / 2.1 / 41.0). Not a per-integer percent."},{"name":"investigate_further","type":"boolean","description":"true iff score >4 (Ohle 2025 operating cutoff: sensitivity 100% / specificity 72.1%). Not a CT or admission order."},{"name":"sex","type":"string","description":"Sex used: female or male"},{"name":"age_gt_65","type":"boolean","description":"Caller-assigned age >65 flag used (not years)"},{"name":"diabetes","type":"boolean","description":"Caller-assigned diabetes flag used"},{"name":"hypertension","type":"boolean","description":"Caller-assigned hypertension flag used"},{"name":"motor_or_sensory_deficit","type":"boolean","description":"Caller-assigned motor or sensory deficit flag used"},{"name":"cerebellar_signs","type":"boolean","description":"Caller-assigned cerebellar signs flag used"},{"name":"bppv_diagnosis","type":"boolean","description":"Caller-assigned BPPV diagnosis flag used"},{"name":"components","type":"array","description":"Per-factor points for the seven Ohle 2025 Table 2 items"},{"name":"citation","type":"object","description":"Ohle et al. Ann Emerg Med 2025 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age_gt_65":"false","bppv_diagnosis":"false","cerebellar_signs":"false","diabetes":"false","hypertension":"false","motor_or_sensory_deficit":"false","sex":"female"},{"age_gt_65":"false","bppv_diagnosis":"false","cerebellar_signs":"false","diabetes":"false","hypertension":"false","motor_or_sensory_deficit":"false","sex":"female"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/sudbury-vertigo","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/sudbury-vertigo?sex=female&age_gt_65=false&diabetes=false&hypertension=false&motor_or_sensory_deficit=false&cerebellar_signs=false&bppv_diagnosis=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/sudbury-vertigo","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/cpp","description":"Cerebral perfusion pressure from caller-supplied MAP and ICP in mm Hg: CPP = MAP − ICP, rounded to 1 decimal. Returns cpp_ge_70 when CPP is at least 70 mm Hg (Rosner 1995 protocol minimum). magent does not measure MAP or ICP and is not an invasive monitor. Not a medical device and not a treatment protocol.","parameters":[{"in":"query","name":"map_mm_hg","type":"number","description":"Mean arterial pressure in mm Hg (30-180). Caller-supplied; magent does not measure MAP.","required":true,"example":"90"},{"in":"query","name":"icp_mm_hg","type":"number","description":"Intracranial pressure in mm Hg (0-100). Caller-supplied; magent does not measure ICP. ICP may exceed MAP.","required":true,"example":"10"}],"errors":[{"code":"invalid_map_mm_hg","message":"map_mm_hg must be a number from 30 to 180. Returned before settlement; you are not charged.","status":400},{"code":"invalid_icp_mm_hg","message":"icp_mm_hg must be a number from 0 to 100 (Rosner 1995 CPP). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/cpp","citation":{"authors":"Rosner MJ, Rosner SD, Johnson AH","doi":"10.3171/jns.1995.83.6.0949","id":"rosner-1995","pmid":"7490638","source":"J Neurosurg. 1995;83(6):949-962","title":"Cerebral perfusion pressure: management protocol and clinical results","url":"https://doi.org/10.3171/jns.1995.83.6.0949"},"formula_expression":"cpp_mm_hg = map_mm_hg - icp_mm_hg","purpose":"Compute cerebral perfusion pressure as MAP minus ICP in mm Hg and flag whether CPP is at least 70 mm Hg per Rosner 1995.","markdown_url":"https://magentlab.com/docs/cpp.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"cpp"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"map_mm_hg","type":"number","description":"Mean arterial pressure used, mm Hg"},{"name":"icp_mm_hg","type":"number","description":"Intracranial pressure used, mm Hg"},{"name":"cpp_mm_hg","type":"number","description":"Cerebral perfusion pressure in mm Hg, 1 decimal"},{"name":"cpp_ge_70","type":"boolean","description":"true iff CPP is at least 70 mm Hg (Rosner 1995 protocol minimum). Not a later target."},{"name":"citation","type":"object","description":"Rosner 1995 J Neurosurg citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"icp_mm_hg":"10","map_mm_hg":"90"},{"icp_mm_hg":"10","map_mm_hg":"90"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/cpp","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/cpp?map_mm_hg=90&icp_mm_hg=10","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/cpp","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/lams","description":"Llanes 2004 Los Angeles Motor Scale (LAMS): facial droop 0 absent / 1 present + arm drift 0 absent / 1 drifts down / 2 falls rapidly + grip 0 normal / 1 weak / 2 no grip. Max 5. Point values assigned to LAPSS motor items. Deterministic published arithmetic with citation; not NIHSS, not a stroke diagnosis or thrombolysis order. magent does not examine the patient.","parameters":[{"in":"query","name":"facial_droop","type":"integer","enum":[0,1],"description":"Llanes 2004 facial droop as assigned by the caller. 0 absent, 1 present. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"arm_drift","type":"integer","enum":[0,1,2],"description":"Llanes 2004 arm drift as assigned by the caller. 0 absent, 1 drifts down, 2 falls rapidly. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"grip","type":"integer","enum":[0,1,2],"description":"Llanes 2004 grip as assigned by the caller. 0 normal, 1 weak, 2 no grip. magent does not examine the patient.","required":true,"example":"0"}],"errors":[{"code":"invalid_lams_face","message":"facial_droop must be 0 (absent) or 1 (present) (Llanes 2004 LAMS). Returned before settlement; you are not charged.","status":400},{"code":"invalid_lams_arm","message":"arm_drift must be 0 (absent), 1 (drifts down), or 2 (falls rapidly) (Llanes 2004 LAMS). Returned before settlement; you are not charged.","status":400},{"code":"invalid_lams_grip","message":"grip must be 0 (normal), 1 (weak), or 2 (no grip) (Llanes 2004 LAMS). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/lams","citation":{"authors":"Llanes JN, Kidwell CS, Starkman S, Leary MC, Eckstein M, Saver JL","doi":"10.1080/312703002806","id":"llanes-2004","pmid":"14691787","source":"Prehosp Emerg Care. 2004;8(1):46-50","title":"The Los Angeles Motor Scale (LAMS): a new measure to characterize stroke severity in the field","url":"https://doi.org/10.1080/312703002806"},"formula_expression":"LAMS = facial_droop (0 absent, 1 present) + arm_drift (0 absent, 1 drifts down, 2 falls rapidly) + grip (0 normal, 1 weak, 2 no grip); Llanes 2004 LAPSS motor items; max 5","purpose":"Sum Llanes 2004 LAMS points from caller-assigned facial droop, arm drift, and grip (LAPSS motor items).","markdown_url":"https://magentlab.com/docs/lams.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"lams"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"LAMS points 0-5"},{"name":"max_score","type":"integer","description":"5"},{"name":"facial_droop","type":"integer","description":"Caller-assigned facial droop 0 or 1"},{"name":"arm_drift","type":"integer","description":"Caller-assigned arm drift 0, 1, or 2"},{"name":"grip","type":"integer","description":"Caller-assigned grip 0, 1, or 2"},{"name":"components","type":"array","description":"Per-item points"},{"name":"citation","type":"object","description":"Llanes 2004 Prehosp Emerg Care citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"arm_drift":"0","facial_droop":"0","grip":"0"},{"arm_drift":"0","facial_droop":"0","grip":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/lams","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/lams?facial_droop=0&arm_drift=0&grip=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/lams","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rosier","description":"Nor 2005 ROSIER: seven caller-assigned flags. Loss of consciousness or syncope −1, seizure −1; new acute-onset (or on awakening) asymmetric face, arm, or leg weakness, speech disturbance, and visual field defect +1 each. Range −2 to +5. stroke_more_likely if score > 0. Score ≤ 0 does not exclude stroke. Not a diagnosis, not NIHSS, and not a medical device. magent does not examine the patient or collect a time of onset.","parameters":[{"in":"query","name":"loss_of_consciousness_or_syncope","type":"boolean","description":"History of loss of consciousness or syncope (Nor 2005, −1 if true). true or false as assigned by the caller. magent does not examine the patient or collect a time of onset.","required":true,"example":"false"},{"in":"query","name":"seizure","type":"boolean","description":"History of seizure activity (Nor 2005, −1 if true). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"asymmetric_face_weakness","type":"boolean","description":"New acute-onset (or on awakening) asymmetric facial weakness (Nor 2005, +1 if true). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"asymmetric_arm_weakness","type":"boolean","description":"New acute-onset (or on awakening) asymmetric arm weakness (Nor 2005, +1 if true). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"asymmetric_leg_weakness","type":"boolean","description":"New acute-onset (or on awakening) asymmetric leg weakness (Nor 2005, +1 if true). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"speech_disturbance","type":"boolean","description":"New acute-onset (or on awakening) speech disturbance (Nor 2005, +1 if true). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"visual_field_defect","type":"boolean","description":"New acute-onset (or on awakening) visual field defect (Nor 2005, +1 if true). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"false"}],"errors":[{"code":"invalid_rosier","message":"each ROSIER 2005 item must be true or false as assigned by the caller. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rosier","citation":{"authors":"Nor AM, Davis J, Sen B, et al","doi":"10.1016/S1474-4422(05)70201-5","id":"nor-2005","pmid":"16239179","source":"Lancet Neurol. 2005;4(11):727-734","title":"The Recognition of Stroke in the Emergency Room (ROSIER) scale: development and validation of a stroke recognition instrument","url":"https://doi.org/10.1016/S1474-4422(05)70201-5"},"formula_expression":"ROSIER = -1*loss_of_consciousness_or_syncope - 1*seizure + 1*asymmetric_face_weakness + 1*asymmetric_arm_weakness + 1*asymmetric_leg_weakness + 1*speech_disturbance + 1*visual_field_defect; range -2 to 5; stroke_more_likely iff score > 0 (Nor 2005)","purpose":"Sum the seven Nor 2005 ROSIER items from caller-assigned flags and return whether the score is greater than 0 (stroke more likely).","markdown_url":"https://magentlab.com/docs/rosier.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rosier"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"ROSIER points -2 to 5 (Nor 2005)"},{"name":"max_score","type":"integer","description":"5"},{"name":"stroke_more_likely","type":"boolean","description":"true iff score > 0 (Nor 2005). Score ≤ 0 does not exclude stroke. Not a diagnosis."},{"name":"components","type":"array","description":"Per-item points"},{"name":"citation","type":"object","description":"Nor et al. Lancet Neurol 2005 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"asymmetric_arm_weakness":"false","asymmetric_face_weakness":"false","asymmetric_leg_weakness":"false","loss_of_consciousness_or_syncope":"false","seizure":"false","speech_disturbance":"false","visual_field_defect":"false"},{"asymmetric_arm_weakness":"false","asymmetric_face_weakness":"false","asymmetric_leg_weakness":"false","loss_of_consciousness_or_syncope":"false","seizure":"false","speech_disturbance":"false","visual_field_defect":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rosier","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rosier?loss_of_consciousness_or_syncope=false&seizure=false&asymmetric_face_weakness=false&asymmetric_arm_weakness=false&asymmetric_leg_weakness=false&speech_disturbance=false&visual_field_defect=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rosier","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/race","description":"Pérez de la Ossa 2014 Rapid Arterial oCclusion Evaluation (RACE) scale: facial_palsy 0 absent / 1 mild / 2 moderate to severe + arm_motor 0 normal to mild / 1 moderate / 2 severe + leg_motor same + gaze_deviation 0 absent / 1 present + cortical 0-2 (aphasia if right hemiparesis; agnosia if left). Max 9. lvo_suggested true iff score ≥5. Not a stroke diagnosis or transfer order and not a race-based equation. magent does not examine the patient.","parameters":[{"in":"query","name":"facial_palsy","type":"integer","enum":[0,1,2],"description":"Caller-assigned Pérez de la Ossa 2014 RACE facial palsy (integer 0-2): 0 absent, 1 mild, 2 moderate to severe. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"arm_motor","type":"integer","enum":[0,1,2],"description":"Caller-assigned Pérez de la Ossa 2014 RACE arm motor (integer 0-2): 0 normal to mild, 1 moderate, 2 severe. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"leg_motor","type":"integer","enum":[0,1,2],"description":"Caller-assigned Pérez de la Ossa 2014 RACE leg motor (integer 0-2): 0 normal to mild, 1 moderate, 2 severe. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"gaze_deviation","type":"integer","enum":[0,1],"description":"Caller-assigned Pérez de la Ossa 2014 RACE head and gaze deviation (integer 0-1): 0 absent, 1 present. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"hemiparesis_side","type":"string","enum":["right","left"],"description":"Caller-assigned hemiparesis side (right or left). Right scores cortical as aphasia (close eyes / make a fist). Left scores cortical as agnosia (recognizes arm and impairment). magent does not examine the patient.","required":true,"example":"right"},{"in":"query","name":"cortical","type":"integer","enum":[0,1,2],"description":"Caller-assigned Pérez de la Ossa 2014 cortical points (integer 0-2). Right hemiparesis: aphasia, close eyes and make a fist (0 both, 1 one, 2 neither). Left hemiparesis: agnosia, recognizes arm and impairment (0 both, 1 one, 2 neither). magent does not examine the patient.","required":true,"example":"0"}],"errors":[{"code":"invalid_race","message":"facial_palsy, arm_motor, and leg_motor 0-2; gaze_deviation 0-1; cortical 0-2 (Pérez de la Ossa 2014). Returned before settlement; you are not charged.","status":400},{"code":"invalid_hemiparesis_side","message":"hemiparesis_side must be right or left (Pérez de la Ossa 2014). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/race","citation":{"authors":"Pérez de la Ossa N, Carrera D, Gorchs M, Querol M, Millán M, Gomis M, Dorado L, López-Cancio E, Hernández-Pérez M, Chicharro V, Escalada X, Jiménez X, Dávalos A","doi":"10.1161/STROKEAHA.113.003071","id":"perez-de-la-ossa-2014","pmid":"24281224","source":"Stroke. 2014;45(1):87-91","title":"Design and validation of a prehospital stroke scale to predict large arterial occlusion: the rapid arterial occlusion evaluation scale","url":"https://doi.org/10.1161/STROKEAHA.113.003071"},"formula_expression":"RACE = facial_palsy (0 absent, 1 mild, 2 moderate to severe) + arm_motor (0 normal to mild, 1 moderate, 2 severe) + leg_motor (0 normal to mild, 1 moderate, 2 severe) + gaze_deviation (0 absent, 1 present) + cortical (0–2; aphasia if right hemiparesis, agnosia if left); Pérez de la Ossa 2014 Table 1; max 9; lvo_suggested if score ≥ 5","purpose":"Sum Pérez de la Ossa 2014 Rapid Arterial oCclusion Evaluation (RACE) scale points from caller-assigned facial palsy, arm motor, leg motor, head and gaze deviation, and cortical signs (aphasia if right hemiparesis, agnosia if left) and return whether the total suggests large arterial occlusion (score ≥5).","markdown_url":"https://magentlab.com/docs/race.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"race"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"RACE scale points 0-9"},{"name":"max_score","type":"integer","description":"9"},{"name":"lvo_suggested","type":"boolean","description":"true iff score ≥ 5 (Pérez de la Ossa 2014 cutoff). Not a stroke diagnosis or transfer order. Sensitivity and PPV are not returned."},{"name":"facial_palsy","type":"integer","description":"Caller-assigned facial palsy 0, 1, or 2"},{"name":"arm_motor","type":"integer","description":"Caller-assigned arm motor 0, 1, or 2"},{"name":"leg_motor","type":"integer","description":"Caller-assigned leg motor 0, 1, or 2"},{"name":"gaze_deviation","type":"integer","description":"Caller-assigned head and gaze deviation 0 or 1"},{"name":"hemiparesis_side","type":"string","description":"Caller-assigned hemiparesis side, right or left"},{"name":"cortical","type":"integer","description":"Caller-assigned cortical points 0, 1, or 2 (aphasia if right, agnosia if left)"},{"name":"components","type":"array","description":"Per-item Pérez de la Ossa 2014 points"},{"name":"citation","type":"object","description":"Pérez de la Ossa et al. Stroke 2014 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"arm_motor":"0","cortical":"0","facial_palsy":"0","gaze_deviation":"0","hemiparesis_side":"right","leg_motor":"0"},{"arm_motor":"0","cortical":"0","facial_palsy":"0","gaze_deviation":"0","hemiparesis_side":"right","leg_motor":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/race","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/race?facial_palsy=0&arm_motor=0&leg_motor=0&gaze_deviation=0&hemiparesis_side=right&cortical=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/race","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/nihss","description":"Brott 1989 NIH stroke scale: 15 caller-assigned exam integers including pupillary response (0-2) and plantar reflex (0-3), with weaker-limb motor arm (0-4) and motor leg (0-3). Sum 0-37. Not the later NINDS 11-category form, not mNIHSS, and not a tPA order. magent does not examine the patient. No total-score severity bands in Brott 1989; later website cutoffs are not applied. Not a diagnosis and not a medical device.","parameters":[{"in":"query","name":"loc","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Brott 1989 level of consciousness (integer 0-3): 0 alert, 1 drowsy, 2 stuporous, 3 coma. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"loc_questions","type":"integer","enum":[0,1,2],"description":"Caller-assigned Brott 1989 LOC questions (integer 0-2): 0 answers both correctly, 1 answers one correctly, 2 incorrect. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"loc_commands","type":"integer","enum":[0,1,2],"description":"Caller-assigned Brott 1989 LOC commands (integer 0-2): 0 obeys both correctly, 1 obeys one correctly, 2 incorrect. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"pupillary_response","type":"integer","enum":[0,1,2],"description":"Caller-assigned Brott 1989 pupillary response (integer 0-2): 0 both reactive, 1 one reactive, 2 neither reactive. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"best_gaze","type":"integer","enum":[0,1,2],"description":"Caller-assigned Brott 1989 best gaze (integer 0-2): 0 normal, 1 partial gaze palsy, 2 forced deviation. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"best_visual","type":"integer","enum":[0,1,2],"description":"Caller-assigned Brott 1989 best visual (integer 0-2): 0 no visual loss, 1 partial hemianopia, 2 complete hemianopia. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"facial_palsy","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Brott 1989 facial palsy (integer 0-3): 0 normal, 1 minor, 2 partial, 3 complete. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"best_motor_arm","type":"integer","enum":[0,1,2,3,4],"description":"Caller-assigned Brott 1989 best motor arm, weaker limb (integer 0-4): 0 no drift, 1 drift, 2 cannot resist gravity, 3 no effort, 4 no movement. Not left and right separately. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"best_motor_leg","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Brott 1989 best motor leg, weaker limb (integer 0-3): 0 no drift, 1 drift, 2 cannot resist gravity, 3 no effort. Not left and right separately. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"plantar_reflex","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Brott 1989 plantar reflex (integer 0-3): 0 normal, 1 equivocal, 2 extensor, 3 bilateral extensor. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"limb_ataxia","type":"integer","enum":[0,1,2],"description":"Caller-assigned Brott 1989 limb ataxia (integer 0-2): 0 absent, 1 present in upper or lower, 2 present in both. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"sensory","type":"integer","enum":[0,1,2],"description":"Caller-assigned Brott 1989 sensory (integer 0-2): 0 normal, 1 partial loss, 2 dense loss. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"neglect","type":"integer","enum":[0,1,2],"description":"Caller-assigned Brott 1989 neglect (integer 0-2): 0 no neglect, 1 partial neglect, 2 complete neglect. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"dysarthria","type":"integer","enum":[0,1,2],"description":"Caller-assigned Brott 1989 dysarthria (integer 0-2): 0 normal articulation, 1 mild to moderate, 2 near unintelligible or worse. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"best_language","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Brott 1989 best language (integer 0-3): 0 no aphasia, 1 mild to moderate, 2 severe aphasia, 3 mute. magent does not examine the patient.","required":true,"example":"0"}],"errors":[{"code":"invalid_nihss_item","message":"Each Brott 1989 NIH stroke scale item must be an integer in that paper's published range. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/nihss","citation":{"authors":"Brott T, Adams HP Jr, Olinger CP, Marler JR, Barsan WG, Biller J, Spilker J, Holleran R, Eberle R, Hertzberg V, Rorick M, Moomaw CJ, Walker M","doi":"10.1161/01.STR.20.7.864","id":"brott-1989","pmid":"2749846","source":"Stroke. 1989;20(7):864-870","title":"Measurements of acute cerebral infarction: a clinical examination scale","url":"https://doi.org/10.1161/01.STR.20.7.864"},"formula_expression":"NIHSS = loc (0-3) + loc_questions (0-2) + loc_commands (0-2) + pupillary_response (0-2) + best_gaze (0-2) + best_visual (0-2) + facial_palsy (0-3) + best_motor_arm (0-4) + best_motor_leg (0-3) + plantar_reflex (0-3) + limb_ataxia (0-2) + sensory (0-2) + neglect (0-2) + dysarthria (0-2) + best_language (0-3); Brott 1989 15-item neurologic examination scale (weaker-limb motor; includes pupillary response and plantar reflex); total = sum; max 37; no published total-score severity bands","purpose":"Sum Brott 1989 NIH stroke scale points from 15 caller-assigned examination integers, including pupillary response and plantar reflex. Weaker-limb motor arm and leg. Does not apply later total-score severity bands.","markdown_url":"https://magentlab.com/docs/nihss.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"nihss"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Brott 1989 NIHSS sum of 15 caller-assigned examination items (0-37)"},{"name":"max_score","type":"integer","description":"Always 37"},{"name":"components","type":"array","description":"Per-item caller-assigned points"},{"name":"citation","type":"object","description":"Brott Stroke 1989 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"best_gaze":"0","best_language":"0","best_motor_arm":"0","best_motor_leg":"0","best_visual":"0","dysarthria":"0","facial_palsy":"0","limb_ataxia":"0","loc":"0","loc_commands":"0","loc_questions":"0","neglect":"0","plantar_reflex":"0","pupillary_response":"0","sensory":"0"},{"best_gaze":"0","best_language":"0","best_motor_arm":"0","best_motor_leg":"0","best_visual":"0","dysarthria":"0","facial_palsy":"0","limb_ataxia":"0","loc":"0","loc_commands":"0","loc_questions":"0","neglect":"0","plantar_reflex":"0","pupillary_response":"0","sensory":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/nihss","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/nihss?loc=0&loc_questions=0&loc_commands=0&pupillary_response=0&best_gaze=0&best_visual=0&facial_palsy=0&best_motor_arm=0&best_motor_leg=0&plantar_reflex=0&limb_ataxia=0&sensory=0&neglect=0&dysarthria=0&best_language=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/nihss","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/aspects","description":"Barber 2000 ASPECTS: 10 minus 1 for each caller-assigned MCA region with early ischemic change (C caudate, L lentiform, IC internal capsule, I insular ribbon, M1–M6). Score 0–10. Not pc-ASPECTS. magent does not read the CT. Not a diagnosis, lytic order, or medical device.","parameters":[{"in":"query","name":"caudate","type":"boolean","description":"Caudate (C). Caller-assigned early ischemic change in the published caudate region (Barber 2000). magent does not read the CT. true or false.","required":true,"example":false},{"in":"query","name":"lentiform","type":"boolean","description":"Lentiform (L). Caller-assigned early ischemic change in the published lentiform region (Barber 2000). magent does not read the CT. true or false.","required":true,"example":false},{"in":"query","name":"internal_capsule","type":"boolean","description":"Internal capsule (IC). Caller-assigned early ischemic change in the published internal-capsule region (Barber 2000). magent does not read the CT. true or false.","required":true,"example":false},{"in":"query","name":"insular_ribbon","type":"boolean","description":"Insular ribbon (I). Caller-assigned early ischemic change in the published insular-ribbon region (Barber 2000). magent does not read the CT. true or false.","required":true,"example":false},{"in":"query","name":"m1","type":"boolean","description":"Anterior MCA cortex (M1). Caller-assigned early ischemic change in the published M1 region (Barber 2000). magent does not read the CT. true or false.","required":true,"example":false},{"in":"query","name":"m2","type":"boolean","description":"MCA cortex lateral to insular ribbon (M2). Caller-assigned early ischemic change in the published M2 region (Barber 2000). magent does not read the CT. true or false.","required":true,"example":false},{"in":"query","name":"m3","type":"boolean","description":"Posterior MCA cortex (M3). Caller-assigned early ischemic change in the published M3 region (Barber 2000). magent does not read the CT. true or false.","required":true,"example":false},{"in":"query","name":"m4","type":"boolean","description":"Anterior MCA territory immediately superior to M1, rostral to basal ganglia (M4). Caller-assigned early ischemic change in the published M4 region (Barber 2000). magent does not read the CT. true or false.","required":true,"example":false},{"in":"query","name":"m5","type":"boolean","description":"Lateral MCA territory immediately superior to M2, rostral to basal ganglia (M5). Caller-assigned early ischemic change in the published M5 region (Barber 2000). magent does not read the CT. true or false.","required":true,"example":false},{"in":"query","name":"m6","type":"boolean","description":"Posterior MCA territory immediately superior to M3, rostral to basal ganglia (M6). Caller-assigned early ischemic change in the published M6 region (Barber 2000). magent does not read the CT. true or false.","required":true,"example":false}],"errors":[{"code":"invalid_aspects_regions","message":"ASPECTS inputs must match caller-assigned involvement of the ten published MCA regions. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/aspects","citation":{"authors":"Barber PA, Demchuk AM, Zhang J, Buchan AM","doi":"10.1016/S0140-6736(00)02237-6","id":"barber-2000-aspects","pmid":"10905241","source":"Lancet. 2000;355(9216):1670-1674","title":"Validity and reliability of a quantitative computed tomography score in predicting outcome of hyperacute stroke before thrombolytic therapy","url":"https://doi.org/10.1016/S0140-6736(00)02237-6"},"formula_expression":"ASPECTS = 10 - (C + L + IC + I + M1 + M2 + M3 + M4 + M5 + M6); 1 point subtracted for caller-assigned early ischemic change (focal swelling or parenchymal hypoattenuation) in each published MCA-territory region; C=caudate, L=lentiform, IC=internal capsule, I=insular ribbon, M1=anterior MCA cortex, M2=MCA cortex lateral to insular ribbon, M3=posterior MCA cortex, M4/M5/M6=anterior/lateral/posterior MCA territories immediately superior to M1/M2/M3, rostral to basal ganglia; Barber 2000; score 0-10; not posterior-circulation pc-ASPECTS","purpose":"Compute Barber 2000 ASPECTS as 10 minus the number of published MCA-territory regions with caller-assigned early ischemic change.","markdown_url":"https://magentlab.com/docs/aspects.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"aspects"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Barber 2000 ASPECTS: 10 minus caller-assigned involved MCA regions (0-10). Not pc-ASPECTS."},{"name":"max_score","type":"integer","description":"Always 10"},{"name":"components","type":"array","description":"Per-region caller-assigned early ischemic change (1 if involved, else 0)"},{"name":"citation","type":"object","description":"Barber Lancet 2000 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"caudate":"false","insular_ribbon":"false","internal_capsule":"false","lentiform":"false","m1":"false","m2":"false","m3":"false","m4":"false","m5":"false","m6":"false"},{"caudate":"false","insular_ribbon":"false","internal_capsule":"false","lentiform":"false","m1":"false","m2":"false","m3":"false","m4":"false","m5":"false","m6":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/aspects","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/aspects?caudate=false&lentiform=false&internal_capsule=false&insular_ribbon=false&m1=false&m2=false&m3=false&m4=false&m5=false&m6=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/aspects","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/alteplase-stroke","description":"NINDS 1995 IV alteplase milligram arithmetic from weight: total_mg = min(0.9 × weight_kg, 90), 10% bolus, 90% infusion over 60 minutes. Reports milligrams and whether the 90 mg cap applied. Not a medical device, not a prescription, not an eligibility screen, and not tenecteplase.","parameters":[{"in":"query","name":"weight_kg","type":"number","description":"Weight in kilograms (1-500). NINDS 1995 dose is 0.9 mg/kg, maximum 90 mg. magent clamp, not an eligibility band.","required":true,"example":"80"}],"errors":[{"code":"invalid_alteplase","message":"Alteplase dose inputs must match the NINDS 1995 weight window from that trial protocol. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/alteplase-stroke","citation":{"authors":"National Institute of Neurological Disorders and Stroke rt-PA Stroke Study Group","doi":"10.1056/NEJM199512143332401","id":"ninds-1995","pmid":"7477192","source":"N Engl J Med. 1995;333(24):1581-1587","title":"Tissue plasminogen activator for acute ischemic stroke","url":"https://doi.org/10.1056/NEJM199512143332401"},"formula_expression":"total_mg = min(0.9 * weight_kg, 90.0); bolus_mg = 0.10 * total_mg; infusion_mg = 0.90 * total_mg; infusion_minutes = 60","purpose":"Compute NINDS 1995 intravenous alteplase milligrams from weight: 0.9 mg/kg capped at 90 mg, with 10% as a bolus and the remainder over 60 minutes.","markdown_url":"https://magentlab.com/docs/alteplase-stroke.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"alteplase_stroke"},{"name":"formula_expression","type":"string","description":"Exact NINDS 1995 expression"},{"name":"weight_kg","type":"number","description":"Input weight in kg"},{"name":"total_mg","type":"number","description":"Total alteplase milligrams, min(0.9 × weight_kg, 90), 1 decimal"},{"name":"bolus_mg","type":"number","description":"10 percent bolus milligrams, 1 decimal"},{"name":"infusion_mg","type":"number","description":"Remainder milligrams over 60 minutes, 1 decimal"},{"name":"infusion_minutes","type":"integer","description":"Infusion duration in minutes (60)"},{"name":"capped","type":"boolean","description":"True when 0.9 × weight_kg exceeds 90 mg"},{"name":"citation","type":"object","description":"NINDS 1995 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"weight_kg":"80"},{"weight_kg":"80"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/alteplase-stroke","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/alteplase-stroke?weight_kg=80","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/alteplase-stroke","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/ivt-contraindications","description":"Powers 2018 Table 6 Class III Harm IVT. contraindicated iff any of 15 caller flags: CT ICH; recent ischemic stroke, severe head trauma, or intracranial/spinal surgery; posttraumatic infarction; history of ICH; SAH presentation; GI malignancy or bleed 21d; coagulopathy; LMWH 24h; DOAC not cleared; GP IIb/IIIa; infective endocarditis; aortic arch dissection; intra-axial neoplasm. Not Class I eligibility, time window, or a dose. magent does not read CT or assay labs. Not a treatment order.","parameters":[{"in":"query","name":"ct_ich","type":"boolean","description":"CT reveals acute intracranial hemorrhage as assigned by the caller (Powers 2018 Table 6 Class III: Harm). true or false. magent does not read CT.","required":true,"example":"false"},{"in":"query","name":"ischemic_stroke_within_3_mo","type":"boolean","description":"Prior ischemic stroke within 3 months as assigned by the caller (Powers 2018 Table 6 Class III: Harm). true or false. magent does not date prior strokes.","required":true,"example":"false"},{"in":"query","name":"severe_head_trauma_within_3_mo","type":"boolean","description":"Recent severe head trauma within 3 months as assigned by the caller (Powers 2018 Table 6 Class III: Harm). true or false. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"posttraumatic_infarction_in_hospital","type":"boolean","description":"Posttraumatic infarction in the acute in-hospital phase as assigned by the caller (Powers 2018 Table 6 Class III: Harm). true or false. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"intracranial_spinal_surgery_within_3_mo","type":"boolean","description":"Intracranial or spinal surgery within 3 months as assigned by the caller (Powers 2018 Table 6 Class III: Harm). true or false. magent does not read an operative note.","required":true,"example":"false"},{"in":"query","name":"history_ich","type":"boolean","description":"History of intracranial hemorrhage as assigned by the caller (Powers 2018 Table 6 Class III: Harm). true or false. magent does not read prior imaging.","required":true,"example":"false"},{"in":"query","name":"sah_presentation","type":"boolean","description":"Presentation most consistent with subarachnoid hemorrhage as assigned by the caller (Powers 2018 Table 6 Class III: Harm). true or false. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"gi_malignancy_or_gi_bleed_21d","type":"boolean","description":"Structural GI malignancy or GI bleed within 21 days as assigned by the caller (Powers 2018 Table 6 Class III: Harm). true or false. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"coagulopathy","type":"boolean","description":"Caller-assigned coagulopathy as in Table 6 (platelets <100000/mm3 or INR >1.7 or aPTT >40 s or PT >15 s). One flag. true or false. magent does not assay labs.","required":true,"example":"false"},{"in":"query","name":"lmwh_treatment_dose_within_24h","type":"boolean","description":"Treatment-dose LMWH within the previous 24 h as assigned by the caller (Powers 2018 Table 6 Class III: Harm). true or false. magent does not read a medication list.","required":true,"example":"false"},{"in":"query","name":"doac_not_cleared","type":"boolean","description":"Taking a direct thrombin or factor Xa inhibitor AND labs not documented normal AND last dose not >48 h with normal renal function, as assigned by the caller from that Table 6 row. true or false. magent does not assay labs.","required":true,"example":"false"},{"in":"query","name":"gp2b3a_concurrent","type":"boolean","description":"Concurrent GP IIb/IIIa inhibitor as assigned by the caller (Powers 2018 Table 6 Class III: Harm). true or false. magent does not read a medication list.","required":true,"example":"false"},{"in":"query","name":"infective_endocarditis","type":"boolean","description":"Symptoms consistent with infective endocarditis as assigned by the caller (Powers 2018 Table 6 Class III: Harm). true or false. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"aortic_arch_dissection","type":"boolean","description":"Known or suspected aortic arch dissection as assigned by the caller (Powers 2018 Table 6 Class III: Harm). true or false. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"intra_axial_neoplasm","type":"boolean","description":"Intra-axial intracranial neoplasm as assigned by the caller (Powers 2018 Table 6 Class III: Harm). true or false. magent does not read imaging.","required":true,"example":"false"}],"errors":[{"code":"invalid_ivt","message":"IVT contraindication flags must each be true or false as published in Powers 2018 Table 6 Class III Harm rows. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/ivt-contraindications","citation":{"authors":"Powers WJ, Rabinstein AA, Ackerson T, et al.","doi":"10.1161/STR.0000000000000158","id":"powers-2018","pmid":"29367334","source":"Stroke. 2018;49(3):e46-e110","title":"2018 Guidelines for the Early Management of Patients With Acute Ischemic Stroke: A Guideline for Healthcare Professionals From the American Heart Association/American Stroke Association","url":"https://doi.org/10.1161/STR.0000000000000158"},"formula_expression":"contraindicated iff ct_ich or ischemic_stroke_within_3_mo or severe_head_trauma_within_3_mo or posttraumatic_infarction_in_hospital or intracranial_spinal_surgery_within_3_mo or history_ich or sah_presentation or gi_malignancy_or_gi_bleed_21d or coagulopathy or lmwh_treatment_dose_within_24h or doac_not_cleared or gp2b3a_concurrent or infective_endocarditis or aortic_arch_dissection or intra_axial_neoplasm (Powers 2018 Table 6 Class III: Harm). Not Class III No Benefit (unclear/wake-up onset windows, extensive CT hypoattenuation). Not Class I eligibility. Not 0-3h vs 3-4.5h. Not a dose. magent does not read CT, assay coagulation, or examine the patient. Not a treatment order","purpose":"Apply Powers 2018 Table 6 Class III: Harm caller flags and return whether intravenous alteplase (IVT) is contraindicated. contraindicated is true iff any of the 15 published Harm flags is true.","markdown_url":"https://magentlab.com/docs/ivt-contraindications.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"ivt_contraindications"},{"name":"formula_expression","type":"string","description":"Powers 2018 Table 6 Class III: Harm any-flag combination"},{"name":"ct_ich","type":"boolean","description":"Caller-assigned ct_ich flag used"},{"name":"ischemic_stroke_within_3_mo","type":"boolean","description":"Caller-assigned ischemic_stroke_within_3_mo flag used"},{"name":"severe_head_trauma_within_3_mo","type":"boolean","description":"Caller-assigned severe_head_trauma_within_3_mo flag used"},{"name":"posttraumatic_infarction_in_hospital","type":"boolean","description":"Caller-assigned posttraumatic_infarction_in_hospital flag used"},{"name":"intracranial_spinal_surgery_within_3_mo","type":"boolean","description":"Caller-assigned intracranial_spinal_surgery_within_3_mo flag used"},{"name":"history_ich","type":"boolean","description":"Caller-assigned history_ich flag used"},{"name":"sah_presentation","type":"boolean","description":"Caller-assigned sah_presentation flag used"},{"name":"gi_malignancy_or_gi_bleed_21d","type":"boolean","description":"Caller-assigned gi_malignancy_or_gi_bleed_21d flag used"},{"name":"coagulopathy","type":"boolean","description":"Caller-assigned coagulopathy flag used"},{"name":"lmwh_treatment_dose_within_24h","type":"boolean","description":"Caller-assigned lmwh_treatment_dose_within_24h flag used"},{"name":"doac_not_cleared","type":"boolean","description":"Caller-assigned doac_not_cleared flag used"},{"name":"gp2b3a_concurrent","type":"boolean","description":"Caller-assigned gp2b3a_concurrent flag used"},{"name":"infective_endocarditis","type":"boolean","description":"Caller-assigned infective_endocarditis flag used"},{"name":"aortic_arch_dissection","type":"boolean","description":"Caller-assigned aortic_arch_dissection flag used"},{"name":"intra_axial_neoplasm","type":"boolean","description":"Caller-assigned intra_axial_neoplasm flag used"},{"name":"contraindicated","type":"boolean","description":"true iff any Powers 2018 Table 6 Class III: Harm caller flag is true. Not a treatment order. Not Class I eligibility. Not a dose."},{"name":"criteria","type":"array","description":"Rows for each caller flag and contraindicated with factor and met"},{"name":"citation","type":"object","description":"Powers 2018 Stroke AHA/ASA acute ischemic stroke guideline citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"aortic_arch_dissection":"false","coagulopathy":"false","ct_ich":"false","doac_not_cleared":"false","gi_malignancy_or_gi_bleed_21d":"false","gp2b3a_concurrent":"false","history_ich":"false","infective_endocarditis":"false","intra_axial_neoplasm":"false","intracranial_spinal_surgery_within_3_mo":"false","ischemic_stroke_within_3_mo":"false","lmwh_treatment_dose_within_24h":"false","posttraumatic_infarction_in_hospital":"false","sah_presentation":"false","severe_head_trauma_within_3_mo":"false"},{"aortic_arch_dissection":"false","coagulopathy":"false","ct_ich":"false","doac_not_cleared":"false","gi_malignancy_or_gi_bleed_21d":"false","gp2b3a_concurrent":"false","history_ich":"false","infective_endocarditis":"false","intra_axial_neoplasm":"false","intracranial_spinal_surgery_within_3_mo":"false","ischemic_stroke_within_3_mo":"false","lmwh_treatment_dose_within_24h":"false","posttraumatic_infarction_in_hospital":"false","sah_presentation":"false","severe_head_trauma_within_3_mo":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/ivt-contraindications","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/ivt-contraindications?ct_ich=false&ischemic_stroke_within_3_mo=false&severe_head_trauma_within_3_mo=false&posttraumatic_infarction_in_hospital=false&intracranial_spinal_surgery_within_3_mo=false&history_ich=false&sah_presentation=false&gi_malignancy_or_gi_bleed_21d=false&coagulopathy=false&lmwh_treatment_dose_within_24h=false&doac_not_cleared=false&gp2b3a_concurrent=false&infective_endocarditis=false&aortic_arch_dissection=false&intra_axial_neoplasm=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/ivt-contraindications","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/mnihss","description":"Meyer/Lyden 2001 modified NIH Stroke Scale (mNIHSS): eleven caller-assigned NINDS-style integers. Drops LOC, facial palsy, limb ataxia, and dysarthria; collapses sensory to 0 = normal or 1 = abnormal; keeps left/right motor arm and leg (each 0-4). Sum 0-31. magent does not examine the patient. No total-score severity bands in Meyer 2001; later website cutoffs are not applied. Not Brott 1989 NIHSS, not a tPA order, not a diagnosis, and not a medical device.","parameters":[{"in":"query","name":"loc_questions","type":"integer","enum":[0,1,2],"description":"Caller-assigned Meyer 2001 LOC questions (integer 0-2): 0 answers both correctly, 1 answers one correctly, 2 incorrect. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"loc_commands","type":"integer","enum":[0,1,2],"description":"Caller-assigned Meyer 2001 LOC commands (integer 0-2): 0 obeys both correctly, 1 obeys one correctly, 2 incorrect. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"best_gaze","type":"integer","enum":[0,1,2],"description":"Caller-assigned Meyer 2001 best gaze (integer 0-2): 0 normal, 1 partial gaze palsy, 2 forced deviation. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"best_visual","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Meyer 2001 best visual (integer 0-3): 0 no visual loss, 1 partial hemianopia, 2 complete hemianopia, 3 bilateral hemianopia. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"left_arm","type":"integer","enum":[0,1,2,3,4],"description":"Caller-assigned Meyer 2001 left arm motor, NINDS style (integer 0-4): 0 no drift, 1 drift, 2 some effort against gravity, 3 no effort against gravity, 4 no movement. Not Brott weaker-limb. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"right_arm","type":"integer","enum":[0,1,2,3,4],"description":"Caller-assigned Meyer 2001 right arm motor, NINDS style (integer 0-4): 0 no drift, 1 drift, 2 some effort against gravity, 3 no effort against gravity, 4 no movement. Not Brott weaker-limb. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"left_leg","type":"integer","enum":[0,1,2,3,4],"description":"Caller-assigned Meyer 2001 left leg motor, NINDS style (integer 0-4): 0 no drift, 1 drift, 2 some effort against gravity, 3 no effort against gravity, 4 no movement. Not Brott weaker-limb. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"right_leg","type":"integer","enum":[0,1,2,3,4],"description":"Caller-assigned Meyer 2001 right leg motor, NINDS style (integer 0-4): 0 no drift, 1 drift, 2 some effort against gravity, 3 no effort against gravity, 4 no movement. Not Brott weaker-limb. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"sensory","type":"integer","enum":[0,1],"description":"Caller-assigned Meyer 2001 sensory (integer 0-1): 0 normal, 1 abnormal. Collapsed from NIHSS 0-2; 2 is invalid. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"best_language","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Meyer 2001 best language (integer 0-3): 0 no aphasia, 1 mild to moderate, 2 severe aphasia, 3 mute. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"neglect","type":"integer","enum":[0,1,2],"description":"Caller-assigned Meyer 2001 neglect (integer 0-2): 0 no neglect, 1 partial neglect, 2 complete neglect. magent does not examine the patient.","required":true,"example":"0"}],"errors":[{"code":"invalid_mnihss","message":"mNIHSS needs eleven NINDS-style items (Lyden/Meyer 2001; not Brott 1989 NIHSS). Returned before settlement; you are not charged.","status":400},{"code":"invalid_mnihss_item","message":"each mNIHSS item must be an integer in that item's published range (Meyer 2001). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/mnihss","citation":{"authors":"Meyer BC, Hemmen TM, Jackson CM, Lyden PD","doi":"10.1161/01.str.32.6.1310","id":"meyer-2001","pmid":"11387492","source":"Stroke. 2001;32(6):1310-1317","title":"A modified National Institutes of Health Stroke Scale for use in stroke clinical trials: preliminary reliability and validity","url":"https://doi.org/10.1161/01.str.32.6.1310"},"formula_expression":"mNIHSS = loc_questions (0-2) + loc_commands (0-2) + best_gaze (0-2) + best_visual (0-3) + left_arm (0-4) + right_arm (0-4) + left_leg (0-4) + right_leg (0-4) + sensory (0-1) + best_language (0-3) + neglect (0-2); Meyer/Lyden 2001 modified NIHSS (NINDS 11-item form; L/R motor; sensory collapsed to 0-1); total = sum; max 31; no published total-score severity bands","purpose":"Sum Meyer/Lyden 2001 modified NIH stroke scale points from 11 caller-assigned NINDS-style examination integers, with left/right motor and sensory collapsed to 0-1. Does not apply total-score severity bands.","markdown_url":"https://magentlab.com/docs/mnihss.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"mnihss"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Meyer 2001 mNIHSS sum of 11 caller-assigned NINDS-style examination items (0-31)"},{"name":"max_score","type":"integer","description":"Always 31"},{"name":"components","type":"array","description":"Per-item caller-assigned points"},{"name":"citation","type":"object","description":"Meyer Stroke 2001 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"best_gaze":"0","best_language":"0","best_visual":"0","left_arm":"0","left_leg":"0","loc_commands":"0","loc_questions":"0","neglect":"0","right_arm":"0","right_leg":"0","sensory":"0"},{"best_gaze":"0","best_language":"0","best_visual":"0","left_arm":"0","left_leg":"0","loc_commands":"0","loc_questions":"0","neglect":"0","right_arm":"0","right_leg":"0","sensory":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/mnihss","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/mnihss?loc_questions=0&loc_commands=0&best_gaze=0&best_visual=0&left_arm=0&right_arm=0&left_leg=0&right_leg=0&sensory=0&best_language=0&neglect=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/mnihss","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/pediatric-nihss","description":"Ichord 2011 Pediatric NIH Stroke Scale (PedNIHSS): 15 caller-assigned NINDS NIHSS integers with left and right motor arm and leg (each 0-4). Visual 0-3. Extinction, not Brott neglect. No pupillary response or plantar reflex. Sum 0-42. magent does not examine the child. No total-score severity bands in Ichord 2011; later 5/15/20 website cutoffs are not applied. Not Brott 1989 15-item NIHSS (max 37), not mNIHSS, not a tPA order, not a diagnosis, and not a medical device.","parameters":[{"in":"query","name":"loc","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Ichord 2011 PedNIHSS level of consciousness (integer 0-3): 0 alert, 1 not alert but arousable, 2 not alert requires repeated stimulation, 3 unresponsive. magent does not examine the child.","required":true,"example":"0"},{"in":"query","name":"loc_questions","type":"integer","enum":[0,1,2],"description":"Caller-assigned Ichord 2011 PedNIHSS LOC questions (integer 0-2): 0 answers both correctly, 1 answers one correctly, 2 incorrect. magent does not examine the child.","required":true,"example":"0"},{"in":"query","name":"loc_commands","type":"integer","enum":[0,1,2],"description":"Caller-assigned Ichord 2011 PedNIHSS LOC commands (integer 0-2): 0 obeys both correctly, 1 obeys one correctly, 2 incorrect. magent does not examine the child.","required":true,"example":"0"},{"in":"query","name":"best_gaze","type":"integer","enum":[0,1,2],"description":"Caller-assigned Ichord 2011 PedNIHSS best gaze (integer 0-2): 0 normal, 1 partial gaze palsy, 2 forced deviation. magent does not examine the child.","required":true,"example":"0"},{"in":"query","name":"best_visual","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Ichord 2011 PedNIHSS best visual, NINDS range (integer 0-3): 0 no visual loss, 1 partial hemianopia, 2 complete hemianopia, 3 bilateral hemianopia. Not Brott 0-2. magent does not examine the child.","required":true,"example":"0"},{"in":"query","name":"facial_palsy","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Ichord 2011 PedNIHSS facial palsy (integer 0-3): 0 normal, 1 minor, 2 partial, 3 complete. magent does not examine the child.","required":true,"example":"0"},{"in":"query","name":"motor_left_arm","type":"integer","enum":[0,1,2,3,4],"description":"Caller-assigned Ichord 2011 PedNIHSS left arm motor, NINDS style (integer 0-4): 0 no drift, 1 drift, 2 some effort against gravity, 3 no effort against gravity, 4 no movement. Not Brott weaker-limb. magent does not examine the child.","required":true,"example":"0"},{"in":"query","name":"motor_right_arm","type":"integer","enum":[0,1,2,3,4],"description":"Caller-assigned Ichord 2011 PedNIHSS right arm motor, NINDS style (integer 0-4): 0 no drift, 1 drift, 2 some effort against gravity, 3 no effort against gravity, 4 no movement. Not Brott weaker-limb. magent does not examine the child.","required":true,"example":"0"},{"in":"query","name":"motor_left_leg","type":"integer","enum":[0,1,2,3,4],"description":"Caller-assigned Ichord 2011 PedNIHSS left leg motor, NINDS style (integer 0-4): 0 no drift, 1 drift, 2 some effort against gravity, 3 no effort against gravity, 4 no movement. Not Brott weaker-limb. magent does not examine the child.","required":true,"example":"0"},{"in":"query","name":"motor_right_leg","type":"integer","enum":[0,1,2,3,4],"description":"Caller-assigned Ichord 2011 PedNIHSS right leg motor, NINDS style (integer 0-4): 0 no drift, 1 drift, 2 some effort against gravity, 3 no effort against gravity, 4 no movement. Not Brott weaker-limb. magent does not examine the child.","required":true,"example":"0"},{"in":"query","name":"limb_ataxia","type":"integer","enum":[0,1,2],"description":"Caller-assigned Ichord 2011 PedNIHSS limb ataxia (integer 0-2): 0 absent, 1 present in one limb, 2 present in two limbs. magent does not examine the child.","required":true,"example":"0"},{"in":"query","name":"sensory","type":"integer","enum":[0,1,2],"description":"Caller-assigned Ichord 2011 PedNIHSS sensory (integer 0-2): 0 normal, 1 mild to moderate loss, 2 severe to total loss. magent does not examine the child.","required":true,"example":"0"},{"in":"query","name":"best_language","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Ichord 2011 PedNIHSS best language (integer 0-3): 0 no aphasia, 1 mild to moderate, 2 severe aphasia, 3 mute or global aphasia. magent does not examine the child.","required":true,"example":"0"},{"in":"query","name":"dysarthria","type":"integer","enum":[0,1,2],"description":"Caller-assigned Ichord 2011 PedNIHSS dysarthria (integer 0-2): 0 normal articulation, 1 mild to moderate, 2 severe or unintelligible. magent does not examine the child.","required":true,"example":"0"},{"in":"query","name":"extinction","type":"integer","enum":[0,1,2],"description":"Caller-assigned Ichord 2011 PedNIHSS extinction and inattention (integer 0-2): 0 no abnormality, 1 inattention to one modality, 2 profound hemi-inattention or extinction to more than one modality. Not Brott neglect. magent does not examine the child.","required":true,"example":"0"}],"errors":[{"code":"invalid_pediatric_nihss","message":"PedNIHSS needs Ichord pediatric NIH Stroke Scale item scores in published ranges. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/pediatric-nihss","citation":{"authors":"Ichord RN, Bastian R, Abraham L, et al.","doi":"10.1161/STROKEAHA.110.607192","id":"ichord-2011","pmid":"21317270","source":"Stroke. 2011;42(3):613-617","title":"Interrater Reliability of the Pediatric National Institutes of Health Stroke Scale (PedNIHSS) in a Multicenter Study","url":"https://doi.org/10.1161/STROKEAHA.110.607192"},"formula_expression":"PedNIHSS = loc (0-3) + loc_questions (0-2) + loc_commands (0-2) + best_gaze (0-2) + best_visual (0-3) + facial_palsy (0-3) + motor_left_arm (0-4) + motor_right_arm (0-4) + motor_left_leg (0-4) + motor_right_leg (0-4) + limb_ataxia (0-2) + sensory (0-2) + best_language (0-3) + dysarthria (0-2) + extinction (0-2); Ichord 2011 pediatric adaptation of the NINDS NIHSS item list and scoring ranges (L/R motor; no pupillary response or plantar reflex); total = sum; max 42; no published total-score severity bands","purpose":"Sum Ichord 2011 PedNIHSS points from 15 caller-assigned NINDS NIH Stroke Scale integers, with left and right motor arm and leg. Does not apply total-score severity bands.","markdown_url":"https://magentlab.com/docs/pediatric-nihss.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"pediatric_nihss"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Ichord 2011 PedNIHSS sum of 15 caller-assigned NINDS examination items (0-42)"},{"name":"max_score","type":"integer","description":"Always 42"},{"name":"components","type":"array","description":"Per-item caller-assigned points"},{"name":"citation","type":"object","description":"Ichord Stroke 2011 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"best_gaze":"0","best_language":"0","best_visual":"0","dysarthria":"0","extinction":"0","facial_palsy":"0","limb_ataxia":"0","loc":"0","loc_commands":"0","loc_questions":"0","motor_left_arm":"0","motor_left_leg":"0","motor_right_arm":"0","motor_right_leg":"0","sensory":"0"},{"best_gaze":"0","best_language":"0","best_visual":"0","dysarthria":"0","extinction":"0","facial_palsy":"0","limb_ataxia":"0","loc":"0","loc_commands":"0","loc_questions":"0","motor_left_arm":"0","motor_left_leg":"0","motor_right_arm":"0","motor_right_leg":"0","sensory":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/pediatric-nihss","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/pediatric-nihss?loc=0&loc_questions=0&loc_commands=0&best_gaze=0&best_visual=0&facial_palsy=0&motor_left_arm=0&motor_right_arm=0&motor_left_leg=0&motor_right_leg=0&limb_ataxia=0&sensory=0&best_language=0&dysarthria=0&extinction=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/pediatric-nihss","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/asds","description":"Acute Stroke Dysphagia Screen (Edmiaston 2010). Pass only when all five hold: GCS ≥13 and no facial, tongue, or palatal asymmetry or weakness, and no 3-ounce water-swallow aspiration signs. Fail-any screen. Caller assigns GCS and the four bedside flags. magent does not examine cranial nerves or administer water. Not a dysphagia diagnosis, not a diet order, and not a medical device.","parameters":[{"in":"query","name":"gcs","type":"integer","description":"Caller-assigned total GCS as an integer 3-15. Criterion met when GCS ≥ 13; 12 does not meet. magent does not assign GCS (use /api/calc/gcs for eye, verbal, and motor).","required":true,"example":"15"},{"in":"query","name":"facial_asymmetry_or_weakness","type":"boolean","description":"Facial asymmetry or weakness. true or false as assigned by the caller. Criterion met when false. magent does not examine cranial nerves.","required":true,"example":"false"},{"in":"query","name":"tongue_asymmetry_or_weakness","type":"boolean","description":"Tongue asymmetry or weakness. true or false as assigned by the caller. Criterion met when false. magent does not examine cranial nerves.","required":true,"example":"false"},{"in":"query","name":"palatal_asymmetry_or_weakness","type":"boolean","description":"Palatal asymmetry or weakness. true or false as assigned by the caller. Criterion met when false. magent does not examine cranial nerves.","required":true,"example":"false"},{"in":"query","name":"water_swallow_aspiration_signs","type":"boolean","description":"Signs of aspiration on a 3-ounce water swallow as assigned by the caller. true or false. Criterion met when false. magent does not administer a swallow test.","required":true,"example":"false"}],"errors":[{"code":"invalid_asds","message":"Acute Stroke Dysphagia Screen needs gcs and the four bedside flags (Edmiaston 2010). Returned before settlement; you are not charged.","status":400},{"code":"invalid_gcs_total","message":"gcs must be an integer from 3 to 15. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/asds","citation":{"authors":"Edmiaston J, Connor LT, Loehr L, Nassief A","doi":"10.4037/ajcc2009961","id":"edmiaston-2010","pmid":"19875722","source":"Am J Crit Care. 2010;19(4):357-364","title":"Validation of a dysphagia screening tool in acute stroke patients","url":"https://doi.org/10.4037/ajcc2009961"},"formula_expression":"asds_pass iff GCS >= 13 and no facial_asymmetry_or_weakness and no tongue_asymmetry_or_weakness and no palatal_asymmetry_or_weakness and no water_swallow_aspiration_signs (Edmiaston 2010 five-item fail-any)","purpose":"Apply the Edmiaston 2010 five-item Acute Stroke Dysphagia Screen and return whether all five criteria hold (asds_pass).","markdown_url":"https://magentlab.com/docs/asds.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"asds"},{"name":"formula_expression","type":"string","description":"Edmiaston 2010 five-item fail-any pass rule"},{"name":"asds_pass","type":"boolean","description":"true only when all five criteria are met. Not a dysphagia diagnosis and not a diet order."},{"name":"criteria","type":"array","description":"Per-factor rows with factor, met, and value when GCS"},{"name":"citation","type":"object","description":"Edmiaston 2010 Am J Crit Care citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"facial_asymmetry_or_weakness":"false","gcs":"15","palatal_asymmetry_or_weakness":"false","tongue_asymmetry_or_weakness":"false","water_swallow_aspiration_signs":"false"},{"facial_asymmetry_or_weakness":"false","gcs":"15","palatal_asymmetry_or_weakness":"false","tongue_asymmetry_or_weakness":"false","water_swallow_aspiration_signs":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/asds","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/asds?gcs=15&facial_asymmetry_or_weakness=false&tongue_asymmetry_or_weakness=false&palatal_asymmetry_or_weakness=false&water_swallow_aspiration_signs=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/asds","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/fast-ed","description":"Lima 2016 FAST-ED (Field Assessment Stroke Triage for Emergency Destination): facial_palsy 0-1 + arm_weakness 0-2 + speech 0-2 + eye_deviation 0-2 + neglect 0-2. Max 9. lvo_suggested iff score ≥4. Bands 0_to_1 / 2_to_3 / gte_4. Time is documented for decision making (0 points, not scored). Not a stroke diagnosis or transfer order. magent does not examine the patient.","parameters":[{"in":"query","name":"facial_palsy","type":"integer","enum":[0,1],"description":"Caller-assigned Lima 2016 FAST-ED facial palsy (integer 0-1): 0 normal or minor, 1 partial or complete. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"arm_weakness","type":"integer","enum":[0,1,2],"description":"Caller-assigned Lima 2016 FAST-ED arm weakness (integer 0-2): 0 no drift, 1 drift or some effort against gravity, 2 no effort against gravity or no movement. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"speech","type":"integer","enum":[0,1,2],"description":"Caller-assigned Lima 2016 FAST-ED speech changes (integer 0-2): 0 absent, 1 mild to moderate, 2 severe, global aphasia, or mute. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"eye_deviation","type":"integer","enum":[0,1,2],"description":"Caller-assigned Lima 2016 FAST-ED eye deviation (integer 0-2): 0 absent, 1 partial, 2 forced. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"neglect","type":"integer","enum":[0,1,2],"description":"Caller-assigned Lima 2016 FAST-ED denial/neglect (integer 0-2): 0 absent, 1 extinction to bilateral stimulation in only one sensory modality, 2 does not recognize own hand or orients only to one side. magent does not examine the patient.","required":true,"example":"0"}],"errors":[{"code":"invalid_fast_ed","message":"facial_palsy must be 0-1; arm_weakness, speech, eye_deviation, and neglect must each be 0-2 (Lima 2016 FAST-ED). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/fast-ed","citation":{"authors":"Lima FO, Silva GS, Furie KL, et al.","doi":"10.1161/STROKEAHA.116.013301","id":"lima-2016","pmid":"27364531","source":"Stroke. 2016;47(8):1997-2002","title":"Field Assessment Stroke Triage for Emergency Destination: A Simple and Accurate Prehospital Scale to Detect Large Vessel Occlusion Strokes","url":"https://doi.org/10.1161/STROKEAHA.116.013301"},"formula_expression":"FAST-ED = facial_palsy (0 normal or minor, 1 partial or complete) + arm_weakness (0 no drift, 1 drift or some effort against gravity, 2 no effort against gravity or no movement) + speech (0 absent, 1 mild to moderate, 2 severe, global aphasia, or mute) + eye_deviation (0 absent, 1 partial, 2 forced) + neglect (0 absent, 1 extinction to bilateral stimulation in only one sensory modality, 2 does not recognize own hand or orients only to one side); Lima 2016 Table 1; Time documented for decision making (0 points, not scored); max 9; lvo_suggested if score ≥ 4; fast_ed_band 0_to_1 (score 0–1, <15% LVO), 2_to_3 (score 2–3, ~30%), gte_4 (score ≥4, ~60%+)","purpose":"Sum Lima 2016 Field Assessment Stroke Triage for Emergency Destination (FAST-ED) points from caller-assigned facial palsy, arm weakness, speech, eye deviation, and neglect, and return whether the total suggests large-vessel occlusion (score ≥4) plus the published LVO-rate band.","markdown_url":"https://magentlab.com/docs/fast-ed.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"fast_ed"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"FAST-ED scale points 0-9"},{"name":"max_score","type":"integer","description":"9"},{"name":"lvo_suggested","type":"boolean","description":"true iff score ≥ 4 (Lima 2016 abstract threshold). Not a stroke diagnosis or transfer order. Sensitivity and PPV are not returned."},{"name":"fast_ed_band","type":"string","description":"Published Lima 2016 LVO-rate grouping: 0_to_1 (score 0-1, <15% LVO), 2_to_3 (score 2-3, ~30%), gte_4 (score ≥4, ~60%+). Cohort rates, not a patient-level probability."},{"name":"facial_palsy","type":"integer","description":"Caller-assigned facial palsy 0 or 1"},{"name":"arm_weakness","type":"integer","description":"Caller-assigned arm weakness 0, 1, or 2"},{"name":"speech","type":"integer","description":"Caller-assigned speech 0, 1, or 2"},{"name":"eye_deviation","type":"integer","description":"Caller-assigned eye deviation 0, 1, or 2"},{"name":"neglect","type":"integer","description":"Caller-assigned neglect 0, 1, or 2"},{"name":"components","type":"array","description":"Per-item Lima 2016 Table 1 points"},{"name":"citation","type":"object","description":"Lima et al. Stroke 2016 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"arm_weakness":"0","eye_deviation":"0","facial_palsy":"0","neglect":"0","speech":"0"},{"arm_weakness":"0","eye_deviation":"0","facial_palsy":"0","neglect":"0","speech":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/fast-ed","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/fast-ed?facial_palsy=0&arm_weakness=0&speech=0&eye_deviation=0&neglect=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/fast-ed","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/cpsss","description":"Katz 2015 Cincinnati Prehospital Stroke Severity Scale (CP-SSS): gaze deviation 2 if present else 0 + abnormal LOC 1 + arm cannot hold 10 s 1. Max 4. severe_stroke_suggested iff score ≥ 2. Not the 3-item CPSS facial/arm/speech screen, not NIHSS, not a tPA decision. magent does not examine the patient.","parameters":[{"in":"query","name":"gaze_deviation","type":"integer","enum":[0,2],"description":"Caller-assigned Katz 2015 conjugate gaze deviation. Integer 0 absent or 2 present (not 1). magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"loc_abnormal","type":"boolean","description":"Caller-assigned Katz 2015 incorrect level of consciousness (cannot answer age or current month correctly, or cannot follow commands). true if abnormal, false if normal. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"arm_weakness","type":"boolean","description":"Caller-assigned Katz 2015 arm weakness: cannot hold arm up for 10 s (arm falls or no effort against gravity). true if present. magent does not examine the patient.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_cpsss","message":"gaze_deviation 0 or 2; loc_abnormal and arm_weakness true or false (Katz 2015). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/cpsss","citation":{"authors":"Katz BS, McMullan JT, Sucharew H, Adeoye O, Broderick JP","doi":"10.1161/STROKEAHA.115.008804","id":"katz-2015","pmid":"25899242","source":"Stroke. 2015;46(6):1508-1512","title":"Design and validation of a prehospital scale to predict stroke severity: Cincinnati Prehospital Stroke Severity Scale","url":"https://doi.org/10.1161/STROKEAHA.115.008804"},"formula_expression":"CP-SSS = gaze_deviation (2 if present, else 0) + loc_abnormal (1 if cannot answer age or current month, or cannot follow commands) + arm_weakness (1 if cannot hold arm 10 s); Katz 2015; max 4; severe_stroke_suggested if score ≥ 2","purpose":"Sum Katz 2015 Cincinnati Prehospital Stroke Severity Scale (CP-SSS) points from caller-assigned conjugate gaze deviation, abnormal level of consciousness, and arm weakness, and return whether the total suggests severe stroke (score ≥2).","markdown_url":"https://magentlab.com/docs/cpsss.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"cpsss"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"CP-SSS points 0-4"},{"name":"max_score","type":"integer","description":"4"},{"name":"severe_stroke_suggested","type":"boolean","description":"true iff score ≥ 2 (Katz 2015 cutoff). Not NIHSS and not a tPA decision. Sensitivity and PPV are not returned."},{"name":"gaze_deviation","type":"integer","description":"Caller-assigned conjugate gaze deviation 0 or 2"},{"name":"loc_abnormal","type":"boolean","description":"Caller-assigned incorrect level of consciousness"},{"name":"arm_weakness","type":"boolean","description":"Caller-assigned inability to hold arm up for 10 s"},{"name":"components","type":"array","description":"Per-item Katz 2015 points"},{"name":"citation","type":"object","description":"Katz et al. Stroke 2015 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"arm_weakness":"false","gaze_deviation":"0","loc_abnormal":"false"},{"arm_weakness":"false","gaze_deviation":"0","loc_abnormal":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/cpsss","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/cpsss?gaze_deviation=0&loc_abnormal=false&arm_weakness=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/cpsss","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/abcd2","description":"ABCD2 (Johnston 2007) early stroke-risk score after TIA from age, blood pressure, caller-assigned clinical features, symptom duration, and diabetes (max 7). Bands 0-3, 4-5, and 6-7. Deterministic published score with citation; not a diagnosis or admit protocol. magent does not examine the patient. Not ABCD (Rothwell 2005) and not ABCD3-I.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Age ≥60 scores 1; 59 scores 0.","required":true,"example":"55"},{"in":"query","name":"systolic_mm_hg","type":"number","description":"Cuff systolic blood pressure in mm Hg (50-250). ≥140 scores 1.","required":true,"example":"120"},{"in":"query","name":"diastolic_mm_hg","type":"number","description":"Cuff diastolic blood pressure in mm Hg (20-160). Must be less than systolic. ≥90 scores 1.","required":true,"example":"80"},{"in":"query","name":"clinical_features","type":"string","description":"Caller-assigned TIA features. none scores 0; speech_without_weakness scores 1; unilateral_weakness scores 2. Mutually exclusive. magent does not examine the patient.","required":true,"example":"none"},{"in":"query","name":"duration_min","type":"integer","description":"Symptom duration in minutes (integer 0-1440). Under 10 scores 0; 10-59 scores 1; 60 or more scores 2.","required":true,"example":"5"},{"in":"query","name":"diabetes","type":"boolean","description":"Diabetes mellitus. true scores 1; false scores 0.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_systolic_bp","message":"systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.","status":400},{"code":"invalid_diastolic_bp","message":"diastolic_mm_hg must be a number from 20 to 160. Returned before settlement; you are not charged.","status":400},{"code":"invalid_pulse_pressure","message":"diastolic_mm_hg must be less than systolic_mm_hg. Returned before settlement; you are not charged.","status":400},{"code":"invalid_abcd2_clinical","message":"clinical_features must be none, speech_without_weakness, or unilateral_weakness. Returned before settlement; you are not charged.","status":400},{"code":"invalid_duration_min","message":"duration_min must be an integer from 0 to 1440. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/abcd2","citation":{"authors":"Johnston SC, Rothwell PM, Nguyen-Huynh MN, et al.","doi":"10.1016/S0140-6736(07)60150-0","id":"johnston-2007","source":"Lancet. 2007;369(9558):283-292","title":"Validation and refinement of scores to predict very early stroke risk after transient ischaemic attack","url":"https://doi.org/10.1016/S0140-6736(07)60150-0"},"formula_expression":"ABCD2 = age_ge_60 + blood_pressure + clinical_features + duration + diabetes; age >=60 1; SBP >=140 or DBP >=90 1; none 0 / speech_without_weakness 1 / unilateral_weakness 2; duration <10 0, 10-59 1, >=60 2; diabetes 1; bands 0-3 / 4-5 / 6-7; max 7","purpose":"Compute the ABCD2 score as age, blood pressure, caller-assigned clinical features, symptom duration, and diabetes.","markdown_url":"https://magentlab.com/docs/abcd2.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"abcd2"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Total points 0-7"},{"name":"max_score","type":"integer","description":"Always 7"},{"name":"abcd2_band","type":"string","description":"0-3, 4-5, or 6-7 (Johnston 2007)"},{"name":"age_years","type":"integer","description":"Age used for the ≥60 criterion"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Johnston 2007 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"55","clinical_features":"none","diabetes":"false","diastolic_mm_hg":"80","duration_min":"5","systolic_mm_hg":"120"},{"age":"55","clinical_features":"none","diabetes":"false","diastolic_mm_hg":"80","duration_min":"5","systolic_mm_hg":"120"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/abcd2","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/abcd2?age=55&systolic_mm_hg=120&diastolic_mm_hg=80&clinical_features=none&duration_min=5&diabetes=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/abcd2","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/ascod","description":"Amarenco 2013 ASCOD phenotyping of ischemic stroke from caller-assigned grades. A atherosclerosis, S small-vessel disease, C cardiac pathology, O other causes, D dissection. Each grade is 1 potentially causal, 2 causality uncertain, 3 unlikely causal but disease present, 0 absent, or 9 insufficient workup. Returns A1-S0-C2-O0-D0 style phenotype, not a summed score. magent does not read imaging. Not TOAST. Not CCS. Not a treatment. Not a medical device.","parameters":[{"in":"query","name":"atherosclerosis","type":"integer","enum":[0,1,2,3,9],"description":"Caller-assigned Amarenco 2013 atherosclerosis (A) grade: 1 potentially causal, 2 causality uncertain, 3 unlikely causal but the disease is present, 0 absence of disease, or 9 insufficient workup. magent does not read imaging.","required":true,"example":"0"},{"in":"query","name":"small_vessel","type":"integer","enum":[0,1,2,3,9],"description":"Caller-assigned Amarenco 2013 small-vessel disease (S) grade: 1 potentially causal, 2 causality uncertain, 3 unlikely causal but the disease is present, 0 absence of disease, or 9 insufficient workup. magent does not read imaging.","required":true,"example":"0"},{"in":"query","name":"cardiac","type":"integer","enum":[0,1,2,3,9],"description":"Caller-assigned Amarenco 2013 cardiac pathology (C) grade: 1 potentially causal, 2 causality uncertain, 3 unlikely causal but the disease is present, 0 absence of disease, or 9 insufficient workup. magent does not read imaging.","required":true,"example":"0"},{"in":"query","name":"other","type":"integer","enum":[0,1,2,3,9],"description":"Caller-assigned Amarenco 2013 other causes (O) grade: 1 potentially causal, 2 causality uncertain, 3 unlikely causal but the disease is present, 0 absence of disease, or 9 insufficient workup. magent does not read imaging.","required":true,"example":"0"},{"in":"query","name":"dissection","type":"integer","enum":[0,1,2,3,9],"description":"Caller-assigned Amarenco 2013 dissection (D) grade: 1 potentially causal, 2 causality uncertain, 3 unlikely causal but the disease is present, 0 absence of disease, or 9 insufficient workup. magent does not read imaging.","required":true,"example":"0"}],"errors":[{"code":"invalid_ascod","message":"ASCOD needs Amarenco 2013 grades 0-3 (or 9 insufficient) for A, S, C, O, and D. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/ascod","citation":{"authors":"Amarenco P, Bogousslavsky J, Caplan LR, Donnan GA, Wolf ME, Hennerici MG","doi":"10.1159/000352050","id":"amarenco-2013","pmid":"23899749","source":"Cerebrovasc Dis. 2013;36(1):1-5","title":"The ASCOD phenotyping of ischemic stroke (Updated ASCO Phenotyping)","url":"https://doi.org/10.1159/000352050"},"formula_expression":"ASCOD phenotype A{atherosclerosis}-S{small_vessel}-C{cardiac}-O{other}-D{dissection}; each caller-assigned Amarenco 2013 grade is 1 potentially causal, 2 causality uncertain, 3 unlikely causal but the disease is present, 0 absence of disease, or 9 insufficient workup to rule out the disease; grades are independent and are not summed; not TOAST; not CCS; magent does not read imaging","purpose":"Echo caller-assigned Amarenco 2013 ASCOD grades for atherosclerosis (A), small-vessel disease (S), cardiac pathology (C), other causes (O), and dissection (D) and return the canonical phenotype string (for example A1-S0-C2-O0-D0). magent does not read imaging and does not convert the five grades into a single ASCOD score.","markdown_url":"https://magentlab.com/docs/ascod.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"ascod"},{"name":"formula_expression","type":"string","description":"Published Amarenco 2013 ASCOD phenotype rule"},{"name":"phenotype","type":"string","description":"Canonical A{grade}-S{grade}-C{grade}-O{grade}-D{grade} string"},{"name":"atherosclerosis","type":"integer","description":"Caller-assigned atherosclerosis (A) grade 0, 1, 2, 3, or 9"},{"name":"small_vessel","type":"integer","description":"Caller-assigned small-vessel disease (S) grade 0, 1, 2, 3, or 9"},{"name":"cardiac","type":"integer","description":"Caller-assigned cardiac pathology (C) grade 0, 1, 2, 3, or 9"},{"name":"other","type":"integer","description":"Caller-assigned other causes (O) grade 0, 1, 2, 3, or 9"},{"name":"dissection","type":"integer","description":"Caller-assigned dissection (D) grade 0, 1, 2, 3, or 9"},{"name":"components","type":"array","description":"Per-phenotype Tree rows atherosclerosis, small_vessel, cardiac, other, dissection with factor, met, and value"},{"name":"citation","type":"object","description":"Amarenco 2013 Cerebrovasc Dis citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"atherosclerosis":"0","cardiac":"0","dissection":"0","other":"0","small_vessel":"0"},{"atherosclerosis":"0","cardiac":"0","dissection":"0","other":"0","small_vessel":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/ascod","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/ascod?atherosclerosis=0&small_vessel=0&cardiac=0&other=0&dissection=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/ascod","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/canadian-tia","description":"Perry 2021 Canadian TIA Score (Table 1) for 7-day stroke or carotid revascularization after TIA. Clinical: first TIA 2, symptoms >=10 min 2, past carotid stenosis 2, antiplatelet 3, gait 1, unilateral weakness 1, vertigo -3, diastolic >=110 3, dysarthria/aphasia 1. Investigations: AF on ECG 2, infarct on CT 1, platelets >=400 2, glucose >=15 mmol/L 3. Age required, 0 points. Total -3 to 23. Bands <=3 low (0.5%), 4-8 medium (2.3%), >=9 high (5.9%). Not ABCD2. Not a diagnosis or admit order.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Required for the adult ED cohort. Does not add points (Perry 2021 Table 1 has no age item).","required":true,"example":"70"},{"in":"query","name":"first_tia","type":"boolean","description":"Lifetime first TIA (Perry 2021 Table 1). true scores 2; false scores 0. Caller-assigned; magent does not take a history.","required":true,"example":"false"},{"in":"query","name":"symptoms_ge_10_min","type":"boolean","description":"Symptoms lasting 10 minutes or longer (Perry 2021 Table 1). true scores 2; false scores 0. magent does not time the episode.","required":true,"example":"false"},{"in":"query","name":"carotid_stenosis","type":"boolean","description":"Past history of carotid stenosis (Perry 2021 Table 1). true scores 2; false scores 0. magent does not read imaging.","required":true,"example":"false"},{"in":"query","name":"on_antiplatelet","type":"boolean","description":"Already on antiplatelet therapy (Perry 2021 Table 1). true scores 3; false scores 0.","required":true,"example":"false"},{"in":"query","name":"gait_disturbance","type":"boolean","description":"Gait disturbance (Perry 2021 Table 1). true scores 1; false scores 0. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"unilateral_weakness","type":"boolean","description":"Unilateral weakness (Perry 2021 Table 1). true scores 1; false scores 0. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"vertigo","type":"boolean","description":"Vertigo (Perry 2021 Table 1). true scores -3; false scores 0. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"diastolic_mm_hg","type":"number","description":"Initial triage diastolic blood pressure in mm Hg (20-160). ≥110 scores 3; 109 scores 0 (Perry 2021 Table 1).","required":true,"example":"80"},{"in":"query","name":"dysarthria_or_aphasia","type":"boolean","description":"Dysarthria or aphasia on history or examination (Perry 2021 Table 1). true scores 1; false scores 0. Not 3. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"af_on_ecg","type":"boolean","description":"Atrial fibrillation on ECG (Perry 2021 Table 1). true scores 2; false scores 0. magent does not read the ECG.","required":true,"example":"false"},{"in":"query","name":"infarct_on_ct","type":"boolean","description":"New or old infarction on CT (Perry 2021 Table 1). true scores 1; false scores 0. magent does not read the CT.","required":true,"example":"false"},{"in":"query","name":"platelets_10e9_l","type":"number","description":"Platelet count ×10^9/L (1-2000). ≥400 scores 2; 399 scores 0 (Perry 2021 Table 1).","required":true,"example":"200"},{"in":"query","name":"glucose_mmol_l","type":"number","description":"Glucose in mmol/L (2.8-55.5). Provide this or glucose_mg_dl, not both. ≥15.0 scores 3; 14.9 scores 0 (Perry 2021 Table 1).","required":false,"example":"5.0"},{"in":"query","name":"glucose_mg_dl","type":"number","description":"Glucose in mg/dL (50-1000). Converted as mmol/L = mg/dL / 18. Provide this or glucose_mmol_l, not both. ≥15 mmol/L after conversion scores 3.","required":false,"example":"90"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_diastolic_bp","message":"diastolic_mm_hg must be a number from 20 to 160. Returned before settlement; you are not charged.","status":400},{"code":"invalid_platelets","message":"platelets_10e9_l must be a number from 1 to 2000 Returned before settlement; you are not charged.","status":400},{"code":"invalid_glucose","message":"glucose_mg_dl (50-1000) or glucose_mmol_l (2.8-55.5) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/canadian-tia","citation":{"authors":"Perry JJ, Sivilotti MLA, Émond M, Stiell IG, Stotts G, Lee J, Worster A, Morris J, Cheung KW, Jin AY, Oczkowski WJ, Sahlas DJ, Murray HE, Mackey A, Verreault S, Camden MC, Yip S, Teal P, Gladstone DJ, Boulos MI, Chagnon N, Shouldice E, Atzema C, Slaoui T, Teitlebaum J, Abdulaziz K, Nemnom MJ, Wells GA, Sharma M","doi":"10.1136/bmj.n49","id":"perry-2021","pmid":"33541890","source":"BMJ. 2021;372:n49","title":"Prospective validation of Canadian TIA Score and comparison with ABCD2 and ABCD2i for subsequent stroke risk after transient ischaemic attack: multicentre prospective cohort study","url":"https://doi.org/10.1136/bmj.n49"},"formula_expression":"Canadian TIA Score = first_tia 2 + symptoms_ge_10_min 2 + carotid_stenosis 2 + on_antiplatelet 3 + gait_disturbance 1 + unilateral_weakness 1 + vertigo -3 + (diastolic_mm_hg >= 110) 3 + dysarthria_or_aphasia 1 + af_on_ecg 2 + infarct_on_ct 1 + (platelets_10e9_l >= 400) 2 + (glucose >= 15 mmol/L) 3; age 18-120 required, 0 points; total -3 to 23; tia_risk low <=3 (0.5%), medium 4-8 (2.3%), high >=9 (5.9%) 7-day stroke or carotid revascularization (Perry 2021 Table 1 / Table 4); max 23","purpose":"Compute the Perry 2021 Canadian TIA Score from caller-assigned clinical findings and investigations for subsequent 7-day stroke or carotid revascularization risk after TIA.","markdown_url":"https://magentlab.com/docs/canadian-tia.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"canadian_tia"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Canadian TIA Score total from -3 to 23"},{"name":"max_score","type":"integer","description":"Always 23"},{"name":"tia_risk","type":"string","description":"low (score ≤3, 0.5%), medium (4-8, 2.3%), or high (≥9, 5.9%) 7-day stroke or carotid revascularization observed risk (Perry 2021 Table 4)"},{"name":"age_years","type":"integer","description":"Age used for the adult clamp; not a Table 1 point item"},{"name":"diastolic_mm_hg","type":"number","description":"Initial triage diastolic blood pressure used for the ≥110 item"},{"name":"platelets_10e9_l","type":"number","description":"Platelet count used for the ≥400 item (×10^9/L)"},{"name":"glucose_mmol_l","type":"number","description":"Glucose in mmol/L (mg/dL inputs converted /18) used for the ≥15 item"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Perry 2021 BMJ citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"af_on_ecg":"false","age":"70","carotid_stenosis":"false","diastolic_mm_hg":"80","dysarthria_or_aphasia":"false","first_tia":"false","gait_disturbance":"false","glucose_mmol_l":"5.0","infarct_on_ct":"false","on_antiplatelet":"false","platelets_10e9_l":"200","symptoms_ge_10_min":"false","unilateral_weakness":"false","vertigo":"false"},{"af_on_ecg":"false","age":"70","carotid_stenosis":"false","diastolic_mm_hg":"80","dysarthria_or_aphasia":"false","first_tia":"false","gait_disturbance":"false","glucose_mmol_l":"5.0","infarct_on_ct":"false","on_antiplatelet":"false","platelets_10e9_l":"200","symptoms_ge_10_min":"false","unilateral_weakness":"false","vertigo":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/canadian-tia","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/canadian-tia?age=70&first_tia=false&symptoms_ge_10_min=false&carotid_stenosis=false&on_antiplatelet=false&gait_disturbance=false&unilateral_weakness=false&vertigo=false&diastolic_mm_hg=80&dysarthria_or_aphasia=false&af_on_ecg=false&infarct_on_ct=false&platelets_10e9_l=200&glucose_mmol_l=5.0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/canadian-tia","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/ich-score","description":"Hemphill 2001 ICH Score from caller-assigned GCS, age, infratentorial origin, ICH volume (mL), and IVH; max 6. GCS 3-4 scores 2, 5-12 scores 1, 13-15 scores 0; age ≥80, volume ≥30 mL, infratentorial origin, and IVH score 1 each. Deterministic published score with citation; not a diagnosis or withdrawal-of-care protocol. magent does not read CT. Not FUNC and not ICH-GS.","parameters":[{"in":"query","name":"gcs","type":"integer","description":"Caller-assigned GCS total (integer 3-15). 3-4 scores 2; 5-12 scores 1; 13-15 scores 0. magent does not compute GCS from eye, verbal, and motor here.","required":true,"example":"15"},{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). ≥80 scores 1; 79 does not.","required":true,"example":"70"},{"in":"query","name":"infratentorial_origin","type":"boolean","description":"Infratentorial origin of the hemorrhage as assigned by the caller. true or false. 1 point if true. magent does not read a CT scan.","required":true,"example":"false"},{"in":"query","name":"ich_volume_ml","type":"number","description":"ICH volume in mL (cm^3 in Hemphill 2001). Number from 0.1 to 300. ≥30 scores 1; 29.9 does not. magent does not measure volume from imaging.","required":true,"example":"10"},{"in":"query","name":"ivh","type":"boolean","description":"Intraventricular hemorrhage as assigned by the caller. true or false. 1 point if true. magent does not read a CT scan.","required":true,"example":"false"}],"errors":[{"code":"invalid_gcs_total","message":"gcs must be an integer from 3 to 15. Returned before settlement; you are not charged.","status":400},{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_ich_volume","message":"ich_volume_ml must be a number from 0.1 to 300. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/ich-score","citation":{"authors":"Hemphill JC 3rd, Bonovich DC, Besmertis L, Manley GT, Johnston SC","doi":"10.1161/01.STR.32.4.891","id":"hemphill-2001","source":"Stroke. 2001;32(4):891-897","title":"The ICH score: a simple, reliable grading scale for intracerebral hemorrhage","url":"https://doi.org/10.1161/01.STR.32.4.891"},"formula_expression":"ICH Score = gcs + age_ge_80 + infratentorial_origin + ich_volume_ge_30_ml + ivh; GCS 3-4 → 2, 5-12 → 1, 13-15 → 0; age >=80 1; infratentorial origin 1; volume >=30 mL 1; IVH 1; max 6","purpose":"Compute the Hemphill 2001 ICH Score from caller-assigned GCS, age, infratentorial origin, ICH volume, and IVH.","markdown_url":"https://magentlab.com/docs/ich-score.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"ich_score"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Total points 0-6"},{"name":"max_score","type":"integer","description":"Always 6"},{"name":"gcs","type":"integer","description":"Caller-assigned GCS total used for the 3-4 / 5-12 / 13-15 bands"},{"name":"age_years","type":"integer","description":"Age used for the ≥80 criterion"},{"name":"ich_volume_ml","type":"number","description":"ICH volume in mL used for the ≥30 criterion"},{"name":"components","type":"array","description":"Per-item points"},{"name":"citation","type":"object","description":"Hemphill 2001 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"70","gcs":"15","ich_volume_ml":"10","infratentorial_origin":"false","ivh":"false"},{"age":"70","gcs":"15","ich_volume_ml":"10","infratentorial_origin":"false","ivh":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/ich-score","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/ich-score?gcs=15&age=70&infratentorial_origin=false&ich_volume_ml=10&ivh=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/ich-score","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/sich","description":"Cucchiara 2008 sICH after rtPA for ischemic stroke. Four caller-assigned 1-point flags: age >60, baseline NIHSS >10, baseline glucose >150 mg/dL (8.325 mmol/L), platelets <150,000/mm3. Total 0-4. Any ICH 2.6/9.7/15.1/37.9% for scores 0/1/2/>=3 (scores 3 and 4 share 37.9). magent does not assay glucose or platelets or compute NIHSS. Not a tPA order and not a hemorrhage diagnosis.","parameters":[{"in":"query","name":"age_gt_60","type":"boolean","description":"Age >60 years as assigned by the caller (Cucchiara 2008). true or false. magent does not assign age from a numeric value.","required":true,"example":"false"},{"in":"query","name":"nihss_gt_10","type":"boolean","description":"Baseline NIHSS >10 as assigned by the caller (Cucchiara 2008). true or false. magent does not compute NIHSS or examine the patient.","required":true,"example":"false"},{"in":"query","name":"glucose_gt_150","type":"boolean","description":"Baseline glucose >150 mg/dL (8.325 mmol/L) as assigned by the caller (Cucchiara 2008). true or false. magent does not assay glucose or convert units.","required":true,"example":"false"},{"in":"query","name":"platelets_lt_150k","type":"boolean","description":"Baseline platelet count <150,000/mm3 as assigned by the caller (Cucchiara 2008). true or false. magent does not assay platelets.","required":true,"example":"false"}],"errors":[{"code":"invalid_sich","message":"sICH score inputs must match Cucchiara 2008 age, NIHSS, glucose, and platelet flags from that paper. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/sich","citation":{"authors":"Cucchiara B, Tanne D, Levine SR, Demchuk AM, Kasner SE","doi":"10.1016/j.jstrokecerebrovasdis.2008.03.012","id":"cucchiara-2008","pmid":"18984422","source":"J Stroke Cerebrovasc Dis. 2008;17(6):331-333","title":"A risk score to predict intracranial hemorrhage after recombinant tissue plasminogen activator for acute ischemic stroke","url":"https://doi.org/10.1016/j.jstrokecerebrovasdis.2008.03.012"},"formula_expression":"sICH = age_gt_60 + nihss_gt_10 + glucose_gt_150 + platelets_lt_150k; each 1; Cucchiara 2008; max 4; any ICH 2.6/9.7/15.1/37.9% for scores 0/1/2/>=3; caller-assigned flags; magent does not assay glucose or platelets or compute NIHSS","purpose":"Sum the four Cucchiara 2008 sICH flags and return the 0-4 total plus that paper's any-ICH percents (2.6/9.7/15.1/37.9% for scores 0/1/2/>=3).","markdown_url":"https://magentlab.com/docs/sich.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"sich"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"sICH points 0-4"},{"name":"max_score","type":"integer","description":"Always 4"},{"name":"any_ich_percent","type":"number","description":"Cucchiara 2008 any-ICH percent: 2.6 (0), 9.7 (1), 15.1 (2), 37.9 (>=3). Scores 3 and 4 both 37.9."},{"name":"age_gt_60","type":"boolean","description":"Whether age >60 years was assigned"},{"name":"nihss_gt_10","type":"boolean","description":"Whether baseline NIHSS >10 was assigned"},{"name":"glucose_gt_150","type":"boolean","description":"Whether baseline glucose >150 mg/dL was assigned"},{"name":"platelets_lt_150k","type":"boolean","description":"Whether baseline platelets <150,000/mm3 were assigned"},{"name":"components","type":"array","description":"Per-factor Cucchiara 2008 points"},{"name":"citation","type":"object","description":"Cucchiara 2008 J Stroke Cerebrovasc Dis citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age_gt_60":"false","glucose_gt_150":"false","nihss_gt_10":"false","platelets_lt_150k":"false"},{"age_gt_60":"false","glucose_gt_150":"false","nihss_gt_10":"false","platelets_lt_150k":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/sich","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/sich?age_gt_60=false&nihss_gt_10=false&glucose_gt_150=false&platelets_lt_150k=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/sich","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/func-score","description":"Rost 2008 FUNC score (0-11) after primary ICH from caller-assigned volume, age, location (lobar/deep/infratentorial), GCS, and pre-ICH cognitive impairment. Volume <30 mL scores 4, 30-60 scores 2, >60 scores 0; age <70 scores 2, 70-79 scores 1, >=80 scores 0; lobar 2, deep 1, infratentorial 0; GCS >=9 scores 2, <=8 scores 0; cognitive impairment absent scores 1. Companion to the Hemphill ICH Score, not a replacement. Not a diagnosis or withdrawal-of-care protocol. magent does not read CT.","parameters":[{"in":"query","name":"ich_volume_ml","type":"number","description":"ICH volume in mL (cm^3 in Rost 2008). Number from 0.1 to 300. <30 scores 4; 30-60 scores 2; >60 scores 0. magent does not measure volume from imaging.","required":true,"example":"15"},{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). <70 scores 2; 70-79 scores 1; ≥80 scores 0.","required":true,"example":"60"},{"in":"query","name":"location","type":"string","description":"ICH location as assigned by the caller: lobar (2), deep (1), or infratentorial (0). magent does not read a CT scan.","required":true,"example":"lobar"},{"in":"query","name":"gcs","type":"integer","description":"Caller-assigned GCS total (integer 3-15). ≥9 scores 2; ≤8 scores 0. magent does not compute GCS from eye, verbal, and motor here.","required":true,"example":"14"},{"in":"query","name":"pre_ich_cognitive_impairment","type":"boolean","description":"Pre-ICH cognitive impairment as assigned by the caller. true or false. Absent (false) scores 1; present (true) scores 0.","required":true,"example":"false"}],"errors":[{"code":"invalid_ich_volume","message":"ich_volume_ml must be a number from 0.1 to 300. Returned before settlement; you are not charged.","status":400},{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_func_location","message":"location must be lobar, deep, or infratentorial (Rost 2008). Returned before settlement; you are not charged.","status":400},{"code":"invalid_gcs_total","message":"gcs must be an integer from 3 to 15. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/func-score","citation":{"authors":"Rost NS, Smith EE, Chang Y, et al.","doi":"10.1161/STROKEAHA.107.512202","id":"rost-2008","pmid":"18556582","source":"Stroke. 2008;39(8):2304-2309","title":"Prediction of functional outcome in patients with primary intracerebral hemorrhage: the FUNC score","url":"https://doi.org/10.1161/STROKEAHA.107.512202"},"formula_expression":"FUNC = ich_volume + age + location + gcs + pre_ich_cognitive_impairment; volume <30 → 4, 30-60 → 2, >60 → 0; age <70 → 2, 70-79 → 1, >=80 → 0; lobar 2, deep 1, infratentorial 0; GCS >=9 → 2, <=8 → 0; pre-ICH cognitive impairment absent 1, present 0; max 11","purpose":"Compute the Rost 2008 FUNC score from caller-assigned ICH volume, age, location, GCS, and pre-ICH cognitive impairment.","markdown_url":"https://magentlab.com/docs/func-score.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"func_score"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Total points 0-11"},{"name":"max_score","type":"integer","description":"Always 11"},{"name":"func_band","type":"string","description":"Rost 2008 band: 0-4, 5-7, 8, 9-10, or 11"},{"name":"gcs","type":"integer","description":"Caller-assigned GCS total used for the ≥9 / ≤8 split"},{"name":"age_years","type":"integer","description":"Age used for the <70 / 70-79 / ≥80 bands"},{"name":"ich_volume_ml","type":"number","description":"ICH volume in mL used for the <30 / 30-60 / >60 bands"},{"name":"location","type":"string","description":"Caller-assigned location: lobar, deep, or infratentorial"},{"name":"pre_ich_cognitive_impairment","type":"boolean","description":"Caller-assigned pre-ICH cognitive impairment flag"},{"name":"components","type":"array","description":"Per-item points"},{"name":"citation","type":"object","description":"Rost 2008 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"60","gcs":"14","ich_volume_ml":"15","location":"lobar","pre_ich_cognitive_impairment":"false"},{"age":"60","gcs":"14","ich_volume_ml":"15","location":"lobar","pre_ich_cognitive_impairment":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/func-score","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/func-score?ich_volume_ml=15&age=60&location=lobar&gcs=14&pre_ich_cognitive_impairment=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/func-score","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/modified-rankin","description":"Modified Rankin handicap grade 0-5 (van Swieten 1988) as assigned by the caller. Returns the published wording (no symptoms at all through severe disability: bedridden, incontinent, constant nursing). This 1988 scale has six grades 0-5 and does not include a dead grade. Not a diagnosis or discharge/disability-benefit protocol; magent does not interview the patient.","parameters":[{"in":"query","name":"mrs","type":"integer","description":"van Swieten 1988 modified Rankin handicap grade 0-5 as assigned by the caller (0 no symptoms at all; 1 no significant disability despite symptoms; 2 slight disability; 3 moderate disability, walks unaided; 4 moderately severe, unable to walk unaided; 5 severe, bedridden, incontinent, constant nursing). magent does not interview the patient.","required":true,"example":"0"}],"errors":[{"code":"invalid_mrs","message":"mrs must be an integer from 0 to 5 (van Swieten 1988 grades). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/modified-rankin","citation":{"authors":"van Swieten JC, Koudstaal PJ, Visser MC, Schouten HJ, van Gijn J","doi":"10.1161/01.STR.19.5.604","id":"van-swieten-1988","pmid":"3363593","source":"Stroke. 1988;19(5):604-607","title":"Interobserver agreement for the assessment of handicap in stroke patients","url":"https://doi.org/10.1161/01.STR.19.5.604"},"formula_expression":"modified Rankin 0-5 as assigned by the caller; van Swieten 1988 six grades (no dead grade)","purpose":"Return the van Swieten 1988 modified Rankin handicap grade 0-5 from a caller-assigned integer, with the published grade wording.","markdown_url":"https://magentlab.com/docs/modified-rankin.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"modified_rankin"},{"name":"formula_expression","type":"string","description":"Published grade rule"},{"name":"mrs","type":"integer","description":"Caller-assigned modified Rankin grade 0-5"},{"name":"score","type":"integer","description":"Same as mrs"},{"name":"max_score","type":"integer","description":"5"},{"name":"grade","type":"string","description":"van Swieten 1988 wording for that grade"},{"name":"components","type":"array","description":"mrs component"},{"name":"citation","type":"object","description":"van Swieten 1988"},{"name":"disclaimer","type":"string","description":"Not a medical device"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"mrs":"0"},{"mrs":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/modified-rankin","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/modified-rankin?mrs=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/modified-rankin","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/tdn-grade","description":"Terrapon 2021 Therapy-Disability-Neurology (TDN) grade. Caller assigns therapy t1-t5, modified Rankin 0-6 (6 is death), and new neurologic deficit. Overall grade is max(T, D, N); t5 or mRS 6 is always 5. D maps mRS 0-1→1, 2-3→2, 4→3, 5→4, 6→5; new deficit is N=2 else N=1. Not a diagnosis and not Clavien-Dindo alone. magent does not grade the event.","parameters":[{"in":"query","name":"therapy","type":"string","enum":["t1","t2","t3","t4","t5"],"description":"Terrapon 2021 Therapy dimension as assigned by the caller. t1 no treatment or intervention beyond antiemetics, antipyretics, analgesics, diuretics, electrolytes, physiotherapy, or bedside wound opening (T=1). t2 pharmacologic treatment including blood transfusion or TPN (T=2). t3 invasive procedure, surgical, endoscopic, or radiologic (T=3). t4 life-threatening, ICU management (T=4). t5 death (T=5). magent does not grade the adverse event.","required":true,"example":"t1"},{"in":"query","name":"disability_mrs","type":"integer","description":"Modified Rankin 0-6 as assigned by the caller, including death as 6. Maps to Disability D: 0-1→1, 2-3→2, 4→3, 5→4, 6→5. This is not van Swieten 1988 modified Rankin 0-5, which omits death. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"new_neurologic_deficit","type":"boolean","description":"New neurologic deficit as assigned by the caller (Terrapon 2021 Neurology dimension). true or false. false is N=1; true is N=2. magent does not examine the patient.","required":true,"example":"false"}],"errors":[{"code":"invalid_tdn_therapy","message":"therapy must be t1, t2, t3, t4, or t5 (Terrapon 2021 Therapy dimension). Returned before settlement; you are not charged.","status":400},{"code":"invalid_tdn_mrs","message":"disability_mrs must be an integer from 0 to 6 (Terrapon 2021 mRS; 6 is death). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/tdn-grade","citation":{"authors":"Terrapon APR, Zattra CM, Voglis S, et al.","doi":"10.1093/neuros/nyab121","id":"terrapon-2021","pmid":"33887774","source":"Neurosurgery. 2021;89(2):236-245","title":"Adverse Events in Neurosurgery: The Novel Therapy-Disability-Neurology Grade","url":"https://doi.org/10.1093/neuros/nyab121"},"formula_expression":"tdn_grade = max(T, D, N); T is therapy t1-t5 (t1 no treatment beyond antiemetics, antipyretics, analgesics, diuretics, electrolytes, physiotherapy, bedside wound opening; t2 pharmacologic including transfusion or TPN; t3 invasive procedure; t4 life-threatening ICU; t5 death); D maps disability_mrs 0-1→1, 2-3→2, 4→3, 5→4, 6→5; N is 2 if new_neurologic_deficit else 1; if therapy is t5 or disability_mrs is 6, tdn_grade is 5 (Terrapon 2021)","purpose":"Apply the Terrapon 2021 Therapy-Disability-Neurology grade and return tdn_grade 1-5 as the maximum of caller-assigned therapy, mapped mRS disability, and new-deficit neurology grades.","markdown_url":"https://magentlab.com/docs/tdn-grade.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"tdn_grade"},{"name":"formula_expression","type":"string","description":"Published Terrapon 2021 max(T, D, N) rule"},{"name":"tdn_grade","type":"integer","description":"Overall TDN grade 1-5, the maximum of therapy, disability, and neurology grades. Always 5 when therapy is t5 or disability_mrs is 6. Not a diagnosis."},{"name":"therapy_grade","type":"integer","description":"Therapy dimension T 1-5 from caller-assigned t1-t5"},{"name":"disability_grade","type":"integer","description":"Disability dimension D 1-5 from caller-assigned mRS 0-6"},{"name":"neurology_grade","type":"integer","description":"Neurology dimension N 1 without a new deficit, 2 with a new deficit"},{"name":"criteria","type":"array","description":"Per-dimension Tree rows for therapy, disability, and neurology with factor, met (true when that dimension equals tdn_grade), and value"},{"name":"citation","type":"object","description":"Terrapon 2021 Neurosurgery citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"disability_mrs":"0","new_neurologic_deficit":"false","therapy":"t1"},{"disability_mrs":"0","new_neurologic_deficit":"false","therapy":"t1"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/tdn-grade","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/tdn-grade?therapy=t1&disability_mrs=0&new_neurologic_deficit=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/tdn-grade","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rest-lgs","description":"Wolf 2024 REST-LGS: four major criteria (+3 each) and four minor (+1 each). Max 16. likely if score > 11, possible if 8-11, unlikely if < 8. Caller-assigned flags only; magent does not read EEG. Screening, not a diagnosis of Lennox-Gastaut syndrome. Not the 2019 CRF count threshold.","parameters":[{"in":"query","name":"two_or_more_seizure_types","type":"boolean","description":"Two or more seizure types (Wolf 2024 major, +3). true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"seizure_onset_before_12","type":"boolean","description":"Seizure onset at younger than 12 years of age (Wolf 2024 major, +3). Age 12 does not meet. true or false as assigned by the caller. magent does not take numeric age.","required":true,"example":"false"},{"in":"query","name":"slow_spike_wave","type":"boolean","description":"History of slow spike-wave (SSW, <2.5 Hz) on EEG (Wolf 2024 major, +3). true or false as assigned by the caller. magent does not read EEG.","required":true,"example":"false"},{"in":"query","name":"cognitive_impairment_since_childhood","type":"boolean","description":"Cognitive impairment since childhood (Wolf 2024 major, +3), which may include past or current learning difficulties, special education, autism, intellectual disabilities, or developmental delays. true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"persistent_seizures_despite_two_asms","type":"boolean","description":"Persistent seizures despite a trial of two or more antiseizure medications (Wolf 2024 minor, +1). true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"vns_keto_or_surgery","type":"boolean","description":"History of vagal nerve stimulation, ketogenic diet therapy, or epilepsy surgery (Wolf 2024 minor, +1). true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"helmet_or_head_face_injury","type":"boolean","description":"Evidence of seizure-related helmet use or head/face injury (Wolf 2024 minor, +1). true or false as assigned by the caller.","required":true,"example":"false"},{"in":"query","name":"other_eeg_abnormalities","type":"boolean","description":"Other EEG abnormalities: multifocal spikes, symptomatic generalized discharges, generalized periods of attenuation of background/electrodecrement, or paroxysmal fast activity (Wolf 2024 minor, +1). true or false as assigned by the caller. magent does not read EEG.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rest-lgs","citation":{"authors":"Wolf SM, Boyce D, Peña P, Piña-Garza JE, Roland JJ, Thomas B, Zogejani D, McGoldrick PE","doi":"10.1002/epi4.12952","id":"wolf-2024","pmid":"38726917","source":"Epilepsia Open. 2024;9(4):1277-1286","title":"Real-world use of the updated refractory epilepsy screening tool for Lennox-Gastaut syndrome","url":"https://doi.org/10.1002/epi4.12952"},"formula_expression":"REST-LGS = 3*two_or_more_seizure_types + 3*seizure_onset_before_12 + 3*slow_spike_wave + 3*cognitive_impairment_since_childhood + persistent_seizures_despite_two_asms + vns_keto_or_surgery + helmet_or_head_face_injury + other_eeg_abnormalities; each major 3, each minor 1; max 16; likely if score > 11; possible if 8-11; unlikely if score < 8 (Wolf 2024)","purpose":"Sum Wolf 2024 REST-LGS major (+3) and minor (+1) caller-assigned flags and return the unlikely, possible, or likely LGS screening band.","markdown_url":"https://magentlab.com/docs/rest-lgs.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rest_lgs"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Wolf 2024 REST-LGS points 0-16 (major +3, minor +1)"},{"name":"max_score","type":"integer","description":"16"},{"name":"lgs_screen","type":"string","description":"Wolf 2024 screening band: likely if score > 11 (12-16), possible if 8-11, unlikely if score < 8 (0-7). Not a diagnosis."},{"name":"major_count","type":"integer","description":"Count of true major criteria (two_or_more_seizure_types, seizure_onset_before_12, slow_spike_wave, cognitive_impairment_since_childhood); 0-4"},{"name":"minor_count","type":"integer","description":"Count of true minor criteria (persistent_seizures_despite_two_asms, vns_keto_or_surgery, helmet_or_head_face_injury, other_eeg_abnormalities); 0-4"},{"name":"components","type":"array","description":"Per-item points"},{"name":"citation","type":"object","description":"Wolf et al. Epilepsia Open 2024 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"cognitive_impairment_since_childhood":"false","helmet_or_head_face_injury":"false","other_eeg_abnormalities":"false","persistent_seizures_despite_two_asms":"false","seizure_onset_before_12":"false","slow_spike_wave":"false","two_or_more_seizure_types":"false","vns_keto_or_surgery":"false"},{"cognitive_impairment_since_childhood":"false","helmet_or_head_face_injury":"false","other_eeg_abnormalities":"false","persistent_seizures_despite_two_asms":"false","seizure_onset_before_12":"false","slow_spike_wave":"false","two_or_more_seizure_types":"false","vns_keto_or_surgery":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rest-lgs","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rest-lgs?two_or_more_seizure_types=false&seizure_onset_before_12=false&slow_spike_wave=false&cognitive_impairment_since_childhood=false&persistent_seizures_despite_two_asms=false&vns_keto_or_surgery=false&helmet_or_head_face_injury=false&other_eeg_abnormalities=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rest-lgs","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/barthel","description":"Mahoney 1965 Barthel Index: ten caller-assigned activity points (feeding, bathing, grooming, dressing, bowels, bladder, toilet, transfers, mobility, stairs) using that paper's 0/5, 0/5/10, or 0/5/10/15 values. magent sums only (max 100 in fives) and does not observe the patient. Not the Collin 0-20 Barthel and not a disability rating or placement decision.","parameters":[{"in":"query","name":"feeding","type":"integer","description":"Caller-assigned Mahoney 1965 Barthel feeding points (integer 0, 5, or 10): 0 unable; 5 needs help; 10 independent. magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"bathing","type":"integer","description":"Caller-assigned Mahoney 1965 Barthel bathing points (integer 0 or 5): 0 dependent; 5 independent. magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"grooming","type":"integer","description":"Caller-assigned Mahoney 1965 Barthel grooming points (integer 0 or 5): 0 needs help; 5 independent. magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"dressing","type":"integer","description":"Caller-assigned Mahoney 1965 Barthel dressing points (integer 0, 5, or 10): 0 dependent; 5 needs help; 10 independent. magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"bowels","type":"integer","description":"Caller-assigned Mahoney 1965 Barthel bowels points (integer 0, 5, or 10): 0 incontinent; 5 occasional accident; 10 continent. magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"bladder","type":"integer","description":"Caller-assigned Mahoney 1965 Barthel bladder points (integer 0, 5, or 10): 0 incontinent or catheterized; 5 occasional accident; 10 continent. magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"toilet","type":"integer","description":"Caller-assigned Mahoney 1965 Barthel toilet points (integer 0, 5, or 10): 0 dependent; 5 needs help; 10 independent. magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"transfers","type":"integer","description":"Caller-assigned Mahoney 1965 Barthel transfers points (integer 0, 5, 10, or 15): 0 unable; 5 major help; 10 minor help; 15 independent. magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"mobility","type":"integer","description":"Caller-assigned Mahoney 1965 Barthel mobility points (integer 0, 5, 10, or 15): 0 immobile; 5 wheelchair independent; 10 walks with help; 15 independent. magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"stairs","type":"integer","description":"Caller-assigned Mahoney 1965 Barthel stairs points (integer 0, 5, or 10): 0 unable; 5 needs help; 10 independent. magent does not observe the patient.","required":true,"example":"0"}],"errors":[{"code":"invalid_barthel","message":"each Barthel 1965 item must be a published point value for that activity (0/5, 0/5/10, or 0/5/10/15). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/barthel","citation":{"authors":"Mahoney FI, Barthel DW","id":"mahoney-1965","pmid":"14258950","source":"Md State Med J. 1965;14:61-65","title":"Functional evaluation: the Barthel Index","url":"https://pubmed.ncbi.nlm.nih.gov/14258950"},"formula_expression":"Barthel Index = feeding + bathing + grooming + dressing + bowels + bladder + toilet + transfers + mobility + stairs; Mahoney 1965 caller-assigned points; 0-100 in fives; max 100","purpose":"Sum ten caller-assigned Mahoney 1965 Barthel Index item points and return the published 0-100 total.","markdown_url":"https://magentlab.com/docs/barthel.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"barthel"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Barthel Index points 0-100 in fives"},{"name":"max_score","type":"integer","description":"Always 100"},{"name":"components","type":"array","description":"Per-item caller-assigned points"},{"name":"citation","type":"object","description":"Mahoney and Barthel Md State Med J 1965 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"bathing":"0","bladder":"0","bowels":"0","dressing":"0","feeding":"0","grooming":"0","mobility":"0","stairs":"0","toilet":"0","transfers":"0"},{"bathing":"0","bladder":"0","bowels":"0","dressing":"0","feeding":"0","grooming":"0","mobility":"0","stairs":"0","toilet":"0","transfers":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/barthel","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/barthel?feeding=0&bathing=0&grooming=0&dressing=0&bowels=0&bladder=0&toilet=0&transfers=0&mobility=0&stairs=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/barthel","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/trunk-impairment","description":"Verheyden 2004 original Trunk Impairment Scale from caller-assigned static sitting balance 0-7, dynamic sitting balance 0-10, and coordination 0-6 (max 23). If static sitting balance is 0, the total is 0. magent does not examine sitting balance or copy the item list. Not TIS 2.0, not Fujiwara 2004, and not a severity band.","parameters":[{"in":"query","name":"static_sitting_balance","type":"integer","enum":[0,1,2,3,4,5,6,7],"description":"Caller-assigned Verheyden 2004 original TIS static sitting balance subscale (integer 0-7). magent does not examine sitting balance.","required":true,"example":"0"},{"in":"query","name":"dynamic_sitting_balance","type":"integer","enum":[0,1,2,3,4,5,6,7,8,9,10],"description":"Caller-assigned Verheyden 2004 original TIS dynamic sitting balance subscale (integer 0-10). magent does not examine sitting balance.","required":true,"example":"0"},{"in":"query","name":"coordination","type":"integer","enum":[0,1,2,3,4,5,6],"description":"Caller-assigned Verheyden 2004 original TIS coordination subscale (integer 0-6). magent does not examine sitting balance.","required":true,"example":"0"}],"errors":[{"code":"invalid_tis_subscale","message":"Trunk Impairment Scale needs static_sitting_balance 0-7, dynamic_sitting_balance 0-10, and coordination 0-6 (Verheyden 2004). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/trunk-impairment","citation":{"authors":"Verheyden G, Nieuwboer A, Mertin J, Preger R, Kiekens C, De Weerdt W","doi":"10.1191/0269215504cr733oa","id":"verheyden-2004","pmid":"15137564","source":"Clin Rehabil. 2004;18(3):326-334","title":"The Trunk Impairment Scale: a new tool to measure motor impairment of the trunk after stroke","url":"https://doi.org/10.1191/0269215504cr733oa"},"formula_expression":"TIS = static_sitting_balance + dynamic_sitting_balance + coordination when static_sitting_balance > 0, else 0; caller-assigned Verheyden 2004 original TIS subscales (static sitting balance 0-7, dynamic sitting balance 0-10, coordination 0-6); max 23; if static sitting balance is 0 the total is 0 even when the other subscales are nonzero; not TIS 2.0; not Fujiwara 2004; magent does not examine sitting balance; no published mild/moderate/severe cutoffs","purpose":"Sum caller-assigned Verheyden 2004 original Trunk Impairment Scale subscales (static sitting balance 0-7, dynamic sitting balance 0-10, coordination 0-6) to a 0-23 total. If static sitting balance is 0, the total is 0.","markdown_url":"https://magentlab.com/docs/trunk-impairment.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"tis"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Verheyden 2004 original TIS total 0-23; 0 when static_sitting_balance is 0"},{"name":"max_score","type":"integer","description":"Always 23"},{"name":"static_sitting_balance","type":"integer","description":"Caller-assigned static sitting balance 0-7 used"},{"name":"dynamic_sitting_balance","type":"integer","description":"Caller-assigned dynamic sitting balance 0-10 used"},{"name":"coordination","type":"integer","description":"Caller-assigned coordination 0-6 used"},{"name":"components","type":"array","description":"Per-subscale points; dynamic and coordination contribute 0 when static is 0"},{"name":"citation","type":"object","description":"Verheyden et al. Clin Rehabil 2004 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"coordination":"0","dynamic_sitting_balance":"0","static_sitting_balance":"0"},{"coordination":"0","dynamic_sitting_balance":"0","static_sitting_balance":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/trunk-impairment","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/trunk-impairment?static_sitting_balance=0&dynamic_sitting_balance=0&coordination=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/trunk-impairment","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/onls","description":"Graham 2006 ONLS: caller-assigned arm_scale 0-5 plus leg_scale 0-7. Sum 0-12. Score 0 is no limitations. Arm 5 or leg 7 is no purposeful movement of that region. Leg 0 requires walking, stairs, and running unaffected. Remaining grades match ODSS; this is not ODSS and not Adjusted ONLS. magent does not observe the patient. No published total-score severity bands. Not a diagnosis and not a medical device.","parameters":[{"in":"query","name":"arm_scale","type":"integer","enum":[0,1,2,3,4,5],"description":"Caller-assigned Graham 2006 ONLS arm scale (integer 0-5): 0 normal; 1 minor symptoms not affecting listed functions; 2 disability affecting but not preventing any listed function; 3 preventing at least one but not all listed functions; 4 both arms preventing all listed functions but purposeful movement still possible; 5 both arms preventing all purposeful movements. Listed functions: wash and brush hair, turn a key, use knife and fork (or spoon), do/undo buttons or zips, dress the upper body. magent does not observe the patient.","required":true,"example":"2"},{"in":"query","name":"leg_scale","type":"integer","enum":[0,1,2,3,4,5,6,7],"description":"Caller-assigned Graham 2006 ONLS leg scale (integer 0-7): 0 walking, climbing stairs, and running not affected; 1 walking/stairs/running affected but gait does not look abnormal; 2 walks independently but gait looks abnormal; 3 requires unilateral support to walk 10 metres; 4 requires bilateral support to walk 10 metres; 5 requires wheelchair to travel 10 metres but able to stand and walk 1 metre with help of one person; 6 restricted to wheelchair, unable to make any purposeful movement of the legs; 7 restricted to wheelchair or bed most of the day, unable to make any purposeful movements of the legs. magent does not observe the patient.","required":true,"example":"3"}],"errors":[{"code":"invalid_onls","message":"ONLS needs arm_scale 0-5 and leg_scale 0-7 as Graham 2006 integers. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/onls","citation":{"authors":"Graham RC, Hughes RAC","doi":"10.1136/jnnp.2005.081547","id":"graham-hughes-2006","pmid":"16574730","source":"J Neurol Neurosurg Psychiatry. 2006;77(8):973-976","title":"A modified peripheral neuropathy scale: the Overall Neuropathy Limitations Scale","url":"https://doi.org/10.1136/jnnp.2005.081547"},"formula_expression":"ONLS = arm_scale (integer 0-5) + leg_scale (integer 0-7); Graham 2006 modified ODSS; total 0-12; score 0 = no limitations (ceiling); arm 5 or leg 7 = no purposeful movement of that region; leg 0 requires walking, climbing stairs, and running not affected; remaining scoring criteria are not different from ODSS; magent does not observe the patient; no published total-score severity bands","purpose":"Sum Graham 2006 Overall Neuropathy Limitations Scale from caller-assigned arm_scale (0-5) and leg_scale (0-7) and return score 0-12. Does not apply unpublished total-score severity bands.","markdown_url":"https://magentlab.com/docs/onls.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"onls"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"arm_scale","type":"integer","description":"Caller-assigned Graham 2006 ONLS arm scale 0-5"},{"name":"leg_scale","type":"integer","description":"Caller-assigned Graham 2006 ONLS leg scale 0-7"},{"name":"score","type":"integer","description":"ONLS sum of caller-assigned arm_scale and leg_scale (0-12)"},{"name":"max_score","type":"integer","description":"Always 12"},{"name":"components","type":"array","description":"Per-scale caller-assigned points"},{"name":"citation","type":"object","description":"Graham and Hughes JNNP 2006 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"arm_scale":"2","leg_scale":"3"},{"arm_scale":"2","leg_scale":"3"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/onls","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/onls?arm_scale=2&leg_scale=3","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/onls","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/ndi","description":"Vernon 1991 Neck Disability Index: ten caller-assigned integers 0-5 (pain intensity, personal care, lifting, reading, headaches, concentration, work, driving, sleeping, recreation). Sum 0-50. Vernon 1991 raw-score bands 0-4 none, 5-14 mild, 15-24 moderate, 25-34 severe, >34 complete. Does not apply later 0-8%/10-28% website percentage bands or score Oswestry. magent does not interview. Not a diagnosis and not a medical device.","parameters":[{"in":"query","name":"pain_intensity","type":"integer","description":"Caller-assigned Vernon 1991 NDI pain intensity (integer 0-5): 0 no pain at the moment through 5 worst imaginable pain at the moment. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"personal_care","type":"integer","description":"Caller-assigned Vernon 1991 NDI personal care (washing, dressing) (integer 0-5): 0 looks after self normally without extra pain through 5 does not get dressed, washes with difficulty and stays in bed. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"lifting","type":"integer","description":"Caller-assigned Vernon 1991 NDI lifting (integer 0-5): 0 can lift heavy weights without extra pain through 5 cannot lift or carry anything. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"reading","type":"integer","description":"Caller-assigned Vernon 1991 NDI reading (integer 0-5): 0 can read as much as wanted with no neck pain through 5 cannot read at all. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"headaches","type":"integer","description":"Caller-assigned Vernon 1991 NDI headaches (integer 0-5): 0 no headaches through 5 headaches almost all the time. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"concentration","type":"integer","description":"Caller-assigned Vernon 1991 NDI concentration (integer 0-5): 0 can concentrate fully with no difficulty through 5 cannot concentrate at all. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"work","type":"integer","description":"Caller-assigned Vernon 1991 NDI work (integer 0-5): 0 can do as much work as wanted through 5 cannot do any work at all. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"driving","type":"integer","description":"Caller-assigned Vernon 1991 NDI driving (integer 0-5): 0 can drive without neck pain through 5 cannot drive at all. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"sleeping","type":"integer","description":"Caller-assigned Vernon 1991 NDI sleeping (integer 0-5): 0 no trouble sleeping through 5 sleep completely disturbed (5-7 hours sleepless). magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"recreation","type":"integer","description":"Caller-assigned Vernon 1991 NDI recreation (integer 0-5): 0 can engage in all recreation activities with no neck pain through 5 cannot do any recreation activities. magent does not interview the patient.","required":true,"example":"0"}],"errors":[{"code":"invalid_ndi","message":"NDI needs the ten Vernon 1991 sections each as an integer 0-5. Returned before settlement; you are not charged.","status":400},{"code":"invalid_ndi_item","message":"each NDI section must be an integer from 0 to 5 (Vernon 1991). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/ndi","citation":{"authors":"Vernon H, Mior S","id":"vernon-1991","pmid":"1834753","source":"J Manipulative Physiol Ther. 1991;14(7):409-415","title":"The Neck Disability Index: a study of reliability and validity","url":"https://pubmed.ncbi.nlm.nih.gov/1834753"},"formula_expression":"NDI = pain_intensity + personal_care + lifting + reading + headaches + concentration + work + driving + sleeping + recreation; each caller-assigned 0-5; Vernon 1991 ten sections; max 50; raw 0-50 bands 0-4 none, 5-14 mild, 15-24 moderate, 25-34 severe, >34 complete","purpose":"Sum ten caller-assigned Vernon 1991 Neck Disability Index sections (each integer 0-5) and return the published 0-50 total with that paper's raw-score disability bands.","markdown_url":"https://magentlab.com/docs/ndi.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"ndi"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Vernon 1991 sum of ten caller-assigned 0-5 sections (total 0-50)"},{"name":"max_score","type":"integer","description":"Always 50"},{"name":"disability","type":"string","description":"Vernon 1991 raw 0-50 bands: none (0-4), mild (5-14), moderate (15-24), severe (25-34), complete (>34). Not a diagnosis."},{"name":"components","type":"array","description":"Per-section caller-assigned points"},{"name":"citation","type":"object","description":"Vernon and Mior J Manipulative Physiol Ther 1991 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"concentration":"0","driving":"0","headaches":"0","lifting":"0","pain_intensity":"0","personal_care":"0","reading":"0","recreation":"0","sleeping":"0","work":"0"},{"concentration":"0","driving":"0","headaches":"0","lifting":"0","pain_intensity":"0","personal_care":"0","reading":"0","recreation":"0","sleeping":"0","work":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/ndi","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/ndi?pain_intensity=0&personal_care=0&lifting=0&reading=0&headaches=0&concentration=0&work=0&driving=0&sleeping=0&recreation=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/ndi","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/berg-balance","description":"Berg 1992 Berg Balance Scale (BBS): fourteen caller-assigned integers 0-4 (sitting to standing through standing on one foot). Sum 0-56. magent does not observe. Berg 1992 printed no 0-20 wheelchair / 21-40 walking-with-assistance / 41-56 independent website bands. Not Timed Up and Go, not a diagnosis, and not a medical device.","parameters":[{"in":"query","name":"sitting_to_standing","type":"integer","description":"Caller-assigned Berg 1992 sitting to standing (integer 0-4): 4 able to stand without using hands and stabilize independently; 3 able to stand independently using hands; 2 able to stand using hands after several tries; 1 needs minimal aid to stand or stabilize; 0 needs moderate or maximal assist to stand. magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"standing_unsupported","type":"integer","description":"Caller-assigned Berg 1992 standing unsupported (integer 0-4): 4 able to stand safely for 2 minutes; 3 able to stand 2 minutes with supervision; 2 able to stand 30 seconds unsupported; 1 needs several tries to stand 30 seconds unsupported; 0 unable to stand 30 seconds unassisted. magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"sitting_unsupported","type":"integer","description":"Caller-assigned Berg 1992 sitting unsupported, feet supported (integer 0-4): 4 able to sit safely and securely for 2 minutes; 3 able to sit 2 minutes under supervision; 2 able to sit 30 seconds; 1 able to sit 10 seconds; 0 unable to sit without support 10 seconds. magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"standing_to_sitting","type":"integer","description":"Caller-assigned Berg 1992 standing to sitting (integer 0-4): 4 sits safely with minimal use of hands; 3 controls descent by using hands; 2 uses back of legs against chair to control descent; 1 sits independently but has uncontrolled descent; 0 needs assistance to sit. magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"transfers","type":"integer","description":"Caller-assigned Berg 1992 transfers (integer 0-4): 4 able to transfer safely with minor use of hands; 3 able to transfer safely definite need of hands; 2 able to transfer with verbal cuing and/or supervision; 1 needs one person to assist; 0 needs two people to assist or supervise to be safe. magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"standing_eyes_closed","type":"integer","description":"Caller-assigned Berg 1992 standing unsupported with eyes closed (integer 0-4): 4 able to stand 10 seconds safely; 3 able to stand 10 seconds with supervision; 2 able to stand 3 seconds; 1 unable to keep eyes closed 3 seconds but stays standing; 0 needs help to keep from falling. magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"standing_feet_together","type":"integer","description":"Caller-assigned Berg 1992 standing unsupported with feet together (integer 0-4): 4 able to place feet together independently and stand 1 minute safely; 3 able to place feet together independently and stand 1 minute with supervision; 2 able to place feet together independently but unable to hold 30 seconds; 1 needs help to attain position but able to stand 15 seconds; 0 needs help to attain position and unable to hold 15 seconds. magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"reaching_forward","type":"integer","description":"Caller-assigned Berg 1992 reaching forward with outstretched arm while standing (integer 0-4): 4 can reach forward confidently more than 25 cm (10 inches); 3 can reach forward more than 12 cm (5 inches) safely; 2 can reach forward more than 5 cm (2 inches) safely; 1 reaches forward but needs supervision; 0 loses balance while trying or requires external support. magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"retrieving_object_from_floor","type":"integer","description":"Caller-assigned Berg 1992 retrieving object from floor from a standing position (integer 0-4): 4 able to pick up slipper safely and easily; 3 able to pick up slipper but needs supervision; 2 unable to pick up but reaches 2-5 cm from slipper and keeps balance independently; 1 unable to pick up and needs supervision while trying; 0 unable to try or needs assist to keep from losing balance. magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"turning_to_look_behind","type":"integer","description":"Caller-assigned Berg 1992 turning to look behind over left and right shoulders while standing (integer 0-4): 4 looks behind from both sides with weight shift; 3 looks behind one side only other side shows less weight shift; 2 turns sideways only but maintains balance; 1 needs supervision when turning; 0 needs assist to keep from losing balance or falling. magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"turning_360","type":"integer","description":"Caller-assigned Berg 1992 turning 360 degrees (integer 0-4): 4 able to turn 360 degrees safely in 4 seconds or less; 3 able to turn 360 degrees safely one side only in 4 seconds or less; 2 able to turn 360 degrees safely but slowly; 1 needs close supervision or verbal cuing; 0 needs assistance while turning. magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"alternate_foot_on_stool","type":"integer","description":"Caller-assigned Berg 1992 placing alternate foot on step or stool while standing unsupported (integer 0-4): 4 able to stand independently and safely and complete 8 steps in 20 seconds; 3 able to stand independently and complete 8 steps in more than 20 seconds; 2 able to complete 4 steps without aid with supervision; 1 able to complete more than 2 steps needs minimal assist; 0 needs assistance to keep from falling or unable to try. magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"tandem_stance","type":"integer","description":"Caller-assigned Berg 1992 standing unsupported one foot in front (integer 0-4): 4 able to place foot tandem independently and hold 30 seconds; 3 able to place foot ahead of other independently and hold 30 seconds; 2 able to take small step independently and hold 30 seconds; 1 needs help to step but can hold 15 seconds; 0 loses balance while stepping or standing. magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"standing_on_one_foot","type":"integer","description":"Caller-assigned Berg 1992 standing on one foot (integer 0-4): 4 able to lift leg independently and hold more than 10 seconds; 3 able to lift leg independently and hold 5-10 seconds; 2 able to lift leg independently and hold at least 3 seconds; 1 tries to lift leg unable to hold 3 seconds but remains standing independently; 0 unable to try or needs assist to prevent fall. magent does not observe the patient.","required":true,"example":"0"}],"errors":[{"code":"invalid_berg_balance","message":"Berg Balance Scale needs the fourteen Berg 1992 items each as an integer 0-4. Returned before settlement; you are not charged.","status":400},{"code":"invalid_berg_balance_item","message":"each Berg Balance Scale item must be an integer from 0 to 4 (Berg 1992). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/berg-balance","citation":{"authors":"Berg KO, Wood-Dauphinee SL, Williams JI, Maki B","id":"berg-1992","pmid":"1468055","source":"Can J Public Health. 1992;83 Suppl 2:S7-S11","title":"Measuring balance in the elderly: validation of an instrument","url":"https://pubmed.ncbi.nlm.nih.gov/1468055"},"formula_expression":"Berg Balance Scale = sitting_to_standing + standing_unsupported + sitting_unsupported + standing_to_sitting + transfers + standing_eyes_closed + standing_feet_together + reaching_forward + retrieving_object_from_floor + turning_to_look_behind + turning_360 + alternate_foot_on_stool + tandem_stance + standing_on_one_foot; each caller-assigned 0-4; Berg 1992 fourteen items; max 56; no 0-20 / 21-40 / 41-56 wheelchair/assist/independent website bands","purpose":"Sum fourteen caller-assigned Berg 1992 Berg Balance Scale items (each integer 0-4) and return the published 0-56 total. Does not apply later 0-20/21-40/41-56 website bands.","markdown_url":"https://magentlab.com/docs/berg-balance.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"berg_balance"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Berg 1992 sum of fourteen caller-assigned 0-4 items (total 0-56)"},{"name":"max_score","type":"integer","description":"Always 56"},{"name":"components","type":"array","description":"Per-item caller-assigned points"},{"name":"citation","type":"object","description":"Berg Can J Public Health 1992 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"alternate_foot_on_stool":"0","reaching_forward":"0","retrieving_object_from_floor":"0","sitting_to_standing":"0","sitting_unsupported":"0","standing_eyes_closed":"0","standing_feet_together":"0","standing_on_one_foot":"0","standing_to_sitting":"0","standing_unsupported":"0","tandem_stance":"0","transfers":"0","turning_360":"0","turning_to_look_behind":"0"},{"alternate_foot_on_stool":"0","reaching_forward":"0","retrieving_object_from_floor":"0","sitting_to_standing":"0","sitting_unsupported":"0","standing_eyes_closed":"0","standing_feet_together":"0","standing_on_one_foot":"0","standing_to_sitting":"0","standing_unsupported":"0","tandem_stance":"0","transfers":"0","turning_360":"0","turning_to_look_behind":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/berg-balance","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/berg-balance?sitting_to_standing=0&standing_unsupported=0&sitting_unsupported=0&standing_to_sitting=0&transfers=0&standing_eyes_closed=0&standing_feet_together=0&reaching_forward=0&retrieving_object_from_floor=0&turning_to_look_behind=0&turning_360=0&alternate_foot_on_stool=0&tandem_stance=0&standing_on_one_foot=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/berg-balance","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/alsfrs-r","description":"Cedarbaum 1999 ALSFRS-R: twelve caller-assigned integers 0-4 (speech, salivation, swallowing, handwriting, cutting_food, dressing_hygiene, turning_in_bed, walking, climbing_stairs, dyspnea, orthopnea, respiratory_insufficiency). One cutting_food slot for with or without gastrostomy. Sum 0-48. magent does not examine. Cedarbaum 1999 printed no total-score severity bands. Not a diagnosis, not original 10-item ALSFRS, not Karnofsky or ECOG, and not a medical device.","parameters":[{"in":"query","name":"speech","type":"integer","description":"Caller-assigned Cedarbaum 1999 speech (integer 0-4): 4 normal speech processes; 3 detectable speech disturbance; 2 intelligible with repeating; 1 speech combined with nonvocal communication; 0 loss of useful speech. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"salivation","type":"integer","description":"Caller-assigned Cedarbaum 1999 salivation (integer 0-4): 4 normal; 3 slight but definite excess of saliva in mouth, may have nighttime drooling; 2 moderately excessive saliva, may have minimal drooling; 1 marked excess of saliva with some drooling; 0 marked drooling, requires constant tissue or handkerchief. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"swallowing","type":"integer","description":"Caller-assigned Cedarbaum 1999 swallowing (integer 0-4): 4 normal eating habits; 3 early eating problems, occasional choking; 2 dietary consistency changes; 1 needs supplemental tube feeding; 0 NPO (exclusively parenteral or enteral feeding). magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"handwriting","type":"integer","description":"Caller-assigned Cedarbaum 1999 handwriting (integer 0-4): 4 normal; 3 slow or sloppy, all words are legible; 2 not all words are legible; 1 able to grip pen but unable to write; 0 unable to grip pen. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"cutting_food","type":"integer","description":"Caller-assigned Cedarbaum 1999 cutting food and handling utensils (integer 0-4). Patients without gastrostomy and patients with gastrostomy share this single 0-4 slot; the caller assigns 0-4 from whichever Table 1 column applies. Without gastrostomy: 4 normal; 3 somewhat slow and clumsy, but no help needed; 2 can cut most foods, although slow and clumsy, some help needed; 1 food must be cut by someone, but can still feed slowly; 0 needs to be fed. With gastrostomy: 4 normal; 3 clumsy but able to perform all manipulations independently; 2 some help needed with closures and fasteners; 1 provides minimal assistance to caregiver; 0 unable to perform any aspect of task. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"dressing_hygiene","type":"integer","description":"Caller-assigned Cedarbaum 1999 dressing and hygiene (integer 0-4): 4 normal function; 3 independent and complete self-care with effort or decreased efficiency; 2 intermittent assistance or substitute methods; 1 needs attendant for self-care; 0 total dependence. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"turning_in_bed","type":"integer","description":"Caller-assigned Cedarbaum 1999 turning in bed and adjusting bed clothes (integer 0-4): 4 normal; 3 somewhat slow and clumsy, but no help needed; 2 can turn alone or adjust sheets, but with great difficulty; 1 can initiate, but not turn or adjust sheets alone; 0 helpless. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"walking","type":"integer","description":"Caller-assigned Cedarbaum 1999 walking (integer 0-4): 4 normal; 3 early ambulation difficulties; 2 walks with assistance; 1 nonambulatory functional movement only; 0 no purposeful leg movement. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"climbing_stairs","type":"integer","description":"Caller-assigned Cedarbaum 1999 climbing stairs (integer 0-4): 4 normal; 3 slow; 2 mild unsteadiness or fatigue; 1 needs assistance; 0 cannot do. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"dyspnea","type":"integer","description":"Caller-assigned Cedarbaum 1999 dyspnea (integer 0-4): 4 none; 3 occurs when walking; 2 occurs with one or more of eating, bathing, dressing (ADL); 1 occurs at rest, difficulty breathing when either sitting or lying; 0 significant difficulty, considering using mechanical respiratory support. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"orthopnea","type":"integer","description":"Caller-assigned Cedarbaum 1999 orthopnea (integer 0-4): 4 none; 3 some difficulty sleeping at night due to shortness of breath, does not routinely use more than two pillows; 2 needs extra pillows in order to sleep (more than two); 1 can only sleep sitting up; 0 unable to sleep. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"respiratory_insufficiency","type":"integer","description":"Caller-assigned Cedarbaum 1999 respiratory insufficiency (integer 0-4): 4 none; 3 intermittent use of NIPPV; 2 continuous use of NIPPV during the night; 1 continuous use of NIPPV during the night and day; 0 invasive mechanical ventilation by intubation or tracheostomy. magent does not examine the patient.","required":true,"example":"0"}],"errors":[{"code":"invalid_alsfrs","message":"ALSFRS-R needs the twelve Cedarbaum 1999 items each as an integer 0-4. Returned before settlement; you are not charged.","status":400},{"code":"invalid_alsfrs_item","message":"each ALSFRS-R item must be an integer from 0 to 4 (Cedarbaum 1999). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/alsfrs-r","citation":{"authors":"Cedarbaum JM, Stambler N, Malta E, Fuller C, Hilt D, Thurmond B, Nakanishi A","doi":"10.1016/s0022-510x(99)00210-5","id":"cedarbaum-1999","pmid":"10540002","source":"J Neurol Sci. 1999;169(1-2):13-21","title":"The ALSFRS-R: a revised ALS functional rating scale that incorporates assessments of respiratory function. BDNF Study Group (Phase III)","url":"https://doi.org/10.1016/s0022-510x(99)00210-5"},"formula_expression":"ALSFRS-R = speech + salivation + swallowing + handwriting + cutting_food + dressing_hygiene + turning_in_bed + walking + climbing_stairs + dyspnea + orthopnea + respiratory_insufficiency; each caller-assigned 0-4; Cedarbaum 1999 twelve items including three respiratory; cutting_food is one 0-4 slot for with or without gastrostomy; max 48; no total-score severity bands","purpose":"Sum twelve caller-assigned Cedarbaum 1999 ALSFRS-R items (each integer 0-4, including three respiratory) and return the published 0-48 total. Does not apply later total-score severity bands or percent of maximum.","markdown_url":"https://magentlab.com/docs/alsfrs-r.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"alsfrs_r"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Cedarbaum 1999 ALSFRS-R sum of twelve caller-assigned 0-4 items (total 0-48)"},{"name":"max_score","type":"integer","description":"Always 48"},{"name":"components","type":"array","description":"Per-item caller-assigned points"},{"name":"citation","type":"object","description":"Cedarbaum J Neurol Sci 1999 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"climbing_stairs":"0","cutting_food":"0","dressing_hygiene":"0","dyspnea":"0","handwriting":"0","orthopnea":"0","respiratory_insufficiency":"0","salivation":"0","speech":"0","swallowing":"0","turning_in_bed":"0","walking":"0"},{"climbing_stairs":"0","cutting_food":"0","dressing_hygiene":"0","dyspnea":"0","handwriting":"0","orthopnea":"0","respiratory_insufficiency":"0","salivation":"0","speech":"0","swallowing":"0","turning_in_bed":"0","walking":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/alsfrs-r","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/alsfrs-r?speech=0&salivation=0&swallowing=0&handwriting=0&cutting_food=0&dressing_hygiene=0&turning_in_bed=0&walking=0&climbing_stairs=0&dyspnea=0&orthopnea=0&respiratory_insufficiency=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/alsfrs-r","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/midas","description":"Stewart 1999 MIDAS from five caller-assigned 3-month day counts: missed paid work/school, work/school ≥50% reduced, missed household work, household ≥50% reduced, missed family/social/leisure. Each 0-90; total 0-450. magent does not include questions A or B and does not assign or de-duplicate days. Grades I 0-5 little/minimal, II 6-10 mild, III 11-20 moderate, IV ≥21 severe. Not a migraine diagnosis, not a triptan/prophylaxis order, not GAD-7 or PHQ-9.","parameters":[{"in":"query","name":"missed_work_days","type":"integer","description":"Caller-assigned MIDAS item 1 (integer 0-90): days of missed paid work or school in the last 3 months. magent does not assign the count.","required":true,"example":"0"},{"in":"query","name":"reduced_work_days","type":"integer","description":"Caller-assigned MIDAS item 2 (integer 0-90): days work or school productivity was reduced by half or more in the last 3 months. Do not double-count days already in missed_work_days; the caller assigns the count. magent does not de-duplicate days.","required":true,"example":"0"},{"in":"query","name":"missed_household_days","type":"integer","description":"Caller-assigned MIDAS item 3 (integer 0-90): days household work was not done in the last 3 months. magent does not assign the count.","required":true,"example":"0"},{"in":"query","name":"reduced_household_days","type":"integer","description":"Caller-assigned MIDAS item 4 (integer 0-90): days household productivity was reduced by half or more in the last 3 months. Do not double-count days already in missed_household_days; the caller assigns the count. magent does not de-duplicate days.","required":true,"example":"0"},{"in":"query","name":"missed_social_days","type":"integer","description":"Caller-assigned MIDAS item 5 (integer 0-90): days of missed family, social, or leisure activities in the last 3 months. magent does not assign the count.","required":true,"example":"0"}],"errors":[{"code":"invalid_midas","message":"MIDAS needs five 3-month day counts (work missed, work ≥50% reduced, household missed, household ≥50% reduced, social missed). Returned before settlement; you are not charged.","status":400},{"code":"invalid_midas_days","message":"each MIDAS day count must be an integer from 0 to 90 (last 3 months). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/midas","citation":{"authors":"Stewart WF, Lipton RB, Whyte J, Dowson A, Kolodner A, Liberman JN, Sawyer J","doi":"10.1212/wnl.53.5.988","id":"stewart-1999","pmid":"10496257","source":"Neurology. 1999;53(5):988-994","title":"An international study to assess reliability of the Migraine Disability Assessment (MIDAS) score","url":"https://doi.org/10.1212/wnl.53.5.988"},"formula_expression":"MIDAS = missed_work_days + reduced_work_days + missed_household_days + reduced_household_days + missed_social_days; each caller-assigned integer 0-90 (last 3 months); max 450; magent does not include questions A or B; grades I 0-5 little/minimal, II 6-10 mild, III 11-20 moderate, IV ≥21 severe","purpose":"Sum five caller-assigned MIDAS day counts over the last 3 months and return the 0-450 total and published grades I–IV.","markdown_url":"https://magentlab.com/docs/midas.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"midas"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"MIDAS points 0-450"},{"name":"max_score","type":"integer","description":"450"},{"name":"midas_grade","type":"string","description":"Published grades used with this instrument: I (0-5 little/minimal), II (6-10 mild), III (11-20 moderate), IV (≥21 severe). Not a migraine diagnosis."},{"name":"components","type":"array","description":"Per-item caller-assigned day counts"},{"name":"citation","type":"object","description":"Stewart et al. Neurology 1999 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"missed_household_days":"0","missed_social_days":"0","missed_work_days":"0","reduced_household_days":"0","reduced_work_days":"0"},{"missed_household_days":"0","missed_social_days":"0","missed_work_days":"0","reduced_household_days":"0","reduced_work_days":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/midas","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/midas?missed_work_days=0&reduced_work_days=0&missed_household_days=0&reduced_household_days=0&missed_social_days=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/midas","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/mtoq-4","description":"Lipton 2015 mTOQ-4 from four caller-assigned frequency items: pain-free within 2 hours, one dose keeps headache away ≥24 hours, comfortable enough to plan daily activities, in control enough to return to normal function. Each never=0, rarely=0, less_than_half=1, half_or_greater=2. Sum 0-8. Bands very_poor 0, poor 1-5, moderate 6-7, maximum 8. magent does not interview the patient. Not a diagnosis, not an abortive-drug order, not the 19-item or 6-item mTOQ.","parameters":[{"in":"query","name":"pain_free_2h","type":"string","enum":["never","rarely","less_than_half","half_or_greater"],"description":"Caller-assigned Lipton 2015 mTOQ-4 item 1. After taking your migraine medication, are you pain-free within 2 hours for most attacks? never=0, rarely=0, less_than_half=1, half_or_greater=2. magent does not interview the patient.","required":true,"example":"never"},{"in":"query","name":"sustained_24h","type":"string","enum":["never","rarely","less_than_half","half_or_greater"],"description":"Caller-assigned Lipton 2015 mTOQ-4 item 2. Does one dose of your migraine medication usually relieve your headache and keep it away for at least 24 hours? never=0, rarely=0, less_than_half=1, half_or_greater=2. magent does not interview the patient.","required":true,"example":"never"},{"in":"query","name":"able_to_plan","type":"string","enum":["never","rarely","less_than_half","half_or_greater"],"description":"Caller-assigned Lipton 2015 mTOQ-4 item 3. Are you comfortable enough with your migraine medication to be able to plan your daily activities? never=0, rarely=0, less_than_half=1, half_or_greater=2. magent does not interview the patient.","required":true,"example":"never"},{"in":"query","name":"in_control","type":"string","enum":["never","rarely","less_than_half","half_or_greater"],"description":"Caller-assigned Lipton 2015 mTOQ-4 item 4. After taking your migraine medication, do you feel in control of your migraines enough so that you feel you can return to normal function? never=0, rarely=0, less_than_half=1, half_or_greater=2. magent does not interview the patient.","required":true,"example":"never"}],"errors":[{"code":"invalid_mtoq4","message":"mTOQ-4 items must each be never, rarely, less_than_half, or half_or_greater (Lipton 2015). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/mtoq-4","citation":{"authors":"Lipton RB, Fanning KM, Serrano D, Reed ML, Cady R, Buse DC","doi":"10.1212/WNL.0000000000001256","id":"lipton-2015","pmid":"25609757","source":"Neurology. 2015;84(7):688-695","title":"Ineffective acute treatment of episodic migraine is associated with new-onset chronic migraine","url":"https://doi.org/10.1212/WNL.0000000000001256"},"formula_expression":"mTOQ-4 = pain_free_2h + sustained_24h + able_to_plan + in_control; each never=0, rarely=0, less_than_half=1, half_or_greater=2; max 8; very_poor=0, poor=1-5, moderate=6-7, maximum=8","purpose":"Sum four caller-assigned Lipton 2015 mTOQ-4 frequency items and return the 0-8 total and published treatment-efficacy bands.","markdown_url":"https://magentlab.com/docs/mtoq-4.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"mtoq_4"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"mTOQ-4 points 0-8"},{"name":"max_score","type":"integer","description":"8"},{"name":"treatment_efficacy","type":"string","description":"Lipton 2015 efficacy band: very_poor (0), poor (1-5), moderate (6-7), or maximum (8). Not a diagnosis."},{"name":"components","type":"array","description":"Per-item caller-assigned points"},{"name":"citation","type":"object","description":"Lipton et al. Neurology 2015 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"able_to_plan":"never","in_control":"never","pain_free_2h":"never","sustained_24h":"never"},{"able_to_plan":"never","in_control":"never","pain_free_2h":"never","sustained_24h":"never"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/mtoq-4","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/mtoq-4?pain_free_2h=never&sustained_24h=never&able_to_plan=never&in_control=never","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/mtoq-4","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/katz","description":"Katz 1963 Index of Independence in Activities of Daily Living: six caller-assigned independence flags (bathing, dressing, toileting, transferring, continence, feeding). Each independent function scores 1; max 6. magent sums the 0–6 count used in later forms of the index and does not observe the patient. Not the Barthel Index, not Katz letter grades A–G, and not a rehab order or placement decision. Not a medical device.","parameters":[{"in":"query","name":"bathing_independent","type":"boolean","description":"Caller-assigned Katz 1963 bathing independence (sponge, shower, or tub). true scores 1; false scores 0. magent does not observe the patient.","required":true,"example":"false"},{"in":"query","name":"dressing_independent","type":"boolean","description":"Caller-assigned Katz 1963 dressing independence (gets clothes and puts on garments; may have help tying shoes). true scores 1; false scores 0. magent does not observe the patient.","required":true,"example":"false"},{"in":"query","name":"toileting_independent","type":"boolean","description":"Caller-assigned Katz 1963 toileting independence (goes to toilet, gets on and off, arranges clothes, cleans self). true scores 1; false scores 0. magent does not observe the patient.","required":true,"example":"false"},{"in":"query","name":"transferring_independent","type":"boolean","description":"Caller-assigned Katz 1963 transferring independence (moves in and out of bed and chair; may use an object for support). true scores 1; false scores 0. magent does not observe the patient.","required":true,"example":"false"},{"in":"query","name":"continence_independent","type":"boolean","description":"Caller-assigned Katz 1963 continence independence (controls urination and bowel movement completely by self). true scores 1; false scores 0. magent does not observe the patient.","required":true,"example":"false"},{"in":"query","name":"feeding_independent","type":"boolean","description":"Caller-assigned Katz 1963 feeding independence (gets food from plate into mouth; precutting of meat may be done by another). true scores 1; false scores 0. magent does not observe the patient.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/katz","citation":{"authors":"Katz S, Ford AB, Moskowitz RW, Jackson BA, Jaffe MW","doi":"10.1001/jama.1963.03060120024016","id":"katz-1963","pmid":"14044222","source":"JAMA. 1963;185(12):914-919","title":"Studies of illness in the aged. The index of ADL: a standardized measure of biological and psychosocial function","url":"https://doi.org/10.1001/jama.1963.03060120024016"},"formula_expression":"Katz Index of ADL = bathing_independent + dressing_independent + toileting_independent + transferring_independent + continence_independent + feeding_independent; each 1 if independent; max 6 (Katz 1963)","purpose":"Sum six caller-assigned Katz 1963 independence flags and return the 0–6 independence count used in later forms of the index (the 1963 paper used letter grades A–G).","markdown_url":"https://magentlab.com/docs/katz.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"katz"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Count of independent functions 0-6"},{"name":"max_score","type":"integer","description":"6"},{"name":"components","type":"array","description":"Per-function independence points"},{"name":"citation","type":"object","description":"Katz et al. JAMA 1963 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"bathing_independent":"false","continence_independent":"false","dressing_independent":"false","feeding_independent":"false","toileting_independent":"false","transferring_independent":"false"},{"bathing_independent":"false","continence_independent":"false","dressing_independent":"false","feeding_independent":"false","toileting_independent":"false","transferring_independent":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/katz","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/katz?bathing_independent=false&dressing_independent=false&toileting_independent=false&transferring_independent=false&continence_independent=false&feeding_independent=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/katz","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/mg-adl","description":"Wolfe 1999 myasthenia gravis activities of daily living (MG-ADL) profile: eight caller-assigned integers 0-3 (talking, chewing, swallowing, breathing, brush_comb, arise_chair, double_vision, eyelid_droop), summed 0-24. magent does not examine the patient. Wolfe 1999 correlated MG-ADL with QMG; that is not a conversion. Not QMG, not MGFA class. Score and max_score only; no severity band. Not a medical device.","parameters":[{"in":"query","name":"talking","type":"integer","description":"Caller-assigned Wolfe 1999 MG-ADL talking (integer 0-3: 0 normal; 1 intermittent slurring or nasal speech; 2 constant slurring or nasal but can be understood; 3 difficult to understand speech). magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"chewing","type":"integer","description":"Caller-assigned Wolfe 1999 MG-ADL chewing (integer 0-3: 0 normal; 1 fatigue with solid food; 2 fatigue with soft food; 3 gastric tube). magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"swallowing","type":"integer","description":"Caller-assigned Wolfe 1999 MG-ADL swallowing (integer 0-3: 0 normal; 1 rare episode of choking; 2 frequent choking necessitating changes in diet; 3 gastric tube). magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"breathing","type":"integer","description":"Caller-assigned Wolfe 1999 MG-ADL breathing (integer 0-3: 0 normal; 1 shortness of breath with exertion; 2 shortness of breath at rest; 3 ventilator dependence). magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"brush_comb","type":"integer","description":"Caller-assigned Wolfe 1999 MG-ADL impairment of ability to brush teeth or comb hair (integer 0-3: 0 none; 1 extra effort but no rest periods needed; 2 rest periods needed; 3 cannot do one of these functions). magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"arise_chair","type":"integer","description":"Caller-assigned Wolfe 1999 MG-ADL impairment of ability to arise from a chair (integer 0-3: 0 none; 1 mild, sometimes uses arms; 2 moderate, always uses arms; 3 severe, requires assistance). magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"double_vision","type":"integer","description":"Caller-assigned Wolfe 1999 MG-ADL double vision (integer 0-3: 0 none; 1 occurs but not daily; 2 daily but not constant; 3 constant). magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"eyelid_droop","type":"integer","description":"Caller-assigned Wolfe 1999 MG-ADL eyelid droop (integer 0-3: 0 none; 1 occurs but not daily; 2 daily but not constant; 3 constant). magent does not examine the patient.","required":true,"example":"0"}],"errors":[{"code":"invalid_mg_adl","message":"talking, chewing, swallowing, breathing, brush_comb, arise_chair, double_vision, and eyelid_droop must each be an integer 0-3 (Wolfe 1999 MG-ADL). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/mg-adl","citation":{"authors":"Wolfe GI, Herbelin L, Nations SP, Foster B, Bryan WW, Barohn RJ","doi":"10.1212/wnl.52.7.1487","id":"wolfe-1999","pmid":"10227640","source":"Neurology. 1999;52(7):1487-1489","title":"Myasthenia gravis activities of daily living profile.","url":"https://doi.org/10.1212/wnl.52.7.1487"},"formula_expression":"MG-ADL = talking + chewing + swallowing + breathing + brush_comb + arise_chair + double_vision + eyelid_droop; each a caller-assigned integer 0-3; max 24; Wolfe 1999 eight-question survey; no QMG mapping; no MGFA class","purpose":"Sum eight caller-assigned Wolfe 1999 MG-ADL items (each integer 0-3) and return the published 0-24 total. Does not map to QMG or assign MGFA class.","markdown_url":"https://magentlab.com/docs/mg-adl.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"mg_adl"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Wolfe 1999 MG-ADL sum of eight caller-assigned 0-3 items (0-24)"},{"name":"max_score","type":"integer","description":"Always 24"},{"name":"components","type":"array","description":"Per-item caller-assigned points"},{"name":"citation","type":"object","description":"Wolfe et al. Neurology 1999 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"arise_chair":"0","breathing":"0","brush_comb":"0","chewing":"0","double_vision":"0","eyelid_droop":"0","swallowing":"0","talking":"0"},{"arise_chair":"0","breathing":"0","brush_comb":"0","chewing":"0","double_vision":"0","eyelid_droop":"0","swallowing":"0","talking":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/mg-adl","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/mg-adl?talking=0&chewing=0&swallowing=0&breathing=0&brush_comb=0&arise_chair=0&double_vision=0&eyelid_droop=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/mg-adl","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/mgfa","description":"Jaretzki 2000 MGFA Clinical Classification (Table 1). Caller-assigned class I, IIa, IIb, IIIa, IIIb, IVa, IVb, or V with the published description. Class V is intubation except routine postoperative management. A feeding tube without intubation is class IVb. Not QMG, not MG-ADL, not Osserman, and not an outcome measure (QMG is separate). magent does not examine the patient. Not a medical device.","parameters":[{"in":"query","name":"mgfa_class","type":"string","description":"Jaretzki 2000 Table 1 MGFA Clinical Classification as assigned by the caller: I, IIa, IIb, IIIa, IIIb, IVa, IVb, or V (case-sensitive; reject i, 1, II, IIA). Class I ocular only; II mild, III moderate, IV severe generalized with a = limb/axial and b = oropharyngeal/respiratory; IVb includes feeding tube without intubation; V is intubation except routine postoperative management. magent does not examine the patient.","required":true,"example":"I"}],"errors":[{"code":"invalid_mgfa","message":"mgfa_class must be I, IIa, IIb, IIIa, IIIb, IVa, IVb, or V (Jaretzki 2000 MGFA Clinical Classification). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/mgfa","citation":{"authors":"Jaretzki A 3rd, Barohn RJ, Ernstoff RM, Kaminski HJ, Keesey JC, Penn AS, Sanders DB","doi":"10.1016/s0003-4975(00)01595-2","id":"jaretzki-2000","pmid":"10921745","source":"Ann Thorac Surg. 2000;70(1):327-334","title":"Myasthenia gravis: recommendations for clinical research standards. Task Force of the Medical Scientific Advisory Board of the Myasthenia Gravis Foundation of America","url":"https://doi.org/10.1016/s0003-4975(00)01595-2"},"formula_expression":"mgfa_class in {I, IIa, IIb, IIIa, IIIb, IVa, IVb, V} as assigned by the caller (Jaretzki 2000 Table 1 MGFA Clinical Classification). Not QMG. Not MG-ADL. Not Osserman. Not an outcome measure.","purpose":"Echo the caller-assigned Jaretzki 2000 Table 1 MGFA Clinical Classification class (I, IIa, IIb, IIIa, IIIb, IVa, IVb, or V) with the published class description. Class V is intubation except routine postoperative management. A feeding tube without intubation is class IVb.","markdown_url":"https://magentlab.com/docs/mgfa.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"mgfa"},{"name":"formula_expression","type":"string","description":"Published Jaretzki 2000 Table 1 class rule"},{"name":"mgfa_class","type":"string","description":"Caller-assigned class I, IIa, IIb, IIIa, IIIb, IVa, IVb, or V"},{"name":"description","type":"string","description":"Jaretzki 2000 Table 1 wording for that class"},{"name":"intubation_class","type":"boolean","description":"true iff mgfa_class is V"},{"name":"components","type":"array","description":"Per-class Tree rows class_I, class_IIa, class_IIb, class_IIIa, class_IIIb, class_IVa, class_IVb, class_V with factor and met; exactly one is met"},{"name":"citation","type":"object","description":"Jaretzki 2000 Ann Thorac Surg citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"mgfa_class":"I"},{"mgfa_class":"I"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/mgfa","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/mgfa?mgfa_class=I","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/mgfa","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/modified-hoehn-yahr","description":"Goetz 2004 modified Hoehn and Yahr stage (Table 1). Caller-assigned tokens 1.0, 1.5, 2.0, 2.5, 3.0, 4.0, or 5.0 with the published description. No stage 0. Not the original integer-only 1-5 scale, not UPDRS, not a diagnosis, and not an outcome measure. magent does not examine the patient. Not a medical device.","parameters":[{"in":"query","name":"hy_stage","type":"string","description":"Goetz 2004 Table 1 modified Hoehn and Yahr stage as assigned by the caller: 1.0, 1.5, 2.0, 2.5, 3.0, 4.0, or 5.0 (exact tokens; reject 1, 3, 0, 0.5, 2.5.0). 1.0 unilateral only; 1.5 unilateral and axial; 2.0 bilateral without impairment of balance; 2.5 mild bilateral with recovery on pull test; 3.0 mild to moderate bilateral with some postural instability, physically independent; 4.0 severe disability, still able to walk or stand unassisted; 5.0 wheelchair bound or bedridden unless aided. No stage 0. Not the original integer-only 1-5 scale. Not UPDRS. magent does not examine the patient.","required":true,"example":"1.0"}],"errors":[{"code":"invalid_modified_hoehn_yahr","message":"hy_stage must be 1.0, 1.5, 2.0, 2.5, 3.0, 4.0, or 5.0 (Goetz 2004 modified Hoehn and Yahr Table 1). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/modified-hoehn-yahr","citation":{"authors":"Goetz CG, Poewe W, Rascol O, Sampaio C, Stebbins GT, Counsell C, Giladi N, Holloway RG, Moore CG, Wenning GK, Yahr MD","doi":"10.1002/mds.20213","id":"goetz-2004","pmid":"15372591","source":"Mov Disord. 2004;19(9):1020-1028","title":"Movement Disorder Society Task Force report on the Hoehn and Yahr staging scale: status and recommendations","url":"https://doi.org/10.1002/mds.20213"},"formula_expression":"hy_stage in {1.0, 1.5, 2.0, 2.5, 3.0, 4.0, 5.0} as assigned by the caller (Goetz 2004 Table 1 modified Hoehn and Yahr). No stage 0. Not the original integer-only 1-5 scale. Not UPDRS. Not a diagnosis. Not an outcome measure.","purpose":"Echo the caller-assigned Goetz 2004 Table 1 modified Hoehn and Yahr stage (1.0, 1.5, 2.0, 2.5, 3.0, 4.0, or 5.0) with the published description. No stage 0. magent does not examine the patient.","markdown_url":"https://magentlab.com/docs/modified-hoehn-yahr.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"modified_hoehn_yahr"},{"name":"formula_expression","type":"string","description":"Published Goetz 2004 Table 1 modified Hoehn and Yahr token rule"},{"name":"hy_stage","type":"string","description":"Caller-assigned token 1.0, 1.5, 2.0, 2.5, 3.0, 4.0, or 5.0"},{"name":"description","type":"string","description":"Goetz 2004 Table 1 modified-column wording for that stage"},{"name":"components","type":"array","description":"Per-stage Tree rows stage_1_0, stage_1_5, stage_2_0, stage_2_5, stage_3_0, stage_4_0, stage_5_0 with factor and met; exactly one is met"},{"name":"citation","type":"object","description":"Goetz 2004 Mov Disord citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"hy_stage":"1.0"},{"hy_stage":"1.0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/modified-hoehn-yahr","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/modified-hoehn-yahr?hy_stage=1.0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/modified-hoehn-yahr","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/schwab-england","description":"Schwab and England ADL (1969): caller-assigned integer 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, or 100 (completely independent; independent with some slowness; independent in most chores; not completely independent; some dependency; more dependent; very dependent; few chores with effort; nothing alone; totally dependent; vegetative). Returns score, max 100, and a stable label. 0% vegetative is scored. Not Hoehn and Yahr and not Karnofsky. magent does not observe the patient. Not a medical device.","parameters":[{"in":"query","name":"adl_percent","type":"integer","description":"Schwab and England 1969 ADL percent 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, or 100 as assigned by the caller (100 completely independent, able to do all chores without slowness, difficulty or impairment; 90 completely independent with some slowness, difficulty and/or impairment, might take twice as long; 80 completely independent in most chores, takes twice as long; 70 not completely independent, more difficulty with some chores, three to four times as long in some; 60 some dependency, can do most chores but exceedingly slowly and with much effort; 50 more dependent, help with half, difficulty with everything; 40 very dependent, can assist with all chores but few alone; 30 with effort now and then does a few chores alone, much help needed; 20 nothing alone, can be a slight help with some chores; 10 totally dependent, helpless; 0 vegetative functions such as swallowing, bladder and bowel functions are not functioning, bedridden). 0% vegetative is scored. magent does not observe the patient.","required":true,"example":"100"}],"errors":[{"code":"invalid_schwab_england","message":"Schwab and England ADL needs adl_percent as 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, or 100. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/schwab-england","citation":{"authors":"Schwab RS, England AC","id":"schwab-england-1969","source":"In: Gillingham FJ, Donaldson IML, eds. Third Symposium on Parkinson's Disease. Edinburgh: E & S Livingstone; 1969:152-157","title":"Projection technique for evaluating surgery in Parkinson's disease","url":"https://wellcomecollection.org/works/uztfjp6k"},"formula_expression":"Schwab and England ADL = caller-assigned integer 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, or 100 (Schwab and England 1969); max 100; 0% vegetative is scored","purpose":"Return the Schwab and England 1969 ADL percent 0-100 from a caller-assigned integer, with a stable label.","markdown_url":"https://magentlab.com/docs/schwab-england.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"schwab_england"},{"name":"formula_expression","type":"string","description":"Published Schwab and England decade rule"},{"name":"score","type":"integer","description":"Same as adl_percent (0-100 by tens)"},{"name":"max_score","type":"integer","description":"100"},{"name":"adl_percent","type":"integer","description":"Caller-assigned Schwab and England 1969 ADL percent 0-100 by tens"},{"name":"adl_label","type":"string","description":"Stable token for that decade: completely_independent, independent_some_slowness, independent_most_chores, not_completely_independent, some_dependency, more_dependent, very_dependent, few_chores_with_effort, nothing_alone, totally_dependent, or vegetative"},{"name":"components","type":"array","description":"adl_percent component"},{"name":"citation","type":"object","description":"Schwab and England 1969"},{"name":"disclaimer","type":"string","description":"Not a medical device"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"adl_percent":"100"},{"adl_percent":"100"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/schwab-england","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/schwab-england?adl_percent=100","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/schwab-england","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/webster","description":"Webster 1968 rating scale: ten caller-assigned integers 0-3 (bradykinesia, rigidity, posture, upper_extremity_swing, gait, tremor, facies, seborrhea, speech, self_care). magent sums only (max 30) and does not examine the patient. Score only; magent does not invent mild/moderate/severe total-score bands. Historical 10-item 0-30 sum. Not MDS-UPDRS and not a Parkinson diagnosis. Not a medical device.","parameters":[{"in":"query","name":"bradykinesia","type":"integer","description":"Caller-assigned Webster 1968 item, integer 0 (normal) to 3 (severe). magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"rigidity","type":"integer","description":"Caller-assigned Webster 1968 item, integer 0 (normal) to 3 (severe). magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"posture","type":"integer","description":"Caller-assigned Webster 1968 item, integer 0 (normal) to 3 (severe). magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"upper_extremity_swing","type":"integer","description":"Caller-assigned Webster 1968 item, integer 0 (normal) to 3 (severe). magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"gait","type":"integer","description":"Caller-assigned Webster 1968 item, integer 0 (normal) to 3 (severe). magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"tremor","type":"integer","description":"Caller-assigned Webster 1968 item, integer 0 (normal) to 3 (severe). magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"facies","type":"integer","description":"Caller-assigned Webster 1968 item, integer 0 (normal) to 3 (severe). magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"seborrhea","type":"integer","description":"Caller-assigned Webster 1968 item, integer 0 (normal) to 3 (severe). magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"speech","type":"integer","description":"Caller-assigned Webster 1968 item, integer 0 (normal) to 3 (severe). magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"self_care","type":"integer","description":"Caller-assigned Webster 1968 item, integer 0 (normal) to 3 (severe). magent does not examine the patient.","required":true,"example":"0"}],"errors":[{"code":"invalid_webster","message":"Webster items must each be integers 0-3 as published in Webster 1968. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/webster","citation":{"authors":"Webster DD","id":"webster-1968","pmid":"5655944","source":"Mod Treat. 1968;5(2):257-282","title":"Critical analysis of the disability in Parkinson's disease","url":"https://pubmed.ncbi.nlm.nih.gov/5655944"},"formula_expression":"Webster = bradykinesia + rigidity + posture + upper_extremity_swing + gait + tremor + facies + seborrhea + speech + self_care; each caller-assigned integer 0-3; max 30","purpose":"Sum ten caller-assigned Webster 1968 items (each integer 0-3) and return the published 0-30 total.","markdown_url":"https://magentlab.com/docs/webster.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"webster"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Webster 1968 points 0-30"},{"name":"max_score","type":"integer","description":"Always 30"},{"name":"components","type":"array","description":"Per-item caller-assigned points"},{"name":"citation","type":"object","description":"Webster Mod Treat 1968 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"bradykinesia":"0","facies":"0","gait":"0","posture":"0","rigidity":"0","seborrhea":"0","self_care":"0","speech":"0","tremor":"0","upper_extremity_swing":"0"},{"bradykinesia":"0","facies":"0","gait":"0","posture":"0","rigidity":"0","seborrhea":"0","self_care":"0","speech":"0","tremor":"0","upper_extremity_swing":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/webster","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/webster?bradykinesia=0&rigidity=0&posture=0&upper_extremity_swing=0&gait=0&tremor=0&facies=0&seborrhea=0&speech=0&self_care=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/webster","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/disease-steps","description":"Hohol 1995 Disease Steps: caller-assigned integer 0-6 (normal; mild disability, mild symptoms or signs; moderate disability, visible abnormality of gait; early cane, intermittent use of cane; late cane, cane-dependent; bilateral support; confined to wheelchair). Not 0.5 half-steps, not later Disease Steps Plus, and not EDSS. magent does not examine gait. Not a medical device and not an MS diagnosis.","parameters":[{"in":"query","name":"step","type":"integer","description":"Hohol 1995 Disease Steps 0-6 as assigned by the caller (0 normal; 1 mild disability, mild symptoms or signs; 2 moderate disability, visible abnormality of gait; 3 early cane, intermittent use of cane; 4 late cane, cane-dependent; 5 bilateral support; 6 confined to wheelchair). 0.5 half-steps and unclassifiable U are not scored. magent does not examine gait.","required":true,"example":"0"}],"errors":[{"code":"invalid_disease_steps","message":"step must be an integer 0–6 (Hohol 1995 Disease Steps). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/disease-steps","citation":{"authors":"Hohol MJ, Orav EJ, Weiner HL","doi":"10.1212/wnl.45.2.251","id":"hohol-1995","pmid":"7854521","source":"Neurology. 1995;45(2):251-255","title":"Disease steps in multiple sclerosis: a simple approach to evaluate disease progression","url":"https://doi.org/10.1212/wnl.45.2.251"},"formula_expression":"Disease Steps = caller-assigned integer 0-6 (Hohol 1995); max 6; 0.5 half-steps and unclassifiable U are not scored","purpose":"Return the caller-assigned Hohol 1995 Disease Steps integer 0-6 with the published description. magent does not examine gait.","markdown_url":"https://magentlab.com/docs/disease-steps.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"disease_steps"},{"name":"formula_expression","type":"string","description":"Published Hohol 1995 Disease Steps integer 0-6 rule"},{"name":"step","type":"integer","description":"Caller-assigned Hohol 1995 step 0-6"},{"name":"score","type":"integer","description":"Same as step (0-6)"},{"name":"max_score","type":"integer","description":"6"},{"name":"description","type":"string","description":"Hohol 1995 wording for that step"},{"name":"components","type":"array","description":"step component"},{"name":"citation","type":"object","description":"Hohol 1995 Neurology citation"},{"name":"disclaimer","type":"string","description":"Not a medical device"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"step":"0"},{"step":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/disease-steps","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/disease-steps?step=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/disease-steps","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/mcdonald-2017","description":"2017 McDonald typical CIS (Thompson 2018). mcdonald_ms iff typical_cis and no_better_explanation and: ≥2 attacks with ≥2 lesions; or ≥2 attacks with one lesion plus DIS; or CIS with ≥2 lesions plus MRI DIT or CSF-specific OCB; or CIS with one lesion plus DIS and MRI DIT or CSF-specific OCB. 2017: OCB may substitute for DIT when DIS is met. Symptomatic and cortical lesions count. Not PPMS. Not 2010 McDonald. magent does not read MRI or CSF. Not a diagnosis. Not a medical device.","parameters":[{"in":"query","name":"typical_cis","type":"boolean","description":"Typical clinically isolated syndrome as assigned by the caller (Thompson 2018 panel 1). If false, mcdonald_ms is false; this tool does not diagnose MS from atypical presentations. true or false. magent does not examine the patient.","required":true,"example":"true"},{"in":"query","name":"no_better_explanation","type":"boolean","description":"No better explanation for the presentation as assigned by the caller (Thompson 2018). If false, mcdonald_ms is false. Remain vigilant for NMOSD. true or false. magent does not assign a better explanation.","required":true,"example":"true"},{"in":"query","name":"two_or_more_attacks","type":"boolean","description":"≥2 clinical attacks as assigned by the caller. true means two or more attacks; false means this is the first/CIS attack. true or false. magent does not date attacks.","required":true,"example":"true"},{"in":"query","name":"two_or_more_lesions","type":"boolean","description":"Objective clinical evidence of ≥2 lesions as assigned by the caller. true means ≥2 lesions; false means 1 lesion. true or false. magent does not examine the patient.","required":true,"example":"true"},{"in":"query","name":"dis","type":"boolean","description":"Dissemination in space as assigned by the caller (2017: ≥1 T2-hyperintense lesion characteristic of MS in ≥2 of 4 areas: periventricular, cortical or juxtacortical, infratentorial, spinal cord; symptomatic lesions count; cortical lesions count). true or false. magent does not read MRI.","required":true,"example":"false"},{"in":"query","name":"dit_mri","type":"boolean","description":"MRI dissemination in time as assigned by the caller (simultaneous Gd-enhancing and non-enhancing lesions, or a new T2 or Gd-enhancing lesion on follow-up vs baseline). true or false. magent does not read MRI.","required":true,"example":"false"},{"in":"query","name":"csf_specific_ocb","type":"boolean","description":"CSF-specific oligoclonal bands as assigned by the caller (2017 DIT substitute when DIS is fulfilled). true or false. magent does not assay CSF.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/mcdonald-2017","citation":{"authors":"Thompson AJ, Banwell BL, Barkhof F, Carroll WM, Coetzee T, Comi G, Correale J, Fazekas F, Filippi M, Freedman MS, Fujihara K, Galetta SL, Hartung HP, Kappos L, Lublin FD, Marrie RA, Miller AE, Miller DH, Montalban X, Mowry EM, Sorensen PS, Tintoré M, Traboulsee AL, Trojano M, Uitdehaag BMJ, Vukusic S, Waubant E, Weinshenker BG, Reingold SC, Cohen JA","doi":"10.1016/S1474-4422(17)30470-2","id":"thompson-2018","pmid":"29275977","source":"Lancet Neurol. 2018;17(2):162-173","title":"Diagnosis of multiple sclerosis: 2017 revisions of the McDonald criteria","url":"https://doi.org/10.1016/S1474-4422(17)30470-2"},"formula_expression":"mcdonald_ms iff typical_cis and no_better_explanation and ((two_or_more_attacks and two_or_more_lesions) or (two_or_more_attacks and not two_or_more_lesions and dis) or (not two_or_more_attacks and two_or_more_lesions and (dit_mri or csf_specific_ocb)) or (not two_or_more_attacks and not two_or_more_lesions and dis and (dit_mri or csf_specific_ocb))) (Thompson 2018 / 2017 McDonald typical CIS). CSF-specific OCB may substitute for MRI DIT when DIS is met. Not PPMS. Not 2010 McDonald. magent does not read MRI or assay CSF. Not a diagnosis","purpose":"Apply Thompson 2018 / 2017 McDonald criteria for typical clinically isolated syndrome and return whether mcdonald_ms holds from caller-assigned typical CIS, no better explanation, attacks, lesions, DIS, MRI DIT, and CSF-specific oligoclonal bands.","markdown_url":"https://magentlab.com/docs/mcdonald-2017.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"mcdonald_2017"},{"name":"formula_expression","type":"string","description":"Thompson 2018 / 2017 McDonald typical CIS combination"},{"name":"mcdonald_ms","type":"boolean","description":"true iff typical_cis, no_better_explanation, and a published relapsing/CIS row hold. Not a diagnosis. Not PPMS. Not 2010 McDonald."},{"name":"typical_cis","type":"boolean","description":"Caller-assigned typical clinically isolated syndrome flag used"},{"name":"no_better_explanation","type":"boolean","description":"Caller-assigned no-better-explanation flag used"},{"name":"two_or_more_attacks","type":"boolean","description":"Caller-assigned ≥2 clinical attacks flag used"},{"name":"two_or_more_lesions","type":"boolean","description":"Caller-assigned objective clinical evidence of ≥2 lesions flag used"},{"name":"dis","type":"boolean","description":"Caller-assigned 2017 dissemination in space flag used"},{"name":"dit_mri","type":"boolean","description":"Caller-assigned MRI dissemination in time flag used"},{"name":"csf_specific_ocb","type":"boolean","description":"Caller-assigned CSF-specific oligoclonal bands flag used"},{"name":"criteria","type":"array","description":"Rows for each caller flag, relapsing_cis_pathway, and mcdonald_ms with factor and met"},{"name":"citation","type":"object","description":"Thompson 2018 Lancet Neurol McDonald citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"csf_specific_ocb":"false","dis":"false","dit_mri":"false","no_better_explanation":"true","two_or_more_attacks":"true","two_or_more_lesions":"true","typical_cis":"true"},{"csf_specific_ocb":"false","dis":"false","dit_mri":"false","no_better_explanation":"true","two_or_more_attacks":"true","two_or_more_lesions":"true","typical_cis":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/mcdonald-2017","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/mcdonald-2017?typical_cis=true&no_better_explanation=true&two_or_more_attacks=true&two_or_more_lesions=true&dis=false&dit_mri=false&csf_specific_ocb=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/mcdonald-2017","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/mcdonald-2024","description":"2024 McDonald typical CIS (Montalban 2025). mcdonald_ms iff typical_cis and no_better_explanation and: ≥2 attacks with ≥2 lesions; or ≥2 attacks with one lesion plus DIS; or CIS with ≥2 lesions plus MRI DIT, OCB, or kappa FLC; or CIS with one lesion plus DIS and MRI DIT, OCB, or kappa FLC. DIS = ≥2 of 5 topographies (optic nerve added). Kappa FLC interchangeable with OCB. Not 2017 McDonald. Not PPMS. Not RIS. magent does not read MRI or assay CSF. Not a diagnosis. Not a medical device.","parameters":[{"in":"query","name":"typical_cis","type":"boolean","description":"Typical clinically isolated syndrome as assigned by the caller (Montalban 2025 typical CIS / relapsing pathway). If false, mcdonald_ms is false; this tool does not diagnose MS from atypical presentations, PPMS, or RIS. true or false. magent does not examine the patient.","required":true,"example":"true"},{"in":"query","name":"no_better_explanation","type":"boolean","description":"No better explanation for the presentation as assigned by the caller (Montalban 2025). If false, mcdonald_ms is false. Remain vigilant for NMOSD. true or false. magent does not assign a better explanation.","required":true,"example":"true"},{"in":"query","name":"two_or_more_attacks","type":"boolean","description":"≥2 clinical attacks as assigned by the caller. true means two or more attacks; false means this is the first/CIS attack. true or false. magent does not date attacks.","required":true,"example":"true"},{"in":"query","name":"two_or_more_lesions","type":"boolean","description":"Objective clinical evidence of ≥2 lesions as assigned by the caller. true means ≥2 lesions; false means 1 lesion. true or false. magent does not examine the patient.","required":true,"example":"true"},{"in":"query","name":"periventricular","type":"boolean","description":"Caller-assigned typical periventricular MS lesion topography (one of five 2024 DIS locations). true or false. magent does not read MRI.","required":true,"example":"false"},{"in":"query","name":"cortical_or_juxtacortical","type":"boolean","description":"Caller-assigned typical cortical or juxtacortical MS lesion topography (one of five 2024 DIS locations). true or false. magent does not read MRI.","required":true,"example":"false"},{"in":"query","name":"infratentorial","type":"boolean","description":"Caller-assigned typical infratentorial MS lesion topography (one of five 2024 DIS locations). true or false. magent does not read MRI.","required":true,"example":"false"},{"in":"query","name":"spinal_cord","type":"boolean","description":"Caller-assigned typical spinal-cord MS lesion topography (one of five 2024 DIS locations). true or false. magent does not read MRI.","required":true,"example":"false"},{"in":"query","name":"optic_nerve","type":"boolean","description":"Caller-assigned typical optic-nerve topography (fifth 2024 DIS location; Montalban 2025). true or false. magent does not read MRI, OCT, or VEP.","required":true,"example":"false"},{"in":"query","name":"dit_mri","type":"boolean","description":"MRI dissemination in time as assigned by the caller (simultaneous Gd-enhancing and non-enhancing lesions, or a new T2 or Gd-enhancing lesion on follow-up vs baseline). true or false. magent does not read MRI.","required":true,"example":"false"},{"in":"query","name":"csf_specific_ocb","type":"boolean","description":"CSF-specific oligoclonal bands as assigned by the caller (2024 DIT substitute; interchangeable with kappa free-light chains). true or false. magent does not assay CSF.","required":true,"example":"false"},{"in":"query","name":"csf_kflc","type":"boolean","description":"CSF kappa free-light chains positive as assigned by the caller (2024: interchangeable with oligoclonal bands as the CSF DIT marker). Caller-assigned flag only; this tool does not apply a numeric kFLC index cutoff. true or false. magent does not assay CSF.","required":true,"example":"false"}],"errors":[{"code":"invalid_mcdonald_2024","message":"2024 McDonald typical-CIS flags must each be true or false as used in the Montalban 2025 relapsing typical-CIS pathway. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/mcdonald-2024","citation":{"authors":"Montalban X, Lebrun-Frénay C, Oh J, et al.","doi":"10.1016/S1474-4422(25)00270-4","id":"montalban-2025","pmid":"40975101","source":"Lancet Neurol. 2025;24(10):850-865","title":"Diagnosis of multiple sclerosis: 2024 revisions of the McDonald criteria","url":"https://doi.org/10.1016/S1474-4422(25)00270-4"},"formula_expression":"mcdonald_ms iff typical_cis and no_better_explanation and ((two_or_more_attacks and two_or_more_lesions) or (two_or_more_attacks and not two_or_more_lesions and dis) or (not two_or_more_attacks and two_or_more_lesions and (dit_mri or csf_specific_ocb or csf_kflc)) or (not two_or_more_attacks and not two_or_more_lesions and dis and (dit_mri or csf_specific_ocb or csf_kflc))) (Montalban 2025 / 2024 McDonald typical CIS). dis is true iff at least two of periventricular, cortical_or_juxtacortical, infratentorial, spinal_cord, optic_nerve are true. CSF kappa free-light chains are interchangeable with CSF-specific OCB as the CSF DIT substitute. Not PPMS. Not RIS. Not 2017 McDonald. magent does not read MRI, OCT, VEP, or assay CSF. Not a diagnosis","purpose":"Apply Montalban 2025 / 2024 McDonald criteria for typical clinically isolated syndrome and return whether mcdonald_ms holds from caller-assigned typical CIS, no better explanation, attacks, lesions, five DIS topographies (including optic nerve), MRI DIT, CSF-specific oligoclonal bands, and CSF kappa free-light chains.","markdown_url":"https://magentlab.com/docs/mcdonald-2024.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"mcdonald_2024"},{"name":"formula_expression","type":"string","description":"Montalban 2025 / 2024 McDonald typical CIS combination"},{"name":"mcdonald_ms","type":"boolean","description":"true iff typical_cis, no_better_explanation, and a published relapsing/CIS row hold. Not a diagnosis. Not PPMS. Not RIS. Not 2017 McDonald."},{"name":"typical_cis","type":"boolean","description":"Caller-assigned typical clinically isolated syndrome flag used"},{"name":"no_better_explanation","type":"boolean","description":"Caller-assigned no-better-explanation flag used"},{"name":"two_or_more_attacks","type":"boolean","description":"Caller-assigned ≥2 clinical attacks flag used"},{"name":"two_or_more_lesions","type":"boolean","description":"Caller-assigned objective clinical evidence of ≥2 lesions flag used"},{"name":"periventricular","type":"boolean","description":"Caller-assigned periventricular topography flag used"},{"name":"cortical_or_juxtacortical","type":"boolean","description":"Caller-assigned cortical or juxtacortical topography flag used"},{"name":"infratentorial","type":"boolean","description":"Caller-assigned infratentorial topography flag used"},{"name":"spinal_cord","type":"boolean","description":"Caller-assigned spinal-cord topography flag used"},{"name":"optic_nerve","type":"boolean","description":"Caller-assigned optic-nerve topography flag used (fifth 2024 DIS location)"},{"name":"dis","type":"boolean","description":"Computed 2024 dissemination in space: true iff at least two of the five caller-assigned topographies are true"},{"name":"dit_mri","type":"boolean","description":"Caller-assigned MRI dissemination in time flag used"},{"name":"csf_specific_ocb","type":"boolean","description":"Caller-assigned CSF-specific oligoclonal bands flag used"},{"name":"csf_kflc","type":"boolean","description":"Caller-assigned CSF kappa free-light chains flag used (interchangeable with OCB; not a numeric cutoff)"},{"name":"criteria","type":"array","description":"Rows for each caller flag, computed dis, relapsing_cis_pathway, and mcdonald_ms with factor and met"},{"name":"citation","type":"object","description":"Montalban 2025 Lancet Neurol McDonald citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"cortical_or_juxtacortical":"false","csf_kflc":"false","csf_specific_ocb":"false","dit_mri":"false","infratentorial":"false","no_better_explanation":"true","optic_nerve":"false","periventricular":"false","spinal_cord":"false","two_or_more_attacks":"true","two_or_more_lesions":"true","typical_cis":"true"},{"cortical_or_juxtacortical":"false","csf_kflc":"false","csf_specific_ocb":"false","dit_mri":"false","infratentorial":"false","no_better_explanation":"true","optic_nerve":"false","periventricular":"false","spinal_cord":"false","two_or_more_attacks":"true","two_or_more_lesions":"true","typical_cis":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/mcdonald-2024","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/mcdonald-2024?typical_cis=true&no_better_explanation=true&two_or_more_attacks=true&two_or_more_lesions=true&periventricular=false&cortical_or_juxtacortical=false&infratentorial=false&spinal_cord=false&optic_nerve=false&dit_mri=false&csf_specific_ocb=false&csf_kflc=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/mcdonald-2024","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/esus","description":"ESUS (Hart 2014). True iff all five caller-assigned flags hold: non-lacunar infarct on CT/MRI; no ≥50% stenosis supplying the ischaemia; no major-risk cardioembolic source; no other specific cause; and Panel 3 minimum workup (brain CT/MRI, 12-lead ECG, precordial echo, ≥24 h automated rhythm monitoring (not telemetry), extra- and intracranial arterial imaging). Incomplete workup is not ESUS. Not a stroke diagnosis, not TOAST cryptogenic, not anticoagulation. magent does not read imaging.","parameters":[{"in":"query","name":"non_lacunar_infarct","type":"boolean","description":"Stroke detected by CT or MRI that is not lacunar, as assigned by the caller (Hart 2014 Panel 2). Lacunar = subcortical infarct ≤1.5 cm (≤2.0 cm on MRI diffusion images) in largest dimension, in the distribution of the small penetrating cerebral arteries. true or false. magent does not read imaging.","required":true,"example":"true"},{"in":"query","name":"no_stenosis_ge_50","type":"boolean","description":"Absence of extracranial or intracranial atherosclerosis causing ≥50% luminal stenosis in arteries supplying the area of ischaemia, as assigned by the caller (Hart 2014 Panel 2). true means no such stenosis. true or false. magent does not read vascular imaging.","required":true,"example":"true"},{"in":"query","name":"no_major_risk_cardioembolic","type":"boolean","description":"No major-risk cardioembolic source, as assigned by the caller (Hart 2014 Panel 2). Major-risk sources (paper footnote): permanent or paroxysmal atrial fibrillation, sustained atrial flutter, intracardiac thrombus, prosthetic cardiac valve, atrial myxoma or other cardiac tumours, mitral stenosis, recent (<4 weeks) myocardial infarction, left ventricular ejection fraction less than 30%, valvular vegetations, or infective endocarditis. true or false. The caller assigns this boolean; magent does not enumerate each source as a separate required param.","required":true,"example":"true"},{"in":"query","name":"no_other_specific_cause","type":"boolean","description":"No other specific cause identified, as assigned by the caller (Hart 2014 Panel 2). Paper examples: arteritis, dissection, migraine/vasospasm, drug misuse. true or false. magent does not diagnose an alternative aetiology.","required":true,"example":"true"},{"in":"query","name":"minimum_workup","type":"boolean","description":"Hart 2014 Panel 3 minimum diagnostic assessment, as assigned by the caller. true only if brain CT or MRI, 12-lead ECG, precordial echocardiography, cardiac monitoring for ≥24 h with automated rhythm detection (telemetry is not sufficient), and imaging of both extracranial and intracranial arteries supplying the ischaemic territory have been done. Incomplete workup returns esus false (not HTTP 400). true or false. magent does not read imaging.","required":true,"example":"true"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/esus","citation":{"authors":"Hart RG, Diener HC, Coutts SB, Easton JD, Granger CB, O'Donnell MJ, Sacco RL, Connolly SJ, Cryptogenic Stroke/ESUS International Working Group","doi":"10.1016/S1474-4422(13)70310-7","id":"hart-2014","pmid":"24646875","source":"Lancet Neurol. 2014;13(4):429-438","title":"Embolic strokes of undetermined source: the case for a new clinical construct","url":"https://doi.org/10.1016/S1474-4422(13)70310-7"},"formula_expression":"esus iff non_lacunar_infarct and no_stenosis_ge_50 and no_major_risk_cardioembolic and no_other_specific_cause and minimum_workup (Hart 2014 Panel 2 + Panel 3)","purpose":"Apply the Hart 2014 ESUS construct (Panel 2 criteria plus Panel 3 minimum diagnostic assessment) and return whether caller-assigned flags meet embolic stroke of undetermined source.","markdown_url":"https://magentlab.com/docs/esus.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"esus"},{"name":"formula_expression","type":"string","description":"Hart 2014 Panel 2 plus Panel 3 ESUS construct (all five flags required)"},{"name":"esus","type":"boolean","description":"true only when all five caller-assigned flags hold. Classification, not a score. Incomplete workup is false, not a 400. Not a stroke diagnosis and not an anticoagulation recommendation."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met for non_lacunar_infarct, no_stenosis_ge_50, no_major_risk_cardioembolic, no_other_specific_cause, and minimum_workup. esus iff all are met."},{"name":"citation","type":"object","description":"Hart 2014 Lancet Neurol citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"minimum_workup":"true","no_major_risk_cardioembolic":"true","no_other_specific_cause":"true","no_stenosis_ge_50":"true","non_lacunar_infarct":"true"},{"minimum_workup":"true","no_major_risk_cardioembolic":"true","no_other_specific_cause":"true","no_stenosis_ge_50":"true","non_lacunar_infarct":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/esus","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/esus?non_lacunar_infarct=true&no_stenosis_ge_50=true&no_major_risk_cardioembolic=true&no_other_specific_cause=true&minimum_workup=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/esus","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/pascal","description":"PASCAL (PFO-Associated Stroke Causal Likelihood; Kent 2021 JAMA Table 1) from a caller-assigned RoPE total (0-10; magent does not recompute RoPE) plus large-shunt and atrial-septal-aneurysm flags. high_rope is RoPE ≥7 (not >7). high_risk_pfo is large shunt and/or ASA. probable if both, possible if exactly one, unlikely if neither. Not a closure order, not RoPE, not ESUS. Trial ages 18-60 are a limitation. magent does not read echocardiography.","parameters":[{"in":"query","name":"rope_score","type":"integer","description":"Caller-assigned RoPE total integer 0-10 (Kent 2013 components already summed; related tool rope). magent does not recompute RoPE. high_rope is true when rope_score is 7 or greater (Kent 2021 Table 1 / NCBI reprint; not greater-than-7 only).","required":true,"example":"8"},{"in":"query","name":"large_shunt","type":"boolean","description":"Large-sized shunt as assigned by the caller (Kent 2021 Table 1 high-risk PFO feature). true or false. high_risk_pfo is true if this flag or atrial_septal_aneurysm is true. magent does not echo this flag and does not read echocardiography.","required":true,"example":"true"},{"in":"query","name":"atrial_septal_aneurysm","type":"boolean","description":"Atrial septal aneurysm (ASA) as assigned by the caller (Kent 2021 Table 1 high-risk PFO feature). true or false. high_risk_pfo is true if this flag or large_shunt is true. magent does not echo this flag and does not read echocardiography.","required":true,"example":"false"}],"errors":[{"code":"invalid_pascal","message":"rope_score must be an integer from 0 to 10 (Kent 2021 PASCAL; magent does not recompute RoPE). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/pascal","citation":{"authors":"Kent DM, Saver JL, Kasner SE, Nelson J, Carroll JD, Chatellier G, Derumeaux G, Furlan AJ, Herrmann HC, Jüni P, Kim JS, Koethe B, Lee PH, Lefebvre B, Mattle HP, Meier B, Reisman M, Smalling RW, Soendergaard L, Song JK, Mas JL, Thaler DE","doi":"10.1001/jama.2021.20956","id":"kent-2021","pmid":"34905030","source":"JAMA. 2021;326(22):2277-2286","title":"Heterogeneity of Treatment Effects in an Analysis of Pooled Individual Patient Data From Randomized Trials of Device Closure of Patent Foramen Ovale After Stroke","url":"https://doi.org/10.1001/jama.2021.20956"},"formula_expression":"high_rope iff rope_score >= 7; high_risk_pfo iff large_shunt or atrial_septal_aneurysm; probable iff both; possible iff exactly one; unlikely iff neither (Kent 2021 Table 1 PASCAL). magent does not recompute RoPE","purpose":"Apply the Kent 2021 PASCAL classification (Table 1) from a caller-assigned RoPE total and large-shunt plus atrial-septal-aneurysm flags, and return probable, possible, or unlikely PFO-related stroke likelihood.","markdown_url":"https://magentlab.com/docs/pascal.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"pascal"},{"name":"formula_expression","type":"string","description":"Kent 2021 Table 1 PASCAL classification"},{"name":"pascal_class","type":"string","description":"probable if high_rope and high_risk_pfo; possible if exactly one; unlikely if neither. Not a closure order."},{"name":"high_rope","type":"boolean","description":"true when the caller-assigned rope_score is 7 or greater (not greater-than-7 only)"},{"name":"high_risk_pfo","type":"boolean","description":"true when large_shunt or atrial_septal_aneurysm is true (large-sized shunt and/or ASA). Input flags are not echoed."},{"name":"rope_score","type":"integer","description":"Echo of the caller-assigned RoPE total 0-10. Not a RoPE recomputation."},{"name":"criteria","type":"array","description":"Rows for high_rope (with rope_score value) and high_risk_pfo with factor and met"},{"name":"citation","type":"object","description":"Kent 2021 JAMA citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"atrial_septal_aneurysm":"false","large_shunt":"true","rope_score":"8"},{"atrial_septal_aneurysm":"false","large_shunt":"true","rope_score":"8"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/pascal","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/pascal?rope_score=8&large_shunt=true&atrial_septal_aneurysm=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/pascal","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/cts-6","description":"Graham 2006 CTS-6 from six caller-assigned booleans with published discrete weights (median-territory numbness 3.5, nocturnal numbness 4, thenar atrophy or weakness 5, Phalen 5, two-point discrimination loss 4.5, Tinel 4; max 26). Score >5 is associated with ≈25% probability of CTS; score >12 with ≈80%. magent does not examine the patient. Deterministic published arithmetic with citation; not a CTS diagnosis, not an EMG order, not a Boston questionnaire, and not a medical device.","parameters":[{"in":"query","name":"median_numbness","type":"boolean","description":"Numbness predominantly or exclusively in the median nerve territory (Graham 2006, 3.5 if true). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"nocturnal_numbness","type":"boolean","description":"Nocturnal numbness (Graham 2006, 4 if true). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"thenar_atrophy_or_weakness","type":"boolean","description":"Thenar atrophy or weakness (Graham 2006, 5 if true). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"phalen_positive","type":"boolean","description":"Positive Phalen test (Graham 2006, 5 if true). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"two_point_discrimination_loss","type":"boolean","description":"Loss of two-point discrimination (Graham 2006, 4.5 if true). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"tinel_positive","type":"boolean","description":"Positive Tinel sign (Graham 2006, 4 if true). true or false as assigned by the caller. magent does not examine the patient.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/cts-6","citation":{"authors":"Graham B, Regehr G, Naglie G, Wright JG","doi":"10.1016/j.jhsa.2006.03.005","id":"graham-2006","pmid":"16886290","source":"J Hand Surg Am. 2006;31(6):919-924","title":"Development and validation of diagnostic criteria for carpal tunnel syndrome","url":"https://doi.org/10.1016/j.jhsa.2006.03.005"},"formula_expression":"CTS-6 = 3.5*median_numbness + 4*nocturnal_numbness + 5*thenar_atrophy_or_weakness + 5*phalen_positive + 4.5*two_point_discrimination_loss + 4*tinel_positive; max 26; score > 5 associated with ≈25% probability of CTS; score > 12 associated with ≈80% (Graham 2006)","purpose":"Sum the six Graham 2006 CTS-6 caller-assigned flags at their published discrete weights and return the total, the >5 and >12 cutoffs, and the matching band.","markdown_url":"https://magentlab.com/docs/cts-6.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"cts_6"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"number","description":"CTS-6 points 0.0-26.0 (float; no rounding)"},{"name":"max_score","type":"integer","description":"26"},{"name":"cts6_band","type":"string","description":"le_5 (score ≤5), gt_5_le_12 (5 < score ≤12), or gt_12 (score >12). Graham 2006 cutoffs."},{"name":"above_25pct_cutoff","type":"boolean","description":"true iff score > 5 (Graham 2006 ≈25% probability of CTS). Score 5 is not above."},{"name":"above_80pct_cutoff","type":"boolean","description":"true iff score > 12 (Graham 2006 ≈80% probability of CTS). Score 12 is not above."},{"name":"components","type":"array","description":"Per-flag Graham 2006 weights"},{"name":"citation","type":"object","description":"Graham J Hand Surg Am 2006 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"median_numbness":"false","nocturnal_numbness":"false","phalen_positive":"false","thenar_atrophy_or_weakness":"false","tinel_positive":"false","two_point_discrimination_loss":"false"},{"median_numbness":"false","nocturnal_numbness":"false","phalen_positive":"false","thenar_atrophy_or_weakness":"false","tinel_positive":"false","two_point_discrimination_loss":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/cts-6","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/cts-6?median_numbness=false&nocturnal_numbness=false&thenar_atrophy_or_weakness=false&phalen_positive=false&two_point_discrimination_loss=false&tinel_positive=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/cts-6","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/hunt-hess","description":"Hunt and Hess 1968 SAH surgical-risk grade from a caller-assigned grade 1-5. Serious systemic disease (as assigned by the caller) places the patient in the next less favorable category, capped at 5. Deterministic published grade with citation. Not a diagnosis; not WFNS; not Hunt-Kosnik 1974 grade 0/1a.","parameters":[{"in":"query","name":"grade","type":"integer","description":"Hunt and Hess 1968 clinical grade 1-5 as assigned by the caller. magent does not examine the patient.","required":true,"example":"2"},{"in":"query","name":"serious_systemic_disease","type":"boolean","description":"true if serious systemic disease is present (hypertension, diabetes, severe arteriosclerosis, chronic pulmonary disease, or severe angiographic vasospasm as assigned by the caller). The 1968 paper places the patient in the next less favorable category.","required":true,"example":"false"}],"errors":[{"code":"invalid_hunt_hess_grade","message":"grade must be an integer from 1 to 5 (Hunt and Hess 1968). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/hunt-hess","citation":{"authors":"Hunt WE, Hess RM","doi":"10.3171/jns.1968.28.1.0014","id":"hunt-hess-1968","source":"J Neurosurg. 1968;28(1):14-20","title":"Surgical risk as related to time of intervention in the repair of intracranial aneurysms","url":"https://doi.org/10.3171/jns.1968.28.1.0014"},"formula_expression":"assigned_grade = min(5, grade + 1) if serious_systemic_disease, else grade; Hunt and Hess 1968 grades 1-5","purpose":"Return the Hunt and Hess 1968 subarachnoid-hemorrhage surgical-risk grade from a caller-assigned grade 1-5, applying the paper's next-less-favorable bump when serious systemic disease is present.","markdown_url":"https://magentlab.com/docs/hunt-hess.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"hunt_hess"},{"name":"formula_expression","type":"string","description":"Published grade rule"},{"name":"input_grade","type":"integer","description":"Caller-assigned grade 1-5"},{"name":"serious_systemic_disease","type":"boolean","description":"Whether the 1968 systemic-disease bump was applied"},{"name":"grade","type":"integer","description":"Assigned grade after the 1968 bump, 1-5"},{"name":"score","type":"integer","description":"Same as assigned grade"},{"name":"max_score","type":"integer","description":"5"},{"name":"description","type":"string","description":"1968 wording for the assigned grade"},{"name":"components","type":"array","description":"Assigned-grade component"},{"name":"citation","type":"object","description":"Hunt and Hess 1968"},{"name":"disclaimer","type":"string","description":"Not a medical device"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"grade":"2","serious_systemic_disease":"false"},{"grade":"2","serious_systemic_disease":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/hunt-hess","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/hunt-hess?grade=2&serious_systemic_disease=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/hunt-hess","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/phases","description":"Greving 2014 PHASES 5-year rupture risk for an unruptured intracranial aneurysm. Caller assigns population (north_america_europe 0, japanese 3, finnish 5), hypertension (1), age >=70 (1), size mm (<7 0, 7.0-9.9 3, 10.0-19.9 6, >=20 10), earlier SAH (1), and site (ica 0, mca 2, aca_pcom_posterior 4). Returns points (max 22) and grouped 5-year risk percent. Not a treatment order or PHASES of care. magent does not assign ancestry or read imaging.","parameters":[{"in":"query","name":"population","type":"string","description":"Caller-assigned Greving 2014 geographic study population: north_america_europe (0; North America and Europe other than Finland), japanese (3), or finnish (5). magent does not assign ancestry.","required":true,"example":"north_america_europe"},{"in":"query","name":"hypertension","type":"boolean","description":"Caller-assigned history of hypertension (Greving 2014). true scores 1. magent does not take a blood-pressure reading.","required":true,"example":"false"},{"in":"query","name":"age","type":"integer","description":"Age in years (integer 18-120). <70 scores 0; ≥70 scores 1 (Greving 2014).","required":true,"example":"50"},{"in":"query","name":"aneurysm_mm","type":"number","description":"Caller-assigned maximum aneurysm diameter in millimetres (1.0-50.0). <7.0 scores 0; 7.0-9.9 scores 3; 10.0-19.9 scores 6; ≥20.0 scores 10. magent does not read imaging.","required":true,"example":"5"},{"in":"query","name":"earlier_sah","type":"boolean","description":"Earlier subarachnoid hemorrhage from another aneurysm (Greving 2014). true scores 1. Not a diagnosis of current rupture.","required":true,"example":"false"},{"in":"query","name":"site","type":"string","description":"Caller-assigned aneurysm site as grouped in Greving 2014: ica (0), mca (2), or aca_pcom_posterior (4; anterior cerebral, anterior communicating, posterior communicating, or posterior circulation). magent does not read imaging.","required":true,"example":"ica"}],"errors":[{"code":"invalid_phases_population","message":"population must be north_america_europe, japanese, or finnish (Greving 2014 PHASES). Returned before settlement; you are not charged.","status":400},{"code":"invalid_phases_size","message":"aneurysm_mm must be a number from 1.0 to 50.0 (Greving 2014 PHASES). Returned before settlement; you are not charged.","status":400},{"code":"invalid_phases_site","message":"site must be ica, mca, or aca_pcom_posterior (Greving 2014 PHASES). Returned before settlement; you are not charged.","status":400},{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/phases","citation":{"authors":"Greving JP, Wermer MJH, Brown RD Jr, et al.","doi":"10.1016/S1474-4422(13)70263-1","id":"greving-2014","pmid":"24290159","source":"Lancet Neurol. 2014;13(1):59-66","title":"Development of the PHASES score for prediction of risk of rupture of intracranial aneurysms: a pooled analysis of six prospective cohort studies","url":"https://doi.org/10.1016/S1474-4422(13)70263-1"},"formula_expression":"PHASES = population (north_america_europe 0, japanese 3, finnish 5) + hypertension 1 + age>=70 1 + size (<7.0 0, 7.0-9.9 3, 10.0-19.9 6, >=20.0 10) + earlier_sah 1 + site (ica 0, mca 2, aca_pcom_posterior 4); max 22","purpose":"Sum Greving 2014 PHASES points (population, hypertension, age, size, earlier SAH, site; max 22) and return the published grouped 5-year rupture risk percent.","markdown_url":"https://magentlab.com/docs/phases.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"phases"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"PHASES points 0-22"},{"name":"max_score","type":"integer","description":"22"},{"name":"five_year_rupture_risk_percent","type":"number","description":"Greving 2014 grouped 5-year rupture risk percent (≤2 → 0.4 through ≥12 → 17.8). Not a treatment order."},{"name":"population","type":"string","description":"Caller-assigned population token used for scoring"},{"name":"age_years","type":"integer","description":"Age used for the ≥70 criterion"},{"name":"aneurysm_mm","type":"number","description":"Aneurysm diameter in millimetres used for size points"},{"name":"site","type":"string","description":"Caller-assigned site token used for scoring"},{"name":"components","type":"array","description":"Per-factor PHASES points"},{"name":"citation","type":"object","description":"Greving et al. Lancet Neurol 2014 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"50","aneurysm_mm":"5","earlier_sah":"false","hypertension":"false","population":"north_america_europe","site":"ica"},{"age":"50","aneurysm_mm":"5","earlier_sah":"false","hypertension":"false","population":"north_america_europe","site":"ica"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/phases","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/phases?population=north_america_europe&hypertension=false&age=50&aneurysm_mm=5&earlier_sah=false&site=ica","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/phases","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/abc2","description":"Kothari 1996 ABC/2 ellipsoid ICH volume: (a_cm × b_cm × c_cm) / 2, rounded to one decimal milliliter. A is the largest diameter, B the perpendicular diameter, and C slice count times thickness; the caller supplies all three in cm. Volume estimate only; not the ICH Score. magent does not read imaging or choose A/B/C on the scan. Not a diagnosis.","parameters":[{"in":"query","name":"a_cm","type":"number","description":"Largest diameter A in cm (0.1-20). Caller-assigned; magent does not read a scan.","required":true,"example":"2"},{"in":"query","name":"b_cm","type":"number","description":"Largest diameter B perpendicular to A, in cm (0.1-20). Caller-assigned.","required":true,"example":"2"},{"in":"query","name":"c_cm","type":"number","description":"C in cm (0.1-20): number of slices times slice thickness. Caller-assigned.","required":true,"example":"2"}],"errors":[{"code":"invalid_abc2_dimension","message":"a_cm, b_cm, and c_cm must each be a number from 0.1 to 20. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/abc2","citation":{"authors":"Kothari RU, Brott T, Broderick JP, et al.","doi":"10.1161/01.STR.27.8.1304","id":"kothari-1996","source":"Stroke. 1996;27(8):1304-1305","title":"The ABCs of measuring intracerebral hemorrhage volumes","url":"https://doi.org/10.1161/01.STR.27.8.1304"},"formula_expression":"volume_ml = (a_cm * b_cm * c_cm) / 2","purpose":"Compute the Kothari 1996 ABC/2 ellipsoid ICH volume as (a_cm × b_cm × c_cm) / 2 from caller-supplied diameters in centimeters.","markdown_url":"https://magentlab.com/docs/abc2.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"abc2"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"a_cm","type":"number","description":"Largest diameter A used, cm"},{"name":"b_cm","type":"number","description":"Perpendicular diameter B used, cm"},{"name":"c_cm","type":"number","description":"Slice count times thickness C used, cm"},{"name":"volume_ml","type":"number","description":"ABC/2 volume in mL, 1 decimal"},{"name":"citation","type":"object","description":"Kothari 1996 Stroke citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"a_cm":"2","b_cm":"2","c_cm":"2"},{"a_cm":"2","b_cm":"2","c_cm":"2"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/abc2","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/abc2?a_cm=2&b_cm=2&c_cm=2","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/abc2","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/fisher","description":"Fisher 1980 original CT groups 1-4 for subarachnoid hemorrhage as assigned from CT by the caller. Returns the published group and description. Group 3 (thick SAH) was the high-vasospasm group; group 4 is ICH/IVH without thick SAH, not a worse grade than 3. Not modified Fisher 2006. Not a diagnosis; magent does not read the CT.","parameters":[{"in":"query","name":"grade","type":"integer","description":"Fisher 1980 original CT group 1-4 as assigned by the caller from CT. magent does not read the CT.","required":true,"example":"1"}],"errors":[{"code":"invalid_fisher_grade","message":"grade must be an integer from 1 to 4 (Fisher 1980 groups). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/fisher","citation":{"authors":"Fisher CM, Kistler JP, Davis JM","doi":"10.1227/00006123-198001000-00001","id":"fisher-1980","pmid":"7354892","source":"Neurosurgery. 1980;6(1):1-9","title":"Relation of cerebral vasospasm to subarachnoid hemorrhage visualized by computerized tomographic scanning","url":"https://doi.org/10.1227/00006123-198001000-00001"},"formula_expression":"Fisher 1980 original CT group 1-4 as assigned by the caller","purpose":"Return the Fisher 1980 original CT group 1-4 from a caller-assigned grade, with the published group description.","markdown_url":"https://magentlab.com/docs/fisher.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"fisher"},{"name":"formula_expression","type":"string","description":"Published group rule"},{"name":"grade","type":"integer","description":"Caller-assigned Fisher 1980 group 1-4"},{"name":"score","type":"integer","description":"Same as grade"},{"name":"max_score","type":"integer","description":"4"},{"name":"description","type":"string","description":"1980 wording for that group"},{"name":"components","type":"array","description":"Assigned-grade component"},{"name":"citation","type":"object","description":"Fisher 1980"},{"name":"disclaimer","type":"string","description":"Not a medical device"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"grade":"1"},{"grade":"1"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/fisher","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/fisher?grade=1","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/fisher","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/modified-fisher","description":"Frontera 2006 modified Fisher CT grades 0-4 for subarachnoid hemorrhage as assigned from CT by the caller. Returns the published grade and description (0 no SAH or IVH; 1 focal or diffuse thin SAH, no IVH; 2 thin SAH with IVH; 3 thick SAH, no IVH; 4 thick SAH with IVH). Not Fisher 1980 original groups 1-4. Not a diagnosis; magent does not read the CT or invent a millimetre cutoff or vasospasm percentage.","parameters":[{"in":"query","name":"grade","type":"integer","description":"Frontera 2006 modified Fisher CT grade 0-4 as assigned by the caller from CT (0 no SAH or IVH; 1 focal or diffuse thin SAH, no IVH; 2 focal or diffuse thin SAH with IVH; 3 thick SAH, no IVH; 4 thick SAH with IVH). magent does not read the CT. Not Fisher 1980 original groups 1-4.","required":true,"example":"1"}],"errors":[{"code":"invalid_modified_fisher_grade","message":"grade must be an integer from 0 to 4 (Frontera 2006 modified Fisher). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/modified-fisher","citation":{"authors":"Frontera JA, Claassen J, Schmidt JM, et al.","doi":"10.1227/01.NEU.0000218821.34014.1B","id":"frontera-2006","pmid":"16823296","source":"Neurosurgery. 2006;59(1):21-27","title":"Prediction of symptomatic vasospasm after subarachnoid hemorrhage: the modified fisher scale","url":"https://doi.org/10.1227/01.NEU.0000218821.34014.1B"},"formula_expression":"Frontera 2006 modified Fisher CT grade 0-4 as assigned by the caller","purpose":"Return the Frontera 2006 modified Fisher CT grade 0-4 from a caller-assigned grade, with the published grade description.","markdown_url":"https://magentlab.com/docs/modified-fisher.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"modified_fisher"},{"name":"formula_expression","type":"string","description":"Published grade rule"},{"name":"grade","type":"integer","description":"Caller-assigned Frontera 2006 modified Fisher grade 0-4"},{"name":"score","type":"integer","description":"Same as grade"},{"name":"max_score","type":"integer","description":"4"},{"name":"description","type":"string","description":"Frontera 2006 wording for that grade"},{"name":"components","type":"array","description":"Assigned-grade component"},{"name":"citation","type":"object","description":"Frontera 2006"},{"name":"disclaimer","type":"string","description":"Not a medical device"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"grade":"1"},{"grade":"1"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/modified-fisher","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/modified-fisher?grade=1","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/modified-fisher","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/four-score","description":"FOUR score (Wijdicks 2005) from caller-assigned eye, motor, brainstem, and respiration integers 0-4; magent sums only (max 16) and does not pick a component from a narrative. Eye 4 tracking/blink to command to 0 closed to pain; motor 4 thumbs-up/fist/peace to 0 none or myoclonus status; brainstem 4 pupil and corneal present to 0 pupil, corneal, and cough absent; respiration 4 not intubated regular to 0 ventilator rate or apnea. Not a diagnosis and not a GCS conversion.","parameters":[{"in":"query","name":"eye","type":"integer","description":"Caller-assigned Wijdicks 2005 eye points (integer 0-4). magent does not pick the component from a narrative. 4 tracking or blink to command; 3 open not tracking; 2 open to voice; 1 open to pain; 0 closed to pain.","required":true,"example":"4"},{"in":"query","name":"motor","type":"integer","description":"Caller-assigned Wijdicks 2005 motor points (integer 0-4). magent does not pick the component from a narrative. 4 thumbs-up, fist, or peace to command; 3 localizing; 2 flexion; 1 extension; 0 none or myoclonus status.","required":true,"example":"4"},{"in":"query","name":"brainstem","type":"integer","description":"Caller-assigned Wijdicks 2005 brainstem points (integer 0-4). magent does not pick the component from a narrative. 4 pupil and corneal present; 3 one pupil wide and fixed; 2 pupil or corneal absent; 1 pupil and corneal absent; 0 pupil, corneal, and cough absent.","required":true,"example":"4"},{"in":"query","name":"respiration","type":"integer","description":"Caller-assigned Wijdicks 2005 respiration points (integer 0-4). magent does not pick the component from a narrative. 4 not intubated regular; 3 Cheyne-Stokes; 2 irregular; 1 breathes above ventilator; 0 ventilator rate or apnea.","required":true,"example":"4"}],"errors":[{"code":"invalid_four_component","message":"eye, motor, brainstem, and respiration must each be an integer from 0 to 4 (Wijdicks 2005). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/four-score","citation":{"authors":"Wijdicks EFM, Bamlet WR, Maramattom BV, Manno EM, McClelland RL","doi":"10.1002/ana.20611","id":"wijdicks-2005","pmid":"16178024","source":"Ann Neurol. 2005;58(4):585-593","title":"Validation of a new coma scale: The FOUR score","url":"https://doi.org/10.1002/ana.20611"},"formula_expression":"FOUR = eye + motor + brainstem + respiration; each caller-assigned integer 0-4; max 16","purpose":"Compute the FOUR score as the sum of caller-assigned eye, motor, brainstem, and respiration integers 0-4.","markdown_url":"https://magentlab.com/docs/four-score.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"four_score"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Total points 0-16"},{"name":"max_score","type":"integer","description":"Always 16"},{"name":"components","type":"array","description":"Per-sign 0-4 points"},{"name":"citation","type":"object","description":"Wijdicks 2005 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"brainstem":"4","eye":"4","motor":"4","respiration":"4"},{"brainstem":"4","eye":"4","motor":"4","respiration":"4"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/four-score","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/four-score?eye=4&motor=4&brainstem=4&respiration=4","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/four-score","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/thrive","description":"THRIVE (Totaled Health Risks in Vascular Events; Flint 2010 AJNR) from trichotomized age (<=59 0, 60-79 1, >=80 2), trichotomized NIHSS (<=10 0, 11-20 2, >=21 4), and chronic disease scale (hypertension, diabetes, atrial fibrillation; 1 each). Score 0-9; bands low 0-2, moderate 3-5, high 6-9 with published 90-day mRS 0-2 and mortality percents. Not a treatment recommendation. magent does not examine the patient or assign NIHSS.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Trichotomized: ≤59 scores 0; 60-79 scores 1; ≥80 scores 2 (1 point per age level).","required":true,"example":"70"},{"in":"query","name":"nihss","type":"integer","description":"Caller-assigned NIH Stroke Scale total (integer 0-42). Trichotomized: ≤10 scores 0; 11-20 scores 2; ≥21 scores 4 (2 points per NIHSS level). magent does not examine the patient.","required":true,"example":"12"},{"in":"query","name":"hypertension","type":"boolean","description":"Hypertension on the chronic disease scale (CDS). true scores 1; false scores 0.","required":true,"example":"true"},{"in":"query","name":"diabetes","type":"boolean","description":"Diabetes mellitus on the chronic disease scale (CDS). true scores 1; false scores 0.","required":true,"example":"false"},{"in":"query","name":"atrial_fibrillation","type":"boolean","description":"Atrial fibrillation on the chronic disease scale (CDS). true scores 1; false scores 0.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_nihss","message":"nihss must be an integer from 0 to 42. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/thrive","citation":{"authors":"Flint AC, Cullen SP, Faigeles BG, Rao VA","doi":"10.3174/ajnr.A2050","id":"flint-2010","pmid":"20223889","source":"AJNR Am J Neuroradiol. 2010;31(7):1192-1196","title":"Predicting long-term outcome after endovascular stroke treatment: the totaled health risks in vascular events score","url":"https://doi.org/10.3174/ajnr.A2050"},"formula_expression":"THRIVE = trichotomized_age + trichotomized_nihss + CDS; age <=59 0, 60-79 1, >=80 2; NIHSS <=10 0, 11-20 2, >=21 4; hypertension, diabetes, atrial fibrillation 1 each (CDS 0-3); bands 0-2 / 3-5 / 6-9; max 9","purpose":"Compute the Flint 2010 THRIVE (Totaled Health Risks in Vascular Events) score from trichotomized age, trichotomized NIHSS, and the chronic disease scale (hypertension, diabetes mellitus, atrial fibrillation).","markdown_url":"https://magentlab.com/docs/thrive.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"thrive"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Total points 0-9"},{"name":"max_score","type":"integer","description":"Always 9"},{"name":"thrive_band","type":"string","description":"low (0-2), moderate (3-5), or high (6-9) from Flint 2010"},{"name":"good_outcome_percent","type":"number","description":"Published 90-day mRS 0-2 percent for that band (Flint 2010)"},{"name":"mortality_percent","type":"number","description":"Published 90-day mortality percent for that band (Flint 2010)"},{"name":"cds","type":"integer","description":"Chronic disease scale 0-3"},{"name":"age_years","type":"integer","description":"Age used for trichotomized age points"},{"name":"nihss","type":"integer","description":"Caller-assigned NIHSS used for points"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Flint 2010 AJNR citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"70","atrial_fibrillation":"false","diabetes":"false","hypertension":"true","nihss":"12"},{"age":"70","atrial_fibrillation":"false","diabetes":"false","hypertension":"true","nihss":"12"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/thrive","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/thrive?age=70&nihss=12&hypertension=true&diabetes=false&atrial_fibrillation=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/thrive","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/bmv","description":"Farris 2017 brain metastasis velocity: bmv = new_brain_metastases / years_since_first_srs, 1 decimal. new_brain_metastases integer 0-200; years_since_first_srs 0.01-30. Low if BMV <4 (median OS 12.4 months after initial distant brain failure), intermediate 4-13 (8.2), high >13 (4.3). Does not floor BMV (NRG-BN009). Not time since last SRS. magent does not count metastases on imaging. Not a diagnosis. Not a medical device.","parameters":[{"in":"query","name":"new_brain_metastases","type":"integer","description":"Cumulative number of new brain metastases since first SRS (integer 0-200). Caller-assigned; magent does not count metastases on imaging.","required":true,"example":"3"},{"in":"query","name":"years_since_first_srs","type":"number","description":"Years since first SRS (0.01-30; must be > 0). Farris 2017 uses time since first SRS, not time since last SRS.","required":true,"example":"1"}],"errors":[{"code":"invalid_new_brain_metastases","message":"new_brain_metastases must be an integer from 0 to 200 (Farris 2017 cumulative new metastases since first SRS). Returned before settlement; you are not charged.","status":400},{"code":"invalid_years_since_srs","message":"years_since_first_srs must be a number from 0.01 to 30 (Farris 2017 years since first SRS; must be > 0). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/bmv","citation":{"authors":"Farris M, McTyre ER, Cramer CK, et al.","doi":"10.1016/j.ijrobp.2017.01.201","id":"farris-2017","pmid":"28586952","source":"Int J Radiat Oncol Biol Phys. 2017 May 1;98(1):169-175","title":"Brain Metastasis Velocity: A Novel Prognostic Metric Predictive of Overall Survival and Freedom From Whole-Brain Radiation Therapy After Distant Brain Failure Following Upfront Radiosurgery Alone","url":"https://doi.org/10.1016/j.ijrobp.2017.01.201"},"formula_expression":"bmv = new_brain_metastases / years_since_first_srs","purpose":"Compute Farris 2017 brain metastasis velocity as new_brain_metastases / years_since_first_srs and report the published low, intermediate, or high group plus that group's median overall survival after initial distant brain failure.","markdown_url":"https://magentlab.com/docs/bmv.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"bmv"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"new_brain_metastases","type":"integer","description":"Cumulative new brain metastases since first SRS used"},{"name":"years_since_first_srs","type":"number","description":"Years since first SRS used"},{"name":"bmv","type":"number","description":"Brain metastasis velocity in new metastases per year, 1 decimal"},{"name":"risk_group","type":"string","description":"Farris 2017 group: low (BMV < 4), intermediate (4-13), or high (BMV > 13)"},{"name":"median_os_months","type":"number","description":"Published Farris 2017 median overall survival in months after initial distant brain failure for that group"},{"name":"citation","type":"object","description":"Farris 2017 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"new_brain_metastases":"3","years_since_first_srs":"1"},{"new_brain_metastases":"3","years_since_first_srs":"1"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/bmv","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/bmv?new_brain_metastases=3&years_since_first_srs=1","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/bmv","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/gi-gpa","description":"Sperduto 2019 updated GI-GPA: KPS <80 = 0, 80 = 1.0, 90-100 = 2.0; age >=60 = 0, <60 = 0.5; extracranial metastases present = 0, absent = 0.5; number of brain metastases >3 = 0, 2-3 = 0.5, 1 = 1.0. Max 4.0. GPA 0-1.0 / 1.5-2.0 / 2.5-3.0 / 3.5-4.0 median survival 3, 7, 11, 17 months (abstract/KM). Not a treatment order. Not lung-molGPA. magent does not assign KPS.","parameters":[{"in":"query","name":"kps","type":"integer","description":"Caller-assigned Karnofsky Performance Status decade 10, 20, 30, 40, 50, 60, 70, 80, 90, or 100. Sperduto 2019 Table 4: <80 (10-70) scores 0; 80 scores 1.0; 90-100 scores 2.0. Grade 0 (dead) is not scored. magent does not assign KPS.","required":true,"example":"100"},{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Sperduto 2019 Table 4: >=60 scores 0; <60 scores 0.5.","required":true,"example":"50"},{"in":"query","name":"extracranial_metastases","type":"boolean","description":"Extracranial metastases (ECM). true (present) scores 0; false (absent) scores 0.5 (Sperduto 2019 Table 4). magent does not stage extracranial disease.","required":true,"example":"false"},{"in":"query","name":"brain_metastasis_count","type":"integer","description":"Number of brain metastases (integer 1-50). Sperduto 2019 Table 4: >3 scores 0; 2-3 scores 0.5; 1 scores 1.0. magent does not count metastases on imaging.","required":true,"example":"1"}],"errors":[{"code":"invalid_karnofsky","message":"kps must be 10, 20, 30, 40, 50, 60, 70, 80, 90, or 100 (Karnofsky 1949). Grade 0 (dead) is not scored. Returned before settlement; you are not charged.","status":400},{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_brain_metastasis_count","message":"brain_metastasis_count must be an integer from 1 to 50 (Sperduto 2019 number of brain metastases). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/gi-gpa","citation":{"authors":"Sperduto PW, Fang P, Li J, et al.","doi":"10.1016/j.ctro.2019.06.007","id":"sperduto-2019-gi-gpa","pmid":"31341974","source":"Clin Transl Radiat Oncol. 2019;18:39-45","title":"Estimating survival in patients with gastrointestinal cancers and brain metastases: An update of the graded prognostic assessment for gastrointestinal cancers (GI-GPA)","url":"https://doi.org/10.1016/j.ctro.2019.06.007"},"formula_expression":"GI-GPA = kps_pts + age_pts + extracranial_pts + brain_met_pts; KPS <80 (10-70) 0, 80 1.0, 90-100 2.0; age >=60 0, <60 0.5; extracranial mets present 0, absent 0.5; brain mets >3 0, 2-3 0.5, 1 1.0; groups 0-1.0 / 1.5-2.0 / 2.5-3.0 / 3.5-4.0; max 4.0 (Sperduto 2019 Table 4; median survival from abstract/KM 3, 7, 11, 17 months)","purpose":"Compute the Sperduto 2019 updated GI-GPA (graded prognostic assessment for gastrointestinal cancers with brain metastases) from caller-assigned KPS, age, extracranial metastases, and number of brain metastases, and report the published GPA group and median survival.","markdown_url":"https://magentlab.com/docs/gi-gpa.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"gi_gpa"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"number","description":"Total GI-GPA points 0-4.0 in 0.5 steps"},{"name":"max_score","type":"number","description":"Always 4.0"},{"name":"gpa_group","type":"string","description":"0-1.0, 1.5-2.0, 2.5-3.0, or 3.5-4.0 from Sperduto 2019"},{"name":"median_survival_months","type":"integer","description":"Published median survival in months for that GPA group from the Sperduto 2019 abstract/Kaplan-Meier figures (3, 7, 11, 17), not the Table 4 footnote"},{"name":"kps","type":"integer","description":"Caller-assigned Karnofsky decade used for points"},{"name":"age","type":"integer","description":"Age in years used for points"},{"name":"extracranial_metastases","type":"boolean","description":"true if extracranial metastases are present"},{"name":"brain_metastasis_count","type":"integer","description":"Number of brain metastases used for points"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Sperduto 2019 Clin Transl Radiat Oncol citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"50","brain_metastasis_count":"1","extracranial_metastases":"false","kps":"100"},{"age":"50","brain_metastasis_count":"1","extracranial_metastases":"false","kps":"100"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/gi-gpa","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/gi-gpa?kps=100&age=50&extracranial_metastases=false&brain_metastasis_count=1","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/gi-gpa","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/pre-score","description":"PRE (Pittsburgh Response to Endovascular therapy) score: age + 2×NIHSS - 10×ASPECTS (Rangaraju 2015). Integer PRE, quartiles <0 / 0-24 / 25-49 / >=50, and recanalization-benefit strata <-24 / -24 to 49 / >=50. Not a thrombectomy recommendation. The caller assigns NIHSS and ASPECTS; magent does not assign NIHSS or read CT.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (integer 18-120).","required":true,"example":"65"},{"in":"query","name":"nihss","type":"integer","description":"Caller-assigned NIH Stroke Scale total (integer 0-42, NINDS total). magent does not assign NIHSS or examine the patient.","required":true,"example":"18"},{"in":"query","name":"aspects","type":"integer","description":"Alberta Stroke Program Early CT Score (integer 0-10). magent does not read CT.","required":true,"example":"8"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_nihss","message":"nihss must be an integer from 0 to 42. Returned before settlement; you are not charged.","status":400},{"code":"invalid_aspects","message":"aspects must be an integer from 0 to 10. Returned before settlement; you are not charged.","status":400},{"code":"invalid_pre","message":"PRE score needs age, nihss, and aspects (Rangaraju 2015). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/pre-score","citation":{"authors":"Rangaraju S, Aghaebrahim A, Streib C, Sun CH, Ribo M, Muchada M, Nogueira R, Frankel M, Gupta R, Jadhav A, Jovin TG","doi":"10.1136/neurintsurg-2014-011351","id":"rangaraju-2015","pmid":"25320054","source":"J Neurointerv Surg. 2015;7(11):783-788","title":"Pittsburgh Response to Endovascular therapy (PRE) score: optimizing patient selection for endovascular therapy for large vessel occlusion strokes","url":"https://doi.org/10.1136/neurintsurg-2014-011351"},"formula_expression":"PRE = age_years + 2 × nihss - 10 × aspects (Rangaraju 2015); integer arithmetic; no clamp on the total","purpose":"Compute the Pittsburgh Response to Endovascular therapy (PRE) score from age, caller-assigned NIHSS, and ASPECTS using PRE = age + 2×NIHSS - 10×ASPECTS (Rangaraju 2015).","markdown_url":"https://magentlab.com/docs/pre-score.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"pre_score"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"pre_score","type":"integer","description":"PRE = age_years + 2 × nihss - 10 × aspects; integer; no clamp on the total"},{"name":"age_years","type":"integer","description":"Age in years used in PRE"},{"name":"nihss","type":"integer","description":"Caller-assigned NIHSS used in PRE"},{"name":"aspects","type":"integer","description":"Caller-assigned ASPECTS used in PRE"},{"name":"pre_quartile","type":"string","description":"Rangaraju 2015 PRE quartile: <0, 0-24, 25-49, or >=50"},{"name":"recanalization_stratum","type":"string","description":"Rangaraju 2015 recanalization-benefit group: <-24, -24_to_49, or >=50"},{"name":"citation","type":"object","description":"Rangaraju 2015 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"65","aspects":"8","nihss":"18"},{"age":"65","aspects":"8","nihss":"18"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/pre-score","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/pre-score?age=65&nihss=18&aspects=8","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/pre-score","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/plan","description":"PLAN score (O'Donnell 2012 Arch Intern Med Table 4): preadmission dependence 1.5, cancer 1.5, CHF 1, atrial fibrillation 1, reduced LOC 5, age 1 point per decade (max 10), significant/total arm weakness 2, leg weakness 2, aphasia or neglect 1. Max 25. Bands <10, 10-15, >15. Not a tPA decision and not iScore. magent does not examine the patient.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). O'Donnell 2012 Table 4: 1 point per decade (floor age/10), maximum 10. The derivation excluded patients younger than 18.","required":true,"example":"18"},{"in":"query","name":"preadmission_dependence","type":"boolean","description":"Preadmission dependence (O'Donnell 2012 Table 4). true scores 1.5; false scores 0. The caller assigns the item.","required":true,"example":"false"},{"in":"query","name":"cancer","type":"boolean","description":"History of cancer on the admission notes (O'Donnell 2012 Table 4; not a diagnosis made during the incident hospitalization). true scores 1.5; false scores 0. The caller assigns the item.","required":true,"example":"false"},{"in":"query","name":"congestive_heart_failure","type":"boolean","description":"Congestive heart failure (O'Donnell 2012 Table 4). true scores 1; false scores 0. The caller assigns the item.","required":true,"example":"false"},{"in":"query","name":"atrial_fibrillation","type":"boolean","description":"Atrial fibrillation (O'Donnell 2012 Table 4). true scores 1; false scores 0. The caller assigns the item.","required":true,"example":"false"},{"in":"query","name":"reduced_loc","type":"boolean","description":"Caller-assigned reduced level of consciousness (O'Donnell 2012 Table 4). true scores 5; false (alert) scores 0. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"arm_weakness","type":"boolean","description":"Caller-assigned significant or total arm weakness (O'Donnell 2012 Table 4). true scores 2. Mild or no weakness scores 0. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"leg_weakness","type":"boolean","description":"Caller-assigned significant or total leg weakness (O'Donnell 2012 Table 4). true scores 2. Mild or no weakness scores 0. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"aphasia_or_neglect","type":"boolean","description":"Caller-assigned aphasia or neglect (O'Donnell 2012 Table 4 combined item). true scores 1 whether one or both are present; false scores 0. magent does not examine the patient.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_plan","message":"each PLAN 2012 stroke item must be a published value. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/plan","citation":{"authors":"O'Donnell MJ, Fang J, D'Uva C, et al.","doi":"10.1001/2013.jamainternmed.30","id":"odonnell-2012","pmid":"23147454","source":"Arch Intern Med. 2012;172(20):1548-1556","title":"The PLAN score: a bedside prediction rule for death and severe disability following acute ischemic stroke","url":"https://doi.org/10.1001/2013.jamainternmed.30"},"formula_expression":"PLAN = preadmission_dependence 1.5 + cancer 1.5 + congestive_heart_failure 1 + atrial_fibrillation 1 + reduced_loc 5 + min(floor(age/10), 10) + arm_weakness 2 + leg_weakness 2 + aphasia_or_neglect 1; O'Donnell 2012 Table 4; max 25; bands <10 / 10-15 / >15","purpose":"Compute the O'Donnell 2012 PLAN score (preadmission comorbidities, level of consciousness, age, and neurologic deficit) for death and severe disability after acute ischemic stroke from the published Table 4 items.","markdown_url":"https://magentlab.com/docs/plan.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"plan"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"number","description":"PLAN points 1-25 (half-points from dependence and cancer)"},{"name":"max_score","type":"integer","description":"Always 25"},{"name":"plan_band","type":"string","description":"O'Donnell 2012 Results grouping: <10, 10-15, or >15 (death or severe disability strata). Not a mortality percent."},{"name":"age_years","type":"integer","description":"Age used for 1 point per decade"},{"name":"age_points","type":"integer","description":"min(floor(age/10), 10) from O'Donnell 2012 Table 4"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"O'Donnell 2012 Arch Intern Med citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"18","aphasia_or_neglect":"false","arm_weakness":"false","atrial_fibrillation":"false","cancer":"false","congestive_heart_failure":"false","leg_weakness":"false","preadmission_dependence":"false","reduced_loc":"false"},{"age":"18","aphasia_or_neglect":"false","arm_weakness":"false","atrial_fibrillation":"false","cancer":"false","congestive_heart_failure":"false","leg_weakness":"false","preadmission_dependence":"false","reduced_loc":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/plan","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/plan?age=18&preadmission_dependence=false&cancer=false&congestive_heart_failure=false&atrial_fibrillation=false&reduced_loc=false&arm_weakness=false&leg_weakness=false&aphasia_or_neglect=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/plan","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/msoar","description":"mSOAR (Abdul-Rahim 2016 Stroke): SOAR plus NIHSS for early mortality after acute stroke. Age ≤65 0, 66-85 1, >85 2; infarct 0, hemorrhage 1; OCSP LACS/PACS 0, POCS 1, TACS 2; prestroke mRS 0-2 0, 3-4 1, 5 2; NIHSS 0-4 0, 5-10 1, ≥11 2. Max 9. Table 2 derivation percents for scores 0-1 through 7. Not a care-withdrawal decision. magent does not examine the patient or score NIHSS items.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Abdul-Rahim 2016 Table 1: ≤65 scores 0; 66-85 scores 1; >85 scores 2. Age 85 is the 66-85 band.","required":true,"example":"18"},{"in":"query","name":"stroke_subtype","type":"string","enum":["infarct","hemorrhage"],"description":"Caller-assigned stroke subtype (Abdul-Rahim 2016 Methods / Table 1). infarct (ischemic infarction) scores 0; hemorrhage scores 1. Case-insensitive. magent does not read imaging.","required":true,"example":"infarct"},{"in":"query","name":"ocsp","type":"string","enum":["lacs","pacs","pocs","tacs"],"description":"Caller-assigned Oxfordshire Community Stroke Project class (Abdul-Rahim 2016 Table 1). lacs or pacs scores 0; pocs scores 1; tacs scores 2. Case-insensitive. magent does not examine the patient.","required":true,"example":"lacs"},{"in":"query","name":"prestroke_mrs","type":"integer","description":"Caller-assigned prestroke modified Rankin grade 0-5. SOAR weights used by mSOAR: 0-2 scores 0; 3-4 scores 1; 5 scores 2. Table 1 lists cohort counts as 0-1 / 2-3 / 4-5, not those integer weights. magent does not interview the patient.","required":true,"example":"0"},{"in":"query","name":"nihss","type":"integer","description":"Caller-assigned NIH Stroke Scale total (integer 0-42), not an item exam. Abdul-Rahim 2016 Suppl Table I / Table 1: 0-4 scores 0; 5-10 scores 1; 11-20 and ≥21 both score 2. magent does not compute NIHSS or examine the patient.","required":true,"example":"0"}],"errors":[{"code":"invalid_msoar","message":"mSOAR inputs must match Abdul-Rahim 2016 stroke subtype, OCSP, age, prestroke mRS, and NIHSS bands. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/msoar","citation":{"authors":"Abdul-Rahim AH, Quinn TJ, Alder S, Clark AB, Musgrave SD, Langhorne P, Potter JF, Myint PK","doi":"10.1161/STROKEAHA.115.009898","id":"abdul-rahim-2016","pmid":"26578661","source":"Stroke. 2016;47(1):74-79","title":"Derivation and Validation of a Novel Prognostic Scale (Modified–Stroke Subtype, Oxfordshire Community Stroke Project Classification, Age, and Prestroke Modified Rankin) to Predict Early Mortality in Acute Stroke","url":"https://doi.org/10.1161/STROKEAHA.115.009898"},"formula_expression":"mSOAR = age (≤65 0, 66-85 1, >85 2) + subtype (infarct 0, hemorrhage 1) + OCSP (LACS/PACS 0, POCS 1, TACS 2) + prestroke mRS (0-2 0, 3-4 1, 5 2) + NIHSS (0-4 0, 5-10 1, ≥11 2; 11-20 and ≥21 both 2); Abdul-Rahim 2016 Table 1 bands and Suppl Table I NIHSS integers; max 9; Table 2 derivation early mortality 1.0/1.5/6.5/9.2/19.5/26.2/49.2% for scores 0-1/2/3/4/5/6/7","purpose":"Compute the Abdul-Rahim 2016 modified SOAR (mSOAR) integer score for early mortality after acute stroke from stroke subtype, OCSP, age, prestroke mRS, and caller-assigned NIHSS bands.","markdown_url":"https://magentlab.com/docs/msoar.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"msoar"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"mSOAR points 0-9"},{"name":"max_score","type":"integer","description":"Always 9"},{"name":"early_mortality_percent","type":"number","description":"Abdul-Rahim 2016 Table 2 derivation observed early mortality percent for scores 0-1 through 7; null if not tabulated (8-9)"},{"name":"age_years","type":"integer","description":"Age used for Table 1 age points"},{"name":"stroke_subtype","type":"string","description":"infarct or hemorrhage used for subtype points"},{"name":"ocsp","type":"string","description":"lacs, pacs, pocs, or tacs used for OCSP points"},{"name":"prestroke_mrs","type":"integer","description":"Caller-assigned prestroke mRS used for SOAR mRS points"},{"name":"nihss","type":"integer","description":"Caller-assigned NIHSS used for NIHSS points"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Abdul-Rahim 2016 Stroke citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"18","nihss":"0","ocsp":"lacs","prestroke_mrs":"0","stroke_subtype":"infarct"},{"age":"18","nihss":"0","ocsp":"lacs","prestroke_mrs":"0","stroke_subtype":"infarct"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/msoar","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/msoar?age=18&stroke_subtype=infarct&ocsp=lacs&prestroke_mrs=0&nihss=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/msoar","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/astral","description":"Ntaios 2012 ASTRAL integer score for 3-month mRS >2 in acute ischemic stroke. Age 1/5 years + NIHSS (caller 0-42) + 2 if onset-to-admission >180 min + 2 if visual field defect + 1 if glucose <3.7 or >7.3 mmol/L (mg/dL /18) + 3 if impaired consciousness. Score 31 is 50% unfavorable. Not a tPA decision. magent does not compute NIHSS.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Ntaios 2012 integer weight is 1 point per 5 years (integer division). magent does not date the patient.","required":true,"example":"40"},{"in":"query","name":"nihss","type":"integer","description":"Caller-assigned NIH Stroke Scale total (integer 0-42). 1 point per NIHSS point. magent does not compute NIHSS or examine the patient.","required":true,"example":"0"},{"in":"query","name":"delay_gt_180","type":"boolean","description":"Onset-to-admission delay >180 minutes (Ntaios 2012 time item). true scores 2; false (including 180 min) scores 0. magent does not clock the delay.","required":true,"example":"false"},{"in":"query","name":"visual_field_defect","type":"boolean","description":"Any stroke-related visual field defect as assigned by the caller (Ntaios 2012 range of visual fields). true scores 2; false scores 0. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"glucose_mmol_l","type":"number","description":"Admission glucose in mmol/L (2.8-55.5). Provide this or glucose_mg_dl, not both. 1 point if <3.7 or >7.3; 3.7 and 7.3 do not score.","required":false,"example":"6.0"},{"in":"query","name":"glucose_mg_dl","type":"number","description":"Admission glucose in mg/dL (50-1000). Converted as mmol/L = mg/dL / 18. Provide this or glucose_mmol_l, not both.","required":false,"example":"108"},{"in":"query","name":"loc_impaired","type":"boolean","description":"Impaired consciousness as assigned by the caller (Ntaios 2012; NIHSS item 1a >0). true scores 3; false scores 0. magent does not compute NIHSS.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_nihss","message":"nihss must be an integer from 0 to 42. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_glucose","message":"glucose_mg_dl (50-1000) or glucose_mmol_l (2.8-55.5) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_astral","message":"each ASTRAL 2012 item must be a published value for that field. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/astral","citation":{"authors":"Ntaios G, Faouzi M, Ferrari J, Lang W, Vemmos K, Michel P","doi":"10.1212/WNL.0b013e318259e221","id":"ntaios-2012","pmid":"22649218","source":"Neurology. 2012;78(24):1916-1922","title":"An integer-based score to predict functional outcome in acute ischemic stroke: the ASTRAL score","url":"https://doi.org/10.1212/WNL.0b013e318259e221"},"formula_expression":"ASTRAL = age (1 per 5 years) + NIHSS + 2 if onset-to-admission >180 min + 2 if visual field defect + 1 if glucose <3.7 or >7.3 mmol/L + 3 if impaired consciousness; Ntaios 2012; 3-month mRS >2 is 50% at score 31","purpose":"Compute the Ntaios 2012 ASTRAL integer score (Age, Severity NIHSS, Time delay, Range of visual fields, Acute glucose, Level of consciousness) for 3-month mRS >2 after acute ischemic stroke.","markdown_url":"https://magentlab.com/docs/astral.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"astral"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"ASTRAL points (no published upper bound)"},{"name":"max_score","type":"integer","description":"74 with age 18-120 and NIHSS 0-42"},{"name":"unfavorable_ge_31","type":"boolean","description":"true iff score ≥ 31. Ntaios 2012: score 31 indicates 50% likelihood of 3-month mRS >2. No unofficial per-score percent is returned."},{"name":"age_years","type":"integer","description":"Age used for 1-per-5-years points"},{"name":"nihss","type":"integer","description":"Caller-assigned NIHSS used for points"},{"name":"delay_gt_180","type":"boolean","description":"Whether onset-to-admission was scored as >180 min"},{"name":"visual_field_defect","type":"boolean","description":"Whether visual field defect was scored"},{"name":"glucose_mmol_l","type":"number","description":"Admission glucose in mmol/L (mg/dL inputs converted /18)"},{"name":"glucose_abnormal","type":"boolean","description":"true iff glucose <3.7 or >7.3 mmol/L"},{"name":"loc_impaired","type":"boolean","description":"Whether impaired consciousness was scored"},{"name":"components","type":"array","description":"Per-item Ntaios 2012 points"},{"name":"citation","type":"object","description":"Ntaios 2012 Neurology citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"40","delay_gt_180":"false","glucose_mmol_l":"6.0","loc_impaired":"false","nihss":"0","visual_field_defect":"false"},{"age":"40","delay_gt_180":"false","glucose_mmol_l":"6.0","loc_impaired":"false","nihss":"0","visual_field_defect":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/astral","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/astral?age=40&nihss=0&delay_gt_180=false&visual_field_defect=false&glucose_mmol_l=6.0&loc_impaired=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/astral","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/cam-icu","description":"CAM-ICU (Ely 2001). Delirium is present iff Feature 1 (acute onset or fluctuating course) and Feature 2 (inattention) both hold, and Feature 3 (disorganized thinking) or Feature 4 (altered level of consciousness) also holds. The caller assigns each feature as already determined. magent does not observe the patient, administer RASS, or run the attention screening exam. Not a diagnosis and not a medical device.","parameters":[{"in":"query","name":"acute_onset_or_fluctuation","type":"boolean","description":"Feature 1: acute onset of mental status change or fluctuating course. true or false as assigned by the caller. magent does not observe the patient or judge fluctuation.","required":true,"example":"false"},{"in":"query","name":"inattention","type":"boolean","description":"Feature 2: inattention. true or false as assigned by the caller. magent does not run the attention screening exam.","required":true,"example":"false"},{"in":"query","name":"disorganized_thinking","type":"boolean","description":"Feature 3: disorganized thinking. true or false as assigned by the caller. magent does not administer the thinking questions.","required":true,"example":"false"},{"in":"query","name":"altered_level_of_consciousness","type":"boolean","description":"Feature 4: altered level of consciousness. true or false as assigned by the caller. magent does not administer RASS.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/cam-icu","citation":{"authors":"Ely EW, Inouye SK, Bernard GR, et al.","doi":"10.1001/jama.286.21.2703","id":"ely-2001","pmid":"11730446","source":"JAMA. 2001;286(21):2703-2710","title":"Delirium in mechanically ventilated patients: validity and reliability of the confusion assessment method for the intensive care unit (CAM-ICU)","url":"https://doi.org/10.1001/jama.286.21.2703"},"formula_expression":"delirium present iff Feature 1 AND Feature 2 AND (Feature 3 OR Feature 4)","purpose":"Apply the Ely 2001 CAM-ICU algorithm and return whether delirium is present from four caller-assigned features.","markdown_url":"https://magentlab.com/docs/cam-icu.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"cam_icu"},{"name":"formula_expression","type":"string","description":"Ely 2001: Feature 1 AND Feature 2 AND (Feature 3 OR Feature 4)"},{"name":"delirium_present","type":"boolean","description":"true only when Feature 1 and Feature 2 hold and Feature 3 or Feature 4 also holds. Not a diagnosis."},{"name":"criteria","type":"array","description":"Per-feature rows with factor and met; met is true when that CAM-ICU feature is present"},{"name":"citation","type":"object","description":"Ely 2001 JAMA citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"acute_onset_or_fluctuation":"false","altered_level_of_consciousness":"false","disorganized_thinking":"false","inattention":"false"},{"acute_onset_or_fluctuation":"false","altered_level_of_consciousness":"false","disorganized_thinking":"false","inattention":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/cam-icu","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/cam-icu?acute_onset_or_fluctuation=false&inattention=false&disorganized_thinking=false&altered_level_of_consciousness=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/cam-icu","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/capd","description":"Traube 2014 CAPD: 8 caller-assigned integers 0-4. eye_contact, purposeful_actions, awareness, and communication are reverse-scored in that paper (never contributes 4; 0 is the never-delirium pole after that reverse key). Total 0-32. Screen-positive iff score ≥9. magent does not examine the child or invent a developmental-delay cutoff. Not a psychiatric diagnosis.","parameters":[{"in":"query","name":"eye_contact","type":"integer","description":"Caller-assigned Traube 2014 CAPD item 1 (integer 0-4). Reverse-scored in that paper: does the child make eye contact with the caregiver. 0 is always (never-delirium pole after reverse scoring); 4 is never (never contributes 4). magent does not examine the child.","required":true,"example":"0"},{"in":"query","name":"purposeful_actions","type":"integer","description":"Caller-assigned Traube 2014 CAPD item 2 (integer 0-4). Reverse-scored in that paper: are the child's actions purposeful. 0 is always (never-delirium pole after reverse scoring); 4 is never (never contributes 4). magent does not examine the child.","required":true,"example":"0"},{"in":"query","name":"awareness","type":"integer","description":"Caller-assigned Traube 2014 CAPD item 3 (integer 0-4). Reverse-scored in that paper: is the child aware of his/her surroundings. 0 is always (never-delirium pole after reverse scoring); 4 is never (never contributes 4). magent does not examine the child.","required":true,"example":"0"},{"in":"query","name":"communication","type":"integer","description":"Caller-assigned Traube 2014 CAPD item 4 (integer 0-4). Reverse-scored in that paper: does the child communicate needs and wants. 0 is always (never-delirium pole after reverse scoring); 4 is never (never contributes 4). magent does not examine the child.","required":true,"example":"0"},{"in":"query","name":"restless","type":"integer","description":"Caller-assigned Traube 2014 CAPD item 5 (integer 0-4): is the child restless. Adds as published (0 never, never-delirium pole, through 4 always). magent does not examine the child.","required":true,"example":"0"},{"in":"query","name":"inconsolable","type":"integer","description":"Caller-assigned Traube 2014 CAPD item 6 (integer 0-4): is the child inconsolable. Adds as published (0 never, never-delirium pole, through 4 always). magent does not examine the child.","required":true,"example":"0"},{"in":"query","name":"underactive","type":"integer","description":"Caller-assigned Traube 2014 CAPD item 7 (integer 0-4): is the child underactive — very little movement while awake. Adds as published (0 never, never-delirium pole, through 4 always). magent does not examine the child.","required":true,"example":"0"},{"in":"query","name":"delayed_response","type":"integer","description":"Caller-assigned Traube 2014 CAPD item 8 (integer 0-4): does it take the child a long time to respond to interactions. Adds as published (0 never, never-delirium pole, through 4 always). magent does not examine the child.","required":true,"example":"0"}],"errors":[{"code":"invalid_capd","message":"CAPD inputs must be the eight caller-assigned 0-4 Cornell items from Traube 2014. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/capd","citation":{"authors":"Traube C, Silver G, Kearney J, Patel A, Atkinson TM, Yoon MJ, et al.","doi":"10.1097/CCM.0b013e3182a66b76","id":"traube-2014","pmid":"24145848","source":"Crit Care Med. 2014;42(3):656-663","title":"Cornell Assessment of Pediatric Delirium: a valid, rapid, observational tool for screening delirium in the PICU","url":"https://doi.org/10.1097/CCM.0b013e3182a66b76"},"formula_expression":"CAPD = eye_contact + purposeful_actions + awareness + communication + restless + inconsolable + underactive + delayed_response; each caller-assigned 0-4 as in Traube 2014 (eye_contact, purposeful_actions, awareness, and communication reverse-scored in that paper so never contributes 4 and always contributes 0; 0 is the never-delirium published pole); max 32; Traube 2014 screen-positive iff score ≥ 9","purpose":"Sum eight caller-assigned Traube 2014 CAPD integers (0-4; eye_contact, purposeful_actions, awareness, and communication reverse-scored in that paper so never contributes 4) and return the 0-32 total and whether it meets this paper's screen-positive cut point (score ≥9).","markdown_url":"https://magentlab.com/docs/capd.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"capd"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"CAPD points 0-32"},{"name":"max_score","type":"integer","description":"32"},{"name":"screen_positive","type":"boolean","description":"true iff score ≥ 9 (Traube 2014 cut point). Not a psychiatric diagnosis. Not a developmental-delay cutoff."},{"name":"components","type":"array","description":"Per-item caller-assigned points (reverse-scored items flagged)"},{"name":"citation","type":"object","description":"Traube et al. Crit Care Med 2014 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"awareness":"0","communication":"0","delayed_response":"0","eye_contact":"0","inconsolable":"0","purposeful_actions":"0","restless":"0","underactive":"0"},{"awareness":"0","communication":"0","delayed_response":"0","eye_contact":"0","inconsolable":"0","purposeful_actions":"0","restless":"0","underactive":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/capd","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/capd?eye_contact=0&purposeful_actions=0&awareness=0&communication=0&restless=0&inconsolable=0&underactive=0&delayed_response=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/capd","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/2helps2b","description":"Struck 2017 2HELPS2B: BIRDs 2 points; LPD or LRDA or BIPD, prior seizure, sporadic epileptiform discharges, frequency >2.0 Hz, and plus features 1 point each. Max 7. Published probable seizure risk: 0→5%, 1→12%, 2→27%, 3→50%, 4→73%, 5→88%, 6–7→>95%. Not a seizure diagnosis or monitoring-duration protocol. magent does not read EEG.","parameters":[{"in":"query","name":"birds","type":"boolean","description":"Brief (ictal) rhythmic discharges (BIRDs) as assigned by the caller (Struck 2017). true scores 2. magent does not read EEG.","required":true,"example":"false"},{"in":"query","name":"lpd_lrda_bipd","type":"boolean","description":"LPD or LRDA or BIPD as assigned by the caller (Struck 2017). true scores 1. magent does not read EEG.","required":true,"example":"false"},{"in":"query","name":"prior_seizure","type":"boolean","description":"Prior seizure, acute or remote, as assigned by the caller (Struck 2017). true scores 1.","required":true,"example":"false"},{"in":"query","name":"sporadic_epileptiform","type":"boolean","description":"Sporadic epileptiform discharges as assigned by the caller (Struck 2017). true scores 1. magent does not read EEG.","required":true,"example":"false"},{"in":"query","name":"frequency_gt_2hz","type":"boolean","description":"Frequency >2.0 Hz for any periodic or rhythmic pattern as assigned by the caller (Struck 2017). true scores 1. magent does not read EEG.","required":true,"example":"false"},{"in":"query","name":"plus_features","type":"boolean","description":"Plus features (superimposed rhythmic, sharp, or fast activity) as assigned by the caller (Struck 2017). true scores 1. magent does not read EEG.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/2helps2b","citation":{"authors":"Struck AF, Ustun B, Rodriguez Ruiz AA, Lee JW, LaRoche SM, Hirsch LJ, Gilmore EJ, Vlachy J, Haider HA, Rudin C, Westover MB","doi":"10.1001/jamaneurol.2017.2459","id":"struck-2017","pmid":"29052706","source":"JAMA Neurol. 2017;74(12):1419-1424","title":"Association of an electroencephalography-based risk score with seizure probability in hospitalized patients","url":"https://doi.org/10.1001/jamaneurol.2017.2459"},"formula_expression":"2HELPS2B = birds (true 2) + lpd_lrda_bipd (true 1) + prior_seizure (true 1) + sporadic_epileptiform (true 1) + frequency_gt_2hz (true 1) + plus_features (true 1); Struck 2017; max 7; 0→5%, 1→12%, 2→27%, 3→50%, 4→73%, 5→88%, 6-7→>95%","purpose":"Sum the Struck 2017 2HELPS2B EEG flags and return the published probable-seizure risk percent.","markdown_url":"https://magentlab.com/docs/2helps2b.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"2helps2b"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"2HELPS2B points 0-7"},{"name":"max_score","type":"integer","description":"Always 7"},{"name":"seizure_risk","type":"string","description":"Struck 2017 published probable seizure risk: 5%, 12%, 27%, 50%, 73%, 88%, or >95%. Not a seizure diagnosis."},{"name":"components","type":"array","description":"Per-flag points"},{"name":"citation","type":"object","description":"Struck 2017 JAMA Neurol citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"birds":"false","frequency_gt_2hz":"false","lpd_lrda_bipd":"false","plus_features":"false","prior_seizure":"false","sporadic_epileptiform":"false"},{"birds":"false","frequency_gt_2hz":"false","lpd_lrda_bipd":"false","plus_features":"false","prior_seizure":"false","sporadic_epileptiform":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/2helps2b","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/2helps2b?birds=false&lpd_lrda_bipd=false&prior_seizure=false&sporadic_epileptiform=false&frequency_gt_2hz=false&plus_features=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/2helps2b","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rass","description":"Richmond Agitation-Sedation Scale (RASS, Sessler 2002) as assigned by the caller: integer -5 to +4 with the published term and description (Combative through Unarousable). magent does not observe the patient, administer voice or physical stimulation, or titrate sedation. Not a CAM-ICU feature, not a CAM-ICU administration, and not a sedation order or dose.","parameters":[{"in":"query","name":"rass","type":"integer","description":"Sessler 2002 RASS integer -5 to +4 as assigned by the caller (+4 Combative; +3 Very agitated; +2 Agitated; +1 Restless; 0 Alert and calm; -1 Drowsy; -2 Light sedation; -3 Moderate sedation; -4 Deep sedation; -5 Unarousable). magent does not observe the patient, administer voice or physical stimulation, or titrate sedation.","required":true,"example":"0"}],"errors":[{"code":"invalid_rass","message":"rass must be an integer from -5 to 4 (Sessler 2002 Richmond Agitation-Sedation Scale). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rass","citation":{"authors":"Sessler CN, Gosnell MS, Grap MJ, et al.","doi":"10.1164/rccm.2107138","id":"sessler-2002","pmid":"12421743","source":"Am J Respir Crit Care Med. 2002;166(10):1338-1344","title":"The Richmond Agitation-Sedation Scale: validity and reliability in adult intensive care unit patients","url":"https://doi.org/10.1164/rccm.2107138"},"formula_expression":"RASS integer -5 to +4 as assigned by the caller; Sessler 2002 ten levels (Combative through Unarousable)","purpose":"Return the Sessler 2002 Richmond Agitation-Sedation Scale term and description from a caller-assigned integer -5 to +4.","markdown_url":"https://magentlab.com/docs/rass.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rass"},{"name":"formula_expression","type":"string","description":"Published RASS rule"},{"name":"rass","type":"integer","description":"Caller-assigned RASS integer -5 to +4"},{"name":"score","type":"integer","description":"Same as rass"},{"name":"max_score","type":"integer","description":"4"},{"name":"term","type":"string","description":"Sessler 2002 term for that integer"},{"name":"description","type":"string","description":"Sessler 2002 wording for that integer"},{"name":"components","type":"array","description":"rass component"},{"name":"citation","type":"object","description":"Sessler 2002"},{"name":"disclaimer","type":"string","description":"Not a medical device"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"rass":"0"},{"rass":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rass","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rass?rass=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rass","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/bush-francis","description":"Bush 1996 23-item catatonia rating scale from caller-assigned integers. Items 1-16 and 22-23 are 0-3; mitgehen, gegenhalten, ambitendency, grasp_reflex, and perseveration are 0 or 3 only. Severity is the sum of items 1-23 (max 69). The 14-item screen is positive iff at least two of items 1-14 score above 0. magent does not perform the standardized examination. Not a diagnosis, not DSM catatonia criteria, not a medical device.","parameters":[{"in":"query","name":"excitement","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Bush 1996 excitement (item 1; integer 0-3). magent does not examine the patient.","required":true,"example":"1"},{"in":"query","name":"immobility_stupor","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Bush 1996 immobility/stupor (item 2; integer 0-3). magent does not examine the patient.","required":true,"example":"1"},{"in":"query","name":"mutism","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Bush 1996 mutism (item 3; integer 0-3). magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"staring","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Bush 1996 staring (item 4; integer 0-3). magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"posturing_catalepsy","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Bush 1996 posturing/catalepsy (item 5; integer 0-3). magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"grimacing","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Bush 1996 grimacing (item 6; integer 0-3). magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"echopraxia_echolalia","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Bush 1996 echopraxia/echolalia (item 7; integer 0-3). magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"stereotypy","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Bush 1996 stereotypy (item 8; integer 0-3). magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"mannerisms","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Bush 1996 mannerisms (item 9; integer 0-3). magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"verbigeration","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Bush 1996 verbigeration (item 10; integer 0-3). magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"rigidity","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Bush 1996 rigidity (item 11; integer 0-3). magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"negativism","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Bush 1996 negativism (item 12; integer 0-3). magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"waxy_flexibility","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Bush 1996 waxy flexibility (item 13; integer 0-3). magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"withdrawal","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Bush 1996 withdrawal (item 14; integer 0-3). magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"impulsivity","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Bush 1996 impulsivity (item 15; integer 0-3). magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"automatic_obedience","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Bush 1996 automatic obedience (item 16; integer 0-3). magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"mitgehen","type":"integer","enum":[0,3],"description":"Caller-assigned Bush 1996 mitgehen (item 17; 0 absent or 3 present only). magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"gegenhalten","type":"integer","enum":[0,3],"description":"Caller-assigned Bush 1996 gegenhalten (item 18; 0 absent or 3 present only). magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"ambitendency","type":"integer","enum":[0,3],"description":"Caller-assigned Bush 1996 ambitendency (item 19; 0 absent or 3 present only). magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"grasp_reflex","type":"integer","enum":[0,3],"description":"Caller-assigned Bush 1996 grasp reflex (item 20; 0 absent or 3 present only). magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"perseveration","type":"integer","enum":[0,3],"description":"Caller-assigned Bush 1996 perseveration (item 21; 0 absent or 3 present only). magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"combativeness","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Bush 1996 combativeness (item 22; integer 0-3). magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"autonomic_abnormality","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Bush 1996 autonomic abnormality (item 23; integer 0-3). magent does not examine the patient.","required":true,"example":"0"}],"errors":[{"code":"invalid_bush_francis","message":"Bush-Francis needs the 1996 catatonia item integers in published ranges. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/bush-francis","citation":{"authors":"Bush G, Fink M, Petrides G, Dowling F, Francis A","doi":"10.1111/j.1600-0447.1996.tb09814.x","id":"bush-1996","pmid":"8686483","source":"Acta Psychiatr Scand. 1996;93(2):129-136","title":"Catatonia. I. Rating scale and standardized examination","url":"https://doi.org/10.1111/j.1600-0447.1996.tb09814.x"},"formula_expression":"Bush-Francis CRS = excitement + immobility_stupor + mutism + staring + posturing_catalepsy + grimacing + echopraxia_echolalia + stereotypy + mannerisms + verbigeration + rigidity + negativism + waxy_flexibility + withdrawal + impulsivity + automatic_obedience + mitgehen + gegenhalten + ambitendency + grasp_reflex + perseveration + combativeness + autonomic_abnormality; Bush 1996 23-item catatonia rating scale; items 1-16 and 22-23 integers 0-3; items 17-21 (mitgehen, gegenhalten, ambitendency, grasp_reflex, perseveration) 0 or 3 only; severity score = sum of items 1-23; screening instrument = first 14 items; screen_positive iff count of items 1-14 with score > 0 is >= 2; max 69; not a diagnosis","purpose":"Sum Bush 1996 23-item catatonia rating scale points from caller-assigned integers and report the 14-item screen (positive iff at least two of items 1-14 score above 0). Does not diagnose catatonia.","markdown_url":"https://magentlab.com/docs/bush-francis.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"bush_francis"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Bush 1996 severity sum of 23 caller-assigned items (0-69)"},{"name":"max_score","type":"integer","description":"Always 69"},{"name":"screen_positive","type":"boolean","description":"true iff at least two of the first 14 Bush 1996 screen items score above 0. Not a diagnosis."},{"name":"screen_signs_met","type":"integer","description":"Count of items 1-14 with score > 0 (0-14)"},{"name":"components","type":"array","description":"Per-item caller-assigned points"},{"name":"citation","type":"object","description":"Bush Acta Psychiatr Scand 1996 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"ambitendency":"0","automatic_obedience":"0","autonomic_abnormality":"0","combativeness":"0","echopraxia_echolalia":"0","excitement":"1","gegenhalten":"0","grasp_reflex":"0","grimacing":"0","immobility_stupor":"1","impulsivity":"0","mannerisms":"0","mitgehen":"0","mutism":"0","negativism":"0","perseveration":"0","posturing_catalepsy":"0","rigidity":"0","staring":"0","stereotypy":"0","verbigeration":"0","waxy_flexibility":"0","withdrawal":"0"},{"ambitendency":"0","automatic_obedience":"0","autonomic_abnormality":"0","combativeness":"0","echopraxia_echolalia":"0","excitement":"1","gegenhalten":"0","grasp_reflex":"0","grimacing":"0","immobility_stupor":"1","impulsivity":"0","mannerisms":"0","mitgehen":"0","mutism":"0","negativism":"0","perseveration":"0","posturing_catalepsy":"0","rigidity":"0","staring":"0","stereotypy":"0","verbigeration":"0","waxy_flexibility":"0","withdrawal":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/bush-francis","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/bush-francis?excitement=1&immobility_stupor=1&mutism=0&staring=0&posturing_catalepsy=0&grimacing=0&echopraxia_echolalia=0&stereotypy=0&mannerisms=0&verbigeration=0&rigidity=0&negativism=0&waxy_flexibility=0&withdrawal=0&impulsivity=0&automatic_obedience=0&mitgehen=0&gegenhalten=0&ambitendency=0&grasp_reflex=0&perseveration=0&combativeness=0&autonomic_abnormality=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/bush-francis","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/aims","description":"Guy 1976 Abnormal Involuntary Movement Scale (AIMS): seven 0-4 movement items summed (max 28). Rate highest severity observed. Items 8-12 (overall severity, incapacitation, awareness, dental problems, dentures) are required and returned, not added to the total. No activation subtraction. Not a tardive dyskinesia diagnosis. magent does not examine the patient. Not a medical device.","parameters":[{"in":"query","name":"facial_expression","type":"integer","enum":[0,1,2,3,4],"description":"Caller-assigned Guy 1976 AIMS item 1 muscles of facial expression (integer 0-4): 0 none, 1 minimal may be extreme normal, 2 mild, 3 moderate, 4 severe. Rate highest severity observed. magent does not examine the patient.","required":true,"example":"2"},{"in":"query","name":"lips_perioral","type":"integer","enum":[0,1,2,3,4],"description":"Caller-assigned Guy 1976 AIMS item 2 lips and perioral area (integer 0-4): 0 none, 1 minimal may be extreme normal, 2 mild, 3 moderate, 4 severe. Rate highest severity observed. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"jaw","type":"integer","enum":[0,1,2,3,4],"description":"Caller-assigned Guy 1976 AIMS item 3 jaw (integer 0-4): 0 none, 1 minimal may be extreme normal, 2 mild, 3 moderate, 4 severe. Rate highest severity observed. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"tongue","type":"integer","enum":[0,1,2,3,4],"description":"Caller-assigned Guy 1976 AIMS item 4 tongue (integer 0-4): 0 none, 1 minimal may be extreme normal, 2 mild, 3 moderate, 4 severe. Rate increase in movement, not inability to sustain. Rate highest severity observed. magent does not examine the patient.","required":true,"example":"1"},{"in":"query","name":"upper_extremities","type":"integer","enum":[0,1,2,3,4],"description":"Caller-assigned Guy 1976 AIMS item 5 upper extremities (integer 0-4): 0 none, 1 minimal may be extreme normal, 2 mild, 3 moderate, 4 severe. Include choreic and athetoid movements. Do not include tremor. Rate highest severity observed. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"lower_extremities","type":"integer","enum":[0,1,2,3,4],"description":"Caller-assigned Guy 1976 AIMS item 6 lower extremities (integer 0-4): 0 none, 1 minimal may be extreme normal, 2 mild, 3 moderate, 4 severe. Rate highest severity observed. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"trunk","type":"integer","enum":[0,1,2,3,4],"description":"Caller-assigned Guy 1976 AIMS item 7 neck, shoulders, hips (integer 0-4): 0 none, 1 minimal may be extreme normal, 2 mild, 3 moderate, 4 severe. Rate highest severity observed. magent does not examine the patient.","required":true,"example":"0"},{"in":"query","name":"overall_severity","type":"integer","enum":[0,1,2,3,4],"description":"Caller-assigned Guy 1976 AIMS item 8 overall severity of abnormal movements (integer 0-4): 0 none, 1 minimal may be extreme normal, 2 mild, 3 moderate, 4 severe. Recorded only; not added to the dyskinesia total. magent does not examine the patient.","required":true,"example":"2"},{"in":"query","name":"incapacitation","type":"integer","enum":[0,1,2,3,4],"description":"Caller-assigned Guy 1976 AIMS item 9 incapacitation due to abnormal movements (integer 0-4): 0 none, 1 minimal, 2 mild, 3 moderate, 4 severe. Recorded only; not added to the dyskinesia total. magent does not examine the patient.","required":true,"example":"1"},{"in":"query","name":"awareness","type":"integer","enum":[0,1,2,3,4],"description":"Caller-assigned Guy 1976 AIMS item 10 patient's awareness of abnormal movements (integer 0-4): 0 no awareness, 1 aware no distress, 2 aware mild distress, 3 aware moderate distress, 4 aware severe distress. Rate only the patient's report. Recorded only; not added to the dyskinesia total. magent does not examine the patient.","required":true,"example":"1"},{"in":"query","name":"dental_problems","type":"boolean","description":"Caller-assigned Guy 1976 AIMS item 11 current problems with teeth and/or dentures (true or false). Recorded only; not added to the dyskinesia total. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"wears_dentures","type":"boolean","description":"Caller-assigned Guy 1976 AIMS item 12 does the patient usually wear dentures (true or false). Recorded only; not added to the dyskinesia total. magent does not examine the patient.","required":true,"example":"false"}],"errors":[{"code":"invalid_aims","message":"AIMS needs Guy 1976 movement items 1-7 as integers 0-4 plus global and dental items 8-12. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/aims","citation":{"authors":"Guy W","id":"guy-1976","source":"ECDEU Assessment Manual for Psychopharmacology. Rockville, MD: National Institute of Mental Health; 1976:534-537","title":"Abnormal Involuntary Movement Scale (117-AIMS)","url":"https://www.worldcat.org/oclc/2344751"},"formula_expression":"AIMS dyskinesia total = facial_expression + lips_perioral + jaw + tongue + upper_extremities + lower_extremities + trunk; each integer 0-4 (Guy 1976: 0 none, 1 minimal may be extreme normal, 2 mild, 3 moderate, 4 severe); rate highest severity observed; max 28; overall_severity, incapacitation, awareness, dental_problems, and wears_dentures recorded only, not in the total; no activation subtraction; no published total-score TD cutoffs","purpose":"Sum Guy 1976 AIMS movement items 1-7 (each caller-assigned integer 0-4) and return the dyskinesia total (max 28). Overall severity, incapacitation, awareness, dental problems, and dentures are recorded only.","markdown_url":"https://magentlab.com/docs/aims.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"aims"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Guy 1976 AIMS dyskinesia total: sum of movement items 1-7 (0-28)"},{"name":"max_score","type":"integer","description":"Always 28"},{"name":"overall_severity","type":"integer","description":"Guy 1976 item 8 overall severity (0-4); not in the dyskinesia total"},{"name":"incapacitation","type":"integer","description":"Guy 1976 item 9 incapacitation (0-4); not in the dyskinesia total"},{"name":"awareness","type":"integer","description":"Guy 1976 item 10 awareness (0-4); not in the dyskinesia total"},{"name":"dental_problems","type":"boolean","description":"Guy 1976 item 11 current dental problems; not in the dyskinesia total"},{"name":"wears_dentures","type":"boolean","description":"Guy 1976 item 12 usually wears dentures; not in the dyskinesia total"},{"name":"components","type":"array","description":"Per-region caller-assigned points for movement items 1-7 only"},{"name":"citation","type":"object","description":"Guy 1976 ECDEU 117-AIMS citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"awareness":"1","dental_problems":"false","facial_expression":"2","incapacitation":"1","jaw":"0","lips_perioral":"0","lower_extremities":"0","overall_severity":"2","tongue":"1","trunk":"0","upper_extremities":"0","wears_dentures":"false"},{"awareness":"1","dental_problems":"false","facial_expression":"2","incapacitation":"1","jaw":"0","lips_perioral":"0","lower_extremities":"0","overall_severity":"2","tongue":"1","trunk":"0","upper_extremities":"0","wears_dentures":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/aims","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/aims?facial_expression=2&lips_perioral=0&jaw=0&tongue=1&upper_extremities=0&lower_extremities=0&trunk=0&overall_severity=2&incapacitation=1&awareness=1&dental_problems=false&wears_dentures=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/aims","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/4at","description":"4AT (Bellelli 2014): alertness (normal 0, abnormal 4) + AMT4 mistake count 0/1/2 + attention 0/1/2 + acute change or fluctuation (false 0, true 4). Max 12. Band 0 unlikely, 1–3 possible cognitive impairment, ≥4 possible delirium. Not a delirium or dementia diagnosis. magent does not examine the patient. AMT4 is the caller-assigned mistake count only; this API does not collect age, date of birth, place, or year.","parameters":[{"in":"query","name":"alertness","type":"string","enum":["normal","abnormal"],"description":"Bellelli 2014 4AT item 1 as assigned by the caller. normal scores 0; abnormal scores 4. magent does not observe consciousness.","required":true,"example":"normal"},{"in":"query","name":"amt4","type":"integer","enum":[0,1,2],"description":"Caller-assigned AMT4 mistake count only (Bellelli 2014): 0 mistakes → 0; 1 mistake → 1; ≥2 mistakes or untestable → 2. Integer 0, 1, or 2. This API does not collect age, date of birth, place, or year.","required":true,"example":"0"},{"in":"query","name":"attention","type":"integer","enum":[0,1,2],"description":"Bellelli 2014 months-backwards item as assigned by the caller. 0: achieves ≥7 months. 1: starts but <7 months or refuses. 2: untestable. Integer 0, 1, or 2. magent does not run months backwards.","required":true,"example":"0"},{"in":"query","name":"acute_change","type":"boolean","description":"Bellelli 2014 acute change or fluctuating course as assigned by the caller. true scores 4. magent does not take a collateral history.","required":true,"example":"false"}],"errors":[{"code":"invalid_alertness","message":"alertness must be normal or abnormal (Bellelli 2014 4AT item 1). Returned before settlement; you are not charged.","status":400},{"code":"invalid_amt4","message":"amt4 must be 0, 1, or 2 (Bellelli 2014 4AT; 2 is ≥2 mistakes or untestable). Returned before settlement; you are not charged.","status":400},{"code":"invalid_attention","message":"attention must be 0, 1, or 2 (Bellelli 2014 4AT months backwards; 2 is untestable). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/4at","citation":{"authors":"Bellelli G, Morandi A, Davis DH, Mazzola P, Turco R, Gentile S, Ryan T, Cash H, Guerini F, Torpilliesi T, Del Santo F, Trabucchi M, Annoni G, MacLullich AM","doi":"10.1093/ageing/afu021","id":"bellelli-2014","pmid":"24590568","source":"Age Ageing. 2014;43(4):496-502","title":"Validation of the 4AT, a new instrument for rapid delirium screening: a study in 234 hospitalised older people","url":"https://doi.org/10.1093/ageing/afu021"},"formula_expression":"4AT = alertness (normal 0, abnormal 4) + amt4 (0/1/2) + attention (0/1/2) + acute_change (false 0, true 4); Bellelli 2014; max 12; 0 unlikely, 1-3 possible_cognitive_impairment, ≥4 possible_delirium","purpose":"Sum the Bellelli 2014 4AT items and return unlikely (0), possible cognitive impairment (1–3), or possible delirium (≥4).","markdown_url":"https://magentlab.com/docs/4at.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"4at"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"4AT points 0-12"},{"name":"max_score","type":"integer","description":"Always 12"},{"name":"at_band","type":"string","description":"unlikely when score is 0, possible_cognitive_impairment when 1-3, possible_delirium when ≥4 (Bellelli 2014). Not a delirium diagnosis."},{"name":"components","type":"array","description":"Per-item points"},{"name":"citation","type":"object","description":"Bellelli 2014 Age Ageing citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"acute_change":"false","alertness":"normal","amt4":"0","attention":"0"},{"acute_change":"false","alertness":"normal","amt4":"0","attention":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/4at","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/4at?alertness=normal&amt4=0&attention=0&acute_change=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/4at","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/nincds-adrda","description":"McKhann 1984 NINCDS-ADRDA diagnostic category as assigned by the caller (definite, probable, possible, or unlikely). Returns the token and the published defining-features description. magent does not examine the patient. Not NIA-AA 2011/2018. Not DSM. Not an Alzheimer's diagnosis. Not a medical device.","parameters":[{"in":"query","name":"category","type":"string","description":"McKhann 1984 NINCDS-ADRDA diagnostic category as assigned by the caller (definite: clinical criteria for probable Alzheimer's disease and histopathologic confirmation; probable: dementia, deficits in two or more areas of cognition, progressive worsening, no disturbance of consciousness, onset between 40 and 90, absence of other diseases that could account for the deficits; possible: dementia syndrome with atypical onset, presentation, or course, or a second systemic or brain disease capable of producing dementia but not thought to be the cause; unlikely: sudden onset, early focal neurologic findings, or seizures or gait disturbance at onset). Token definite, probable, possible, or unlikely only; case-insensitive. Reject NIA-AA, DSM, and probable AD. Not NIA-AA 2011/2018. Not DSM. magent does not examine the patient.","required":true,"example":"probable"}],"errors":[{"code":"invalid_nincds_adrda","message":"NINCDS-ADRDA needs the McKhann 1984 category token definite, probable, possible, or unlikely. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/nincds-adrda","citation":{"authors":"McKhann G, Drachman D, Folstein M, Katzman R, Price D, Stadlan EM","doi":"10.1212/wnl.34.7.939","id":"mckhann-1984","pmid":"6610841","source":"Neurology. 1984;34(7):939-944","title":"Clinical diagnosis of Alzheimer's disease: report of the NINCDS-ADRDA Work Group under the auspices of Department of Health and Human Services Task Force on Alzheimer's Disease","url":"https://doi.org/10.1212/wnl.34.7.939"},"formula_expression":"category in {definite, probable, possible, unlikely} as assigned by the caller (McKhann 1984 NINCDS-ADRDA diagnostic categories). Not NIA-AA 2011/2018. Not DSM. magent does not examine the patient.","purpose":"Echo the caller-assigned McKhann 1984 NINCDS-ADRDA diagnostic category (definite, probable, possible, or unlikely) with the published defining-features description. magent does not examine the patient. Not NIA-AA 2011/2018. Not DSM.","markdown_url":"https://magentlab.com/docs/nincds-adrda.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"nincds_adrda"},{"name":"formula_expression","type":"string","description":"Published McKhann 1984 NINCDS-ADRDA category rule"},{"name":"category","type":"string","description":"Caller-assigned McKhann 1984 token: definite, probable, possible, or unlikely"},{"name":"description","type":"string","description":"McKhann 1984 defining-features wording for that category"},{"name":"components","type":"array","description":"Per-category Tree rows definite, probable, possible, unlikely with factor and met; exactly one is met"},{"name":"citation","type":"object","description":"McKhann 1984 Neurology citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"category":"probable"},{"category":"probable"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/nincds-adrda","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/nincds-adrda?category=probable","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/nincds-adrda","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/iwg2-ad","description":"Dubois 2014 IWG-2 typical AD research criteria. typical_ad iff early hippocampal-type episodic memory, no better explanation, and in-vivo AD pathology (CSF Abeta1-42 plus T-tau or P-tau, amyloid PET, or a PSEN1/PSEN2/APP mutation). Typical AD only; not atypical phenotypes. Not NINCDS-ADRDA, not NIA-AA ATN, not DSM. magent does not examine the patient, assay CSF, or read PET. Not a diagnosis or medical device.","parameters":[{"in":"query","name":"early_episodic_memory","type":"boolean","description":"Early and significant episodic memory impairment of the hippocampal type (IWG-2 specific phenotype for typical AD), as assigned by the caller. true or false. magent does not examine the patient.","required":true,"example":"true"},{"in":"query","name":"csf_abeta_and_tau","type":"boolean","description":"Decreased Aβ1-42 together with increased T-tau or P-tau in CSF, as assigned by the caller (Dubois 2014 IWG-2 in-vivo AD pathology). true or false. magent does not assay CSF.","required":true,"example":"true"},{"in":"query","name":"amyloid_pet","type":"boolean","description":"Increased tracer retention on amyloid PET, as assigned by the caller (Dubois 2014 IWG-2 in-vivo AD pathology). true or false. magent does not read PET.","required":true,"example":"false"},{"in":"query","name":"autosomal_dominant_mutation","type":"boolean","description":"Proven AD autosomal-dominant mutation in PSEN1, PSEN2, or APP, as assigned by the caller (Dubois 2014 IWG-2 in-vivo AD pathology). true or false. magent does not sequence genes.","required":true,"example":"false"},{"in":"query","name":"no_better_explanation","type":"boolean","description":"Exclusion of other disorders that could account for the phenotype, as assigned by the caller (Dubois 2014 IWG-2). true or false. magent does not examine the patient.","required":true,"example":"true"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/iwg2-ad","citation":{"authors":"Dubois B, Feldman HH, Jacova C, Hampel H, Molinuevo JL, Blennow K, DeKosky ST, Gauthier S, Selkoe D, Bateman R, Cappa S, Crutch S, Engelborghs S, Frisoni GB, Fox NC, Galasko D, Habert MO, Jicha GA, Nordberg A, Pasquier F, Rabinovici G, Robert P, Rowe C, Salloway S, Sarazin M, Epelbaum S, de Souza LC, Vellas B, Visser PJ, Schneider L, Stern Y, Scheltens P, Cummings JL","doi":"10.1016/S1474-4422(14)70090-0","id":"dubois-2014","pmid":"24849862","source":"Lancet Neurol. 2014;13(6):614-629","title":"Advancing research diagnostic criteria for Alzheimer's disease: the IWG-2 criteria","url":"https://doi.org/10.1016/S1474-4422(14)70090-0"},"formula_expression":"typical_ad iff no_better_explanation AND early_episodic_memory AND (csf_abeta_and_tau OR amyloid_pet OR autosomal_dominant_mutation) (Dubois 2014 IWG-2 typical AD). Not NINCDS-ADRDA. Not NIA-AA. Not DSM. magent does not examine the patient or assay CSF/PET.","purpose":"Apply Dubois 2014 IWG-2 typical AD research criteria from caller-assigned hippocampal-type memory, in-vivo pathology, and exclusion flags. magent does not examine the patient or assay CSF/PET.","markdown_url":"https://magentlab.com/docs/iwg2-ad.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"iwg2_ad"},{"name":"formula_expression","type":"string","description":"Published Dubois 2014 IWG-2 typical AD rule"},{"name":"typical_ad","type":"boolean","description":"true iff no_better_explanation, early_episodic_memory, and in-vivo AD pathology (CSF, amyloid PET, or mutation). Not a diagnosis. Typical AD research criteria only."},{"name":"in_vivo_pathology","type":"boolean","description":"true iff csf_abeta_and_tau or amyloid_pet or autosomal_dominant_mutation. magent does not assay CSF or read PET."},{"name":"criteria","type":"array","description":"Per-factor Tree rows early_episodic_memory, csf_abeta_and_tau, amyloid_pet, autosomal_dominant_mutation, no_better_explanation, and derived in_vivo_pathology, each with factor and met"},{"name":"citation","type":"object","description":"Dubois 2014 Lancet Neurol IWG-2 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"amyloid_pet":"false","autosomal_dominant_mutation":"false","csf_abeta_and_tau":"true","early_episodic_memory":"true","no_better_explanation":"true"},{"amyloid_pet":"false","autosomal_dominant_mutation":"false","csf_abeta_and_tau":"true","early_episodic_memory":"true","no_better_explanation":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/iwg2-ad","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/iwg2-ad?early_episodic_memory=true&csf_abeta_and_tau=true&amyloid_pet=false&autosomal_dominant_mutation=false&no_better_explanation=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/iwg2-ad","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/awol","description":"Douglas 2013 AWOL: four caller-assigned yes/no flags (age ≥80, unable to spell WORLD backward, not fully oriented to place, nurse-rated illness moderately ill/severely ill/moribund), 1 point each, max 4. Combined-population observed delirium 2/4/14/20/64% at scores 0–4. Deterministic published score with citation; not a delirium diagnosis, not CAM-ICU, not 4AT, and not a medical device. magent does not interview the patient or collect an integer age.","parameters":[{"in":"query","name":"age_ge_80","type":"boolean","description":"Age ≥80 years (AWOL A; Douglas 2013). true or false as assigned by the caller. magent does not collect an integer age and does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"failed_world_backward","type":"boolean","description":"Unable to correctly spell WORLD backward (AWOL W; Douglas 2013). true or false as assigned by the caller. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"not_oriented_to_place","type":"boolean","description":"Not fully oriented to place: not oriented to city, state, county, hospital name, and floor (AWOL O; Douglas 2013). true or false as assigned by the caller. magent does not interview the patient.","required":true,"example":"false"},{"in":"query","name":"illness_moderate_severe_or_moribund","type":"boolean","description":"Nurse-rated illness severity moderately ill, severely ill, or moribund, as opposed to not ill or mildly ill (AWOL L; Douglas 2013). true or false as assigned by the caller. magent does not interview the patient.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/awol","citation":{"authors":"Douglas VC, Hessler CS, Dhaliwal G, Betjemann JP, Fukuda KA, Alameddine LR, Lucatorto R, Johnston SC, Josephson SA","doi":"10.1002/jhm.2062","id":"douglas-2013","pmid":"23922253","source":"J Hosp Med. 2013;8(9):493-499","title":"The AWOL tool: derivation and validation of a delirium prediction rule","url":"https://doi.org/10.1002/jhm.2062"},"formula_expression":"AWOL = age_ge_80 + failed_world_backward + not_oriented_to_place + illness_moderate_severe_or_moribund; each 1 if true; max 4; combined-population observed delirium 2/4/14/20/64% (Douglas 2013)","purpose":"Sum the four Douglas 2013 AWOL items and return the combined-population observed delirium percent at that score.","markdown_url":"https://magentlab.com/docs/awol.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"awol"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"AWOL points 0-4"},{"name":"max_score","type":"integer","description":"4"},{"name":"observed_delirium_percent","type":"integer","description":"Douglas 2013 combined-population observed delirium percent at this score: 2, 4, 14, 20, or 64. Not a diagnosis and not a binary high-risk cutoff."},{"name":"components","type":"array","description":"Per-item points"},{"name":"citation","type":"object","description":"Douglas J Hosp Med 2013 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age_ge_80":"false","failed_world_backward":"false","illness_moderate_severe_or_moribund":"false","not_oriented_to_place":"false"},{"age_ge_80":"false","failed_world_backward":"false","illness_moderate_severe_or_moribund":"false","not_oriented_to_place":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/awol","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/awol?age_ge_80=false&failed_world_backward=false&not_oriented_to_place=false&illness_moderate_severe_or_moribund=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/awol","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/amt-4","description":"AMT-4 (Swain 1997): four caller-assigned flags for age, date of birth, place, and year. Each correct item scores 1; max 4. Impaired cognition is indicated when the score is less than 4 (0–3 impaired; 4 not impaired). Flags only; magent does not interview the patient or collect a date of birth, age, place name, or year. Not a dementia diagnosis and not a medical device. Not Hodkinson 1972 AMT-10.","parameters":[{"in":"query","name":"age_correct","type":"boolean","description":"Caller-assigned flag: age stated correctly (Swain 1997 AMT-4). true scores 1; false scores 0. magent does not interview the patient and does not collect an age.","required":true,"example":"true"},{"in":"query","name":"dob_correct","type":"boolean","description":"Caller-assigned flag: date of birth stated correctly (Swain 1997 AMT-4). true scores 1; false scores 0. magent does not collect a date of birth.","required":true,"example":"true"},{"in":"query","name":"place_correct","type":"boolean","description":"Caller-assigned flag: place stated correctly (Swain 1997 AMT-4). true scores 1; false scores 0. magent does not collect a place name.","required":true,"example":"true"},{"in":"query","name":"year_correct","type":"boolean","description":"Caller-assigned flag: current year stated correctly (Swain 1997 AMT-4). true scores 1; false scores 0. magent does not collect a year.","required":true,"example":"true"}],"errors":[{"code":"invalid_amt_4","message":"each AMT-4 item must be true or false as assigned by the caller (Swain 1997). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/amt-4","citation":{"authors":"Swain DG, Nightingale PG","doi":"10.1177/026921559701100308","id":"swain-1997","pmid":"9360037","source":"Clin Rehabil. 1997;11(3):243-248","title":"Evaluation of a shortened version of the Abbreviated Mental Test in a series of elderly patients","url":"https://doi.org/10.1177/026921559701100308"},"formula_expression":"AMT-4 = age_correct + dob_correct + place_correct + year_correct; each 1 if true; max 4; impaired iff score < 4 (Swain 1997)","purpose":"Sum the four Swain 1997 AMT-4 items from caller-assigned correct/incorrect flags and return whether the score is less than 4 (impaired).","markdown_url":"https://magentlab.com/docs/amt-4.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"amt_4"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"AMT-4 points 0-4 (Swain 1997)"},{"name":"max_score","type":"integer","description":"Always 4"},{"name":"impaired","type":"boolean","description":"true when score is less than 4 (0–3 impaired; 4 not impaired). Swain 1997 screening total, not a dementia diagnosis."},{"name":"components","type":"array","description":"Per-item points"},{"name":"citation","type":"object","description":"Swain 1997 Clin Rehabil citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age_correct":"true","dob_correct":"true","place_correct":"true","year_correct":"true"},{"age_correct":"true","dob_correct":"true","place_correct":"true","year_correct":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/amt-4","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/amt-4?age_correct=true&dob_correct=true&place_correct=true&year_correct=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/amt-4","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/amt-10","description":"AMT-10 (Hodkinson 1972): ten caller-assigned correct/incorrect flags. Each correct item scores 1; max 10. Score is the 0–10 sum only. Hodkinson 1972 did not publish a diagnostic cutoff. Flags only; magent does not interview the patient or collect age, date of birth, place, year, address, or monarch name. Not a dementia diagnosis, not a medical device, and not Swain 1997 AMT-4.","parameters":[{"in":"query","name":"age_correct","type":"boolean","description":"Caller-assigned flag: age stated correctly (Hodkinson 1972 AMT-10). true scores 1; false scores 0. magent does not interview the patient and does not collect an age.","required":true,"example":"true"},{"in":"query","name":"time_correct","type":"boolean","description":"Caller-assigned flag: time to the nearest hour stated correctly (Hodkinson 1972 AMT-10). true scores 1; false scores 0. magent does not collect a clock time.","required":true,"example":"true"},{"in":"query","name":"address_recall_correct","type":"boolean","description":"Caller-assigned flag: address recall at the end of the test (Hodkinson 1972 AMT-10; the classic 42 West Street prompt is assigned by the caller). true scores 1; false scores 0. magent does not collect an address.","required":true,"example":"true"},{"in":"query","name":"year_correct","type":"boolean","description":"Caller-assigned flag: current year stated correctly (Hodkinson 1972 AMT-10). true scores 1; false scores 0. magent does not collect a year.","required":true,"example":"true"},{"in":"query","name":"place_correct","type":"boolean","description":"Caller-assigned flag: name of place / hospital stated correctly (Hodkinson 1972 AMT-10). true scores 1; false scores 0. magent does not collect a place name.","required":true,"example":"true"},{"in":"query","name":"two_persons_correct","type":"boolean","description":"Caller-assigned flag: recognition of two persons (Hodkinson 1972 AMT-10). true scores 1; false scores 0. magent does not interview the patient.","required":true,"example":"true"},{"in":"query","name":"dob_correct","type":"boolean","description":"Caller-assigned flag: date of birth stated correctly (Hodkinson 1972 AMT-10). true scores 1; false scores 0. magent does not collect a date of birth.","required":true,"example":"true"},{"in":"query","name":"world_war_start_correct","type":"boolean","description":"Caller-assigned flag: year the First World War started stated correctly (Hodkinson 1972 AMT-10). true scores 1; false scores 0. magent does not collect a year.","required":true,"example":"true"},{"in":"query","name":"monarch_correct","type":"boolean","description":"Caller-assigned flag: name of the present monarch stated correctly (Hodkinson 1972 AMT-10). true scores 1; false scores 0. magent does not collect a monarch name.","required":true,"example":"true"},{"in":"query","name":"count_backwards_20_correct","type":"boolean","description":"Caller-assigned flag: count backwards from 20 to 1 (Hodkinson 1972 AMT-10). true scores 1; false scores 0. magent does not interview the patient.","required":true,"example":"true"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/amt-10","citation":{"authors":"Hodkinson HM","doi":"10.1093/ageing/1.4.233","id":"hodkinson-1972","pmid":"4669880","source":"Age Ageing. 1972;1(4):233-238","title":"Evaluation of a mental test score for assessment of mental impairment in the elderly","url":"https://doi.org/10.1093/ageing/1.4.233"},"formula_expression":"AMT-10 = age_correct + time_correct + address_recall_correct + year_correct + place_correct + two_persons_correct + dob_correct + world_war_start_correct + monarch_correct + count_backwards_20_correct; each 1 if true; max 10 (Hodkinson 1972)","purpose":"Sum the ten Hodkinson 1972 AMT-10 items from caller-assigned correct/incorrect flags and return the 0–10 total. Hodkinson 1972 did not publish a diagnostic cutoff.","markdown_url":"https://magentlab.com/docs/amt-10.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"amt_10"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"AMT-10 points 0-10 (Hodkinson 1972)"},{"name":"max_score","type":"integer","description":"Always 10"},{"name":"components","type":"array","description":"Per-item points"},{"name":"citation","type":"object","description":"Hodkinson 1972 Age Ageing citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"address_recall_correct":"true","age_correct":"true","count_backwards_20_correct":"true","dob_correct":"true","monarch_correct":"true","place_correct":"true","time_correct":"true","two_persons_correct":"true","world_war_start_correct":"true","year_correct":"true"},{"address_recall_correct":"true","age_correct":"true","count_backwards_20_correct":"true","dob_correct":"true","monarch_correct":"true","place_correct":"true","time_correct":"true","two_persons_correct":"true","world_war_start_correct":"true","year_correct":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/amt-10","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/amt-10?age_correct=true&time_correct=true&address_recall_correct=true&year_correct=true&place_correct=true&two_persons_correct=true&dob_correct=true&world_war_start_correct=true&monarch_correct=true&count_backwards_20_correct=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/amt-10","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/painad","description":"Warden 2003 PAINAD from five caller-assigned 0-2 items (breathing, negative_vocalization, facial_expression, body_language, consolability) using that paper's 0/1/2 descriptors. magent sums only (max 10) and does not observe the patient. No later intensity cutoffs. Not a pain diagnosis or analgesic order.","parameters":[{"in":"query","name":"breathing","type":"integer","description":"Caller-assigned Warden 2003 PAINAD breathing independent of vocalization (integer 0-2): 0 normal; 1 occasional labored breathing or short period of hyperventilation; 2 noisy labored breathing, long period of hyperventilation, or Cheyne-Stokes respirations. magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"negative_vocalization","type":"integer","description":"Caller-assigned Warden 2003 PAINAD negative vocalization (integer 0-2): 0 none; 1 occasional moan or groan, or low-level speech with a negative or disapproving quality; 2 repeated troubled calling out, loud moaning or groaning, or crying. magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"facial_expression","type":"integer","description":"Caller-assigned Warden 2003 PAINAD facial expression (integer 0-2): 0 smiling or inexpressive; 1 sad, frightened, or frown; 2 facial grimacing. magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"body_language","type":"integer","description":"Caller-assigned Warden 2003 PAINAD body language (integer 0-2): 0 relaxed; 1 tense, distressed pacing, or fidgeting; 2 rigid, fists clenched, knees pulled up, pulling or pushing away, or striking out. magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"consolability","type":"integer","description":"Caller-assigned Warden 2003 PAINAD consolability (integer 0-2): 0 no need to console; 1 distracted or reassured by voice or touch; 2 unable to console, distract, or reassure. magent does not observe the patient.","required":true,"example":"0"}],"errors":[{"code":"invalid_painad","message":"each PAINAD item must be an integer 0, 1, or 2 (Warden 2003). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/painad","citation":{"authors":"Warden V, Hurley AC, Volicer L","doi":"10.1097/01.JAM.0000043422.31640.F7","id":"warden-2003","pmid":"12807591","source":"J Am Med Dir Assoc. 2003;4(1):9-15","title":"Development and psychometric evaluation of the Pain Assessment in Advanced Dementia (PAINAD) scale","url":"https://doi.org/10.1097/01.JAM.0000043422.31640.F7"},"formula_expression":"PAINAD = breathing + negative_vocalization + facial_expression + body_language + consolability; each caller-assigned 0-2; max 10","purpose":"Sum five caller-assigned Warden 2003 PAINAD integers (0-2) and return the published total (max 10).","markdown_url":"https://magentlab.com/docs/painad.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"painad"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"PAINAD points 0-10"},{"name":"max_score","type":"integer","description":"Always 10"},{"name":"components","type":"array","description":"Per-item caller-assigned points"},{"name":"citation","type":"object","description":"Warden et al. J Am Med Dir Assoc 2003 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"body_language":"0","breathing":"0","consolability":"0","facial_expression":"0","negative_vocalization":"0"},{"body_language":"0","breathing":"0","consolability":"0","facial_expression":"0","negative_vocalization":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/painad","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/painad?breathing=0&negative_vocalization=0&facial_expression=0&body_language=0&consolability=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/painad","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/nps","description":"Galer 1997 Neuropathic Pain Scale from ten caller-assigned 0-10 items (intensity, sharpness, heat, dullness, cold, sensitive, itchy, unpleasantness, deep_pain, surface_pain; Table 1 Intense, Sharp, Hot, Dull, Cold, Sensitive, Itchy, Unpleasant, Deep, Surface). magent sums those items only (max 100) and does not interview the patient. Galer 1997 printed no diagnostic cutoff for that sum. Not a neuropathy diagnosis or treatment order.","parameters":[{"in":"query","name":"intensity","type":"integer","description":"Caller-assigned Galer 1997 NPS intensity (integer 0-10; Table 1 Intense). magent does not interview the patient.","required":true,"example":0},{"in":"query","name":"sharpness","type":"integer","description":"Caller-assigned Galer 1997 NPS sharpness (integer 0-10; Table 1 Sharp). magent does not interview the patient.","required":true,"example":0},{"in":"query","name":"heat","type":"integer","description":"Caller-assigned Galer 1997 NPS heat (integer 0-10; Table 1 Hot). magent does not interview the patient.","required":true,"example":0},{"in":"query","name":"dullness","type":"integer","description":"Caller-assigned Galer 1997 NPS dullness (integer 0-10; Table 1 Dull). magent does not interview the patient.","required":true,"example":0},{"in":"query","name":"cold","type":"integer","description":"Caller-assigned Galer 1997 NPS cold (integer 0-10; Table 1 Cold). magent does not interview the patient.","required":true,"example":0},{"in":"query","name":"sensitive","type":"integer","description":"Caller-assigned Galer 1997 NPS sensitive (integer 0-10; Table 1 Sensitive). magent does not interview the patient.","required":true,"example":0},{"in":"query","name":"itchy","type":"integer","description":"Caller-assigned Galer 1997 NPS itchy (integer 0-10; Table 1 Itchy). magent does not interview the patient.","required":true,"example":0},{"in":"query","name":"unpleasantness","type":"integer","description":"Caller-assigned Galer 1997 NPS overall unpleasantness (integer 0-10; Table 1 Unpleasant). magent does not interview the patient.","required":true,"example":0},{"in":"query","name":"deep_pain","type":"integer","description":"Caller-assigned Galer 1997 NPS intensity of deep pain (integer 0-10; Table 1 Deep). magent does not interview the patient.","required":true,"example":0},{"in":"query","name":"surface_pain","type":"integer","description":"Caller-assigned Galer 1997 NPS intensity of surface pain (integer 0-10; Table 1 Surface). magent does not interview the patient.","required":true,"example":0}],"errors":[{"code":"invalid_nps","message":"Neuropathic Pain Scale inputs must match the published 0-10 item scores. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/nps","citation":{"authors":"Galer BS, Jensen MP","doi":"10.1212/WNL.48.2.332","id":"galer-1997-nps","pmid":"9040716","source":"Neurology. 1997;48:332-338","title":"Development and preliminary validation of a pain measure specific to neuropathic pain: the Neuropathic Pain Scale","url":"https://doi.org/10.1212/WNL.48.2.332"},"formula_expression":"NPS = intensity + sharpness + heat + dullness + cold + sensitive + itchy + unpleasantness + deep_pain + surface_pain; each caller-assigned 0-10; max 100; Galer 1997 Table 1 Intense, Sharp, Hot, Dull, Cold, Sensitive, Itchy, Unpleasant, Deep, Surface; no total-score cutoff","purpose":"Sum ten caller-assigned Galer 1997 NPS integers (0-10) printed as Intense, Sharp, Hot, Dull, Cold, Sensitive, Itchy, Unpleasant, Deep, and Surface, and return that total (max 100).","markdown_url":"https://magentlab.com/docs/nps.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"nps"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Sum of ten Galer 1997 NPS caller-assigned 0-10 items (0-100)"},{"name":"max_score","type":"integer","description":"Always 100"},{"name":"components","type":"array","description":"Per-item caller-assigned points"},{"name":"citation","type":"object","description":"Galer and Jensen Neurology 1997 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"cold":"0","deep_pain":"0","dullness":"0","heat":"0","intensity":"0","itchy":"0","sensitive":"0","sharpness":"0","surface_pain":"0","unpleasantness":"0"},{"cold":"0","deep_pain":"0","dullness":"0","heat":"0","intensity":"0","itchy":"0","sensitive":"0","sharpness":"0","surface_pain":"0","unpleasantness":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/nps","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/nps?intensity=0&sharpness=0&heat=0&dullness=0&cold=0&sensitive=0&itchy=0&unpleasantness=0&deep_pain=0&surface_pain=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/nps","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/abbey","description":"Abbey 2004 observational pain scale from six caller-assigned 0-3 items (vocalization, facial_expression, change_in_body_language, behavioural_change, physiological_change, physical_changes) using that paper's absent/mild/moderate/severe descriptors. magent sums only (max 18) and returns Abbey 2004 bands: 0-2 none, 3-7 mild, 8-13 moderate, 14+ severe. magent does not observe the patient. Not a pain diagnosis or analgesic order. Not PAINAD.","parameters":[{"in":"query","name":"vocalization","type":"integer","description":"Caller-assigned Abbey 2004 vocalization (integer 0-3): 0 absent; 1 mild; 2 moderate; 3 severe. Paper examples: whimpering, groaning, crying. magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"facial_expression","type":"integer","description":"Caller-assigned Abbey 2004 facial expression (integer 0-3): 0 absent; 1 mild; 2 moderate; 3 severe. Paper examples: looking tense, frowning, grimacing, looking frightened. magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"change_in_body_language","type":"integer","description":"Caller-assigned Abbey 2004 change in body language (integer 0-3): 0 absent; 1 mild; 2 moderate; 3 severe. Paper examples: fidgeting, rocking, guarding part of body, withdrawn. magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"behavioural_change","type":"integer","description":"Caller-assigned Abbey 2004 behavioural change (integer 0-3): 0 absent; 1 mild; 2 moderate; 3 severe. Paper examples: increased confusion, refusing to eat, alteration in usual patterns. magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"physiological_change","type":"integer","description":"Caller-assigned Abbey 2004 physiological change (integer 0-3): 0 absent; 1 mild; 2 moderate; 3 severe. Paper examples: temperature, pulse or blood pressure outside normal limits, perspiring, flushing or pallor. magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"physical_changes","type":"integer","description":"Caller-assigned Abbey 2004 physical changes (integer 0-3): 0 absent; 1 mild; 2 moderate; 3 severe. Paper examples: skin tears, pressure areas, arthritis, contractures, previous injuries. magent does not observe the patient.","required":true,"example":"0"}],"errors":[{"code":"invalid_abbey","message":"Abbey pain-scale inputs must be the six caller-assigned 0-3 observational items from Abbey 2004. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/abbey","citation":{"authors":"Abbey J, Piller N, De Bellis A, Esterman A, Parker D, Giles L, Lowcay B","doi":"10.12968/ijpn.2004.10.1.12013","id":"abbey-2004","pmid":"14966439","source":"Int J Palliat Nurs. 2004;10(1):6-13","title":"The Abbey pain scale: a 1-minute numerical indicator for people with end-stage dementia","url":"https://doi.org/10.12968/ijpn.2004.10.1.12013"},"formula_expression":"Abbey = vocalization + facial_expression + change_in_body_language + behavioural_change + physiological_change + physical_changes; each caller-assigned 0-3 (absent/mild/moderate/severe); max 18; Abbey 2004 bands 0-2 none, 3-7 mild, 8-13 moderate, 14+ severe","purpose":"Sum six caller-assigned Abbey 2004 observational integers (0-3) and return the published total (max 18) and that paper's none/mild/moderate/severe bands.","markdown_url":"https://magentlab.com/docs/abbey.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"abbey"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Abbey points 0-18"},{"name":"max_score","type":"integer","description":"Always 18"},{"name":"severity","type":"string","description":"Abbey 2004 published bands: none (0-2), mild (3-7), moderate (8-13), severe (14+). Not a pain diagnosis."},{"name":"components","type":"array","description":"Per-item caller-assigned points"},{"name":"citation","type":"object","description":"Abbey et al. Int J Palliat Nurs 2004 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"behavioural_change":"0","change_in_body_language":"0","facial_expression":"0","physical_changes":"0","physiological_change":"0","vocalization":"0"},{"behavioural_change":"0","change_in_body_language":"0","facial_expression":"0","physical_changes":"0","physiological_change":"0","vocalization":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/abbey","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/abbey?vocalization=0&facial_expression=0&change_in_body_language=0&behavioural_change=0&physiological_change=0&physical_changes=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/abbey","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/flacc","description":"Merkel 1997 FLACC from five caller-assigned 0-2 items (face, legs, activity, cry, consolability) using that paper's 0/1/2 descriptors. magent sums only (max 10) and does not observe the child. No later intensity cutoffs. Not a pain diagnosis or analgesic order. Not PAINAD.","parameters":[{"in":"query","name":"face","type":"integer","description":"Caller-assigned Merkel 1997 FLACC face (integer 0-2): 0 no particular expression or smile; 1 occasional grimace/frown, withdrawn or disinterested; 2 frequent/constant quivering chin, clenched jaw. magent does not observe the child.","required":true,"example":"0"},{"in":"query","name":"legs","type":"integer","description":"Caller-assigned Merkel 1997 FLACC legs (integer 0-2): 0 normal position or relaxed; 1 uneasy, restless, tense; 2 kicking or legs drawn up. magent does not observe the child.","required":true,"example":"0"},{"in":"query","name":"activity","type":"integer","description":"Caller-assigned Merkel 1997 FLACC activity (integer 0-2): 0 lying quietly, normal position, moves easily; 1 squirming, shifting back and forth, tense; 2 arched, rigid or jerking. magent does not observe the child.","required":true,"example":"0"},{"in":"query","name":"cry","type":"integer","description":"Caller-assigned Merkel 1997 FLACC cry (integer 0-2): 0 no cry (awake or asleep); 1 moans or whimpers, occasional complaint; 2 crying steadily, screams or sobs, frequent complaints. magent does not observe the child.","required":true,"example":"0"},{"in":"query","name":"consolability","type":"integer","description":"Caller-assigned Merkel 1997 FLACC consolability (integer 0-2): 0 content and relaxed; 1 reassured by occasional touching, hugging or being talked to, distractible; 2 difficult to console or comfort. magent does not observe the child.","required":true,"example":"0"}],"errors":[{"code":"invalid_flacc","message":"face, legs, activity, cry, and consolability must each be an integer 0, 1, or 2 (Merkel 1997). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/flacc","citation":{"authors":"Merkel SI, Voepel-Lewis T, Shayevitz JR, Malviya S","id":"merkel-1997","pmid":"9220806","source":"Pediatr Nurs. 1997;23(3):293-297","title":"The FLACC: a behavioral scale for scoring postoperative pain in young children","url":"https://pubmed.ncbi.nlm.nih.gov/9220806"},"formula_expression":"FLACC = face + legs + activity + cry + consolability; each caller-assigned 0-2; max 10","purpose":"Sum five caller-assigned Merkel 1997 FLACC integers (0-2) and return the published total (max 10).","markdown_url":"https://magentlab.com/docs/flacc.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"flacc"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"FLACC points 0-10"},{"name":"max_score","type":"integer","description":"Always 10"},{"name":"face","type":"integer","description":"Caller-assigned face points 0-2"},{"name":"legs","type":"integer","description":"Caller-assigned legs points 0-2"},{"name":"activity","type":"integer","description":"Caller-assigned activity points 0-2"},{"name":"cry","type":"integer","description":"Caller-assigned cry points 0-2"},{"name":"consolability","type":"integer","description":"Caller-assigned consolability points 0-2"},{"name":"components","type":"array","description":"Per-item caller-assigned points"},{"name":"citation","type":"object","description":"Merkel et al. Pediatr Nurs 1997 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"activity":"0","consolability":"0","cry":"0","face":"0","legs":"0"},{"activity":"0","consolability":"0","cry":"0","face":"0","legs":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/flacc","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/flacc?face=0&legs=0&activity=0&cry=0&consolability=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/flacc","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/cpot","description":"Gélinas 2006 CPOT from four caller-assigned 0-2 items (facial_expression, body_movements, muscle_tension, plus ventilator_compliance when intubated or vocalization when extubated) using that paper's 0/1/2 descriptors. magent sums only (max 8) and does not observe the patient. No later intensity cutoffs. Not a pain diagnosis or analgesic order. Not PAINAD.","parameters":[{"in":"query","name":"facial_expression","type":"integer","description":"Caller-assigned Gélinas 2006 CPOT facial expression (integer 0-2): 0 relaxed, no muscle tension; 1 tense (brow lowering, orbit tightening, levator contraction); 2 grimacing. magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"body_movements","type":"integer","description":"Caller-assigned Gélinas 2006 CPOT body movements (integer 0-2): 0 absence of movements or normal position; 1 protection; 2 restlessness. magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"muscle_tension","type":"integer","description":"Caller-assigned Gélinas 2006 CPOT muscle tension on passive flexion/extension of upper limbs (integer 0-2): 0 relaxed; 1 tense/rigid; 2 very tense or rigid. magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"intubated","type":"boolean","description":"true when intubated: provide ventilator_compliance and omit vocalization. false when extubated: provide vocalization and omit ventilator_compliance. magent does not observe the patient.","required":true,"example":"false"},{"in":"query","name":"vocalization","type":"integer","description":"Caller-assigned Gélinas 2006 CPOT vocalization when intubated=false (integer 0-2): 0 talking in normal tone or no sound; 1 sighing, moaning; 2 crying out, sobbing. Omit when intubated=true. magent does not observe the patient.","required":false,"example":"0"},{"in":"query","name":"ventilator_compliance","type":"integer","description":"Caller-assigned Gélinas 2006 CPOT ventilator compliance when intubated=true (integer 0-2): 0 tolerating ventilator or movement; 1 coughing but still tolerating; 2 fighting ventilator. Omit when intubated=false. magent does not observe the patient.","required":false,"example":"0"}],"errors":[{"code":"invalid_cpot","message":"facial_expression, body_movements, muscle_tension, and ventilator_compliance or vocalization must each be 0, 1, or 2 (Gélinas 2006). Returned before settlement; you are not charged.","status":400},{"code":"invalid_cpot_airway","message":"when intubated=true provide ventilator_compliance and omit vocalization; when intubated=false provide vocalization and omit ventilator_compliance (Gélinas 2006). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/cpot","citation":{"authors":"Gélinas C, Fillion L, Puntillo KA, Viens C, Fortier M","doi":"10.4037/ajcc2006.15.4.420","id":"gelinas-2006","pmid":"16823021","source":"Am J Crit Care. 2006;15(4):420-427","title":"Validation of the Critical-Care Pain Observation Tool in Adult Patients","url":"https://doi.org/10.4037/ajcc2006.15.4.420"},"formula_expression":"CPOT = facial_expression + body_movements + muscle_tension + ventilator_compliance (intubated) or vocalization (extubated); each caller-assigned 0-2; max 8","purpose":"Sum four caller-assigned Gélinas 2006 CPOT integers (0-2) and return the published total (max 8). The fourth item is ventilator_compliance when intubated or vocalization when extubated.","markdown_url":"https://magentlab.com/docs/cpot.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"cpot"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"CPOT points 0-8"},{"name":"max_score","type":"integer","description":"Always 8"},{"name":"intubated","type":"boolean","description":"true when the ventilator_compliance item was used"},{"name":"facial_expression","type":"integer","description":"Caller-assigned facial expression 0-2"},{"name":"body_movements","type":"integer","description":"Caller-assigned body movements 0-2"},{"name":"muscle_tension","type":"integer","description":"Caller-assigned muscle tension 0-2"},{"name":"vocalization","type":"integer","description":"Caller-assigned vocalization 0-2 when intubated is false; omitted when intubated"},{"name":"ventilator_compliance","type":"integer","description":"Caller-assigned ventilator compliance 0-2 when intubated is true; omitted when extubated"},{"name":"components","type":"array","description":"Per-item caller-assigned points"},{"name":"citation","type":"object","description":"Gélinas et al. Am J Crit Care 2006 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"body_movements":"0","facial_expression":"0","intubated":"false","muscle_tension":"0","vocalization":"0"},{"body_movements":"0","facial_expression":"0","intubated":"false","muscle_tension":"0","vocalization":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/cpot","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/cpot?facial_expression=0&body_movements=0&muscle_tension=0&intubated=false&vocalization=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/cpot","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/bps","description":"Payen 2001 Behavioral Pain Scale from three caller-assigned 1-4 items (facial_expression, upper_limbs, ventilator_compliance) using that paper's Table 1 descriptors. magent sums only (range 3-12) and does not observe the patient. No later pain-present cutoffs. Not a pain diagnosis or analgesic order. Not CPOT (CPOT items are 0-2).","parameters":[{"in":"query","name":"facial_expression","type":"integer","description":"Caller-assigned Payen 2001 BPS facial expression (integer 1-4): 1 relaxed; 2 partially tightened (e.g. brow lowering); 3 fully tightened (e.g. eyelid closing); 4 grimacing. magent does not observe the patient.","required":true,"example":"1"},{"in":"query","name":"upper_limbs","type":"integer","description":"Caller-assigned Payen 2001 BPS upper limbs (integer 1-4): 1 no movement; 2 partially bent; 3 fully bent with finger flexion; 4 permanently retracted. magent does not observe the patient.","required":true,"example":"1"},{"in":"query","name":"ventilator_compliance","type":"integer","description":"Caller-assigned Payen 2001 BPS compliance with ventilation (integer 1-4): 1 tolerating movement; 2 coughing but tolerating ventilation most of the time; 3 fighting ventilator; 4 unable to control ventilation. magent does not observe the patient.","required":true,"example":"1"}],"errors":[{"code":"invalid_bps","message":"facial_expression, upper_limbs, and ventilator_compliance must each be an integer 1, 2, 3, or 4 (Payen 2001). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/bps","citation":{"authors":"Payen JF, Bru O, Bosson JL, Lagrasta A, Novel E, Deschaux I, Lavagne P, Jacquot C","doi":"10.1097/00003246-200112000-00004","id":"payen-2001","pmid":"11801819","source":"Crit Care Med. 2001;29(12):2258-2263","title":"Assessing pain in critically ill sedated patients by using a behavioral pain scale","url":"https://doi.org/10.1097/00003246-200112000-00004"},"formula_expression":"BPS = facial_expression + upper_limbs + ventilator_compliance; each caller-assigned 1-4; range 3-12","purpose":"Sum three caller-assigned Payen 2001 BPS integers (1-4) and return the published total (range 3-12).","markdown_url":"https://magentlab.com/docs/bps.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"bps"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"BPS points 3-12"},{"name":"max_score","type":"integer","description":"Always 12"},{"name":"facial_expression","type":"integer","description":"Caller-assigned facial expression 1-4"},{"name":"upper_limbs","type":"integer","description":"Caller-assigned upper limbs 1-4"},{"name":"ventilator_compliance","type":"integer","description":"Caller-assigned compliance with ventilation 1-4"},{"name":"components","type":"array","description":"Per-item caller-assigned points"},{"name":"citation","type":"object","description":"Payen et al. Crit Care Med 2001 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"facial_expression":"1","upper_limbs":"1","ventilator_compliance":"1"},{"facial_expression":"1","upper_limbs":"1","ventilator_compliance":"1"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/bps","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/bps?facial_expression=1&upper_limbs=1&ventilator_compliance=1","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/bps","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/nvps","description":"Odhner 2003 original NVPS from five caller-assigned 0-2 items (face, activity, guarding, physiologic_i vital signs, physiologic_ii autonomic) using that paper's 0/1/2 descriptors. magent sums only (max 10) and does not observe the patient. Not the later NVPS-R respiratory revision. No invented intensity cutoffs. Not a pain diagnosis or analgesic order. Not BPS. Not FLACC.","parameters":[{"in":"query","name":"face","type":"integer","description":"Caller-assigned Odhner 2003 original NVPS face (integer 0-2): 0 no particular expression or smile; 1 occasional grimace, tearing, frowning, wrinkled forehead; 2 frequent grimace, tearing, frowning, wrinkled forehead. magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"activity","type":"integer","description":"Caller-assigned Odhner 2003 original NVPS activity/movement (integer 0-2): 0 lying quietly, normal position; 1 seeking attention through movement or slow, cautious movement; 2 restless, excessive activity and/or withdrawal reflexes. magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"guarding","type":"integer","description":"Caller-assigned Odhner 2003 original NVPS guarding (integer 0-2): 0 lying quietly, no positioning of hands over areas of the body; 1 splinting areas of the body, tense; 2 rigid, stiff. magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"physiologic_i","type":"integer","description":"Caller-assigned Odhner 2003 original NVPS physiologic I vital signs (integer 0-2): 0 stable vital signs (no change in past 4 h vs baseline BP/HR/RR); 1 change over past 4 h in SBP >20 mmHg or HR >20/min or RR >10/min; 2 change over past 4 h in SBP >30 mmHg or HR >25/min or RR >20/min. magent does not observe the patient.","required":true,"example":"0"},{"in":"query","name":"physiologic_ii","type":"integer","description":"Caller-assigned Odhner 2003 original NVPS physiologic II autonomic (integer 0-2): 0 warm, dry skin; 1 dilated pupils, perspiring, flushing; 2 diaphoretic, pallor. Not the later NVPS-R respiratory category. magent does not observe the patient.","required":true,"example":"0"}],"errors":[{"code":"invalid_nvps","message":"NVPS inputs must be the five caller-assigned 0-2 Odhner 2003 original categories (face, activity, guarding, physiologic_i, physiologic_ii). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/nvps","citation":{"authors":"Odhner M, Wegman D, Freeland N, Steinmetz A, Ingersoll GL","doi":"10.1097/00003465-200311000-00010","id":"odhner-2003","pmid":"14639117","source":"Dimens Crit Care Nurs. 2003;22(6):260-267","title":"Assessing pain control in nonverbal critically ill adults","url":"https://doi.org/10.1097/00003465-200311000-00010"},"formula_expression":"NVPS = face + activity + guarding + physiologic_i + physiologic_ii; each caller-assigned 0-2; max 10","purpose":"Sum five caller-assigned Odhner 2003 original NVPS integers (0-2) and return the published total (max 10).","markdown_url":"https://magentlab.com/docs/nvps.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"nvps"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"NVPS points 0-10"},{"name":"max_score","type":"integer","description":"Always 10"},{"name":"face","type":"integer","description":"Caller-assigned face points 0-2"},{"name":"activity","type":"integer","description":"Caller-assigned activity points 0-2"},{"name":"guarding","type":"integer","description":"Caller-assigned guarding points 0-2"},{"name":"physiologic_i","type":"integer","description":"Caller-assigned physiologic I (vital signs) points 0-2"},{"name":"physiologic_ii","type":"integer","description":"Caller-assigned physiologic II (autonomic) points 0-2"},{"name":"components","type":"array","description":"Per-item caller-assigned points"},{"name":"citation","type":"object","description":"Odhner et al. Dimens Crit Care Nurs 2003 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"activity":"0","face":"0","guarding":"0","physiologic_i":"0","physiologic_ii":"0"},{"activity":"0","face":"0","guarding":"0","physiologic_i":"0","physiologic_ii":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/nvps","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/nvps?face=0&activity=0&guarding=0&physiologic_i=0&physiologic_ii=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/nvps","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/bops","description":"Hesselgard 2007 Behavioural Observational Pain Scale from three caller-assigned 0-2 items (facial_expression, verbalization, body_position) using that paper's 0/1/2 descriptors. magent sums only (max 6) and does not observe the child. No named analgesic cutoff. Not a pain diagnosis or analgesic order. Not FLACC. Not Abbey.","parameters":[{"in":"query","name":"facial_expression","type":"integer","description":"Caller-assigned Hesselgard 2007 BOPS facial expression (integer 0-2): 0 neutral/positive composed; 1 negative/concerned; 2 grimacing/distorted. magent does not observe the child.","required":true,"example":"0"},{"in":"query","name":"verbalization","type":"integer","description":"Caller-assigned Hesselgard 2007 BOPS verbalization (integer 0-2): 0 normal conversation/laughing/crowing; 1 completely quiet, sobbing, and/or complaining not because of pain; 2 crying, screaming, and/or complaining about pain. magent does not observe the child.","required":true,"example":"0"},{"in":"query","name":"body_position","type":"integer","description":"Caller-assigned Hesselgard 2007 BOPS body position (integer 0-2): 0 inactive, lying relaxed with all extremities or sitting/walking; 1 restless movements, shifting, and/or touching the wound area; 2 lying rigid and/or drawn up with arms and legs close to the body. magent does not observe the child.","required":true,"example":"0"}],"errors":[{"code":"invalid_bops","message":"BOPS inputs must be the three caller-assigned 0-2 Hesselgard 2007 items (facial_expression, verbalization, body_position). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/bops","citation":{"authors":"Hesselgard K, Larsson S, Romner B, Strömblad LG, Reinstrup P","doi":"10.1097/01.PCC.0000257098.32268.aa","id":"hesselgard-2007","pmid":"17273124","source":"Pediatr Crit Care Med. 2007;8(2):102-108","title":"Validity and reliability of the Behavioural Observational Pain Scale for postoperative pain measurement in children 1-7 years of age","url":"https://doi.org/10.1097/01.PCC.0000257098.32268.aa"},"formula_expression":"BOPS = facial_expression + verbalization + body_position; each caller-assigned 0-2; max 6","purpose":"Sum three caller-assigned Hesselgard 2007 BOPS integers (0-2) and return the published total (max 6).","markdown_url":"https://magentlab.com/docs/bops.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"bops"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"BOPS points 0-6"},{"name":"max_score","type":"integer","description":"Always 6"},{"name":"facial_expression","type":"integer","description":"Caller-assigned facial expression points 0-2"},{"name":"verbalization","type":"integer","description":"Caller-assigned verbalization points 0-2"},{"name":"body_position","type":"integer","description":"Caller-assigned body position points 0-2"},{"name":"components","type":"array","description":"Per-item caller-assigned points"},{"name":"citation","type":"object","description":"Hesselgard et al. Pediatr Crit Care Med 2007 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"body_position":"0","facial_expression":"0","verbalization":"0"},{"body_position":"0","facial_expression":"0","verbalization":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/bops","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/bops?facial_expression=0&verbalization=0&body_position=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/bops","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rope","description":"ROPE (Risk of Paradoxical Embolism; Kent 2013 Neurology Table 4) from age decades (18-29 5, 30-39 4, 40-49 3, 50-59 2, 60-69 1, >=70 0) plus five caller-assigned 1-point factors (no hypertension, no diabetes, no prior stroke/TIA, nonsmoker, cortical infarct). Score 0-10 with abstract groupings 0-3, 4-8 residual, and 9-10. Not a PFO diagnosis, not a closure indication, not PASCAL. magent does not read imaging or a smoking history.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Kent 2013 Table 4: 18-29 scores 5; 30-39 scores 4; 40-49 scores 3; 50-59 scores 2; 60-69 scores 1; 70 or older scores 0.","required":true,"example":"70"},{"in":"query","name":"no_hypertension","type":"boolean","description":"Absence of hypertension (Kent 2013). Caller-assigned. true scores 1; false scores 0.","required":true,"example":"false"},{"in":"query","name":"no_diabetes","type":"boolean","description":"Absence of diabetes (Kent 2013). Caller-assigned. true scores 1; false scores 0.","required":true,"example":"false"},{"in":"query","name":"no_prior_stroke_tia","type":"boolean","description":"Absence of prior stroke or TIA (Kent 2013). Caller-assigned. true scores 1; false scores 0.","required":true,"example":"false"},{"in":"query","name":"nonsmoker","type":"boolean","description":"Nonsmoker (Kent 2013). Caller-assigned. magent does not read a smoking history. true scores 1; false scores 0.","required":true,"example":"false"},{"in":"query","name":"cortical_infarct","type":"boolean","description":"Cortical infarct on imaging (Kent 2013). Caller-assigned. magent does not read imaging. true scores 1; false scores 0.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rope","citation":{"authors":"Kent DM, Ruthazer R, Weimar C, Mas JL, Serena J, Homma S, Di Angelantonio E, Di Tullio MR, Lutz JS, Elkind MSV, Griffith J, Jaigobin C, Mattle HP, Michel P, Mono ML, Nedeltchev K, Papetti F, Thaler DE","doi":"10.1212/WNL.0b013e3182a08d59","id":"kent-2013","pmid":"23864310","source":"Neurology. 2013;81(7):619-625","title":"An index to identify stroke-related vs incidental patent foramen ovale in cryptogenic stroke","url":"https://doi.org/10.1212/WNL.0b013e3182a08d59"},"formula_expression":"ROPE = age_points + no_hypertension 1 + no_diabetes 1 + no_prior_stroke_tia 1 + nonsmoker 1 + cortical_infarct 1; age 18-29 5, 30-39 4, 40-49 3, 50-59 2, 60-69 1, >=70 0; Kent 2013 Table 4; max 10","purpose":"Compute the Kent 2013 Risk of Paradoxical Embolism (ROPE) index from Table 4 age decades and five caller-assigned vascular and infarct flags.","markdown_url":"https://magentlab.com/docs/rope.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rope"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Total points 0-10"},{"name":"max_score","type":"integer","description":"Always 10"},{"name":"rope_stratum","type":"string","description":"Kent 2013 abstract groupings: 0_to_3 (score 0-3), 9_to_10 (score 9-10), or 4_to_8 residual (score 4-8). Not a named risk class."},{"name":"age_years","type":"integer","description":"Age used for Table 4 decade points"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Kent 2013 Neurology citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"70","cortical_infarct":"false","no_diabetes":"false","no_hypertension":"false","no_prior_stroke_tia":"false","nonsmoker":"false"},{"age":"70","cortical_infarct":"false","no_diabetes":"false","no_hypertension":"false","no_prior_stroke_tia":"false","nonsmoker":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rope","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rope?age=70&no_hypertension=false&no_diabetes=false&no_prior_stroke_tia=false&nonsmoker=false&cortical_infarct=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rope","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/dragon","description":"DRAGON (Strbian 2012 Neurology) for 3-month outcome after IV thrombolysis. CT hyperdense artery or early infarct 0/1/2, prestroke mRS >1 (1), age <65/65-79/>=80 (0/1/2), glucose >8 mmol/L (mg/dL /18) (1), onset-to-treatment >90 min (1), NIHSS 0-4/5-9/10-15/>15 (0/1/2/3); max 10. Tabulated mRS 0-2 and mRS 5-6 percents for scores 0-1, 2, 3, 8, and 9-10 only. Not a tPA decision. Not studied in basilar occlusion. magent does not read CT or assign NIHSS.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Strbian 2012: <65 scores 0; 65-79 scores 1; ≥80 scores 2.","required":true,"example":"60"},{"in":"query","name":"nihss","type":"integer","description":"Caller-assigned NIH Stroke Scale total (integer 0-42). 0-4 scores 0; 5-9 scores 1; 10-15 scores 2; >15 (16-42) scores 3. magent does not compute NIHSS or examine the patient.","required":true,"example":"3"},{"in":"query","name":"glucose_mmol_l","type":"number","description":"Baseline glucose in mmol/L (2.8-55.5). Provide this or glucose_mg_dl, not both. 1 point if >8.0; 8.0 does not score.","required":false,"example":"6.0"},{"in":"query","name":"glucose_mg_dl","type":"number","description":"Baseline glucose in mg/dL (50-1000). Converted as mmol/L = mg/dL / 18. Provide this or glucose_mmol_l, not both. >144 mg/dL scores; 144 does not.","required":false,"example":"108"},{"in":"query","name":"onset_to_treatment_min","type":"integer","description":"Onset-to-treatment time in minutes (integer 0-360). >90 scores 1; 90 does not. magent does not clock the delay.","required":true,"example":"60"},{"in":"query","name":"hyperdense_artery","type":"boolean","description":"(Hyper)dense cerebral artery sign on admission CT as assigned by the caller (Strbian 2012). true scores 1. Combined with early_infarct_signs: none 0, either 1, both 2. magent does not read CT.","required":true,"example":"false"},{"in":"query","name":"early_infarct_signs","type":"boolean","description":"Early infarct signs on admission CT as assigned by the caller (Strbian 2012). true scores 1. Combined with hyperdense_artery: none 0, either 1, both 2. magent does not read CT.","required":true,"example":"false"},{"in":"query","name":"prestroke_mrs_gt_1","type":"boolean","description":"Prestroke modified Rankin Scale >1 as assigned by the caller (Strbian 2012). true scores 1; false scores 0. Do not send a raw mRS integer. magent does not assign mRS.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_nihss","message":"nihss must be an integer from 0 to 42. Returned before settlement; you are not charged.","status":400},{"code":"invalid_glucose","message":"glucose_mg_dl (50-1000) or glucose_mmol_l (2.8-55.5) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_onset_to_treatment_min","message":"onset_to_treatment_min must be an integer from 0 to 360. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/dragon","citation":{"authors":"Strbian D, Meretoja A, Ahlhelm FJ, Pitkäniemi J, Lyrer P, Kaste M, Tatlisumak T","doi":"10.1212/WNL.0b013e318245d2a9","id":"strbian-2012-dragon","pmid":"22311929","source":"Neurology. 2012;78(6):427-432","title":"Predicting outcome of IV thrombolysis-treated ischemic stroke patients: the DRAGON score","url":"https://doi.org/10.1212/WNL.0b013e318245d2a9"},"formula_expression":"DRAGON = dense_ct (hyperdense_artery 1 + early_infarct_signs 1; none 0, either 1, both 2) + prestroke_mrs_gt_1 (1 if prestroke mRS >1) + age (<65 0, 65-79 1, >=80 2) + glucose >8 mmol/L (1; 8.0 does not; mg/dL /18) + onset_to_treatment >90 min (1; 90 does not) + NIHSS (0-4 0, 5-9 1, 10-15 2, >15 3); Strbian 2012; max 10","purpose":"Compute the Strbian 2012 DRAGON score (Dense artery / early infarct signs, prestroke mRS, Age, Glucose, Onset-to-treatment, NIHSS) for 3-month outcome after IV thrombolysis-treated ischemic stroke.","markdown_url":"https://magentlab.com/docs/dragon.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"dragon"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"DRAGON points 0-10"},{"name":"max_score","type":"integer","description":"Always 10"},{"name":"good_outcome_percent","type":"number","description":"Published 3-month mRS 0-2 percent when tabulated (0-1, 2, 3, 8-10); null for scores 4-7"},{"name":"miserable_outcome_percent","type":"number","description":"Published 3-month mRS 5-6 percent when tabulated (0-1, 2, 3, 8, 9-10); null for scores 4-7"},{"name":"age_years","type":"integer","description":"Age used for trichotomized age points"},{"name":"nihss","type":"integer","description":"Caller-assigned NIHSS used for points"},{"name":"glucose_mmol_l","type":"number","description":"Baseline glucose in mmol/L (mg/dL inputs converted /18)"},{"name":"onset_to_treatment_min","type":"integer","description":"Onset-to-treatment minutes used for the >90 item"},{"name":"hyperdense_artery","type":"boolean","description":"Whether (hyper)dense cerebral artery sign was scored"},{"name":"early_infarct_signs","type":"boolean","description":"Whether early infarct signs were scored"},{"name":"prestroke_mrs_gt_1","type":"boolean","description":"Whether prestroke mRS >1 was scored"},{"name":"components","type":"array","description":"Per-item Strbian 2012 points"},{"name":"citation","type":"object","description":"Strbian 2012 Neurology citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"60","early_infarct_signs":"false","glucose_mmol_l":"6.0","hyperdense_artery":"false","nihss":"3","onset_to_treatment_min":"60","prestroke_mrs_gt_1":"false"},{"age":"60","early_infarct_signs":"false","glucose_mmol_l":"6.0","hyperdense_artery":"false","nihss":"3","onset_to_treatment_min":"60","prestroke_mrs_gt_1":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/dragon","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/dragon?age=60&nihss=3&glucose_mmol_l=6.0&onset_to_treatment_min=60&hyperdense_artery=false&early_infarct_signs=false&prestroke_mrs_gt_1=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/dragon","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/sedan","description":"SEDAN (Strbian 2012 Ann Neurol) for sICH after stroke thrombolysis. Glucose 8.1-12.0 mmol/L (1) or >12.0 (2); early infarct signs (1); hyperdense cerebral artery (1); age >75 (1); admission NIHSS ≥10 (1); max 6. Derivation absolute sICH 1.4%, 2.9%, 8.5%, 12.2%, 21.7%, 33.3% for scores 0-5; no published percent for 6. Not a tPA withhold decision. magent does not assign NIHSS or read CT.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). >75 scores 1; 75 does not (Strbian 2012). magent does not date the patient.","required":true,"example":"60"},{"in":"query","name":"nihss","type":"integer","description":"Caller-assigned NIH Stroke Scale total (integer 0-42). ≥10 scores 1; 9 does not. magent does not compute NIHSS or examine the patient.","required":true,"example":"5"},{"in":"query","name":"glucose_mmol_l","type":"number","description":"Baseline glucose in mmol/L (2.8-55.5). Provide this or glucose_mg_dl, not both. 8.1-12.0 inclusive scores 1; >12.0 scores 2; else 0 (Strbian 2012).","required":false,"example":"6.0"},{"in":"query","name":"glucose_mg_dl","type":"number","description":"Baseline glucose in mg/dL (50-1000). Converted as mmol/L = mg/dL / 18. Provide this or glucose_mmol_l, not both.","required":false,"example":"108"},{"in":"query","name":"early_infarct_signs","type":"boolean","description":"Early infarct signs on admission CT as assigned by the caller (Strbian 2012). true scores 1; false scores 0. magent does not read the CT.","required":true,"example":"false"},{"in":"query","name":"hyperdense_artery","type":"boolean","description":"(Hyper)dense cerebral artery sign on admission CT as assigned by the caller (Strbian 2012). true scores 1; false scores 0. magent does not read the CT.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_nihss","message":"nihss must be an integer from 0 to 42. Returned before settlement; you are not charged.","status":400},{"code":"invalid_glucose","message":"glucose_mg_dl (50-1000) or glucose_mmol_l (2.8-55.5) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/sedan","citation":{"authors":"Strbian D, Engelter S, Michel P, Meretoja A, Sekoranja L, Ahlhelm FJ, Mustanoja S, Lynch J, Soinne L, Sairanen T, Lyrer P, Tatlisumak T","doi":"10.1002/ana.23546","id":"strbian-2012-sedan","source":"Ann Neurol. 2012;71(5):634-641","title":"Symptomatic intracranial hemorrhage after stroke thrombolysis: the SEDAN score","url":"https://doi.org/10.1002/ana.23546"},"formula_expression":"SEDAN = glucose (8.1-12.0 mmol/L 1; >12.0 mmol/L 2) + early_infarct_signs 1 + hyperdense_artery 1 + (age >75) 1 + (NIHSS >=10) 1; max 6; derivation sICH 1.4/2.9/8.5/12.2/21.7/33.3% for scores 0-5 (Strbian 2012); no published percent for 6","purpose":"Compute the Strbian 2012 SEDAN score (Sugar, Early infarct signs, (hyper)Dense artery, Age, NIHSS) for symptomatic intracranial hemorrhage after stroke thrombolysis.","markdown_url":"https://magentlab.com/docs/sedan.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"sedan"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"SEDAN points 0-6"},{"name":"max_score","type":"integer","description":"Always 6"},{"name":"sich_percent","type":"number","description":"Strbian 2012 derivation absolute sICH percent for scores 0-5 (1.4, 2.9, 8.5, 12.2, 21.7, 33.3). Omitted for score 6; no published percent."},{"name":"age_years","type":"integer","description":"Age used for the >75 point"},{"name":"nihss","type":"integer","description":"Caller-assigned NIHSS used for the ≥10 point"},{"name":"glucose_mmol_l","type":"number","description":"Baseline glucose in mmol/L (mg/dL inputs converted /18)"},{"name":"early_infarct_signs","type":"boolean","description":"Whether early infarct signs were scored"},{"name":"hyperdense_artery","type":"boolean","description":"Whether hyperdense cerebral artery sign was scored"},{"name":"components","type":"array","description":"Per-item Strbian 2012 points"},{"name":"citation","type":"object","description":"Strbian 2012 Ann Neurol citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"60","early_infarct_signs":"false","glucose_mmol_l":"6.0","hyperdense_artery":"false","nihss":"5"},{"age":"60","early_infarct_signs":"false","glucose_mmol_l":"6.0","hyperdense_artery":"false","nihss":"5"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/sedan","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/sedan?age=60&nihss=5&glucose_mmol_l=6.0&early_infarct_signs=false&hyperdense_artery=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/sedan","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/hat","description":"HAT (Lou 2008 Neurology) for sICH after stroke thrombolysis. Diabetes or glucose >200 mg/dL (1; not additive). NIHSS <15 0, 15-20 1, >20 2. CT hypodensity none 0, <1/3 MCA 1, >1/3 MCA 2 (no equals-1/3). Max 5. Collective sICH 2/5/10/15/44% for scores 0/1/2/3/>3. Glucose in mg/dL (mmol × 18). Not a tPA withhold. magent does not assign NIHSS or read CT.","parameters":[{"in":"query","name":"diabetes","type":"boolean","description":"History of diabetes mellitus (Lou 2008). true scores 1 on the diabetes-or-glucose item; not additive with glucose >200 mg/dL.","required":true,"example":"false"},{"in":"query","name":"glucose_mmol_l","type":"number","description":"Baseline glucose in mmol/L (2.8-55.5). Provide this or glucose_mg_dl, not both. Converted as mg/dL = mmol/L × 18. Scores 1 on the diabetes-or-glucose item if >200 mg/dL after conversion (200.0 does not).","required":false,"example":"6.0"},{"in":"query","name":"glucose_mg_dl","type":"number","description":"Baseline glucose in mg/dL (50-1000). Provide this or glucose_mmol_l, not both. >200 scores 1 on the diabetes-or-glucose item if diabetes is false; 200.0 does not (Lou 2008).","required":false,"example":"108"},{"in":"query","name":"nihss","type":"integer","description":"Caller-assigned pretreatment NIH Stroke Scale total (integer 0-42). <15 scores 0; 15-20 scores 1; >20 scores 2 (Lou 2008). magent does not compute NIHSS or examine the patient.","required":true,"example":"10"},{"in":"query","name":"hypodensity","type":"string","enum":["none","less_than_third","greater_than_third"],"description":"Easily visible hypodensity on initial CT as assigned by the caller (Lou 2008). none scores 0; less_than_third (<1/3 MCA) scores 1; greater_than_third (>1/3 MCA) scores 2. No published equals-1/3 category. magent does not read the CT.","required":true,"example":"none"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_glucose","message":"glucose_mg_dl (50-1000) or glucose_mmol_l (2.8-55.5) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_nihss","message":"nihss must be an integer from 0 to 42. Returned before settlement; you are not charged.","status":400},{"code":"invalid_hat_hypodensity","message":"hypodensity must be none, less_than_third, or greater_than_third (Lou 2008). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/hat","citation":{"authors":"Lou M, Safdar A, Mehdiratta M, Kumar S, Schlaug G, Caplan L, Searls D, Selim M","doi":"10.1212/01.wnl.0000330297.58334.dd","id":"lou-2008","pmid":"18955684","source":"Neurology. 2008;71(18):1417-1423","title":"The HAT Score: a simple grading scale for predicting hemorrhage after thrombolysis","url":"https://doi.org/10.1212/01.wnl.0000330297.58334.dd"},"formula_expression":"HAT = (diabetes OR baseline glucose >200 mg/dL) 1 (not additive) + NIHSS (<15 0, 15-20 1, >20 2) + hypodensity (none 0, <1/3 MCA 1, >1/3 MCA 2); Lou 2008; max 5; collective sICH 2/5/10/15/44% for scores 0/1/2/3/>3","purpose":"Compute the Lou 2008 HAT (Hemorrhage After Thrombolysis) score for symptomatic intracranial hemorrhage after stroke thrombolysis from diabetes or baseline glucose >200 mg/dL, pretreatment NIHSS, and easily visible hypodensity on initial CT.","markdown_url":"https://magentlab.com/docs/hat.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"hat"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"HAT points 0-5"},{"name":"max_score","type":"integer","description":"Always 5"},{"name":"sich_percent","type":"number","description":"Lou 2008 collective symptomatic ICH percent: 2 (0), 5 (1), 10 (2), 15 (3), 44 (>3). Scores 4 and 5 both 44."},{"name":"diabetes","type":"boolean","description":"Whether history of diabetes mellitus was assigned"},{"name":"glucose_mg_dl","type":"number","description":"Baseline glucose in mg/dL (mmol/L inputs converted ×18)"},{"name":"nihss","type":"integer","description":"Caller-assigned NIHSS used for the <15 / 15-20 / >20 points"},{"name":"hypodensity","type":"string","description":"none, less_than_third, or greater_than_third"},{"name":"components","type":"array","description":"Per-item Lou 2008 points"},{"name":"citation","type":"object","description":"Lou 2008 Neurology citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"diabetes":"false","glucose_mmol_l":"6.0","hypodensity":"none","nihss":"10"},{"diabetes":"false","glucose_mmol_l":"6.0","hypodensity":"none","nihss":"10"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/hat","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/hat?diabetes=false&glucose_mmol_l=6.0&nihss=10&hypodensity=none","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/hat","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/stanford-sleepiness","description":"Hoddes 1973 Stanford Sleepiness Scale degree 1-7 as assigned by the caller. Returns the degree, score (same as the degree), max 7, and published wording (feeling active and vital; alert; wide awake through almost in reverie; sleep onset soon). Not the Epworth Sleepiness Scale. Not a sleep-disorder diagnosis; magent does not observe the patient.","parameters":[{"in":"query","name":"stanford_sleepiness","type":"integer","description":"Hoddes 1973 Stanford Sleepiness Scale degree 1-7 as assigned by the caller (1 feeling active and vital, alert, wide awake; 2 functioning at a high level, but not at peak, able to concentrate; 3 relaxed, awake, not at full alertness, responsive; 4 a little foggy, not at peak, let down; 5 fogginess, beginning to lose interest in remaining awake, slowed down; 6 sleepiness, prefer to be lying down, fighting sleep, woozy; 7 almost in reverie, sleep onset soon, lost struggle to remain awake). Not Epworth. magent does not observe the patient.","required":true,"example":"1"}],"errors":[{"code":"invalid_stanford_sleepiness","message":"stanford_sleepiness must be an integer from 1 to 7 (Hoddes 1973). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/stanford-sleepiness","citation":{"authors":"Hoddes E, Zarcone V, Smythe H, Phillips R, Dement WC","doi":"10.1111/j.1469-8986.1973.tb00801.x","id":"hoddes-1973","pmid":"4719486","source":"Psychophysiology. 1973;10(4):431-436","title":"Quantification of sleepiness: a new approach","url":"https://doi.org/10.1111/j.1469-8986.1973.tb00801.x"},"formula_expression":"Stanford Sleepiness Scale degree 1-7 as assigned by the caller (Hoddes 1973); max 7","purpose":"Return the Hoddes 1973 Stanford Sleepiness Scale degree 1-7 from a caller-assigned integer, with the published degree wording.","markdown_url":"https://magentlab.com/docs/stanford-sleepiness.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"stanford_sleepiness"},{"name":"formula_expression","type":"string","description":"Published degree rule"},{"name":"stanford_sleepiness","type":"integer","description":"Caller-assigned Stanford Sleepiness Scale degree 1-7"},{"name":"score","type":"integer","description":"Same as stanford_sleepiness"},{"name":"max_score","type":"integer","description":"7"},{"name":"description","type":"string","description":"Hoddes 1973 wording for that degree"},{"name":"components","type":"array","description":"stanford_sleepiness component"},{"name":"citation","type":"object","description":"Hoddes 1973"},{"name":"disclaimer","type":"string","description":"Not a medical device"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"stanford_sleepiness":"1"},{"stanford_sleepiness":"1"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/stanford-sleepiness","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/stanford-sleepiness?stanford_sleepiness=1","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/stanford-sleepiness","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/delta-p","description":"Titulaer 2011 DELTA-P for SCLC association in Lambert-Eaton myasthenic syndrome. One point each, at or within 3 months of LEMS onset: bulbar weakness (dysarthria/dysphagia/chewing/neck weakness); erectile dysfunction if male (always 0 if female); weight loss ≥5%; smoking at onset; age ≥50; Karnofsky <70. Max 6. Bands low 0-1, intermediate 2, high 3-6. Published SCLC percents for scores 0, 1, 3-6; none for score 2. Not a LEMS diagnosis, not SOX1, and not an SCLC screen.","parameters":[{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"female or male. Erectile dysfunction scores only when male. Female erectile is always 0 (Titulaer 2011: Female | 0).","required":true,"example":"female"},{"in":"query","name":"age","type":"integer","description":"Age at LEMS onset in years (18-120). ≥50 scores 1; 49 does not (Titulaer 2011).","required":true,"example":"40"},{"in":"query","name":"bulbar_weakness","type":"boolean","description":"Dysarthria, dysphagia, chewing difficulty, or neck weakness at or within 3 months of LEMS onset (Titulaer 2011 D). true or false. Caller-assigned. 1 point if true.","required":true,"example":"false"},{"in":"query","name":"erectile_dysfunction","type":"boolean","description":"Erectile dysfunction at or within 3 months of LEMS onset (Titulaer 2011 E). Required when sex is male (true scores 1). When female, this item is always 0, including if omitted, false, or true. true or false.","required":false,"example":"false"},{"in":"query","name":"weight_loss_ge_5pct","type":"boolean","description":"Weight loss ≥5% at or within 3 months of LEMS onset (Titulaer 2011 L). true or false. Caller-assigned. 1 point if true.","required":true,"example":"false"},{"in":"query","name":"smoking_at_onset","type":"boolean","description":"Smoking at LEMS onset (Titulaer 2011 T). true or false. Caller-assigned. 1 point if true.","required":true,"example":"false"},{"in":"query","name":"kps_lt_70","type":"boolean","description":"Karnofsky Performance Status 0-60 (KPS <70) at or within 3 months of LEMS onset (Titulaer 2011 P). Caller-assigned flag; magent does not compute Karnofsky. true or false. 1 point if true.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/delta-p","citation":{"authors":"Titulaer MJ, Maddison P, Sont JK, Wirtz PW, Hilton-Jones D, Klooster R, Willcox N, Potman M, Sillevis Smitt PAE, Kuks JBM, Roep BO, Vincent A, van der Maarel SM, van Dijk JG, Lang B, Verschuuren JJGM","doi":"10.1200/JCO.2010.32.0440","id":"titulaer-2011","pmid":"21245427","source":"J Clin Oncol. 2011;29(7):902-908","title":"Clinical Dutch-English Lambert-Eaton Myasthenic Syndrome (LEMS) Tumor Association Prediction Score Accurately Predicts Small-Cell Lung Cancer in the LEMS","url":"https://doi.org/10.1200/JCO.2010.32.0440"},"formula_expression":"DELTA-P = bulbar_weakness 1 + (male and erectile_dysfunction) 1 + weight_loss_ge_5pct 1 + smoking_at_onset 1 + (age>=50) 1 + kps_lt_70 1; each at or within 3 months of LEMS onset; female erectile always 0; max 6; bands 0-1 low / 2 intermediate / 3-6 high (Titulaer 2011); SCLC percents 0/2.6/omit/83.9/93.5/96.6/100 for scores 0-6","purpose":"Sum the six Titulaer 2011 DELTA-P items (bulbar weakness, erectile dysfunction in males, weight loss ≥5%, smoking at onset, age ≥50, Karnofsky <70) and return the score, SCLC band, and published SCLC percents for scores 0, 1, and 3-6.","markdown_url":"https://magentlab.com/docs/delta-p.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"delta_p"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"DELTA-P points 0-6"},{"name":"max_score","type":"integer","description":"6"},{"name":"sclc_band","type":"string","description":"Titulaer 2011 SCLC-association band: low (0-1), intermediate (2), or high (3-6). Not an SCLC screen."},{"name":"sclc_percent","type":"number","description":"Titulaer 2011 published SCLC percent for scores 0, 1, 3, 4, 5, and 6 (0, 2.6, 83.9, 93.5, 96.6, 100). Omitted for score 2; no published percent in the main text."},{"name":"sex","type":"string","description":"female or male"},{"name":"age_years","type":"integer","description":"Age used for the ≥50 criterion"},{"name":"components","type":"array","description":"Per-item Titulaer 2011 points"},{"name":"citation","type":"object","description":"Titulaer 2011 J Clin Oncol citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"40","bulbar_weakness":"false","kps_lt_70":"false","sex":"female","smoking_at_onset":"false","weight_loss_ge_5pct":"false"},{"age":"40","bulbar_weakness":"false","kps_lt_70":"false","sex":"female","smoking_at_onset":"false","weight_loss_ge_5pct":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/delta-p","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/delta-p?sex=female&age=40&bulbar_weakness=false&weight_loss_ge_5pct=false&smoking_at_onset=false&kps_lt_70=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/delta-p","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rcvs2","description":"Rocha 2019 RCVS2 score from five caller-assigned items: recurrent or single thunderclap headache (+5), intracranial ICA involvement (-2), vasoconstrictive trigger (+3), female sex (+1), subarachnoid hemorrhage (+1). Range -2 to 10. Score >=5 supports RCVS; <=2 against; 3-4 equivocal. magent does not read angiograms. Not a diagnosis and not PACNS treatment advice. Not a medical device.","parameters":[{"in":"query","name":"thunderclap_headache","type":"boolean","description":"Recurrent or single thunderclap headache as assigned by the caller (Rocha 2019). Both patterns score 5; the paper does not split them. true or false. magent does not take a headache history.","required":true,"example":"false"},{"in":"query","name":"intracranial_ica_involvement","type":"boolean","description":"Intracranial internal carotid artery involvement as assigned by the caller (Rocha 2019). true scores -2. magent does not read angiograms.","required":true,"example":"false"},{"in":"query","name":"vasoconstrictive_trigger","type":"boolean","description":"Identified vasoconstrictive trigger as assigned by the caller (Rocha 2019). true scores 3. magent does not take a trigger history.","required":true,"example":"false"},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"female or male (Rocha 2019). Female scores 1; male scores 0.","required":true,"example":"male"},{"in":"query","name":"sah","type":"boolean","description":"Subarachnoid hemorrhage on imaging as assigned by the caller (Rocha 2019). true scores 1. magent does not interpret imaging.","required":true,"example":"false"}],"errors":[{"code":"invalid_rcvs2","message":"RCVS2 inputs must be the five Rocha 2019 caller-assigned items (thunderclap headache, intracranial ICA involvement, vasoconstrictive trigger, sex, subarachnoid hemorrhage). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rcvs2","citation":{"authors":"Rocha EA, Topcuoglu MA, Silva GS, Singhal AB","doi":"10.1212/WNL.0000000000006917","id":"rocha-2019","pmid":"30635475","source":"Neurology. 2019;92(7):e639-e647","title":"RCVS2 score and diagnostic approach for reversible cerebral vasoconstriction syndrome","url":"https://doi.org/10.1212/WNL.0000000000006917"},"formula_expression":"RCVS2 = thunderclap_headache (5 if recurrent or single) + intracranial_ica_involvement (-2) + vasoconstrictive_trigger (3) + female (1) + sah (1); Rocha 2019; range -2 to 10; >=5 supports RCVS, <=2 against, 3-4 equivocal","purpose":"Sum the Rocha 2019 RCVS2 integer points (recurrent or single thunderclap headache, intracranial ICA involvement, vasoconstrictive trigger, female sex, subarachnoid hemorrhage) and return score -2 to 10 with the published against, equivocal, or supports band.","markdown_url":"https://magentlab.com/docs/rcvs2.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rcvs2"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"RCVS2 points -2 to 10"},{"name":"max_score","type":"integer","description":"Always 10"},{"name":"band","type":"string","description":"Rocha 2019 band: supports when score >=5, against when <=2, equivocal when 3-4. Not a diagnosis and not PACNS treatment advice."},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Rocha et al. Neurology 2019 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"intracranial_ica_involvement":"false","sah":"false","sex":"male","thunderclap_headache":"false","vasoconstrictive_trigger":"false"},{"intracranial_ica_involvement":"false","sah":"false","sex":"male","thunderclap_headache":"false","vasoconstrictive_trigger":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rcvs2","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rcvs2?thunderclap_headache=false&intracranial_ica_involvement=false&vasoconstrictive_trigger=false&sex=male&sah=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rcvs2","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/ohts","description":"OHTS-EGPS 2007 Table 6: 5-year primary open-angle glaucoma risk in untreated ocular hypertension from age, mean IOP (mm Hg), mean central corneal thickness (microns), mean vertical cup-disc ratio, and mean Humphrey pattern standard deviation (dB). Point bands map to 4%, 10%, 15%, 20%, or 33%. No race (dropped in the multivariate model). No diabetes term. Not a glaucoma diagnosis or drop order. magent does not measure IOP or pachymetry.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (integer 30-80). OHTS enrolled 40-80; EGPS enrolled age >30. magent accepts 30-80 only. Table 6: <45=0, 45 to <55=1, 55 to <65=2, 65 to <75=3, >=75=4.","required":true,"example":55},{"in":"query","name":"iop_mm_hg","type":"number","description":"Mean untreated intraocular pressure in mm Hg (20-32), average of the two eyes after multiple Goldmann readings as in the paper. Table 6: <22=0, 22 to <24=1, 24 to <26=2, 26 to <28=3, >=28=4. magent does not measure IOP.","required":true,"example":24},{"in":"query","name":"cct_microns","type":"number","description":"Mean central corneal thickness in microns (475-650), average of the two eyes. Table 6: >=600=0, 576 to <600=1, 551 to <576=2, 526 to <551=3, <=525=4. magent does not perform pachymetry.","required":true,"example":540},{"in":"query","name":"vertical_cd_ratio","type":"number","description":"Mean vertical cup-disc ratio by contour (0-1), average of the two eyes. Table 6: <0.3=0, 0.3 to <0.4=1, 0.4 to <0.5=2, 0.5 to <0.6=3, >=0.6=4. magent does not grade the disc.","required":true,"example":0.4},{"in":"query","name":"psd_db","type":"number","description":"Mean Humphrey pattern standard deviation in dB (0.5-8), average of the two eyes. Table 6: <1.8=0, 1.8 to <2.0=1, 2 to <2.4=2, 2.4 to <2.8=3, >=2.8=4. magent does not run perimetry.","required":true,"example":2.2}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_ohts","message":"OHTS-EGPS 2007 inputs must match that paper's age, IOP, central corneal thickness, vertical cup-disc ratio, and pattern standard deviation. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/ohts","citation":{"authors":"Ocular Hypertension Treatment Study Group; European Glaucoma Prevention Study Group; Gordon MO, Torri V, Miglior S, Beiser JA, Floriani I, Miller JP, Gao F, Adamsons I, Poli D, D'Agostino RB, Kass MA","doi":"10.1016/j.ophtha.2006.08.031","id":"ohts-egps-2007","pmid":"17095090","source":"Ophthalmology. 2007;114(1):10-19","title":"A validated prediction model for the development of primary open-angle glaucoma in individuals with ocular hypertension","url":"https://doi.org/10.1016/j.ophtha.2006.08.031"},"formula_expression":"OHTS-EGPS 2007 Table 6 points: age <45=0, 45 to <55=1, 55 to <65=2, 65 to <75=3, >=75=4; mean IOP mm Hg <22=0, 22 to <24=1, 24 to <26=2, 26 to <28=3, >=28=4; mean CCT microns >=600=0, 576 to <600=1, 551 to <576=2, 526 to <551=3, <=525=4; mean vertical cup-disc ratio <0.3=0, 0.3 to <0.4=1, 0.4 to <0.5=2, 0.5 to <0.6=3, >=0.6=4; mean Humphrey PSD dB <1.8=0, 1.8 to <2.0=1, 2 to <2.4=2, 2.4 to <2.8=3, >=2.8=4; sum 0-6 -> 4.0% (<=4.0%), 7-8 -> 10%, 9-10 -> 15%, 11-12 -> 20%, >12 -> 33% (>=33%); no race; no diabetes; not a glaucoma diagnosis","purpose":"Compute the OHTS-EGPS 2007 Table 6 5-year primary open-angle glaucoma percent for untreated ocular hypertension from age, mean IOP, mean central corneal thickness, mean vertical cup-disc ratio, and mean Humphrey pattern standard deviation.","markdown_url":"https://magentlab.com/docs/ohts.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"ohts"},{"name":"formula_expression","type":"string","description":"OHTS-EGPS 2007 Table 6 point bands and mapped 5-year percents"},{"name":"age","type":"integer","description":"Age in years used (30-80)"},{"name":"iop_mm_hg","type":"number","description":"Mean IOP used, mm Hg"},{"name":"cct_microns","type":"number","description":"Mean CCT used, microns"},{"name":"vertical_cd_ratio","type":"number","description":"Mean vertical cup-disc ratio used"},{"name":"psd_db","type":"number","description":"Mean Humphrey PSD used, dB"},{"name":"points","type":"integer","description":"Table 6 point total"},{"name":"risk_5y_percent","type":"number","description":"Mapped 5-year POAG percent from the Table 6 sum (4.0, 10, 15, 20, or 33)"},{"name":"citation","type":"object","description":"OHTS-EGPS Ophthalmology 2007 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"55","cct_microns":"540","iop_mm_hg":"24","psd_db":"2.2","vertical_cd_ratio":"0.4"},{"age":"55","cct_microns":"540","iop_mm_hg":"24","psd_db":"2.2","vertical_cd_ratio":"0.4"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/ohts","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/ohts?age=55&iop_mm_hg=24&cct_microns=540&vertical_cd_ratio=0.4&psd_db=2.2","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/ohts","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/impact","description":"Steyerberg 2008 IMPACT prognostic score for 6-month mortality and unfavorable outcome after traumatic brain injury. model=core (age, motor, pupils), extended (plus hypoxia, hypotension, Marshall CT, tSAH, EDH), or lab (plus glucose mmol/L and Hb g/dL). Points and printed logistic LPs from that paper. Not a diagnosis, not MRC CRASH (Perel 2008), and not magent chemotherapy CRASH.","parameters":[{"in":"query","name":"model","type":"string","enum":["core","extended","lab"],"description":"Steyerberg 2008 IMPACT model. core uses age, motor, and pupils. extended adds hypoxia, hypotension, Marshall CT, tSAH, and EDH. lab adds glucose mmol/L and hemoglobin g/dL. Required; magent does not pick a model.","required":true,"example":"core"},{"in":"query","name":"age","type":"integer","description":"Age in years (integer 14-90). Steyerberg 2008 Figure 1: ≤30 → 0; 31–39 → 1; 40–49 → 2; 50–59 → 3; 60–69 → 4; ≥70 → 5. Chart label 30–39 is the decade after ≤30 (age 30 scores 0).","required":true,"example":35},{"in":"query","name":"motor_score","type":"integer","description":"GCS motor integer 1-6 or 9 (untestable/missing) as in Steyerberg 2008. 1 or 2 (none/extension) → 6; 3 (abnormal flexion) → 4; 4 (normal flexion) → 2; 5 or 6 (localizes/obeys) → 0; 9 → 3.","required":true,"example":3},{"in":"query","name":"pupillary_reactivity","type":"string","enum":["both","one","none"],"description":"Pupillary reactivity (Steyerberg 2008). both → 0; one → 2; none → 4. Caller-assigned. magent does not examine pupils.","required":true,"example":"both"},{"in":"query","name":"hypoxia","type":"boolean","description":"Hypoxia yes or suspected (Steyerberg 2008). Required when model is extended or lab. true adds 1; false adds 0. Ignored on model=core.","required":false,"example":false},{"in":"query","name":"hypotension","type":"boolean","description":"Hypotension yes or suspected (Steyerberg 2008). Required when model is extended or lab. true adds 2; false adds 0. Ignored on model=core.","required":false,"example":false},{"in":"query","name":"marshall_ct","type":"string","enum":["I","II","III","IV","V","VI"],"description":"Marshall CT class I–VI (Steyerberg 2008). Required when model is extended or lab. I → −2; II → 0; III, IV, V, or VI → 2. Ignored on model=core. magent does not read the scan.","required":false,"example":"II"},{"in":"query","name":"tsah","type":"boolean","description":"Traumatic subarachnoid hemorrhage (Steyerberg 2008). Required when model is extended or lab. true adds 2; false adds 0. Ignored on model=core.","required":false,"example":false},{"in":"query","name":"edh","type":"boolean","description":"Epidural hematoma (Steyerberg 2008). Required when model is extended or lab. true adds −2; false adds 0. Ignored on model=core.","required":false,"example":false},{"in":"query","name":"glucose_mmol_l","type":"number","description":"Admission glucose in mmol/L (2.8-55.5). Required when model is lab. Steyerberg 2008: <6 → 0; 6–8.9 → 1; 9–11.9 → 2; 12–14.9 → 3; ≥15 → 4. Ignored on core and extended. magent does not assay glucose.","required":false,"example":10},{"in":"query","name":"hemoglobin_g_dl","type":"number","description":"Admission hemoglobin in g/dL (3-22). Required when model is lab. Steyerberg 2008: <9 → 3; 9–11.9 → 2; 12–14.9 → 1; ≥15 → 0. Ignored on core and extended. magent does not assay hemoglobin.","required":false,"example":11}],"errors":[{"code":"invalid_impact","message":"IMPACT model inputs must match Steyerberg 2008 (age, motor score, pupils; extended and lab add hypoxia, hypotension, CT, glucose, Hb). Returned before settlement; you are not charged.","status":400},{"code":"invalid_impact_model","message":"model must be core, extended, or lab as in Steyerberg 2008. Returned before settlement; you are not charged.","status":400},{"code":"invalid_impact_age","message":"age must be an integer from 14 to 90. Returned before settlement; you are not charged.","status":400},{"code":"invalid_motor_score","message":"motor_score must be 1-6 or 9 (untestable) as in Steyerberg 2008 IMPACT. Returned before settlement; you are not charged.","status":400},{"code":"invalid_pupillary","message":"pupillary_reactivity must be both, one, or none as in Steyerberg 2008. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_marshall_ct","message":"marshall_ct must be I, II, III, IV, V, or VI as in Steyerberg 2008. Returned before settlement; you are not charged.","status":400},{"code":"invalid_impact_glucose","message":"glucose_mmol_l must be a number from 2.8 to 55.5. Returned before settlement; you are not charged.","status":400},{"code":"invalid_hemoglobin","message":"hemoglobin_g_l (30-220) or hemoglobin_g_dl (3-22) is required, not both. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/impact","citation":{"authors":"Steyerberg EW, Mushkudiani N, Perel P, Butcher I, Lu J, McHugh GS, Murray GD, Marmarou A, Roberts I, Habbema JDF, Maas AIR","doi":"10.1371/journal.pmed.0050165","id":"steyerberg-2008-impact","pmid":"18684008","source":"PLoS Med. 2008;5(8):e165","title":"Predicting outcome after traumatic brain injury: development and international validation of prognostic scores based on admission characteristics","url":"https://doi.org/10.1371/journal.pmed.0050165"},"formula_expression":"IMPACT (Steyerberg 2008 Fig 1): core = age(<=30:0, 31-39:1, 40-49:2, 50-59:3, 60-69:4, >=70:5) + motor(1-2:6, 3:4, 4:2, 5-6:0, 9:3) + pupils(both:0, one:2, none:4); extended = core + hypoxia(yes/suspected:1) + hypotension(yes/suspected:2) + marshall(I:-2, II:0, III-VI:2) + tSAH(yes:2) + EDH(yes:-2); lab = extended + glucose_mmol_l(<6:0, 6-8.9:1, 9-11.9:2, 12-14.9:3, >=15:4) + hb_g_dl(<9:3, 9-11.9:2, 12-14.9:1, >=15:0); p = 1/(1+e^(-LP)); LPcore mort=-2.55+0.275*sum; LPcore unfav=-1.62+0.299*sum; LPext mort=-2.98+0.256*sum; LPext unfav=-2.10+0.276*sum; LPlab mort=-3.42+0.216*sum; LPlab unfav=-2.82+0.257*sum; 6-month percent 1 decimal; not MRC CRASH","purpose":"Compute the Steyerberg 2008 IMPACT points and 6-month mortality and unfavorable-outcome probabilities from the printed Figure 1 score chart and logistic LPs. model is required (core, extended, or lab).","markdown_url":"https://magentlab.com/docs/impact.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"impact"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"model","type":"string","description":"core, extended, or lab"},{"name":"age","type":"integer","description":"Input age in years"},{"name":"motor_score","type":"integer","description":"Input GCS motor 1-6 or 9"},{"name":"pupillary_reactivity","type":"string","description":"Input pupils both, one, or none"},{"name":"score","type":"integer","description":"Model sum (core, core+CT, or core+CT+lab)"},{"name":"sum_core","type":"integer","description":"Age + motor + pupils points"},{"name":"subscore_ct","type":"integer","description":"Extended CT subscore. Present when model is extended or lab."},{"name":"subscore_lab","type":"integer","description":"Lab subscore (glucose + Hb). Present when model is lab."},{"name":"hypoxia","type":"boolean","description":"Hypoxia flag used when model is extended or lab"},{"name":"hypotension","type":"boolean","description":"Hypotension flag used when model is extended or lab"},{"name":"marshall_ct","type":"string","description":"Marshall class used when model is extended or lab"},{"name":"tsah","type":"boolean","description":"tSAH flag used when model is extended or lab"},{"name":"edh","type":"boolean","description":"EDH flag used when model is extended or lab"},{"name":"glucose_mmol_l","type":"number","description":"Glucose used when model is lab"},{"name":"hemoglobin_g_dl","type":"number","description":"Hemoglobin used when model is lab"},{"name":"max_score","type":"integer","description":"15 core, 22 extended, 29 lab"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"linear_predictor_mortality","type":"number","description":"Printed Steyerberg 2008 mortality LP, 3 decimals"},{"name":"linear_predictor_unfavorable","type":"number","description":"Printed Steyerberg 2008 unfavorable LP, 3 decimals"},{"name":"mortality_6_month_percent","type":"number","description":"6-month mortality percent, 1 decimal"},{"name":"unfavorable_6_month_percent","type":"number","description":"6-month unfavorable-outcome percent, 1 decimal"},{"name":"citation","type":"object","description":"Steyerberg et al. PLoS Med 2008 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"35","model":"core","motor_score":"3","pupillary_reactivity":"both"},{"age":"35","model":"core","motor_score":"3","pupillary_reactivity":"both"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/impact","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/impact?age=35&motor_score=3&pupillary_reactivity=both&model=core","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/impact","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/anc","description":"Absolute neutrophil count from WBC and neutrophil plus band percents. Bodey 1966 granulocyte bands. Deterministic published arithmetic with citation; not a diagnosis.","parameters":[{"in":"query","name":"wbc_k_ul","type":"number","description":"WBC in 10^3/µL (same as 10^9/L). Provide wbc_k_ul or wbc_ul. Range 0.01-500.","required":false,"example":"6.0"},{"in":"query","name":"wbc_ul","type":"number","description":"WBC in cells/µL (same as cells/mm^3). Provide wbc_k_ul or wbc_ul. Range 10-500000.","required":false,"example":"6000"},{"in":"query","name":"neutrophil_percent","type":"number","description":"Segmented neutrophils / PMNs as a percent of WBC (0-100).","required":true,"example":"50"},{"in":"query","name":"band_percent","type":"number","description":"Band neutrophils as a percent of WBC (0-100). Omitted treats bands as 0. segs+bands must be ≤100.","required":false,"example":"3"}],"errors":[{"code":"invalid_wbc","message":"wbc_k_ul (0.01-500) or wbc_ul (10-500000) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_neutrophil_percent","message":"neutrophil_percent must be a number from 0 to 100 Returned before settlement; you are not charged.","status":400},{"code":"invalid_band_percent","message":"band_percent must be a number from 0 to 100 Returned before settlement; you are not charged.","status":400},{"code":"invalid_differential","message":"neutrophil_percent + band_percent must be 0 to 100 Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/anc","citation":{"authors":"Bodey GP, Buckley M, Sathe YS, Freireich EJ","doi":"10.7326/0003-4819-64-2-328","id":"bodey-1966","source":"Ann Intern Med. 1966;64(2):328-340","title":"Quantitative relationships between circulating leukocytes and infection in patients with acute leukemia","url":"https://doi.org/10.7326/0003-4819-64-2-328"},"formula_expression":"ANC_per_uL = wbc_per_uL * (neutrophil_percent + band_percent) / 100","purpose":"Compute absolute neutrophil count from WBC and neutrophil plus band percents, plus a Bodey 1966 granulocyte band.","markdown_url":"https://magentlab.com/docs/anc.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"anc"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"wbc_per_ul","type":"number","description":"Normalized WBC in cells/µL"},{"name":"neutrophil_percent","type":"number","description":"Segmented neutrophil percent used"},{"name":"band_percent","type":"number","description":"Band percent used (0 when omitted)"},{"name":"anc_per_ul","type":"integer","description":"Absolute neutrophil count in cells/µL"},{"name":"bodey_granulocyte_band","type":"string","description":"Bodey 1966 granulocyte strata (cells/mm^3 = cells/µL): <100, 100-500, 500-1000, 1000-1500, >1500. Not a diagnosis."},{"name":"citation","type":"object","description":"Ann Intern Med 1966 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"band_percent":"3","neutrophil_percent":"50","wbc_k_ul":"6.0"},{"band_percent":"3","neutrophil_percent":"50","wbc_k_ul":"6.0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/anc","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/anc?wbc_k_ul=6.0&neutrophil_percent=50&band_percent=3","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/anc","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/alc","description":"Absolute lymphocyte count from WBC and lymphocyte percent (Shapiro 1998). ALC < 1000 cells/mm3 predicts CD4 < 200; ALC >= 2000 predicts CD4 >= 200. Deterministic published arithmetic with citation. Not a CD4 measurement or HIV diagnosis. magent does not measure the CBC.","parameters":[{"in":"query","name":"wbc_k_ul","type":"number","description":"WBC in 10^3/µL (same as 10^9/L). Provide wbc_k_ul or wbc_ul. Range 0.01-500.","required":false,"example":"6.0"},{"in":"query","name":"wbc_ul","type":"number","description":"WBC in cells/µL (same as cells/mm^3). Provide wbc_k_ul or wbc_ul. Range 10-500000.","required":false,"example":"6000"},{"in":"query","name":"lymphocyte_percent","type":"number","description":"Lymphocytes as a percent of WBC (0.1-99). Shapiro 1998 uses the CBC lymphocyte percentage.","required":true,"example":"50"}],"errors":[{"code":"invalid_alc_inputs","message":"ALC needs wbc_k_ul or wbc_ul and lymphocyte_percent as used in Shapiro 1998 (WBC times lymphocyte percent). Returned before settlement; you are not charged.","status":400},{"code":"invalid_wbc","message":"wbc_k_ul (0.01-500) or wbc_ul (10-500000) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_lymphocyte_percent","message":"lymphocyte_percent must be a number from 0.1 to 99. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/alc","citation":{"authors":"Shapiro NI, Karras DJ, Leech SH, Heilpern KL","doi":"10.1016/s0196-0644(98)70008-3","id":"shapiro-1998-alc","pmid":"9737494","source":"Ann Emerg Med. 1998;32(3):323-328","title":"Absolute lymphocyte count as a predictor of CD4 count","url":"https://doi.org/10.1016/s0196-0644(98)70008-3"},"formula_expression":"ALC_per_uL = wbc_per_uL * lymphocyte_percent / 100","purpose":"Compute absolute lymphocyte count from WBC and lymphocyte percent, plus Shapiro 1998 published ALC cutoffs that predict CD4 < 200 or CD4 ≥ 200.","markdown_url":"https://magentlab.com/docs/alc.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"alc"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"wbc_per_ul","type":"number","description":"Normalized WBC in cells/µL"},{"name":"lymphocyte_percent","type":"number","description":"Lymphocyte percent used"},{"name":"alc_per_ul","type":"integer","description":"Absolute lymphocyte count in cells/µL"},{"name":"shapiro_alc_band","type":"string","description":"Shapiro 1998 published ALC cutoffs (cells/mm^3 = cells/µL): <1000 predicts CD4 < 200; >=2000 predicts CD4 >= 200; 1000-1999 is between those cutoffs. Not a CD4 count or diagnosis."},{"name":"citation","type":"object","description":"Ann Emerg Med 1998 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"lymphocyte_percent":"50","wbc_k_ul":"6.0"},{"lymphocyte_percent":"50","wbc_k_ul":"6.0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/alc","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/alc?wbc_k_ul=6.0&lymphocyte_percent=50","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/alc","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/mentzer","description":"Mentzer index as MCV in fL divided by RBC count in millions per µL (Mentzer 1973 Lancet letter). Quotient <13 favors β-thalassaemia trait; >13 favors iron deficiency; 13 is indeterminate. Deterministic published arithmetic with citation. Not a diagnosis of thalassemia or iron deficiency; magent does not apply later cutoffs that are not in that letter.","parameters":[{"in":"query","name":"mcv_fl","type":"number","description":"Mean corpuscular volume in fL (50-120).","required":true,"example":"70"},{"in":"query","name":"rbc_million_ul","type":"number","description":"Red-cell count in millions per µL (1.0-8.0). Required.","required":true,"example":"5.6"}],"errors":[{"code":"invalid_mcv","message":"mcv_fl must be a number from 50 to 120. Returned before settlement; you are not charged.","status":400},{"code":"invalid_rbc_million_ul","message":"rbc_million_ul must be a number from 1.0 to 8.0. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/mentzer","citation":{"authors":"Mentzer WC Jr","doi":"10.1016/s0140-6736(73)91446-3","id":"mentzer-1973","pmid":"4123424","source":"Lancet. 1973 Apr 21;1(7808):882","title":"Differentiation of iron deficiency from thalassaemia trait","url":"https://doi.org/10.1016/s0140-6736(73)91446-3"},"formula_expression":"mentzer_index = mcv_fl / rbc_million_ul","purpose":"Compute the Mentzer 1973 index as mean corpuscular volume in fL divided by red-cell count in millions per µL, with the letter’s <13 / >13 / =13 bands.","markdown_url":"https://magentlab.com/docs/mentzer.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"mentzer"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"mcv_fl","type":"number","description":"Mean corpuscular volume used, fL"},{"name":"rbc_million_ul","type":"number","description":"Red-cell count used, millions per µL"},{"name":"mentzer_index","type":"number","description":"MCV divided by RBC count, 1 decimal"},{"name":"mentzer_band","type":"string","description":"Mentzer 1973 letter band: thalassemia_trait (index < 13), iron_deficiency (index > 13), or indeterminate (index = 13). Favors a side of the differential; not a diagnosis."},{"name":"citation","type":"object","description":"Mentzer 1973 Lancet letter citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"mcv_fl":"70","rbc_million_ul":"5.6"},{"mcv_fl":"70","rbc_million_ul":"5.6"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/mentzer","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/mentzer?mcv_fl=70&rbc_million_ul=5.6","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/mentzer","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/sokal","description":"Sokal 1984 relative-risk index for newly diagnosed untreated chronic granulocytic leukemia (CML). sokal_index = exp(0.0116*(age-43.4)+0.0345*(spleen_cm-7.51)+0.188*((platelets_10e9_l/700)^2-0.563)+0.0887*(blasts_percent-2.10)). Low <0.8, intermediate 0.8–1.2, high >1.2. Coefficient 0.188. Does not diagnose CML or choose TKI therapy.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (integer 1-120). Sokal 1984 CML index; not the adult 18-120 clamp.","required":true,"example":"50"},{"in":"query","name":"spleen_cm","type":"number","description":"Spleen size in cm below the costal margin (0-40). Sokal 1984.","required":true,"example":"10"},{"in":"query","name":"platelets_10e9_l","type":"number","description":"Platelet count ×10⁹/L (1-5000). Sokal 1984; CML counts may exceed 2000.","required":true,"example":"350"},{"in":"query","name":"blasts_percent","type":"number","description":"Circulating blasts as a percent of leukocytes (0-100). Sokal 1984.","required":true,"example":"2"}],"errors":[{"code":"invalid_sokal_age","message":"age must be an integer from 1 to 120 (Sokal 1984; CML index, not the adult 18-120 clamp). Returned before settlement; you are not charged.","status":400},{"code":"invalid_spleen_cm","message":"spleen_cm must be a number from 0 to 40 (cm below the costal margin; Sokal 1984). Returned before settlement; you are not charged.","status":400},{"code":"invalid_sokal_platelets","message":"platelets_10e9_l must be a number from 1 to 5000 (Sokal 1984; CML counts may exceed 2000). Returned before settlement; you are not charged.","status":400},{"code":"invalid_blast_percent","message":"blasts_percent must be a number from 0 to 100 (Sokal 1984). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/sokal","citation":{"authors":"Sokal JE, Cox EB, Baccarani M, Tura S, Gomez GA, Robertson JE, Tso CY, Braun TJ, Clarkson BD, Cervantes F, Rozman C","doi":"10.1182/blood.V63.4.789.789","id":"sokal-1984","pmid":"6584184","source":"Blood. 1984;63(4):789-799","title":"Prognostic discrimination in \"good-risk\" chronic granulocytic leukemia","url":"https://doi.org/10.1182/blood.V63.4.789.789"},"formula_expression":"sokal_index = exp(0.0116 * (age - 43.4) + 0.0345 * (spleen_cm - 7.51) + 0.188 * ((platelets_10e9_l / 700) ^ 2 - 0.563) + 0.0887 * (blasts_percent - 2.10))","purpose":"Compute the Sokal 1984 relative-risk index for newly diagnosed untreated chronic granulocytic leukemia from age, spleen size below the costal margin, platelet count, and percent circulating blasts, with the paper’s three groups.","markdown_url":"https://magentlab.com/docs/sokal.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"sokal"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"age","type":"integer","description":"Age in years used"},{"name":"spleen_cm","type":"number","description":"Spleen size used, cm below the costal margin"},{"name":"platelets_10e9_l","type":"number","description":"Platelet count used, ×10⁹/L"},{"name":"blasts_percent","type":"number","description":"Circulating blasts used, percent of leukocytes"},{"name":"sokal_index","type":"number","description":"Sokal 1984 relative-risk index, 2 decimals"},{"name":"sokal_band","type":"string","description":"Sokal 1984 three groups: low (index < 0.8), intermediate (0.8 ≤ index ≤ 1.2), high (index > 1.2). Not a diagnosis and not a TKI choice."},{"name":"citation","type":"object","description":"Sokal 1984 Blood citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"50","blasts_percent":"2","platelets_10e9_l":"350","spleen_cm":"10"},{"age":"50","blasts_percent":"2","platelets_10e9_l":"350","spleen_cm":"10"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/sokal","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/sokal?age=50&spleen_cm=10&platelets_10e9_l=350&blasts_percent=2","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/sokal","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/eutos","description":"Hasford 2011 EUTOS score for baseline untreated chronic myeloid leukemia (CML). eutos_score = 4 * spleen_cm + 7 * basophils_percent, rounded to 1 decimal. Low if score ≤ 87; high if score > 87. spleen_cm is centimetres below the costal margin (0-40); basophils_percent is peripheral-blood basophils (0-100). Not a CML diagnosis and not a TKI choice.","parameters":[{"in":"query","name":"spleen_cm","type":"number","description":"Spleen size in cm below the costal margin at baseline, untreated (0-40). Hasford 2011 EUTOS.","required":true,"example":"5"},{"in":"query","name":"basophils_percent","type":"number","description":"Peripheral-blood basophils as a percent of leukocytes (0-100). Hasford 2011 EUTOS.","required":true,"example":"2"}],"errors":[{"code":"invalid_spleen_cm","message":"spleen_cm must be a number from 0 to 40 (cm below the costal margin; Sokal 1984). Returned before settlement; you are not charged.","status":400},{"code":"invalid_basophil_percent","message":"basophils_percent must be a number from 0 to 100 (Hasford 2011 EUTOS). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/eutos","citation":{"authors":"Hasford J, Baccarani M, Hoffmann V, Guilhot J, Saussele S, Rosti G, Guilhot F, Porkka K, Ossenkoppele G, Lindoerfer D, Simonsson B, Pfirrmann M, Hehlmann R","doi":"10.1182/blood-2010-12-319038","id":"hasford-2011","pmid":"21536864","source":"Blood. 2011;118(3):686-692","title":"Predicting complete cytogenetic response and subsequent progression-free survival in 2060 patients with CML on imatinib treatment: the EUTOS score","url":"https://doi.org/10.1182/blood-2010-12-319038"},"formula_expression":"eutos_score = 4 * spleen_cm + 7 * basophils_percent","purpose":"Compute the Hasford 2011 EUTOS score for baseline untreated chronic myeloid leukemia from spleen size below the costal margin and peripheral-blood basophil percent, with the paper’s two groups (low ≤87, high >87).","markdown_url":"https://magentlab.com/docs/eutos.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"eutos"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"spleen_cm","type":"number","description":"Spleen size used, cm below the costal margin"},{"name":"basophils_percent","type":"number","description":"Peripheral-blood basophils used, percent of leukocytes"},{"name":"eutos_score","type":"number","description":"Hasford 2011 EUTOS score, 1 decimal"},{"name":"eutos_band","type":"string","description":"Hasford 2011 two groups: low (score ≤ 87), high (score > 87). Not a diagnosis and not a TKI choice."},{"name":"citation","type":"object","description":"Hasford 2011 Blood citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"basophils_percent":"2","spleen_cm":"5"},{"basophils_percent":"2","spleen_cm":"5"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/eutos","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/eutos?spleen_cm=5&basophils_percent=2","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/eutos","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/flipi","description":"Solal-Céligny 2004 FLIPI: age >60, Ann Arbor III–IV, hemoglobin <120 g/L, nodal areas >4, LDH above ULN; 1 point each, max 5. Low 0–1, intermediate 2, high ≥3. Deterministic published score with citation; not a follicular-lymphoma diagnosis or treatment choice; FLIPI 2004 not FLIPI-2. magent does not stage lymphoma, assay hemoglobin, count nodal sites, or measure LDH.","parameters":[{"in":"query","name":"age_gt_60","type":"boolean","description":"Age >60 years as assigned by the caller (Solal-Céligny 2004). true scores 1. magent does not assign age.","required":true,"example":"false"},{"in":"query","name":"stage_iii_iv","type":"boolean","description":"Ann Arbor stage III–IV as assigned by the caller (Solal-Céligny 2004). true scores 1. magent does not stage lymphoma.","required":true,"example":"false"},{"in":"query","name":"hemoglobin_lt_120_g_l","type":"boolean","description":"Hemoglobin <120 g/L as assigned by the caller (Solal-Céligny 2004). true scores 1. magent does not assay hemoglobin.","required":true,"example":"false"},{"in":"query","name":"nodal_sites_gt_4","type":"boolean","description":"Nodal areas >4 as assigned by the caller (Solal-Céligny 2004). true scores 1. magent does not count nodal sites.","required":true,"example":"false"},{"in":"query","name":"ldh_above_uln","type":"boolean","description":"Serum LDH above the upper limit of normal as assigned by the caller (Solal-Céligny 2004). true scores 1. magent does not measure LDH.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/flipi","citation":{"authors":"Solal-Céligny P, Roy P, Colombat P, White J, Armitage JO, Arranz-Saez R, Au WY, Bellei M, Brice P, Caballero D, Coiffier B, Conde-Garcia E, Doyen C, Federico M, Fisher RI, Garcia-Conde JF, Gisselbrecht C, Haioun C, LeBlanc M, Lister AT, Lopez-Guillermo A, McLaughlin P, Milpied N, Morel P, Mounier N, Proctor SJ, Rohatiner A, Smith P, Soubeyran P, Tilly H, Vitolo U, Zinzani PL, Zucca E, Montserrat E","doi":"10.1182/blood-2003-12-4434","id":"solal-celigny-2004","pmid":"15126323","source":"Blood. 2004;104(5):1258-1265","title":"Follicular lymphoma international prognostic index","url":"https://doi.org/10.1182/blood-2003-12-4434"},"formula_expression":"FLIPI = age_gt_60 1 + stage_iii_iv 1 + hemoglobin_lt_120_g_l 1 + nodal_sites_gt_4 1 + ldh_above_uln 1; Solal-Céligny 2004; max 5; low 0-1, intermediate 2, high ≥3","purpose":"Sum the Solal-Céligny 2004 FLIPI adverse factors for follicular lymphoma and return low (0–1), intermediate (2), or high (≥3).","markdown_url":"https://magentlab.com/docs/flipi.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"flipi"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"FLIPI points 0-5"},{"name":"max_score","type":"integer","description":"Always 5"},{"name":"flipi_band","type":"string","description":"low when score is 0-1, intermediate when 2, high when ≥3 (Solal-Céligny 2004). Not a follicular-lymphoma diagnosis or treatment choice. FLIPI 2004, not FLIPI-2."},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Solal-Céligny 2004 Blood citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age_gt_60":"false","hemoglobin_lt_120_g_l":"false","ldh_above_uln":"false","nodal_sites_gt_4":"false","stage_iii_iv":"false"},{"age_gt_60":"false","hemoglobin_lt_120_g_l":"false","ldh_above_uln":"false","nodal_sites_gt_4":"false","stage_iii_iv":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/flipi","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/flipi?age_gt_60=false&stage_iii_iv=false&hemoglobin_lt_120_g_l=false&nodal_sites_gt_4=false&ldh_above_uln=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/flipi","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/flipi24","description":"Maurer 2025 FLIPI24: 24-month event probability in newly diagnosed follicular lymphoma from age (nonlinear, inflection at 75), hemoglobin, WBC, LDH/ULN, and beta-2 microglobulin. Table S5 Cox algorithm assuming R-CHOP or B-R-like immunochemotherapy and 50% anti-CD20 maintenance. Low/intermediate/high at 0.10 and 0.15. Not Solal-Céligny FLIPI 2004. Not a diagnosis or treatment order. magent does not assay labs.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (integer 18-120). Maurer 2025 Table S5: no additional age effect 18-60; HR 1.01 per year 60-75 (beta 0.01); HR 1.05 per year 75-90 (extra beta 0.038). Age is clamped to 90 for the linear predictor. magent does not assign age.","required":true,"example":61},{"in":"query","name":"hemoglobin_g_dl","type":"number","description":"Hemoglobin in g/dL (1-25). Table S5 linear 8-17 g/dL, HR 0.92 per unit (beta -0.081); values outside 8-17 are clamped. magent does not assay hemoglobin.","required":true,"example":13.0},{"in":"query","name":"wbc_10e9_l","type":"number","description":"White blood cell count in 10^9/L (0.1-80), equal to k/µL. Table S5 linear 4-11, HR 1.08 per unit (beta 0.075); values outside 4-11 are clamped. magent does not assay WBC.","required":true,"example":7.0},{"in":"query","name":"ldh_uln_ratio","type":"number","description":"Caller-assigned serum LDH divided by the local upper limit of normal (0.1-20). Table S5 linear 0.5-5, HR 1.44 per unit (beta 0.364); values outside 0.5-5 are clamped. magent does not measure LDH or set the ULN.","required":true,"example":1.0},{"in":"query","name":"b2m_mg_l","type":"number","description":"Beta-2 microglobulin in mg/L (0.1-40). Table S5 linear 1-10 mg/L, HR 1.17 per unit (beta 0.159); values outside 1-10 are clamped. magent does not assay B2M.","required":true,"example":2.0}],"errors":[{"code":"invalid_flipi24","message":"FLIPI24 inputs must match Maurer 2025 age, hemoglobin, WBC, LDH over ULN, and beta-2 microglobulin. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/flipi24","citation":{"authors":"Maurer MJ, et al.","doi":"10.1200/jco-25-00892","id":"maurer-2025-flipi24","pmid":"41329901","source":"J Clin Oncol. 2026;44(2):117-128","title":"FLIPI24: A Modern Prognostic Model and Clinical Trial Enrichment Tool for Newly Diagnosed Follicular Lymphoma","url":"https://doi.org/10.1200/jco-25-00892"},"formula_expression":"efs24_event_probability = 1 - 0.89^exp(lp); lp = 0.01*age60 + 0.038*age_over_75 + 0.364*ldh_uln + 0.159*b2m_mg_l - 0.081*hemoglobin_g_dl + 0.075*wbc_10e9_l - 0.7115; age60 = clamp(age, 60, 90); age_over_75 = min(15, max(0, clamp(age, 0, 90)-75)); ldh_uln clamp 0.5-5; b2m clamp 1-10 mg/L; hemoglobin clamp 8-17 g/dL; wbc clamp 4-11 10^9/L; Maurer 2025 Table S5; S0(24)=0.89; 50% anti-CD20 maintenance is in the 0.7115 centering; risk low if p<=0.10, intermediate if p<=0.15, else high; assumes R-CHOP or B-R-like immunochemotherapy","purpose":"Compute the Maurer 2025 Table S5 probability of an event within 24 months (progression, transformation, second-line treatment, or death) in newly diagnosed follicular lymphoma from age, hemoglobin, WBC, LDH/ULN, and beta-2 microglobulin, assuming R-CHOP or B-R-like immunochemotherapy and a 50% likelihood of anti-CD20 maintenance.","markdown_url":"https://magentlab.com/docs/flipi24.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"flipi24"},{"name":"formula_expression","type":"string","description":"Maurer 2025 Table S5 EFS24 probability algorithm"},{"name":"age","type":"integer","description":"Input age in years"},{"name":"hemoglobin_g_dl","type":"number","description":"Input hemoglobin g/dL"},{"name":"wbc_10e9_l","type":"number","description":"Input WBC 10^9/L"},{"name":"ldh_uln_ratio","type":"number","description":"Input caller-assigned LDH / ULN ratio"},{"name":"b2m_mg_l","type":"number","description":"Input beta-2 microglobulin mg/L"},{"name":"linear_predictor","type":"number","description":"Table S5 centered linear predictor (cov_lp - 0.7115), 4 decimals"},{"name":"efs24_event_probability","type":"number","description":"Probability of an event within 24 months (0-1), 4 decimals. A probability, not a treatment order."},{"name":"risk_group","type":"string","description":"Table S5 groups: low if probability ≤0.10, intermediate if ≤0.15, high otherwise"},{"name":"citation","type":"object","description":"Maurer 2025 FLIPI24 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"61","b2m_mg_l":"2.0","hemoglobin_g_dl":"13.0","ldh_uln_ratio":"1.0","wbc_10e9_l":"7.0"},{"age":"61","b2m_mg_l":"2.0","hemoglobin_g_dl":"13.0","ldh_uln_ratio":"1.0","wbc_10e9_l":"7.0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/flipi24","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/flipi24?age=61&hemoglobin_g_dl=13.0&wbc_10e9_l=7.0&ldh_uln_ratio=1.0&b2m_mg_l=2.0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/flipi24","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/sg-port","description":"Jacobs 2022 Table 3 Cox linear predictor for overall survival after resected major salivary gland cancer with versus without postoperative radiotherapy. Age per 10 years by PORT, male, Charlson-Deyo per point, gland, PORT by T stage, nodal-positivity ratio band, grade step, and positive margin as ln(HR). Not a 2-/5-/10-year OS percent (no printed S0). Not a radiation order. magent does not compute Charlson-Deyo or count nodes.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age at diagnosis in years (integer 18-120). Jacobs 2022 Table 3: per 10 years, HR 1.52 without PORT and HR 1.37 with PORT. magent does not assign age.","required":true,"example":65},{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"Caller-assigned sex. Table 3: male versus female HR 1.28. magent does not assign sex.","required":true,"example":"male"},{"in":"query","name":"charlson_deyo","type":"string","enum":["0","1","2","ge_3"],"description":"Caller-assigned Charlson-Deyo score as published (0, 1, 2, or ge_3). Table 3 prints a single HR 1.22; magent applies ln(1.22) per step 0/1/2/3. magent does not compute Charlson-Deyo.","required":true,"example":"0"},{"in":"query","name":"gland","type":"string","enum":["parotid","submandibular","sublingual"],"description":"Involved major salivary gland. Table 3 versus parotid: submandibular HR 1.32; sublingual HR 0.72. magent does not assign the primary site.","required":true,"example":"parotid"},{"in":"query","name":"t_stage","type":"string","enum":["t1","t2","t3","t4"],"description":"AJCC pathologic T stage (t1, t2, t3, or t4) as recorded. Table 3 PORT HRs: pT1 1.03, pT2 0.83, pT3 0.68, pT4 0.55. T-stage main-effect HRs were printed as dashes because of the PORT×T interaction; without PORT the T term is 0. magent does not assign T stage.","required":true,"example":"t2"},{"in":"query","name":"grade","type":"string","enum":["low","intermediate","high"],"description":"Caller-assigned grade (low, intermediate, or high). Table 3 prints a single HR 1.34; magent applies ln(1.34) per step from low. magent does not assign grade.","required":true,"example":"low"},{"in":"query","name":"margin","type":"string","enum":["negative","positive"],"description":"Surgical margin. Table 3: positive versus negative HR 1.26. magent does not read the pathology report.","required":true,"example":"negative"},{"in":"query","name":"nodal_positivity_ratio","type":"string","enum":["0","0.1-10","10.1-49.9","ge_50"],"description":"Caller-assigned nodal-positivity ratio band as published: 0 (0%), 0.1-10, 10.1-49.9, or ge_50 (≥50%). Table 3 prints a single HR 1.29; magent applies ln(1.29) per a priori band step 0/1/2/3. magent does not count nodes.","required":true,"example":"0"},{"in":"query","name":"port","type":"boolean","description":"true if postoperative radiotherapy was given, false if not. Selects the Table 3 age HR and the T-stage-specific PORT HR. Not a radiation order.","required":true,"example":false}],"errors":[{"code":"invalid_sg_port","message":"Salivary-gland PORT survival inputs must match Jacobs 2022 age, sex, Charlson-Deyo score, gland, pathologic T stage, grade, margin, nodal-positivity ratio, and PORT. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/sg-port","citation":{"authors":"Jacobs CD, Barak I, Jung SH, et al.","doi":"10.1016/j.oraloncology.2022.105955","id":"jacobs-2022-sg-port","pmid":"35752134","source":"Oral Oncol. 2022;132:105955","title":"Prediction model to estimate overall survival benefit of postoperative radiotherapy for resected major salivary gland cancers","url":"https://doi.org/10.1016/j.oraloncology.2022.105955"},"formula_expression":"lp = ln(age_hr_by_port)*(age/10) + ln(1.28)*male + ln(1.22)*charlson_deyo_step + ln(1.32)*submandibular + ln(0.72)*sublingual + ln(port_hr_by_t)*port + ln(1.29)*nodal_ratio_step + ln(1.34)*grade_step + ln(1.26)*positive_margin; Jacobs 2022 Table 3 multivariable HRs, β = ln(HR); age_hr is 1.52 without PORT and 1.37 with PORT (per 10 years); port_hr is 1.03/0.83/0.68/0.55 for pT1/pT2/pT3/pT4; charlson_deyo_step 0/1/2/3 for 0/1/2/ge_3; nodal_ratio_step 0/1/2/3 for 0 / 0.1-10 / 10.1-49.9 / ge_50; grade_step 0/1/2 for low/intermediate/high; T-stage main-effect HRs printed as dashes (PORT×T interaction); no printed S0; not 2-/5-/10-year OS percents; not a radiation order; magent does not compute Charlson-Deyo or count nodes","purpose":"Compute the Jacobs 2022 Table 3 multivariable Cox linear predictor for overall survival after resection of major salivary gland cancer from age, sex, Charlson-Deyo score, involved gland, pathologic T stage, grade, margin, nodal-positivity ratio band, and PORT yes or no.","markdown_url":"https://magentlab.com/docs/sg-port.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"sg_port"},{"name":"formula_expression","type":"string","description":"Jacobs 2022 Table 3 Cox linear predictor from ln(HR)"},{"name":"age","type":"integer","description":"Input age in years"},{"name":"sex","type":"string","description":"female or male"},{"name":"charlson_deyo","type":"string","description":"0, 1, 2, or ge_3"},{"name":"gland","type":"string","description":"parotid, submandibular, or sublingual"},{"name":"t_stage","type":"string","description":"t1, t2, t3, or t4"},{"name":"grade","type":"string","description":"low, intermediate, or high"},{"name":"margin","type":"string","description":"negative or positive"},{"name":"nodal_positivity_ratio","type":"string","description":"0, 0.1-10, 10.1-49.9, or ge_50"},{"name":"port","type":"boolean","description":"PORT yes (true) or no (false)"},{"name":"linear_predictor","type":"number","description":"Jacobs 2022 Table 3 Cox linear predictor, 6 decimals. Not a survival percent."},{"name":"risk_score","type":"number","description":"Same value as linear_predictor (unscaled Cox LP). Not a survival percent."},{"name":"citation","type":"object","description":"Jacobs 2022 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"65","charlson_deyo":"0","gland":"parotid","grade":"low","margin":"negative","nodal_positivity_ratio":"0","port":"false","sex":"male","t_stage":"t2"},{"age":"65","charlson_deyo":"0","gland":"parotid","grade":"low","margin":"negative","nodal_positivity_ratio":"0","port":"false","sex":"male","t_stage":"t2"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/sg-port","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/sg-port?age=65&sex=male&charlson_deyo=0&gland=parotid&t_stage=t2&grade=low&margin=negative&nodal_positivity_ratio=0&port=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/sg-port","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/ipi","description":"Shipp 1993 IPI for aggressive non-Hodgkin lymphoma: age >60, Ann Arbor III or IV, extranodal sites >1, ECOG ≥2, LDH > ULN; 1 point each, max 5. Low 0–1, low_intermediate 2, high_intermediate 3, high 4–5. Deterministic published score with citation; not a lymphoma diagnosis or treatment choice; not age-adjusted IPI, not R-IPI, not NCCN-IPI. magent does not assay LDH.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Age >60 scores 1 (Shipp 1993). Age 60 is the ≤60 arm and scores 0.","required":true,"example":"50"},{"in":"query","name":"stage_iii_or_iv","type":"boolean","description":"Ann Arbor stage III or IV as assigned by the caller (Shipp 1993). true scores 1. magent does not stage lymphoma.","required":true,"example":"false"},{"in":"query","name":"extranodal_gt_1","type":"boolean","description":"More than one extranodal site as assigned by the caller (Shipp 1993). true scores 1. magent does not count extranodal sites.","required":true,"example":"false"},{"in":"query","name":"ecog","type":"integer","description":"ECOG performance status 0-4 as assigned by the caller (Shipp 1993). ≥2 scores 1. magent does not assign ECOG.","required":true,"example":"0"},{"in":"query","name":"ldh_gt_uln","type":"boolean","description":"Serum LDH above the upper limit of normal as assigned by the caller (Shipp 1993). true scores 1. magent does not assay LDH.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_ecog","message":"ecog must be an integer from 0 to 4 (Shipp 1993 IPI). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/ipi","citation":{"authors":"The International Non-Hodgkin's Lymphoma Prognostic Factors Project","doi":"10.1056/NEJM199309303291402","id":"shipp-1993","pmid":"8141877","source":"N Engl J Med. 1993;329(14):987-994","title":"A predictive model for aggressive non-Hodgkin's lymphoma","url":"https://doi.org/10.1056/NEJM199309303291402"},"formula_expression":"IPI = age_gt_60 1 + stage_iii_or_iv 1 + extranodal_gt_1 1 + ecog_ge_2 1 + ldh_gt_uln 1; Shipp 1993; max 5; low 0-1, low_intermediate 2, high_intermediate 3, high 4-5","purpose":"Sum the Shipp 1993 five-factor International Prognostic Index (all ages) and return low (0–1), low_intermediate (2), high_intermediate (3), or high (4–5).","markdown_url":"https://magentlab.com/docs/ipi.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"ipi"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"IPI points 0-5"},{"name":"max_score","type":"integer","description":"Always 5"},{"name":"ipi_risk","type":"string","description":"low when score is 0-1, low_intermediate when 2, high_intermediate when 3, high when 4-5 (Shipp 1993). Not a lymphoma diagnosis or treatment choice. Five-factor IPI (all ages), not age-adjusted IPI, not R-IPI, not NCCN-IPI."},{"name":"age_years","type":"integer","description":"Age used for the >60 criterion"},{"name":"ecog","type":"integer","description":"Caller-assigned ECOG 0-4 used for ≥2"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Shipp 1993 N Engl J Med citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"50","ecog":"0","extranodal_gt_1":"false","ldh_gt_uln":"false","stage_iii_or_iv":"false"},{"age":"50","ecog":"0","extranodal_gt_1":"false","ldh_gt_uln":"false","stage_iii_or_iv":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/ipi","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/ipi?age=50&stage_iii_or_iv=false&extranodal_gt_1=false&ecog=0&ldh_gt_uln=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/ipi","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/ball","description":"Soumerai 2019 BALL score for relapsed or refractory CLL. Four caller-assigned 1-point flags (max 4): beta-2-microglobulin at the paper's published cutoff (>=5 mg/dL), LDH > laboratory ULN, anemia (Hb <110 g/L women or <120 g/L men), and time from initiation of last therapy <24 months. Risk low 0-1, intermediate 2-3, high 4. magent does not assay labs or convert B2M mg/L vs mg/dL. Not a treatment recommendation.","parameters":[{"in":"query","name":"b2m_ge_5","type":"boolean","description":"Serum β2-microglobulin at or above the Soumerai 2019 published cutoff (≥5 mg/dL) as assigned by the caller. true or false. magent does not assay B2M and does not convert mg/L versus mg/dL.","required":true,"example":"false"},{"in":"query","name":"ldh_gt_uln","type":"boolean","description":"Serum LDH above the laboratory upper limit of normal as assigned by the caller (Soumerai 2019). true or false. magent does not assay LDH.","required":true,"example":"false"},{"in":"query","name":"anemia","type":"boolean","description":"Anemia as assigned by the caller using Soumerai 2019 hemoglobin cutoffs (hemoglobin <110 g/L in women or <120 g/L in men). true or false. magent does not take a hemoglobin number or sex and does not assay hemoglobin.","required":true,"example":"false"},{"in":"query","name":"last_therapy_lt_24mo","type":"boolean","description":"Time from initiation of last therapy <24 months as assigned by the caller (Soumerai 2019). true or false. magent does not read a treatment calendar.","required":true,"example":"false"}],"errors":[{"code":"invalid_ball","message":"BALL score inputs must match Soumerai 2019 beta-2-microglobulin, LDH, hemoglobin, and time-from-last-therapy flags from that paper. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/ball","citation":{"authors":"Soumerai JD, Ni A, Darif M, Londhe A, Xing G, Mun Y, et al.","doi":"10.1016/S2352-3026(19)30085-7","id":"soumerai-2019","pmid":"31109827","source":"Lancet Haematol. 2019;6(7):e366-e374","title":"Prognostic risk score for patients with relapsed or refractory chronic lymphocytic leukaemia treated with targeted therapies or chemoimmunotherapy: a retrospective, pooled cohort study with external validations","url":"https://doi.org/10.1016/S2352-3026(19)30085-7"},"formula_expression":"BALL = b2m_ge_5 + ldh_gt_uln + anemia + last_therapy_lt_24mo; each 1; Soumerai 2019; max 4; low 0-1, intermediate 2-3, high 4","purpose":"Sum the four Soumerai 2019 BALL flags for relapsed or refractory CLL and return score 0–4 with risk low (0–1), intermediate (2–3), or high (4).","markdown_url":"https://magentlab.com/docs/ball.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"ball"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"BALL points 0-4"},{"name":"max_score","type":"integer","description":"Always 4"},{"name":"risk","type":"string","description":"low when score is 0-1, intermediate when 2-3, high when 4 (Soumerai 2019). Not a treatment recommendation. Not overall-survival percents."},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Soumerai 2019 Lancet Haematol citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"anemia":"false","b2m_ge_5":"false","last_therapy_lt_24mo":"false","ldh_gt_uln":"false"},{"anemia":"false","b2m_ge_5":"false","last_therapy_lt_24mo":"false","ldh_gt_uln":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/ball","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/ball?b2m_ge_5=false&ldh_gt_uln=false&anemia=false&last_therapy_lt_24mo=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/ball","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/cns-ipi","description":"Schmitz 2016 CNS-IPI: Shipp IPI factors (age >60, ECOG ≥2, LDH > ULN, Ann Arbor III or IV, extranodal sites >1) plus kidney and/or adrenal involvement; 1 point each, max 6. Low 0–1, intermediate 2–3, high 4–6. CNS relapse risk after R-CHOP in DLBCL. Deterministic published score; not a CNS prophylaxis or LP order; not NCCN-IPI; not R-IPI; not a DLBCL diagnosis. magent does not stage lymphoma or image kidneys.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Age >60 scores 1 (Schmitz 2016). Age 60 is the ≤60 arm and scores 0.","required":true,"example":"50"},{"in":"query","name":"ecog","type":"integer","description":"ECOG performance status 0-4 as assigned by the caller (Schmitz 2016). ≥2 scores 1. magent does not assign ECOG.","required":true,"example":"0"},{"in":"query","name":"ldh_gt_uln","type":"boolean","description":"Serum LDH above the upper limit of normal as assigned by the caller (Schmitz 2016). true scores 1. magent does not assay LDH.","required":true,"example":"false"},{"in":"query","name":"stage_iii_or_iv","type":"boolean","description":"Ann Arbor stage III or IV as assigned by the caller (Schmitz 2016). true scores 1. magent does not stage lymphoma.","required":true,"example":"false"},{"in":"query","name":"extranodal_gt_1","type":"boolean","description":"More than one extranodal site as assigned by the caller (Schmitz 2016). true scores 1. magent does not count extranodal sites.","required":true,"example":"false"},{"in":"query","name":"kidney_or_adrenal","type":"boolean","description":"Kidney and/or adrenal involvement as assigned by the caller (Schmitz 2016). true scores 1. magent does not image kidneys.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_ecog","message":"ecog must be an integer from 0 to 4 (Shipp 1993 IPI). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/cns-ipi","citation":{"authors":"Schmitz N, Zeynalova S, Nickelsen M, Kansara R, Villa D, Sehn LH, Glass B, Scott DW, Gascoyne RD, Connors JM, Ziepert M, Pfreundschuh M, Loeffler M, Savage KJ","doi":"10.1200/JCO.2015.65.6520","id":"schmitz-2016","pmid":"27382100","source":"J Clin Oncol. 2016;34(26):3150-3156","title":"CNS International Prognostic Index: A Risk Model for CNS Relapse in Patients With Diffuse Large B-Cell Lymphoma Treated With R-CHOP","url":"https://doi.org/10.1200/JCO.2015.65.6520"},"formula_expression":"CNS-IPI = age_gt_60 1 + ecog_ge_2 1 + ldh_gt_uln 1 + stage_iii_or_iv 1 + extranodal_gt_1 1 + kidney_or_adrenal 1; Schmitz 2016; max 6; low 0-1, intermediate 2-3, high 4-6","purpose":"Sum the Schmitz 2016 CNS International Prognostic Index (Shipp IPI factors plus kidney/adrenal involvement) and return low (0–1), intermediate (2–3), or high (4–6).","markdown_url":"https://magentlab.com/docs/cns-ipi.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"cns_ipi"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"CNS-IPI points 0-6"},{"name":"max_score","type":"integer","description":"Always 6"},{"name":"cns_ipi_risk","type":"string","description":"low when score is 0-1, intermediate when 2-3, high when 4-6 (Schmitz 2016). Not a CNS prophylaxis or LP order. Not a DLBCL diagnosis. CNS-IPI (Shipp IPI factors plus kidney/adrenal involvement), not NCCN-IPI, not R-IPI."},{"name":"age_years","type":"integer","description":"Age used for the >60 criterion"},{"name":"ecog","type":"integer","description":"Caller-assigned ECOG 0-4 used for ≥2"},{"name":"kidney_or_adrenal","type":"boolean","description":"Caller-assigned kidney and/or adrenal involvement flag used for +1"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Schmitz 2016 J Clin Oncol citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"50","ecog":"0","extranodal_gt_1":"false","kidney_or_adrenal":"false","ldh_gt_uln":"false","stage_iii_or_iv":"false"},{"age":"50","ecog":"0","extranodal_gt_1":"false","kidney_or_adrenal":"false","ldh_gt_uln":"false","stage_iii_or_iv":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/cns-ipi","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/cns-ipi?age=50&ecog=0&ldh_gt_uln=false&stage_iii_or_iv=false&extranodal_gt_1=false&kidney_or_adrenal=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/cns-ipi","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/nccn-ipi","description":"Zhou 2014 NCCN-IPI for DLBCL in the rituximab era: age (≤40 0, 41–60 1, 61–75 2, ≥76 3), LDH/ULN (≤1 0, >1–3 1, >3 2), Ann Arbor III or IV 1, major-organ extranodal (bone marrow, CNS, liver/GI tract, or lung) 1, ECOG ≥2 1; max 8. Low 0–1, low_intermediate 2–3, high_intermediate 4–5, high 6–8. Deterministic published score; not a DLBCL diagnosis or treatment choice; not Shipp IPI, not R-IPI, not CNS-IPI. magent does not assay LDH or stage lymphoma.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). ≤40 scores 0; 41–60 scores 1; 61–75 scores 2; ≥76 scores 3 (Zhou 2014 NCCN-IPI refined age). Age 40 scores 0; 41 and 60 score 1; 61 and 75 score 2; 76 scores 3. Not Shipp IPI binary >60.","required":true,"example":"40"},{"in":"query","name":"ecog","type":"integer","description":"ECOG performance status 0-4 as assigned by the caller (Zhou 2014 NCCN-IPI). ≥2 scores 1. magent does not assign ECOG.","required":true,"example":"0"},{"in":"query","name":"ldh_uln_ratio","type":"number","description":"Serum LDH divided by the laboratory ULN (0.1-20). ≤1 scores 0; >1 and ≤3 scores 1; >3 scores 2 (Zhou 2014 NCCN-IPI). 1.0 scores 0; 1.01 and 3.0 score 1; 3.01 scores 2. magent does not assay LDH.","required":true,"example":"0.9"},{"in":"query","name":"stage_iii_or_iv","type":"boolean","description":"Ann Arbor stage III or IV as assigned by the caller (Zhou 2014 NCCN-IPI). true scores 1. magent does not stage lymphoma.","required":true,"example":"false"},{"in":"query","name":"extranodal_major","type":"boolean","description":"Extranodal involvement of major organs (bone marrow, CNS, liver/GI tract, or lung) as assigned by the caller (Zhou 2014 NCCN-IPI). true scores 1. This is not IPI extranodal sites >1. magent does not image extranodal sites.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_ldh_ratio","message":"ldh_uln_ratio must be a number from 0.1 to 20 (Hoster 2008 simplified MIPI). Returned before settlement; you are not charged.","status":400},{"code":"invalid_ecog","message":"ecog must be an integer from 0 to 4 (Shipp 1993 IPI). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/nccn-ipi","citation":{"authors":"Zhou Z, Sehn LH, Rademaker AW, Gordon LI, Lacasce AS, Crosby-Thompson A, Vanderplas A, Zelenetz AD, Abel GA, Rodriguez MA, Nademanee A, Kaminski MS, Czuczman MS, Millenson M, Niland J, Gascoyne RD, Connors JM, Friedberg JW, Winter JN","doi":"10.1182/blood-2013-09-524108","id":"zhou-2014","pmid":"24264230","source":"Blood. 2014;123(6):837-842","title":"An enhanced International Prognostic Index (NCCN-IPI) for patients with diffuse large B-cell lymphoma treated in the rituximab era","url":"https://doi.org/10.1182/blood-2013-09-524108"},"formula_expression":"NCCN-IPI = age (≤40 0, 41–60 1, 61–75 2, ≥76 3) + LDH/ULN (≤1 0, >1–3 1, >3 2) + stage_iii_or_iv 1 + extranodal_major 1 + ecog_ge_2 1; Zhou 2014; max 8; low 0-1, low_intermediate 2-3, high_intermediate 4-5, high 6-8","purpose":"Sum the Zhou 2014 NCCN International Prognostic Index (enhanced IPI for DLBCL treated in the rituximab era) and return low (0–1), low_intermediate (2–3), high_intermediate (4–5), or high (6–8).","markdown_url":"https://magentlab.com/docs/nccn-ipi.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"nccn_ipi"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"NCCN-IPI points 0-8"},{"name":"max_score","type":"integer","description":"Always 8"},{"name":"nccn_ipi_risk","type":"string","description":"low when score is 0-1, low_intermediate when 2-3, high_intermediate when 4-5, high when 6-8 (Zhou 2014 NCCN-IPI). Not a DLBCL diagnosis or treatment choice. NCCN-IPI (enhanced IPI), not Shipp IPI, not R-IPI, not CNS-IPI."},{"name":"age_years","type":"integer","description":"Age used for the Zhou 2014 refined age bands"},{"name":"ecog","type":"integer","description":"Caller-assigned ECOG 0-4 used for ≥2"},{"name":"ldh_uln_ratio","type":"number","description":"Caller-assigned LDH/ULN ratio used for scoring"},{"name":"extranodal_major","type":"boolean","description":"Caller-assigned major-organ extranodal involvement flag used for +1 (not IPI extranodal sites >1)"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Zhou 2014 Blood citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"40","ecog":"0","extranodal_major":"false","ldh_uln_ratio":"0.9","stage_iii_or_iv":"false"},{"age":"40","ecog":"0","extranodal_major":"false","ldh_uln_ratio":"0.9","stage_iii_or_iv":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/nccn-ipi","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/nccn-ipi?age=40&ecog=0&ldh_uln_ratio=0.9&stage_iii_or_iv=false&extranodal_major=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/nccn-ipi","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/malt-ipi","description":"Thieblemont 2017 MALT-IPI (IELSG-19): age ≥70, Ann Arbor III or IV, LDH > ULN; 1 point each, max 3. Low 0, intermediate 1, high ≥2. Deterministic published score with citation; not a lymphoma diagnosis or treatment choice; original MALT-IPI, not Revised MALT-IPI (no MMS; age is ≥70 not >60), not Shipp IPI. magent does not stage lymphoma or assay LDH.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Age ≥70 scores 1 (Thieblemont 2017). Age 69 scores 0. This is not IPI's >60 cutoff.","required":true,"example":"50"},{"in":"query","name":"stage_iii_or_iv","type":"boolean","description":"Ann Arbor stage III or IV as assigned by the caller (Thieblemont 2017). true scores 1. magent does not stage lymphoma.","required":true,"example":"false"},{"in":"query","name":"ldh_gt_uln","type":"boolean","description":"Serum LDH above the upper limit of normal as assigned by the caller (Thieblemont 2017). true scores 1. magent does not assay LDH.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/malt-ipi","citation":{"authors":"Thieblemont C, Cascione L, Conconi A, Kiesewetter B, Raderer M, Gaidano G, Martelli M, Laszlo D, Coiffier B, Lopez-Guillermo A, Torri V, Cavalli F, Johnson PW, Zucca E","doi":"10.1182/blood-2017-03-771915","id":"thieblemont-2017","pmid":"28720586","source":"Blood. 2017;130(12):1409-1417","title":"A MALT lymphoma prognostic index","url":"https://doi.org/10.1182/blood-2017-03-771915"},"formula_expression":"MALT-IPI = age_ge_70 1 + stage_iii_or_iv 1 + ldh_gt_uln 1; Thieblemont 2017; max 3; low 0, intermediate 1, high ≥2","purpose":"Sum the Thieblemont 2017 three-factor MALT-IPI (IELSG-19) and return low (0), intermediate (1), or high (≥2).","markdown_url":"https://magentlab.com/docs/malt-ipi.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"malt_ipi"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"MALT-IPI points 0-3"},{"name":"max_score","type":"integer","description":"Always 3"},{"name":"malt_ipi_risk","type":"string","description":"low when score is 0, intermediate when 1, high when ≥2 (Thieblemont 2017). Not a lymphoma diagnosis or treatment choice. Original MALT-IPI (IELSG-19), not Revised MALT-IPI, not Shipp IPI."},{"name":"age_years","type":"integer","description":"Age used for the ≥70 criterion"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Thieblemont 2017 Blood citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"50","ldh_gt_uln":"false","stage_iii_or_iv":"false"},{"age":"50","ldh_gt_uln":"false","stage_iii_or_iv":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/malt-ipi","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/malt-ipi?age=50&stage_iii_or_iv=false&ldh_gt_uln=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/malt-ipi","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/mipi","description":"Hoster 2008 simplified MIPI for advanced-stage mantle cell lymphoma: age (<50 0, 50–59 1, 60–69 2, ≥70 3), ECOG (0–1 0, 2–4 2), LDH/ULN (<0.67 0, 0.67–<1 1, 1–<1.5 2, ≥1.5 3), WBC ×10^9/L (<6.7 0, 6.7–<10 1, 10–<15 2, ≥15 3); max 11. Low 0–3, intermediate 4–5, high 6–11. Deterministic published score with citation; not a lymphoma diagnosis; not continuous MIPI; not MIPI-c. magent does not assay LDH or WBC.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). <50 scores 0; 50–59 scores 1; 60–69 scores 2; ≥70 scores 3 (Hoster 2008 simplified MIPI). 50 and 59 score 1; 60 and 69 score 2; 70 scores 3.","required":true,"example":"40"},{"in":"query","name":"ecog","type":"integer","description":"ECOG performance status 0-4 as assigned by the caller (Hoster 2008 simplified MIPI). 0–1 scores 0; 2–4 scores 2. magent does not assign ECOG.","required":true,"example":"0"},{"in":"query","name":"ldh_uln_ratio","type":"number","description":"Serum LDH divided by the laboratory ULN (0.1-20). <0.67 scores 0; 0.67–<1.0 scores 1; 1.0–<1.5 scores 2; ≥1.5 scores 3 (0.67 scores 1; 0.99 scores 1; 1.0 scores 2; 1.49 scores 2; 1.5 scores 3). magent does not assay LDH.","required":true,"example":"0.5"},{"in":"query","name":"wbc_k_ul","type":"number","description":"WBC in 10^3/µL (same as 10^9/L). Provide wbc_k_ul or wbc_ul, not both. Range 0.01-500. Converted to ×10^9/L: <6.7 scores 0; 6.7–<10 scores 1; 10–<15 scores 2; ≥15 scores 3 (6.7 scores 1; 9.999 scores 1; 10 scores 2; 14.999 scores 2; 15 scores 3).","required":false,"example":"5"},{"in":"query","name":"wbc_ul","type":"number","description":"WBC in cells/µL (same as cells/mm^3). Provide wbc_k_ul or wbc_ul, not both. Range 10-500000. Converted to ×10^9/L (= wbc_ul/1000): <6.7 scores 0; 6.7–<10 scores 1; 10–<15 scores 2; ≥15 scores 3 (6.7 scores 1; 9.999 scores 1; 10 scores 2; 14.999 scores 2; 15 scores 3).","required":false,"example":"5000"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_ecog","message":"ecog must be an integer from 0 to 4 (Shipp 1993 IPI). Returned before settlement; you are not charged.","status":400},{"code":"invalid_ldh_ratio","message":"ldh_uln_ratio must be a number from 0.1 to 20 (Hoster 2008 simplified MIPI). Returned before settlement; you are not charged.","status":400},{"code":"invalid_wbc","message":"wbc_k_ul (0.01-500) or wbc_ul (10-500000) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/mipi","citation":{"authors":"Hoster E, Dreyling M, Klapper W, et al.","doi":"10.1182/blood-2007-06-095331","id":"hoster-2008","pmid":"17962512","source":"Blood. 2008;111(2):558-565","title":"A new prognostic index (MIPI) for patients with advanced-stage mantle cell lymphoma","url":"https://doi.org/10.1182/blood-2007-06-095331"},"formula_expression":"simplified MIPI = age (<50 0, 50–59 1, 60–69 2, ≥70 3) + ECOG (0–1 0, 2–4 2) + LDH/ULN (<0.67 0, 0.67–<1.0 1, 1.0–<1.5 2, ≥1.5 3) + WBC ×10^9/L (<6.7 0, 6.7–<10 1, 10–<15 2, ≥15 3); Hoster 2008; max 11; low 0-3, intermediate 4-5, high 6-11","purpose":"Sum the Hoster 2008 simplified MIPI (mantle cell lymphoma international prognostic index) from age, ECOG, LDH/ULN, and WBC and return low (0–3), intermediate (4–5), or high (6–11).","markdown_url":"https://magentlab.com/docs/mipi.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"mipi"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Simplified MIPI points 0-11"},{"name":"max_score","type":"integer","description":"Always 11"},{"name":"risk_group","type":"string","description":"low when score is 0-3, intermediate when 4-5, high when 6-11 (Hoster 2008 simplified MIPI). Not a lymphoma diagnosis. Not continuous MIPI. Not MIPI-c."},{"name":"age_years","type":"integer","description":"Age used for the simplified MIPI age bands"},{"name":"ecog","type":"integer","description":"Caller-assigned ECOG 0-4 used for 0–1 vs 2–4"},{"name":"ldh_uln_ratio","type":"number","description":"Caller-assigned LDH/ULN ratio used for scoring"},{"name":"wbc_ul","type":"number","description":"Normalized WBC in cells/µL used for scoring"},{"name":"wbc_10e9_l","type":"number","description":"WBC converted to ×10^9/L (wbc_ul / 1000) for Hoster 2008 simplified MIPI bands"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Hoster 2008 Blood citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"40","ecog":"0","ldh_uln_ratio":"0.5","wbc_k_ul":"5"},{"age":"40","ecog":"0","ldh_uln_ratio":"0.5","wbc_k_ul":"5"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/mipi","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/mipi?age=40&ecog=0&ldh_uln_ratio=0.5&wbc_k_ul=5","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/mipi","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/cll-ipi","description":"CLL-IPI 2016 for chronic lymphocytic leukaemia: TP53 abnormality (del(17p) and/or TP53 mutation) 4, unmutated IGHV 2, beta-2 microglobulin >3.5 mg/L 2, advanced stage (Binet B/C or Rai I–IV) 1, age >65 1; max 10. Low 0–1, intermediate 2–3, high 4–6, very_high 7–10. Deterministic published score with citation; not a CLL diagnosis; not Shipp IPI; not MIPI. magent does not assay TP53, IGHV, or beta-2 microglobulin.","parameters":[{"in":"query","name":"tp53_abnormal","type":"boolean","description":"del(17p) and/or TP53 mutation as assigned by the caller (CLL-IPI 2016). true scores 4. magent does not assay TP53.","required":true,"example":"false"},{"in":"query","name":"ighv_unmutated","type":"boolean","description":"Unmutated IGHV as assigned by the caller (CLL-IPI 2016). true scores 2. magent does not sequence IGHV.","required":true,"example":"false"},{"in":"query","name":"beta2_microglobulin_mg_l","type":"number","description":"Serum beta-2 microglobulin in mg/L (0.2-40). >3.5 scores 2 (CLL-IPI 2016). 3.5 is the ≤3.5 arm and scores 0. magent does not assay beta-2 microglobulin.","required":true,"example":"2.0"},{"in":"query","name":"advanced_stage","type":"boolean","description":"Binet B/C or Rai I–IV as assigned by the caller (CLL-IPI 2016). true scores 1. false is Binet A / Rai 0. magent does not stage CLL.","required":true,"example":"false"},{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Age >65 scores 1 (CLL-IPI 2016). Age 65 is the ≤65 arm and scores 0.","required":true,"example":"50"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_beta2_microglobulin","message":"beta2_microglobulin_mg_l must be a number from 0.2 to 40 (Greipp 2005 ISS). Returned before settlement; you are not charged.","status":400},{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/cll-ipi","citation":{"authors":"International CLL-IPI working group","doi":"10.1016/S1470-2045(16)30029-8","id":"cll-ipi-2016","pmid":"27185642","source":"Lancet Oncol. 2016;17(6):779-790","title":"An international prognostic index for patients with chronic lymphocytic leukaemia (CLL-IPI): a meta-analysis of individual patient data","url":"https://doi.org/10.1016/S1470-2045(16)30029-8"},"formula_expression":"CLL-IPI = tp53_abnormal 4 + ighv_unmutated 2 + beta2_microglobulin_gt_3_5 2 + advanced_stage 1 + age_gt_65 1; International CLL-IPI working group 2016; max 10; low 0-1, intermediate 2-3, high 4-6, very_high 7-10","purpose":"Sum the 2016 CLL-IPI (chronic lymphocytic leukaemia international prognostic index) and return low (0–1), intermediate (2–3), high (4–6), or very_high (7–10).","markdown_url":"https://magentlab.com/docs/cll-ipi.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"cll_ipi"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"CLL-IPI points 0-10"},{"name":"max_score","type":"integer","description":"Always 10"},{"name":"risk_group","type":"string","description":"low when score is 0-1, intermediate when 2-3, high when 4-6, very_high when 7-10 (CLL-IPI 2016). Not a CLL diagnosis. Not Shipp IPI. Not MIPI."},{"name":"age_years","type":"integer","description":"Age used for the >65 criterion"},{"name":"beta2_microglobulin_mg_l","type":"number","description":"Serum beta-2 microglobulin in mg/L used for the >3.5 criterion"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"International CLL-IPI working group Lancet Oncol 2016 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"advanced_stage":"false","age":"50","beta2_microglobulin_mg_l":"2.0","ighv_unmutated":"false","tp53_abnormal":"false"},{"advanced_stage":"false","age":"50","beta2_microglobulin_mg_l":"2.0","ighv_unmutated":"false","tp53_abnormal":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/cll-ipi","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/cll-ipi?tp53_abnormal=false&ighv_unmutated=false&beta2_microglobulin_mg_l=2.0&advanced_stage=false&age=50","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/cll-ipi","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/ips-e","description":"Condoluci 2020 IPS-E for asymptomatic early-stage chronic lymphocytic leukemia: unmutated IGHV 1, ALC >15 ×10^9/L 1, palpable lymph nodes 1; max 3. Low 0, intermediate 1, high 2–3. Time-to-first-treatment score, not a treatment start order; not CLL-IPI, Rai, or Binet. magent does not assay IGHV, count lymphocytes, or palpate nodes.","parameters":[{"in":"query","name":"ighv_unmutated","type":"boolean","description":"Unmutated IGHV as assigned by the caller (Condoluci 2020 IPS-E). true scores 1. magent does not sequence IGHV.","required":true,"example":"false"},{"in":"query","name":"alc_k_ul","type":"number","description":"Absolute lymphocyte count in ×10^9/L (0.1-500). >15 scores 1 (Condoluci 2020 IPS-E). 15.0 is the ≤15 arm and scores 0. magent does not count lymphocytes.","required":true,"example":"10"},{"in":"query","name":"palpable_lymph_nodes","type":"boolean","description":"Palpable lymph nodes as assigned by the caller (Condoluci 2020 IPS-E). true scores 1. magent does not palpate lymph nodes.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_alc","message":"alc_k_ul must be a number from 0.1 to 500 (absolute lymphocyte count ×10^9/L; Condoluci 2020 IPS-E). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/ips-e","citation":{"authors":"Condoluci A, Terzi di Bergamo L, Langerbeins P, Hoechstetter MA, Herling CD, et al.","doi":"10.1182/blood.2019003453","id":"condoluci-2020","pmid":"32267500","source":"Blood. 2020;135(21):1859-1869","title":"International prognostic score for asymptomatic early-stage chronic lymphocytic leukemia","url":"https://doi.org/10.1182/blood.2019003453"},"formula_expression":"IPS-E = ighv_unmutated 1 + alc_gt_15 1 + palpable_lymph_nodes 1; Condoluci 2020; max 3; low 0, intermediate 1, high 2-3","purpose":"Sum the 2020 IPS-E (international prognostic score for asymptomatic early-stage chronic lymphocytic leukemia) and return low (0), intermediate (1), or high (2–3).","markdown_url":"https://magentlab.com/docs/ips-e.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"ips_e"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"IPS-E points 0-3"},{"name":"max_score","type":"integer","description":"Always 3"},{"name":"ips_e_risk","type":"string","description":"low when score is 0, intermediate when 1, high when 2-3 (Condoluci 2020 IPS-E). Not a CLL diagnosis. Not CLL-IPI. Not Rai. Not Binet. Not a treatment start order."},{"name":"alc_k_ul","type":"number","description":"Absolute lymphocyte count in ×10^9/L used for the >15 criterion"},{"name":"ighv_unmutated","type":"boolean","description":"Caller-assigned unmutated IGHV flag used for the 1-point criterion"},{"name":"palpable_lymph_nodes","type":"boolean","description":"Caller-assigned palpable lymph-node flag used for the 1-point criterion"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Condoluci et al. Blood 2020 IPS-E citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"alc_k_ul":"10","ighv_unmutated":"false","palpable_lymph_nodes":"false"},{"alc_k_ul":"10","ighv_unmutated":"false","palpable_lymph_nodes":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/ips-e","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/ips-e?ighv_unmutated=false&alc_k_ul=10&palpable_lymph_nodes=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/ips-e","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/binet","description":"Binet 1981 CLL staging. Stage C if anemia (Hb <10 g/dL) or thrombocytopenia (platelets <100×10^9/L), regardless of lymphoid areas. Else stage B when involved_areas is 3-5, else stage A when 0-2. The five areas are cervical, axillary, and inguinal (unilateral or bilateral counts as one area each), plus spleen, plus liver; the caller assigns the count. Not a medical device, not a CLL diagnosis, and not Rai staging (Rai anemia is Hb <11).","parameters":[{"in":"query","name":"anemia_hb_lt_10","type":"boolean","description":"Hb <10 g/dL as assigned by the caller (Binet 1981 stage C cutoff is 10 g/dL, not Rai 11). true or false. magent does not assay hemoglobin.","required":true,"example":"false"},{"in":"query","name":"thrombocytopenia_plt_lt_100","type":"boolean","description":"Platelets <100×10^9/L as assigned by the caller (Binet 1981 stage C). true or false. magent does not count platelets.","required":true,"example":"false"},{"in":"query","name":"involved_areas","type":"integer","description":"Count of involved Binet lymphoid areas (integer 0-5) as assigned by the caller after Binet 1981: cervical, axillary, and inguinal (unilateral or bilateral counts as one area each), plus spleen, plus liver. magent does not examine the patient or count lymph-node areas.","required":true,"example":"1"}],"errors":[{"code":"invalid_binet","message":"anemia_hb_lt_10 and thrombocytopenia_plt_lt_100 must be true or false (Binet 1981). Returned before settlement; you are not charged.","status":400},{"code":"invalid_involved_areas","message":"involved_areas must be an integer from 0 to 5 (Binet 1981 five lymphoid areas). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/binet","citation":{"authors":"Binet JL, Auquier A, Dighiero G, et al.","doi":"10.1002/1097-0142(19810701)48:1<198::AID-CNCR2820480131>3.0.CO;2-V","id":"binet-1981","pmid":"7237385","source":"Cancer. 1981;48(1):198-206","title":"A new prognostic classification of chronic lymphocytic leukemia derived from a multivariate survival analysis","url":"https://doi.org/10.1002/1097-0142(19810701)48:1<198::AID-CNCR2820480131>3.0.CO;2-V"},"formula_expression":"Binet C if anemia_hb_lt_10 or thrombocytopenia_plt_lt_100; else B if involved_areas >= 3; else A (involved_areas 0-2) (Binet 1981)","purpose":"Apply Binet 1981 chronic lymphocytic leukemia staging and return stage A, B, or C from caller-assigned anemia (Hb <10 g/dL), thrombocytopenia (platelets <100×10^9/L), and involved lymphoid areas (0-5).","markdown_url":"https://magentlab.com/docs/binet.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"binet"},{"name":"formula_expression","type":"string","description":"Binet 1981: C if anemia (Hb <10) or thrombocytopenia (plt <100); else B if involved_areas >= 3; else A"},{"name":"binet_stage","type":"string","description":"A, B, or C (Binet 1981). Not Rai. No A/B/C substages."},{"name":"involved_areas","type":"integer","description":"Echo of the caller-assigned Binet five-area count (0-5)"},{"name":"anemia_hb_lt_10","type":"boolean","description":"Echo of the caller-assigned Hb <10 g/dL flag"},{"name":"thrombocytopenia_plt_lt_100","type":"boolean","description":"Echo of the caller-assigned platelets <100×10^9/L flag"},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met for anemia_hb_lt_10, thrombocytopenia_plt_lt_100, and involved_areas_ge_3"},{"name":"citation","type":"object","description":"Binet 1981 Cancer citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"anemia_hb_lt_10":"false","involved_areas":"1","thrombocytopenia_plt_lt_100":"false"},{"anemia_hb_lt_10":"false","involved_areas":"1","thrombocytopenia_plt_lt_100":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/binet","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/binet?anemia_hb_lt_10=false&thrombocytopenia_plt_lt_100=false&involved_areas=1","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/binet","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rai","description":"Rai 1975 original CLL staging (stages 0-IV). Returns rai_stage 0-4 from caller-assigned lymphadenopathy, hepatosplenomegaly (spleen or liver or both), anemia (Hb <11 g/dL), and thrombocytopenia (platelets <100,000/mm3). Highest applicable: thrombocytopenia 4, else anemia 3, else organomegaly 2, else nodes 1, else 0 (lymphocytosis only). Not a CLL diagnosis; magent does not examine the patient or read a CBC. Not modified Rai. Not Binet (Binet C is Hb <10).","parameters":[{"in":"query","name":"lymphadenopathy","type":"boolean","description":"Lymphadenopathy as assigned by the caller (Rai 1975 stage I when this is the highest finding). true or false. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"hepatosplenomegaly","type":"boolean","description":"Enlarged spleen or liver or both as assigned by the caller (Rai 1975 stage II). true or false. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"anemia_hb_lt_11","type":"boolean","description":"Anemia as assigned by the caller using the Rai 1975 cutoff hemoglobin <11 g/dL (hematocrit <33% is the same clinical call). true or false. magent does not read a CBC.","required":true,"example":"false"},{"in":"query","name":"thrombocytopenia_plt_lt_100","type":"boolean","description":"Thrombocytopenia as assigned by the caller using the Rai 1975 cutoff platelets <100,000/mm3 (<100×10^9/L). true or false. magent does not read a CBC.","required":true,"example":"false"}],"errors":[{"code":"invalid_rai","message":"each Rai 1975 staging flag must be true or false. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rai","citation":{"authors":"Rai KR, Sawitsky A, Cronkite EP, Chanana AD, Levy RN, Pasternack BS","doi":"10.1182/blood.v46.2.219.219","id":"rai-1975","pmid":"1139039","source":"Blood. 1975;46(2):219-234","title":"Clinical staging of chronic lymphocytic leukemia","url":"https://doi.org/10.1182/blood.v46.2.219.219"},"formula_expression":"rai_stage = 4 if thrombocytopenia_plt_lt_100; else 3 if anemia_hb_lt_11; else 2 if hepatosplenomegaly; else 1 if lymphadenopathy; else 0 (lymphocytosis only). Original Rai 1975 stages 0-IV. Not modified Rai. Not Binet.","purpose":"Apply Rai 1975 original clinical staging of chronic lymphocytic leukemia and return rai_stage 0-4 from four caller-assigned flags.","markdown_url":"https://magentlab.com/docs/rai.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rai"},{"name":"formula_expression","type":"string","description":"Rai 1975 highest applicable stage: thrombocytopenia 4, else anemia 3, else hepatosplenomegaly 2, else lymphadenopathy 1, else 0"},{"name":"rai_stage","type":"integer","description":"Original Rai 1975 stage 0, 1, 2, 3, or 4. Not modified Rai. Not Binet."},{"name":"lymphadenopathy","type":"boolean","description":"Echo of the caller-assigned lymphadenopathy flag"},{"name":"hepatosplenomegaly","type":"boolean","description":"Echo of the caller-assigned spleen-or-liver enlargement flag"},{"name":"anemia_hb_lt_11","type":"boolean","description":"Echo of the caller-assigned anemia flag (Rai 1975 Hb <11 g/dL)"},{"name":"thrombocytopenia_plt_lt_100","type":"boolean","description":"Echo of the caller-assigned thrombocytopenia flag (platelets <100,000/mm3)"},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met in tree order: thrombocytopenia, anemia, hepatosplenomegaly, lymphadenopathy"},{"name":"citation","type":"object","description":"Rai 1975 Blood citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"anemia_hb_lt_11":"false","hepatosplenomegaly":"false","lymphadenopathy":"false","thrombocytopenia_plt_lt_100":"false"},{"anemia_hb_lt_11":"false","hepatosplenomegaly":"false","lymphadenopathy":"false","thrombocytopenia_plt_lt_100":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rai","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rai?lymphadenopathy=false&hepatosplenomegaly=false&anemia_hb_lt_11=false&thrombocytopenia_plt_lt_100=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rai","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/hct-ci","description":"Sorror 2005 HCT-specific comorbidity index. Seventeen caller-assigned comorbidities with published weights 1, 2, or 3 (max 26). Pulmonary moderate vs severe and hepatic mild vs moderate/severe are mutually exclusive. Risk groups: 0 low, 1–2 intermediate, ≥3 high. Caller supplies the published category; magent does not interpret PFTs or echo and does not list for transplant. Not Charlson. Not a diagnosis. Not a medical device.","parameters":[{"in":"query","name":"arrhythmia","type":"boolean","description":"Arrhythmia as assigned by the caller (Sorror 2005: atrial fibrillation or flutter, sick sinus syndrome, or ventricular arrhythmias). true scores 1. magent does not diagnose arrhythmia.","required":true,"example":"false"},{"in":"query","name":"cardiac","type":"boolean","description":"Cardiac comorbidity as assigned by the caller (Sorror 2005: coronary artery disease, congestive heart failure, myocardial infarction, or ejection fraction ≤50%). true scores 1. magent does not interpret echo or diagnose cardiac disease.","required":true,"example":"false"},{"in":"query","name":"inflammatory_bowel_disease","type":"boolean","description":"Inflammatory bowel disease as assigned by the caller (Sorror 2005: Crohn disease or ulcerative colitis). true scores 1. magent does not diagnose IBD.","required":true,"example":"false"},{"in":"query","name":"diabetes","type":"boolean","description":"Diabetes requiring insulin or oral hypoglycemics, not diet alone, as assigned by the caller (Sorror 2005). true scores 1. magent does not diagnose diabetes.","required":true,"example":"false"},{"in":"query","name":"cerebrovascular_disease","type":"boolean","description":"Cerebrovascular disease as assigned by the caller (Sorror 2005: TIA or cerebrovascular accident). true scores 1. magent does not diagnose stroke or TIA.","required":true,"example":"false"},{"in":"query","name":"psychiatric_disturbance","type":"boolean","description":"Psychiatric disturbance as assigned by the caller (Sorror 2005: depression or anxiety requiring psychiatric consult or treatment). true scores 1. magent does not diagnose psychiatric disease.","required":true,"example":"false"},{"in":"query","name":"mild_hepatic","type":"boolean","description":"Mild hepatic comorbidity as assigned by the caller (Sorror 2005: chronic hepatitis, bilirubin >ULN to 1.5×ULN, or AST/ALT >ULN to 2.5×ULN). true scores 1. Mutually exclusive with moderate_severe_hepatic. magent does not grade liver tests.","required":true,"example":"false"},{"in":"query","name":"obesity","type":"boolean","description":"Obesity as assigned by the caller (Sorror 2005: body mass index >35 kg/m²). true scores 1. magent does not compute BMI.","required":true,"example":"false"},{"in":"query","name":"infection","type":"boolean","description":"Infection requiring continuation of antimicrobial treatment after day 0 as assigned by the caller (Sorror 2005). true scores 1. magent does not diagnose infection.","required":true,"example":"false"},{"in":"query","name":"rheumatologic","type":"boolean","description":"Rheumatologic comorbidity as assigned by the caller (Sorror 2005: SLE, RA, polymyositis, mixed CTD, or polymyalgia rheumatica). true scores 2. magent does not diagnose rheumatologic disease.","required":true,"example":"false"},{"in":"query","name":"peptic_ulcer","type":"boolean","description":"Peptic ulcer requiring treatment as assigned by the caller (Sorror 2005). true scores 2. magent does not diagnose ulcer disease.","required":true,"example":"false"},{"in":"query","name":"moderate_severe_renal","type":"boolean","description":"Moderate/severe renal comorbidity as assigned by the caller (Sorror 2005: serum creatinine >2 mg/dL, dialysis, or prior renal transplantation). true scores 2. magent does not grade kidney disease from creatinine.","required":true,"example":"false"},{"in":"query","name":"moderate_pulmonary","type":"boolean","description":"Moderate pulmonary comorbidity as assigned by the caller (Sorror 2005: DLco and/or FEV1 66%–80% or dyspnea on slight activity). true scores 2. Mutually exclusive with severe_pulmonary. magent does not interpret PFTs.","required":true,"example":"false"},{"in":"query","name":"prior_solid_tumor","type":"boolean","description":"Prior solid tumor treated at any time, excluding nonmelanoma skin cancer, as assigned by the caller (Sorror 2005). true scores 3. magent does not diagnose cancer.","required":true,"example":"false"},{"in":"query","name":"heart_valve_disease","type":"boolean","description":"Heart valve disease except mitral valve prolapse as assigned by the caller (Sorror 2005). true scores 3. magent does not interpret echo.","required":true,"example":"false"},{"in":"query","name":"severe_pulmonary","type":"boolean","description":"Severe pulmonary comorbidity as assigned by the caller (Sorror 2005: DLco and/or FEV1 ≤65% or dyspnea at rest or requiring oxygen). true scores 3. Mutually exclusive with moderate_pulmonary. magent does not interpret PFTs.","required":true,"example":"false"},{"in":"query","name":"moderate_severe_hepatic","type":"boolean","description":"Moderate/severe hepatic comorbidity as assigned by the caller (Sorror 2005: cirrhosis, bilirubin >1.5×ULN, or AST/ALT >2.5×ULN). true scores 3. Mutually exclusive with mild_hepatic. magent does not grade liver tests.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_hct_ci","message":"each HCT-CI 2005 comorbidity must be scored as in Sorror 2005. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/hct-ci","citation":{"authors":"Sorror ML, Maris MB, Storb R, et al.","doi":"10.1182/blood-2005-05-2004","id":"sorror-2005","pmid":"15994282","source":"Blood. 2005;106(9):2912-2919","title":"Hematopoietic cell transplantation (HCT)-specific comorbidity index: a new tool for risk assessment before allogeneic HCT","url":"https://doi.org/10.1182/blood-2005-05-2004"},"formula_expression":"HCT-CI = arrhythmia 1 + cardiac 1 + inflammatory_bowel_disease 1 + diabetes 1 + cerebrovascular_disease 1 + psychiatric_disturbance 1 + mild_hepatic 1 + obesity 1 + infection 1 + rheumatologic 2 + peptic_ulcer 2 + moderate_severe_renal 2 + moderate_pulmonary 2 + prior_solid_tumor 3 + heart_valve_disease 3 + severe_pulmonary 3 + moderate_severe_hepatic 3; Sorror 2005 HCT-CI weights; max 26; pulmonary moderate vs severe exclusive; hepatic mild vs moderate/severe exclusive; risk groups 0 low / 1-2 intermediate / >=3 high","purpose":"Sum the Sorror 2005 HCT-specific comorbidity index weights and return low (0), intermediate (1–2), or high (≥3).","markdown_url":"https://magentlab.com/docs/hct-ci.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"hct_ci"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"HCT-CI points 0-26"},{"name":"max_score","type":"integer","description":"26"},{"name":"risk_group","type":"string","description":"low when score is 0, intermediate when 1-2, high when ≥3 (Sorror 2005). A group, not a diagnosis and not a transplant listing."},{"name":"components","type":"array","description":"Per-comorbidity points"},{"name":"citation","type":"object","description":"Sorror et al. Blood 2005 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"arrhythmia":"false","cardiac":"false","cerebrovascular_disease":"false","diabetes":"false","heart_valve_disease":"false","infection":"false","inflammatory_bowel_disease":"false","mild_hepatic":"false","moderate_pulmonary":"false","moderate_severe_hepatic":"false","moderate_severe_renal":"false","obesity":"false","peptic_ulcer":"false","prior_solid_tumor":"false","psychiatric_disturbance":"false","rheumatologic":"false","severe_pulmonary":"false"},{"arrhythmia":"false","cardiac":"false","cerebrovascular_disease":"false","diabetes":"false","heart_valve_disease":"false","infection":"false","inflammatory_bowel_disease":"false","mild_hepatic":"false","moderate_pulmonary":"false","moderate_severe_hepatic":"false","moderate_severe_renal":"false","obesity":"false","peptic_ulcer":"false","prior_solid_tumor":"false","psychiatric_disturbance":"false","rheumatologic":"false","severe_pulmonary":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/hct-ci","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/hct-ci?arrhythmia=false&cardiac=false&inflammatory_bowel_disease=false&diabetes=false&cerebrovascular_disease=false&psychiatric_disturbance=false&mild_hepatic=false&obesity=false&infection=false&rheumatologic=false&peptic_ulcer=false&moderate_severe_renal=false&moderate_pulmonary=false&prior_solid_tumor=false&heart_valve_disease=false&severe_pulmonary=false&moderate_severe_hepatic=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/hct-ci","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/duval-aml","description":"Duval 2010 AML Table 5 (not ALL): PIF or CR1 >6 mo 0 / CR1 <6 mo 1; ECOG/SWOG cyto good/intermediate 0, poor 1; HLA sibling or well/partially matched unrelated 0, mismatched unrelated 1, related other 2; circulating blasts 1; KPS/Lansky <90 1; max 6. Groups 0, 1, 2, ≥3. Caller assigns categories; magent does not karyotype. Not a transplant listing.","parameters":[{"in":"query","name":"disease_group","type":"string","enum":["pif_or_cr1_gt_6mo","cr1_lt_6mo"],"description":"Duval 2010 AML Table 5 disease status as assigned by the caller. pif_or_cr1_gt_6mo is primary induction failure or duration of first CR >6 months and scores 0. cr1_lt_6mo is duration of first CR <6 months and scores 1. magent does not date remissions.","required":true,"example":"pif_or_cr1_gt_6mo"},{"in":"query","name":"cytogenetics","type":"string","enum":["good_or_intermediate","poor"],"description":"ECOG/SWOG cytogenetic risk as assigned by the caller (Duval 2010). poor is −5/del(5q), −7/del(7q), inv(3q), abn11q, 20q or 21q, del(9q), t(6;9), t(9;22), abn17p, or complex (≥3 abnormalities) and scores 1. good_or_intermediate is everything else in that classification and scores 0. magent does not read a karyotype string.","required":true,"example":"good_or_intermediate"},{"in":"query","name":"hla_match","type":"string","enum":["sibling_or_matched_unrelated","mismatched_unrelated","related_other"],"description":"Duval 2010 AML Table 5 donor HLA match as assigned by the caller (not a flattened 0/1 donor flag). sibling_or_matched_unrelated is HLA-identical sibling or well matched or partially matched unrelated and scores 0. mismatched_unrelated scores 1. related_other is related other than HLA-identical sibling and scores 2. magent does not HLA-type.","required":true,"example":"sibling_or_matched_unrelated"},{"in":"query","name":"circulating_blasts","type":"boolean","description":"Circulating blasts present as assigned by the caller (Duval 2010 AML Table 5). true scores 1. magent does not count blasts.","required":true,"example":"false"},{"in":"query","name":"kps_lt_90","type":"boolean","description":"Karnofsky or Lansky <90 as assigned by the caller (Duval 2010 AML Table 5). true scores 1. magent does not collect numeric KPS or Lansky.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_duval","message":"each Duval 2010 AML item must be a published Table 5 category. Returned before settlement; you are not charged.","status":400},{"code":"invalid_hla_match","message":"hla_match must be sibling_or_matched_unrelated, mismatched_unrelated, or related_other (Duval 2010). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/duval-aml","citation":{"authors":"Duval M, Klein JP, He W, et al","doi":"10.1200/JCO.2010.28.8852","id":"duval-2010","pmid":"20625136","source":"J Clin Oncol. 2010;28(23):3730-3738","title":"Hematopoietic stem-cell transplantation for acute leukemia in relapse or primary induction failure","url":"https://doi.org/10.1200/JCO.2010.28.8852"},"formula_expression":"Duval AML Table 5 = disease_group (pif_or_cr1_gt_6mo 0, cr1_lt_6mo 1) + cytogenetics (good_or_intermediate 0, poor 1) + hla_match (sibling_or_matched_unrelated 0, mismatched_unrelated 1, related_other 2) + circulating_blasts 1 + kps_lt_90 1; Duval 2010 AML only (not ALL); max 6; risk_group 0 / 1 / 2 / ge_3","purpose":"Sum the Duval 2010 AML Table 5 points and return risk_group 0, 1, 2, or ge_3 (scores ≥3 share one group).","markdown_url":"https://magentlab.com/docs/duval-aml.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"duval_aml"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Duval 2010 AML Table 5 points 0-6"},{"name":"max_score","type":"integer","description":"6 (1+1+2+1+1)"},{"name":"risk_group","type":"string","description":"0, 1, 2, or ge_3 when score is ≥3 (Duval 2010 Table 5 note). Not a transplant listing. Not a diagnosis. Not the ALL table."},{"name":"disease_group","type":"string","description":"Caller-assigned pif_or_cr1_gt_6mo or cr1_lt_6mo"},{"name":"cytogenetics","type":"string","description":"Caller-assigned good_or_intermediate or poor"},{"name":"hla_match","type":"string","description":"Caller-assigned sibling_or_matched_unrelated, mismatched_unrelated, or related_other"},{"name":"circulating_blasts","type":"boolean","description":"Caller-assigned circulating-blasts flag used"},{"name":"kps_lt_90","type":"boolean","description":"Caller-assigned Karnofsky or Lansky <90 flag used"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Duval et al. J Clin Oncol 2010 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"circulating_blasts":"false","cytogenetics":"good_or_intermediate","disease_group":"pif_or_cr1_gt_6mo","hla_match":"sibling_or_matched_unrelated","kps_lt_90":"false"},{"circulating_blasts":"false","cytogenetics":"good_or_intermediate","disease_group":"pif_or_cr1_gt_6mo","hla_match":"sibling_or_matched_unrelated","kps_lt_90":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/duval-aml","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/duval-aml?disease_group=pif_or_cr1_gt_6mo&cytogenetics=good_or_intermediate&hla_match=sibling_or_matched_unrelated&circulating_blasts=false&kps_lt_90=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/duval-aml","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/ipss-r","description":"Greenberg 2012 IPSS-R for MDS: cytogenetics (very_good 0, good 1, intermediate 2, poor 3, very_poor 4; caller assigns the Schanz subgroup), BM blasts, hemoglobin g/dL, platelets, and ANC; max 10. very_low ≤1.5 through very_high >6. Deterministic published score with citation; not a diagnosis or transplant listing; not IPSS 1997 or IPSS-M. magent does not karyotype.","parameters":[{"in":"query","name":"cytogenetics","type":"string","enum":["very_good","good","intermediate","poor","very_poor"],"description":"Schanz/Greenberg 2012 cytogenetic subgroup as assigned by the caller (very_good 0, good 1, intermediate 2, poor 3, very_poor 4). magent does not karyotype.","required":true,"example":"good"},{"in":"query","name":"blasts_percent","type":"number","description":"Bone-marrow blasts as a percent (0-30). Greenberg 2012: ≤2 → 0; >2 and <5 → 1; 5–10 → 2; >10 → 3. magent does not count blasts.","required":true,"example":"1"},{"in":"query","name":"hemoglobin_g_dl","type":"number","description":"Hemoglobin in g/dL (3-20). Greenberg 2012: ≥10 → 0; 8 to <10 → 1; <8 → 1.5. magent does not assay hemoglobin.","required":true,"example":"12"},{"in":"query","name":"platelets_10e9_l","type":"number","description":"Platelets in 10^9/L (0-2000). Greenberg 2012: ≥100 → 0; 50 to <100 → 0.5; <50 → 1. magent does not assay platelets.","required":true,"example":"150"},{"in":"query","name":"anc_10e9_l","type":"number","description":"Absolute neutrophil count in 10^9/L (0-50). Greenberg 2012: ≥0.8 → 0; <0.8 → 0.5. magent does not compute ANC.","required":true,"example":"2.0"}],"errors":[{"code":"invalid_ipss_cytogenetics","message":"cytogenetics must be very_good, good, intermediate, poor, or very_poor (Greenberg 2012). Returned before settlement; you are not charged.","status":400},{"code":"invalid_ipss_r","message":"blasts_percent 0-30, hemoglobin_g_dl 3-20, platelets_10e9_l 0-2000, and anc_10e9_l 0-50 (IPSS-R 2012 labs; magent clamps, not Greenberg cutoffs). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/ipss-r","citation":{"authors":"Greenberg PL, Tuechler H, Schanz J, et al.","doi":"10.1182/blood-2012-03-420489","id":"greenberg-2012","pmid":"22740453","source":"Blood. 2012;120(12):2454-2465","title":"Revised international prognostic scoring system for myelodysplastic syndromes","url":"https://doi.org/10.1182/blood-2012-03-420489"},"formula_expression":"IPSS-R = cytogenetics (very_good 0, good 1, intermediate 2, poor 3, very_poor 4) + BM blasts % (≤2 → 0; >2–<5 → 1; 5–10 → 2; >10 → 3) + hemoglobin g/dL (≥10 → 0; 8–<10 → 1; <8 → 1.5) + platelets 10^9/L (≥100 → 0; 50–<100 → 0.5; <50 → 1) + ANC 10^9/L (≥0.8 → 0; <0.8 → 0.5); Greenberg 2012; max 10; ≤1.5 very_low, >1.5–3 low, >3–4.5 intermediate, >4.5–6 high, >6 very_high","purpose":"Sum the Greenberg 2012 IPSS-R (revised international prognostic scoring system) for myelodysplastic syndromes and return very_low (≤1.5), low (>1.5–3), intermediate (>3–4.5), high (>4.5–6), or very_high (>6).","markdown_url":"https://magentlab.com/docs/ipss-r.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"ipss_r"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"number","description":"IPSS-R points 0-10 (half-points allowed)"},{"name":"max_score","type":"integer","description":"Always 10 (4+3+1.5+1+0.5)"},{"name":"risk_group","type":"string","description":"very_low when score is ≤1.5, low when >1.5–3, intermediate when >3–4.5, high when >4.5–6, very_high when >6 (Greenberg 2012). Not an MDS diagnosis. Not IPSS 1997. Not IPSS-M. Not a transplant listing."},{"name":"cytogenetics","type":"string","description":"Caller-assigned Schanz/Greenberg subgroup used"},{"name":"blasts_percent","type":"number","description":"Bone-marrow blast percent used"},{"name":"hemoglobin_g_dl","type":"number","description":"Hemoglobin in g/dL used"},{"name":"platelets_10e9_l","type":"number","description":"Platelets in 10^9/L used"},{"name":"anc_10e9_l","type":"number","description":"ANC in 10^9/L used"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Greenberg et al. Blood 2012 IPSS-R citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"anc_10e9_l":"2.0","blasts_percent":"1","cytogenetics":"good","hemoglobin_g_dl":"12","platelets_10e9_l":"150"},{"anc_10e9_l":"2.0","blasts_percent":"1","cytogenetics":"good","hemoglobin_g_dl":"12","platelets_10e9_l":"150"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/ipss-r","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/ipss-r?cytogenetics=good&blasts_percent=1&hemoglobin_g_dl=12&platelets_10e9_l=150&anc_10e9_l=2.0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/ipss-r","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/dipss","description":"Passamonti 2010 DIPSS for primary myelofibrosis: age >65 (1), WBC >25×10^9/L (1), hemoglobin <10 g/dL (2), peripheral-blood blasts ≥1% (1), constitutional symptoms (1); max 6. Low 0, intermediate_1 1–2, intermediate_2 3–4, high 5–6. Not DIPSS Plus or aaDIPSS. magent does not read a smear; constitutional symptoms are caller-assigned.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Age >65 scores 1 (Passamonti 2010 Table 3). Age 65 is the ≤65 arm and scores 0.","required":true,"example":"50"},{"in":"query","name":"hemoglobin_g_dl","type":"number","description":"Hemoglobin in g/dL (3-20). <10 scores 2 (Passamonti 2010 Table 3; anemia HR 4.18). 10.0 is the ≥10 arm and scores 0. magent does not assay hemoglobin.","required":true,"example":"12"},{"in":"query","name":"wbc_10e9_l","type":"number","description":"White-cell count in 10^9/L (0.1-500). >25 scores 1 (Passamonti 2010 Table 3). 25.0 is the ≤25 arm and scores 0. magent does not assay WBC.","required":true,"example":"10"},{"in":"query","name":"blasts_percent","type":"number","description":"Peripheral-blood blasts as a percent (0-30). ≥1 scores 1 (Passamonti 2010 Table 3). 0.9 is the <1 arm and scores 0. magent does not read a smear.","required":true,"example":"0"},{"in":"query","name":"constitutional_symptoms","type":"boolean","description":"Weight loss >10% in 6 months, night sweats, or unexplained fever >37.5°C as assigned by the caller (Passamonti 2010 methods). true scores 1. magent does not take a history.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_dipss","message":"hemoglobin_g_dl 3-20, wbc_10e9_l 0.1-500, and blasts_percent 0-30 (Passamonti 2010 DIPSS labs; magent clamps, not paper ranges). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/dipss","citation":{"authors":"Passamonti F, Cervantes F, Vannucchi AM, et al.","doi":"10.1182/blood-2009-09-245837","id":"passamonti-2010","pmid":"20008785","source":"Blood. 2010;115(9):1703-1708","title":"A dynamic prognostic model to predict survival in primary myelofibrosis: a study by the IWG-MRT (International Working Group for Myeloproliferative Neoplasms Research and Treatment)","url":"https://doi.org/10.1182/blood-2009-09-245837"},"formula_expression":"DIPSS = age_gt_65 1 + wbc_gt_25 1 + hemoglobin_lt_10 2 + blasts_ge_1 1 + constitutional_symptoms 1; Passamonti 2010 Table 3; max 6; low 0, intermediate_1 1-2, intermediate_2 3-4, high 5-6","purpose":"Sum the Passamonti 2010 DIPSS (dynamic international prognostic scoring system) for primary myelofibrosis and return low (0), intermediate_1 (1–2), intermediate_2 (3–4), or high (5–6).","markdown_url":"https://magentlab.com/docs/dipss.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"dipss"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"DIPSS points 0-6"},{"name":"max_score","type":"integer","description":"Always 6 (1+1+2+1+1)"},{"name":"risk_group","type":"string","description":"low when score is 0, intermediate_1 when 1-2, intermediate_2 when 3-4, high when 5-6 (Passamonti 2010 Table 3). Not a myelofibrosis diagnosis. Not DIPSS Plus. Not aaDIPSS."},{"name":"age_years","type":"integer","description":"Age used for the >65 criterion"},{"name":"hemoglobin_g_dl","type":"number","description":"Hemoglobin in g/dL used for the <10 criterion"},{"name":"wbc_10e9_l","type":"number","description":"WBC in 10^9/L used for the >25 criterion"},{"name":"blasts_percent","type":"number","description":"Peripheral-blood blast percent used for the ≥1 criterion"},{"name":"constitutional_symptoms","type":"boolean","description":"Caller-assigned constitutional-symptoms flag used"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Passamonti et al. Blood 2010 DIPSS citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"50","blasts_percent":"0","constitutional_symptoms":"false","hemoglobin_g_dl":"12","wbc_10e9_l":"10"},{"age":"50","blasts_percent":"0","constitutional_symptoms":"false","hemoglobin_g_dl":"12","wbc_10e9_l":"10"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/dipss","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/dipss?age=50&hemoglobin_g_dl=12&wbc_10e9_l=10&blasts_percent=0&constitutional_symptoms=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/dipss","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/gipss","description":"Tefferi 2018 GIPSS for primary myelofibrosis: karyotype (favorable 0, unfavorable 1, VHR 2; caller assigns the three-tier class), absence of type 1/like CALR 1, ASXL1 1, SRSF2 1, U2AF1Q157 1 (not S34); max 6. Low 0, intermediate_1 1, intermediate_2 2, high ≥3. Published median (5-year) survivals 26.4 y (94%), 8.0 y (73%), 4.2 y (40%), 2 y (14%). Not DIPSS or MIPSS70-plus. magent does not karyotype or sequence.","parameters":[{"in":"query","name":"karyotype","type":"string","enum":["favorable","unfavorable","vhr"],"description":"Tefferi 2018 revised three-tier karyotype as assigned by the caller (mutually exclusive). favorable is a normal karyotype or sole 13q−, +9, 20q−, chromosome 1 translocation/duplication, or sex chromosome abnormality including −Y and scores 0. unfavorable is all other abnormalities and scores 1. vhr is very high risk: single/multiple −7, i(17q), inv(3)/3q21, 12p−/12p11.2, 11q−/11q23, +21, or other autosomal trisomies not including +8/+9 and scores 2. magent does not karyotype.","required":true,"example":"favorable"},{"in":"query","name":"calr_type1_like","type":"boolean","description":"Presence of a type 1/like CALR mutation as assigned by the caller (Tefferi 2018). false (absence) scores 1. true scores 0. Type 2/like CALR, JAK2, MPL, and triple-negative are absence of type 1/like CALR. magent does not sequence.","required":true,"example":"true"},{"in":"query","name":"asxl1_mutated","type":"boolean","description":"ASXL1 mutation as assigned by the caller (Tefferi 2018). true scores 1. magent does not sequence.","required":true,"example":"false"},{"in":"query","name":"srsf2_mutated","type":"boolean","description":"SRSF2 mutation as assigned by the caller (Tefferi 2018). true scores 1. magent does not sequence.","required":true,"example":"false"},{"in":"query","name":"u2af1_q157_mutated","type":"boolean","description":"U2AF1 Q157 mutation (Q157P or Q157R) as assigned by the caller (Tefferi 2018). true scores 1. U2AF1 S34 does not score. magent does not sequence.","required":true,"example":"false"}],"errors":[{"code":"invalid_gipss_karyotype","message":"karyotype must be favorable, unfavorable, or vhr (Tefferi 2018 GIPSS revised cytogenetic tiers). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/gipss","citation":{"authors":"Tefferi A, Guglielmelli P, Nicolosi M, Mannelli F, Mudireddy M, Bartalucci N, Finke CM, Lasho TL, Hanson CA, Ketterling RP, Begna KH, Gangat N, Pardanani A, Vannucchi AM","doi":"10.1038/s41375-018-0107-z","id":"tefferi-2018","pmid":"29654267","source":"Leukemia. 2018;32(7):1631-1642","title":"GIPSS: genetically inspired prognostic scoring system for primary myelofibrosis","url":"https://doi.org/10.1038/s41375-018-0107-z"},"formula_expression":"GIPSS = karyotype (favorable 0, unfavorable 1, vhr 2) + absence of type 1/like CALR 1 + asxl1_mutated 1 + srsf2_mutated 1 + u2af1_q157_mutated 1; Tefferi 2018; max 6; low 0, intermediate_1 1, intermediate_2 2, high ≥3","purpose":"Sum the Tefferi 2018 GIPSS (genetically inspired prognostic scoring system) for primary myelofibrosis and return low (0), intermediate_1 (1), intermediate_2 (2), or high (≥3).","markdown_url":"https://magentlab.com/docs/gipss.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"gipss"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"GIPSS points 0-6"},{"name":"max_score","type":"integer","description":"Always 6 (2+1+1+1+1)"},{"name":"risk_group","type":"string","description":"low when score is 0, intermediate_1 when 1, intermediate_2 when 2, high when ≥3 (Tefferi 2018). Not a PMF diagnosis. Not DIPSS. Not MIPSS70-plus."},{"name":"karyotype","type":"string","description":"Caller-assigned three-tier karyotype used (favorable, unfavorable, or vhr)"},{"name":"calr_type1_like","type":"boolean","description":"Caller-assigned type 1/like CALR flag used"},{"name":"asxl1_mutated","type":"boolean","description":"Caller-assigned ASXL1 mutation flag used"},{"name":"srsf2_mutated","type":"boolean","description":"Caller-assigned SRSF2 mutation flag used"},{"name":"u2af1_q157_mutated","type":"boolean","description":"Caller-assigned U2AF1 Q157 mutation flag used (not S34)"},{"name":"median_survival_years","type":"number","description":"Tefferi 2018 published median overall survival in years for this GIPSS band (low 26.4, intermediate_1 8.0, intermediate_2 4.2, high 2). Cohort figure, not a patient-specific prediction."},{"name":"five_year_survival_percent","type":"integer","description":"Tefferi 2018 published 5-year survival percent for this GIPSS band (low 94, intermediate_1 73, intermediate_2 40, high 14). Cohort figure, not a patient-specific prediction."},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Tefferi et al. Leukemia 2018 GIPSS citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"asxl1_mutated":"false","calr_type1_like":"true","karyotype":"favorable","srsf2_mutated":"false","u2af1_q157_mutated":"false"},{"asxl1_mutated":"false","calr_type1_like":"true","karyotype":"favorable","srsf2_mutated":"false","u2af1_q157_mutated":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/gipss","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/gipss?karyotype=favorable&calr_type1_like=true&asxl1_mutated=false&srsf2_mutated=false&u2af1_q157_mutated=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/gipss","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/icc-pmf","description":"ICC 2022 prefibrotic and overt PMF (Arber 2022). Diagnosed iff 3 majors and ≥1 minor. Majors: megakaryocyte morphology, not another myeloid neoplasm, JAK2/CALR/MPL or other clone or no reactive fibrosis. Minors: anemia not from comorbidity, WBC ≥11e9/L, splenomegaly, LDH above ULN; leukoerythroblastosis counts only in overt PMF. Not DIPSS, MIPSS70, WHO 5th, or post-PV/post-ET MF. magent does not read fibrosis grade or sequence drivers. Not a diagnosis or medical device.","parameters":[{"in":"query","name":"phenotype","type":"string","enum":["pre","overt"],"description":"pre (prefibrotic/early PMF) or overt (overt fibrotic PMF) as assigned by the caller (Arber 2022 ICC). Required. magent does not assign phenotype from a biopsy.","required":true,"example":"pre"},{"in":"query","name":"megakaryocyte_morphology","type":"boolean","description":"Megakaryocytic proliferation and atypia for the chosen phenotype, as assigned by the caller (Arber 2022 ICC PMF major). For pre: without reticulin fibrosis grade >1, with increased age-adjusted cellularity, granulocytic proliferation, and often decreased erythropoiesis. For overt: accompanied by reticulin and/or collagen fibrosis grade 2 or 3. true or false. magent does not read a biopsy.","required":true,"example":"true"},{"in":"query","name":"not_other_myeloid","type":"boolean","description":"Does not meet ICC/WHO criteria for BCR::ABL1-positive CML, PV, ET, MDS, or another defined myeloid neoplasm, as assigned by the caller (Arber 2022 ICC PMF major). true or false. magent does not diagnose those neoplasms.","required":true,"example":"true"},{"in":"query","name":"clonal_or_no_reactive","type":"boolean","description":"JAK2, CALR, or MPL mutation, or another clonal marker, or absence of reactive bone-marrow fibrosis, as assigned by the caller (Arber 2022 ICC PMF major). true or false. magent does not sequence.","required":true,"example":"true"},{"in":"query","name":"anemia_not_comorbid","type":"boolean","description":"Anemia not attributed to a comorbid condition, as assigned by the caller (Arber 2022 ICC PMF minor). true or false. magent does not assay hemoglobin.","required":true,"example":"true"},{"in":"query","name":"leukocytosis_ge_11","type":"boolean","description":"Leukocytosis ≥11 × 10^9/L as assigned by the caller (Arber 2022 ICC PMF minor). true or false. magent does not assay WBC.","required":true,"example":"false"},{"in":"query","name":"splenomegaly","type":"boolean","description":"Palpable splenomegaly as assigned by the caller (Arber 2022 ICC PMF minor). true or false. magent does not examine the spleen.","required":true,"example":"false"},{"in":"query","name":"ldh_above_uln","type":"boolean","description":"LDH above the institutional upper limit of normal as assigned by the caller (Arber 2022 ICC PMF minor). true or false. magent does not assay LDH.","required":true,"example":"false"},{"in":"query","name":"leukoerythroblastosis","type":"boolean","description":"Leukoerythroblastosis as assigned by the caller (Arber 2022 ICC overt-PMF minor). Counts toward minor_count only when phenotype is overt; echoed but not counted when phenotype is pre. true or false. magent does not read a smear.","required":true,"example":"false"}],"errors":[{"code":"invalid_pmf_phenotype","message":"phenotype must be pre or overt (Arber 2022 ICC prefibrotic versus overt primary myelofibrosis). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/icc-pmf","citation":{"authors":"Arber DA, Orazi A, Hasserjian RP, Borowitz MJ, Calvo KR, Kvasnicka HM, Wang SA, Bagg A, Barbui T, Bennett JM, de la Fuente J, et al.","doi":"10.1182/blood.2022015850","id":"arber-2022","pmid":"35767897","source":"Blood. 2022;140(11):1200-1228","title":"International Consensus Classification of Myeloid Neoplasms and Acute Leukemias: integrating morphologic, clinical, and genomic data","url":"https://doi.org/10.1182/blood.2022015850"},"formula_expression":"diagnosed iff three majors and minor_count ≥ 1; majors are megakaryocyte_morphology, not_other_myeloid, and clonal_or_no_reactive; minor_count is anemia_not_comorbid + leukocytosis_ge_11 + splenomegaly + ldh_above_uln + leukoerythroblastosis only when phenotype is overt (Arber 2022 ICC pre-PMF and overt PMF). Not DIPSS. Not WHO 5th. Not post-PV/post-ET myelofibrosis","purpose":"Apply the Arber 2022 International Consensus Classification prefibrotic and overt primary myelofibrosis criteria and return whether all three majors and at least one applicable minor are met. Leukoerythroblastosis counts only for overt PMF.","markdown_url":"https://magentlab.com/docs/icc-pmf.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"icc_pmf"},{"name":"formula_expression","type":"string","description":"Arber 2022 ICC pre-PMF and overt PMF major/minor combination"},{"name":"phenotype","type":"string","description":"pre or overt used"},{"name":"diagnosed","type":"boolean","description":"true iff all three majors and minor_count ≥ 1. Not a diagnosis. Not DIPSS. Not WHO 5th / Khoury. Not post-PV/post-ET myelofibrosis."},{"name":"major_count","type":"integer","description":"Count of megakaryocyte_morphology, not_other_myeloid, and clonal_or_no_reactive that are true"},{"name":"minor_count","type":"integer","description":"Count of anemia_not_comorbid, leukocytosis_ge_11, splenomegaly, and ldh_above_uln that are true, plus leukoerythroblastosis only when phenotype is overt"},{"name":"megakaryocyte_morphology","type":"boolean","description":"Caller-assigned megakaryocyte morphology major for the chosen phenotype"},{"name":"not_other_myeloid","type":"boolean","description":"Caller-assigned not-another-defined-myeloid-neoplasm major used"},{"name":"clonal_or_no_reactive","type":"boolean","description":"Caller-assigned clonal marker or no reactive fibrosis major used"},{"name":"anemia_not_comorbid","type":"boolean","description":"Caller-assigned anemia-not-from-comorbidity minor used"},{"name":"leukocytosis_ge_11","type":"boolean","description":"Caller-assigned leukocytosis ≥11 × 10^9/L minor used"},{"name":"splenomegaly","type":"boolean","description":"Caller-assigned palpable splenomegaly minor used"},{"name":"ldh_above_uln","type":"boolean","description":"Caller-assigned LDH above ULN minor used"},{"name":"leukoerythroblastosis","type":"boolean","description":"Caller-assigned leukoerythroblastosis flag echoed; counted as a minor only when phenotype is overt"},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met for the three majors, four shared minors, leukoerythroblastosis, three_majors, and minor_count_ge_1"},{"name":"citation","type":"object","description":"Arber 2022 Blood ICC PMF citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"anemia_not_comorbid":"true","clonal_or_no_reactive":"true","ldh_above_uln":"false","leukocytosis_ge_11":"false","leukoerythroblastosis":"false","megakaryocyte_morphology":"true","not_other_myeloid":"true","phenotype":"pre","splenomegaly":"false"},{"anemia_not_comorbid":"true","clonal_or_no_reactive":"true","ldh_above_uln":"false","leukocytosis_ge_11":"false","leukoerythroblastosis":"false","megakaryocyte_morphology":"true","not_other_myeloid":"true","phenotype":"pre","splenomegaly":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/icc-pmf","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/icc-pmf?phenotype=pre&megakaryocyte_morphology=true&not_other_myeloid=true&clonal_or_no_reactive=true&anemia_not_comorbid=true&leukocytosis_ge_11=false&splenomegaly=false&ldh_above_uln=false&leukoerythroblastosis=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/icc-pmf","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/mysec-pm","description":"Passamonti 2017 MYSEC-PM for post-PV and post-ET myelofibrosis. Score = 0.15*age + hemoglobin <11 g/dL (2) + circulating blasts ≥3% (2) + CALR-unmutated (2) + platelets <150×10^9/L (1) + constitutional symptoms (1). Low <11, intermediate_1 ≥11 and <14, intermediate_2 ≥14 and <16, high ≥16. Not DIPSS (PMF), not GIPSS, not a transplant listing. magent does not sequence CALR.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (18-120). Adds 0.15 points per year as published (Passamonti 2017). Age stays continuous; the total score is rounded to 2 decimal places.","required":true,"example":"40"},{"in":"query","name":"hemoglobin_g_dl","type":"number","description":"Hemoglobin in g/dL (3-22). Provide this or hemoglobin_g_l, not both. <11 scores 2 (Passamonti 2017). 11.0 is the ≥11 arm and scores 0. magent does not assay hemoglobin.","required":false,"example":"10"},{"in":"query","name":"hemoglobin_g_l","type":"number","description":"Hemoglobin in g/L (30-220). Converted as hemoglobin_g_dl = hemoglobin_g_l / 10. Provide this or hemoglobin_g_dl, not both.","required":false,"example":"100"},{"in":"query","name":"platelets_10e9_l","type":"number","description":"Platelet count in 10^9/L (1-2000). <150 scores 1 (Passamonti 2017). 150.0 is the ≥150 arm and scores 0. magent does not assay platelets.","required":true,"example":"200"},{"in":"query","name":"blasts_percent","type":"number","description":"Circulating blasts as a percent (0-30). ≥3 scores 2 (Passamonti 2017). 2.9 is the <3 arm and scores 0. magent does not read a smear.","required":true,"example":"6"},{"in":"query","name":"calr_unmutated","type":"boolean","description":"CALR-unmutated genotype (JAK2, MPL, or triple-negative) as assigned by the caller (Passamonti 2017). true scores 2. magent does not sequence CALR.","required":true,"example":"false"},{"in":"query","name":"constitutional_symptoms","type":"boolean","description":"Constitutional symptoms as assigned by the caller (Passamonti 2017). true scores 1. magent does not take a history.","required":true,"example":"false"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_hemoglobin","message":"hemoglobin_g_l (30-220) or hemoglobin_g_dl (3-22) is required, not both. Returned before settlement; you are not charged.","status":400},{"code":"invalid_platelets","message":"platelets_10e9_l must be a number from 1 to 2000 Returned before settlement; you are not charged.","status":400},{"code":"invalid_mysec_blasts","message":"blasts_percent must be a number from 0 to 30 (Passamonti 2017 MYSEC-PM circulating blasts; magent clamp). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/mysec-pm","citation":{"authors":"Passamonti F, Giorgino T, Mora B, Guglielmelli P, Rumi E, Maffioli M, Rambaldi A, Caramella M, Komrokji R, Gotlib J, Kiladjian JJ, Cervantes F, Devos T, Palandri F, De Stefano V, Ruggeri M, Silver RT, Benevolo G, Albano F, Caramazza D, Merli M, Pietra D, Casalone R, Rotunno G, Barbui T, Cazzola M, Vannucchi AM","doi":"10.1038/leu.2017.169","id":"passamonti-2017","pmid":"28561069","source":"Leukemia. 2017;31(12):2726-2731","title":"A clinical-molecular prognostic model to predict survival in patients with post polycythemia vera and post essential thrombocythemia myelofibrosis","url":"https://doi.org/10.1038/leu.2017.169"},"formula_expression":"MYSEC-PM = 0.15*age_years + hemoglobin_lt_11 2 + blasts_ge_3 2 + calr_unmutated 2 + platelets_lt_150 1 + constitutional_symptoms 1; Passamonti 2017; low <11, intermediate_1 ≥11 and <14, intermediate_2 ≥14 and <16, high ≥16","purpose":"Sum the Passamonti 2017 MYSEC-PM (myelofibrosis secondary to PV/ET prognostic model) and return low (<11), intermediate_1 (≥11 and <14), intermediate_2 (≥14 and <16), or high (≥16).","markdown_url":"https://magentlab.com/docs/mysec-pm.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"mysec_pm"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"number","description":"MYSEC-PM total rounded to 2 decimal places (0.15*age plus discrete points)"},{"name":"risk_group","type":"string","description":"low when score is <11, intermediate_1 when ≥11 and <14, intermediate_2 when ≥14 and <16, high when ≥16 (Passamonti 2017). Not a PMF/DIPSS result. Not GIPSS. Not a transplant listing."},{"name":"median_os_years","type":"number","description":"Passamonti 2017 cohort median OS in years: null (NR) if low, 9.3 if intermediate_1, 4.4 if intermediate_2, 2.0 if high. Not an individual prediction."},{"name":"age_years","type":"integer","description":"Age used for the 0.15-per-year term"},{"name":"hemoglobin_g_dl","type":"number","description":"Hemoglobin in g/dL used for the <11 criterion (g/L inputs converted / 10)"},{"name":"platelets_10e9_l","type":"number","description":"Platelets in 10^9/L used for the <150 criterion"},{"name":"blasts_percent","type":"number","description":"Circulating blast percent used for the ≥3 criterion"},{"name":"calr_unmutated","type":"boolean","description":"Caller-assigned CALR-unmutated genotype flag used"},{"name":"constitutional_symptoms","type":"boolean","description":"Caller-assigned constitutional-symptoms flag used"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Passamonti et al. Leukemia 2017 MYSEC-PM citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"40","blasts_percent":"6","calr_unmutated":"false","constitutional_symptoms":"false","hemoglobin_g_dl":"10","platelets_10e9_l":"200"},{"age":"40","blasts_percent":"6","calr_unmutated":"false","constitutional_symptoms":"false","hemoglobin_g_dl":"10","platelets_10e9_l":"200"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/mysec-pm","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/mysec-pm?age=40&hemoglobin_g_dl=10&platelets_10e9_l=200&blasts_percent=6&calr_unmutated=false&constitutional_symptoms=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/mysec-pm","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/mipss70","description":"Guglielmelli 2018 MIPSS70 for transplant-age PMF: Hb <10 g/dL (1), leukocytes >25×10^9/L (2), platelets <100×10^9/L (2), blasts ≥2% (1), fibrosis ≥2 (1), symptoms (1), no type 1/like CALR (1), HMR category (1), ≥2 HMR (2); max 12. Low 0–1, intermediate 2–4, high ≥5. Italian-cohort median (5-year) OS 27.7 y (95%), 7.1 y (70%), 2.3 y (29%). Not MIPSS70-plus or version 2.0. magent does not sequence or grade marrow.","parameters":[{"in":"query","name":"hemoglobin_g_dl","type":"number","description":"Hemoglobin in g/dL (3-22). Provide this or hemoglobin_g_l, not both. <10 g/dL (<100 g/L) scores 1 (Guglielmelli 2018). 10.0 is the ≥10 arm and scores 0. magent does not assay hemoglobin.","required":false,"example":"12"},{"in":"query","name":"hemoglobin_g_l","type":"number","description":"Hemoglobin in g/L (30-220). Converted as hemoglobin_g_dl = hemoglobin_g_l / 10. Provide this or hemoglobin_g_dl, not both. <100 g/L scores 1. 100 is the ≥100 arm and scores 0.","required":false,"example":"120"},{"in":"query","name":"leukocytes_10e9_l","type":"number","description":"Leukocyte count in 10^9/L (0.5-200). >25 scores 2 (Guglielmelli 2018). 25.0 is the ≤25 arm and scores 0. magent does not assay leukocytes.","required":true,"example":"10"},{"in":"query","name":"platelets_10e9_l","type":"number","description":"Platelet count in 10^9/L (1-2000). <100 scores 2 (Guglielmelli 2018). 100.0 is the ≥100 arm and scores 0. magent does not assay platelets.","required":true,"example":"200"},{"in":"query","name":"blasts_percent","type":"number","description":"Circulating blasts as a percent (0-30). ≥2 scores 1 (Guglielmelli 2018). 2.0 scores; 1.9 is the <2 arm and scores 0. magent does not read a smear.","required":true,"example":"0"},{"in":"query","name":"fibrosis_grade","type":"integer","description":"WHO bone-marrow fibrosis grade as an integer 0-3, assigned by the caller (Guglielmelli 2018). ≥2 scores 1. Grade 2 scores; grade 1 scores 0. magent does not grade marrow.","required":true,"example":"1"},{"in":"query","name":"constitutional_symptoms","type":"boolean","description":"Constitutional symptoms as assigned by the caller (Guglielmelli 2018). true scores 1. magent does not take a history.","required":true,"example":"false"},{"in":"query","name":"calr_type1_like","type":"boolean","description":"Presence of a type 1/like CALR mutation as assigned by the caller (Guglielmelli 2018). false (absence) scores 1. true scores 0. magent does not sequence.","required":true,"example":"true"},{"in":"query","name":"hmr_mutation_count","type":"integer","description":"Count of high-molecular-risk mutations among ASXL1, EZH2, SRSF2, IDH1, and IDH2 as assigned by the caller (integer 0-5). ≥1 scores 1 (HMR category). ≥2 scores an additional 2 (two or more HMR mutations), so a count of 2 or more contributes 3. Count 0 scores 0. magent does not sequence.","required":true,"example":"0"}],"errors":[{"code":"invalid_hemoglobin","message":"hemoglobin_g_l (30-220) or hemoglobin_g_dl (3-22) is required, not both. Returned before settlement; you are not charged.","status":400},{"code":"invalid_leukocytes","message":"leukocytes_10e9_l must be a number from 0.5 to 200 (Guglielmelli 2018 MIPSS70). Returned before settlement; you are not charged.","status":400},{"code":"invalid_platelets","message":"platelets_10e9_l must be a number from 1 to 2000 Returned before settlement; you are not charged.","status":400},{"code":"invalid_mipss_blasts","message":"blasts_percent must be a number from 0 to 30 (Guglielmelli 2018 MIPSS70 circulating blasts; magent clamp). Returned before settlement; you are not charged.","status":400},{"code":"invalid_fibrosis_grade","message":"fibrosis_grade must be an integer 0-3 (Guglielmelli 2018 MIPSS70 WHO marrow fibrosis). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/mipss70","citation":{"authors":"Guglielmelli P, Lasho TL, Rotunno G, Mudireddy M, Mannarelli C, Nicolosi M, Pacilli A, Pardanani A, Rumi E, Rosti V, Hanson CA, Mannelli F, Ketterling RP, Gangat N, Rambaldi A, Passamonti F, Barosi G, Barbui T, Cazzola M, Vannucchi AM, Tefferi A","doi":"10.1200/JCO.2017.76.4886","id":"guglielmelli-2018","pmid":"29226763","source":"J Clin Oncol. 2018;36(4):310-318","title":"MIPSS70: Mutation-Enhanced International Prognostic Score System for Transplantation-Age Patients With Primary Myelofibrosis","url":"https://doi.org/10.1200/JCO.2017.76.4886"},"formula_expression":"MIPSS70 = hemoglobin_lt_10 1 + leukocytes_gt_25 2 + platelets_lt_100 2 + blasts_ge_2 1 + fibrosis_ge_2 1 + constitutional_symptoms 1 + absence_of_calr_type1_like 1 + hmr_category 1 + hmr_two_or_more 2; Guglielmelli 2018; max 12; low 0-1, intermediate 2-4, high ≥5","purpose":"Sum the Guglielmelli 2018 MIPSS70 (mutation-enhanced international prognostic score system) for transplantation-age primary myelofibrosis and return low (0–1), intermediate (2–4), or high (≥5).","markdown_url":"https://magentlab.com/docs/mipss70.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"mipss70"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"MIPSS70 points 0-12"},{"name":"max_score","type":"integer","description":"Always 12 (1+2+2+1+1+1+1+1+2)"},{"name":"risk_band","type":"string","description":"low when score is 0-1, intermediate when 2-4, high when ≥5 (Guglielmelli 2018 MIPSS70). Not a PMF diagnosis. Not MIPSS70-plus. Not MIPSS70+ version 2.0."},{"name":"hemoglobin_g_dl","type":"number","description":"Hemoglobin in g/dL used for the <10 criterion (g/L inputs converted / 10)"},{"name":"leukocytes_10e9_l","type":"number","description":"Leukocytes in 10^9/L used for the >25 criterion"},{"name":"platelets_10e9_l","type":"number","description":"Platelets in 10^9/L used for the <100 criterion"},{"name":"blasts_percent","type":"number","description":"Circulating blast percent used for the ≥2 criterion"},{"name":"fibrosis_grade","type":"integer","description":"Caller-assigned WHO marrow fibrosis grade 0-3 used for the ≥2 criterion"},{"name":"constitutional_symptoms","type":"boolean","description":"Caller-assigned constitutional-symptoms flag used"},{"name":"calr_type1_like","type":"boolean","description":"Caller-assigned type 1/like CALR flag used"},{"name":"hmr_mutation_count","type":"integer","description":"Caller-assigned HMR mutation count among ASXL1, EZH2, SRSF2, IDH1, IDH2 (0-5)"},{"name":"median_survival_years","type":"number","description":"Guglielmelli 2018 Italian-cohort median overall survival in years for this MIPSS70 band (low 27.7, intermediate 7.1, high 2.3). Cohort figure, not a patient-specific prediction."},{"name":"five_year_survival_percent","type":"integer","description":"Guglielmelli 2018 Italian-cohort 5-year survival percent for this MIPSS70 band (low 95, intermediate 70, high 29). Cohort figure, not a patient-specific prediction."},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Guglielmelli et al. J Clin Oncol 2018 MIPSS70 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"blasts_percent":"0","calr_type1_like":"true","constitutional_symptoms":"false","fibrosis_grade":"1","hemoglobin_g_dl":"12","hmr_mutation_count":"0","leukocytes_10e9_l":"10","platelets_10e9_l":"200"},{"blasts_percent":"0","calr_type1_like":"true","constitutional_symptoms":"false","fibrosis_grade":"1","hemoglobin_g_dl":"12","hmr_mutation_count":"0","leukocytes_10e9_l":"10","platelets_10e9_l":"200"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/mipss70","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/mipss70?hemoglobin_g_dl=12&leukocytes_10e9_l=10&platelets_10e9_l=200&blasts_percent=0&fibrosis_grade=1&constitutional_symptoms=false&calr_type1_like=true&hmr_mutation_count=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/mipss70","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/who-pv","description":"WHO 2016 polycythemia vera criteria (Arber 2016). Met when all three majors hold, or when major 1 and major 2 hold with subnormal EPO. Major 1 is male Hb >16.5 g/dL or Hct >49%, female Hb >16.0 or Hct >48%, or increased red-cell mass. Major 2 is caller-assigned marrow panmyelosis. Major 3 is JAK2 V617F or exon 12. Not a medical device, not a WHO diagnosis, and not WHO 2022. magent does not assay EPO or sequence JAK2.","parameters":[{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"female or male (Arber 2016 WHO 2016 PV hemoglobin/hematocrit thresholds). Required even when only increased_red_cell_mass is used. Assigned by the caller.","required":true,"example":"male"},{"in":"query","name":"hemoglobin_g_dl","type":"number","description":"Hemoglobin in g/dL (3-22). Major 1 meets when male >16.5 or female >16.0. Optional when hematocrit_percent is sent or increased_red_cell_mass is true. At least one of hemoglobin_g_dl, hematocrit_percent, or increased_red_cell_mass true is required. magent does not assay hemoglobin.","required":false,"example":"15"},{"in":"query","name":"hematocrit_percent","type":"number","description":"Hematocrit percent (10-70). Major 1 meets when male >49 or female >48. Optional when hemoglobin_g_dl is sent or increased_red_cell_mass is true. magent does not assay hematocrit.","required":false,"example":"45"},{"in":"query","name":"increased_red_cell_mass","type":"boolean","description":"Increased red-cell mass as assigned by the caller (Arber 2016 WHO 2016 major 1 alternative to Hb/Hct). true or false. true meets major 1 even when Hb/Hct are omitted or below threshold. magent does not measure red-cell mass.","required":true,"example":"false"},{"in":"query","name":"bone_marrow_panmyelosis","type":"boolean","description":"WHO 2016 marrow major as assigned by the caller (age-adjusted hypercellularity with panmyelosis, including pleomorphic mature megakaryocytes). true or false. magent does not read slides.","required":true,"example":"false"},{"in":"query","name":"jak2_v617f_or_exon12","type":"boolean","description":"JAK2 V617F or JAK2 exon 12 mutation as assigned by the caller (Arber 2016 WHO 2016 major 3). true or false. magent does not sequence JAK2.","required":true,"example":"false"},{"in":"query","name":"subnormal_epo","type":"boolean","description":"Subnormal serum erythropoietin as assigned by the caller (Arber 2016 WHO 2016 minor criterion). true or false. magent does not assay EPO.","required":true,"example":"false"}],"errors":[{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_hemoglobin","message":"hemoglobin_g_l (30-220) or hemoglobin_g_dl (3-22) is required, not both. Returned before settlement; you are not charged.","status":400},{"code":"invalid_hematocrit","message":"hematocrit_percent must be a number from 10 to 70. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/who-pv","citation":{"authors":"Arber DA, Orazi A, Hasserjian R, Thiele J, Borowitz MJ, Le Beau MM, Bloomfield CD, Cazzola M, Vardiman JW","doi":"10.1182/blood-2016-03-643544","id":"arber-2016","pmid":"27069254","source":"Blood. 2016;127(20):2391-2405","title":"The 2016 revision to the World Health Organization classification of myeloid neoplasms and acute leukemia","url":"https://doi.org/10.1182/blood-2016-03-643544"},"formula_expression":"pv_criteria_met iff (major_1 and major_2 and major_3) or (major_1 and major_2 and minor); major_1 iff increased_red_cell_mass or (male and (hemoglobin_g_dl > 16.5 or hematocrit_percent > 49)) or (female and (hemoglobin_g_dl > 16.0 or hematocrit_percent > 48)); major_2 bone_marrow_panmyelosis; major_3 jak2_v617f_or_exon12; minor subnormal_epo (Arber 2016 WHO 2016 PV). Not WHO 2022","purpose":"Apply the Arber 2016 / WHO 2016 polycythemia vera diagnostic criteria and return whether the published combination of three majors, or major 1 and major 2 plus subnormal EPO, is met.","markdown_url":"https://magentlab.com/docs/who-pv.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"who_pv"},{"name":"formula_expression","type":"string","description":"Arber 2016 WHO 2016 PV major/minor combination"},{"name":"pv_criteria_met","type":"boolean","description":"true iff all three majors, or major 1 and major 2 plus the minor. Not a WHO diagnosis. Not WHO 2022."},{"name":"major_1","type":"boolean","description":"true iff increased_red_cell_mass, or male Hb >16.5 or Hct >49, or female Hb >16.0 or Hct >48"},{"name":"major_2","type":"boolean","description":"Echo of caller-assigned bone_marrow_panmyelosis"},{"name":"major_3","type":"boolean","description":"Echo of caller-assigned jak2_v617f_or_exon12"},{"name":"minor","type":"boolean","description":"Echo of caller-assigned subnormal_epo"},{"name":"sex","type":"string","description":"Sex used: female or male"},{"name":"hemoglobin_g_dl","type":"number","description":"Hemoglobin in g/dL when supplied"},{"name":"hematocrit_percent","type":"number","description":"Hematocrit percent when supplied"},{"name":"increased_red_cell_mass","type":"boolean","description":"Caller-assigned increased red-cell mass flag used"},{"name":"bone_marrow_panmyelosis","type":"boolean","description":"Caller-assigned WHO marrow panmyelosis flag used"},{"name":"jak2_v617f_or_exon12","type":"boolean","description":"Caller-assigned JAK2 V617F or exon 12 flag used"},{"name":"subnormal_epo","type":"boolean","description":"Caller-assigned subnormal EPO flag used"},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met for major_1, major_2, major_3, and minor"},{"name":"citation","type":"object","description":"Arber 2016 Blood WHO 2016 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"bone_marrow_panmyelosis":"false","hematocrit_percent":"45","hemoglobin_g_dl":"15","increased_red_cell_mass":"false","jak2_v617f_or_exon12":"false","sex":"male","subnormal_epo":"false"},{"bone_marrow_panmyelosis":"false","hematocrit_percent":"45","hemoglobin_g_dl":"15","increased_red_cell_mass":"false","jak2_v617f_or_exon12":"false","sex":"male","subnormal_epo":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/who-pv","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/who-pv?sex=male&hemoglobin_g_dl=15&hematocrit_percent=45&increased_red_cell_mass=false&bone_marrow_panmyelosis=false&jak2_v617f_or_exon12=false&subnormal_epo=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/who-pv","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/astct-crs","description":"Lee 2019 ASTCT CRS Table 1 grade 0-4. Fever (>=38 C, not another cause) with both axes none is grade 1. fever_waived after antipyretic, tocilizumab, or steroids. Grade is the more severe of hypotension (none / no_vasopressors / one_vasopressor / multiple_vasopressors) vs hypoxia (none / low_flow / high_flow / positive_pressure). Organ toxicities do not influence grade. Not ICANS. magent does not measure temperature or start vasopressors.","parameters":[{"in":"query","name":"fever","type":"boolean","description":"Fever as assigned by the caller (Lee 2019 ASTCT CRS Table 1): temperature ≥38°C not attributable to another cause. true or false. Required unless fever_waived is true when hypotension or hypoxia is not none. magent does not measure temperature.","required":true,"example":"true"},{"in":"query","name":"fever_waived","type":"boolean","description":"true if CRS was already treated with antipyretic, tocilizumab, or steroids so fever is no longer required to grade subsequent CRS (Lee 2019). false otherwise. magent does not start those therapies.","required":true,"example":"false"},{"in":"query","name":"hypotension","type":"string","enum":["none","no_vasopressors","one_vasopressor","multiple_vasopressors"],"description":"Lee 2019 Table 1 hypotension as assigned by the caller: none; no_vasopressors (hypotension not requiring vasopressors, grade 2); one_vasopressor (one vasopressor with or without vasopressin, grade 3); multiple_vasopressors (multiple vasopressors excluding vasopressin, grade 4). magent does not start vasopressors.","required":true,"example":"none"},{"in":"query","name":"hypoxia","type":"string","enum":["none","low_flow","high_flow","positive_pressure"],"description":"Lee 2019 Table 1 hypoxia as assigned by the caller: none; low_flow (≤6 L/min nasal cannula or blow-by, grade 2); high_flow (>6 L/min nasal cannula, facemask, nonrebreather, or Venturi, grade 3); positive_pressure (CPAP, BiPAP, or intubation and mechanical ventilation, grade 4). magent does not set oxygen or ventilator mode.","required":true,"example":"none"}],"errors":[{"code":"invalid_astct_crs","message":"hypotension must be none, no_vasopressors, one_vasopressor, or multiple_vasopressors; hypoxia none, low_flow, high_flow, or positive_pressure (Lee 2019 ASTCT CRS Table 1). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/astct-crs","citation":{"authors":"Lee DW, Santomasso BD, Locke FL, Ghobadi A, Turtle CJ, Brudno JN, Maus MV, Park JH, Mead E, Pavletic S, Go WY, Eldjerou L, Gardner RA, Frey N, Curran KJ, Peggs K, Pasquini M, DiPersio JF, van den Brink MRM, Komanduri KV, Grupp SA, Neelapu SS","doi":"10.1016/j.bbmt.2018.12.758","id":"lee-2019","pmid":"30592986","source":"Biol Blood Marrow Transplant. 2019;25(4):625-638","title":"ASTCT Consensus Grading for Cytokine Release Syndrome and Neurologic Toxicity Associated with Immune Effector Cells","url":"https://doi.org/10.1016/j.bbmt.2018.12.758"},"formula_expression":"Lee 2019 ASTCT CRS Table 1. fever is temperature ≥38°C not attributable to another cause. fever_waived true if CRS already treated with antipyretic/tocilizumab/steroids so fever is no longer required. hypotension none | no_vasopressors | one_vasopressor (with or without vasopressin) | multiple_vasopressors (excluding vasopressin). hypoxia none | low_flow (≤6 L/min nasal cannula or blow-by) | high_flow (>6 L/min, facemask, NRB, or Venturi) | positive_pressure (CPAP/BiPAP/intubation). Grade is the more severe of hypotension vs hypoxia: both none → 1 if fever or fever_waived else 0 (crs false); no_vasopressors or low_flow → 2; one_vasopressor or high_flow → 3; multiple_vasopressors or positive_pressure → 4. Organ toxicities do not influence grade. Not ICANS","purpose":"Apply Lee 2019 ASTCT Table 1 cytokine release syndrome grading and return grade 0–4 from caller-assigned fever, fever waiver, hypotension, and hypoxia. Grade is the more severe of hypotension versus hypoxia. Organ toxicities do not influence grade. Not ICANS.","markdown_url":"https://magentlab.com/docs/astct-crs.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"astct_crs"},{"name":"formula_expression","type":"string","description":"Lee 2019 ASTCT CRS Table 1 fever, hypotension, and hypoxia grade rule"},{"name":"grade","type":"integer","description":"ASTCT CRS grade 0, 1, 2, 3, or 4. More severe of hypotension vs hypoxia. Grade 0 is no CRS (both axes none without fever and without fever_waived). Grade 5 death is not returned. Not ICANS."},{"name":"crs","type":"boolean","description":"true iff grade ≥1. Not a CRS diagnosis."},{"name":"fever","type":"boolean","description":"Echo of caller-assigned fever (≥38°C not attributable to another cause)"},{"name":"fever_waived","type":"boolean","description":"Echo of caller-assigned fever waiver after antipyretic, tocilizumab, or steroids"},{"name":"hypotension","type":"string","description":"none, no_vasopressors, one_vasopressor, or multiple_vasopressors"},{"name":"hypoxia","type":"string","description":"none, low_flow, high_flow, or positive_pressure"},{"name":"hypotension_grade","type":"integer","description":"0 if none, 2 if no_vasopressors, 3 if one_vasopressor, 4 if multiple_vasopressors"},{"name":"hypoxia_grade","type":"integer","description":"0 if none, 2 if low_flow, 3 if high_flow, 4 if positive_pressure"},{"name":"criteria","type":"array","description":"Per-factor Tree rows with factor and met for fever_or_waived and each hypotension and hypoxia token"},{"name":"citation","type":"object","description":"Lee 2019 Biol Blood Marrow Transplant ASTCT CRS citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"fever":"true","fever_waived":"false","hypotension":"none","hypoxia":"none"},{"fever":"true","fever_waived":"false","hypotension":"none","hypoxia":"none"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/astct-crs","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/astct-crs?fever=true&fever_waived=false&hypotension=none&hypoxia=none","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/astct-crs","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/astct-icans","description":"Adult ASTCT ICANS consensus grade (Lee 2019 Table 6). Grade is the most severe of ICE, depressed LOC, seizure, deep focal motor weakness, and ICP/edema. ICE 10 is 0; 7-9 is 1; 3-6 is 2; 0-2 is 3; ICE 0 is 4 if unarousable. Not CRS, not pediatric CAPD, and not the 10-item ICE test. magent does not perform ICE testing or examine the patient. Not a medical device.","parameters":[{"in":"query","name":"ice_score","type":"integer","description":"Caller-assigned Immune Effector Cell-Associated Encephalopathy (ICE) total 0-10 (Lee 2019 Table 6). Domain: 10 → grade 0; 7-9 → 1; 3-6 → 2; 0-2 → 3. ICE 0 is grade 3 if awake (loc is not unarousable) and grade 4 if unarousable/unable to perform ICE. magent does not score orientation, naming, following commands, writing, or attention and is not the 10-item ICE calculator.","required":true,"example":"8"},{"in":"query","name":"loc","type":"string","enum":["none","spontaneous","voice","tactile","unarousable"],"description":"Caller-assigned depressed level of consciousness (Lee 2019 Table 6): none (no depressed LOC, domain 0); spontaneous (awakens spontaneously, 1); voice (awakens to voice, 2); tactile (awakens only to tactile stimulus, 3); unarousable (unarousable or requires vigorous or repetitive tactile stimuli; stupor or coma, 4). Case-insensitive. magent does not examine the patient.","required":true,"example":"none"},{"in":"query","name":"seizure","type":"string","enum":["none","rapidly_resolving","life_threatening"],"description":"Caller-assigned seizure (Lee 2019 Table 6): none (domain 0); rapidly_resolving (any clinical seizure, focal or generalized, that resolves rapidly, or nonconvulsive seizures on EEG that resolve with intervention, 3); life_threatening (life-threatening prolonged seizure >5 min or repetitive clinical or electrical seizures without return to baseline, 4). Case-insensitive. magent does not interpret EEG.","required":true,"example":"none"},{"in":"query","name":"motor_weakness","type":"boolean","description":"Deep focal motor weakness such as hemiparesis or paraparesis as assigned by the caller (Lee 2019 Table 6). true maps to domain grade 4. false maps to 0. Motor is N/A for grades 1-3. true or false. magent does not examine the patient.","required":true,"example":"false"},{"in":"query","name":"icp","type":"string","enum":["none","focal_edema","diffuse_edema"],"description":"Caller-assigned raised intracranial pressure / cerebral edema (Lee 2019 Table 6): none (domain 0); focal_edema (focal/local edema on neuroimaging, 3); diffuse_edema (diffuse cerebral edema on imaging, or decerebrate/decorticate posturing, cranial nerve VI palsy, papilledema, or Cushing triad, 4). Case-insensitive. magent does not read imaging or examine the patient.","required":true,"example":"none"}],"errors":[{"code":"invalid_astct_icans","message":"ice_score must be an integer 0–10; loc none, spontaneous, voice, tactile, or unarousable; seizure none, rapidly_resolving, or life_threatening; icp none, focal_edema, or diffuse_edema (Lee 2019 ASTCT ICANS Table 6). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/astct-icans","citation":{"authors":"Lee DW, Santomasso BD, Locke FL, Ghobadi A, Turtle CJ, Brudno JN, Maus MV, Park JH, Mead E, Pavletic S, Go WY, Hegde M, Kadauke S, Gauthier J, Riviere I, van den Brink MRM, Gardner RA, Grupp SA, Kalos M, Neelapu SS","doi":"10.1016/j.bbmt.2018.12.758","id":"lee-2019","pmid":"30592986","source":"Biol Blood Marrow Transplant. 2019;25(4):625-638","title":"ASTCT Consensus Grading for Cytokine Release Syndrome and Neurologic Toxicity Associated with Immune Effector Cells","url":"https://doi.org/10.1016/j.bbmt.2018.12.758"},"formula_expression":"Adult ASTCT ICANS grade = max of ICE, LOC, seizure, motor, and ICP domains not attributable to another cause (Lee 2019 Table 6). ICE: 10 → 0; 7-9 → 1; 3-6 → 2; 0-2 → 3; ICE 0 is 3 if awake (loc not unarousable) and 4 if unarousable/unable to perform ICE. loc: none 0, spontaneous 1, voice 2, tactile 3, unarousable 4. seizure: none 0, rapidly_resolving 3, life_threatening 4. motor_weakness true → 4 (N/A for grades 1-3), false → 0. icp: none 0, focal_edema 3, diffuse_edema 4. icans iff grade ≥ 1. Not CRS. Not the 10-item ICE test. magent does not perform ICE testing","purpose":"Apply Lee 2019 Table 6 adult ASTCT ICANS consensus grading and return the overall grade (0-4) as the most severe of the ICE, depressed LOC, seizure, motor, and ICP/edema domains, with icans true when grade is 1 or greater.","markdown_url":"https://magentlab.com/docs/astct-icans.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"astct_icans"},{"name":"formula_expression","type":"string","description":"Published Lee 2019 Table 6 adult ICANS max-of-domains rule"},{"name":"ice_score","type":"integer","description":"Echo of the caller-assigned ICE total 0-10"},{"name":"loc","type":"string","description":"Canonical LOC token: none, spontaneous, voice, tactile, or unarousable"},{"name":"seizure","type":"string","description":"Canonical seizure token: none, rapidly_resolving, or life_threatening"},{"name":"motor_weakness","type":"boolean","description":"Echo of the caller-assigned deep focal motor weakness flag"},{"name":"icp","type":"string","description":"Canonical ICP token: none, focal_edema, or diffuse_edema"},{"name":"ice_grade","type":"integer","description":"ICE domain grade 0-4 (ICE 0 is 4 when loc is unarousable)"},{"name":"loc_grade","type":"integer","description":"LOC domain grade 0-4"},{"name":"seizure_grade","type":"integer","description":"Seizure domain grade 0, 3, or 4"},{"name":"motor_grade","type":"integer","description":"Motor domain grade 0 or 4"},{"name":"icp_grade","type":"integer","description":"ICP domain grade 0, 3, or 4"},{"name":"grade","type":"integer","description":"Overall ASTCT ICANS grade 0-4 = max of the five domain grades. Not a diagnosis."},{"name":"icans","type":"boolean","description":"true iff grade is 1 or greater"},{"name":"components","type":"array","description":"Rows for ice, loc, seizure, motor, and icp with factor, met (domain grade > 0), and value (the domain grade)"},{"name":"citation","type":"object","description":"Lee 2019 Biol Blood Marrow Transplant citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"ice_score":"8","icp":"none","loc":"none","motor_weakness":"false","seizure":"none"},{"ice_score":"8","icp":"none","loc":"none","motor_weakness":"false","seizure":"none"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/astct-icans","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/astct-icans?ice_score=8&loc=none&seizure=none&motor_weakness=false&icp=none","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/astct-icans","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/nci-ctc-mucositis","description":"NCI CTC v2.0 Mucositis due to radiation (Trotti 2000). none → 0; erythema → 1; patchy_pseudomembrane (≤1.5 cm, noncontiguous) → 2; confluent_pseudomembrane (contiguous >1.5 cm) → 3; necrosis_or_deep_ulcer (may include bleeding not induced by minor trauma) → 4. magent does not examine the mucosa. Not CTC stomatitis/pharyngitis, CTCAE v3/v4/v5, or WHO mucositis. Not a diagnosis or medical device.","parameters":[{"in":"query","name":"appearance","type":"string","description":"NCI CTC v2.0 Mucositis due to radiation appearance as assigned by the caller: none (grade 0), erythema (grade 1, erythema of the mucosa), patchy_pseudomembrane (grade 2, patchy pseudomembranous reaction, patches generally ≤1.5 cm and noncontiguous), confluent_pseudomembrane (grade 3, confluent pseudomembranous reaction, contiguous patches generally >1.5 cm), or necrosis_or_deep_ulcer (grade 4, necrosis or deep ulceration; may include bleeding not induced by minor trauma or abrasion). Case-insensitive. Not CTC stomatitis/pharyngitis. magent does not examine the mucosa.","required":true,"example":"erythema"}],"errors":[{"code":"invalid_mucositis_appearance","message":"appearance must be none, erythema, patchy_pseudomembrane, confluent_pseudomembrane, or necrosis_or_deep_ulcer (NCI CTC v2.0 Mucositis due to radiation). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/nci-ctc-mucositis","citation":{"authors":"Trotti A, Byhardt R, Stetz J, Gwede C, Corn B, Fu K, Gunderson L, McCormick B, Morrisintegral M, Rich T, Shipley W, Curran W","doi":"10.1016/s0360-3016(99)00559-3","id":"trotti-2000","pmid":"10758303","source":"Int J Radiat Oncol Biol Phys. 2000;47(1):13-47","title":"Common toxicity criteria: version 2.0. an improved reference for grading the acute effects of cancer treatment: impact on radiotherapy","url":"https://doi.org/10.1016/s0360-3016(99)00559-3"},"formula_expression":"nci_ctc_mucositis appearance none → grade 0; erythema → 1 (erythema of the mucosa); patchy_pseudomembrane → 2 (patchy pseudomembranous reaction, patches generally ≤1.5 cm and noncontiguous); confluent_pseudomembrane → 3 (confluent pseudomembranous reaction, contiguous patches generally >1.5 cm); necrosis_or_deep_ulcer → 4 (necrosis or deep ulceration; may include bleeding not induced by minor trauma or abrasion) (NCI CTC v2.0 Mucositis due to radiation; Trotti 2000). Not CTC stomatitis/pharyngitis. Not CTCAE. Not WHO mucositis. magent does not examine the mucosa. Not a diagnosis","purpose":"Apply NCI CTC v2.0 Mucositis due to radiation (Trotti 2000; CTC 30 April 1999) and return grade 0–4 from a caller-assigned mucosal appearance token. magent does not examine the mucosa.","markdown_url":"https://magentlab.com/docs/nci-ctc-mucositis.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"nci_ctc_mucositis"},{"name":"formula_expression","type":"string","description":"Published NCI CTC v2.0 Mucositis due to radiation appearance-to-grade rule"},{"name":"appearance","type":"string","description":"Canonical lowercase appearance token: none, erythema, patchy_pseudomembrane, confluent_pseudomembrane, or necrosis_or_deep_ulcer"},{"name":"grade","type":"integer","description":"NCI CTC v2.0 radiation mucositis grade 0–4 for that appearance. Not a diagnosis."},{"name":"description","type":"string","description":"CTC v2.0 radiation-row wording for that appearance"},{"name":"criteria","type":"array","description":"Per-appearance Tree rows with factor and met for none, erythema, patchy_pseudomembrane, confluent_pseudomembrane, and necrosis_or_deep_ulcer; exactly one is met"},{"name":"citation","type":"object","description":"Trotti 2000 Int J Radiat Oncol Biol Phys CTC v2.0 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"appearance":"erythema"},{"appearance":"erythema"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/nci-ctc-mucositis","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/nci-ctc-mucositis?appearance=erythema","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/nci-ctc-mucositis","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/nci-ctc-stomatitis","description":"NCI CTC v2.0 stomatitis/pharyngitis (Trotti 2000). none → 0; painless_or_mild_soreness → 1; painful_can_eat → 2; painful_cannot_eat → 3; parenteral_or_prophylactic_intubation → 4. magent does not examine the mucosa. Not radiation mucositis (nci-ctc-mucositis), CTCAE catalog, or WHO. Not a diagnosis or medical device.","parameters":[{"in":"query","name":"appearance","type":"string","description":"NCI CTC v2.0 Stomatitis/pharyngitis (oral/pharyngeal mucositis) appearance as assigned by the caller: none (grade 0), painless_or_mild_soreness (grade 1, painless ulcers, erythema, or mild soreness in the absence of lesions), painful_can_eat (grade 2, painful erythema, edema or ulcers, but can eat or swallow), painful_cannot_eat (grade 3, painful erythema, edema or ulcers, and cannot eat or swallow), or parenteral_or_prophylactic_intubation (grade 4, severe ulceration or requires parenteral or enteral support or prophylactic intubation). Case-insensitive. Not CTC Mucositis due to radiation. magent does not examine the mucosa.","required":true,"example":"painless_or_mild_soreness"}],"errors":[{"code":"invalid_stomatitis_appearance","message":"appearance must be none, painless_or_mild_soreness, painful_can_eat, painful_cannot_eat, or parenteral_or_prophylactic_intubation (NCI CTC v2.0 stomatitis/pharyngitis). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/nci-ctc-stomatitis","citation":{"authors":"Trotti A, Byhardt R, Stetz J, Gwede C, Corn B, Fu K, Gunderson L, McCormick B, Morris M, Rich T, Shipley W, Curran W","doi":"10.1016/s0360-3016(99)00559-3","id":"trotti-2000","pmid":"10758303","source":"Int J Radiat Oncol Biol Phys. 2000;47(1):13-47","title":"Common toxicity criteria: version 2.0. an improved reference for grading the acute effects of cancer treatment: impact on radiotherapy","url":"https://doi.org/10.1016/s0360-3016(99)00559-3"},"formula_expression":"nci_ctc_stomatitis appearance none → grade 0; painless_or_mild_soreness → 1 (painless ulcers, erythema, or mild soreness in the absence of lesions); painful_can_eat → 2 (painful erythema, edema or ulcers, but can eat or swallow); painful_cannot_eat → 3 (painful erythema, edema or ulcers, and cannot eat or swallow); parenteral_or_prophylactic_intubation → 4 (severe ulceration or requires parenteral or enteral support or prophylactic intubation) (NCI CTC v2.0 Stomatitis/pharyngitis (oral/pharyngeal mucositis); Trotti 2000). Not CTC Mucositis due to radiation. Not CTCAE. Not WHO mucositis. magent does not examine the mucosa. Not a diagnosis","purpose":"Apply NCI CTC v2.0 Stomatitis/pharyngitis (oral/pharyngeal mucositis) (Trotti 2000; CTC 30 April 1999) and return grade 0–4 from a caller-assigned oral/pharyngeal appearance token. magent does not examine the mucosa.","markdown_url":"https://magentlab.com/docs/nci-ctc-stomatitis.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"nci_ctc_stomatitis"},{"name":"formula_expression","type":"string","description":"Published NCI CTC v2.0 Stomatitis/pharyngitis (oral/pharyngeal mucositis) appearance-to-grade rule"},{"name":"appearance","type":"string","description":"Canonical lowercase appearance token: none, painless_or_mild_soreness, painful_can_eat, painful_cannot_eat, or parenteral_or_prophylactic_intubation"},{"name":"grade","type":"integer","description":"NCI CTC v2.0 stomatitis/pharyngitis grade 0–4 for that appearance. Not a diagnosis."},{"name":"description","type":"string","description":"CTC v2.0 stomatitis/pharyngitis wording for that appearance"},{"name":"criteria","type":"array","description":"Per-appearance Tree rows with factor and met for none, painless_or_mild_soreness, painful_can_eat, painful_cannot_eat, and parenteral_or_prophylactic_intubation; exactly one is met"},{"name":"citation","type":"object","description":"Trotti 2000 Int J Radiat Oncol Biol Phys CTC v2.0 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"appearance":"painless_or_mild_soreness"},{"appearance":"painless_or_mild_soreness"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/nci-ctc-stomatitis","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/nci-ctc-stomatitis?appearance=painless_or_mild_soreness","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/nci-ctc-stomatitis","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/ice","description":"Lee 2019 Immune Effector Cell-Associated Encephalopathy (ICE) points: orientation 0-4 (year, month, city, hospital), naming 0-3 (three objects), following commands 1, writing 1, attention 1 (count backward from 100 by tens); total 0-10. Caller-assigned; magent does not perform the exam. Not ASTCT ICANS grading. Deterministic published arithmetic with citation; not a medical device.","parameters":[{"in":"query","name":"orientation","type":"integer","description":"Caller-assigned orientation points 0-4 (year, month, city, hospital; Lee 2019 ICE). magent does not perform the exam.","required":true,"example":"4"},{"in":"query","name":"naming","type":"integer","description":"Caller-assigned naming points 0-3 (three objects; Lee 2019 ICE). magent does not perform the exam.","required":true,"example":"3"},{"in":"query","name":"following_commands","type":"boolean","description":"Ability to follow commands (Lee 2019 ICE, 1 point). true, false, 1, or 0. magent does not perform the exam.","required":true,"example":"true"},{"in":"query","name":"writing","type":"boolean","description":"Ability to write a standard sentence (Lee 2019 ICE, 1 point). true, false, 1, or 0. magent does not perform the exam.","required":true,"example":"true"},{"in":"query","name":"attention","type":"boolean","description":"Ability to count backward from 100 by tens (Lee 2019 ICE, 1 point). true, false, 1, or 0. magent does not perform the exam.","required":true,"example":"true"}],"errors":[{"code":"invalid_ice_orientation","message":"orientation must be an integer from 0 to 4 (Lee 2019 ICE year/month/city/hospital). Returned before settlement; you are not charged.","status":400},{"code":"invalid_ice_naming","message":"naming must be an integer from 0 to 3 (Lee 2019 ICE three objects). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/ice","citation":{"authors":"Lee DW, Santomasso BD, Locke FL, et al.","doi":"10.1016/j.bbmt.2018.12.758","id":"lee-2019","pmid":"30592986","source":"Biol Blood Marrow Transplant. 2019;25(4):625-638","title":"ASTCT Consensus Grading for Cytokine Release Syndrome and Neurologic Toxicity Associated with Immune Effector Cells","url":"https://doi.org/10.1016/j.bbmt.2018.12.758"},"formula_expression":"ICE = orientation (0-4; year, month, city, hospital) + naming (0-3; three objects) + following_commands (1) + writing (1) + attention (1; count backward from 100 by tens); max 10. ICE points only; not ASTCT ICANS grade. magent does not perform the exam","purpose":"Sum Lee 2019 Immune Effector Cell-Associated Encephalopathy (ICE) item points and return the 0-10 total. Not ASTCT ICANS grading.","markdown_url":"https://magentlab.com/docs/ice.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"ice"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"ICE points 0-10"},{"name":"max_score","type":"integer","description":"10"},{"name":"orientation","type":"integer","description":"Echo of caller-assigned orientation 0-4"},{"name":"naming","type":"integer","description":"Echo of caller-assigned naming 0-3"},{"name":"following_commands","type":"boolean","description":"Echo of the following-commands flag"},{"name":"writing","type":"boolean","description":"Echo of the writing flag"},{"name":"attention","type":"boolean","description":"Echo of the attention flag"},{"name":"components","type":"array","description":"Per-item points"},{"name":"citation","type":"object","description":"Lee 2019 Biol Blood Marrow Transplant citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"attention":"true","following_commands":"true","naming":"3","orientation":"4","writing":"true"},{"attention":"true","following_commands":"true","naming":"3","orientation":"4","writing":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/ice","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/ice?orientation=4&naming=3&following_commands=true&writing=true&attention=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/ice","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/who-sm","description":"WHO 2016 systemic mastocytosis (Valent 2016 Table 1). Met when major infiltrates (≥15 mast cells in aggregates in BM or extracutaneous organ) plus ≥1 minor, or ≥3 minors. Minors: >25% atypical/spindle mast cells, KIT codon 816, CD2 and/or CD25, tryptase >20 ng/mL (not valid with an unrelated myeloid neoplasm). Not a diagnosis. Not cutaneous mastocytosis only. Not ICC 2022. magent does not read a biopsy or assay tryptase.","parameters":[{"in":"query","name":"major_infiltrates","type":"boolean","description":"Multifocal dense infiltrates of mast cells (≥15 MCs in aggregates) in bone marrow or another extracutaneous organ, as assigned by the caller (Valent 2016 Table 1 major). true or false. magent does not read a biopsy.","required":true,"example":"true"},{"in":"query","name":"atypical_or_spindle","type":"boolean","description":">25% atypical (type I/II) or spindle-shaped mast cells in infiltrates or smears, as assigned by the caller (Valent 2016 Table 1 minor a). true or false. magent does not read slides.","required":true,"example":"false"},{"in":"query","name":"kit_codon_816","type":"boolean","description":"KIT point mutation at codon 816 in bone marrow or another extracutaneous organ, as assigned by the caller (Valent 2016 Table 1 minor b). true or false. magent does not sequence KIT.","required":true,"example":"true"},{"in":"query","name":"cd2_or_cd25","type":"boolean","description":"Mast cells in bone marrow, blood, or another extracutaneous organ exhibit CD2 and/or CD25, as assigned by the caller (Valent 2016 Table 1 minor c). true or false. magent does not phenotype mast cells.","required":true,"example":"false"},{"in":"query","name":"tryptase_gt_20","type":"boolean","description":"Baseline serum tryptase >20 ng/mL as assigned by the caller (Valent 2016 Table 1 minor d). Does not count when associated_myeloid_neoplasm is true. true or false. magent does not assay tryptase.","required":true,"example":"false"},{"in":"query","name":"associated_myeloid_neoplasm","type":"boolean","description":"Unrelated myeloid neoplasm present as assigned by the caller (Valent 2016 Table 1: item d is not valid). When true, tryptase_gt_20 does not count as a minor. true or false. magent does not diagnose a myeloid neoplasm.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/who-sm","citation":{"authors":"Valent P, Akin C, Hartmann K, Nilsson G, Reiter A, Hermine O, Sotlar K, Sperr WR, Escribano L, George TI, Kluin-Nelemans HC, Ustun C, Triggiani M, Brockow K, Gotlib J, Orfao A, Schwartz LB, Horny HP, Galli SJ, Arock M, Metcalfe DD","doi":"10.1182/blood-2016-09-731893","id":"valent-2016","pmid":"28031180","source":"Blood. 2017;129(11):1420-1427 (Epub 2016 Dec 28)","title":"Mastocytosis: 2016 updated WHO classification and novel emerging treatment concepts","url":"https://doi.org/10.1182/blood-2016-09-731893"},"formula_expression":"diagnosed iff (major_infiltrates and minor_count ≥ 1) or minor_count ≥ 3; minor_count counts atypical_or_spindle, kit_codon_816, cd2_or_cd25, and tryptase_gt_20 only when associated_myeloid_neoplasm is false (Valent 2016 Table 1 WHO SM). Not a diagnosis. Not cutaneous mastocytosis only. Not ICC 2022","purpose":"Apply the Valent 2016 / WHO 2016 systemic mastocytosis diagnostic criteria (Table 1) and return whether the published combination of the major criterion plus at least one minor, or at least three minors, is met. Tryptase >20 ng/mL does not count when an unrelated myeloid neoplasm is present.","markdown_url":"https://magentlab.com/docs/who-sm.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"who_sm"},{"name":"formula_expression","type":"string","description":"Valent 2016 Table 1 WHO SM major/minor combination"},{"name":"diagnosed","type":"boolean","description":"true iff major_infiltrates and minor_count ≥ 1, or minor_count ≥ 3. Not a diagnosis. Not cutaneous mastocytosis only. Not ICC 2022."},{"name":"major","type":"boolean","description":"Echo of caller-assigned major_infiltrates (Valent 2016 Table 1 major)"},{"name":"minor_count","type":"integer","description":"Count of atypical_or_spindle, kit_codon_816, cd2_or_cd25, and tryptase_gt_20 when associated_myeloid_neoplasm is false"},{"name":"tryptase_counts","type":"boolean","description":"true iff tryptase_gt_20 and associated_myeloid_neoplasm is false (item d valid)"},{"name":"major_infiltrates","type":"boolean","description":"Caller-assigned multifocal dense mast-cell infiltrates flag used"},{"name":"atypical_or_spindle","type":"boolean","description":"Caller-assigned >25% atypical or spindle-shaped mast-cell flag used"},{"name":"kit_codon_816","type":"boolean","description":"Caller-assigned KIT codon 816 mutation flag used"},{"name":"cd2_or_cd25","type":"boolean","description":"Caller-assigned CD2 and/or CD25 mast-cell flag used"},{"name":"tryptase_gt_20","type":"boolean","description":"Caller-assigned baseline serum tryptase >20 ng/mL flag used"},{"name":"associated_myeloid_neoplasm","type":"boolean","description":"Caller-assigned unrelated myeloid neoplasm flag used; when true, tryptase does not count"},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met for major, each counted minor, tryptase_counts, associated_myeloid_neoplasm, and the ≥1 / ≥3 minor thresholds"},{"name":"citation","type":"object","description":"Valent 2016 Blood WHO SM citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"associated_myeloid_neoplasm":"false","atypical_or_spindle":"false","cd2_or_cd25":"false","kit_codon_816":"true","major_infiltrates":"true","tryptase_gt_20":"false"},{"associated_myeloid_neoplasm":"false","atypical_or_spindle":"false","cd2_or_cd25":"false","kit_codon_816":"true","major_infiltrates":"true","tryptase_gt_20":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/who-sm","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/who-sm?major_infiltrates=true&atypical_or_spindle=false&kit_codon_816=true&cd2_or_cd25=false&tryptase_gt_20=false&associated_myeloid_neoplasm=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/who-sm","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/icc-sm","description":"ICC 2022 systemic mastocytosis (Arber 2022). Met when major infiltrates (≥15 tryptase- and/or CD117-positive MCs in aggregates in BM or extracutaneous organ) alone, or ≥3 minors. Minors: >25% spindle or atypical immature morphology, KIT D816V or other activating KIT mutation, CD25/CD2/CD30, tryptase >20 ng/mL (not counted in SM-AMN). Not a diagnosis. Not Valent 2016 WHO SM. Not WHO 5th/Khoury. Not cutaneous mastocytosis only. magent does not read a biopsy or assay tryptase.","parameters":[{"in":"query","name":"major_infiltrates","type":"boolean","description":"Multifocal dense infiltrates of tryptase- and/or CD117-positive mast cells (≥15 MCs in aggregates) in bone marrow or another extracutaneous organ, as assigned by the caller (Arber 2022 ICC SM major). true or false. magent does not read a biopsy.","required":true,"example":"true"},{"in":"query","name":"atypical_or_spindle","type":"boolean","description":">25% spindle-shaped or atypical immature morphology in bone marrow or extracutaneous sections, as assigned by the caller (Arber 2022 ICC SM minor). true or false. magent does not read slides.","required":true,"example":"false"},{"in":"query","name":"kit_activating","type":"boolean","description":"KIT D816V or other activating KIT mutation in bone marrow, blood, or an extracutaneous organ, as assigned by the caller (Arber 2022 ICC SM minor; not codon-816-only). true or false. magent does not sequence KIT.","required":true,"example":"false"},{"in":"query","name":"cd2_cd25_or_cd30","type":"boolean","description":"Mast cells express CD25, CD2, and/or CD30 in addition to mast-cell markers, as assigned by the caller (Arber 2022 ICC SM minor; ICC adds CD30). true or false. magent does not phenotype mast cells.","required":true,"example":"false"},{"in":"query","name":"tryptase_gt_20","type":"boolean","description":"Serum tryptase persistently >20 ng/mL as assigned by the caller (Arber 2022 ICC SM minor). Does not count when associated_myeloid_neoplasm is true (SM-AMN). true or false. magent does not assay tryptase.","required":true,"example":"false"},{"in":"query","name":"associated_myeloid_neoplasm","type":"boolean","description":"Associated myeloid neoplasm (ICC SM-AMN) as assigned by the caller. When true, tryptase_gt_20 does not count as a minor. true or false. magent does not diagnose a myeloid neoplasm.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/icc-sm","citation":{"authors":"Arber DA, Orazi A, Hasserjian RP, Borowitz MJ, Calvo KR, Kvasnicka HM, Wang SA, Bagg A, Barbui T, Bennett JM, de la Fuente J, et al.","doi":"10.1182/blood.2022015850","id":"arber-2022","pmid":"35767897","source":"Blood. 2022;140(11):1200-1228","title":"International Consensus Classification of Myeloid Neoplasms and Acute Leukemias: integrating morphologic, clinical, and genomic data","url":"https://doi.org/10.1182/blood.2022015850"},"formula_expression":"diagnosed iff major_infiltrates or minor_count ≥ 3; minor_count counts atypical_or_spindle, kit_activating, cd2_cd25_or_cd30, and tryptase_gt_20 only when associated_myeloid_neoplasm is false (Arber 2022 ICC SM). Not a diagnosis. Not Valent 2016 WHO SM. Not cutaneous mastocytosis only","purpose":"Apply the Arber 2022 International Consensus Classification systemic mastocytosis criteria and return whether the published combination of the major criterion alone, or at least three minors, is met. Tryptase >20 ng/mL does not count when an associated myeloid neoplasm (SM-AMN) is present.","markdown_url":"https://magentlab.com/docs/icc-sm.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"icc_sm"},{"name":"formula_expression","type":"string","description":"Arber 2022 ICC SM major-alone or ≥3 minors combination"},{"name":"diagnosed","type":"boolean","description":"true iff major_infiltrates or minor_count ≥ 3. Not a diagnosis. Not Valent 2016 WHO SM. Not cutaneous mastocytosis only. Not WHO 5th / Khoury."},{"name":"major","type":"boolean","description":"Echo of caller-assigned major_infiltrates (Arber 2022 ICC SM major)"},{"name":"minor_count","type":"integer","description":"Count of atypical_or_spindle, kit_activating, cd2_cd25_or_cd30, and tryptase_gt_20 when associated_myeloid_neoplasm is false"},{"name":"tryptase_counts","type":"boolean","description":"true iff tryptase_gt_20 and associated_myeloid_neoplasm is false (ICC SM-AMN: tryptase is not a minor)"},{"name":"major_infiltrates","type":"boolean","description":"Caller-assigned multifocal dense mast-cell infiltrates flag used"},{"name":"atypical_or_spindle","type":"boolean","description":"Caller-assigned >25% spindle or atypical immature mast-cell flag used"},{"name":"kit_activating","type":"boolean","description":"Caller-assigned KIT D816V or other activating KIT mutation flag used"},{"name":"cd2_cd25_or_cd30","type":"boolean","description":"Caller-assigned CD25, CD2, and/or CD30 mast-cell flag used"},{"name":"tryptase_gt_20","type":"boolean","description":"Caller-assigned persistently elevated serum tryptase >20 ng/mL flag used"},{"name":"associated_myeloid_neoplasm","type":"boolean","description":"Caller-assigned associated myeloid neoplasm (ICC SM-AMN) flag used; when true, tryptase does not count"},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met for major, each counted minor, tryptase_counts, associated_myeloid_neoplasm, and the ≥3 minor threshold"},{"name":"citation","type":"object","description":"Arber 2022 Blood ICC SM citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"associated_myeloid_neoplasm":"false","atypical_or_spindle":"false","cd2_cd25_or_cd30":"false","kit_activating":"false","major_infiltrates":"true","tryptase_gt_20":"false"},{"associated_myeloid_neoplasm":"false","atypical_or_spindle":"false","cd2_cd25_or_cd30":"false","kit_activating":"false","major_infiltrates":"true","tryptase_gt_20":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/icc-sm","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/icc-sm?major_infiltrates=true&atypical_or_spindle=false&kit_activating=false&cd2_cd25_or_cd30=false&tryptase_gt_20=false&associated_myeloid_neoplasm=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/icc-sm","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/mars","description":"Jawhar 2019 mutation-adjusted risk score (MARS) for advanced systemic mastocytosis: age >60 (1), hemoglobin <10 g/dL (1), platelets <100×10^9/L (1), exactly one S/A/R mutation among SRSF2, ASXL1, RUNX1 (1) or two or more (2, not both). Max 5. Low 0–1 (training-set median OS not reached), intermediate 2 (3.9 y), high 3–5 (1.9 y). Not WHO SM criteria. magent does not sequence or assay labs.","parameters":[{"in":"query","name":"age","type":"integer","description":"Age in years (integer 18-120). >60 scores 1 (Jawhar 2019). Age 61 scores; age 60 is the ≤60 arm and scores 0.","required":true,"example":"50"},{"in":"query","name":"hemoglobin_g_dl","type":"number","description":"Hemoglobin in g/dL (3-22). Provide this or hemoglobin_g_l, not both. <10 g/dL (<100 g/L) scores 1 (Jawhar 2019). 10.0 is the ≥10 arm and scores 0. magent does not assay hemoglobin.","required":false,"example":"12"},{"in":"query","name":"hemoglobin_g_l","type":"number","description":"Hemoglobin in g/L (30-220). Converted as hemoglobin_g_dl = hemoglobin_g_l / 10. Provide this or hemoglobin_g_dl, not both. <100 g/L scores 1. 100 is the ≥100 arm and scores 0.","required":false,"example":"120"},{"in":"query","name":"platelets_10e9_l","type":"number","description":"Platelet count in 10^9/L (1-2000). <100 scores 1 (Jawhar 2019). 100.0 is the ≥100 arm and scores 0. magent does not assay platelets.","required":true,"example":"200"},{"in":"query","name":"sar_mutation_count","type":"integer","description":"Caller-assigned count of S/A/R mutations among SRSF2, ASXL1, and RUNX1 (integer 0, 1, or 2; 2 means two or more). Exactly one scores 1. Two or more scores 2 (not 1 plus 2). Count 0 scores 0. magent does not sequence.","required":true,"example":"0"}],"errors":[{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_hemoglobin","message":"hemoglobin_g_l (30-220) or hemoglobin_g_dl (3-22) is required, not both. Returned before settlement; you are not charged.","status":400},{"code":"invalid_platelets","message":"platelets_10e9_l must be a number from 1 to 2000 Returned before settlement; you are not charged.","status":400},{"code":"invalid_sar_count","message":"sar_mutation_count must be 0, 1, or 2 (Jawhar 2019 MARS: number of S/A/R mutations among SRSF2, ASXL1, and RUNX1; 2 means two or more). magent does not sequence. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/mars","citation":{"authors":"Jawhar M, Schwaab J, Álvarez-Twose I, Shoumariyeh K, Naumann N, Lübke J, Perkins C, Muñoz-González JI, Meggendorfer M, Kennedy V, Metzgeroth G, Fabarius A, Pfeifer D, Sotlar K, Horny HP, von Bubnoff N, Haferlach T, Cross NCP, Hofmann WK, Sperr WR, García-Montero AC, Valent P, Gotlib J, Orfao A, Reiter A","doi":"10.1200/JCO.19.00640","id":"jawhar-2019","pmid":"31509472","source":"J Clin Oncol. 2019;37(31):2846-2856","title":"MARS: Mutation-Adjusted Risk Score for Advanced Systemic Mastocytosis","url":"https://doi.org/10.1200/JCO.19.00640"},"formula_expression":"MARS = age_gt_60 1 + hemoglobin_lt_10 1 + platelets_lt_100 1 + sar_mutations (exactly one S/A/R 1, two or more 2; SRSF2, ASXL1, RUNX1); Jawhar 2019; max 5; low 0-1 (training-set median OS not reached), intermediate 2 (3.9 years), high 3-5 (1.9 years)","purpose":"Sum the Jawhar 2019 mutation-adjusted risk score (MARS) for advanced systemic mastocytosis and return low (0–1), intermediate (2), or high (3–5).","markdown_url":"https://magentlab.com/docs/mars.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"mars"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"MARS points 0-5 (unclamped; max published 5)"},{"name":"max_score","type":"integer","description":"Always 5 (1+1+1+2)"},{"name":"risk_band","type":"string","description":"low when score is 0-1, intermediate when 2, high when 3-5 (Jawhar 2019 training-set MARS). Not a WHO SM diagnosis. Not indolent SM. Not Nazha MDS scores."},{"name":"age","type":"integer","description":"Age in years used for the >60 criterion"},{"name":"hemoglobin_g_dl","type":"number","description":"Hemoglobin in g/dL used for the <10 criterion (g/L inputs converted / 10)"},{"name":"platelets_10e9_l","type":"number","description":"Platelets in 10^9/L used for the <100 criterion"},{"name":"sar_mutation_count","type":"integer","description":"Caller-assigned S/A/R mutation count among SRSF2, ASXL1, RUNX1 (0, 1, or 2 meaning two or more)"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Jawhar et al. J Clin Oncol 2019 MARS citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"50","hemoglobin_g_dl":"12","platelets_10e9_l":"200","sar_mutation_count":"0"},{"age":"50","hemoglobin_g_dl":"12","platelets_10e9_l":"200","sar_mutation_count":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/mars","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/mars?age=50&hemoglobin_g_dl=12&platelets_10e9_l=200&sar_mutation_count=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/mars","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rema","description":"Álvarez-Twose 2012 REMA: male +1, female −1; serum baseline tryptase <15 μg/L −1, 15–25 0, >25 +2; pruritus, hives or angioedema present −2, absent +1; syncope or presyncope +3. Range −4 to +7. Clonality likely iff score ≥2. Caller assigns sex, sBt, cutaneous signs, and syncope. Not a medical device, not a diagnosis of SM, not WHO SM criteria. magent does not assay tryptase.","parameters":[{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"Sex as assigned by the caller (Álvarez-Twose 2012). male scores +1; female scores −1. Always one of these.","required":true,"example":"male"},{"in":"query","name":"tryptase_ug_l","type":"number","description":"Serum baseline tryptase (sBt) in μg/L (1-200). <15 scores −1; 15–25 inclusive scores 0; >25 scores +2. Equal to 15 is not <15; equal to 25 is not >25. magent does not assay tryptase.","required":true,"example":"30"},{"in":"query","name":"pruritus_hives_angioedema","type":"boolean","description":"Presence of pruritus, hives or angioedema as assigned by the caller (Álvarez-Twose 2012). true scores −2; false (absence) scores +1. Both branches score. magent does not take a history.","required":true,"example":"false"},{"in":"query","name":"syncope_or_presyncope","type":"boolean","description":"Syncope or presyncope as assigned by the caller (Álvarez-Twose 2012). true scores +3; false scores 0.","required":true,"example":"true"}],"errors":[{"code":"invalid_rema","message":"REMA needs sex, tryptase_ug_l, pruritus_hives_angioedema, and syncope_or_presyncope (Álvarez-Twose 2012). Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_tryptase","message":"tryptase_ug_l must be a number from 1 to 200 (μg/L). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rema","citation":{"authors":"Alvarez-Twose I, González-de-Olano D, Sánchez-Muñoz L, Matito A, Jara-Acevedo M, Teodosio C, García-Montero A, Morgado JM, Orfao A, Escribano L","doi":"10.1159/000329856","id":"alvarez-twose-2012","pmid":"22042301","source":"Int Arch Allergy Immunol. 2012;157(3):275-280 (Epub 2011 Oct 28)","title":"Validation of the REMA score for predicting mast cell clonality and systemic mastocytosis in patients with systemic mast cell activation symptoms.","url":"https://doi.org/10.1159/000329856"},"formula_expression":"REMA = sex (male +1, female −1) + tryptase_ug_l (<15 −1, 15–25 0, >25 +2) + pruritus_hives_angioedema (true −2, false +1) + syncope_or_presyncope (true +3, false 0); range −4 to +7; clonality_likely iff score >= 2 (Álvarez-Twose 2012)","purpose":"Sum the Álvarez-Twose 2012 REMA points (sex, serum baseline tryptase, pruritus/hives/angioedema, syncope or presyncope) and return whether the total is ≥2 (published clonality and systemic-mastocytosis triage threshold).","markdown_url":"https://magentlab.com/docs/rema.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rema"},{"name":"formula_expression","type":"string","description":"Exact Álvarez-Twose 2012 REMA expression used"},{"name":"sex","type":"string","description":"female or male used"},{"name":"tryptase_ug_l","type":"number","description":"Serum baseline tryptase used in μg/L"},{"name":"score","type":"integer","description":"REMA points −4 to +7"},{"name":"max_score","type":"integer","description":"7"},{"name":"clonality_likely","type":"boolean","description":"true iff score ≥ 2 (Álvarez-Twose 2012 REMA threshold). Not a diagnosis of SM. Not WHO SM criteria."},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Álvarez-Twose 2012 Int Arch Allergy Immunol citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"pruritus_hives_angioedema":"false","sex":"male","syncope_or_presyncope":"true","tryptase_ug_l":"30"},{"pruritus_hives_angioedema":"false","sex":"male","syncope_or_presyncope":"true","tryptase_ug_l":"30"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rema","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rema?sex=male&tryptase_ug_l=30&pruritus_hives_angioedema=false&syncope_or_presyncope=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rema","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/maps","description":"Pardanani 2018 MAPS hybrid clinical-molecular (Figure 3): advanced SM 2 (ASM, SM-AHN, or MCL; ISM/SSM 0), age >60 1, platelets <150×10^9/L 1, ALP above UNL 1, ASXL1/RUNX1/NRAS 1; max 6. Low ≤2, intermediate-1 3, intermediate-2 4, high ≥5. Not WHO SM, not ICC SM, not clinical-only Figure 1. magent does not sequence, assay ALP, or count platelets.","parameters":[{"in":"query","name":"sm_category","type":"string","description":"Caller-assigned SM category for Pardanani 2018 hybrid Figure 3. indolent (ISM/SSM) scores 0. advanced (ASM, SM-AHN, or MCL) scores 2. Other tokens are invalid_maps. Not WHO SM criteria. magent does not assign WHO or ICC SM.","required":true,"example":"advanced"},{"in":"query","name":"age","type":"integer","description":"Age in years (18-120, Params.age). >60 scores 1 (Pardanani 2018 Figure 3). 60 is the ≤60 arm and scores 0.","required":true,"example":"65"},{"in":"query","name":"platelets_10e9_l","type":"number","description":"Platelet count in 10^9/L (1-2000). <150 scores 1 (Pardanani 2018 Figure 3). 150.0 is the ≥150 arm and scores 0. magent does not assay platelets.","required":true,"example":"100"},{"in":"query","name":"alp_above_unl","type":"boolean","description":"Serum alkaline phosphatase above the upper normal limit as assigned by the caller (Pardanani 2018 Figure 3). true scores 1. magent does not assay ALP.","required":true,"example":"true"},{"in":"query","name":"adverse_mutations","type":"boolean","description":"ASXL1, RUNX1, or NRAS as assigned by the caller (Pardanani 2018 hybrid Figure 3). true scores 1. magent does not sequence.","required":true,"example":"false"}],"errors":[{"code":"invalid_maps","message":"sm_category must be indolent or advanced (Pardanani 2018 MAPS hybrid Figure 3: ISM/SSM vs advanced SM). Returned before settlement; you are not charged.","status":400},{"code":"invalid_age","message":"age must be an integer from 18 to 120 Returned before settlement; you are not charged.","status":400},{"code":"invalid_platelets","message":"platelets_10e9_l must be a number from 1 to 2000 Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/maps","citation":{"authors":"Pardanani A, Shah S, Mannelli F, Elala YC, Guglielmelli P, Lasho TL, Patnaik MM, Gangat N, Ketterling RP, Reichard KK, Hanson CA, Vannucchi AM, Tefferi A","doi":"10.1182/bloodadvances.2018026245","id":"pardanani-2018","pmid":"30413432","source":"Blood Adv. 2018;2(21):2964-2972","title":"Mayo alliance prognostic system for mastocytosis: clinical and hybrid clinical-molecular models","url":"https://doi.org/10.1182/bloodadvances.2018026245"},"formula_expression":"MAPS = sm_category_advanced 2 + age_gt_60 1 + platelets_lt_150 1 + alp_above_unl 1 + adverse_mutations 1; Pardanani 2018 hybrid Figure 3; max 6; low ≤2, intermediate_1 3, intermediate_2 4, high ≥5","purpose":"Sum the Pardanani 2018 MAPS hybrid clinical-molecular (Figure 3) points for systemic mastocytosis and return low (≤2), intermediate_1 (3), intermediate_2 (4), or high (≥5).","markdown_url":"https://magentlab.com/docs/maps.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"maps"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"MAPS hybrid Figure 3 points 0-6"},{"name":"max_score","type":"integer","description":"Always 6 (2+1+1+1+1)"},{"name":"risk_band","type":"string","description":"low when score is ≤2, intermediate_1 when 3, intermediate_2 when 4, high when ≥5 (Pardanani 2018 hybrid Figure 3A). Not a diagnosis. Not WHO SM. Not ICC SM. Not clinical-only Figure 1."},{"name":"sm_category","type":"string","description":"Caller-assigned indolent or advanced used for the 0 vs 2-point SM rung"},{"name":"age","type":"integer","description":"Age in years used for the >60 criterion"},{"name":"platelets_10e9_l","type":"number","description":"Platelets in 10^9/L used for the <150 criterion"},{"name":"alp_above_unl","type":"boolean","description":"Caller-assigned serum ALP above UNL flag used"},{"name":"adverse_mutations","type":"boolean","description":"Caller-assigned ASXL1, RUNX1, or NRAS flag used"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Pardanani et al. Blood Adv 2018 MAPS hybrid citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"adverse_mutations":"false","age":"65","alp_above_unl":"true","platelets_10e9_l":"100","sm_category":"advanced"},{"adverse_mutations":"false","age":"65","alp_above_unl":"true","platelets_10e9_l":"100","sm_category":"advanced"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/maps","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/maps?sm_category=advanced&age=65&platelets_10e9_l=100&alp_above_unl=true&adverse_mutations=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/maps","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/scorma","description":"Heide 2001 SCORMA: extent_percent/5 + 5*intensity_sum + 2*symptom_sum/5. Extent 0-100 (diffuse cutaneous mastocytosis is 100). Four intensity signs 0-3 (pigmentation, vesiculation, elevation/induration, Darier's sign). Five symptoms 0-10 (flushing, provocation factors, diarrhoea, bone pain, pruritus). Max 100. magent does not examine the skin. Not a diagnosis, WHO/ICC criteria, REMA, or tryptase.","parameters":[{"in":"query","name":"extent_percent","type":"number","description":"Caller-assigned Heide 2001 SCORMA part A body-surface extent (number 0-100). Diffuse cutaneous mastocytosis is 100. magent does not examine the skin.","required":true,"example":"0"},{"in":"query","name":"pigmentation","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Heide 2001 SCORMA part B pigmentation (integer 0-3). magent does not examine the skin.","required":true,"example":"0"},{"in":"query","name":"vesiculation","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Heide 2001 SCORMA part B vesiculation (integer 0-3). magent does not examine the skin.","required":true,"example":"0"},{"in":"query","name":"elevation_induration","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Heide 2001 SCORMA part B elevation/induration (integer 0-3). magent does not examine the skin.","required":true,"example":"0"},{"in":"query","name":"darier_sign","type":"integer","enum":[0,1,2,3],"description":"Caller-assigned Heide 2001 SCORMA part B Darier's sign (integer 0-3). magent does not examine the skin or assign Darier's sign.","required":true,"example":"0"},{"in":"query","name":"flushing","type":"integer","enum":[0,1,2,3,4,5,6,7,8,9,10],"description":"Caller-assigned Heide 2001 SCORMA part C flushing (integer 0-10). magent does not take a history.","required":true,"example":"0"},{"in":"query","name":"provocation_factors","type":"integer","enum":[0,1,2,3,4,5,6,7,8,9,10],"description":"Caller-assigned Heide 2001 SCORMA part C provocation factors (integer 0-10). magent does not take a history.","required":true,"example":"0"},{"in":"query","name":"diarrhoea","type":"integer","enum":[0,1,2,3,4,5,6,7,8,9,10],"description":"Caller-assigned Heide 2001 SCORMA part C diarrhoea (integer 0-10). magent does not take a history.","required":true,"example":"0"},{"in":"query","name":"bone_pain","type":"integer","enum":[0,1,2,3,4,5,6,7,8,9,10],"description":"Caller-assigned Heide 2001 SCORMA part C bone pain (integer 0-10). magent does not take a history.","required":true,"example":"0"},{"in":"query","name":"pruritus","type":"integer","enum":[0,1,2,3,4,5,6,7,8,9,10],"description":"Caller-assigned Heide 2001 SCORMA part C pruritus (integer 0-10). magent does not take a history.","required":true,"example":"0"}],"errors":[{"code":"invalid_scorma_extent","message":"extent_percent must be a number from 0 to 100 (Heide 2001 SCORMA part A). Returned before settlement; you are not charged.","status":400},{"code":"invalid_scorma_intensity","message":"each SCORMA intensity sign must be an integer from 0 to 3 (Heide 2001 part B). Returned before settlement; you are not charged.","status":400},{"code":"invalid_scorma_symptom","message":"each SCORMA subjective symptom must be an integer from 0 to 10 (Heide 2001 part C). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/scorma","citation":{"authors":"Heide R, Middelkamp Hup MA, Mulder PG, Oranje AP","doi":"10.1080/00015550152572912","id":"heide-2001","pmid":"11720175","source":"Acta Derm Venereol. 2001;81(4):273-276","title":"Clinical scoring of cutaneous mastocytosis","url":"https://doi.org/10.1080/00015550152572912"},"formula_expression":"scorma = extent_percent/5 + 5*intensity_sum + 2*symptom_sum/5; intensity_sum = pigmentation + vesiculation + elevation_induration + darier_sign (each integer 0-3); symptom_sum = flushing + provocation_factors + diarrhoea + bone_pain + pruritus (each integer 0-10); extent_percent 0-100 (diffuse cutaneous mastocytosis is 100); theoretical max 100; Heide 2001; magent does not examine the skin or assign Darier's sign; not a diagnosis; not WHO/ICC mastocytosis criteria; not REMA; not tryptase","purpose":"Compute Heide 2001 SCORMA from caller-assigned body-surface extent (0-100), four intensity signs (each 0-3), and five subjective symptoms (each 0-10) using scorma = extent_percent/5 + 5*intensity_sum + 2*symptom_sum/5. Theoretical max 100. All-zero is 0.","markdown_url":"https://magentlab.com/docs/scorma.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"scorma"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"extent_percent","type":"number","description":"Caller-assigned Heide 2001 part A extent 0-100 used"},{"name":"pigmentation","type":"integer","description":"Caller-assigned pigmentation intensity 0-3 used"},{"name":"vesiculation","type":"integer","description":"Caller-assigned vesiculation intensity 0-3 used"},{"name":"elevation_induration","type":"integer","description":"Caller-assigned elevation/induration intensity 0-3 used"},{"name":"darier_sign","type":"integer","description":"Caller-assigned Darier's sign intensity 0-3 used"},{"name":"intensity_sum","type":"integer","description":"Sum of the four part B intensity signs (0-12)"},{"name":"flushing","type":"integer","description":"Caller-assigned flushing symptom 0-10 used"},{"name":"provocation_factors","type":"integer","description":"Caller-assigned provocation-factor symptom 0-10 used"},{"name":"diarrhoea","type":"integer","description":"Caller-assigned diarrhoea symptom 0-10 used"},{"name":"bone_pain","type":"integer","description":"Caller-assigned bone-pain symptom 0-10 used"},{"name":"pruritus","type":"integer","description":"Caller-assigned pruritus symptom 0-10 used"},{"name":"symptom_sum","type":"integer","description":"Sum of the five part C subjective symptoms (0-50)"},{"name":"scorma","type":"number","description":"Heide 2001 SCORMA index, 1 decimal: extent_percent/5 + 5*intensity_sum + 2*symptom_sum/5 (0-100)"},{"name":"max_score","type":"integer","description":"Always 100 (20 + 60 + 20)"},{"name":"citation","type":"object","description":"Heide et al. Acta Derm Venereol 2001 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"bone_pain":"0","darier_sign":"0","diarrhoea":"0","elevation_induration":"0","extent_percent":"0","flushing":"0","pigmentation":"0","provocation_factors":"0","pruritus":"0","vesiculation":"0"},{"bone_pain":"0","darier_sign":"0","diarrhoea":"0","elevation_induration":"0","extent_percent":"0","flushing":"0","pigmentation":"0","provocation_factors":"0","pruritus":"0","vesiculation":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/scorma","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/scorma?extent_percent=0&pigmentation=0&vesiculation=0&elevation_induration=0&darier_sign=0&flushing=0&provocation_factors=0&diarrhoea=0&bone_pain=0&pruritus=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/scorma","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/ecog","description":"Oken 1982 ECOG performance status: caller-assigned integer 0-4 (fully active; restricted strenuous activity, ambulatory, light work; ambulatory, all self-care, unable to work, up >50% waking hours; limited self-care, bed/chair >50% waking hours; completely disabled, no self-care, totally bed/chair). Grade 5 (dead) is not scored. Returns score, max 4, and a stable label. Not a performance-status assignment and not Karnofsky; magent does not observe the patient.","parameters":[{"in":"query","name":"ecog","type":"integer","description":"Oken 1982 ECOG performance status 0-4 as assigned by the caller (0 fully active; 1 restricted strenuous activity, ambulatory, light work; 2 ambulatory, all self-care, unable to work, up >50% waking hours; 3 limited self-care, bed/chair >50% waking hours; 4 completely disabled, no self-care, totally bed/chair). Grade 5 (dead) is not scored. magent does not observe the patient.","required":true,"example":"0"}],"errors":[{"code":"invalid_ecog_ps","message":"ecog must be an integer from 0 to 4 (Oken 1982). Grade 5 (dead) is not scored. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/ecog","citation":{"authors":"Oken MM, Creech RH, Tormey DC, Horton J, Davis TE, McFadden ET, Carbone PP","doi":"10.1097/00000421-198212000-00014","id":"oken-1982","pmid":"7165009","source":"Am J Clin Oncol. 1982;5(6):649-655","title":"Toxicity and response criteria of the Eastern Cooperative Oncology Group","url":"https://doi.org/10.1097/00000421-198212000-00014"},"formula_expression":"ECOG performance status = caller-assigned integer 0-4 (Oken 1982); max 4; grade 5 (dead) is not scored","purpose":"Return the Oken 1982 ECOG performance status grade 0-4 from a caller-assigned integer, with a stable label.","markdown_url":"https://magentlab.com/docs/ecog.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"ecog"},{"name":"formula_expression","type":"string","description":"Published ECOG grade rule"},{"name":"score","type":"integer","description":"Same as ecog_grade (0-4)"},{"name":"max_score","type":"integer","description":"4"},{"name":"ecog_grade","type":"integer","description":"Caller-assigned Oken 1982 ECOG grade 0-4"},{"name":"ecog_label","type":"string","description":"Stable token for that grade: fully_active, restricted, ambulatory, limited_selfcare, or disabled"},{"name":"components","type":"array","description":"ecog component"},{"name":"citation","type":"object","description":"Oken 1982"},{"name":"disclaimer","type":"string","description":"Not a medical device"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"ecog":"0"},{"ecog":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/ecog","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/ecog?ecog=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/ecog","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/karnofsky","description":"Karnofsky 1949 Performance Status: caller-assigned integer 10, 20, 30, 40, 50, 60, 70, 80, 90, or 100 (normal; minor signs or symptoms; normal activity with effort; cares for self; occasional assistance; considerable assistance and frequent medical care; disabled; severely disabled; very sick, hospitalization necessary; moribund). Grade 0 (dead) is not scored. Returns score, max 100, and a stable label. Not a performance-status assignment and not ECOG; magent does not observe the patient.","parameters":[{"in":"query","name":"kps","type":"integer","description":"Karnofsky 1949 Performance Status 10, 20, 30, 40, 50, 60, 70, 80, 90, or 100 as assigned by the caller (100 normal, no complaints; 90 minor signs or symptoms, normal activity; 80 normal activity with effort; 70 cares for self; 60 occasional assistance; 50 considerable assistance and frequent medical care; 40 disabled; 30 severely disabled; 20 very sick, hospital admission necessary; 10 moribund). Grade 0 (dead) is not scored. magent does not observe the patient.","required":true,"example":"100"}],"errors":[{"code":"invalid_karnofsky","message":"kps must be 10, 20, 30, 40, 50, 60, 70, 80, 90, or 100 (Karnofsky 1949). Grade 0 (dead) is not scored. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/karnofsky","citation":{"authors":"Karnofsky DA, Burchenal JH","id":"karnofsky-1949","source":"In: MacLeod CM, ed. Evaluation of Chemotherapeutic Agents. New York: Columbia University Press; 1949:191-205","title":"The clinical evaluation of chemotherapeutic agents in cancer","url":"https://www.worldcat.org/oclc/1455041"},"formula_expression":"Karnofsky Performance Status = caller-assigned integer 10, 20, 30, 40, 50, 60, 70, 80, 90, or 100 (Karnofsky 1949); max 100; grade 0 (dead) is not scored","purpose":"Return the Karnofsky 1949 Performance Status 10-100 from a caller-assigned integer, with a stable label.","markdown_url":"https://magentlab.com/docs/karnofsky.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"karnofsky"},{"name":"formula_expression","type":"string","description":"Published Karnofsky decade rule"},{"name":"score","type":"integer","description":"Same as kps (10-100 by tens)"},{"name":"max_score","type":"integer","description":"100"},{"name":"kps","type":"integer","description":"Caller-assigned Karnofsky 1949 Performance Status 10-100 by tens"},{"name":"kps_label","type":"string","description":"Stable token for that decade: normal, minor_symptoms, effort, selfcare, occasional_assistance, considerable_assistance, disabled, severely_disabled, very_sick, or moribund"},{"name":"components","type":"array","description":"kps component"},{"name":"citation","type":"object","description":"Karnofsky 1949"},{"name":"disclaimer","type":"string","description":"Not a medical device"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"kps":"100"},{"kps":"100"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/karnofsky","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/karnofsky?kps=100","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/karnofsky","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/manchester","description":"Cerny 1987 Manchester score for small-cell lung cancer: LDH above laboratory ULN, sodium <132 mmol/L, ALP >1.5×ULN, bicarbonate <24 mmol/L, Karnofsky <60, extensive stage; 1 point each, max 6. Good 0–1, intermediate 2–3, poor ≥4. Deterministic published score with citation; not a diagnosis; not the BRCA Manchester score. magent does not stage the cancer, assay labs, or assign Karnofsky performance status.","parameters":[{"in":"query","name":"ldh_gt_uln","type":"boolean","description":"LDH exceeds the laboratory upper limit of normal as assigned by the caller (Cerny 1987). true scores 1. magent does not assay LDH or apply ULN.","required":true,"example":"false"},{"in":"query","name":"sodium_mmol_l","type":"number","description":"Serum sodium in mmol/L (110-160). Cerny 1987 scores 1 when sodium is <132 mmol/L; 132 scores 0.","required":true,"example":"140"},{"in":"query","name":"alp_gt_1_5_uln","type":"boolean","description":"ALP >1.5 × laboratory ULN as assigned by the caller (Cerny 1987). true scores 1. magent does not assay ALP or apply ULN.","required":true,"example":"false"},{"in":"query","name":"bicarbonate_mmol_l","type":"number","description":"Serum bicarbonate in mmol/L (2-45). Cerny 1987 scores 1 when bicarbonate is <24 mmol/L; 24 scores 0.","required":true,"example":"24"},{"in":"query","name":"kps","type":"integer","description":"Karnofsky 1949 Performance Status 10, 20, 30, 40, 50, 60, 70, 80, 90, or 100 as assigned by the caller. Cerny 1987 scores 1 when kps is <60; 60 scores 0. Grade 0 (dead) is not scored. magent does not observe the patient.","required":true,"example":"80"},{"in":"query","name":"extensive_stage","type":"boolean","description":"Extensive-stage small-cell lung cancer as assigned by the caller (Cerny 1987). true scores 1. magent does not stage the cancer.","required":true,"example":"false"}],"errors":[{"code":"invalid_sodium","message":"sodium_mmol_l must be a number from 110 to 160 Returned before settlement; you are not charged.","status":400},{"code":"invalid_bicarbonate","message":"bicarbonate_mmol_l must be a number from 2 to 45. Returned before settlement; you are not charged.","status":400},{"code":"invalid_karnofsky","message":"kps must be 10, 20, 30, 40, 50, 60, 70, 80, 90, or 100 (Karnofsky 1949). Grade 0 (dead) is not scored. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/manchester","citation":{"authors":"Cerny T, Blair V, Anderson H, Bramwell V, Thatcher N","doi":"10.1002/ijc.2910390204","id":"cerny-1987","pmid":"3026969","source":"Int J Cancer. 1987;39(2):146-149","title":"Pretreatment prognostic factors and scoring system in 407 small-cell lung cancer patients","url":"https://doi.org/10.1002/ijc.2910390204"},"formula_expression":"Manchester = ldh_gt_uln 1 + sodium_lt_132 1 + alp_gt_1_5_uln 1 + bicarbonate_lt_24 1 + kps_lt_60 1 + extensive_stage 1; Cerny 1987; max 6; good 0-1, intermediate 2-3, poor ≥4","purpose":"Sum the Cerny 1987 Manchester pretreatment factors for small-cell lung cancer and return good (0–1), intermediate (2–3), or poor (≥4).","markdown_url":"https://magentlab.com/docs/manchester.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"manchester"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Cerny 1987 Manchester points 0-6"},{"name":"max_score","type":"integer","description":"Always 6"},{"name":"prognostic_group","type":"string","description":"good when score is 0–1, intermediate when 2–3, poor when 4–6 (Cerny 1987). Not a diagnosis. Not the BRCA Manchester score. magent does not stage the cancer."},{"name":"sodium_mmol_l","type":"number","description":"Parsed sodium_mmol_l (110-160)"},{"name":"bicarbonate_mmol_l","type":"number","description":"Parsed bicarbonate_mmol_l (2-45)"},{"name":"kps","type":"integer","description":"Caller-assigned Karnofsky 1949 Performance Status 10-100 by tens"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Cerny 1987 Int J Cancer citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"alp_gt_1_5_uln":"false","bicarbonate_mmol_l":"24","extensive_stage":"false","kps":"80","ldh_gt_uln":"false","sodium_mmol_l":"140"},{"alp_gt_1_5_uln":"false","bicarbonate_mmol_l":"24","extensive_stage":"false","kps":"80","ldh_gt_uln":"false","sodium_mmol_l":"140"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/manchester","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/manchester?ldh_gt_uln=false&sodium_mmol_l=140&alp_gt_1_5_uln=false&bicarbonate_mmol_l=24&kps=80&extensive_stage=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/manchester","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/lansky","description":"Lansky 1987 Play-Performance Scale: caller-assigned integer 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, or 100 from parent-rated play over the past week (fully active; minor physical restriction; tires more quickly; restricted play; quieter activities; lying around, quiet play; mostly in bed; bedbound; often sleeping; no play; unresponsive). Grade 0 is scored. Returns score, max 100, and a stable label. Not a performance-status assignment, not Karnofsky, not ECOG; magent does not observe the child.","parameters":[{"in":"query","name":"lps","type":"integer","description":"Lansky 1987 Play-Performance Scale 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, or 100 as assigned by the caller from parent-rated play-performance over the past week (100 fully active, normal; 90 minor restrictions in physically strenuous activity; 80 active, but tires more quickly; 70 greater restriction of play and less time spent in play; 60 up and around, but active play minimal, keeps busy with quieter activities; 50 lying around much of the day, but gets dressed, no active play, participates in all quiet play and activities; 40 mostly in bed, participates in quiet activities; 30 in bed, needs assistance even for quiet play; 20 sleeping often, play entirely limited to very passive activities; 10 does not play, does not get out of bed; 0 unresponsive). Grade 0 (unresponsive) is scored. magent does not observe the child.","required":true,"example":"100"}],"errors":[{"code":"invalid_lansky","message":"lps must be 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, or 100 (Lansky 1987). Grade 0 (unresponsive) is scored. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/lansky","citation":{"authors":"Lansky SB, List MA, Lansky LL, Ritter-Sterr C, Miller DR","doi":"10.1002/1097-0142(19871001)60:7<1651::AID-CNCR2820600738>3.0.CO;2-J","id":"lansky-1987","pmid":"3621134","source":"Cancer. 1987;60(7):1651-1656","title":"The measurement of performance in childhood cancer patients","url":"https://doi.org/10.1002/1097-0142(19871001)60:7<1651::AID-CNCR2820600738>3.0.CO;2-J"},"formula_expression":"Lansky 1987 Play-Performance Scale = caller-assigned integer 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, or 100 (Lansky 1987); max 100; grade 0 (unresponsive) is scored","purpose":"Return the Lansky 1987 Play-Performance Scale 0-100 from a caller-assigned integer, with a stable label.","markdown_url":"https://magentlab.com/docs/lansky.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"lansky"},{"name":"formula_expression","type":"string","description":"Published Lansky decade rule"},{"name":"score","type":"integer","description":"Same as lps (0-100 by tens)"},{"name":"max_score","type":"integer","description":"100"},{"name":"lps","type":"integer","description":"Caller-assigned Lansky 1987 Play-Performance Scale 0-100 by tens"},{"name":"lps_label","type":"string","description":"Stable token for that decade: fully_active, minor_restriction, active_tires, restricted_play, quiet_activities, lying_around, mostly_in_bed, bedbound, often_sleeping, no_play, or unresponsive"},{"name":"components","type":"array","description":"lps component"},{"name":"citation","type":"object","description":"Lansky 1987"},{"name":"disclaimer","type":"string","description":"Not a medical device"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"lps":"100"},{"lps":"100"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/lansky","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/lansky?lps=100","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/lansky","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/gelf","description":"GELF criteria (Brice 1997). High tumor burden in follicular lymphoma if any of eight caller-assigned items: mass >7 cm; ≥3 nodes each >3 cm; B symptoms; spleen below umbilicus; compression; serous effusion; leukemic phase; cytopenia. Any yes is high_burden. Not a treatment order, not FLIPI, not IPI, not modified GELF. magent does not measure nodes, spleen, counts, or effusions.","parameters":[{"in":"query","name":"mass_gt_7cm","type":"boolean","description":"Any nodal or extranodal tumor mass >7 cm as assigned by the caller. true or false. magent does not measure nodes or extranodal masses.","required":true,"example":"false"},{"in":"query","name":"three_nodes_gt_3cm","type":"boolean","description":"At least 3 nodal sites, each with diameter >3 cm, as assigned by the caller. true or false. magent does not count or measure nodes.","required":true,"example":"false"},{"in":"query","name":"b_symptoms","type":"boolean","description":"Systemic / B symptoms as assigned by the caller. true or false. magent does not take a history.","required":true,"example":"false"},{"in":"query","name":"spleen_below_umbilicus","type":"boolean","description":"Substantial splenic enlargement (inferior margin below the umbilicus) as assigned by the caller. true or false. magent does not measure the spleen.","required":true,"example":"false"},{"in":"query","name":"compression","type":"boolean","description":"Compression syndrome (ureter, GI tract, great vessels, or other vital organ as assigned by the caller). true or false. magent does not diagnose compression.","required":true,"example":"false"},{"in":"query","name":"effusion","type":"boolean","description":"Pleural or peritoneal serous effusion as assigned by the caller. true or false. magent does not image or tap an effusion.","required":true,"example":"false"},{"in":"query","name":"leukemic_phase","type":"boolean","description":"Leukemic phase as assigned by the caller (paper: circulating malignant cells >5.0×10^9/L). true or false. magent does not count cells.","required":true,"example":"false"},{"in":"query","name":"cytopenia","type":"boolean","description":"Cytopenia as assigned by the caller (paper: granulocytes <1.0×10^9/L and/or platelets <100×10^9/L). true or false. magent does not count cells.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/gelf","citation":{"authors":"Brice P, Bastion Y, Lepage E, Brousse N, Haïoun C, Moreau P, Straetmans N, Tilly H, Tabah I, Solal-Céligny P","doi":"10.1200/JCO.1997.15.3.1110","id":"brice-1997","pmid":"9060552","source":"J Clin Oncol. 1997;15(3):1110-1117","title":"Comparison in low-tumor-burden follicular lymphomas between an initial no-treatment policy, prednimustine, or interferon alfa: a randomized study from the Groupe d'Etude des Lymphomes Folliculaires","url":"https://doi.org/10.1200/JCO.1997.15.3.1110"},"formula_expression":"high tumor burden iff any of the 8 Brice 1997 GELF criteria","purpose":"Apply the Brice 1997 GELF high-tumor-burden checklist and return low_burden or high_burden from eight caller-assigned items.","markdown_url":"https://magentlab.com/docs/gelf.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"gelf"},{"name":"formula_expression","type":"string","description":"High tumor burden iff any of the 8 Brice 1997 GELF criteria"},{"name":"tumor_burden","type":"string","description":"low_burden when all eight criteria are absent; high_burden when any criterion is present. Not a treatment order."},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met; met is true when that GELF criterion is present"},{"name":"citation","type":"object","description":"Brice 1997 J Clin Oncol citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"b_symptoms":"false","compression":"false","cytopenia":"false","effusion":"false","leukemic_phase":"false","mass_gt_7cm":"false","spleen_below_umbilicus":"false","three_nodes_gt_3cm":"false"},{"b_symptoms":"false","compression":"false","cytopenia":"false","effusion":"false","leukemic_phase":"false","mass_gt_7cm":"false","spleen_below_umbilicus":"false","three_nodes_gt_3cm":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/gelf","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/gelf?mass_gt_7cm=false&three_nodes_gt_3cm=false&b_symptoms=false&spleen_below_umbilicus=false&compression=false&effusion=false&leukemic_phase=false&cytopenia=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/gelf","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/imdc","description":"Heng 2009 IMDC: KPS <80, diagnosis-to-treatment <1 year, hemoglobin <LLN, corrected calcium >ULN, neutrophils >ULN, platelets >ULN; 1 point each, max 6. Favorable 0, intermediate 1–2, poor ≥3. Deterministic published score with citation; not an RCC diagnosis or treatment recommendation. magent does not assign KPS or compare Hb, Ca, ANC, or platelets to institutional LLN/ULN.","parameters":[{"in":"query","name":"kps_lt_80","type":"boolean","description":"Karnofsky performance status <80 as assigned by the caller (Heng 2009). true scores 1. magent does not assign KPS.","required":true,"example":"false"},{"in":"query","name":"diagnosis_to_treatment_lt_1_year","type":"boolean","description":"Time from diagnosis to systemic treatment <1 year as assigned by the caller (Heng 2009). true scores 1. magent does not date the interval.","required":true,"example":"false"},{"in":"query","name":"hemoglobin_lt_lln","type":"boolean","description":"Hemoglobin below the institutional lower limit of normal as assigned by the caller (Heng 2009). true scores 1. magent does not assay hemoglobin or apply LLN.","required":true,"example":"false"},{"in":"query","name":"corrected_calcium_gt_uln","type":"boolean","description":"Corrected calcium above the institutional upper limit of normal as assigned by the caller (Heng 2009). true scores 1. magent does not assay calcium or apply ULN.","required":true,"example":"false"},{"in":"query","name":"neutrophils_gt_uln","type":"boolean","description":"Neutrophils above the institutional upper limit of normal as assigned by the caller (Heng 2009). true scores 1. magent does not assay ANC or apply ULN.","required":true,"example":"false"},{"in":"query","name":"platelets_gt_uln","type":"boolean","description":"Platelets above the institutional upper limit of normal as assigned by the caller (Heng 2009). true scores 1. magent does not assay platelets or apply ULN.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/imdc","citation":{"authors":"Heng DY, Xie W, Regan MM, Warren MA, Golshayan AR, Sahi C, Eigl BJ, Ruether JD, Cheng T, North S, Venner P, Knox JJ, Chi KN, Kollmannsberger C, McDermott DF, Rini BI, Bukowski RM, Rha SY, Choueiri TK","doi":"10.1200/JCO.2008.21.4809","id":"heng-2009","pmid":"19826129","source":"J Clin Oncol. 2009;27(34):5794-5799","title":"Prognostic factors for overall survival in patients with metastatic renal cell carcinoma treated with vascular endothelial growth factor-targeted agents: results from a large, multicenter study","url":"https://doi.org/10.1200/JCO.2008.21.4809"},"formula_expression":"IMDC = kps_lt_80 1 + diagnosis_to_treatment_lt_1_year 1 + hemoglobin_lt_lln 1 + corrected_calcium_gt_uln 1 + neutrophils_gt_uln 1 + platelets_gt_uln 1; Heng 2009; max 6; favorable 0, intermediate 1-2, poor ≥3","purpose":"Sum the Heng 2009 IMDC adverse factors for metastatic RCC treated with VEGF-targeted agents and return favorable (0), intermediate (1–2), or poor (3–6). Heng 2009 reported 2-year OS 75% (median not reached), 53% (median 27 months), and 7% (median 8.8 months) in those groups.","markdown_url":"https://magentlab.com/docs/imdc.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"imdc"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"IMDC points 0-6"},{"name":"max_score","type":"integer","description":"Always 6"},{"name":"imdc_band","type":"string","description":"favorable when score is 0 (Heng 2009: 2-year OS 75%; median OS not reached), intermediate when 1–2 (median OS 27 months; 2-year OS 53%), poor when 3–6 (median OS 8.8 months; 2-year OS 7%). Not an RCC diagnosis or treatment recommendation. Caller assigns KPS and lab flags versus institutional LLN/ULN."},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Heng 2009 J Clin Oncol citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"corrected_calcium_gt_uln":"false","diagnosis_to_treatment_lt_1_year":"false","hemoglobin_lt_lln":"false","kps_lt_80":"false","neutrophils_gt_uln":"false","platelets_gt_uln":"false"},{"corrected_calcium_gt_uln":"false","diagnosis_to_treatment_lt_1_year":"false","hemoglobin_lt_lln":"false","kps_lt_80":"false","neutrophils_gt_uln":"false","platelets_gt_uln":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/imdc","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/imdc?kps_lt_80=false&diagnosis_to_treatment_lt_1_year=false&hemoglobin_lt_lln=false&corrected_calcium_gt_uln=false&neutrophils_gt_uln=false&platelets_gt_uln=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/imdc","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/motzer","description":"Motzer 1999 MSKCC: KPS <80, LDH >1.5×ULN, hemoglobin <LLN, corrected calcium >10 mg/dL, no prior nephrectomy; 1 point each, max 5. Favorable 0, intermediate 1–2, poor ≥3. Deterministic published score with citation; not an RCC diagnosis or treatment recommendation; not IMDC; not Motzer 2002/2004. magent does not assign KPS or assay LDH, hemoglobin, or calcium.","parameters":[{"in":"query","name":"kps_lt_80","type":"boolean","description":"Karnofsky performance status <80% as assigned by the caller (Motzer 1999). true scores 1. magent does not observe KPS.","required":true,"example":"false"},{"in":"query","name":"ldh_gt_1_5_uln","type":"boolean","description":"Serum LDH >1.5 × institutional ULN as assigned by the caller (Motzer 1999). true scores 1. magent does not assay LDH or apply ULN.","required":true,"example":"false"},{"in":"query","name":"hemoglobin_lt_lln","type":"boolean","description":"Hemoglobin below the institutional lower limit of normal as assigned by the caller (Motzer 1999). true scores 1. magent does not assay hemoglobin or apply LLN.","required":true,"example":"false"},{"in":"query","name":"corrected_calcium_gt_10","type":"boolean","description":"Corrected calcium >10 mg/dL as assigned by the caller (Motzer 1999 paper threshold, not institutional ULN). true scores 1. magent does not assay calcium.","required":true,"example":"false"},{"in":"query","name":"no_prior_nephrectomy","type":"boolean","description":"Absence of prior nephrectomy as assigned by the caller (Motzer 1999). true scores 1. Not Motzer 2004 time from diagnosis to treatment. magent does not review operative history.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/motzer","citation":{"authors":"Motzer RJ, Mazumdar M, Bacik J, Berg W, Amsterdam A, Ferrara J.","doi":"10.1200/JCO.1999.17.8.2530","id":"motzer-1999","pmid":"10561319","source":"J Clin Oncol. 1999;17(8):2530-2540","title":"Survival and prognostic stratification of 670 patients with advanced renal cell carcinoma","url":"https://doi.org/10.1200/JCO.1999.17.8.2530"},"formula_expression":"Motzer = kps_lt_80 1 + ldh_gt_1_5_uln 1 + hemoglobin_lt_lln 1 + corrected_calcium_gt_10 1 + no_prior_nephrectomy 1; Motzer 1999; max 5; favorable 0, intermediate 1-2, poor ≥3","purpose":"Sum the Motzer 1999 MSKCC adverse factors for advanced RCC and return favorable (0), intermediate (1–2), or poor (≥3). Motzer 1999 reported median survival of 20, 10, and 4 months in those interferon-era groups as published cohort results, not a predicted survival.","markdown_url":"https://magentlab.com/docs/motzer.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"motzer"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Motzer 1999 points 0-5"},{"name":"max_score","type":"integer","description":"Always 5"},{"name":"motzer_band","type":"string","description":"favorable when score is 0, intermediate when 1–2, poor when 3–5 (Motzer 1999 MSKCC). Not an RCC diagnosis or treatment recommendation. Not IMDC. Not Motzer 2002/2004. Caller assigns KPS, LDH vs 1.5×ULN, hemoglobin vs LLN, corrected calcium vs 10 mg/dL, and prior nephrectomy."},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Motzer 1999 J Clin Oncol citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"corrected_calcium_gt_10":"false","hemoglobin_lt_lln":"false","kps_lt_80":"false","ldh_gt_1_5_uln":"false","no_prior_nephrectomy":"false"},{"corrected_calcium_gt_10":"false","hemoglobin_lt_lln":"false","kps_lt_80":"false","ldh_gt_1_5_uln":"false","no_prior_nephrectomy":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/motzer","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/motzer?kps_lt_80=false&ldh_gt_1_5_uln=false&hemoglobin_lt_lln=false&corrected_calcium_gt_10=false&no_prior_nephrectomy=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/motzer","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/mekhail","description":"Mekhail 2005 Motzer extension: KPS <80, LDH >1.5x ULN, hemoglobin <LLN, corrected calcium >10 mg/dL, prior radiotherapy, >=2 metastatic sites; 1 point each, max 6. Favorable 0-1, intermediate 2, poor >=3. Not Motzer 1999 0 / 1-2 / >=3. Not Motzer 2002 time-to-treatment. Mekhail dropped no-prior-nephrectomy. Deterministic published score with citation; not an RCC diagnosis or treatment recommendation; not IMDC. magent does not assign KPS, assay LDH, hemoglobin, or calcium, or image metastases.","parameters":[{"in":"query","name":"kps_lt_80","type":"boolean","description":"Karnofsky performance status <80% as assigned by the caller (Mekhail 2005; Motzer 1999 factor that remained independent). true scores 1. magent does not observe KPS.","required":true,"example":"false"},{"in":"query","name":"ldh_gt_1_5_uln","type":"boolean","description":"Serum LDH >1.5 × institutional ULN as assigned by the caller (Mekhail 2005; Motzer 1999 factor that remained independent). true scores 1. magent does not assay LDH or apply ULN.","required":true,"example":"false"},{"in":"query","name":"hemoglobin_lt_lln","type":"boolean","description":"Hemoglobin below the institutional lower limit of normal as assigned by the caller (Mekhail 2005; Motzer 1999 factor that remained independent). true scores 1. magent does not assay hemoglobin or apply LLN.","required":true,"example":"false"},{"in":"query","name":"corrected_calcium_gt_10","type":"boolean","description":"Corrected calcium >10 mg/dL as assigned by the caller (Mekhail 2005; Motzer 1999 paper threshold, not institutional ULN). true scores 1. magent does not assay calcium.","required":true,"example":"false"},{"in":"query","name":"prior_radiotherapy","type":"boolean","description":"Prior radiotherapy as assigned by the caller (Mekhail 2005). true scores 1. magent does not review radiotherapy history.","required":true,"example":"false"},{"in":"query","name":"metastatic_sites_ge_2","type":"boolean","description":"Two or more metastatic sites as assigned by the caller (Mekhail 2005: number of sites 0–1 vs 2–3 as surrogate for individual hepatic, lung, and retroperitoneal nodal sites). true scores 1. magent does not image metastases.","required":true,"example":"false"}],"errors":[{"code":"invalid_mekhail","message":"Mekhail Motzer-extension inputs must match Mekhail 2005 Motzer factors, prior radiotherapy, and metastatic-site count from that paper. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/mekhail","citation":{"authors":"Mekhail TM, Abou-Jawde RM, Boumerhi G, Malhi S, Wood L, Elson P, Bukowski R","doi":"10.1200/JCO.2005.05.179","id":"mekhail-2005","pmid":"15681528","source":"J Clin Oncol. 2005;23(4):832-841","title":"Validation and extension of the Memorial Sloan-Kettering prognostic factors model for survival in patients with previously untreated metastatic renal cell carcinoma","url":"https://doi.org/10.1200/JCO.2005.05.179"},"formula_expression":"Mekhail = kps_lt_80 1 + ldh_gt_1_5_uln 1 + hemoglobin_lt_lln 1 + corrected_calcium_gt_10 1 + prior_radiotherapy 1 + metastatic_sites_ge_2 1; Mekhail 2005; max 6; favorable 0-1, intermediate 2, poor ≥3","purpose":"Sum the Mekhail 2005 Motzer-extension factors (four Motzer 1999 factors that remained independent, plus prior radiotherapy and ≥2 metastatic sites) and return favorable (0–1), intermediate (2), or poor (≥3). Mekhail dropped Motzer’s no-prior-nephrectomy item.","markdown_url":"https://magentlab.com/docs/mekhail.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"mekhail"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Mekhail 2005 points 0-6"},{"name":"max_score","type":"integer","description":"Always 6"},{"name":"mekhail_band","type":"string","description":"favorable when score is 0 or 1, intermediate when 2, poor when 3–6 (Mekhail 2005). Not Motzer 1999 0 / 1–2 / ≥3. Not Motzer 2002 time-to-treatment. Not an RCC diagnosis or treatment recommendation. Not IMDC. Caller assigns KPS, LDH vs 1.5×ULN, hemoglobin vs LLN, corrected calcium vs 10 mg/dL, prior radiotherapy, and ≥2 metastatic sites."},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Mekhail 2005 J Clin Oncol citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"corrected_calcium_gt_10":"false","hemoglobin_lt_lln":"false","kps_lt_80":"false","ldh_gt_1_5_uln":"false","metastatic_sites_ge_2":"false","prior_radiotherapy":"false"},{"corrected_calcium_gt_10":"false","hemoglobin_lt_lln":"false","kps_lt_80":"false","ldh_gt_1_5_uln":"false","metastatic_sites_ge_2":"false","prior_radiotherapy":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/mekhail","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/mekhail?kps_lt_80=false&ldh_gt_1_5_uln=false&hemoglobin_lt_lln=false&corrected_calcium_gt_10=false&prior_radiotherapy=false&metastatic_sites_ge_2=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/mekhail","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/myeloma-iss","description":"Greipp 2005 International Staging System for multiple myeloma. Stage I: serum beta-2 microglobulin <3.5 mg/L and albumin >=3.5 g/dL. Stage III: beta-2 microglobulin >=5.5 mg/L. Stage II: neither I nor III. Returns iss_stage 1/2/3. Not a myeloma diagnosis or treatment choice; not R-ISS (no LDH, no cytogenetics); not trauma ISS. magent does not assay beta-2 microglobulin or albumin.","parameters":[{"in":"query","name":"beta2_microglobulin_mg_l","type":"number","description":"Serum beta-2 microglobulin in mg/L (0.2-40). Greipp 2005 Sβ2M. Stage I requires < 3.5; stage III when >= 5.5. magent does not assay beta-2 microglobulin.","required":true,"example":"2.0"},{"in":"query","name":"albumin_g_dl","type":"number","description":"Serum albumin in g/dL (1-6). Provide this or albumin_g_l, not both. Greipp 2005 stages use g/dL. Stage I requires albumin >= 3.5 when Sβ2M < 3.5. Ignored when Sβ2M >= 5.5.","required":false,"example":"4.0"},{"in":"query","name":"albumin_g_l","type":"number","description":"Serum albumin in g/L (10-60). Converted as g/dL = g/L / 10. Provide this or albumin_g_dl, not both.","required":false,"example":"40"}],"errors":[{"code":"invalid_beta2_microglobulin","message":"beta2_microglobulin_mg_l must be a number from 0.2 to 40 (Greipp 2005 ISS). Returned before settlement; you are not charged.","status":400},{"code":"invalid_albumin","message":"albumin_g_dl (1-6) or albumin_g_l (10-60) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/myeloma-iss","citation":{"authors":"Greipp PR, San Miguel J, Durie BGM, Crowley JJ, Barlogie B, Bladé J, Boccadoro M, Child JA, Avet-Loiseau H, Kyle RA, Lahuerta JJ, Ludwig H, Morgan G, Powles R, Shimizu K, Shustik C, Sonneveld P, Tosi P, Turesson I, Westin J","doi":"10.1200/JCO.2005.04.242","id":"greipp-2005","pmid":"15809451","source":"J Clin Oncol. 2005;23(15):3412-3420","title":"International staging system for multiple myeloma","url":"https://doi.org/10.1200/JCO.2005.04.242"},"formula_expression":"ISS stage I: beta2_microglobulin_mg_l < 3.5 AND albumin_g_dl >= 3.5; stage III: beta2_microglobulin_mg_l >= 5.5; stage II: neither I nor III (Greipp 2005)","purpose":"Apply the Greipp 2005 International Staging System for multiple myeloma from serum beta-2 microglobulin and albumin.","markdown_url":"https://magentlab.com/docs/myeloma-iss.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"myeloma_iss"},{"name":"formula_expression","type":"string","description":"Greipp 2005 ISS stage I / II / III rules in paper units (mg/L and g/dL)"},{"name":"beta2_microglobulin_mg_l","type":"number","description":"Serum beta-2 microglobulin used in mg/L"},{"name":"albumin_g_dl","type":"number","description":"Serum albumin used in g/dL (after g/L conversion when supplied)"},{"name":"iss_stage","type":"integer","description":"1, 2, or 3 (Greipp 2005 ISS). Not Roman in this field."},{"name":"iss_stage_label","type":"string","description":"I, II, or III matching iss_stage"},{"name":"citation","type":"object","description":"Greipp 2005 J Clin Oncol citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"albumin_g_dl":"4.0","beta2_microglobulin_mg_l":"2.0"},{"albumin_g_dl":"4.0","beta2_microglobulin_mg_l":"2.0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/myeloma-iss","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/myeloma-iss?beta2_microglobulin_mg_l=2.0&albumin_g_dl=4.0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/myeloma-iss","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/r-iss","description":"Palumbo 2015 R-ISS for multiple myeloma. ISS from beta-2 microglobulin and albumin (Greipp 2005). R-ISS I: ISS I, standard-risk iFISH CA, and normal LDH. R-ISS III: ISS III plus high-risk CA (del(17p) and/or t(4;14) and/or t(14;16)) or LDH > ULN. R-ISS II: all other combinations. Not a myeloma diagnosis or treatment choice; not R2-ISS; not Durie-Salmon. magent does not assay beta-2 microglobulin, albumin, LDH, or cytogenetics.","parameters":[{"in":"query","name":"beta2_microglobulin_mg_l","type":"number","description":"Serum beta-2 microglobulin in mg/L (0.2-40). Greipp 2005 / Palumbo 2015 ISS. Stage I requires < 3.5; stage III when >= 5.5. magent does not assay beta-2 microglobulin.","required":true,"example":"2.0"},{"in":"query","name":"albumin_g_dl","type":"number","description":"Serum albumin in g/dL (1-6). Provide this or albumin_g_l, not both. ISS uses g/dL. Stage I requires albumin >= 3.5 when Sβ2M < 3.5. Ignored when Sβ2M >= 5.5.","required":false,"example":"4.0"},{"in":"query","name":"albumin_g_l","type":"number","description":"Serum albumin in g/L (10-60). Converted as g/dL = g/L / 10. Provide this or albumin_g_dl, not both.","required":false,"example":"40"},{"in":"query","name":"high_risk_ca","type":"boolean","description":"High-risk cytogenetic abnormalities as assigned by the caller: true iff del(17p) and/or t(4;14) and/or t(14;16) by iFISH (Palumbo 2015). magent does not FISH.","required":true,"example":"false"},{"in":"query","name":"ldh_gt_uln","type":"boolean","description":"Serum LDH greater than the upper limit of normal as assigned by the caller (Palumbo 2015: high LDH is > ULN). magent does not assay LDH or assign ULN.","required":true,"example":"false"}],"errors":[{"code":"invalid_beta2_microglobulin","message":"beta2_microglobulin_mg_l must be a number from 0.2 to 40 (Greipp 2005 ISS). Returned before settlement; you are not charged.","status":400},{"code":"invalid_albumin","message":"albumin_g_dl (1-6) or albumin_g_l (10-60) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/r-iss","citation":{"authors":"Palumbo A, Avet-Loiseau H, Oliva S, et al.","doi":"10.1200/JCO.2015.61.2267","id":"palumbo-2015","pmid":"26240224","source":"J Clin Oncol. 2015;33(26):2863-2869","title":"Revised International Staging System for Multiple Myeloma: A Report From International Myeloma Working Group","url":"https://doi.org/10.1200/JCO.2015.61.2267"},"formula_expression":"R-ISS I: ISS I AND high_risk_ca false AND ldh_gt_uln false; R-ISS III: ISS III AND (high_risk_ca OR ldh_gt_uln); R-ISS II: all other combinations. ISS I: beta2_microglobulin_mg_l < 3.5 AND albumin_g_dl >= 3.5; ISS III: beta2_microglobulin_mg_l >= 5.5; ISS II: neither I nor III (Palumbo 2015; ISS as Greipp 2005)","purpose":"Apply the Palumbo 2015 Revised International Staging System for multiple myeloma from ISS (beta-2 microglobulin and albumin), caller-assigned high-risk cytogenetic abnormalities, and LDH above the upper limit of normal.","markdown_url":"https://magentlab.com/docs/r-iss.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"r_iss"},{"name":"formula_expression","type":"string","description":"Palumbo 2015 R-ISS I / II / III from ISS plus high_risk_ca and ldh_gt_uln (ISS as Greipp 2005)"},{"name":"beta2_microglobulin_mg_l","type":"number","description":"Serum beta-2 microglobulin used in mg/L"},{"name":"albumin_g_dl","type":"number","description":"Serum albumin used in g/dL (after g/L conversion when supplied)"},{"name":"high_risk_ca","type":"boolean","description":"Caller-assigned high-risk iFISH CA (del(17p) and/or t(4;14) and/or t(14;16))"},{"name":"ldh_gt_uln","type":"boolean","description":"Caller-assigned serum LDH greater than the upper limit of normal"},{"name":"iss_stage","type":"integer","description":"1, 2, or 3 (Greipp 2005 ISS). Not Roman in this field."},{"name":"iss_stage_label","type":"string","description":"I, II, or III matching iss_stage"},{"name":"riss_stage","type":"integer","description":"1, 2, or 3 (Palumbo 2015 R-ISS). Not Roman in this field."},{"name":"riss_stage_label","type":"string","description":"I, II, or III matching riss_stage"},{"name":"citation","type":"object","description":"Palumbo 2015 J Clin Oncol citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"albumin_g_dl":"4.0","beta2_microglobulin_mg_l":"2.0","high_risk_ca":"false","ldh_gt_uln":"false"},{"albumin_g_dl":"4.0","beta2_microglobulin_mg_l":"2.0","high_risk_ca":"false","ldh_gt_uln":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/r-iss","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/r-iss?beta2_microglobulin_mg_l=2.0&albumin_g_dl=4.0&high_risk_ca=false&ldh_gt_uln=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/r-iss","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/imwg-myeloma","description":"IMWG 2014 myeloma requiring therapy (Rajkumar 2014). Met when clonal BMPC ≥10% or biopsy-proven plasmacytoma plus ≥1 MDE: hypercalcemia, renal insufficiency, anemia, osteolytic lesion (CRAB), or BMPC ≥60%, involved:uninvolved FLC ratio ≥100 with involved FLC ≥100 mg/L, or >1 focal MRI lesion ≥5 mm (SLiM). Not a diagnosis. Not smouldering MM, MGUS, POEMS, or amyloid. Not Greipp ISS or R-ISS. magent does not assay calcium, creatinine, hemoglobin, or FLC, and does not read MRI.","parameters":[{"in":"query","name":"clonal_bmpc_ge_10_or_plasmacytoma","type":"boolean","description":"Clonal bone marrow plasma cells ≥10% or biopsy-proven bony or extramedullary plasmacytoma, as assigned by the caller (Rajkumar 2014 IMWG entry for myeloma requiring therapy). true or false. When false, myeloma is false even if a myeloma-defining event is true. magent does not read a marrow or biopsy.","required":true,"example":"true"},{"in":"query","name":"hypercalcemia","type":"boolean","description":"Hypercalcemia as assigned by the caller (Rajkumar 2014 CRAB): serum calcium >0.25 mmol/L (>1 mg/dL) above the upper limit of normal or >2.75 mmol/L (>11 mg/dL). true or false. magent does not assay calcium.","required":true,"example":"true"},{"in":"query","name":"renal_insufficiency","type":"boolean","description":"Renal insufficiency as assigned by the caller (Rajkumar 2014 CRAB): creatinine clearance <40 mL/min or serum creatinine >177 µmol/L (>2 mg/dL). true or false. magent does not assay creatinine.","required":true,"example":"false"},{"in":"query","name":"anemia","type":"boolean","description":"Anemia as assigned by the caller (Rajkumar 2014 CRAB): hemoglobin value >20 g/L below the lower limit of normal or hemoglobin <100 g/L. true or false. magent does not assay hemoglobin.","required":true,"example":"false"},{"in":"query","name":"osteolytic_lesion","type":"boolean","description":"One or more osteolytic lesions on skeletal radiography, CT, or PET-CT, as assigned by the caller (Rajkumar 2014 CRAB). If marrow clonal plasma cells are <10%, more than one bone lesion is required to distinguish solitary plasmacytoma; that is the caller’s assignment of this flag. true or false. magent does not read imaging.","required":true,"example":"false"},{"in":"query","name":"bmpc_ge_60","type":"boolean","description":"Clonal bone marrow plasma cells ≥60%, as assigned by the caller (Rajkumar 2014 SLiM). true or false. magent does not read a marrow.","required":true,"example":"false"},{"in":"query","name":"flc_ratio_ge_100","type":"boolean","description":"Involved:uninvolved serum free light-chain ratio ≥100 and involved free light chain ≥100 mg/L, as assigned by the caller as this one flag (Rajkumar 2014 SLiM). true or false. magent does not assay free light chains.","required":true,"example":"false"},{"in":"query","name":"mri_gt_1_focal","type":"boolean","description":">1 focal lesion on MRI, each ≥5 mm, as assigned by the caller (Rajkumar 2014 SLiM). true or false. magent does not read MRI.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/imwg-myeloma","citation":{"authors":"Rajkumar SV, Dimopoulos MA, Palumbo A, Blade J, Merlini G, Mateos MV, Kumar S, Hillengass J, Kastritis E, Richardson P, Landgren O, Paiva B, Dispenzieri A, Weiss B, LeLeu X, Zweegman S, Lonial S, Rosinol L, Zamagni E, Jagannath S, Sezer O, Kristinsson SY, Caers J, Usmani SZ, Lahuerta JJ, Johnsen HE, Beksac M, Cavo M, Goldschmidt H, Terpos E, Kyle RA, Anderson KC, Durie BGM, San Miguel JF","doi":"10.1016/S1470-2045(14)70442-5","id":"rajkumar-2014","pmid":"25439696","source":"Lancet Oncol. 2014;15(12):e538-e548","title":"International Myeloma Working Group updated criteria for the diagnosis of multiple myeloma","url":"https://doi.org/10.1016/S1470-2045(14)70442-5"},"formula_expression":"myeloma iff clonal_bmpc_ge_10_or_plasmacytoma and ≥1 myeloma-defining event (hypercalcemia, renal_insufficiency, anemia, osteolytic_lesion, bmpc_ge_60, flc_ratio_ge_100, or mri_gt_1_focal) (Rajkumar 2014 IMWG definition of multiple myeloma requiring therapy). Not a diagnosis. Not smouldering MM, MGUS, POEMS, or amyloid. Not Greipp ISS. Not R-ISS","purpose":"Apply the Rajkumar 2014 International Myeloma Working Group updated criteria for multiple myeloma requiring therapy: clonal bone marrow plasma cells ≥10% or biopsy-proven plasmacytoma plus at least one myeloma-defining event (CRAB or SLiM).","markdown_url":"https://magentlab.com/docs/imwg-myeloma.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"imwg_myeloma"},{"name":"formula_expression","type":"string","description":"Rajkumar 2014 IMWG myeloma requiring therapy: entry plus ≥1 MDE"},{"name":"myeloma","type":"boolean","description":"true iff clonal_bmpc_ge_10_or_plasmacytoma and at least one myeloma-defining event. Not a diagnosis. Not smouldering MM, MGUS, POEMS, or amyloid. Not Greipp ISS. Not R-ISS."},{"name":"clonal_bmpc_ge_10_or_plasmacytoma","type":"boolean","description":"Caller-assigned IMWG 2014 entry flag used"},{"name":"hypercalcemia","type":"boolean","description":"Caller-assigned CRAB hypercalcemia flag used"},{"name":"renal_insufficiency","type":"boolean","description":"Caller-assigned CRAB renal insufficiency flag used"},{"name":"anemia","type":"boolean","description":"Caller-assigned CRAB anemia flag used"},{"name":"osteolytic_lesion","type":"boolean","description":"Caller-assigned CRAB osteolytic lesion flag used"},{"name":"bmpc_ge_60","type":"boolean","description":"Caller-assigned SLiM clonal BMPC ≥60% flag used"},{"name":"flc_ratio_ge_100","type":"boolean","description":"Caller-assigned SLiM involved:uninvolved FLC ratio ≥100 with involved FLC ≥100 mg/L flag used"},{"name":"mri_gt_1_focal","type":"boolean","description":"Caller-assigned SLiM >1 focal MRI lesion ≥5 mm flag used"},{"name":"any_mde","type":"boolean","description":"true iff at least one myeloma-defining event flag is true"},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met for the entry flag, each myeloma-defining event, and any_mde"},{"name":"citation","type":"object","description":"Rajkumar 2014 Lancet Oncol IMWG citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"anemia":"false","bmpc_ge_60":"false","clonal_bmpc_ge_10_or_plasmacytoma":"true","flc_ratio_ge_100":"false","hypercalcemia":"true","mri_gt_1_focal":"false","osteolytic_lesion":"false","renal_insufficiency":"false"},{"anemia":"false","bmpc_ge_60":"false","clonal_bmpc_ge_10_or_plasmacytoma":"true","flc_ratio_ge_100":"false","hypercalcemia":"true","mri_gt_1_focal":"false","osteolytic_lesion":"false","renal_insufficiency":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/imwg-myeloma","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/imwg-myeloma?clonal_bmpc_ge_10_or_plasmacytoma=true&hypercalcemia=true&renal_insufficiency=false&anemia=false&osteolytic_lesion=false&bmpc_ge_60=false&flc_ratio_ge_100=false&mri_gt_1_focal=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/imwg-myeloma","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/imwg-response","description":"Kumar 2016 IMWG measurable serum+urine M-protein response. First-match PD, sCR, CR, VGPR, PR, MR, or SD from caller-assigned flags. sCR is CR plus normal FLC ratio and no clonal BM cells by IHC. CR is negative serum and urine IFE, no plasmacytomas, and BMPC <5%. VGPR is electrophoresis-negative or ≥90% serum M-protein reduction with urine M-protein <100 mg/24 h. Not a diagnosis. Not MRD. Not FLC-only. magent does not assay labs.","parameters":[{"in":"query","name":"imwg_pd","type":"boolean","description":"Progressive disease as assigned by the caller using IMWG PD rules (Kumar 2016). true or false. When true, response is PD regardless of CR or M-protein reduction flags. magent does not compute PD from serial M-protein, FLC, or imaging values.","required":true,"example":"false"},{"in":"query","name":"ife_serum_negative","type":"boolean","description":"Negative immunofixation on serum, as assigned by the caller (Kumar 2016 CR). true or false. magent does not perform immunofixation.","required":true,"example":"true"},{"in":"query","name":"ife_urine_negative","type":"boolean","description":"Negative immunofixation on urine, as assigned by the caller (Kumar 2016 CR). true or false. magent does not perform immunofixation.","required":true,"example":"true"},{"in":"query","name":"plasmacytomas_absent","type":"boolean","description":"Disappearance of soft-tissue plasmacytomas, as assigned by the caller (Kumar 2016 CR). true or false. magent does not read imaging or examine plasmacytomas.","required":true,"example":"true"},{"in":"query","name":"bmpc_lt_5","type":"boolean","description":"<5% plasma cells in bone marrow aspirates as assigned by the caller (Kumar 2016 CR; strictly fewer than 5%, not ≤5%). true or false. magent does not read a marrow.","required":true,"example":"true"},{"in":"query","name":"flc_ratio_normal","type":"boolean","description":"Normal serum free light-chain ratio as assigned by the caller (Kumar 2016 sCR). true or false. magent does not assay free light chains.","required":true,"example":"true"},{"in":"query","name":"no_clonal_cells_ihc","type":"boolean","description":"Absence of clonal cells in bone marrow biopsy by immunohistochemistry as assigned by the caller (Kumar 2016 sCR). true or false. magent does not read immunohistochemistry.","required":true,"example":"true"},{"in":"query","name":"electrophoresis_negative","type":"boolean","description":"Serum and urine M-protein detectable by immunofixation but not electrophoresis, as assigned by the caller (Kumar 2016 VGPR). true or false. magent does not perform electrophoresis.","required":true,"example":"false"},{"in":"query","name":"serum_m_reduction_ge_90","type":"boolean","description":"≥90% reduction in serum M-protein from baseline as assigned by the caller (Kumar 2016 VGPR). true or false. magent does not assay M-protein.","required":true,"example":"false"},{"in":"query","name":"urine_m_lt_100","type":"boolean","description":"Urine M-protein <100 mg per 24 h as assigned by the caller (Kumar 2016 VGPR). true or false. magent does not assay urine M-protein.","required":true,"example":"false"},{"in":"query","name":"serum_m_reduction_ge_50","type":"boolean","description":"≥50% reduction of serum M-protein from baseline as assigned by the caller (Kumar 2016 PR). true or false. magent does not assay M-protein.","required":true,"example":"false"},{"in":"query","name":"urine_m_pr","type":"boolean","description":"Reduction in 24 h urinary M-protein by ≥90% or to <200 mg per 24 h, as assigned by the caller as this one flag (Kumar 2016 PR). true or false. magent does not assay urine M-protein.","required":true,"example":"false"},{"in":"query","name":"serum_m_reduction_25_to_49","type":"boolean","description":"≥25% but ≤49% reduction of serum M-protein from baseline as assigned by the caller (Kumar 2016 MR). true or false. magent does not assay M-protein.","required":true,"example":"false"},{"in":"query","name":"urine_m_reduction_50_to_89","type":"boolean","description":"50–89% reduction of 24 h urine M-protein as assigned by the caller (Kumar 2016 MR). true or false. magent does not assay urine M-protein.","required":true,"example":"false"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/imwg-response","citation":{"authors":"Kumar S, Paiva B, Anderson KC, Durie B, Landgren O, Moreau P, Munshi N, Lonial S, Bladé J, Mateos MV, Dimopoulos M, Kastritis E, Boccadoro M, Orlowski R, Zamagni E, Palumbo A, San Miguel J, Avet-Loiseau H, Goldschmidt H, van de Donk NWCJ, et al.","doi":"10.1016/S1470-2045(16)30206-6","id":"kumar-2016","pmid":"27511158","source":"Lancet Oncol. 2016;17(8):e328-e346","title":"International Myeloma Working Group consensus criteria for response and minimal residual disease assessment in multiple myeloma","url":"https://doi.org/10.1016/S1470-2045(16)30206-6"},"formula_expression":"Kumar 2016 IMWG measurable serum+urine M-protein response, first-match: PD if imwg_pd; else sCR iff CR_bits and flc_ratio_normal and no_clonal_cells_ihc; else CR iff CR_bits; else VGPR iff electrophoresis_negative or (serum_m_reduction_ge_90 and urine_m_lt_100); else PR iff serum_m_reduction_ge_50 and urine_m_pr; else MR iff serum_m_reduction_25_to_49 and urine_m_reduction_50_to_89; else SD. CR_bits = ife_serum_negative and ife_urine_negative and plasmacytomas_absent and bmpc_lt_5 (strictly <5% marrow plasma cells). Not FLC-only or nonsecretory. Not MRD. Not a diagnosis","purpose":"Apply Kumar 2016 International Myeloma Working Group consensus criteria for treatment response in multiple myeloma on the measurable serum and urine M-protein pathway, returning sCR, CR, VGPR, PR, MR, SD, or PD from caller-assigned flags.","markdown_url":"https://magentlab.com/docs/imwg-response.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"imwg_response"},{"name":"formula_expression","type":"string","description":"Kumar 2016 IMWG measurable serum+urine M-protein first-match response rule"},{"name":"imwg_response","type":"string","description":"sCR, CR, VGPR, PR, MR, SD, or PD. First-match on the measurable serum+urine M-protein pathway. Not a diagnosis. Not MRD."},{"name":"cr_bits","type":"boolean","description":"true iff ife_serum_negative, ife_urine_negative, plasmacytomas_absent, and bmpc_lt_5 are all true"},{"name":"criteria","type":"array","description":"Per-factor Tree rows with factor and met for each caller flag and for cr_bits"},{"name":"citation","type":"object","description":"Kumar 2016 Lancet Oncol IMWG response citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"bmpc_lt_5":"true","electrophoresis_negative":"false","flc_ratio_normal":"true","ife_serum_negative":"true","ife_urine_negative":"true","imwg_pd":"false","no_clonal_cells_ihc":"true","plasmacytomas_absent":"true","serum_m_reduction_25_to_49":"false","serum_m_reduction_ge_50":"false","serum_m_reduction_ge_90":"false","urine_m_lt_100":"false","urine_m_pr":"false","urine_m_reduction_50_to_89":"false"},{"bmpc_lt_5":"true","electrophoresis_negative":"false","flc_ratio_normal":"true","ife_serum_negative":"true","ife_urine_negative":"true","imwg_pd":"false","no_clonal_cells_ihc":"true","plasmacytomas_absent":"true","serum_m_reduction_25_to_49":"false","serum_m_reduction_ge_50":"false","serum_m_reduction_ge_90":"false","urine_m_lt_100":"false","urine_m_pr":"false","urine_m_reduction_50_to_89":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/imwg-response","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/imwg-response?imwg_pd=false&ife_serum_negative=true&ife_urine_negative=true&plasmacytomas_absent=true&bmpc_lt_5=true&flc_ratio_normal=true&no_clonal_cells_ihc=true&electrophoresis_negative=false&serum_m_reduction_ge_90=false&urine_m_lt_100=false&serum_m_reduction_ge_50=false&urine_m_pr=false&serum_m_reduction_25_to_49=false&urine_m_reduction_50_to_89=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/imwg-response","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/smm-22020","description":"Lakshman 2018 2/20/20 smoldering myeloma risk: one point each for BMPC >20%, serum M-protein >2 g/dL, and involved/uninvolved FLC ratio >20 (strict greater-than). 0 factors low (median TTP 110 months), 1 intermediate (68), 2 or 3 high (29). Not Mayo 70/20, not PETHEMA, not myeloma ISS, not a treatment order. BMPC 10-59 and FLC 0.01-99.9 (IMWG 2014 SLiM myeloma is rejected). magent does not assay marrow, M-protein, or free light chains.","parameters":[{"in":"query","name":"bmpc_percent","type":"number","description":"Bone-marrow plasma cells as a percent (10-59). >20 scores 1 (Lakshman 2018 2/20/20). 20 scores 0. 10 is the SMM floor. 60 or above is IMWG 2014 myeloma and is rejected, not scored. magent does not read a marrow.","required":true,"example":"25"},{"in":"query","name":"m_protein_g_dl","type":"number","description":"Serum M-protein in g/dL (0-15). >2 scores 1 (Lakshman 2018 2/20/20). 2 scores 0. magent does not assay M-protein.","required":true,"example":"2.5"},{"in":"query","name":"flc_ratio","type":"number","description":"Involved/uninvolved serum free light-chain ratio as assigned by the caller (0.01-99.9). >20 scores 1 (Lakshman 2018 2/20/20). 20 scores 0. 100 or above is IMWG 2014 myeloma and is rejected, not scored. magent does not assay free light chains.","required":true,"example":"25"}],"errors":[{"code":"invalid_bmpc","message":"bmpc_percent must be a number from 10 to 59 (Lakshman 2018 SMM bone-marrow plasma cells; ≥60 is myeloma). Returned before settlement; you are not charged.","status":400},{"code":"invalid_m_protein","message":"m_protein_g_dl must be a number from 0 to 15 (Lakshman 2018 serum M-protein g/dL). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flc_ratio","message":"flc_ratio must be a number from 0.01 to 99.9 (Lakshman 2018 involved/uninvolved FLC ratio; ≥100 is myeloma). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/smm-22020","citation":{"authors":"Lakshman A, Rajkumar SV, Buadi FK, et al.","doi":"10.1038/s41408-018-0077-4","id":"lakshman-2018","pmid":"29895887","source":"Blood Cancer J. 2018;8(6):59","title":"Risk stratification of smoldering multiple myeloma incorporating revised IMWG diagnostic criteria","url":"https://doi.org/10.1038/s41408-018-0077-4"},"formula_expression":"Lakshman 2018 2/20/20 = (bmpc_percent > 20) + (m_protein_g_dl > 2) + (flc_ratio > 20); each 1; max 3; 0 low median TTP 110 months, 1 intermediate 68 months, 2 or 3 high 29 months. Not Mayo 70/20. Not PETHEMA. Not myeloma ISS","purpose":"Count Lakshman 2018 2/20/20 smoldering-myeloma risk factors (BMPC >20%, M-protein >2 g/dL, involved/uninvolved FLC ratio >20) and return low, intermediate, or high with published median TTP.","markdown_url":"https://magentlab.com/docs/smm-22020.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"smm_22020"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"bmpc_percent","type":"number","description":"Bone-marrow plasma-cell percent used for the >20 factor"},{"name":"m_protein_g_dl","type":"number","description":"Serum M-protein in g/dL used for the >2 factor"},{"name":"flc_ratio","type":"number","description":"Caller-assigned involved/uninvolved FLC ratio used for the >20 factor"},{"name":"score","type":"integer","description":"Factor count 0-3 (same as factor_count)"},{"name":"max_score","type":"integer","description":"Always 3"},{"name":"factor_count","type":"integer","description":"How many of the three Lakshman 2018 factors are present (0-3)"},{"name":"risk_group","type":"string","description":"low when factor_count is 0, intermediate when 1, high when 2 or 3 (Lakshman 2018). Not a myeloma diagnosis. Not Mayo 70/20. Not PETHEMA. Not myeloma ISS. Not a treatment order."},{"name":"median_ttp_months","type":"integer","description":"Lakshman 2018 median time to progression in months: 110 (low), 68 (intermediate), 29 (high)"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Lakshman et al. Blood Cancer J. 2018 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"bmpc_percent":"25","flc_ratio":"25","m_protein_g_dl":"2.5"},{"bmpc_percent":"25","flc_ratio":"25","m_protein_g_dl":"2.5"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/smm-22020","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/smm-22020?bmpc_percent=25&m_protein_g_dl=2.5&flc_ratio=25","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/smm-22020","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/four-ts","description":"4Ts score (Lo 2006) for heparin-induced thrombocytopenia pretest probability. Four caller-assigned integers 0-2 (thrombocytopenia, timing, thrombosis, other causes) using the published table; magent sums only (max 8). Bands 0-3 low, 4-5 intermediate, and 6-8 high pretest probability. Not a diagnosis of HIT, not the HEP score, and not an antibody result. magent does not grade platelet counts or day of onset.","parameters":[{"in":"query","name":"thrombocytopenia","type":"integer","description":"Caller-assigned Lo 2006 thrombocytopenia points (0, 1, or 2). magent does not grade platelet counts. 2: platelet fall >50% AND nadir >=20. 1: fall 30-50% OR nadir 10-19. 0: fall <30% OR nadir <10.","required":true,"example":"0"},{"in":"query","name":"timing","type":"integer","description":"Caller-assigned Lo 2006 timing points (0, 1, or 2). magent does not infer day of onset. 2: clear onset days 5-10, or <=1 day with prior heparin within 30 days. 1: consistent with days 5-10 but not clear; onset after day 10; or <=1 day with heparin 30-100 days ago. 0: fall too early without recent heparin.","required":true,"example":"0"},{"in":"query","name":"thrombosis","type":"integer","description":"Caller-assigned Lo 2006 thrombosis points (0, 1, or 2). 2: new thrombosis, skin necrosis, or acute systemic reaction after heparin bolus. 1: progressive/recurrent thrombosis, silent thrombosis, or erythematous skin lesions. 0: none.","required":true,"example":"0"},{"in":"query","name":"other_causes","type":"integer","description":"Caller-assigned Lo 2006 other (oTher) causes of thrombocytopenia (0, 1, or 2). More points = more HIT-like. 2: no other apparent cause. 1: possible other cause. 0: definite other cause.","required":true,"example":"0"}],"errors":[{"code":"invalid_four_ts_component","message":"thrombocytopenia, timing, thrombosis, and other_causes must each be 0, 1, or 2. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/four-ts","citation":{"authors":"Lo GK, Juhl D, Warkentin TE, Sigouin CS, Eichler P, Greinacher A","doi":"10.1111/j.1538-7836.2006.01787.x","id":"lo-2006","source":"J Thromb Haemost. 2006;4(4):759-765","title":"Evaluation of pretest clinical score (4 T's) for the diagnosis of heparin-induced thrombocytopenia in two clinical settings","url":"https://doi.org/10.1111/j.1538-7836.2006.01787.x"},"formula_expression":"4Ts = thrombocytopenia + timing + thrombosis + other_causes; each 0-2 caller-assigned from Lo 2006 table; pretest probability low 0-3, intermediate 4-5, high 6-8; max 8","purpose":"Compute the Lo 2006 4Ts score as the sum of four caller-assigned integers 0-2 (thrombocytopenia, timing, thrombosis, other causes).","markdown_url":"https://magentlab.com/docs/four-ts.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"four_ts"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Total points 0-8"},{"name":"max_score","type":"integer","description":"Always 8"},{"name":"four_ts_band","type":"string","description":"0-3, 4-5, or 6-8 (Lo 2006 pretest probability groups)"},{"name":"components","type":"array","description":"Per-factor 0-2 points"},{"name":"citation","type":"object","description":"Lo 2006 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"other_causes":"0","thrombocytopenia":"0","thrombosis":"0","timing":"0"},{"other_causes":"0","thrombocytopenia":"0","thrombosis":"0","timing":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/four-ts","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/four-ts?thrombocytopenia=0&timing=0&thrombosis=0&other_causes=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/four-ts","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/hep","description":"Cuker 2010 HEP score: eight features with signed weights (range -16 to 19). Magnitude of platelet fall, typical- or rapid-onset timing, nadir, thrombosis (at most one), SQ heparin skin necrosis, IV-bolus systemic reaction, bleeding, and other causes (select all; no other cause +3). Cutoff 2 was 100% sensitive / 60% specific vs the expert panel. Not a HIT diagnosis or 4Ts score. magent does not assay SRA or ELISA.","parameters":[{"in":"query","name":"magnitude","type":"string","description":"Caller-assigned Cuker 2010 magnitude of platelet fall (peak to nadir since heparin exposure). lt_30 (<30%) scores -1; 30_to_50 (30-50%) scores 1; gt_50 (>50%) scores 3. magent does not grade platelet counts.","required":true,"example":"gt_50"},{"in":"query","name":"timing","type":"string","description":"Caller-assigned Cuker 2010 timing. Typical-onset: typical_lt_4 (fall begins <4 days) -2; typical_day_4 (day 4) 2; typical_5_10 (days 5-10) 3; typical_11_14 (days 11-14) 2; typical_gt_14 (>14 days) -1. Rapid-onset after re-exposure within 100 days: rapid_lt_48h (<48 h) 2; rapid_gt_48h (>48 h) -1. magent does not infer day of onset.","required":true,"example":"typical_5_10"},{"in":"query","name":"nadir","type":"string","description":"Caller-assigned Cuker 2010 nadir platelet count. le_20 (≤20 ×10^9/L) scores -2; gt_20 (>20 ×10^9/L) scores 2. magent does not take a raw platelet count.","required":true,"example":"gt_20"},{"in":"query","name":"thrombosis","type":"string","description":"Caller-assigned Cuker 2010 thrombosis (select at most one). none scores 0. Typical-onset: typical_new_ge_4d (new VTE or ATE ≥4 days after heparin) 3; typical_progression (progression of preexisting VTE or ATE while receiving heparin) 2. Rapid-onset: rapid_new (new VTE or ATE after heparin) 3; rapid_progression 2.","required":true,"example":"typical_new_ge_4d"},{"in":"query","name":"skin_necrosis","type":"boolean","description":"Skin necrosis at subcutaneous heparin injection sites (Cuker 2010). true scores 3; false scores 0. magent does not examine the skin.","required":true,"example":"false"},{"in":"query","name":"systemic_reaction","type":"boolean","description":"Acute systemic reaction after intravenous heparin bolus (Cuker 2010). true scores 2; false scores 0.","required":true,"example":"false"},{"in":"query","name":"bleeding","type":"boolean","description":"Presence of bleeding, petechiae, or extensive bruising (Cuker 2010). true scores -1; false scores 0.","required":true,"example":"false"},{"in":"query","name":"chronic_thrombocytopenia","type":"boolean","description":"Presence of a chronic thrombocytopenic disorder (Cuker 2010 other causes; select all that apply). true scores -1. Mutually exclusive with no_other_cause true.","required":true,"example":"false"},{"in":"query","name":"new_drug_thrombocytopenia","type":"boolean","description":"Newly initiated non-heparin medication known to cause thrombocytopenia (Cuker 2010). true scores -2. Mutually exclusive with no_other_cause true.","required":true,"example":"false"},{"in":"query","name":"severe_infection","type":"boolean","description":"Severe infection as an other cause of thrombocytopenia (Cuker 2010). true scores -2. Mutually exclusive with no_other_cause true.","required":true,"example":"false"},{"in":"query","name":"overt_dic","type":"boolean","description":"Overt DIC as assigned by the caller (Cuker 2010: fibrinogen <100 mg/dL and D-dimer >5.0 μg/mL). true scores -2. magent does not assay fibrinogen or D-dimer. Mutually exclusive with no_other_cause true.","required":true,"example":"false"},{"in":"query","name":"intra_arterial_device","type":"boolean","description":"Indwelling intra-arterial device (Cuker 2010 examples: IABP, VAD, ECMO). true scores -2. Mutually exclusive with no_other_cause true.","required":true,"example":"false"},{"in":"query","name":"cpb_96h","type":"boolean","description":"Cardiopulmonary bypass within the previous 96 hours (Cuker 2010). true scores -1. Mutually exclusive with no_other_cause true.","required":true,"example":"false"},{"in":"query","name":"no_other_cause","type":"boolean","description":"No other apparent cause of thrombocytopenia (Cuker 2010). true scores 3. Must be false if any other-cause flag is true.","required":true,"example":"true"}],"errors":[{"code":"invalid_hep","message":"HEP items must use Cuker 2010 Table point values (signed integers as published; not the 4Ts score). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/hep","citation":{"authors":"Cuker A, Arepally G, Crowther MA, Rice L, Datko F, Hook K, Propert KJ, Kuter DJ, Ortel TL, Konkle BA, Cines DB","doi":"10.1111/j.1538-7836.2010.04059.x","id":"cuker-2010","pmid":"20854372","source":"J Thromb Haemost. 2010;8(12):2642-2650","title":"The HIT Expert Probability (HEP) Score: a novel pre-test probability model for heparin-induced thrombocytopenia based on broad expert opinion","url":"https://doi.org/10.1111/j.1538-7836.2010.04059.x"},"formula_expression":"HEP = magnitude (lt_30 -1, 30_to_50 1, gt_50 3) + timing (typical_lt_4 -2, typical_day_4 2, typical_5_10 3, typical_11_14 2, typical_gt_14 -1; rapid_lt_48h 2, rapid_gt_48h -1) + nadir (le_20 -2, gt_20 2) + thrombosis select at most one (none 0; typical_new_ge_4d 3, typical_progression 2; rapid_new 3, rapid_progression 2) + skin_necrosis 3 + systemic_reaction 2 + bleeding -1 + other causes select all (chronic_thrombocytopenia -1, new_drug_thrombocytopenia -2, severe_infection -2, overt_dic -2, intra_arterial_device -2, cpb_96h -1, no_other_cause 3 mutually exclusive with other causes); Cuker 2010; range -16 to 19; cutoff 2 was 100% sensitive / 60% specific vs expert panel; cutoff 5 was 86% sensitive / 88% specific","purpose":"Sum the Cuker 2010 HIT Expert Probability (HEP) eight clinical features with published signed integer weights and return the 2010 cutoff-2 and cutoff-5 operating points.","markdown_url":"https://magentlab.com/docs/hep.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"hep"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"HEP points (signed; published range -16 to 19)"},{"name":"max_score","type":"integer","description":"19"},{"name":"score_ge_2","type":"boolean","description":"true iff score ≥ 2 (Cuker 2010 cutoff 2: 100% sensitive / 60% specific vs expert panel). Not a HIT diagnosis."},{"name":"score_ge_5","type":"boolean","description":"true iff score ≥ 5 (Cuker 2010 cutoff 5: 86% sensitive / 88% specific). Not a HIT diagnosis."},{"name":"components","type":"array","description":"Per-feature signed points"},{"name":"citation","type":"object","description":"Cuker 2010 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"bleeding":"false","chronic_thrombocytopenia":"false","cpb_96h":"false","intra_arterial_device":"false","magnitude":"gt_50","nadir":"gt_20","new_drug_thrombocytopenia":"false","no_other_cause":"true","overt_dic":"false","severe_infection":"false","skin_necrosis":"false","systemic_reaction":"false","thrombosis":"typical_new_ge_4d","timing":"typical_5_10"},{"bleeding":"false","chronic_thrombocytopenia":"false","cpb_96h":"false","intra_arterial_device":"false","magnitude":"gt_50","nadir":"gt_20","new_drug_thrombocytopenia":"false","no_other_cause":"true","overt_dic":"false","severe_infection":"false","skin_necrosis":"false","systemic_reaction":"false","thrombosis":"typical_new_ge_4d","timing":"typical_5_10"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/hep","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/hep?magnitude=gt_50&timing=typical_5_10&nadir=gt_20&thrombosis=typical_new_ge_4d&skin_necrosis=false&systemic_reaction=false&bleeding=false&chronic_thrombocytopenia=false&new_drug_thrombocytopenia=false&severe_infection=false&overt_dic=false&intra_arterial_device=false&cpb_96h=false&no_other_cause=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/hep","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/plasmic","description":"Bendapudi 2017 PLASMIC: seven 1-point items (platelets <30×10^9/L, caller-assigned hemolysis, no active cancer, no solid-organ or stem-cell transplant, MCV <90 fL, INR <1.5, creatinine <2.0 mg/dL), max 7. Bands 0-4 / 5 / 6-7 are pretest groups for severe ADAMTS13 deficiency, not percents or a plasma-exchange order. magent does not assay hemolysis. Cutoffs 30, 90, 1.5, and 2.0 do not score.","parameters":[{"in":"query","name":"platelets_10e9_l","type":"number","description":"Platelet count ×10^9/L (1-2000). Scores 1 when <30; 30 does not score (Bendapudi 2017).","required":true,"example":"15"},{"in":"query","name":"hemolysis","type":"boolean","description":"Caller-assigned hemolysis (Bendapudi 2017: reticulocyte count >2.5% or undetectable haptoglobin or indirect bilirubin >2.0 mg/dL). true or false. magent does not assay. 1 point if true.","required":true,"example":"true"},{"in":"query","name":"active_cancer","type":"boolean","description":"Active cancer as assigned by the caller. true or false. 1 point when false (no active cancer).","required":true,"example":"false"},{"in":"query","name":"solid_organ_or_stem_cell_transplant","type":"boolean","description":"History of solid-organ or stem-cell transplant as assigned by the caller. true or false. 1 point when false (no transplant history).","required":true,"example":"false"},{"in":"query","name":"mcv_fl","type":"number","description":"Mean corpuscular volume in fL (50-120). Scores 1 when <90; 90.0 does not score.","required":true,"example":"85"},{"in":"query","name":"inr","type":"number","description":"INR (0.8-10). Scores 1 when <1.5; 1.5 does not score.","required":true,"example":"1.1"},{"in":"query","name":"creatinine_mg_dl","type":"number","description":"Serum creatinine in mg/dL (0.1-20). Provide this or creatinine_umol_l. Scores 1 when <2.0; 2.0 does not score.","required":false,"example":"1.0"},{"in":"query","name":"creatinine_umol_l","type":"number","description":"Serum creatinine in µmol/L (9-1768). Converted as mg/dL = µmol/L / 88.42. Provide this or creatinine_mg_dl.","required":false,"example":"88.4"}],"errors":[{"code":"invalid_platelets","message":"platelets_10e9_l must be a number from 1 to 2000 Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_mcv","message":"mcv_fl must be a number from 50 to 120. Returned before settlement; you are not charged.","status":400},{"code":"invalid_inr","message":"inr must be a number from 0.8 to 10 Returned before settlement; you are not charged.","status":400},{"code":"invalid_creatinine","message":"creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/plasmic","citation":{"authors":"Bendapudi PK, Hurwitz S, Fry A, et al.","doi":"10.1016/S2352-3026(17)30026-1","id":"bendapudi-2017","pmid":"28259520","source":"Lancet Haematol. 2017;4(4):e157-e164","title":"Derivation and external validation of the PLASMIC score for rapid assessment of adults with thrombotic microangiopathies: a cohort study","url":"https://doi.org/10.1016/S2352-3026(17)30026-1"},"formula_expression":"PLASMIC = (platelets_10e9_l<30) + hemolysis + (not active_cancer) + (not solid_organ_or_stem_cell_transplant) + (mcv_fl<90) + (inr<1.5) + (creatinine_mg_dl<2.0); each 1; max 7; bands 0-4 / 5 / 6-7","purpose":"Sum the seven Bendapudi 2017 PLASMIC items and return the published 0-4 / 5 / 6-7 pretest band for severe ADAMTS13 deficiency.","markdown_url":"https://magentlab.com/docs/plasmic.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"plasmic"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Total points 0-7"},{"name":"max_score","type":"integer","description":"Always 7"},{"name":"plasmic_band","type":"string","description":"0-4, 5, or 6-7 (Bendapudi 2017 pretest groups for severe ADAMTS13 deficiency). Not a percent and not a plasma-exchange order."},{"name":"platelets_10e9_l","type":"number","description":"Platelet count used (×10^9/L)"},{"name":"hemolysis","type":"boolean","description":"Caller-assigned hemolysis flag used"},{"name":"active_cancer","type":"boolean","description":"Caller-assigned active-cancer flag used"},{"name":"solid_organ_or_stem_cell_transplant","type":"boolean","description":"Caller-assigned transplant-history flag used"},{"name":"mcv_fl","type":"number","description":"MCV used, fL"},{"name":"inr","type":"number","description":"INR used"},{"name":"creatinine_mg_dl","type":"number","description":"Creatinine used in mg/dL (after µmol/L conversion when that unit is supplied)"},{"name":"components","type":"array","description":"Per-item points"},{"name":"citation","type":"object","description":"Bendapudi 2017 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"active_cancer":"false","creatinine_mg_dl":"1.0","hemolysis":"true","inr":"1.1","mcv_fl":"85","platelets_10e9_l":"15","solid_organ_or_stem_cell_transplant":"false"},{"active_cancer":"false","creatinine_mg_dl":"1.0","hemolysis":"true","inr":"1.1","mcv_fl":"85","platelets_10e9_l":"15","solid_organ_or_stem_cell_transplant":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/plasmic","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/plasmic?platelets_10e9_l=15&hemolysis=true&active_cancer=false&solid_organ_or_stem_cell_transplant=false&mcv_fl=85&inr=1.1&creatinine_mg_dl=1.0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/plasmic","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/isth-dic","description":"Taylor 2001 ISTH SSC overt DIC (four lab items; max 8). Platelets >=100=0, 50-<100=1, <50=2. fibrin_related_marker none/moderate/strong = 0/2/3 (caller-assigned; magent does not grade D-dimer). PT sec above ULN <3=0, >=3 and <6=1, >=6=2. Fibrinogen >=1.0 g/L=0, <1.0=1 (XOR g/L or mg/dL÷100). Band <5 not compatible with overt DIC; >=5 compatible. Not a diagnosis. Not the non-overt serial score.","parameters":[{"in":"query","name":"platelets_10e9_l","type":"number","description":"Platelet count ×10^9/L (1-2000). >=100 scores 0; 50 to <100 scores 1; <50 scores 2. 100 scores 0; 50 scores 1; 49 scores 2 (Taylor 2001).","required":true,"example":"180"},{"in":"query","name":"fibrin_related_marker","type":"string","enum":["none","moderate","strong"],"description":"Caller-assigned ISTH fibrin-related marker (Taylor 2001). none scores 0; moderate scores 2; strong scores 3. magent does not grade D-dimer assays.","required":true,"example":"none"},{"in":"query","name":"pt_prolongation_sec","type":"number","description":"Prothrombin time prolongation in seconds above the laboratory ULN (0-30). <3 scores 0; >=3 and <6 scores 1; >=6 scores 2. 3.0 and 5.9 score 1; 6.0 scores 2; 2.9 scores 0 (Taylor 2001 table gaps filled at 3 and 6).","required":true,"example":"1.0"},{"in":"query","name":"fibrinogen_g_l","type":"number","description":"Fibrinogen in g/L (0.1-10). Provide this or fibrinogen_mg_dl, not both. >=1.0 scores 0; <1.0 scores 1. 1.0 scores 0 (Taylor 2001).","required":false,"example":"2.5"},{"in":"query","name":"fibrinogen_mg_dl","type":"number","description":"Fibrinogen in mg/dL (10-1000). Converted as g/L = mg/dL / 100. Provide this or fibrinogen_g_l, not both.","required":false,"example":"250"}],"errors":[{"code":"invalid_platelets","message":"platelets_10e9_l must be a number from 1 to 2000 Returned before settlement; you are not charged.","status":400},{"code":"invalid_fibrin_marker","message":"fibrin_related_marker must be none, moderate, or strong (Taylor 2001 ISTH DIC). Returned before settlement; you are not charged.","status":400},{"code":"invalid_pt_prolongation","message":"pt_prolongation_sec must be a number from 0 to 30 (seconds above ULN; Taylor 2001). Returned before settlement; you are not charged.","status":400},{"code":"invalid_fibrinogen","message":"fibrinogen_g_l (0.1-10) or fibrinogen_mg_dl (10-1000) is required, not both. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/isth-dic","citation":{"authors":"Taylor FB Jr, Toh CH, Hoots WK, Wada H, Levi M","doi":"10.1055/s-0037-1616068","id":"taylor-2001","pmid":"11816725","source":"Thromb Haemost. 2001;86(5):1327-1330","title":"Towards definition, clinical and laboratory criteria, and a scoring system for disseminated intravascular coagulation","url":"https://doi.org/10.1055/s-0037-1616068"},"formula_expression":"ISTH overt DIC = platelets_10e9_l (>=100 → 0; 50 to <100 → 1; <50 → 2) + fibrin_related_marker (none 0, moderate 2, strong 3) + pt_prolongation_sec (<3 → 0; >=3 and <6 → 1; >=6 → 2) + fibrinogen_g_l (>=1.0 → 0; <1.0 → 1); max 8; bands <5 / >=5","purpose":"Sum the four Taylor 2001 ISTH SSC overt DIC laboratory items (platelets, fibrin-related marker, PT prolongation, fibrinogen) and return the published <5 / >=5 band.","markdown_url":"https://magentlab.com/docs/isth-dic.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"isth_dic"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Total points 0-8"},{"name":"max_score","type":"integer","description":"Always 8"},{"name":"isth_dic_band","type":"string","description":"<5 (not compatible with overt DIC; suggestive of non-overt) or >=5 (compatible with overt DIC). Score 5 is overt. Not a mortality percent."},{"name":"platelets_10e9_l","type":"number","description":"Platelet count used (×10^9/L)"},{"name":"fibrin_related_marker","type":"string","description":"Caller-assigned none, moderate, or strong marker used"},{"name":"pt_prolongation_sec","type":"number","description":"PT prolongation used, seconds above ULN"},{"name":"fibrinogen_g_l","type":"number","description":"Fibrinogen used in g/L (after mg/dL conversion when that unit is supplied)"},{"name":"components","type":"array","description":"Per-item points"},{"name":"citation","type":"object","description":"Taylor 2001 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"fibrin_related_marker":"none","fibrinogen_g_l":"2.5","platelets_10e9_l":"180","pt_prolongation_sec":"1.0"},{"fibrin_related_marker":"none","fibrinogen_g_l":"2.5","platelets_10e9_l":"180","pt_prolongation_sec":"1.0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/isth-dic","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/isth-dic?platelets_10e9_l=180&fibrin_related_marker=none&pt_prolongation_sec=1.0&fibrinogen_g_l=2.5","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/isth-dic","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/isth-bat","description":"Rodeghiero 2010 ISTH/SSC bleeding assessment tool (BAT). Fourteen caller-assigned Table S1 symptom integers (0-4; cns_bleeding 0, 3, or 4 only). magent sums only (max 56) and does not take the bleeding history. This 2010 letter did not identify an abnormal bleeding score; magent does not apply later Elbatarny 2014 / WFH ≥4 male / ≥6 female / ≥3 child cutoffs. Not a VWD diagnosis and not a medical device.","parameters":[{"in":"query","name":"epistaxis","type":"integer","enum":[0,1,2,3,4],"description":"Caller-assigned Rodeghiero 2010 Table S1 epistaxis integer (0-4). 0 no/trivial; 1 >5/year or >10 minutes; 2 consultation only; 3 packing, cauterization, or antifibrinolytic; 4 blood transfusion, replacement therapy, or desmopressin. magent does not take the bleeding history.","required":true,"example":"0"},{"in":"query","name":"cutaneous","type":"integer","enum":[0,1,2,3,4],"description":"Caller-assigned Rodeghiero 2010 Table S1 cutaneous integer (0-4). 0 no/trivial; 1 five or more bruises >1 cm in exposed areas; 2 consultation only; 3 extensive; 4 spontaneous hematoma requiring blood transfusion. magent does not take the bleeding history.","required":true,"example":"0"},{"in":"query","name":"minor_wounds","type":"integer","enum":[0,1,2,3,4],"description":"Caller-assigned Rodeghiero 2010 Table S1 bleeding from minor wounds integer (0-4). 0 no/trivial; 1 >5/year or >10 minutes; 2 consultation only; 3 surgical hemostasis; 4 blood transfusion, replacement therapy, or desmopressin. magent does not take the bleeding history.","required":true,"example":"0"},{"in":"query","name":"oral_cavity","type":"integer","enum":[0,1,2,3,4],"description":"Caller-assigned Rodeghiero 2010 Table S1 oral-cavity integer (0-4). 0 no/trivial; 1 present; 2 consultation only; 3 surgical hemostasis or antifibrinolytic; 4 blood transfusion, replacement therapy, or desmopressin. magent does not take the bleeding history.","required":true,"example":"0"},{"in":"query","name":"gi_bleeding","type":"integer","enum":[0,1,2,3,4],"description":"Caller-assigned Rodeghiero 2010 Table S1 GI bleeding integer (0-4). 0 no/trivial; 1 present not associated with ulcer, portal hypertension, hemorrhoids, or angiodysplasia; 2 consultation only; 3 surgical hemostasis or antifibrinolytic; 4 blood transfusion, replacement therapy, or desmopressin. magent does not take the bleeding history.","required":true,"example":"0"},{"in":"query","name":"hematuria","type":"integer","enum":[0,1,2,3,4],"description":"Caller-assigned Rodeghiero 2010 Table S1 hematuria integer (0-4). 0 no/trivial; 1 present (macroscopic); 2 consultation only; 3 surgical hemostasis or iron therapy; 4 blood transfusion, replacement therapy, or desmopressin. magent does not take the bleeding history.","required":true,"example":"0"},{"in":"query","name":"tooth_extraction","type":"integer","enum":[0,1,2,3,4],"description":"Caller-assigned Rodeghiero 2010 Table S1 tooth-extraction integer (0-4). 0 no/trivial or none done; 1 referred in ≤25% of procedures, no intervention; 2 referred in >25% of procedures, no intervention; 3 resuturing or packing; 4 blood transfusion, replacement therapy, or desmopressin. magent does not take the bleeding history.","required":true,"example":"0"},{"in":"query","name":"surgery","type":"integer","enum":[0,1,2,3,4],"description":"Caller-assigned Rodeghiero 2010 Table S1 surgery integer (0-4). 0 no/trivial or none done; 1 referred in ≤25% of procedures, no intervention; 2 referred in >25% of procedures, no intervention; 3 surgical hemostasis or antifibrinolytics; 4 blood transfusion, replacement therapy, or desmopressin. magent does not take the bleeding history.","required":true,"example":"0"},{"in":"query","name":"menorrhagia","type":"integer","enum":[0,1,2,3,4],"description":"Caller-assigned Rodeghiero 2010 Table S1 menorrhagia integer (0-4). 0 no/trivial; 1 consultation only, pads more often than every 2 hours, clot and flooding, or PBAC >100; 2 time off work/school >2/year or antifibrinolytics, hormonal, or iron therapy; 3 combined antifibrinolytics and hormonal therapy, or present since menarche and >12 months; 4 acute menorrhagia requiring hospital admission and emergency treatment, transfusion/replacement/desmopressin, or dilatation and curettage, endometrial ablation, or hysterectomy. magent does not take the bleeding history.","required":true,"example":"0"},{"in":"query","name":"postpartum_hemorrhage","type":"integer","enum":[0,1,2,3,4],"description":"Caller-assigned Rodeghiero 2010 Table S1 postpartum-hemorrhage integer (0-4). 0 no/trivial or no deliveries; 1 consultation only, use of syntocin, or lochia >6 weeks; 2 iron therapy or antifibrinolytics; 3 blood transfusion, replacement therapy, desmopressin, examination under anaesthesia, or uterine balloon/packing; 4 any procedure requiring critical care or surgical intervention. magent does not take the bleeding history.","required":true,"example":"0"},{"in":"query","name":"muscle_hematomas","type":"integer","enum":[0,1,2,3,4],"description":"Caller-assigned Rodeghiero 2010 Table S1 muscle-hematomas integer (0-4). 0 never; 1 post trauma, no therapy; 2 spontaneous, no therapy; 3 spontaneous or traumatic, requiring desmopressin or replacement therapy; 4 spontaneous or traumatic, requiring surgical intervention or blood transfusion. magent does not take the bleeding history.","required":true,"example":"0"},{"in":"query","name":"hemarthrosis","type":"integer","enum":[0,1,2,3,4],"description":"Caller-assigned Rodeghiero 2010 Table S1 hemarthrosis integer (0-4). 0 never; 1 post trauma, no therapy; 2 spontaneous, no therapy; 3 spontaneous or traumatic, requiring desmopressin or replacement therapy; 4 spontaneous or traumatic, requiring surgical intervention or blood transfusion. magent does not take the bleeding history.","required":true,"example":"0"},{"in":"query","name":"cns_bleeding","type":"integer","enum":[0,3,4],"description":"Caller-assigned Rodeghiero 2010 Table S1 CNS bleeding integer (0, 3, or 4 only). 0 never; 3 subdural, any intervention; 4 intracerebral, any intervention. Grades 1 and 2 are not used in Table S1. magent does not take the bleeding history.","required":true,"example":"0"},{"in":"query","name":"other_bleeding","type":"integer","enum":[0,1,2,3,4],"description":"Caller-assigned Rodeghiero 2010 Table S1 other bleedings integer, including infancy-specific symptoms (0-4). 0 no/trivial; 1 present; 2 consultation only; 3 surgical hemostasis, antifibrinolytics, or iron therapy; 4 blood transfusion, replacement therapy, or desmopressin. magent does not take the bleeding history.","required":true,"example":"0"}],"errors":[{"code":"invalid_isth_bat_item","message":"each ISTH BAT symptom rating must be an integer from 0 to 4 (Rodeghiero 2010 Table S1; cns_bleeding is 0, 3, or 4 only). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/isth-bat","citation":{"authors":"Rodeghiero F, Tosetto A, Abshire T, et al.","doi":"10.1111/j.1538-7836.2010.03975.x","id":"rodeghiero-2010","source":"J Thromb Haemost. 2010;8(9):2063-2065","title":"ISTH/SSC bleeding assessment tool: a standardized questionnaire and a proposal for a new bleeding score for inherited bleeding disorders","url":"https://doi.org/10.1111/j.1538-7836.2010.03975.x"},"formula_expression":"ISTH/SSC BAT = epistaxis + cutaneous + minor_wounds + oral_cavity + gi_bleeding + hematuria + tooth_extraction + surgery + menorrhagia + postpartum_hemorrhage + muscle_hematomas + hemarthrosis + cns_bleeding + other_bleeding; each caller-assigned 0-4 from Rodeghiero 2010 Table S1 (cns_bleeding 0, 3, or 4 only); max 56; no abnormal cutoff in this letter","purpose":"Sum fourteen caller-assigned Rodeghiero 2010 ISTH/SSC BAT symptom integers (Table S1, 0-4; cns_bleeding 0, 3, or 4) and return the published total (max 56). Does not apply later abnormal cutoffs.","markdown_url":"https://magentlab.com/docs/isth-bat.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"isth_bat"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Rodeghiero 2010 ISTH/SSC BAT sum of fourteen Table S1 symptom integers (0-56)"},{"name":"max_score","type":"integer","description":"Always 56"},{"name":"components","type":"array","description":"Per-symptom caller-assigned Table S1 points"},{"name":"citation","type":"object","description":"Rodeghiero 2010 J Thromb Haemost citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"cns_bleeding":"0","cutaneous":"0","epistaxis":"0","gi_bleeding":"0","hemarthrosis":"0","hematuria":"0","menorrhagia":"0","minor_wounds":"0","muscle_hematomas":"0","oral_cavity":"0","other_bleeding":"0","postpartum_hemorrhage":"0","surgery":"0","tooth_extraction":"0"},{"cns_bleeding":"0","cutaneous":"0","epistaxis":"0","gi_bleeding":"0","hemarthrosis":"0","hematuria":"0","menorrhagia":"0","minor_wounds":"0","muscle_hematomas":"0","oral_cavity":"0","other_bleeding":"0","postpartum_hemorrhage":"0","surgery":"0","tooth_extraction":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/isth-bat","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/isth-bat?epistaxis=0&cutaneous=0&minor_wounds=0&oral_cavity=0&gi_bleeding=0&hematuria=0&tooth_extraction=0&surgery=0&menorrhagia=0&postpartum_hemorrhage=0&muscle_hematomas=0&hemarthrosis=0&cns_bleeding=0&other_bleeding=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/isth-bat","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/sic","description":"Iba 2017 SIC (Table 3; max 6). platelets_10e9_l >=150=0, <150 and >=100=1, <100=2. inr <=1.2=0, >1.2 and <=1.4=1, >1.4=2. sofa_four_items is the caller-assigned respiratory+cardiovascular+hepatic+renal SOFA sum (0-16; not coagulation, not CNS): 0=0, 1=1, >=2=2 (cap 2). sic true iff score >=4 and platelet_pts+inr_pts >=3. Not a sepsis or DIC diagnosis. Not ISTH overt DIC. Not JAAM-DIC. magent does not start anticoagulants.","parameters":[{"in":"query","name":"platelets_10e9_l","type":"number","description":"Platelet count ×10^9/L (1-2000). >=150 scores 0; <150 and >=100 scores 1; <100 scores 2. 150 scores 0; 100 scores 1; 99 scores 2 (Iba 2017 Table 3).","required":true,"example":"180"},{"in":"query","name":"inr","type":"number","description":"INR (0.8-10). <=1.2 scores 0; >1.2 and <=1.4 scores 1; >1.4 scores 2. 1.2 scores 0; 1.4 scores 1; 1.41 scores 2 (Iba 2017 Table 3).","required":true,"example":"1.0"},{"in":"query","name":"sofa_four_items","type":"integer","description":"Caller-assigned sum of respiratory + cardiovascular + hepatic + renal SOFA only (integer 0-16). Do not include coagulation or CNS. 0 scores 0; 1 scores 1; >=2 scores 2 (cap 2). 2 and 16 both score 2 (Iba 2017 Table 3). magent does not compute those organ scores.","required":true,"example":"0"}],"errors":[{"code":"invalid_platelets","message":"platelets_10e9_l must be a number from 1 to 2000 Returned before settlement; you are not charged.","status":400},{"code":"invalid_inr","message":"inr must be a number from 0.8 to 10 Returned before settlement; you are not charged.","status":400},{"code":"invalid_sic_sofa","message":"sofa_four_items must be an integer from 0 to 16 (Iba 2017 respiratory plus cardiovascular plus hepatic plus renal SOFA sum). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/sic","citation":{"authors":"Iba T, Di Nisio M, Levy JH, Kitamura N, Thachil J","doi":"10.1136/bmjopen-2017-017046","id":"iba-2017","pmid":"28963294","source":"BMJ Open. 2017;7(9):e017046","title":"New criteria for sepsis-induced coagulopathy (SIC) following the revised sepsis definition: a retrospective analysis of a nationwide survey","url":"https://doi.org/10.1136/bmjopen-2017-017046"},"formula_expression":"SIC = platelets_10e9_l (>=150 → 0; <150 and >=100 → 1; <100 → 2) + inr (<=1.2 → 0; >1.2 and <=1.4 → 1; >1.4 → 2) + sofa_four_items (0 → 0; 1 → 1; >=2 → 2 cap); max 6; sic iff score >= 4 and (platelet_pts + inr_pts) >= 3","purpose":"Sum Iba 2017 Table 3 SIC items (platelets, INR, and four-item SOFA capped at 2) and return the point total and whether published SIC criteria are met.","markdown_url":"https://magentlab.com/docs/sic.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"sic"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Total points 0-6"},{"name":"max_score","type":"integer","description":"Always 6"},{"name":"sic","type":"boolean","description":"true iff score >= 4 and platelet_pts + inr_pts >= 3 (Iba 2017). Not a sepsis or DIC diagnosis."},{"name":"platelet_pts","type":"integer","description":"Platelet item points 0-2"},{"name":"inr_pts","type":"integer","description":"INR item points 0-2"},{"name":"sofa_pts","type":"integer","description":"Four-item SOFA points 0-2 (capped; 3-16 still score 2)"},{"name":"platelets_10e9_l","type":"number","description":"Platelet count used (×10^9/L)"},{"name":"inr","type":"number","description":"INR used"},{"name":"sofa_four_items","type":"integer","description":"Four-item SOFA sum used (respiratory + cardiovascular + hepatic + renal)"},{"name":"components","type":"array","description":"Per-item points"},{"name":"citation","type":"object","description":"Iba 2017 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"inr":"1.0","platelets_10e9_l":"180","sofa_four_items":"0"},{"inr":"1.0","platelets_10e9_l":"180","sofa_four_items":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/sic","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/sic?platelets_10e9_l=180&inr=1.0&sofa_four_items=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/sic","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/hscore","description":"Fardet 2014 HScore (Table 4; max 337) from nine caller-assigned items: immunosuppression 18, temperature 0/33/49, organomegaly 0/23/38, cytopenia lineages 0/24/34 (1/2/3), ferritin 0/35/50, triglycerides 0/44/64, fibrinogen 0/30, SGOT 0/19, marrow hemophagocytosis 35. Best cutoff 169. magent does not take raw labs; all nine required. Not HLH-2004. Not a diagnosis. Not a medical device.","parameters":[{"in":"query","name":"immunosuppression","type":"boolean","description":"Known underlying immunosuppression as assigned by the caller (Fardet 2014 Table 4 footnote: HIV positive or long-term glucocorticoids, cyclosporine, or azathioprine). true scores 18; false scores 0.","required":true,"example":"false"},{"in":"query","name":"temperature_band","type":"string","description":"Caller-assigned Fardet 2014 Table 4 temperature band (°C). lt_38_4 (<38.4) scores 0; 38_4_to_39_4 (38.4–39.4) scores 33; gt_39_4 (>39.4) scores 49. magent does not take a raw temperature.","required":true,"example":"lt_38_4"},{"in":"query","name":"organomegaly","type":"string","description":"Caller-assigned Fardet 2014 Table 4 organomegaly. none scores 0; hepato_or_spleno (hepatomegaly or splenomegaly) scores 23; hepato_and_spleno (hepatomegaly and splenomegaly) scores 38. magent does not examine the patient.","required":true,"example":"none"},{"in":"query","name":"cytopenia_lineages","type":"integer","description":"Caller-assigned number of cytopenia lineages (integer 1, 2, or 3). 1 scores 0; 2 scores 24; 3 scores 34. Zero cytopenias were not assessed in Fardet 2014 and are rejected. Cytopenia definition (paper footnote, caller already applied): Hb ≤9.2 g/dL and/or WBC ≤5000/mm³ and/or platelets ≤110000/mm³. magent does not take those labs.","required":true,"example":"1"},{"in":"query","name":"ferritin_band","type":"string","description":"Caller-assigned Fardet 2014 Table 4 ferritin band (ng/ml). lt_2000 (<2000) scores 0; 2000_to_6000 (2000–6000) scores 35; gt_6000 (>6000) scores 50. magent does not take a raw ferritin.","required":true,"example":"lt_2000"},{"in":"query","name":"triglyceride_band","type":"string","description":"Caller-assigned Fardet 2014 Table 4 triglyceride band (mmol/L). lt_1_5 (<1.5) scores 0; 1_5_to_4 (1.5–4.0) scores 44; gt_4 (>4.0) scores 64. magent does not take a raw triglyceride.","required":true,"example":"lt_1_5"},{"in":"query","name":"fibrinogen_band","type":"string","description":"Caller-assigned Fardet 2014 Table 4 fibrinogen band (g/L). gt_2_5 (>2.5) scores 0; le_2_5 (≤2.5) scores 30. magent does not take a raw fibrinogen.","required":true,"example":"gt_2_5"},{"in":"query","name":"sgot_band","type":"string","description":"Caller-assigned Fardet 2014 Table 4 SGOT/AST band (IU/L). lt_30 (<30) scores 0; ge_30 (≥30) scores 19. magent does not take a raw SGOT.","required":true,"example":"lt_30"},{"in":"query","name":"marrow_hemophagocytosis","type":"boolean","description":"Hemophagocytosis features on bone marrow aspirate as assigned by the caller (Fardet 2014 Table 4). true scores 35; false scores 0. Not required for a diagnosis; this tool is not a diagnosis.","required":true,"example":"false"}],"errors":[{"code":"invalid_hscore_band","message":"temperature_band, organomegaly, cytopenia_lineages, ferritin_band, triglyceride_band, fibrinogen_band, and sgot_band must be Fardet 2014 Table 4 values. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/hscore","citation":{"authors":"Fardet L, Galicier L, Lambotte O, Marzac C, Aumont C, Chahwan D, Coppo P, Hejblum G","doi":"10.1002/art.38690","id":"fardet-2014","pmid":"24782338","source":"Arthritis Rheumatol. 2014;66(9):2613-2620","title":"Development and validation of the HScore, a score for the diagnosis of reactive hemophagocytic syndrome","url":"https://doi.org/10.1002/art.38690"},"formula_expression":"HScore = immunosuppression (true 18) + temperature_band (lt_38_4 0, 38_4_to_39_4 33, gt_39_4 49) + organomegaly (none 0, hepato_or_spleno 23, hepato_and_spleno 38) + cytopenia_lineages (1 → 0, 2 → 24, 3 → 34) + ferritin_band (lt_2000 0, 2000_to_6000 35, gt_6000 50) + triglyceride_band (lt_1_5 0, 1_5_to_4 44, gt_4 64) + fibrinogen_band (gt_2_5 0, le_2_5 30) + sgot_band (lt_30 0, ge_30 19) + marrow_hemophagocytosis (true 35); Fardet 2014 Table 4; max 337; score_ge_169 iff total >= 169 (Table 5 best cutoff)","purpose":"Sum the nine Fardet 2014 Table 4 HScore items from caller-assigned bands and return whether the total is ≥169 (published best cutoff).","markdown_url":"https://magentlab.com/docs/hscore.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"hscore"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"HScore points 0-337"},{"name":"max_score","type":"integer","description":"337"},{"name":"score_ge_169","type":"boolean","description":"true iff score ≥ 169 (Fardet 2014 Table 5 best cutoff; sensitivity 93%, specificity 86%, accurate classification 90%). Not a diagnosis."},{"name":"components","type":"array","description":"Per-item Table 4 points"},{"name":"citation","type":"object","description":"Fardet et al. Arthritis Rheumatol 2014 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"cytopenia_lineages":"1","ferritin_band":"lt_2000","fibrinogen_band":"gt_2_5","immunosuppression":"false","marrow_hemophagocytosis":"false","organomegaly":"none","sgot_band":"lt_30","temperature_band":"lt_38_4","triglyceride_band":"lt_1_5"},{"cytopenia_lineages":"1","ferritin_band":"lt_2000","fibrinogen_band":"gt_2_5","immunosuppression":"false","marrow_hemophagocytosis":"false","organomegaly":"none","sgot_band":"lt_30","temperature_band":"lt_38_4","triglyceride_band":"lt_1_5"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/hscore","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/hscore?immunosuppression=false&temperature_band=lt_38_4&organomegaly=none&cytopenia_lineages=1&ferritin_band=lt_2000&triglyceride_band=lt_1_5&fibrinogen_band=gt_2_5&sgot_band=lt_30&marrow_hemophagocytosis=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/hscore","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/reticulocyte-index","description":"Corrected reticulocyte count (retic% × Hct/45), Hillman 1969 maturation-shift reticulocyte index, and optional absolute reticulocyte count. Deterministic published arithmetic with citation; not a marrow diagnosis.","parameters":[{"in":"query","name":"reticulocyte_percent","type":"number","description":"Reticulocyte percent of RBC (0.1-30).","required":true,"example":"2.0"},{"in":"query","name":"hematocrit_percent","type":"number","description":"Hematocrit as a percent (10-70). CRC uses Hct/45. Maturation days: ≥40 → 1.0; ≥30 → 1.5; ≥20 → 2.0; else 2.5 (Hillman 1969 shift discretized).","required":true,"example":"45"},{"in":"query","name":"rbc_million_ul","type":"number","description":"RBC count in 10^6/µL (1.0-8.0). When provided, ARC_per_uL is returned. Omitted omits ARC.","required":false,"example":"5.0"}],"errors":[{"code":"invalid_reticulocyte_percent","message":"reticulocyte_percent must be a number from 0.1 to 30. Returned before settlement; you are not charged.","status":400},{"code":"invalid_hematocrit","message":"hematocrit_percent must be a number from 10 to 70. Returned before settlement; you are not charged.","status":400},{"code":"invalid_rbc_million_ul","message":"rbc_million_ul must be a number from 1.0 to 8.0. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/reticulocyte-index","citation":{"authors":"Hillman RS","doi":"10.1172/JCI106001","id":"hillman-1969","source":"J Clin Invest. 1969;48(3):443-453","title":"Characteristics of marrow production and reticulocyte maturation in normal man in response to anemia","url":"https://doi.org/10.1172/JCI106001"},"formula_expression":"CRC = reticulocyte_percent * (hematocrit_percent / 45); RI = CRC / maturation_days; ARC_per_uL = reticulocyte_percent/100 * rbc_million_ul * 1e6 when RBC is given","purpose":"Compute corrected reticulocyte count, a Hillman 1969 maturation-shift reticulocyte index, and optional absolute reticulocyte count from percent reticulocytes, hematocrit, and RBC.","markdown_url":"https://magentlab.com/docs/reticulocyte-index.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"reticulocyte_index"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"reticulocyte_percent","type":"number","description":"Reticulocyte percent used"},{"name":"hematocrit_percent","type":"number","description":"Hematocrit percent used"},{"name":"corrected_reticulocyte_percent","type":"number","description":"CRC = retic% × (Hct/45), 2 decimals"},{"name":"maturation_days","type":"number","description":"Hillman-style shift: 1.0, 1.5, 2.0, or 2.5 days"},{"name":"reticulocyte_index","type":"number","description":"CRC / maturation_days, 2 decimals"},{"name":"arc_per_ul","type":"integer","description":"Absolute reticulocyte count in cells/µL when rbc_million_ul is provided"},{"name":"citation","type":"object","description":"Hillman 1969 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"hematocrit_percent":"45","rbc_million_ul":"5.0","reticulocyte_percent":"2.0"},{"hematocrit_percent":"45","rbc_million_ul":"5.0","reticulocyte_percent":"2.0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/reticulocyte-index","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/reticulocyte-index?reticulocyte_percent=2.0&hematocrit_percent=45&rbc_million_ul=5.0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/reticulocyte-index","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/nlr","description":"Neutrophil-to-lymphocyte ratio from relative neutrophil and lymphocyte percents (Zahorec 2001). Deterministic published arithmetic with citation. Not a sepsis diagnosis; magent does not apply later oncology cutoffs that are not in that paper.","parameters":[{"in":"query","name":"neutrophil_percent","type":"number","description":"Relative neutrophil count as a percent of leukocytes (0.1-99).","required":true,"example":"70"},{"in":"query","name":"lymphocyte_percent","type":"number","description":"Relative lymphocyte count as a percent of leukocytes (0.1-99). Must be greater than 0.","required":true,"example":"20"}],"errors":[{"code":"invalid_nlr_neutrophil_percent","message":"neutrophil_percent must be a number from 0.1 to 99. Returned before settlement; you are not charged.","status":400},{"code":"invalid_lymphocyte_percent","message":"lymphocyte_percent must be a number from 0.1 to 99. Returned before settlement; you are not charged.","status":400},{"code":"invalid_nlr_inputs","message":"neutrophil_percent and lymphocyte_percent are required; lymphocyte_percent must be greater than 0. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/nlr","citation":{"authors":"Zahorec R","doi":"10.1007/bf03656390","id":"zahorec-2001","pmid":"11723675","source":"Bratisl Lek Listy. 2001;102(1):5-14","title":"Ratio of neutrophil to lymphocyte counts--rapid and simple parameter of systemic inflammation and stress in critically ill","url":"https://doi.org/10.1007/bf03656390"},"formula_expression":"nlr = neutrophil_percent / lymphocyte_percent","purpose":"Compute the Zahorec 2001 neutrophil-to-lymphocyte ratio from relative neutrophil and lymphocyte percents.","markdown_url":"https://magentlab.com/docs/nlr.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"nlr"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"neutrophil_percent","type":"number","description":"Relative neutrophil percent used"},{"name":"lymphocyte_percent","type":"number","description":"Relative lymphocyte percent used"},{"name":"nlr","type":"number","description":"Neutrophil percent divided by lymphocyte percent, 2 decimals"},{"name":"citation","type":"object","description":"Zahorec 2001 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"lymphocyte_percent":"20","neutrophil_percent":"70"},{"lymphocyte_percent":"20","neutrophil_percent":"70"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/nlr","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/nlr?neutrophil_percent=70&lymphocyte_percent=20","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/nlr","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/mgps","description":"McMillan 2007 modified Glasgow Prognostic Score (mGPS) from CRP in mg/L and albumin. Elevated CRP is >10 mg/L; hypoalbuminaemia is albumin <35 g/L. mGPS 0 when CRP ≤10 (albumin ignored, including isolated hypoalbuminaemia); mGPS 1 when CRP >10 and albumin ≥35; mGPS 2 when CRP >10 and albumin <35. Not original GPS, not hs-mGPS, not a cancer diagnosis or treatment order. magent does not assay CRP or albumin.","parameters":[{"in":"query","name":"crp_mg_l","type":"number","description":"C-reactive protein in mg/L (0-500), not mg/dL. McMillan 2007 elevated CRP is >10 mg/L. CRP = 10 is not elevated and scores mGPS 0 regardless of albumin. magent does not assay CRP.","required":true,"example":"5"},{"in":"query","name":"albumin_g_l","type":"number","description":"Serum albumin in g/L (10-60). Provide this or albumin_g_dl, not both. McMillan 2007 hypoalbuminaemia is <35 g/L (35 is not low). Ignored when CRP ≤ 10 mg/L. magent does not assay albumin.","required":false,"example":"40"},{"in":"query","name":"albumin_g_dl","type":"number","description":"Serum albumin in g/dL (1-6). Converted as g/L = g/dL × 10. Provide this or albumin_g_l, not both.","required":false,"example":"4.0"}],"errors":[{"code":"invalid_crp","message":"crp_mg_l must be a number from 0 to 500. Returned before settlement; you are not charged.","status":400},{"code":"invalid_albumin","message":"albumin_g_dl (1-6) or albumin_g_l (10-60) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/mgps","citation":{"authors":"McMillan DC, Crozier JEM, Canna K, Angerson WJ, McArdle CS","doi":"10.1007/s00384-006-0259-6","id":"mcmillan-2007","pmid":"17245566","source":"Int J Colorectal Dis. 2007;22(8):881-886","title":"Evaluation of an inflammation-based prognostic score (GPS) in patients undergoing resection for colon and rectal cancer","url":"https://doi.org/10.1007/s00384-006-0259-6"},"formula_expression":"mGPS 0: CRP ≤ 10 mg/L (albumin ignored); mGPS 1: CRP > 10 mg/L AND albumin ≥ 35 g/L; mGPS 2: CRP > 10 mg/L AND albumin < 35 g/L (McMillan 2007 modified GPS)","purpose":"Apply the McMillan 2007 modified Glasgow Prognostic Score (mGPS) from caller-supplied CRP in mg/L and albumin.","markdown_url":"https://magentlab.com/docs/mgps.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"mgps"},{"name":"formula_expression","type":"string","description":"McMillan 2007 modified GPS 0 / 1 / 2 rules in paper units (mg/L and g/L)"},{"name":"crp_mg_l","type":"number","description":"C-reactive protein used in mg/L"},{"name":"albumin_g_l","type":"number","description":"Serum albumin used in g/L (after g/dL conversion when supplied)"},{"name":"mgps","type":"integer","description":"0, 1, or 2 (McMillan 2007 modified GPS). Isolated hypoalbuminaemia is 0. Not original GPS."},{"name":"citation","type":"object","description":"McMillan 2007 Int J Colorectal Dis citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"albumin_g_l":"40","crp_mg_l":"5"},{"albumin_g_l":"40","crp_mg_l":"5"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/mgps","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/mgps?crp_mg_l=5&albumin_g_l=40","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/mgps","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/kasymjanova","description":"Kasymjanova 2010 prognostic index for advanced NSCLC from caller-supplied CRP in mg/L and WBC in ×10^9/L. CRP is elevated if crp_mg_l > 10 (10 is not elevated). WBC is elevated if wbc_10e9_l > 11 (11 is not elevated). PI 0 if neither marker is elevated, PI 1 if exactly one is elevated, PI 2 if both are elevated. Not Glasgow Prognostic Score, not mGPS (McMillan), not a cancer diagnosis, and not a chemotherapy order. magent does not assay CRP or WBC.","parameters":[{"in":"query","name":"crp_mg_l","type":"number","description":"C-reactive protein in mg/L (0-500), not mg/dL. Kasymjanova 2010 elevated CRP is >10 mg/L. CRP = 10 is not elevated. magent does not assay CRP.","required":true,"example":"10"},{"in":"query","name":"wbc_10e9_l","type":"number","description":"White-cell count in ×10^9/L (0.01-500). Kasymjanova 2010 elevated WBC is >11 ×10^9/L. WBC = 11 is not elevated. magent does not assay WBC.","required":true,"example":"11"}],"errors":[{"code":"invalid_crp","message":"crp_mg_l must be a number from 0 to 500. Returned before settlement; you are not charged.","status":400},{"code":"invalid_wbc","message":"wbc_k_ul (0.01-500) or wbc_ul (10-500000) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/kasymjanova","citation":{"authors":"Kasymjanova G, MacDonald N, Agulnik JS, Cohen V, Pepe C, Kreisman H, Sharma R, Small D","doi":"10.3747/co.v17i4.567","id":"kasymjanova-2010","pmid":"20697515","source":"Curr Oncol. 2010;17(4):52-58","title":"The predictive value of pre-treatment inflammatory markers in advanced non-small-cell lung cancer","url":"https://doi.org/10.3747/co.v17i4.567"},"formula_expression":"PI = crp_elevated + wbc_elevated; CRP elevated if crp_mg_l > 10 (≤10 not elevated); WBC elevated if wbc_10e9_l > 11 (≤11 not elevated); each 1; Kasymjanova 2010; max 2","purpose":"Apply the Kasymjanova 2010 prognostic index (PI 0–2) from caller-supplied CRP in mg/L and WBC in ×10^9/L.","markdown_url":"https://magentlab.com/docs/kasymjanova.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"kasymjanova"},{"name":"formula_expression","type":"string","description":"Kasymjanova 2010 PI 0 / 1 / 2 rules in paper units (mg/L and ×10^9/L)"},{"name":"crp_mg_l","type":"number","description":"C-reactive protein used in mg/L"},{"name":"wbc_10e9_l","type":"number","description":"White-cell count used in ×10^9/L"},{"name":"pi","type":"integer","description":"0, 1, or 2 (Kasymjanova 2010). Neither elevated is 0; exactly one is 1; both are 2. Not GPS/mGPS."},{"name":"score","type":"integer","description":"PI points 0-2 (same as pi)"},{"name":"max_score","type":"integer","description":"2"},{"name":"components","type":"array","description":"Per-marker points"},{"name":"citation","type":"object","description":"Kasymjanova et al. Curr Oncol 2010 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"crp_mg_l":"10","wbc_10e9_l":"11"},{"crp_mg_l":"10","wbc_10e9_l":"11"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/kasymjanova","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/kasymjanova?crp_mg_l=10&wbc_10e9_l=11","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/kasymjanova","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/gps","description":"Forrest 2003 original Glasgow Prognostic Score (GPS) from CRP in mg/L and albumin. Elevated CRP is >10 mg/L; hypoalbuminaemia is albumin <35 g/L. Assign 1 for CRP >10 and 1 for albumin <35, then sum: GPS 0 when CRP ≤10 and albumin ≥35; GPS 1 when CRP ≤10 and albumin <35 (isolated hypoalbuminaemia) or CRP >10 and albumin ≥35; GPS 2 when CRP >10 and albumin <35. Not mGPS, not hs-mGPS, not a cancer diagnosis or treatment order. magent does not assay CRP or albumin.","parameters":[{"in":"query","name":"crp_mg_l","type":"number","description":"C-reactive protein in mg/L (0-500), not mg/dL. Forrest 2003 elevated CRP is >10 mg/L. CRP = 10 is not elevated. magent does not assay CRP.","required":true,"example":"5"},{"in":"query","name":"albumin_g_l","type":"number","description":"Serum albumin in g/L (10-60). Provide this or albumin_g_dl, not both. Forrest 2003 hypoalbuminaemia is <35 g/L (35 is not low). Isolated hypoalbuminaemia scores GPS 1. magent does not assay albumin.","required":false,"example":"40"},{"in":"query","name":"albumin_g_dl","type":"number","description":"Serum albumin in g/dL (1-6). Converted as g/L = g/dL × 10. Provide this or albumin_g_l, not both.","required":false,"example":"4.0"}],"errors":[{"code":"invalid_crp","message":"crp_mg_l must be a number from 0 to 500. Returned before settlement; you are not charged.","status":400},{"code":"invalid_albumin","message":"albumin_g_dl (1-6) or albumin_g_l (10-60) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/gps","citation":{"authors":"Forrest LM, McMillan DC, McArdle CS, Angerson WJ, Dunlop DJ","doi":"10.1038/sj.bjc.6601242","id":"forrest-2003","pmid":"12966420","source":"Br J Cancer. 2003;89(6):1028-1030","title":"Evaluation of cumulative prognostic scores based on the systemic inflammatory response in patients with inoperable non-small-cell lung cancer","url":"https://doi.org/10.1038/sj.bjc.6601242"},"formula_expression":"GPS 0: CRP ≤ 10 mg/L AND albumin ≥ 35 g/L; GPS 1: CRP ≤ 10 mg/L AND albumin < 35 g/L (isolated hypoalbuminaemia) OR CRP > 10 mg/L AND albumin ≥ 35 g/L; GPS 2: CRP > 10 mg/L AND albumin < 35 g/L (Forrest 2003 original GPS)","purpose":"Apply the Forrest 2003 original Glasgow Prognostic Score (GPS) from caller-supplied CRP in mg/L and albumin.","markdown_url":"https://magentlab.com/docs/gps.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"gps"},{"name":"formula_expression","type":"string","description":"Forrest 2003 original GPS 0 / 1 / 2 rules in paper units (mg/L and g/L)"},{"name":"crp_mg_l","type":"number","description":"C-reactive protein used in mg/L"},{"name":"albumin_g_l","type":"number","description":"Serum albumin used in g/L (after g/dL conversion when supplied)"},{"name":"gps","type":"integer","description":"0, 1, or 2 (Forrest 2003 original GPS). Isolated hypoalbuminaemia is 1. Not mGPS."},{"name":"citation","type":"object","description":"Forrest 2003 Br J Cancer citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"albumin_g_l":"40","crp_mg_l":"5"},{"albumin_g_l":"40","crp_mg_l":"5"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/gps","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/gps?crp_mg_l=5&albumin_g_l=40","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/gps","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rmi","description":"Jacobs 1990 risk of malignancy index: RMI = U × M × CA125 (U/ml). Caller assigns ultrasound_score 0, 1, or 3 (never 2) and postmenopausal (M=3 if true, else 1). Returns rmi to 1 decimal and exceeds_200 (true if RMI > 200). Not an ovarian-cancer diagnosis and not later RMI-2 or RMI-3.","parameters":[{"in":"query","name":"ca125_u_ml","type":"number","description":"Serum CA125 in U/ml (0-50000). Enters the product unrounded. Jacobs 1990 uses U/ml. magent does not assay CA125.","required":true,"example":50},{"in":"query","name":"ultrasound_score","type":"integer","enum":[0,1,3],"description":"Caller-assigned Jacobs 1990 ultrasound score: 0 if no features, 1 if one feature, 3 if two or more of multilocular cyst, solid areas, bilateral lesions, ascites, or intra-abdominal metastases. Never 2. magent does not read ultrasound.","required":true,"example":3},{"in":"query","name":"postmenopausal","type":"boolean","description":"true if postmenopausal (M=3), false if premenopausal (M=1). Jacobs 1990: more than one year since final period, or age >50 after hysterectomy. Caller sets the flag; magent does not date menses.","required":true,"example":true}],"errors":[{"code":"invalid_ca125","message":"ca125_u_ml must be a number from 0 to 50000. Returned before settlement; you are not charged.","status":400},{"code":"invalid_ultrasound_score","message":"ultrasound_score must be 0, 1, or 3 (Jacobs 1990; never 2). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_rmi","message":"RMI needs CA125 (U/ml), ultrasound_score 0, 1, or 3, and postmenopausal as used in Jacobs 1990. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rmi","citation":{"authors":"Jacobs I, Oram D, Fairbanks J, Turner J, Frost C, Grudzinskas JG","doi":"10.1111/j.1471-0528.1990.tb02448.x","id":"jacobs-1990-rmi","pmid":"2223684","source":"Br J Obstet Gynaecol. 1990;97(10):922-929","title":"A risk of malignancy index incorporating CA 125, ultrasound and menopausal status for the accurate preoperative diagnosis of ovarian cancer","url":"https://doi.org/10.1111/j.1471-0528.1990.tb02448.x"},"formula_expression":"RMI = U × M × CA125 (U/ml); U is ultrasound_score 0, 1, or 3 (never 2); M is 1 if premenopausal, 3 if postmenopausal; exceeds_200 if RMI > 200 (Jacobs 1990)","purpose":"Compute the Jacobs 1990 risk of malignancy index as ultrasound score × menopausal score × CA125 (U/ml), then whether that product exceeds the published cutoff of 200.","markdown_url":"https://magentlab.com/docs/rmi.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rmi"},{"name":"formula_expression","type":"string","description":"Exact Jacobs 1990 expression"},{"name":"ca125_u_ml","type":"number","description":"CA125 used in U/ml, unrounded in the product"},{"name":"ultrasound_score","type":"integer","description":"U used: 0, 1, or 3 (never 2)"},{"name":"postmenopausal","type":"boolean","description":"Menopausal flag used (true → M=3, false → M=1)"},{"name":"rmi","type":"number","description":"U × M × CA125, 1 decimal (Jacobs 1990). Not a diagnosis."},{"name":"exceeds_200","type":"boolean","description":"true if RMI > 200 (Jacobs 1990 published cutoff). Exactly 200 is false."},{"name":"citation","type":"object","description":"Jacobs 1990 BJOG citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"ca125_u_ml":"50","postmenopausal":"true","ultrasound_score":"3"},{"ca125_u_ml":"50","postmenopausal":"true","ultrasound_score":"3"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rmi","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rmi?ca125_u_ml=50&ultrasound_score=3&postmenopausal=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rmi","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/figo-ovarian","description":"Prat 2014 FIGO staging for cancer of the ovary, fallopian tube, and peritoneum as assigned by the caller (IA, IB, IC1-IC3, IIA, IIB, IIIA1i, IIIA1ii, IIIA2, IIIB, IIIC, IVA, IVB). Returns the canonical stage and Prat 2014 defining features. magent does not read imaging or pathology and does not apply AJCC TNM. Not endometrial or cervical FIGO. Not a diagnosis. Not a medical device.","parameters":[{"in":"query","name":"stage","type":"string","description":"Prat 2014 FIGO token as assigned by the caller: IA, IB, IC1, IC2, IC3, IIA, IIB, IIIA1i, IIIA1ii, IIIA2, IIIB, IIIC, IVA, or IVB. Case-insensitive accept; returned canonical form keeps lowercase i/ii on IIIA1i and IIIA1ii. IIC is not valid (eliminated in 2014). Not endometrial or cervical FIGO. magent does not read imaging or pathology.","required":true,"example":"IA"}],"errors":[{"code":"invalid_figo_ovarian","message":"FIGO ovarian 2014 needs stage as a Prat 2014 token (IA through IVB, including IC1-IC3 and IIIA1i/ii). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/figo-ovarian","citation":{"authors":"Prat J; FIGO Committee on Gynecologic Oncology","doi":"10.1016/j.ijgo.2013.10.001","id":"prat-2014","pmid":"24219974","source":"Int J Gynaecol Obstet. 2014;124(1):1-5","title":"Staging classification for cancer of the ovary, fallopian tube, and peritoneum","url":"https://doi.org/10.1016/j.ijgo.2013.10.001"},"formula_expression":"stage in {IA, IB, IC1, IC2, IC3, IIA, IIB, IIIA1i, IIIA1ii, IIIA2, IIIB, IIIC, IVA, IVB} as assigned by the caller (Prat 2014 FIGO for ovary, fallopian tube, and peritoneum). 2014 eliminated IIC. magent does not read imaging or pathology. Not AJCC TNM. Not endometrial or cervical FIGO.","purpose":"Echo the caller-assigned Prat 2014 FIGO stage for cancer of the ovary, fallopian tube, and peritoneum and return the published defining-features description. magent does not read imaging or pathology.","markdown_url":"https://magentlab.com/docs/figo-ovarian.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"figo_ovarian"},{"name":"formula_expression","type":"string","description":"Published Prat 2014 FIGO ovarian-stage rule"},{"name":"stage","type":"string","description":"Canonical Prat 2014 token: IA, IB, IC1, IC2, IC3, IIA, IIB, IIIA1i, IIIA1ii, IIIA2, IIIB, IIIC, IVA, or IVB"},{"name":"description","type":"string","description":"Prat 2014 defining-features wording for that token"},{"name":"components","type":"array","description":"Per-token Tree rows ia, ib, ic1, ic2, ic3, iia, iib, iiia1i, iiia1ii, iiia2, iiib, iiic, iva, ivb with factor and met; exactly one is met"},{"name":"citation","type":"object","description":"Prat 2014 Int J Gynaecol Obstet citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"stage":"IA"},{"stage":"IA"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/figo-ovarian","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/figo-ovarian?stage=IA","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/figo-ovarian","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/swede","description":"Strander 2005 Swede score: five caller-assigned 0-2 items (acetowhiteness, margins_surface, vessels, lesion_size, iodine; Table I final rounded weights; max 10). swede_band <5, 5-7, or >=8 (≥5 identified all HGL in that derivation set; ≥8 had 90% specificity). magent does not read the colposcope. Not a CIN diagnosis, see-and-treat order, or Reid index.","parameters":[{"in":"query","name":"acetowhiteness","type":"integer","enum":[0,1,2],"description":"Caller-assigned Strander 2005 Table I acetowhiteness (integer 0-2): 0 none/transparent; 1 shady/milky; 2 distinct/stearin (opaque white). magent does not read the colposcope.","required":true,"example":"2"},{"in":"query","name":"margins_surface","type":"integer","enum":[0,1,2],"description":"Caller-assigned Strander 2005 Table I margins and surface (integer 0-2): 0 none/diffuse; 1 sharp but irregular/jagged/geographical (satellites); 2 sharp and even, surface-level difference (cuffing). magent does not read the colposcope.","required":true,"example":"2"},{"in":"query","name":"vessels","type":"integer","enum":[0,1,2],"description":"Caller-assigned Strander 2005 Table I vessels (integer 0-2): 0 fine/regular; 1 absent; 2 coarse or atypical. magent does not read the colposcope.","required":true,"example":"1"},{"in":"query","name":"lesion_size","type":"integer","enum":[0,1,2],"description":"Caller-assigned Strander 2005 Table I lesion size (integer 0-2): 0 <5 mm; 1 5-15 mm or 2 quadrants; 2 >15 mm or 3-4 quadrants or endocervically undefined. magent does not read the colposcope.","required":true,"example":"1"},{"in":"query","name":"iodine","type":"integer","enum":[0,1,2],"description":"Caller-assigned Strander 2005 Table I iodine staining (integer 0-2): 0 brown; 1 faintly or patchy yellow; 2 distinct yellow. magent does not read the colposcope.","required":true,"example":"2"}],"errors":[{"code":"invalid_swede","message":"Swede score needs acetowhiteness, margins_surface, vessels, lesion_size, and iodine, each 0, 1, or 2. Returned before settlement; you are not charged.","status":400},{"code":"invalid_swede_item","message":"acetowhiteness, margins_surface, vessels, lesion_size, and iodine must each be 0, 1, or 2 (Strander 2005). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/swede","citation":{"authors":"Strander B, Ellström-Andersson A, Franzén S, Milsom I, Rådberg T","doi":"10.1111/j.0001-6349.2005.00895.x","id":"strander-2005","pmid":"16167921","source":"Acta Obstet Gynecol Scand. 2005;84(10):1013-1017","title":"The performance of a new scoring system for colposcopy in detecting high-grade dysplasia in the uterine cervix","url":"https://doi.org/10.1111/j.0001-6349.2005.00895.x"},"formula_expression":"Swede = acetowhiteness + margins_surface + vessels + lesion_size + iodine; each caller-assigned 0-2 (Strander 2005 Table I final rounded weights); max 10; bands <5, 5-7, >=8","purpose":"Sum five caller-assigned Strander 2005 Swede integers (acetowhiteness, margins_surface, vessels, lesion_size, iodine; each 0-2; max 10) and return the published total and <5 / 5-7 / >=8 bands.","markdown_url":"https://magentlab.com/docs/swede.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"swede"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Swede points 0-10"},{"name":"max_score","type":"integer","description":"Always 10"},{"name":"swede_band","type":"string","description":"Strander 2005 band: <5, 5-7, or >=8. Score ≥5 identified all high-grade lesions in that derivation set; ≥8 had 90% specificity. Score 5 is 5-7. Score 8 is >=8. Not a see-and-treat order."},{"name":"acetowhiteness","type":"integer","description":"Caller-assigned acetowhiteness points 0-2"},{"name":"margins_surface","type":"integer","description":"Caller-assigned margins and surface points 0-2"},{"name":"vessels","type":"integer","description":"Caller-assigned vessels points 0-2"},{"name":"lesion_size","type":"integer","description":"Caller-assigned lesion size points 0-2"},{"name":"iodine","type":"integer","description":"Caller-assigned iodine points 0-2"},{"name":"components","type":"array","description":"Per-item caller-assigned points"},{"name":"citation","type":"object","description":"Strander et al. Acta Obstet Gynecol Scand 2005 citation"},{"name":"disclaimer","type":"string","description":"Not a medical device"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"acetowhiteness":"2","iodine":"2","lesion_size":"1","margins_surface":"2","vessels":"1"},{"acetowhiteness":"2","iodine":"2","lesion_size":"1","margins_surface":"2","vessels":"1"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/swede","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/swede?acetowhiteness=2&margins_surface=2&vessels=1&lesion_size=1&iodine=2","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/swede","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/iota","description":"Timmerman 2008 simple ultrasound rules. Caller assigns five M-rules (irregular solid tumor; ascites; ≥4 papillary structures; irregular multilocular-solid ≥100 mm; very high color Doppler) and five B-rules (unilocular cyst; solid component <7 mm; acoustic shadows; smooth multilocular <100 mm; no Doppler flow). Malignant if any M and no B; benign if any B and no M; otherwise inconclusive. magent does not read ultrasound. Not an ovarian-cancer diagnosis. Not RMI. Not Swede. Not SRRisk.","parameters":[{"in":"query","name":"irregular_solid_tumor","type":"boolean","description":"Irregular solid tumor (M-rule). true or false as assigned by the caller (Timmerman 2008). magent does not read ultrasound.","required":true,"example":false},{"in":"query","name":"ascites","type":"boolean","description":"Ascites (M-rule). true or false as assigned by the caller. magent does not read ultrasound.","required":true,"example":true},{"in":"query","name":"at_least_four_papillary_structures","type":"boolean","description":"At least four papillary structures (M-rule). true or false as assigned by the caller. magent does not read ultrasound.","required":true,"example":false},{"in":"query","name":"irregular_multilocular_solid_ge_100mm","type":"boolean","description":"Irregular multilocular-solid tumor with largest diameter ≥100 mm (M-rule). true or false as assigned by the caller. magent does not measure the mass.","required":true,"example":false},{"in":"query","name":"very_high_color_doppler","type":"boolean","description":"Very high color content on color Doppler (M-rule). true or false as assigned by the caller. magent does not perform Doppler.","required":true,"example":false},{"in":"query","name":"unilocular_cyst","type":"boolean","description":"Unilocular cyst (B-rule). true or false as assigned by the caller. magent does not read ultrasound.","required":true,"example":false},{"in":"query","name":"solid_component_lt_7mm","type":"boolean","description":"Solid components with largest solid component <7 mm (B-rule). true or false as assigned by the caller. magent does not measure the mass.","required":true,"example":false},{"in":"query","name":"acoustic_shadows","type":"boolean","description":"Acoustic shadows (B-rule). true or false as assigned by the caller. magent does not read ultrasound.","required":true,"example":false},{"in":"query","name":"smooth_multilocular_lt_100mm","type":"boolean","description":"Smooth multilocular tumor <100 mm largest diameter (B-rule). true or false as assigned by the caller. magent does not measure the mass.","required":true,"example":false},{"in":"query","name":"no_detectable_blood_flow","type":"boolean","description":"No detectable blood flow on Doppler (B-rule). true or false as assigned by the caller. magent does not perform Doppler.","required":true,"example":false}],"errors":[{"code":"invalid_iota","message":"IOTA Simple Rules need ten caller-assigned M and B ultrasound flags (Timmerman 2008). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/iota","citation":{"authors":"Timmerman D, Testa AC, Bourne T, Ameye L, Jurkovic D, Van Holsbeke C, Paladini D, Van Calster B, Vergote I, Van Huffel S, Valentin L","doi":"10.1002/uog.5365","id":"timmerman-2008","pmid":"18504770","source":"Ultrasound Obstet Gynecol. 2008;31(6):681-690","title":"Simple ultrasound-based rules for the diagnosis of ovarian cancer.","url":"https://doi.org/10.1002/uog.5365"},"formula_expression":"classification malignant iff m_count >= 1 and b_count == 0; benign iff b_count >= 1 and m_count == 0; otherwise inconclusive; m_count counts irregular_solid_tumor, ascites, at_least_four_papillary_structures, irregular_multilocular_solid_ge_100mm, very_high_color_doppler; b_count counts unilocular_cyst, solid_component_lt_7mm, acoustic_shadows, smooth_multilocular_lt_100mm, no_detectable_blood_flow (Timmerman 2008 Simple Rules; not SRRisk)","purpose":"Apply Timmerman 2008 simple ultrasound-based rules from ten caller-assigned M-rule and B-rule flags and return m_count, b_count, and whether the mass classifies as malignant, benign, or inconclusive.","markdown_url":"https://magentlab.com/docs/iota.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"iota"},{"name":"formula_expression","type":"string","description":"Timmerman 2008 Simple Rules: malignant if any M-rule and no B-rule; benign if any B-rule and no M-rule; otherwise inconclusive"},{"name":"classification","type":"string","description":"malignant, benign, or inconclusive. Not a diagnosis of ovarian cancer. Not RMI. Not Swede. Not SRRisk."},{"name":"m_count","type":"integer","description":"Count of true M-rules among irregular solid tumor, ascites, at least four papillary structures, irregular multilocular-solid ≥100 mm, and very high color Doppler (0-5)"},{"name":"b_count","type":"integer","description":"Count of true B-rules among unilocular cyst, solid component <7 mm, acoustic shadows, smooth multilocular <100 mm, and no detectable blood flow (0-5)"},{"name":"criteria","type":"array","description":"Per-flag rows with factor and met for each of the ten M-rules and B-rules"},{"name":"citation","type":"object","description":"Timmerman 2008 Ultrasound Obstet Gynecol citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"acoustic_shadows":"false","ascites":"true","at_least_four_papillary_structures":"false","irregular_multilocular_solid_ge_100mm":"false","irregular_solid_tumor":"false","no_detectable_blood_flow":"false","smooth_multilocular_lt_100mm":"false","solid_component_lt_7mm":"false","unilocular_cyst":"false","very_high_color_doppler":"false"},{"acoustic_shadows":"false","ascites":"true","at_least_four_papillary_structures":"false","irregular_multilocular_solid_ge_100mm":"false","irregular_solid_tumor":"false","no_detectable_blood_flow":"false","smooth_multilocular_lt_100mm":"false","solid_component_lt_7mm":"false","unilocular_cyst":"false","very_high_color_doppler":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/iota","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/iota?irregular_solid_tumor=false&ascites=true&at_least_four_papillary_structures=false&irregular_multilocular_solid_ge_100mm=false&very_high_color_doppler=false&unilocular_cyst=false&solid_component_lt_7mm=false&acoustic_shadows=false&smooth_multilocular_lt_100mm=false&no_detectable_blood_flow=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/iota","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/reid-rci","description":"Reid 1985 four-sign colposcopic index: four caller-assigned 0-2 items (margin, color, vessels, iodine; max 8). band 0-2 low_grade (HPV or CIN I), 3-5 intermediate (CIN I or CIN II), or 6-8 high_grade (CIN II or CIN III). magent does not look through a colposcope and does not recompute iodine from the first three signs. Not a CIN diagnosis or biopsy order.","parameters":[{"in":"query","name":"margin","type":"integer","enum":[0,1,2],"description":"Caller-assigned Reid 1985 margin (integer 0-2): 0 condylomatous or micropapillary contour, indistinct acetowhitening, feathered or jagged margins, satellites; 1 regular smooth straight outlines; 2 rolled peeling edges or internal demarcations. magent does not look through a colposcope.","required":true,"example":"0"},{"in":"query","name":"color","type":"integer","enum":[0,1,2],"description":"Caller-assigned Reid 1985 color (integer 0-2): 0 shiny snow-white, indistinct, transparent or translucent; 1 intermediate shiny gray; 2 dull oyster-white. magent does not look through a colposcope.","required":true,"example":"0"},{"in":"query","name":"vessels","type":"integer","enum":[0,1,2],"description":"Caller-assigned Reid 1985 vessels (integer 0-2): 0 fine-caliber poorly formed or condylomatous; 1 absent; 2 definite punctation or mosaic. magent does not look through a colposcope.","required":true,"example":"0"},{"in":"query","name":"iodine","type":"integer","enum":[0,1,2],"description":"Caller-assigned Reid 1985 iodine (integer 0-2): 0 mahogany-brown uptake or insignificant uptake with insignificant acetowhitening; 1 partial, variegated, or speckled; 2 mustard-yellow negative uptake in significant acetowhite. magent does not look through a colposcope and does not recompute iodine from the first three signs.","required":true,"example":"0"}],"errors":[{"code":"invalid_reid_rci","message":"Reid 1985 RCI inputs must each be an integer 0, 1, or 2 for margin, color, vessels, and iodine as published in that index. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/reid-rci","citation":{"authors":"Reid R, Scalzi P","doi":"10.1016/S0002-9378(85)80244-1","id":"reid-1985","pmid":"2998190","source":"Am J Obstet Gynecol. 1985;153(6):611-618","title":"Genital warts and cervical cancer. VII. An improved colposcopic index for differentiating benign papillomaviral infections from high-grade cervical intraepithelial neoplasia","url":"https://doi.org/10.1016/S0002-9378(85)80244-1"},"formula_expression":"Reid RCI = margin + color + vessels + iodine; each caller-assigned 0-2 (Reid 1985 four-sign index); max 8; bands 0-2 low_grade (HPV or CIN I), 3-5 intermediate (CIN I or CIN II), 6-8 high_grade (CIN II or CIN III)","purpose":"Sum four caller-assigned Reid 1985 RCI integers (margin, color, vessels, iodine; each 0-2; max 8) and return the published total and low_grade / intermediate / high_grade bands.","markdown_url":"https://magentlab.com/docs/reid-rci.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"reid_rci"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Reid RCI points 0-8"},{"name":"max_score","type":"integer","description":"Always 8"},{"name":"band","type":"string","description":"Reid 1985 published RCI total: low_grade (0-2, HPV or CIN I), intermediate (3-5, CIN I or CIN II), or high_grade (6-8, CIN II or CIN III). Not a CIN diagnosis or biopsy order."},{"name":"margin","type":"integer","description":"Caller-assigned margin points 0-2"},{"name":"color","type":"integer","description":"Caller-assigned color points 0-2"},{"name":"vessels","type":"integer","description":"Caller-assigned vessels points 0-2"},{"name":"iodine","type":"integer","description":"Caller-assigned iodine points 0-2"},{"name":"components","type":"array","description":"Per-sign caller-assigned points"},{"name":"citation","type":"object","description":"Reid and Scalzi Am J Obstet Gynecol 1985 citation"},{"name":"disclaimer","type":"string","description":"Not a medical device"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"color":"0","iodine":"0","margin":"0","vessels":"0"},{"color":"0","iodine":"0","margin":"0","vessels":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/reid-rci","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/reid-rci?margin=0&color=0&vessels=0&iodine=0","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/reid-rci","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/ganzoni","description":"Ganzoni 1970 iron deficit: weight_kg * (target_hemoglobin_g_dl - hemoglobin_g_dl) * 2.4 + iron_stores_mg. Deterministic published arithmetic with citation. Not an IV iron product dose or order; magent does not pick target Hb or depot iron, and this is not a diagnosis of iron deficiency.","parameters":[{"in":"query","name":"weight_kg","type":"number","description":"Weight in kilograms. Provide weight_kg or weight_lb.","required":false,"example":"70"},{"in":"query","name":"weight_lb","type":"number","description":"Weight in pounds. Converted as kg = lb * 0.45359237.","required":false,"example":"154.32"},{"in":"query","name":"hemoglobin_g_dl","type":"number","description":"Measured hemoglobin in g/dL (3-22). This tool does not accept g/L.","required":true,"example":"8"},{"in":"query","name":"target_hemoglobin_g_dl","type":"number","description":"Target hemoglobin in g/dL (7-18). Must be strictly greater than hemoglobin_g_dl. magent does not pick a target.","required":true,"example":"15"},{"in":"query","name":"iron_stores_mg","type":"number","description":"Depot iron stores in mg (0-2000). Required; magent does not default a depot.","required":true,"example":"500"}],"errors":[{"code":"invalid_weight","message":"weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_hemoglobin","message":"hemoglobin_g_l (30-220) or hemoglobin_g_dl (3-22) is required, not both. Returned before settlement; you are not charged.","status":400},{"code":"invalid_target_hemoglobin","message":"target_hemoglobin_g_dl must be 7-18 and strictly greater than hemoglobin_g_dl. Returned before settlement; you are not charged.","status":400},{"code":"invalid_iron_stores","message":"iron_stores_mg must be a number from 0 to 2000. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/ganzoni","citation":{"authors":"Ganzoni AM","id":"ganzoni-1970","pmid":"5413918","source":"Schweiz Med Wochenschr. 1970;100(7):301-303","title":"Intravenous iron-dextran: therapeutic and experimental possibilities","url":"https://pubmed.ncbi.nlm.nih.gov/5413918"},"formula_expression":"iron_deficit_mg = weight_kg * (target_hemoglobin_g_dl - hemoglobin_g_dl) * 2.4 + iron_stores_mg","purpose":"Compute the Ganzoni 1970 iron deficit from weight, measured hemoglobin, a caller-supplied target hemoglobin, and depot iron stores.","markdown_url":"https://magentlab.com/docs/ganzoni.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"ganzoni"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"weight_kg","type":"number","description":"Normalized weight in kg"},{"name":"hemoglobin_g_dl","type":"number","description":"Measured hemoglobin in g/dL"},{"name":"target_hemoglobin_g_dl","type":"number","description":"Target hemoglobin in g/dL used"},{"name":"iron_stores_mg","type":"number","description":"Depot iron stores in mg used"},{"name":"iron_deficit_mg","type":"number","description":"Iron deficit in mg, 1 decimal"},{"name":"citation","type":"object","description":"Ganzoni 1970 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"hemoglobin_g_dl":"8","iron_stores_mg":"500","target_hemoglobin_g_dl":"15","weight_kg":"70"},{"hemoglobin_g_dl":"8","iron_stores_mg":"500","target_hemoglobin_g_dl":"15","weight_kg":"70"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/ganzoni","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/ganzoni?weight_kg=70&hemoglobin_g_dl=8&target_hemoglobin_g_dl=15&iron_stores_mg=500","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/ganzoni","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/allowable-blood-loss","description":"Gross 1983 dilution-corrected allowable blood loss from caller-supplied estimated blood volume and initial versus target hematocrit. Deterministic published arithmetic with citation. Not a transfusion trigger or order. Does not compute Nadler EBV; does not use the uncorrected EBV*(Hi-Hf)/Hi form.","parameters":[{"in":"query","name":"estimated_blood_volume_ml","type":"number","description":"Caller-supplied estimated blood volume in mL (50-15000). Required. magent does not compute Nadler EBV.","required":true,"example":"5000"},{"in":"query","name":"hct_initial_percent","type":"number","description":"Initial hematocrit as a percent (10-70).","required":true,"example":"40"},{"in":"query","name":"hct_target_percent","type":"number","description":"Target hematocrit as a percent (10-70). Must be strictly less than hct_initial_percent.","required":true,"example":"30"}],"errors":[{"code":"invalid_estimated_blood_volume","message":"estimated_blood_volume_ml must be a number from 50 to 15000. Returned before settlement; you are not charged.","status":400},{"code":"invalid_hematocrit","message":"hematocrit_percent must be a number from 10 to 70. Returned before settlement; you are not charged.","status":400},{"code":"invalid_target_hematocrit","message":"hct_target_percent must be 10-70 and strictly less than hct_initial_percent. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/allowable-blood-loss","citation":{"authors":"Gross JB","doi":"10.1097/00000542-198303000-00016","id":"gross-1983","pmid":"6829965","source":"Anesthesiology. 1983;58(3):277-280","title":"Estimating allowable blood loss: corrected for dilution","url":"https://doi.org/10.1097/00000542-198303000-00016"},"formula_expression":"abl_ml = estimated_blood_volume_ml * (hct_initial_percent - hct_target_percent) / ((hct_initial_percent + hct_target_percent) / 2)","purpose":"Compute Gross 1983 dilution-corrected allowable blood loss from a caller-supplied estimated blood volume and initial versus target hematocrit.","markdown_url":"https://magentlab.com/docs/allowable-blood-loss.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"gross_1983"},{"name":"formula_expression","type":"string","description":"Exact Gross 1983 expression"},{"name":"estimated_blood_volume_ml","type":"number","description":"Caller-supplied estimated blood volume in mL"},{"name":"hct_initial_percent","type":"number","description":"Initial hematocrit percent used"},{"name":"hct_target_percent","type":"number","description":"Target hematocrit percent used"},{"name":"abl_ml","type":"number","description":"Dilution-corrected allowable blood loss in mL, 1 decimal"},{"name":"citation","type":"object","description":"Gross Anesthesiology 1983 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"estimated_blood_volume_ml":"5000","hct_initial_percent":"40","hct_target_percent":"30"},{"estimated_blood_volume_ml":"5000","hct_initial_percent":"40","hct_target_percent":"30"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/allowable-blood-loss","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/allowable-blood-loss?estimated_blood_volume_ml=5000&hct_initial_percent=40&hct_target_percent=30","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/allowable-blood-loss","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/plasma-dosage","description":"Starting plasma volume without major bleeding: volume_ml = 15 * weight_kg (BSH Green 2018). Adult 15 mL/kg only. Not a transfusion order, major-haemorrhage protocol, or product order. magent does not choose a product or ABO group. Deterministic published arithmetic with citation.","parameters":[{"in":"query","name":"weight_kg","type":"number","description":"Weight in kilograms (1-500). Required.","required":true,"example":"70"}],"errors":[{"code":"invalid_plasma","message":"Plasma volume inputs must match Green 2018 BSH weight from that guideline. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/plasma-dosage","citation":{"authors":"Green L, Bolton-Maggs P, Beattie C, Cardigan R, Kallis Y, Stanworth SJ, Thachil J, Zahra S; British Society for Haematology","doi":"10.1111/bjh.15167","id":"green-2018","pmid":"29527654","source":"Br J Haematol. 2018;181(1):54-67","title":"Guidelines on the spectrum of fresh frozen plasma and cryoprecipitate products: their handling and use in various patient groups in the absence of major bleeding","url":"https://doi.org/10.1111/bjh.15167"},"formula_expression":"volume_ml = 15 * weight_kg","purpose":"Compute the BSH Green 2018 starting plasma volume from body weight: 15 mL/kg in the absence of major bleeding. Adult starting dose only.","markdown_url":"https://magentlab.com/docs/plasma-dosage.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"plasma_dosage"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"weight_kg","type":"number","description":"Input weight in kg"},{"name":"ml_per_kg","type":"number","description":"BSH Green 2018 starting plasma millilitres per kilogram (15)"},{"name":"volume_ml","type":"number","description":"Starting plasma volume in mL, 1 decimal"},{"name":"citation","type":"object","description":"Green et al. BSH 2018 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"weight_kg":"70"},{"weight_kg":"70"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/plasma-dosage","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/plasma-dosage?weight_kg=70","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/plasma-dosage","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rbc-abo","description":"AABB Standards 28th ed. Standard 5.14 RBC ABO/Rh compatibility from caller-assigned recipient and unit ABO (o, a, b, ab) and RhD (positive, negative). Group O RBCs to O/A/B/AB; A to A/AB; B to B/AB; AB to AB. RhD-negative units to either RhD; RhD-positive units only to RhD-positive recipients. Not a transfusion order. magent does not type blood. Does not encode emergency RhD-positive-to-negative exceptions, plasma, or platelets.","parameters":[{"in":"query","name":"recipient_abo","type":"string","enum":["o","a","b","ab"],"description":"Caller-assigned recipient ABO group: o, a, b, or ab (case-insensitive). Required. magent does not type blood.","required":true,"example":"o"},{"in":"query","name":"recipient_rhd","type":"string","enum":["positive","negative"],"description":"Caller-assigned recipient RhD: positive or negative (case-insensitive). Required. magent does not type blood.","required":true,"example":"negative"},{"in":"query","name":"unit_abo","type":"string","enum":["o","a","b","ab"],"description":"Caller-assigned RBC unit ABO group: o, a, b, or ab (case-insensitive). Required. magent does not type blood.","required":true,"example":"o"},{"in":"query","name":"unit_rhd","type":"string","enum":["positive","negative"],"description":"Caller-assigned RBC unit RhD: positive or negative (case-insensitive). Required. magent does not type blood.","required":true,"example":"negative"}],"errors":[{"code":"invalid_rbc_abo","message":"RBC ABO/Rh compatibility inputs must match caller-assigned recipient and unit ABO group and RhD. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rbc-abo","citation":{"authors":"AABB","id":"aabb-rbc-abo-compatibility","source":"28th ed. Bethesda, MD: AABB; 2012. Standard 5.14","title":"Standards for Blood Banks and Transfusion Services","url":"https://www.worldcat.org/isbn/9781563958380"},"formula_expression":"compatible iff abo_compatible and rhd_compatible. RBC ABO: unit o → recipient o|a|b|ab; unit a → a|ab; unit b → b|ab; unit ab → ab. RhD: unit negative → recipient negative|positive; unit positive → recipient positive only (AABB Standards 28th ed. Standard 5.14). Not an emergency RhD-positive-to-negative exception. Not plasma or platelets. magent does not type blood","purpose":"Apply AABB Standards for Blood Banks and Transfusion Services Standard 5.14 ABO/Rh compatibility of RBC units from caller-assigned recipient and unit ABO and RhD, and return compatible, abo_compatible, and rhd_compatible.","markdown_url":"https://magentlab.com/docs/rbc-abo.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rbc_abo"},{"name":"formula_expression","type":"string","description":"AABB Standard 5.14 RBC ABO/Rh compatibility rule"},{"name":"recipient_abo","type":"string","description":"Echo of caller-assigned recipient ABO (o, a, b, or ab)"},{"name":"recipient_rhd","type":"string","description":"Echo of caller-assigned recipient RhD (positive or negative)"},{"name":"unit_abo","type":"string","description":"Echo of caller-assigned unit ABO (o, a, b, or ab)"},{"name":"unit_rhd","type":"string","description":"Echo of caller-assigned unit RhD (positive or negative)"},{"name":"abo_compatible","type":"boolean","description":"true when the unit ABO is ABO-compatible for RBC transfusion to the recipient"},{"name":"rhd_compatible","type":"boolean","description":"true when the unit RhD is compatible: RhD-negative units to either RhD; RhD-positive units only to RhD-positive recipients"},{"name":"compatible","type":"boolean","description":"true only when both abo_compatible and rhd_compatible hold"},{"name":"criteria","type":"array","description":"Per-factor rows with factor and met for ABO and RhD"},{"name":"citation","type":"object","description":"AABB Standards 28th ed. Standard 5.14 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"recipient_abo":"o","recipient_rhd":"negative","unit_abo":"o","unit_rhd":"negative"},{"recipient_abo":"o","recipient_rhd":"negative","unit_abo":"o","unit_rhd":"negative"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rbc-abo","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rbc-abo?recipient_abo=o&recipient_rhd=negative&unit_abo=o&unit_rhd=negative","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rbc-abo","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/cryoprecipitate","description":"Cryoprecipitate bag estimate from the AABB Technical Manual calculation as reprinted in Nascimento 2011: 70 mL/kg blood volume, 250 mg fibrinogen per bag, bags = ceil(mg_fibrinogen / 250). Deterministic published arithmetic with citation. Not a transfusion order or major-haemorrhage protocol. The paper notes 100% recovery is likely false and fibrinogen per bag varies. magent does not choose a product or ABO group.","parameters":[{"in":"query","name":"weight_kg","type":"number","description":"Weight in kilograms (1-200). Required.","required":true,"example":"70"},{"in":"query","name":"hematocrit_percent","type":"number","description":"Hematocrit as a percent (10-70). Required. Not a 0-1 fraction; magent does not accept hematocrit_fraction.","required":true,"example":"40"},{"in":"query","name":"current_fibrinogen_mg_dl","type":"number","description":"Current fibrinogen in mg/dL (0-400). Required.","required":true,"example":"100"},{"in":"query","name":"desired_fibrinogen_mg_dl","type":"number","description":"Desired fibrinogen in mg/dL (50-400). Must be strictly greater than current_fibrinogen_mg_dl.","required":true,"example":"200"}],"errors":[{"code":"invalid_cryo","message":"Cryoprecipitate bag arithmetic must match the AABB Technical Manual calculation reprinted in Nascimento 2011 weight, hematocrit, and fibrinogen increment from that paper. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/cryoprecipitate","citation":{"authors":"Nascimento B, Rizoli S, Rubenfeld G, Lin Y, Callum J, Tien HC","doi":"10.1111/j.1365-3148.2011.01098.x","id":"nascimento-2011","pmid":"21851429","source":"Transfus Med. 2011;21(6):394-401","title":"Cryoprecipitate transfusion: assessing appropriateness and dosing in trauma","url":"https://doi.org/10.1111/j.1365-3148.2011.01098.x"},"formula_expression":"blood_volume_ml = 70 * weight_kg; plasma_volume_ml = blood_volume_ml * (1 - hematocrit_percent/100); mg_fibrinogen = (desired_fibrinogen_mg_dl - current_fibrinogen_mg_dl) * plasma_volume_ml / 100; bags = ceil(mg_fibrinogen / 250)","purpose":"Compute a cryoprecipitate bag estimate from the AABB Technical Manual calculation as reprinted in Nascimento 2011: blood volume 70 mL/kg and 250 mg fibrinogen per bag.","markdown_url":"https://magentlab.com/docs/cryoprecipitate.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"nascimento_2011"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"weight_kg","type":"number","description":"Input weight in kg"},{"name":"hematocrit_percent","type":"number","description":"Hematocrit percent used"},{"name":"current_fibrinogen_mg_dl","type":"number","description":"Current fibrinogen in mg/dL"},{"name":"desired_fibrinogen_mg_dl","type":"number","description":"Desired fibrinogen in mg/dL"},{"name":"blood_volume_ml","type":"number","description":"Estimated blood volume in mL (70 mL/kg), 1 decimal"},{"name":"plasma_volume_ml","type":"number","description":"Estimated plasma volume in mL, 1 decimal"},{"name":"mg_fibrinogen","type":"number","description":"Fibrinogen increment in mg, 1 decimal"},{"name":"bags","type":"integer","description":"Cryoprecipitate bags, ceil(mg_fibrinogen / 250)"},{"name":"citation","type":"object","description":"Nascimento et al. 2011 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"current_fibrinogen_mg_dl":"100","desired_fibrinogen_mg_dl":"200","hematocrit_percent":"40","weight_kg":"70"},{"current_fibrinogen_mg_dl":"100","desired_fibrinogen_mg_dl":"200","hematocrit_percent":"40","weight_kg":"70"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/cryoprecipitate","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/cryoprecipitate?weight_kg=70&hematocrit_percent=40&current_fibrinogen_mg_dl=100&desired_fibrinogen_mg_dl=200","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/cryoprecipitate","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/periop-doac","description":"Douketis 2022 ACCP elective perioperative DOAC interruption (PAUSE-style, recommendations 22-25). Returns hold_days_before and resume_days_after from INN (apixaban, rivaroxaban, edoxaban, dabigatran) and bleed_risk. dabigatran also needs caller-assigned CrCl. heparin_bridge is always false (recommendation 26). Not warfarin, not urgent surgery, not a prescription. magent does not assay CrCl.","parameters":[{"in":"query","name":"doac","type":"string","enum":["apixaban","rivaroxaban","edoxaban","dabigatran"],"description":"Direct oral anticoagulant INN, case-insensitive: apixaban, rivaroxaban, edoxaban, or dabigatran. Elective procedures only. Not warfarin or a VKA.","required":true,"example":"apixaban"},{"in":"query","name":"bleed_risk","type":"string","enum":["low_to_moderate","high"],"description":"Procedure bleed-risk category from Douketis 2022, case-insensitive: low_to_moderate or high. Caller assigns the category. Not urgent surgery.","required":true,"example":"low_to_moderate"},{"in":"query","name":"crcl_ml_min","type":"number","description":"Caller-assigned creatinine clearance in mL/min (15-120). Required only when doac is dabigatran. Must be absent for apixaban, rivaroxaban, and edoxaban. magent does not assay CrCl.","required":false,"example":"40"}],"errors":[{"code":"invalid_periop_doac","message":"Perioperative DOAC hold inputs must match Douketis 2022 drug, bleed-risk category, and dabigatran CrCl window from that guideline. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/periop-doac","citation":{"authors":"Douketis JD, Spyropoulos AC, Murad MH, et al.","doi":"10.1016/j.chest.2022.07.025","id":"douketis-2022","pmid":"35964704","source":"Chest. 2022;162(5):e207-e243","title":"Perioperative Management of Antithrombotic Therapy: An American College of Chest Physicians Clinical Practice Guideline","url":"https://doi.org/10.1016/j.chest.2022.07.025"},"formula_expression":"Douketis 2022 PAUSE-style elective DOAC interruption (recommendations 22-25): apixaban/rivaroxaban/edoxaban hold 1 day (low_to_moderate) or 2 days (high); dabigatran CrCl>=50 same 1/2; dabigatran CrCl<50 hold 2 (low_to_moderate) or 4 (high); resume 1 day after low_to_moderate or 2 days after high; heparin_bridge always false (recommendation 26)","purpose":"Return published elective perioperative DOAC hold and resume day counts from Douketis 2022 (PAUSE-style implementation considerations, recommendations 22-25) given the INN, procedure bleed-risk category, and dabigatran CrCl when required.","markdown_url":"https://magentlab.com/docs/periop-doac.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"periop_doac"},{"name":"formula_expression","type":"string","description":"Douketis 2022 PAUSE-style elective hold and resume tree"},{"name":"doac","type":"string","description":"Normalized INN: apixaban, rivaroxaban, edoxaban, or dabigatran"},{"name":"bleed_risk","type":"string","description":"Normalized bleed-risk category: low_to_moderate or high"},{"name":"crcl_ml_min","type":"number","description":"Caller-assigned CrCl in mL/min used for dabigatran. Omitted when doac is not dabigatran."},{"name":"hold_days_before","type":"integer","description":"Days to hold the DOAC before an elective procedure"},{"name":"resume_days_after","type":"integer","description":"Days after the procedure before resuming the DOAC"},{"name":"heparin_bridge","type":"boolean","description":"Always false. Recommendation 26 suggests against heparin bridging of a DOAC."},{"name":"total_pre_post_days","type":"integer","description":"hold_days_before plus resume_days_after"},{"name":"criteria","type":"array","description":"Tree rows for doac, high_bleed_risk, dabigatran, and dabigatran_crcl_lt_50"},{"name":"citation","type":"object","description":"Douketis 2022 Chest citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"bleed_risk":"low_to_moderate","doac":"apixaban"},{"bleed_risk":"low_to_moderate","doac":"apixaban"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/periop-doac","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/periop-doac?doac=apixaban&bleed_risk=low_to_moderate","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/periop-doac","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/tpe","description":"Kaplan 1990 estimated plasma volume for therapeutic plasma exchange: epv_l = 0.065 * weight_kg * (1 - hematocrit_percent/100). Returns one plasma volume in liters and milliliters. Hematocrit is a percent (10-70), not a 0-1 fraction. Deterministic published arithmetic with citation. Not an apheresis order, Nadler blood volume, Ganzoni iron deficit, or a 1.5-PV / removal-percent table.","parameters":[{"in":"query","name":"weight_kg","type":"number","description":"Weight in kilograms. Provide weight_kg or weight_lb.","required":false,"example":"70"},{"in":"query","name":"weight_lb","type":"number","description":"Weight in pounds. Converted as kg = lb * 0.45359237.","required":false,"example":"154.32"},{"in":"query","name":"hematocrit_percent","type":"number","description":"Hematocrit as a percent (10-70). Required. Not a 0-1 fraction; magent does not accept hematocrit_fraction.","required":true,"example":"40"}],"errors":[{"code":"invalid_weight","message":"weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_hematocrit","message":"hematocrit_percent must be a number from 10 to 70. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/tpe","citation":{"authors":"Kaplan AA","id":"kaplan-1990","pmid":"2252761","source":"ASAIO Trans. 1990;36(3):M597-M599","title":"A simple and accurate method for prescribing plasma exchange","url":"https://pubmed.ncbi.nlm.nih.gov/2252761"},"formula_expression":"epv_l = 0.065 * weight_kg * (1 - hematocrit_fraction)","purpose":"Compute Kaplan 1990 estimated plasma volume for therapeutic plasma exchange from weight and hematocrit as a percent, returning one plasma volume in liters and milliliters.","markdown_url":"https://magentlab.com/docs/tpe.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"kaplan_1990"},{"name":"formula_expression","type":"string","description":"Exact Kaplan 1990 EPV expression"},{"name":"weight_kg","type":"number","description":"Normalized weight in kg"},{"name":"hematocrit_percent","type":"number","description":"Hematocrit percent used"},{"name":"epv_l","type":"number","description":"Estimated plasma volume in liters, 2 decimals"},{"name":"one_pv_ml","type":"number","description":"Same EPV in milliliters (epv_l * 1000), 0 decimals"},{"name":"citation","type":"object","description":"Kaplan ASAIO Trans 1990 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"hematocrit_percent":"40","weight_kg":"70"},{"hematocrit_percent":"40","weight_kg":"70"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/tpe","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/tpe?weight_kg=70&hematocrit_percent=40","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/tpe","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/cci","description":"Corrected count increment (CCI) after platelet transfusion: (post - pre platelet count per uL) * BSA_m2 / (dose in 10^11). Davis 1999 Transfusion. Returns CCI and the uncorrected increment only. Caller supplies BSA; magent does not compute Nadler BSA from height/weight, assay platelets, emit a 5000 or 7500 refractoriness cutoff, or order a transfusion. Davis 1999 cautions CCI/PPR can distort comparisons of platelet products.","parameters":[{"in":"query","name":"pre_plt_per_ul","type":"number","description":"Pretransfusion platelet count per µL (0-2000000). Same numeric value as ×10^9/L for the increment. magent does not assay platelets.","required":true,"example":"10000"},{"in":"query","name":"post_plt_per_ul","type":"number","description":"Posttransfusion platelet count per µL (0-2000000). Must be at least pre_plt_per_ul. magent does not assay platelets.","required":true,"example":"30000"},{"in":"query","name":"bsa_m2","type":"number","description":"Caller-supplied body-surface area in m² (0.1-4.0). Required. magent does not measure BSA and does not compute Nadler BSA from height and weight.","required":true,"example":"1.8"},{"in":"query","name":"platelets_transfused_e11","type":"number","description":"Platelet dose already in units of 10^11 (0.1-50). Example: 3 means 3×10^11 platelets. Must be positive. magent does not assay the unit.","required":true,"example":"3"}],"errors":[{"code":"invalid_cci","message":"Corrected count increment inputs must be numeric platelet counts, body-surface area, and platelet dose as used in that measure. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/cci","citation":{"authors":"Davis KB, Slichter SJ, Corash L","doi":"10.1046/j.1537-2995.1999.39060586.x","id":"davis-1999","pmid":"10378838","source":"Transfusion. 1999;39(6):586-592","title":"Corrected count increment and percent platelet recovery as measures of posttransfusion platelet response: problems and a solution","url":"https://doi.org/10.1046/j.1537-2995.1999.39060586.x"},"formula_expression":"cci = (post_plt_per_ul - pre_plt_per_ul) * bsa_m2 / platelets_transfused_e11","purpose":"Compute the conventional corrected count increment after platelet transfusion from pre and post platelet counts per µL, caller-supplied BSA, and dose in units of 10^11.","markdown_url":"https://magentlab.com/docs/cci.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"cci"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"pre_plt_per_ul","type":"number","description":"Pretransfusion platelet count used, per µL"},{"name":"post_plt_per_ul","type":"number","description":"Posttransfusion platelet count used, per µL"},{"name":"bsa_m2","type":"number","description":"Caller-supplied BSA used, m²"},{"name":"platelets_transfused_e11","type":"number","description":"Platelet dose used, in units of 10^11"},{"name":"increment_per_ul","type":"number","description":"Post minus pre platelet count per µL, 0 decimals"},{"name":"cci","type":"number","description":"Corrected count increment, 0 decimals. increment_per_ul × bsa_m2 / platelets_transfused_e11. Not a refractoriness class."},{"name":"citation","type":"object","description":"Davis 1999 Transfusion citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"bsa_m2":"1.8","platelets_transfused_e11":"3","post_plt_per_ul":"30000","pre_plt_per_ul":"10000"},{"bsa_m2":"1.8","platelets_transfused_e11":"3","post_plt_per_ul":"30000","pre_plt_per_ul":"10000"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/cci","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/cci?pre_plt_per_ul=10000&post_plt_per_ul=30000&bsa_m2=1.8&platelets_transfused_e11=3","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/cci","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/wpss","description":"Malcovati 2007 WPSS for MDS: WHO category (RA/RARS/5q- 0, RCMD/RCMD-RS 1, RAEB-1 2, RAEB-2 3), IPSS karyotype (good 0, intermediate 1, poor 2; caller assigns the three-group class), regular RBC transfusion 1 (at least one every 8 weeks over 4 months); max 6. very_low 0 through very_high 5–6. Not IPSS-R, not IPSS 1997, not DIPSS. magent does not karyotype or assign WHO category.","parameters":[{"in":"query","name":"who_mds","type":"string","enum":["ra_rars_5q","rcmd","raeb1","raeb2"],"description":"Malcovati 2007 Table 2 WHO 2001 group as assigned by the caller. ra_rars_5q is RA, RARS, or MDS with isolated del(5q) and scores 0. rcmd is RCMD or RCMD-RS and scores 1. raeb1 is RAEB-1 and scores 2. raeb2 is RAEB-2 and scores 3. magent does not assign WHO category.","required":true,"example":"ra_rars_5q"},{"in":"query","name":"cytogenetics","type":"string","enum":["good","intermediate","poor"],"description":"IPSS (Greenberg 1997) cytogenetic group as assigned by the caller (good 0, intermediate 1, poor 2). Not the IPSS-R five-group scale (very_good and very_poor are invalid). magent does not karyotype.","required":true,"example":"good"},{"in":"query","name":"regular_transfusion","type":"boolean","description":"Regular RBC transfusion requirement as assigned by the caller (Malcovati 2007: at least one RBC transfusion every 8 weeks over 4 months). true scores 1. magent does not count units.","required":true,"example":"false"}],"errors":[{"code":"invalid_wpss","message":"each WPSS 2007 item must be a published WHO, karyotype, or transfusion category. Returned before settlement; you are not charged.","status":400},{"code":"invalid_who_mds","message":"who_mds must be ra_rars_5q, rcmd, raeb1, or raeb2 (Malcovati 2007 WHO groups). Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/wpss","citation":{"authors":"Malcovati L, Germing U, Kuendgen A, et al.","doi":"10.1200/JCO.2006.08.5696","id":"malcovati-2007","pmid":"17687155","source":"J Clin Oncol. 2007;25(23):3503-3510","title":"Time-dependent prognostic scoring system for predicting survival and leukemic evolution in myelodysplastic syndromes","url":"https://doi.org/10.1200/JCO.2006.08.5696"},"formula_expression":"WPSS = WHO (ra_rars_5q 0, rcmd 1, raeb1 2, raeb2 3) + karyotype (good 0, intermediate 1, poor 2) + regular_transfusion 1; Malcovati 2007 Table 2; max 6; very_low 0, low 1, intermediate 2, high 3-4, very_high 5-6","purpose":"Sum the Malcovati 2007 WPSS (WHO classification-based prognostic scoring system) for myelodysplastic syndromes and return very_low (0), low (1), intermediate (2), high (3–4), or very_high (5–6).","markdown_url":"https://magentlab.com/docs/wpss.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"wpss"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"WPSS points 0-6"},{"name":"max_score","type":"integer","description":"Always 6 (3+2+1)"},{"name":"risk_group","type":"string","description":"very_low when score is 0, low when 1, intermediate when 2, high when 3-4, very_high when 5-6 (Malcovati 2007 Table 2). Not an MDS diagnosis. Not IPSS-R. Not IPSS 1997. Not DIPSS."},{"name":"who_mds","type":"string","description":"Caller-assigned WHO 2001 Table 2 group used"},{"name":"cytogenetics","type":"string","description":"Caller-assigned IPSS three-group karyotype used"},{"name":"regular_transfusion","type":"boolean","description":"Caller-assigned regular-transfusion flag used"},{"name":"components","type":"array","description":"Per-factor points"},{"name":"citation","type":"object","description":"Malcovati et al. J Clin Oncol 2007 WPSS citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"cytogenetics":"good","regular_transfusion":"false","who_mds":"ra_rars_5q"},{"cytogenetics":"good","regular_transfusion":"false","who_mds":"ra_rars_5q"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/wpss","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/wpss?who_mds=ra_rars_5q&cytogenetics=good&regular_transfusion=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/wpss","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/pbsc-collection","description":"Rosenbaum 2012 predicted daily CD34+ leukapheresis yield: (peripheral_cd34_per_ul * 0.30 / weight_kg) * processed_volume_l, as ×10^6 cells/kg. Uses that paper's adjusted collection efficiency of 30% only. Weight via weight_kg or weight_lb. Deterministic published arithmetic with citation. Not an apheresis order; magent does not run the collection, choose a machine, or set a collection goal.","parameters":[{"in":"query","name":"peripheral_cd34_per_ul","type":"number","description":"Pre-apheresis peripheral blood CD34+ cells per µL (0.1-1000, magent clamp). Rosenbaum 2012 uses this count with the printed 30% efficiency. magent does not assay CD34.","required":true,"example":40},{"in":"query","name":"processed_volume_l","type":"number","description":"Processed blood volume in liters (1-40, magent clamp). Rosenbaum 2012 validated 30 L large-volume leukapheresis and smaller non-LVL collections. magent does not set a processed volume.","required":true,"example":15},{"in":"query","name":"weight_kg","type":"number","description":"Recipient or patient weight in kilograms. Provide weight_kg or weight_lb.","required":false,"example":70},{"in":"query","name":"weight_lb","type":"number","description":"Recipient or patient weight in pounds. Converted as kg = lb * 0.45359237.","required":false,"example":154.32}],"errors":[{"code":"invalid_pbsc_collection","message":"Rosenbaum 2012 CD34 yield inputs must match that paper's peripheral CD34 count, processed volume, collection-efficiency term, and recipient weight. Returned before settlement; you are not charged.","status":400},{"code":"invalid_cd34_count","message":"peripheral_cd34_per_ul must be a positive number in the range printed for Rosenbaum 2012. Returned before settlement; you are not charged.","status":400},{"code":"invalid_processed_volume","message":"processed_volume_l must be a positive number in the range used by Rosenbaum 2012. Returned before settlement; you are not charged.","status":400},{"code":"invalid_weight","message":"weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/pbsc-collection","citation":{"authors":"Rosenbaum ER, O'Connell B, Cottler-Fox M","doi":"10.3109/14653249.2011.652733","id":"rosenbaum-2012","pmid":"22277012","source":"Cytotherapy. 2012;14(4):461-466","title":"Validation of a formula for predicting daily CD34+ cell collection by leukapheresis","url":"https://doi.org/10.3109/14653249.2011.652733"},"formula_expression":"predicted_cd34_e6_per_kg = (peripheral_cd34_per_ul * 0.30 / weight_kg) * processed_volume_l","purpose":"Compute Rosenbaum 2012 predicted daily CD34+ yield (×10^6 per kg) from pre-apheresis peripheral blood CD34+ cells/µL, processed blood volume, and recipient or patient weight, using that paper's adjusted collection efficiency of 30%.","markdown_url":"https://magentlab.com/docs/pbsc-collection.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rosenbaum_2012"},{"name":"formula_expression","type":"string","description":"Exact Rosenbaum 2012 prediction expression"},{"name":"peripheral_cd34_per_ul","type":"number","description":"Pre-apheresis peripheral blood CD34+ cells/µL used"},{"name":"processed_volume_l","type":"number","description":"Processed blood volume in liters used"},{"name":"weight_kg","type":"number","description":"Normalized recipient or patient weight in kg"},{"name":"collection_efficiency","type":"number","description":"Rosenbaum 2012 adjusted collection efficiency (0.30)"},{"name":"predicted_cd34_e6_per_kg","type":"number","description":"Predicted CD34+ yield as ×10^6 cells/kg, 2 decimals"},{"name":"citation","type":"object","description":"Rosenbaum Cytotherapy 2012 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"peripheral_cd34_per_ul":"40","processed_volume_l":"15","weight_kg":"70"},{"peripheral_cd34_per_ul":"40","processed_volume_l":"15","weight_kg":"70"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/pbsc-collection","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/pbsc-collection?peripheral_cd34_per_ul=40&processed_volume_l=15&weight_kg=70","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/pbsc-collection","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/dli-volume","description":"Shi 2020 donor whole-blood liters to process for a CD3+ DLI target: (recipient_weight_kg × cd3_target_per_kg × num_infusions) / (0.6 × donor_alc_per_ul × collection_efficiency × 1e6). Estimates CD3 as 60% of donor ALC. Caller assigns collection_efficiency in (0,1]; the paper used first-quartile 0.57. Deterministic published arithmetic with citation. Not an apheresis order; magent does not run a device or the paper's CD34 HPC algorithm.","parameters":[{"in":"query","name":"recipient_weight_kg","type":"number","description":"Recipient weight in kilograms (1-500, magent clamp). Shi 2020 doses CD3 per recipient kg. magent does not weigh the recipient.","required":true,"example":70},{"in":"query","name":"cd3_target_per_kg","type":"number","description":"Planned CD3+ cells per recipient kilogram (1e6-1e9, magent clamp). Shi 2020's haploidentical protocol used 2e8/kg; a first DLI is often 1e7/kg. Not a CD34 HPC dose.","required":true,"example":10000000},{"in":"query","name":"donor_alc_per_ul","type":"number","description":"Donor absolute lymphocyte count on the collection day, cells/µL (100-20000, magent clamp). Shi 2020 estimates CD3+ as 60% of this ALC rather than a measured CD3 count. magent does not assay ALC.","required":true,"example":1800},{"in":"query","name":"collection_efficiency","type":"number","description":"Caller-assigned facility lymphocyte CE2 as a proportion in (0, 1]. Shi 2020 used a conservative first-quartile 0.57; magent does not default to 0.57 or invent a CE.","required":true,"example":0.5},{"in":"query","name":"num_infusions","type":"integer","description":"Optional integer infusions (1-12, default 1) multiplying the per-kg CD3 target when the planned dose is the total across infusions. Shi 2020 collected one 2e8/kg DLI product.","required":false,"example":1}],"errors":[{"code":"invalid_dli","message":"DLI volume needs recipient weight, CD3 target per kg, donor ALC, and caller collection efficiency as in Shi 2020. Returned before settlement; you are not charged.","status":400},{"code":"invalid_weight","message":"weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_cd3_dose","message":"cd3_target_per_kg must be a positive CD3+ cell dose per kilogram. Returned before settlement; you are not charged.","status":400},{"code":"invalid_donor_alc","message":"donor_alc_per_ul must be a positive absolute lymphocyte count. Returned before settlement; you are not charged.","status":400},{"code":"invalid_collection_efficiency","message":"collection_efficiency must be a proportion in (0, 1] as assigned by the caller (Shi 2020). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/dli-volume","citation":{"authors":"Shi PA, Sachais BS, Nandi V, Brochstein JA, Weinberg RS, Zhang J, Yoon EJ","doi":"10.1111/trf.15576","id":"shi-2020-dli","pmid":"31756000","source":"Transfusion. 2020;60(1):133-143","title":"Validation of simple prediction algorithms to consistently achieve CD3+ and postselection CD34+ targets with leukapheresis","url":"https://doi.org/10.1111/trf.15576"},"formula_expression":"process_volume_l = (recipient_weight_kg * cd3_target_per_kg * num_infusions) / (0.6 * donor_alc_per_ul * collection_efficiency * 1e6)","purpose":"Compute Shi 2020 predicted donor whole-blood volume (L) to process to reach a recipient CD3+ DLI target from recipient weight, CD3 cells/kg, donor collection-day ALC, and caller-assigned collection efficiency, using that paper's conservative 60% CD3 fraction of ALC.","markdown_url":"https://magentlab.com/docs/dli-volume.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"shi_2020"},{"name":"formula_expression","type":"string","description":"Exact Shi 2020 DLI process-volume expression with the µL-to-L conversion"},{"name":"recipient_weight_kg","type":"number","description":"Recipient weight in kg used"},{"name":"cd3_target_per_kg","type":"number","description":"CD3+ cells per recipient kg used"},{"name":"donor_alc_per_ul","type":"number","description":"Donor collection-day ALC in cells/µL used"},{"name":"collection_efficiency","type":"number","description":"Caller-assigned collection efficiency used"},{"name":"num_infusions","type":"integer","description":"Infusions multiplying the per-kg target (default 1)"},{"name":"cd3_fraction","type":"number","description":"Shi 2020 conservative CD3+ fraction of ALC (0.6)"},{"name":"estimated_cd3_per_ul","type":"number","description":"Intermediate estimated CD3+ concentration, 0.6 × ALC, cells/µL"},{"name":"total_cd3_required","type":"number","description":"Total CD3+ cells required (weight × dose/kg × infusions)"},{"name":"process_volume_l","type":"number","description":"Donor whole-blood volume to process in litres, 2 decimals"},{"name":"citation","type":"object","description":"Shi Transfusion 2020 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"cd3_target_per_kg":"10000000","collection_efficiency":"0.5","donor_alc_per_ul":"1800","recipient_weight_kg":"70"},{"cd3_target_per_kg":"10000000","collection_efficiency":"0.5","donor_alc_per_ul":"1800","recipient_weight_kg":"70"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/dli-volume","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/dli-volume?recipient_weight_kg=70&cd3_target_per_kg=10000000&donor_alc_per_ul=1800&collection_efficiency=0.5","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/dli-volume","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/sickle-rbc-exchange","description":"Nadler 1962 adult blood volume plus exponential remaining-fraction washout (Y/Y0 = e^(−X)) for sickle RBC exchange replacement pRBC volume. FCR = target_hbs / initial_hbs; X = −ln(FCR). Caller supplies hematocrits and HbS percents. Optional approx units if unit_volume_ml is sent. Deterministic published arithmetic. Not an apheresis order or medical device.","parameters":[{"in":"query","name":"sex","type":"string","enum":["female","male"],"description":"Sex used by Nadler 1962 (separate male and female equations).","required":true,"example":"male"},{"in":"query","name":"height_cm","type":"number","description":"Height in centimeters. Provide height_cm or height_in.","required":false,"example":170},{"in":"query","name":"height_in","type":"number","description":"Height in inches. Converted as cm = in * 2.54.","required":false,"example":66.92913385826772},{"in":"query","name":"weight_kg","type":"number","description":"Weight in kilograms. Provide weight_kg or weight_lb.","required":false,"example":70},{"in":"query","name":"weight_lb","type":"number","description":"Weight in pounds. Converted as kg = lb * 0.45359237.","required":false,"example":154.32},{"in":"query","name":"hematocrit_percent","type":"number","description":"Patient hematocrit as a percent (10-70). Required. Not a 0-1 fraction.","required":true,"example":30},{"in":"query","name":"initial_hbs_percent","type":"number","description":"Initial HbS percent (1-100). Required. Must be greater than target_hbs_percent.","required":true,"example":90},{"in":"query","name":"target_hbs_percent","type":"number","description":"Target HbS percent (1-100). Required. Must be strictly less than initial_hbs_percent. AABB 2018 usual goal language is HbS not more than 30%; the caller sends this value.","required":true,"example":30},{"in":"query","name":"replacement_hct_percent","type":"number","description":"Replacement packed-RBC hematocrit as a percent (50-80). Required. Typical additive units are about 60. magent does not assay the unit.","required":true,"example":60},{"in":"query","name":"unit_volume_ml","type":"number","description":"Optional caller-assigned unit volume in mL (50-500). When sent, response includes approx_units = replacement_prbc_ml / unit_volume_ml.","required":false,"example":350}],"errors":[{"code":"invalid_rbc_exchange","message":"RBC exchange needs hematocrit, HbS fractions, and replacement hematocrit in published ranges. Returned before settlement; you are not charged.","status":400},{"code":"invalid_sex","message":"sex must be female or male Returned before settlement; you are not charged.","status":400},{"code":"invalid_height","message":"height_cm (50-250) or height_in (20-98) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_weight","message":"weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_hbs","message":"initial_hbs_percent and target_hbs_percent must be 1-100 with target below initial. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/sickle-rbc-exchange","citation":{"authors":"Nadler SB, Hidalgo JH, Bloch T","id":"nadler-1962","pmid":"21936146","source":"Surgery. 1962;51(2):224-232","title":"Prediction of blood volume in normal human adults","url":"https://pubmed.ncbi.nlm.nih.gov/21936146"},"formula_expression":"TBV_L male = 0.3669 * H^3 + 0.03219 * W + 0.6041; female = 0.3561 * H^3 + 0.03308 * W + 0.1833 (H meters, W kg). patient_rbc_volume_ml = TBV_mL * hematocrit_percent/100. FCR = target_hbs_percent/initial_hbs_percent. X = -ln(FCR). replacement_prbc_ml = patient_rbc_volume_ml * X / (replacement_hct_percent/100)","purpose":"Compute replacement packed-RBC volume for sickle red-cell exchange from Nadler 1962 adult blood volume and exponential remaining-fraction washout Y/Y0 = e^(−X), with caller-supplied hematocrits and HbS percents.","markdown_url":"https://magentlab.com/docs/sickle-rbc-exchange.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"nadler_exponential_washout"},{"name":"formula_expression","type":"string","description":"Nadler TBV plus exponential remaining-fraction washout"},{"name":"sex","type":"string","description":"female or male"},{"name":"height_cm","type":"number","description":"Normalized height in cm"},{"name":"weight_kg","type":"number","description":"Normalized weight in kg"},{"name":"blood_volume_l","type":"number","description":"Nadler predicted blood volume in liters, 3 decimals"},{"name":"blood_volume_ml","type":"integer","description":"Nadler predicted blood volume in milliliters, integer"},{"name":"hematocrit_percent","type":"number","description":"Patient hematocrit percent used"},{"name":"initial_hbs_percent","type":"number","description":"Initial HbS percent used"},{"name":"target_hbs_percent","type":"number","description":"Target HbS percent used"},{"name":"replacement_hct_percent","type":"number","description":"Replacement packed-RBC hematocrit percent used"},{"name":"patient_rbc_volume_ml","type":"number","description":"Patient RBC volume in mL (TBV_mL * hematocrit_percent/100), 1 decimal"},{"name":"fcr","type":"number","description":"Fraction of cells remaining (target_hbs / initial_hbs), 4 decimals"},{"name":"rbc_volumes_exchanged","type":"number","description":"RBC volumes to exchange X = -ln(FCR), 4 decimals"},{"name":"replacement_prbc_ml","type":"number","description":"Replacement packed-RBC volume in mL, 1 decimal"},{"name":"unit_volume_ml","type":"number","description":"Caller-assigned unit volume in mL. Omitted when unit_volume_ml is not sent."},{"name":"approx_units","type":"number","description":"replacement_prbc_ml / unit_volume_ml, 2 decimals. Omitted when unit_volume_ml is not sent."},{"name":"citation","type":"object","description":"Nadler Surgery 1962 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"height_cm":"170","hematocrit_percent":"30","initial_hbs_percent":"90","replacement_hct_percent":"60","sex":"male","target_hbs_percent":"30","weight_kg":"70"},{"height_cm":"170","hematocrit_percent":"30","initial_hbs_percent":"90","replacement_hct_percent":"60","sex":"male","target_hbs_percent":"30","weight_kg":"70"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/sickle-rbc-exchange","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/sickle-rbc-exchange?sex=male&height_cm=170&weight_kg=70&hematocrit_percent=30&initial_hbs_percent=90&target_hbs_percent=30&replacement_hct_percent=60","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/sickle-rbc-exchange","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/mme","description":"Returns CDC 2022 morphine milligram equivalents from a published opioid key.","parameters":[{"in":"query","name":"opioid","type":"string","enum":["codeine","fentanyl_transdermal","hydrocodone","hydromorphone","methadone","morphine","oxycodone","oxymorphone","tapentadol","tramadol"],"description":"CDC 2022 MME table key (case-insensitive exact match). Not a brand name or alias.","required":true,"example":"hydrocodone"},{"in":"query","name":"dose","type":"number","description":"Daily opioid dose in mg/day (0.1-5000), or fentanyl_transdermal patch rate in mcg/hr (12-300).","required":true,"example":"20"}],"errors":[{"code":"invalid_opioid","message":"opioid must be codeine, fentanyl_transdermal, hydrocodone, hydromorphone, methadone, morphine, oxycodone, oxymorphone, tapentadol, or tramadol. Returned before settlement; you are not charged.","status":400},{"code":"invalid_opioid_dose","message":"dose must be a number in range for that opioid (mg/day, or mcg/hr for fentanyl_transdermal). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/mme","citation":{"authors":"Dowell D, Ragan KR, Jones CM, Baldwin GT, Chou R","doi":"10.15585/mmwr.rr7103a1","id":"cdc-mme-2022","source":"MMWR Recomm Rep. 2022;71(No. RR-3):1-95","title":"CDC Clinical Practice Guideline for Prescribing Opioids for Pain — United States, 2022","url":"https://doi.org/10.15585/mmwr.rr7103a1"},"formula_expression":"mme = dose * conversion_factor (dose is mg/day except fentanyl_transdermal in mcg/hr)","purpose":"Compute morphine milligram equivalents from a CDC 2022 table opioid and daily dose (or transdermal fentanyl mcg/hr).","markdown_url":"https://magentlab.com/docs/mme.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"mme"},{"name":"formula_expression","type":"string","description":"mme = dose * conversion_factor with CDC units note"},{"name":"opioid","type":"string","description":"Normalized CDC 2022 table key"},{"name":"dose","type":"number","description":"Parsed dose (mg/day, or mcg/hr for fentanyl_transdermal)"},{"name":"dose_unit","type":"string","description":"mg/day, or mcg/hr for fentanyl_transdermal"},{"name":"conversion_factor","type":"number","description":"CDC 2022 table conversion factor for that opioid"},{"name":"mme","type":"number","description":"Morphine milligram equivalents, 4 decimal max"},{"name":"citation","type":"object","description":"CDC 2022 MMWR MME table"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"dose":"20","opioid":"hydrocodone"},{"dose":"20","opioid":"hydrocodone"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/mme","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/mme?opioid=hydrocodone&dose=20","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/mme","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rhig","description":"ACOG Practice Bulletin 181 RhD immune globulin vial arithmetic. fmh_ml = fetal_cells_percent/100 * maternal_blood_volume_ml. One 300 microgram vial covers 30 mL Rh D-positive fetal whole blood. AABB Technical Manual rounding: if frac(fmh_ml/30) >= 0.5 round up then add one vial; if < 0.5 round down then add one. Minimum 1 vial. Caller assigns Kleihauer–Betke percent and maternal volume; magent does not read slides. Not a prescription or brand order.","parameters":[{"in":"query","name":"fetal_cells_percent","type":"number","description":"Caller-assigned Kleihauer–Betke fetal-cell percent (0-5). magent does not interpret slides.","required":true,"example":"0.4"},{"in":"query","name":"maternal_blood_volume_ml","type":"number","description":"Caller-assigned maternal blood volume in mL (3000-10000). magent does not compute Nadler EBV.","required":true,"example":"5000"}],"errors":[{"code":"invalid_rhig","message":"RhIG vial arithmetic must match ACOG Practice Bulletin 181 fetal-cell percent and maternal blood volume from that bulletin. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rhig","citation":{"authors":"Committee on Practice Bulletins-Obstetrics","doi":"10.1097/AOG.0000000000002232","id":"acog-2017-181","pmid":"28742673","source":"Obstet Gynecol. 2017;130(2):e57-e70","title":"Prevention of Rh D Alloimmunization","url":"https://doi.org/10.1097/AOG.0000000000002232"},"formula_expression":"fmh_ml = fetal_cells_percent / 100 * maternal_blood_volume_ml; raw = fmh_ml / 30; vials = (frac(raw) >= 0.5 ? ceil(raw) : floor(raw)) + 1","purpose":"Compute ACOG Practice Bulletin 181 RhD immune globulin vial count from caller-assigned fetal-cell percent and maternal blood volume using AABB Technical Manual rounding of FMH/30.","markdown_url":"https://magentlab.com/docs/rhig.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"acog_pb_181"},{"name":"formula_expression","type":"string","description":"FMH whole-blood formula and AABB vial rounding"},{"name":"fetal_cells_percent","type":"number","description":"Caller-assigned Kleihauer–Betke percent used"},{"name":"maternal_blood_volume_ml","type":"number","description":"Caller-assigned maternal blood volume in mL"},{"name":"fmh_ml","type":"number","description":"Fetomaternal hemorrhage in mL of whole blood, 1 decimal"},{"name":"raw","type":"number","description":"fmh_ml / 30 before AABB rounding, 3 decimals"},{"name":"vials","type":"integer","description":"300 microgram RhD immune globulin vials after AABB rounding"},{"name":"vial_micrograms","type":"integer","description":"ACOG PB 181 standard vial size (300 micrograms)"},{"name":"citation","type":"object","description":"ACOG Practice Bulletin 181 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"fetal_cells_percent":"0.4","maternal_blood_volume_ml":"5000"},{"fetal_cells_percent":"0.4","maternal_blood_volume_ml":"5000"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rhig","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rhig?fetal_cells_percent=0.4&maternal_blood_volume_ml=5000","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rhig","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/cdc-imm","description":"ACIP 2025 Table 2 catch-up minimum age and previous-dose interval. Eligible if age_months meets the printed minimum and weeks_since_previous_dose meets a printed interval (omit for dose 1). HepB dose 2 is 4 weeks. MMR/HepA/varicella dose 1 is 12 months. Not a vaccine order. magent does not immunize. Not routine age bars, Hib/PCV branching, HepB dose 3, or the 4-day grace period.","parameters":[{"in":"query","name":"vaccine","type":"string","enum":["hepb","mmr","dtap","ipv","hepa","var","tdap"],"description":"Caller-assigned antigen with a numeric Table 2 minimum age and/or previous-dose interval: hepb, mmr, dtap, ipv, hepa, var, or tdap. Not a vaccine order.","required":true,"example":"hepb"},{"in":"query","name":"dose_number","type":"integer","description":"Dose number in the series as printed (integer 1-5). Only rows with a numeric minimum age and/or interval are implemented; other dose numbers are rejected.","required":true,"example":2},{"in":"query","name":"age_months","type":"integer","description":"Caller-assigned completed age in months (integer 0-216; 18 years or younger). magent does not derive chronological age.","required":true,"example":4},{"in":"query","name":"weeks_since_previous_dose","type":"integer","description":"Whole weeks since the previous dose (integer 0-520). Required for dose 2 and later. Must be omitted for dose 1 as Table 2 prints no previous-dose interval.","required":false,"example":4}],"errors":[{"code":"invalid_cdc_imm","message":"CDC catch-up immunization inputs must match the printed vaccine, dose number, age, and interval columns. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/cdc-imm","citation":{"authors":"Issa AN, Wodi AP, Moser CA, Cineas S","doi":"10.15585/mmwr.mm7402a2","id":"cdc-acip-catch-up-schedule","pmid":"39819853","source":"MMWR Morb Mortal Wkly Rep. 2025;74(2):26-29","title":"Advisory Committee on Immunization Practices Recommended Immunization Schedule for Children and Adolescents Aged 18 Years or Younger — United States, 2025","url":"https://doi.org/10.15585/mmwr.mm7402a2"},"formula_expression":"ACIP 2025 child/adolescent catch-up Table 2: eligible if age_months >= minimum_age_months and (dose 1 has no printed interval, or weeks_since_previous_dose >= minimum_interval_weeks). HepB dose 1 birth = 0 months; HepB dose 2 = 4 weeks. MMR dose 1 = 12 months; MMR dose 2 = 4 weeks. HepA and varicella dose 1 = 12 months. DTaP/IPV dose 1 = 6 weeks as 1.5 months; DTaP doses 2-3 and IPV dose 2 = 4 weeks (DTaP only when age_months < 84). Tdap dose 1 = 84 months. Not Table 1 routine bars. Not Hib, PCV, rotavirus, HepB dose 3, 6-month intervals, the 4-day grace period, or live-virus spacing beyond this table. magent does not immunize","purpose":"Return the printed ACIP 2025 catch-up Table 2 minimum age and previous-dose interval for a caller-assigned antigen and dose, and whether that age and interval are met.","markdown_url":"https://magentlab.com/docs/cdc-imm.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"cdc_imm"},{"name":"formula_expression","type":"string","description":"Published ACIP 2025 Table 2 catch-up age and interval rule"},{"name":"vaccine","type":"string","description":"Caller-assigned antigen used"},{"name":"dose_number","type":"integer","description":"Dose number in the series"},{"name":"age_months","type":"integer","description":"Caller-assigned completed age in months"},{"name":"weeks_since_previous_dose","type":"integer","description":"Weeks since the previous dose, or null for dose 1"},{"name":"minimum_age_months","type":"number","description":"Printed minimum age in months for that antigen and dose"},{"name":"minimum_interval_weeks","type":"integer","description":"Printed previous-dose interval in weeks, or null for dose 1"},{"name":"eligible","type":"boolean","description":"True when age meets the printed minimum and a printed interval is met. Not a vaccine order."},{"name":"components","type":"array","description":"Tree rows for age_met and interval_met with factor, met, and value"},{"name":"citation","type":"object","description":"Issa 2025 MMWR ACIP schedule citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age_months":"4","dose_number":"2","vaccine":"hepb","weeks_since_previous_dose":"4"},{"age_months":"4","dose_number":"2","vaccine":"hepb","weeks_since_previous_dose":"4"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/cdc-imm","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/cdc-imm?vaccine=hepb&dose_number=2&age_months=4&weeks_since_previous_dose=4","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/cdc-imm","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/fomepizole","description":"Adult IV fomepizole milligrams from weight (AACT 1999). Loading 15 mg/kg. Maintenance 10 mg/kg every 12 hours for four doses, then 15 mg/kg every 12 hours after 48 hours (auto-induction). Same milligrams during hemodialysis at a 4-hour interval. Not a prescription, indication, or brand order. magent does not assay ethylene glycol or methanol.","parameters":[{"in":"query","name":"weight_kg","type":"number","description":"Weight in kilograms (1-200).","required":true,"example":"70"},{"in":"query","name":"hemodialysis","type":"boolean","description":"true during hemodialysis (same milligrams, interval 4 hours). false otherwise (interval 12 hours). Required.","required":true,"example":"false"}],"errors":[{"code":"invalid_fomepizole","message":"Fomepizole inputs must match Barceloux 1999 AACT weight and hemodialysis flag from that guideline. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/fomepizole","citation":{"authors":"Barceloux DG, Krenzelok EP, Olson K, Watson W","doi":"10.1081/CLT-100102445","id":"barceloux-1999","pmid":"10497633","source":"J Toxicol Clin Toxicol. 1999;37(5):537-560","title":"American Academy of Clinical Toxicology Practice Guidelines on the Treatment of Ethylene Glycol Poisoning","url":"https://doi.org/10.1081/CLT-100102445"},"formula_expression":"load_mg = weight_kg * 15; maintenance_10_mg = weight_kg * 10; maintenance_15_mg = weight_kg * 15; interval_hours = hemodialysis ? 4 : 12","purpose":"Compute adult IV fomepizole loading and maintenance milligrams from body weight using the AACT 1999 ethylene glycol guideline schedule, with a 12-hour or 4-hour interval from the hemodialysis flag.","markdown_url":"https://magentlab.com/docs/fomepizole.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"fomepizole"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"weight_kg","type":"number","description":"Input weight in kg"},{"name":"hemodialysis","type":"boolean","description":"true during hemodialysis; false otherwise"},{"name":"load_mg","type":"number","description":"Loading dose in milligrams (15 mg/kg), 1 decimal"},{"name":"maintenance_10_mg","type":"number","description":"Maintenance 10 mg/kg milligrams for the first four doses, 1 decimal"},{"name":"maintenance_15_mg","type":"number","description":"Maintenance 15 mg/kg milligrams after 48 hours (auto-induction), 1 decimal"},{"name":"interval_hours","type":"integer","description":"12 without hemodialysis; 4 during hemodialysis"},{"name":"citation","type":"object","description":"Barceloux et al. AACT 1999 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"hemodialysis":"false","weight_kg":"70"},{"hemodialysis":"false","weight_kg":"70"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/fomepizole","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/fomepizole?weight_kg=70&hemodialysis=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/fomepizole","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/naloxone-drip","description":"Continuous intravenous naloxone infusion as two-thirds of the caller-assigned reversal bolus each hour (Goldfrank 1986). infusion_mg_h = (2/3) * reversal_bolus_mg maintains plasma naloxone at or above the 30-minute post-bolus level. magent does not choose the bolus or start naloxone. Not a prescription or medical device.","parameters":[{"in":"query","name":"reversal_bolus_mg","type":"number","description":"Caller-assigned naloxone reversal bolus in mg (0.04-10.0) that already resulted in reversal. magent does not choose the bolus.","required":true,"example":"0.4"}],"errors":[{"code":"invalid_naloxone","message":"Naloxone infusion inputs must match Goldfrank 1986 reversal bolus milligrams from that paper. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/naloxone-drip","citation":{"authors":"Goldfrank L, Weisman RS, Errick JK, Lo MW","doi":"10.1016/S0196-0644(86)80994-5","id":"goldfrank-1986","pmid":"3963538","source":"Ann Emerg Med. 1986;15(5):566-570","title":"A dosing nomogram for continuous infusion intravenous naloxone","url":"https://doi.org/10.1016/S0196-0644(86)80994-5"},"formula_expression":"infusion_mg_h = (2/3) * reversal_bolus_mg","purpose":"Compute a continuous intravenous naloxone infusion rate as two-thirds of the caller-assigned reversal bolus each hour, using the Goldfrank 1986 text rule.","markdown_url":"https://magentlab.com/docs/naloxone-drip.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"goldfrank_1986"},{"name":"formula_expression","type":"string","description":"infusion_mg_h = (2/3) * reversal_bolus_mg"},{"name":"reversal_bolus_mg","type":"number","description":"Caller-assigned reversal bolus in mg"},{"name":"infusion_mg_h","type":"number","description":"Continuous infusion in mg/h, 3 decimals"},{"name":"citation","type":"object","description":"Goldfrank 1986 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"reversal_bolus_mg":"0.4"},{"reversal_bolus_mg":"0.4"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/naloxone-drip","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/naloxone-drip?reversal_bolus_mg=0.4","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/naloxone-drip","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/atropine-op","description":"Eddleston 2004 atropine maintenance infusion after atropinization. infusion_low_mg_h = 0.10 * atropine_load_mg; infusion_high_mg_h = 0.20 * atropine_load_mg. Caller supplies the total atropine loading milligrams already used to stabilize. Not doubling-bolus titration, not pralidoxime, not a prescription. magent does not diagnose organophosphate poisoning and does not choose loading boluses.","parameters":[{"in":"query","name":"atropine_load_mg","type":"number","description":"Caller-assigned total atropine loading milligrams already used to stabilize (0.6-200). magent does not choose loading boluses.","required":true,"example":"18"}],"errors":[{"code":"invalid_atropine","message":"Atropine infusion inputs must match Eddleston 2004 total loading milligrams from that protocol. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/atropine-op","citation":{"authors":"Eddleston M, Dawson A, Karalliedde L, Dissanayake W, Hittarage A, Azher S, Buckley NA","doi":"10.1186/cc2953","id":"eddleston-2004","pmid":"15566582","source":"Crit Care. 2004;8(6):R391-R397","title":"Early management after self-poisoning with an organophosphorus or carbamate pesticide – a treatment protocol for junior doctors","url":"https://doi.org/10.1186/cc2953"},"formula_expression":"infusion_low_mg_h = 0.10 * atropine_load_mg; infusion_high_mg_h = 0.20 * atropine_load_mg","purpose":"Compute the Eddleston 2004 atropine maintenance infusion band (10-20% of the total atropine required to stabilize, every hour) from a caller-assigned loading milligram amount. Not doubling-bolus titration.","markdown_url":"https://magentlab.com/docs/atropine-op.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"eddleston_2004"},{"name":"formula_expression","type":"string","description":"Exact 10% and 20% expressions"},{"name":"atropine_load_mg","type":"number","description":"Caller-assigned total atropine loading milligrams used"},{"name":"infusion_low_mg_h","type":"number","description":"10% of atropine_load_mg as mg/h, 1 decimal"},{"name":"infusion_high_mg_h","type":"number","description":"20% of atropine_load_mg as mg/h, 1 decimal"},{"name":"citation","type":"object","description":"Eddleston 2004 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"atropine_load_mg":"18"},{"atropine_load_mg":"18"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/atropine-op","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/atropine-op?atropine_load_mg=18","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/atropine-op","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/acetylcysteine-iv","description":"Intravenous acetylcysteine milligrams from weight (Prescott 1979). load_mg = weight_kg * 150 over 15 minutes; infusion_4h_mg = weight_kg * 50 over 4 hours; infusion_16h_mg = weight_kg * 100 over 16 hours; total_mg = weight_kg * 300 over 20.25 hours. For acetaminophen (paracetamol) poisoning. Not a prescription, not a Rumack–Matthew nomogram, and not a plasma acetaminophen interpretation.","parameters":[{"in":"query","name":"weight_kg","type":"number","description":"Weight in kilograms (1-200).","required":true,"example":"70"}],"errors":[{"code":"invalid_acetylcysteine","message":"Acetylcysteine inputs must match Prescott 1979 weight from that intravenous protocol. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/acetylcysteine-iv","citation":{"authors":"Prescott LF, Illingworth RN, Critchley JA, Stewart MJ, Adam RD, Proudfoot AT","doi":"10.1136/bmj.2.6198.1097","id":"prescott-1979","pmid":"519312","source":"Br Med J. 1979;2(6198):1097-1100","title":"Intravenous N-acetylcysteine: the treatment of choice for paracetamol poisoning","url":"https://doi.org/10.1136/bmj.2.6198.1097"},"formula_expression":"load_mg = weight_kg * 150; infusion_4h_mg = weight_kg * 50; infusion_16h_mg = weight_kg * 100; total_mg = weight_kg * 300; load_minutes = 15; infusion_4h_hours = 4; infusion_16h_hours = 16; total_hours = 20.25","purpose":"Compute intravenous acetylcysteine milligrams from body weight using the Prescott 1979 paracetamol (acetaminophen) poisoning schedule: 150 mg/kg over 15 minutes, then 50 mg/kg over 4 hours, then 100 mg/kg over 16 hours (300 mg/kg over 20.25 hours).","markdown_url":"https://magentlab.com/docs/acetylcysteine-iv.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"acetylcysteine_iv"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"weight_kg","type":"number","description":"Input weight in kg"},{"name":"load_mg","type":"number","description":"Loading dose in milligrams (150 mg/kg over 15 minutes), 1 decimal"},{"name":"infusion_4h_mg","type":"number","description":"First infusion milligrams (50 mg/kg over 4 hours), 1 decimal"},{"name":"infusion_16h_mg","type":"number","description":"Second infusion milligrams (100 mg/kg over 16 hours), 1 decimal"},{"name":"total_mg","type":"number","description":"Total milligrams (300 mg/kg over 20.25 hours), 1 decimal"},{"name":"load_minutes","type":"integer","description":"Loading infusion duration in minutes (15 as published)"},{"name":"infusion_4h_hours","type":"integer","description":"First infusion duration in hours (4)"},{"name":"infusion_16h_hours","type":"integer","description":"Second infusion duration in hours (16)"},{"name":"total_hours","type":"number","description":"Total protocol duration in hours (20.25)"},{"name":"citation","type":"object","description":"Prescott et al. 1979 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"weight_kg":"70"},{"weight_kg":"70"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/acetylcysteine-iv","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/acetylcysteine-iv?weight_kg=70","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/acetylcysteine-iv","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/ed-buprenorphine","description":"ED-initiated buprenorphine milligrams from D'Onofrio 2015 (JAMA; PMID 25919527): dose_mg is 8 on protocol day 1 and 16 on days 2 and 3. Take-home schedule only. Not a home-induction decision tree, not COWS scoring, and not a prescription or X-waiver. magent does not score withdrawal.","parameters":[{"in":"query","name":"day","type":"integer","description":"D'Onofrio 2015 protocol day 1, 2, or 3. Day 1 is 8 mg. Days 2 and 3 are 16 mg. Not a home-induction tree. magent does not score COWS.","required":true,"example":"1"}],"errors":[{"code":"invalid_ed_buprenorphine","message":"ED buprenorphine day must be 1, 2, or 3 as published in D'Onofrio 2015. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/ed-buprenorphine","citation":{"authors":"D'Onofrio G, O'Connor PG, Pantalon MV, Chawarski MC, Busch SH, Owens PH, Bernstein SL, Fiellin DA","doi":"10.1001/jama.2015.3474","id":"donofrio-2015","pmid":"25919527","source":"JAMA. 2015;313(16):1636-1644","title":"Emergency Department-Initiated Buprenorphine/Naloxone Treatment for Opioid Dependence: A Randomized Clinical Trial","url":"https://doi.org/10.1001/jama.2015.3474"},"formula_expression":"dose_mg = (day == 1) ? 8 : 16","purpose":"Return the D'Onofrio 2015 emergency-department-initiated buprenorphine milligram for protocol day 1, 2, or 3: 8 mg on day 1 and 16 mg on days 2 and 3.","markdown_url":"https://magentlab.com/docs/ed-buprenorphine.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"donofrio_2015"},{"name":"formula_expression","type":"string","description":"dose_mg = (day == 1) ? 8 : 16"},{"name":"day","type":"integer","description":"Protocol day 1, 2, or 3"},{"name":"dose_mg","type":"integer","description":"Buprenorphine milligrams: 8 on day 1; 16 on days 2 and 3"},{"name":"citation","type":"object","description":"D'Onofrio 2015 JAMA citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"day":"1"},{"day":"1"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/ed-buprenorphine","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/ed-buprenorphine?day=1","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/ed-buprenorphine","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/steroid-conversion","description":"Convert a glucocorticoid milligram dose among hydrocortisone, prednisone, and dexamethasone using Meikle 1977 equivalent doses (20 : 5 : 0.75). Not a taper, stress-dose protocol, or regimen recommendation; mineralocorticoid activity is not converted. Deterministic published table with citation.","parameters":[{"in":"query","name":"from","type":"string","enum":["hydrocortisone","prednisone","dexamethasone"],"description":"Source glucocorticoid. hydrocortisone, prednisone, or dexamethasone (Meikle 1977).","required":true,"example":"hydrocortisone"},{"in":"query","name":"to","type":"string","enum":["hydrocortisone","prednisone","dexamethasone"],"description":"Target glucocorticoid. hydrocortisone, prednisone, or dexamethasone (Meikle 1977).","required":true,"example":"prednisone"},{"in":"query","name":"dose_mg","type":"number","description":"Dose of the source glucocorticoid in milligrams (0.1-5000).","required":true,"example":"20"}],"errors":[{"code":"invalid_steroid","message":"from and to must be hydrocortisone, prednisone, or dexamethasone. Returned before settlement; you are not charged.","status":400},{"code":"invalid_steroid_dose","message":"dose_mg must be a number from 0.1 to 5000. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/steroid-conversion","citation":{"authors":"Meikle AW, Tyler FH","doi":"10.1016/0002-9343(77)90233-9","id":"meikle-1977","source":"Am J Med. 1977;63(2):200-207","title":"Potency and duration of action of glucocorticoids. Effects of hydrocortisone, prednisone and dexamethasone on human pituitary-adrenal function","url":"https://doi.org/10.1016/0002-9343(77)90233-9"},"formula_expression":"equivalent_dose_mg = dose_mg * (to_equivalent_mg / from_equivalent_mg); hydrocortisone 20 mg = prednisone 5 mg = dexamethasone 0.75 mg (Meikle 1977)","purpose":"Convert a glucocorticoid dose among hydrocortisone, prednisone, and dexamethasone using Meikle 1977 equivalent doses (20 mg : 5 mg : 0.75 mg).","markdown_url":"https://magentlab.com/docs/steroid-conversion.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"steroid_conversion"},{"name":"formula_expression","type":"string","description":"Equivalent-dose conversion using Meikle 1977 factors"},{"name":"from","type":"string","description":"Normalized source glucocorticoid"},{"name":"to","type":"string","description":"Normalized target glucocorticoid"},{"name":"dose_mg","type":"number","description":"Input dose in milligrams"},{"name":"equivalent_dose_mg","type":"number","description":"Converted dose in milligrams of the target glucocorticoid"},{"name":"from_equivalent_mg","type":"number","description":"Meikle 1977 equivalent milligrams for the source agent"},{"name":"to_equivalent_mg","type":"number","description":"Meikle 1977 equivalent milligrams for the target agent"},{"name":"citation","type":"object","description":"Meikle and Tyler 1977"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"dose_mg":"20","from":"hydrocortisone","to":"prednisone"},{"dose_mg":"20","from":"hydrocortisone","to":"prednisone"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/steroid-conversion","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/steroid-conversion?from=hydrocortisone&to=prednisone&dose_mg=20","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/steroid-conversion","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/phenytoin-correction","description":"Sheiner–Tozer / Winter–Tozer albumin-adjusted total phenytoin: Ccorr = Cobs / ((0.2 or 0.1) × albumin_g_dl + 0.1). Renal factor 0.1 when renal_impairment is true. Deterministic published arithmetic with citation; not a free phenytoin level or a dose.","parameters":[{"in":"query","name":"phenytoin_mcg_ml","type":"number","description":"Observed total phenytoin in µg/mL (same as mg/L). Range 0.1-80.","required":true,"example":"8.0"},{"in":"query","name":"albumin_g_dl","type":"number","description":"Serum albumin in g/dL (1-6). Provide this or albumin_g_l.","required":false,"example":"2.0"},{"in":"query","name":"albumin_g_l","type":"number","description":"Serum albumin in g/L (10-60). Converted as g/dL = g/L / 10.","required":false,"example":"20"},{"in":"query","name":"renal_impairment","type":"boolean","description":"true uses binding factor 0.1 (Liponi/Winter–Tozer end-stage renal adjustment). false uses 0.2. true or false.","required":true,"example":"false"}],"errors":[{"code":"invalid_phenytoin","message":"phenytoin_mcg_ml (same as mg/L) must be a number from 0.1 to 80. Returned before settlement; you are not charged.","status":400},{"code":"invalid_albumin","message":"albumin_g_dl (1-6) or albumin_g_l (10-60) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/phenytoin-correction","citation":{"authors":"Liponi DF, Winter ME, Tozer TN","doi":"10.1212/WNL.34.3.395","id":"liponi-1984","source":"Neurology. 1984;34(3):395-397","title":"Renal function and therapeutic concentrations of phenytoin","url":"https://doi.org/10.1212/WNL.34.3.395"},"formula_expression":"corrected_phenytoin_mcg_ml = phenytoin_mcg_ml / ((binding_factor * albumin_g_dl) + 0.1); binding_factor 0.2, or 0.1 if renal_impairment","purpose":"Estimate an albumin-adjusted total-equivalent phenytoin concentration from observed total phenytoin and albumin, with an optional renal binding-factor change.","markdown_url":"https://magentlab.com/docs/phenytoin-correction.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"sheiner_tozer"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"phenytoin_mcg_ml","type":"number","description":"Observed total phenytoin used"},{"name":"albumin_g_dl","type":"number","description":"Normalized albumin in g/dL"},{"name":"renal_impairment","type":"boolean","description":"true when the renal binding factor 0.1 was used"},{"name":"binding_factor","type":"number","description":"0.2 normally, 0.1 when renal_impairment is true"},{"name":"corrected_phenytoin_mcg_ml","type":"number","description":"Albumin-adjusted total-equivalent phenytoin in µg/mL, 1 decimal"},{"name":"citation","type":"object","description":"Liponi, Winter, and Tozer 1984 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"albumin_g_dl":"2.0","phenytoin_mcg_ml":"8.0","renal_impairment":"false"},{"albumin_g_dl":"2.0","phenytoin_mcg_ml":"8.0","renal_impairment":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/phenytoin-correction","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/phenytoin-correction?phenytoin_mcg_ml=8.0&albumin_g_dl=2.0&renal_impairment=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/phenytoin-correction","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/levothyroxine-dose","description":"Adult levothyroxine (LT4) full-replacement estimate: daily_lt4_mcg = weight_kg * 1.6 (ATA 2014). Weight in kg or lb. Not a prescription, TSH titration, pediatric or pregnancy-specific dose, or tablet strength. Lean-body-mass adjustment may apply; elderly and cardiac patients often start lower. Deterministic published arithmetic with citation.","parameters":[{"in":"query","name":"weight_kg","type":"number","description":"Weight in kilograms (1-500). Provide weight_kg or weight_lb.","required":false,"example":"70"},{"in":"query","name":"weight_lb","type":"number","description":"Weight in pounds (2-1100). Converted as kg = lb * 0.45359237.","required":false,"example":"154"}],"errors":[{"code":"invalid_weight","message":"weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/levothyroxine-dose","citation":{"authors":"Jonklaas J, Bianco AC, Bauer AJ, et al.","doi":"10.1089/thy.2014.0028","id":"jonklaas-2014","pmid":"25266247","source":"Thyroid. 2014;24(12):1670-1751","title":"Guidelines for the treatment of hypothyroidism: prepared by the American Thyroid Association task force on thyroid hormone replacement","url":"https://doi.org/10.1089/thy.2014.0028"},"formula_expression":"daily_lt4_mcg = weight_kg * 1.6","purpose":"Estimate an adult full-replacement daily levothyroxine (LT4) dose from body weight using the ATA 2014 average of approximately 1.6 μg/kg per day.","markdown_url":"https://magentlab.com/docs/levothyroxine-dose.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"levothyroxine_dose"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"weight_kg","type":"number","description":"Normalized weight in kg"},{"name":"daily_lt4_mcg","type":"number","description":"Adult full-replacement levothyroxine (LT4) estimate in mcg/day, 1 decimal"},{"name":"citation","type":"object","description":"Jonklaas et al. ATA 2014 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"weight_kg":"70"},{"weight_kg":"70"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/levothyroxine-dose","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/levothyroxine-dose?weight_kg=70","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/levothyroxine-dose","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/hiet","description":"High-dose insulin euglycemia therapy (HIET) from Engebretsen 2011: 1 U/kg insulin bolus, then a 1-10 U/kg/h continuous infusion. Weight in kg or lb. Not a prescription. Used in beta-blocker or calcium-channel-blocker cardiogenic shock. magent does not titrate, choose dextrose, or add DigiFab, glucagon, or calcium. Deterministic published arithmetic with citation.","parameters":[{"in":"query","name":"weight_kg","type":"number","description":"Weight in kilograms (1-500). Provide weight_kg or weight_lb.","required":false,"example":"70"},{"in":"query","name":"weight_lb","type":"number","description":"Weight in pounds (2-1100). Converted as kg = lb * 0.45359237.","required":false,"example":"154"}],"errors":[{"code":"invalid_weight","message":"weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/hiet","citation":{"authors":"Engebretsen KM, Kaczmarek KM, Morgan J, Holger JS","doi":"10.3109/15563650.2011.582471","id":"engebretsen-2011","pmid":"21563902","source":"Clin Toxicol (Phila). 2011;49(4):277-283","title":"High-dose insulin therapy in beta-blocker and calcium channel-blocker poisoning","url":"https://doi.org/10.3109/15563650.2011.582471"},"formula_expression":"bolus_u = weight_kg * 1; infusion_start_u_h = weight_kg * 1; infusion_max_u_h = weight_kg * 10","purpose":"Estimate the Engebretsen 2011 high-dose insulin euglycemia therapy (HIET) bolus and continuous-infusion range from body weight for beta-blocker or calcium-channel-blocker poisoning with cardiogenic shock.","markdown_url":"https://magentlab.com/docs/hiet.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"hiet"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"weight_kg","type":"number","description":"Normalized weight in kg"},{"name":"bolus_u","type":"number","description":"Insulin bolus in units (1 U/kg), 1 decimal"},{"name":"infusion_start_u_h","type":"number","description":"Starting continuous infusion in U/h (1 U/kg/h), 1 decimal"},{"name":"infusion_max_u_h","type":"number","description":"Published upper-bound infusion in U/h (10 U/kg/h), 1 decimal"},{"name":"citation","type":"object","description":"Engebretsen et al. 2011 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"weight_kg":"70"},{"weight_kg":"70"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/hiet","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/hiet?weight_kg=70","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/hiet","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/bed","description":"Fowler 1989 BED without a time or repopulation term: BED = n * d * (1 + d / (alpha/beta)). n equal fractions (1-50), d Gy per fraction (0.5-30), caller-assigned tissue alpha/beta (1-20 Gy). Rounds to 1 decimal. Rejects non-positive n*d or alpha/beta. No T_k/T_pot, no EQD2. Not a radiotherapy prescription. magent does not plan radiotherapy. Not a medical device.","parameters":[{"in":"query","name":"n","type":"integer","description":"Number of equal fractions (integer 1-50, magent clamp; Fowler 1989 does not publish an input band). Caller supplies n. magent does not plan a fraction schedule.","required":true,"example":"30"},{"in":"query","name":"d_gy","type":"number","description":"Dose per fraction in Gy (0.5-30, magent clamp). Caller supplies d. magent does not prescribe dose.","required":true,"example":"2"},{"in":"query","name":"alpha_beta","type":"number","description":"Caller-assigned tissue α/β in Gy (1-20, magent clamp). magent does not assign α/β from a tissue table.","required":true,"example":"3"}],"errors":[{"code":"invalid_bed","message":"BED inputs must be fraction count, dose per fraction, and alpha/beta as used in Fowler 1989. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/bed","citation":{"authors":"Fowler JF","doi":"10.1259/0007-1285-62-740-679","id":"fowler-1989","pmid":"2670032","source":"Br J Radiol. 1989;62(740):679-694","title":"The linear-quadratic formula and progress in fractionated radiotherapy","url":"https://doi.org/10.1259/0007-1285-62-740-679"},"formula_expression":"bed_gy = n * d_gy * (1 + d_gy / alpha_beta)","purpose":"Compute Fowler 1989 biologically effective dose from equal-fraction count, dose per fraction in Gy, and a caller-assigned tissue α/β, without a time or repopulation term.","markdown_url":"https://magentlab.com/docs/bed.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"bed"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"n","type":"integer","description":"Equal-fraction count used"},{"name":"d_gy","type":"number","description":"Dose per fraction used, Gy"},{"name":"alpha_beta","type":"number","description":"Caller-assigned tissue α/β used, Gy"},{"name":"bed_gy","type":"number","description":"Fowler 1989 biologically effective dose in Gy, 1 decimal"},{"name":"citation","type":"object","description":"Fowler 1989 Br J Radiol citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"alpha_beta":"3","d_gy":"2","n":"30"},{"alpha_beta":"3","d_gy":"2","n":"30"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/bed","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/bed?n=30&d_gy=2&alpha_beta=3","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/bed","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/mrc-icu","description":"Gwynn 2019 MRC-ICU: 39 printed ICU medication and device items (1, 2, or 3 points). Multiplier classes are weight × the caller-assigned count of qualifying medications. Non-multiplier items add the printed weight when present. Output is the integer sum plus components. Not a pharmacist-staffing order; magent does not read the MAR.","parameters":[{"in":"query","name":"aminoglycosides","type":"integer","description":"Count of aminoglycosides (amikacin, gentamicin, tobramycin) as assigned by the caller (integer 0-20). Gwynn 2019 printed 3×. magent does not read the MAR.","required":true,"example":0},{"in":"query","name":"amphotericin_b","type":"boolean","description":"Amphotericin B or liposomal amphotericin B present as assigned by the caller (Gwynn 2019). true adds 1 point.","required":true,"example":false},{"in":"query","name":"antiarrhythmics","type":"integer","description":"Count of antiarrhythmics (amiodarone, dofetilide, sotalol) as assigned by the caller (integer 0-20). Gwynn 2019 printed 1×.","required":true,"example":0},{"in":"query","name":"anticoagulants","type":"integer","description":"Count of anticoagulants (NOACs/DOACs, fondaparinux) as assigned by the caller (integer 0-20). Gwynn 2019 printed 1×.","required":true,"example":0},{"in":"query","name":"anticonvulsants","type":"integer","description":"Count of anticonvulsants (carbamazepine, phenobarbital, phenytoin, valproic acid) as assigned by the caller (integer 0-20). Gwynn 2019 printed 3×.","required":true,"example":0},{"in":"query","name":"argatroban","type":"boolean","description":"Argatroban present as assigned by the caller (Gwynn 2019). true adds 2 points.","required":true,"example":false},{"in":"query","name":"azole_antifungals","type":"integer","description":"Count of azole antifungals (posaconazole, voriconazole) as assigned by the caller (integer 0-20). Gwynn 2019 printed 2×.","required":true,"example":0},{"in":"query","name":"blood_products","type":"integer","description":"Count of blood products (factor products, antithrombin III) as assigned by the caller (integer 0-20). Gwynn 2019 printed 2×.","required":true,"example":0},{"in":"query","name":"chemotherapy","type":"integer","description":"Count of active inpatient chemotherapy agents as assigned by the caller (integer 0-20). Gwynn 2019 printed 3×.","required":true,"example":0},{"in":"query","name":"clozapine","type":"boolean","description":"Clozapine present as assigned by the caller (Gwynn 2019). true adds 3 points.","required":true,"example":false},{"in":"query","name":"digoxin","type":"boolean","description":"Digoxin present as assigned by the caller (Gwynn 2019). true adds 3 points.","required":true,"example":false},{"in":"query","name":"ganciclovir_valganciclovir","type":"integer","description":"Count of ganciclovir or valganciclovir products as assigned by the caller (integer 0-20). Gwynn 2019 printed 1×.","required":true,"example":0},{"in":"query","name":"hyperosmolar_fluids","type":"integer","description":"Count of hyperosmolar fluids (hypertonic saline 1.5%, 3%, 23.4%; mannitol) as assigned by the caller (integer 0-20). Gwynn 2019 printed 1×.","required":true,"example":0},{"in":"query","name":"immunosuppressants","type":"integer","description":"Count of immunosuppressants (cyclosporine, sirolimus, tacrolimus) as assigned by the caller (integer 0-20). Gwynn 2019 printed 3×.","required":true,"example":0},{"in":"query","name":"lidocaine_infusion","type":"boolean","description":"Lidocaine continuous infusion present as assigned by the caller (Gwynn 2019). true adds 2 points.","required":true,"example":false},{"in":"query","name":"lithium","type":"boolean","description":"Lithium present as assigned by the caller (Gwynn 2019). true adds 3 points.","required":true,"example":false},{"in":"query","name":"prostacyclins","type":"integer","description":"Count of prostacyclins (epoprostenol, iloprost, treprostinil) as assigned by the caller (integer 0-20). Gwynn 2019 printed 2×.","required":true,"example":0},{"in":"query","name":"theophylline","type":"boolean","description":"Theophylline present as assigned by the caller (Gwynn 2019). true adds 3 points.","required":true,"example":false},{"in":"query","name":"therapeutic_heparins","type":"integer","description":"Count of therapeutic heparins (enoxaparin, heparin infusion) as assigned by the caller (integer 0-20). Gwynn 2019 printed 2×.","required":true,"example":0},{"in":"query","name":"vancomycin_iv","type":"boolean","description":"Intravenous vancomycin present as assigned by the caller (Gwynn 2019). true adds 3 points.","required":true,"example":false},{"in":"query","name":"warfarin","type":"boolean","description":"Warfarin present as assigned by the caller (Gwynn 2019). true adds 3 points.","required":true,"example":false},{"in":"query","name":"neuromuscular_blockade","type":"boolean","description":"Neuromuscular blockade present as assigned by the caller (Gwynn 2019). true adds 2 points.","required":true,"example":false},{"in":"query","name":"continuous_infusions","type":"integer","description":"Count of continuous infusions not listed on another Gwynn 2019 row, as assigned by the caller (integer 0-20). Printed 1×.","required":true,"example":0},{"in":"query","name":"tpn_non_pharmacist","type":"boolean","description":"Total parenteral nutrition managed by a non-pharmacist service as assigned by the caller (Gwynn 2019). true adds 1 point.","required":true,"example":false},{"in":"query","name":"tpn_clinical_pharmacist","type":"boolean","description":"Total parenteral nutrition managed by a clinical specialist pharmacist as assigned by the caller (Gwynn 2019). true adds 3 points.","required":true,"example":false},{"in":"query","name":"thromboembolic_prophylaxis","type":"boolean","description":"Thromboembolic prophylaxis present, excluding heparin infusion and therapeutic enoxaparin, as assigned by the caller (Gwynn 2019). true adds 1 point.","required":true,"example":false},{"in":"query","name":"stress_ulcer_prophylaxis","type":"boolean","description":"Stress ulcer prophylaxis present, excluding pantoprazole infusion, as assigned by the caller (Gwynn 2019). true adds 1 point.","required":true,"example":false},{"in":"query","name":"glycemic_control","type":"boolean","description":"Glycemic control with subcutaneous insulin, excluding intravenous insulin, as assigned by the caller (Gwynn 2019). true adds 1 point.","required":true,"example":false},{"in":"query","name":"bowel_regimen","type":"boolean","description":"Bowel regimen present as assigned by the caller (Gwynn 2019). true adds 1 point.","required":true,"example":false},{"in":"query","name":"chlorhexidine","type":"boolean","description":"Chlorhexidine present as assigned by the caller (Gwynn 2019). true adds 1 point.","required":true,"example":false},{"in":"query","name":"opioids_sedatives","type":"integer","description":"Count of scheduled or PRN opioids and sedatives as assigned by the caller (integer 0-20). Gwynn 2019 printed 1×.","required":true,"example":0},{"in":"query","name":"continuous_opioids_sedatives","type":"integer","description":"Count of continuous-infusion opioids and sedatives (propofol, fentanyl, dexmedetomidine, ketamine, benzodiazepines) as assigned by the caller (integer 0-20). Gwynn 2019 printed 2×.","required":true,"example":0},{"in":"query","name":"antimicrobials","type":"integer","description":"Count of antimicrobials including HIV medications and excluding agents listed on other Gwynn 2019 rows, as assigned by the caller (integer 0-20). Printed 1×.","required":true,"example":0},{"in":"query","name":"restricted_antimicrobials","type":"integer","description":"Count of restricted antimicrobials (4th-5th generation cephalosporins, carbapenems, linezolid, daptomycin, colistin/polymyxins) as assigned by the caller (integer 0-20). Gwynn 2019 printed 2×.","required":true,"example":0},{"in":"query","name":"dialysis","type":"boolean","description":"Dialysis present as assigned by the caller (Gwynn 2019). true adds 2 points.","required":true,"example":false},{"in":"query","name":"ecmo","type":"boolean","description":"Extracorporeal membrane oxygenation (ECMO) present as assigned by the caller (Gwynn 2019). true adds 2 points.","required":true,"example":false},{"in":"query","name":"iabp","type":"boolean","description":"Intra-aortic balloon pump (IABP) present as assigned by the caller (Gwynn 2019). true adds 1 point.","required":true,"example":false},{"in":"query","name":"lvad","type":"boolean","description":"Left ventricular assist device (LVAD) present as assigned by the caller (Gwynn 2019). true adds 1 point.","required":true,"example":false},{"in":"query","name":"mechanical_ventilation","type":"boolean","description":"Mechanical ventilation present as assigned by the caller (Gwynn 2019). true adds 2 points.","required":true,"example":false}],"errors":[{"code":"invalid_mrc_icu","message":"Gwynn 2019 MRC-ICU inputs must match that scoring tool's item counts and device flags. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/mrc-icu","citation":{"authors":"Gwynn ME, Poisson MO, Waller JL, Newsome AS","doi":"10.1093/ajhp/zxy054","id":"gwynn-2019","pmid":"31067298","source":"Am J Health Syst Pharm. 2019;76(Supplement_2):S34-S40","title":"Development and validation of a medication regimen complexity scoring tool for critically ill patients","url":"https://doi.org/10.1093/ajhp/zxy054"},"formula_expression":"MRC-ICU (Gwynn 2019) = sum of 39 printed item weights. Multiplier classes (printed ×) are weight × caller-assigned count of qualifying medications (0-20): aminoglycosides 3, antiarrhythmics 1, anticoagulants 1, anticonvulsants 3, azole_antifungals 2, blood_products 2, chemotherapy 3, ganciclovir_valganciclovir 1, hyperosmolar_fluids 1, immunosuppressants 3, prostacyclins 2, therapeutic_heparins 2, continuous_infusions 1, opioids_sedatives 1, continuous_opioids_sedatives 2, antimicrobials 1, restricted_antimicrobials 2. Flags add the printed weight when present: amphotericin_b 1, argatroban 2, clozapine 3, digoxin 3, lidocaine_infusion 2, lithium 3, theophylline 3, vancomycin_iv 3, warfarin 3, neuromuscular_blockade 2, tpn_non_pharmacist 1, tpn_clinical_pharmacist 3, thromboembolic_prophylaxis 1, stress_ulcer_prophylaxis 1, glycemic_control 1, bowel_regimen 1, chlorhexidine 1, dialysis 2, ecmo 2, iabp 1, lvad 1, mechanical_ventilation 2","purpose":"Sum the Gwynn 2019 MRC-ICU printed item weights from caller-assigned medication-class counts and device flags.","markdown_url":"https://magentlab.com/docs/mrc-icu.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"mrc_icu"},{"name":"formula_expression","type":"string","description":"Exact Gwynn 2019 expression used"},{"name":"score","type":"integer","description":"MRC-ICU point total"},{"name":"components","type":"array","description":"Per-item points in printed table order"},{"name":"citation","type":"object","description":"Gwynn et al. AJHP 2019 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"tpn_clinical_pharmacist":"false","blood_products":"0","amphotericin_b":"false","lvad":"false","chemotherapy":"0","iabp":"false","prostacyclins":"0","stress_ulcer_prophylaxis":"false","vancomycin_iv":"false","antiarrhythmics":"0","immunosuppressants":"0","aminoglycosides":"0","bowel_regimen":"false","azole_antifungals":"0","hyperosmolar_fluids":"0","ganciclovir_valganciclovir":"0","glycemic_control":"false","ecmo":"false","continuous_opioids_sedatives":"0","antimicrobials":"0","anticoagulants":"0","anticonvulsants":"0","restricted_antimicrobials":"0","thromboembolic_prophylaxis":"false","neuromuscular_blockade":"false","theophylline":"false","argatroban":"false","warfarin":"false","dialysis":"false","continuous_infusions":"0","clozapine":"false","lidocaine_infusion":"false","tpn_non_pharmacist":"false","opioids_sedatives":"0","mechanical_ventilation":"false","chlorhexidine":"false","digoxin":"false","therapeutic_heparins":"0","lithium":"false"},{"tpn_clinical_pharmacist":"false","blood_products":"0","amphotericin_b":"false","lvad":"false","chemotherapy":"0","iabp":"false","prostacyclins":"0","stress_ulcer_prophylaxis":"false","vancomycin_iv":"false","antiarrhythmics":"0","immunosuppressants":"0","aminoglycosides":"0","bowel_regimen":"false","azole_antifungals":"0","hyperosmolar_fluids":"0","ganciclovir_valganciclovir":"0","glycemic_control":"false","ecmo":"false","continuous_opioids_sedatives":"0","antimicrobials":"0","anticoagulants":"0","anticonvulsants":"0","restricted_antimicrobials":"0","thromboembolic_prophylaxis":"false","neuromuscular_blockade":"false","theophylline":"false","argatroban":"false","warfarin":"false","dialysis":"false","continuous_infusions":"0","clozapine":"false","lidocaine_infusion":"false","tpn_non_pharmacist":"false","opioids_sedatives":"0","mechanical_ventilation":"false","chlorhexidine":"false","digoxin":"false","therapeutic_heparins":"0","lithium":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/mrc-icu","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/mrc-icu?aminoglycosides=0&amphotericin_b=false&antiarrhythmics=0&anticoagulants=0&anticonvulsants=0&argatroban=false&azole_antifungals=0&blood_products=0&chemotherapy=0&clozapine=false&digoxin=false&ganciclovir_valganciclovir=0&hyperosmolar_fluids=0&immunosuppressants=0&lidocaine_infusion=false&lithium=false&prostacyclins=0&theophylline=false&therapeutic_heparins=0&vancomycin_iv=false&warfarin=false&neuromuscular_blockade=false&continuous_infusions=0&tpn_non_pharmacist=false&tpn_clinical_pharmacist=false&thromboembolic_prophylaxis=false&stress_ulcer_prophylaxis=false&glycemic_control=false&bowel_regimen=false&chlorhexidine=false&opioids_sedatives=0&continuous_opioids_sedatives=0&antimicrobials=0&restricted_antimicrobials=0&dialysis=false&ecmo=false&iabp=false&lvad=false&mechanical_ventilation=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/mrc-icu","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/apgar","description":"Apgar score from five 0-2 newborn signs (appearance, pulse, grimace, activity, respiration). Deterministic published score with citation; not a diagnosis.","parameters":[{"in":"query","name":"appearance","type":"integer","description":"Color (A). Integer 0, 1, or 2 as assigned by the caller.","required":true,"example":"1"},{"in":"query","name":"pulse","type":"integer","description":"Heart rate (P). Integer 0, 1, or 2 as assigned by the caller.","required":true,"example":"2"},{"in":"query","name":"grimace","type":"integer","description":"Reflex irritability (G). Integer 0, 1, or 2 as assigned by the caller.","required":true,"example":"1"},{"in":"query","name":"activity","type":"integer","description":"Muscle tone (A). Integer 0, 1, or 2 as assigned by the caller.","required":true,"example":"2"},{"in":"query","name":"respiration","type":"integer","description":"Respiratory effort (R). Integer 0, 1, or 2 as assigned by the caller.","required":true,"example":"2"}],"errors":[{"code":"invalid_apgar_component","message":"appearance, pulse, grimace, activity, and respiration must each be 0, 1, or 2. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/apgar","citation":{"authors":"Apgar V","doi":null,"id":"apgar-1953","source":"Curr Res Anesth Analg. 1953;32(4):260-267","title":"A proposal for a new method of evaluation of the newborn infant","url":"https://pubmed.ncbi.nlm.nih.gov/13083014/"},"formula_expression":"APGAR = appearance + pulse + grimace + activity + respiration; each 0-2; max 10","purpose":"Compute the Apgar newborn evaluation score as the sum of five caller-assigned 0-2 signs.","markdown_url":"https://magentlab.com/docs/apgar.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"apgar"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Total points 0-10"},{"name":"max_score","type":"integer","description":"Always 10"},{"name":"components","type":"array","description":"Per-sign points"},{"name":"citation","type":"object","description":"Curr Res Anesth Analg 1953 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"activity":"2","appearance":"1","grimace":"1","pulse":"2","respiration":"2"},{"activity":"2","appearance":"1","grimace":"1","pulse":"2","respiration":"2"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/apgar","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/apgar?appearance=1&pulse=2&grimace=1&activity=2&respiration=2","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/apgar","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/bpp","description":"Manning 1980 fetal biophysical profile. Five caller-assigned variables, each 2 if normal or 0 if abnormal: fetal breathing movements, fetal movements, fetal tone, qualitative amniotic fluid volume, and nonstress test. Score 0-10. 1980 breathing is a 60-second episode in 30 minutes; 1980 fluid is a 1 cm pocket. magent does not ultrasound. Not a delivery order. Does not apply later 30-second breathing, 2 cm pocket, or 8-10/6/<=4 management bands.","parameters":[{"in":"query","name":"fetal_breathing_movements","type":"boolean","description":"Manning 1980 fetal breathing movements as assigned by the caller. true if normal: at least one episode of fetal breathing of at least 60 seconds in 30 minutes. false if abnormal: absent or no 60-second episode. Later 30-second breathing is not used. magent does not ultrasound. true or false.","required":true,"example":"true"},{"in":"query","name":"fetal_movements","type":"boolean","description":"Manning 1980 fetal movements as assigned by the caller. true if normal: at least three discrete body or limb movements in 30 minutes. false if abnormal: two or fewer. magent does not ultrasound. true or false.","required":true,"example":"true"},{"in":"query","name":"fetal_tone","type":"boolean","description":"Manning 1980 fetal tone as assigned by the caller. true if normal: at least one episode of active extension of a limb or trunk with return to flexion. false if abnormal: slow extension with return to partial flexion, limb in full extension, or absent fetal movement. magent does not ultrasound. true or false.","required":true,"example":"true"},{"in":"query","name":"qualitative_amniotic_fluid_volume","type":"boolean","description":"Manning 1980 qualitative amniotic fluid volume as assigned by the caller. true if normal: at least one pocket of fluid measuring 1 cm in two perpendicular planes. false if abnormal: no pocket or a pocket smaller than 1 cm. Later 2 cm pocket is not used. magent does not ultrasound. true or false.","required":true,"example":"true"},{"in":"query","name":"nonstress_test","type":"boolean","description":"Manning 1980 nonstress test as assigned by the caller. true if normal (reactive): at least two fetal heart-rate accelerations of at least 15 bpm lasting at least 15 seconds associated with fetal movement in 20 minutes. false if abnormal (nonreactive). magent does not record cardiotocography. true or false.","required":true,"example":"true"}],"errors":[{"code":"invalid_bpp","message":"Fetal biophysical profile inputs must be the five Manning 1980 caller-assigned normal-or-abnormal variables from that paper. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/bpp","citation":{"authors":"Manning FA, Platt LD, Sipos L","doi":"10.1016/0002-9378(80)90457-3","id":"manning-1980","pmid":"7355965","source":"Am J Obstet Gynecol. 1980;136(6):787-795","title":"Antepartum fetal evaluation: development of a fetal biophysical profile","url":"https://doi.org/10.1016/0002-9378(80)90457-3"},"formula_expression":"BPP = 2*(fetal_breathing_movements) + 2*(fetal_movements) + 2*(fetal_tone) + 2*(qualitative_amniotic_fluid_volume) + 2*(nonstress_test); each 2 if Manning 1980 normal else 0; max 10","purpose":"Sum the five Manning 1980 fetal biophysical profile variables, each 2 if the caller assigns normal and 0 if abnormal, and return score 0-10.","markdown_url":"https://magentlab.com/docs/bpp.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"bpp"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"BPP points 0-10"},{"name":"max_score","type":"integer","description":"Always 10"},{"name":"components","type":"array","description":"Per-variable points (2 if normal, 0 if abnormal)"},{"name":"citation","type":"object","description":"Manning et al. Am J Obstet Gynecol 1980 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"fetal_breathing_movements":"true","fetal_movements":"true","fetal_tone":"true","nonstress_test":"true","qualitative_amniotic_fluid_volume":"true"},{"fetal_breathing_movements":"true","fetal_movements":"true","fetal_tone":"true","nonstress_test":"true","qualitative_amniotic_fluid_volume":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/bpp","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/bpp?fetal_breathing_movements=true&fetal_movements=true&fetal_tone=true&qualitative_amniotic_fluid_volume=true&nonstress_test=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/bpp","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/rebound-hyperbilirubinemia","description":"Chang 2017 three-variable rebound hyperbilirubinemia score: +15 if GA <38 weeks, −7 × age at phototherapy start in days, −4 × (caller AAP phototherapy threshold − TSB at termination), +50. Scores <20 correspond to a <4% chance of TSB returning to threshold within 72 hours. magent does not assay bilirubin or compute the AAP nomogram. Not Chang 2019. Not a phototherapy order.","parameters":[{"in":"query","name":"gestational_age_weeks","type":"integer","description":"Gestational age in completed weeks, integer 35-45. Chang 2017 cohort was ≥35 weeks. Scores +15 when <38 weeks; 38 weeks and above score 0. magent does not convert days.","required":true,"example":"39"},{"in":"query","name":"age_at_initiation_days","type":"number","description":"Chronologic age at phototherapy initiation in days (0-14; fractional days allowed). Chang 2017 treated infants before age 14 days. magent does not convert hours.","required":true,"example":"3"},{"in":"query","name":"tsb_at_termination_mg_dl","type":"number","description":"Total serum bilirubin at phototherapy termination in mg/dL (0-40). magent does not assay bilirubin.","required":true,"example":"12"},{"in":"query","name":"phototherapy_threshold_mg_dl","type":"number","description":"Caller-supplied AAP phototherapy threshold in mg/dL at termination (0-40). Difference is (threshold − TSB) and may be negative if TSB is still above threshold. magent does not compute the AAP nomogram.","required":true,"example":"16"}],"errors":[{"code":"invalid_rebound_hyperbilirubinemia","message":"Rebound hyperbilirubinemia score inputs must match Chang 2017 gestational age, phototherapy timing, and bilirubin-relative-to-threshold terms from that paper. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/rebound-hyperbilirubinemia","citation":{"authors":"Chang PW, Kuzniewicz MW, McCulloch CE, Newman TB","doi":"10.1542/peds.2016-2896","id":"chang-2017","pmid":"28196932","source":"Pediatrics. 2017;139(3):e20162896","title":"A Clinical Prediction Rule for Rebound Hyperbilirubinemia Following Inpatient Phototherapy","url":"https://doi.org/10.1542/peds.2016-2896"},"formula_expression":"score = (15 if gestational_age_weeks < 38 else 0) - 7 × age_at_initiation_days - 4 × (phototherapy_threshold_mg_dl − tsb_at_termination_mg_dl) + 50; Chang 2017 three-variable integer prediction score; scores <20 correspond to a <4% probability of rebound (TSB back to phototherapy threshold within 72 hours)","purpose":"Return the Chang 2017 three-variable rebound hyperbilirubinemia prediction score after inpatient phototherapy from gestational age, age at phototherapy initiation in days, TSB at termination, and a caller-supplied AAP phototherapy threshold. Scores <20 correspond to a <4% probability of rebound in that paper.","markdown_url":"https://magentlab.com/docs/rebound-hyperbilirubinemia.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"rebound_hyperbilirubinemia"},{"name":"formula_expression","type":"string","description":"Exact Chang 2017 expression used"},{"name":"gestational_age_weeks","type":"integer","description":"Completed gestational age in weeks"},{"name":"age_at_initiation_days","type":"number","description":"Age at phototherapy initiation in days"},{"name":"tsb_at_termination_mg_dl","type":"number","description":"TSB at phototherapy termination in mg/dL"},{"name":"phototherapy_threshold_mg_dl","type":"number","description":"Caller-supplied AAP phototherapy threshold in mg/dL"},{"name":"score","type":"number","description":"Chang 2017 three-variable prediction score, 1 decimal when not an exact integer"},{"name":"score_lt_20","type":"boolean","description":"true when score < 20 (Chang 2017: <4% probability of rebound). Not a named risk class beyond that published cut."},{"name":"citation","type":"object","description":"Chang et al. Pediatrics 2017 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age_at_initiation_days":"3","gestational_age_weeks":"39","phototherapy_threshold_mg_dl":"16","tsb_at_termination_mg_dl":"12"},{"age_at_initiation_days":"3","gestational_age_weeks":"39","phototherapy_threshold_mg_dl":"16","tsb_at_termination_mg_dl":"12"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/rebound-hyperbilirubinemia","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/rebound-hyperbilirubinemia?gestational_age_weeks=39&age_at_initiation_days=3&tsb_at_termination_mg_dl=12&phototherapy_threshold_mg_dl=16","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/rebound-hyperbilirubinemia","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/aap-tsb","description":"AAP 2022 Kemper KAS 10 intensive phototherapy threshold from Supplemental Tables 1 and 2 by completed GA, age in hours, TSB, and caller-assigned extra neurotoxicity risk factors. Linear interpolation between tabulated hours. This tool does not subtract conjugated bilirubin. Not a phototherapy order. magent does not assay TSB.","parameters":[{"in":"query","name":"gestational_age_weeks","type":"integer","description":"Completed gestational age in weeks, integer 35-45. Table 1 uses distinct curves for 35, 36, 37, 38, 39, and ≥40. Table 2 groups ≥38 together. magent does not convert days.","required":true,"example":40},{"in":"query","name":"age_hours","type":"number","description":"Chronologic age in hours (1-336). Supplemental Tables 1 and 2 are tabulated hourly; ages between adjacent hours are linearly interpolated. Hour 0 is not tabulated. magent does not convert days.","required":true,"example":48},{"in":"query","name":"tsb_mg_dl","type":"number","description":"Total serum bilirubin in mg/dL (0-40). Use TSB; do not subtract direct-reacting or conjugated bilirubin. magent does not assay TSB.","required":true,"example":17},{"in":"query","name":"isoimmune_hemolytic_disease","type":"boolean","description":"Caller-assigned isoimmune hemolytic disease (positive direct antiglobulin test) from Kemper 2022 Table 2. true or false. magent does not interpret DAT.","required":true,"example":false},{"in":"query","name":"g6pd_deficiency","type":"boolean","description":"Caller-assigned glucose-6-phosphate dehydrogenase (G6PD) deficiency from Kemper 2022 Table 2. true or false. magent does not assay G6PD.","required":true,"example":false},{"in":"query","name":"other_hemolytic_condition","type":"boolean","description":"Caller-assigned other hemolytic condition (Kemper 2022 Table 2, same neurotoxicity-risk row as isoimmune disease and G6PD deficiency). true or false.","required":true,"example":false},{"in":"query","name":"sepsis","type":"boolean","description":"Caller-assigned sepsis or suspected sepsis from Kemper 2022 Table 2. true or false. magent does not diagnose sepsis.","required":true,"example":false},{"in":"query","name":"albumin_lt_3","type":"boolean","description":"Caller-assigned albumin <3.0 g/dL from Kemper 2022 Table 2. true or false. magent does not assay albumin.","required":true,"example":false},{"in":"query","name":"clinical_instability_24h","type":"boolean","description":"Caller-assigned significant clinical instability in the previous 24 hours from Kemper 2022 Table 2. true or false. magent does not examine the infant.","required":true,"example":false}],"errors":[{"code":"invalid_aap_tsb","message":"AAP 2022 phototherapy-threshold inputs must match gestational age, age in hours, total serum bilirubin, and caller-assigned neurotoxicity risk factors. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/aap-tsb","citation":{"authors":"Kemper AR, Newman TB, Slaughter JL, et al.","doi":"10.1542/peds.2022-058859","id":"kemper-2022-aap-hyperbilirubinemia","pmid":"35927462","source":"Pediatrics. 2022;150(3):e2022058859","title":"Clinical Practice Guideline Revision: Management of Hyperbilirubinemia in the Newborn Infant 35 or More Weeks of Gestation","url":"https://doi.org/10.1542/peds.2022-058859"},"formula_expression":"Kemper 2022 KAS 10 intensive phototherapy threshold (mg/dL) from Supplemental Table 1 when the caller assigns no neurotoxicity risk factors other than gestational age, or Supplemental Table 2 when any additional listed factor is assigned. Table 1 curves are completed GA 35, 36, 37, 38, 39, and ≥40 weeks. Table 2 curves are 35, 36, 37, and ≥38 weeks. Age is in hours (tabulated hourly from 1 through 336); interpolate linearly between adjacent tabulated hours. Use total serum bilirubin; do not subtract direct-reacting or conjugated bilirubin. Gestational age <38 weeks is already in the GA-specific curve — do not apply Table 2 solely for prematurity. Not a phototherapy or exchange order. magent does not assay TSB","purpose":"Return the AAP 2022 Kemper KAS 10 intensive phototherapy threshold from Supplemental Table 1 (no extra neurotoxicity risk factors other than gestational age) or Supplemental Table 2 (any additional listed factor), with TSB minus that threshold and whether TSB is at or above it.","markdown_url":"https://magentlab.com/docs/aap-tsb.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"aap_tsb"},{"name":"formula_expression","type":"string","description":"Published Kemper 2022 Supplemental Table 1 or 2 lookup"},{"name":"gestational_age_weeks","type":"integer","description":"Echo of completed gestational age in weeks"},{"name":"gestational_age_group","type":"string","description":"Guideline curve group: 35, 36, 37, 38, 39, or 40_or_more on Table 1; 35, 36, 37, or 38_or_more on Table 2"},{"name":"age_hours","type":"number","description":"Echo of age in hours"},{"name":"tsb_mg_dl","type":"number","description":"Echo of total serum bilirubin in mg/dL"},{"name":"isoimmune_hemolytic_disease","type":"boolean","description":"Echo of caller-assigned isoimmune hemolytic disease"},{"name":"g6pd_deficiency","type":"boolean","description":"Echo of caller-assigned G6PD deficiency"},{"name":"other_hemolytic_condition","type":"boolean","description":"Echo of caller-assigned other hemolytic condition"},{"name":"sepsis","type":"boolean","description":"Echo of caller-assigned sepsis"},{"name":"albumin_lt_3","type":"boolean","description":"Echo of caller-assigned albumin <3.0 g/dL"},{"name":"clinical_instability_24h","type":"boolean","description":"Echo of caller-assigned significant clinical instability in the previous 24 hours"},{"name":"any_neurotoxicity_risk_factor","type":"boolean","description":"true when any additional neurotoxicity risk factor other than GA is assigned (Supplemental Table 2)"},{"name":"supplemental_table","type":"integer","description":"1 when Table 1 (no extra factors); 2 when Table 2 (any extra factor)"},{"name":"phototherapy_threshold_mg_dl","type":"number","description":"Printed (or linearly interpolated) intensive phototherapy threshold in mg/dL"},{"name":"tsb_minus_threshold","type":"number","description":"TSB minus phototherapy threshold in mg/dL (negative when below threshold)"},{"name":"above_phototherapy_threshold","type":"boolean","description":"true when TSB is at or above the phototherapy threshold. Not a treatment order"},{"name":"components","type":"array","description":"Tree rows for any_neurotoxicity_risk_factor and above_phototherapy_threshold (value is the threshold in mg/dL)"},{"name":"citation","type":"object","description":"Kemper 2022 Pediatrics citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age_hours":"48","albumin_lt_3":"false","clinical_instability_24h":"false","g6pd_deficiency":"false","gestational_age_weeks":"40","isoimmune_hemolytic_disease":"false","other_hemolytic_condition":"false","sepsis":"false","tsb_mg_dl":"17"},{"age_hours":"48","albumin_lt_3":"false","clinical_instability_24h":"false","g6pd_deficiency":"false","gestational_age_weeks":"40","isoimmune_hemolytic_disease":"false","other_hemolytic_condition":"false","sepsis":"false","tsb_mg_dl":"17"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/aap-tsb","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/aap-tsb?gestational_age_weeks=40&age_hours=48&tsb_mg_dl=17&isoimmune_hemolytic_disease=false&g6pd_deficiency=false&other_hemolytic_condition=false&sepsis=false&albumin_lt_3=false&clinical_instability_24h=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/aap-tsb","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/bishop","description":"Bishop 1964 pelvic score: sum of five caller-assigned integers (dilation 0-3, effacement 0-3, station 0-3, consistency 0-2, position 0-2; max 13). Paper bins: dilation 0 / 1-2 / 3-4 / 5-6 cm; effacement 0-30 / 40-50 / 60-70 / 80%; station -3 / -2 / -1 or 0 / +1 or +2; consistency firm/medium/soft; position posterior/mid/anterior. magent does not examine the cervix and does not add later favorable/unfavorable cutoffs, modified Bishop, or cervical length.","parameters":[{"in":"query","name":"dilation","type":"integer","description":"Caller-assigned Bishop 1964 dilation points 0-3 (paper bins: 0 cm → 0; 1-2 cm → 1; 3-4 cm → 2; 5-6 cm → 3). magent does not measure dilation.","required":true,"example":"2"},{"in":"query","name":"effacement","type":"integer","description":"Caller-assigned Bishop 1964 effacement points 0-3 (paper bins: 0-30% → 0; 40-50% → 1; 60-70% → 2; 80% → 3). magent does not measure effacement.","required":true,"example":"2"},{"in":"query","name":"station","type":"integer","description":"Caller-assigned Bishop 1964 station points 0-3 (paper bins: -3 → 0; -2 → 1; -1 or 0 → 2; +1 or +2 → 3). magent does not assign station.","required":true,"example":"1"},{"in":"query","name":"consistency","type":"integer","description":"Caller-assigned Bishop 1964 consistency points 0-2 (paper bins: firm → 0; medium → 1; soft → 2). magent does not palpate the cervix.","required":true,"example":"1"},{"in":"query","name":"position","type":"integer","description":"Caller-assigned Bishop 1964 position points 0-2 (paper bins: posterior → 0; mid → 1; anterior → 2). magent does not examine cervical position.","required":true,"example":"1"}],"errors":[{"code":"invalid_bishop","message":"Bishop 1964 components: dilation 0-3, effacement 0-3, station 0-3, consistency 0-2, position 0-2 (caller-assigned points). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/bishop","citation":{"authors":"Bishop EH","id":"bishop-1964","pmid":"14199536","source":"Obstet Gynecol. 1964;24:266-268","title":"Pelvic scoring for elective induction","url":"https://pubmed.ncbi.nlm.nih.gov/14199536"},"formula_expression":"Bishop = dilation + effacement + station + consistency + position; caller-assigned integers 0-3, 0-3, 0-3, 0-2, 0-2; max 13","purpose":"Return the Bishop 1964 pelvic score as the sum of five caller-assigned integer components (dilation, effacement, station, consistency, position).","markdown_url":"https://magentlab.com/docs/bishop.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"bishop"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Total points 0-13"},{"name":"max_score","type":"integer","description":"Always 13"},{"name":"components","type":"array","description":"Per-component caller-assigned points"},{"name":"citation","type":"object","description":"Bishop 1964 citation"},{"name":"disclaimer","type":"string","description":"Not a medical device"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"consistency":"1","dilation":"2","effacement":"2","position":"1","station":"1"},{"consistency":"1","dilation":"2","effacement":"2","position":"1","station":"1"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/bishop","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/bishop?dilation=2&effacement=2&station=1&consistency=1&position=1","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/bishop","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/simplified-bishop","description":"Laughon 2011 simplified Bishop score from three caller-assigned Bishop 1964 integers: dilation, station, and effacement (each 0-3; max 9). Paper bins: dilation 0 / 1-2 / 3-4 / 5-6 cm; station -3 / -2 / -1 or 0 / +1 or +2; effacement 0-30 / 40-50 / 60-70 / 80%. favorable iff score >5 (Laughon compared with original Bishop >8; PPV 87.7% in that paper). magent does not examine the cervix or add consistency or position. Not a cervical exam or induction order.","parameters":[{"in":"query","name":"dilation","type":"integer","description":"Caller-assigned Bishop 1964 dilation points 0-3 (paper bins: 0 cm → 0; 1-2 cm → 1; 3-4 cm → 2; 5-6 cm → 3). magent does not measure dilation.","required":true,"example":"3"},{"in":"query","name":"station","type":"integer","description":"Caller-assigned Bishop 1964 station points 0-3 (paper bins: -3 → 0; -2 → 1; -1 or 0 → 2; +1 or +2 → 3). magent does not assign station.","required":true,"example":"2"},{"in":"query","name":"effacement","type":"integer","description":"Caller-assigned Bishop 1964 effacement points 0-3 (paper bins: 0-30% → 0; 40-50% → 1; 60-70% → 2; 80% → 3). magent does not measure effacement.","required":true,"example":"2"}],"errors":[{"code":"invalid_simplified_bishop","message":"Simplified Bishop inputs must be caller-assigned integers in the Bishop 1964 0-3 range for dilation, station, and effacement. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/simplified-bishop","citation":{"authors":"Laughon SK, Zhang J, Troendle J, Sun L, Reddy UM","doi":"10.1097/AOG.0b013e3182114ad2","id":"laughon-2011","pmid":"21383643","source":"Obstet Gynecol. 2011;117(4):805-811","title":"Using a simplified Bishop score to predict vaginal delivery","url":"https://doi.org/10.1097/AOG.0b013e3182114ad2"},"formula_expression":"simplified Bishop = dilation + station + effacement; Bishop 1964 caller-assigned integers 0-3, 0-3, 0-3; Laughon 2011; max 9; favorable iff score > 5","purpose":"Return the Laughon 2011 simplified Bishop score as the sum of three caller-assigned Bishop 1964 integers (dilation, station, effacement; each 0-3; max 9) and whether the score is >5.","markdown_url":"https://magentlab.com/docs/simplified-bishop.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"simplified_bishop"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Total points 0-9"},{"name":"max_score","type":"integer","description":"Always 9"},{"name":"favorable","type":"boolean","description":"true iff score >5 (Laughon 2011 compared simplified >5 with original Bishop >8; PPV 87.7% in that paper). Score of 5 is not favorable. Not an induction order."},{"name":"components","type":"array","description":"Per-component caller-assigned points"},{"name":"citation","type":"object","description":"Laughon 2011 citation"},{"name":"disclaimer","type":"string","description":"Not a medical device"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"dilation":"3","effacement":"2","station":"2"},{"dilation":"3","effacement":"2","station":"2"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/simplified-bishop","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/simplified-bishop?dilation=3&station=2&effacement=2","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/simplified-bishop","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/flamm-vbac","description":"Flamm 1997 admission VBAC score, max 10. Points: age under 40 (+2); vaginal birth none 0, before first cesarean 1, after first cesarean 2, before and after 4; first cesarean not for failure to progress (+1); admission effacement gt_75 +2, from_25_to_75 +1, lt_25 0; dilation >=4 cm (+1). Published success 49% for scores 0-2 and 95% for 8-10; other scores return the total only. Not a trial-of-labor order. magent does not examine the cervix.","parameters":[{"in":"query","name":"age_lt_40","type":"boolean","description":"Maternal age under 40 years as assigned by the caller (Flamm 1997). true scores 2. true or false. magent does not date the patient.","required":true,"example":"true"},{"in":"query","name":"vaginal_birth","type":"string","enum":["none","before_first_cesarean","after_first_cesarean","before_and_after"],"description":"Prior vaginal birth history as assigned by the caller (Flamm 1997). Choose one: none scores 0; before_first_cesarean scores 1; after_first_cesarean scores 2; before_and_after scores 4. magent does not read the obstetric history.","required":true,"example":"none"},{"in":"query","name":"non_ftp_indication","type":"boolean","description":"First cesarean was for a reason other than failure to progress (Flamm 1997). true scores 1. true or false. magent does not read the operative indication.","required":true,"example":"false"},{"in":"query","name":"effacement","type":"string","enum":["gt_75","from_25_to_75","lt_25"],"description":"Cervical effacement at admission as assigned by the caller (Flamm 1997). gt_75 scores 2; from_25_to_75 scores 1; lt_25 scores 0. magent does not examine the cervix.","required":true,"example":"lt_25"},{"in":"query","name":"dilation_ge_4","type":"boolean","description":"Cervical dilation at or above 4 cm at admission as assigned by the caller (Flamm 1997). true scores 1. true or false. magent does not examine the cervix.","required":true,"example":"false"}],"errors":[{"code":"invalid_flamm_vbac","message":"Flamm VBAC score inputs must match Flamm 1997 age, prior vaginal birth, cesarean indication, and admission cervical factors from that paper. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/flamm-vbac","citation":{"authors":"Flamm BL, Geiger AM","doi":"10.1016/S0029-7844(97)00531-0","id":"flamm-1997","pmid":"9397100","source":"Obstet Gynecol. 1997;90(6):907-910","title":"Vaginal birth after cesarean delivery: an admission scoring system","url":"https://doi.org/10.1016/S0029-7844(97)00531-0"},"formula_expression":"Flamm VBAC = age_lt_40 2 + vaginal_birth (none 0, before_first_cesarean 1, after_first_cesarean 2, before_and_after 4) + non_ftp_indication 1 + effacement (gt_75 2, from_25_to_75 1, lt_25 0) + dilation_ge_4 1; Flamm 1997; max 10; published VBAC success 49% scores 0-2 and 95% scores 8-10","purpose":"Sum the Flamm 1997 admission VBAC points (max 10) from caller-assigned age, vaginal-birth history, first-cesarean indication, and admission cervical factors, and return the published 49% or 95% success rates only for scores 0–2 and 8–10.","markdown_url":"https://magentlab.com/docs/flamm-vbac.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"flamm_vbac"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Flamm 1997 points 0-10"},{"name":"max_score","type":"integer","description":"Always 10"},{"name":"vbac_success_percent","type":"integer","description":"Flamm 1997 published VBAC success: 49 when score is 0-2, 95 when score is 8-10. Omitted for scores 3-7; those scores are not given invented percents."},{"name":"components","type":"array","description":"Per-factor Flamm 1997 points"},{"name":"citation","type":"object","description":"Flamm and Geiger Obstet Gynecol 1997 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age_lt_40":"true","dilation_ge_4":"false","effacement":"lt_25","non_ftp_indication":"false","vaginal_birth":"none"},{"age_lt_40":"true","dilation_ge_4":"false","effacement":"lt_25","non_ftp_indication":"false","vaginal_birth":"none"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/flamm-vbac","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/flamm-vbac?age_lt_40=true&vaginal_birth=none&non_ftp_indication=false&effacement=lt_25&dilation_ge_4=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/flamm-vbac","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/grobman-vbac","description":"Grobman 2007 first prenatal visit logistic probability of vaginal birth after cesarean from maternal age, prepregnancy BMI, caller-assigned ethnicity (african_american, hispanic, or other), any prior vaginal delivery, prior VBAC after cesarean, and recurrent cesarean indication. Ethnicity uses the paper terms; magent does not assign race or ethnicity. Not the 2009/2010 admission model and not Grobman 2021. Not a trial-of-labor order.","parameters":[{"in":"query","name":"age","type":"integer","description":"Maternal age in years (integer 12-55). Grobman 2007 coefficient -0.039 per year. 12-55 is a clinical range for TOLAC; the paper does not print that clamp. magent does not take a date of birth.","required":true,"example":"30"},{"in":"query","name":"bmi_kg_m2","type":"number","description":"Prepregnancy BMI in kg/m^2 (15-70). Grobman 2007 coefficient -0.060. 15-70 is a clinical range; the paper does not print that clamp. Caller-supplied; magent does not compute BMI from height and weight.","required":true,"example":"25"},{"in":"query","name":"ethnicity","type":"string","enum":["african_american","hispanic","other"],"description":"Caller-assigned ethnicity as used in Grobman 2007: african_american, hispanic, or other (mutually exclusive paper terms; other is the reference). magent does not assign race or ethnicity.","required":true,"example":"other"},{"in":"query","name":"prior_vaginal","type":"boolean","description":"Any prior vaginal delivery as assigned by the caller (Grobman 2007). true scores +0.888. true or false. magent does not read the obstetric history.","required":true,"example":"false"},{"in":"query","name":"prior_vbac","type":"boolean","description":"VBAC after prior cesarean as assigned by the caller (Grobman 2007). true scores +1.003. true or false. magent does not infer this from prior_vaginal.","required":true,"example":"false"},{"in":"query","name":"recurrent_indication","type":"boolean","description":"Recurring indication for cesarean as assigned by the caller (Grobman 2007). true scores -0.632. true or false. magent does not read the operative indication.","required":true,"example":"false"}],"errors":[{"code":"invalid_grobman_vbac","message":"Grobman 2007 first-visit VBAC inputs must match age, BMI, caller-assigned ethnicity, prior vaginal birth, prior VBAC, and recurrent cesarean indication. Returned before settlement; you are not charged.","status":400},{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/grobman-vbac","citation":{"authors":"Grobman WA, Lai Y, Landon MB, Spong CY, Leveno KJ, Rouse DJ, Varner MW, Moawad AH, Caritis SN, Harper M, Wapner RJ, Sorokin Y, Miodovnik M, Carpenter M, Peaceman AM, O'Sullivan MJ, Sibai BM, Langer O, Thorp JM, Ramin SM, Mercer BM; National Institute of Child Health and Human Development (NICHD) Maternal-Fetal Medicine Units Network (MFMU)","doi":"10.1097/01.AOG.0000259312.36053.02","id":"grobman-2007-vbac","pmid":"17400840","source":"Obstet Gynecol. 2007;109(4):806-812","title":"Development of a nomogram for prediction of vaginal birth after cesarean delivery","url":"https://doi.org/10.1097/01.AOG.0000259312.36053.02"},"formula_expression":"w = 3.766 - 0.039*age_years - 0.060*prepregnancy_bmi - 0.671*[african_american] - 0.680*[hispanic] + 0.888*[any prior vaginal delivery] + 1.003*[VBAC after prior cesarean] - 0.632*[recurring indication for cesarean]; vbac_probability = exp(w)/(1+exp(w)); ethnicity african_american|hispanic|other (caller-assigned Grobman 2007 terms, mutually exclusive; other is the reference; magent does not assign race or ethnicity); flags 1 if true else 0; first prenatal visit model; round linear_predictor and vbac_probability 3 decimals; not Grobman 2009/2010 admission; not Grobman 2021 race-free; not a TOLAC order","purpose":"Compute the Grobman 2007 first-prenatal-visit logistic probability of vaginal birth after cesarean from maternal age, prepregnancy BMI, caller-assigned ethnicity, any prior vaginal delivery, prior VBAC after cesarean, and recurrent cesarean indication.","markdown_url":"https://magentlab.com/docs/grobman-vbac.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"grobman_vbac"},{"name":"formula_expression","type":"string","description":"Grobman 2007 first prenatal visit logistic expression"},{"name":"age_years","type":"integer","description":"Maternal age in years used (12-55)"},{"name":"bmi_kg_m2","type":"number","description":"Prepregnancy BMI in kg/m^2 used (15-70)"},{"name":"ethnicity","type":"string","description":"Caller-assigned african_american, hispanic, or other used"},{"name":"prior_vaginal","type":"boolean","description":"Caller-assigned any prior vaginal delivery used"},{"name":"prior_vbac","type":"boolean","description":"Caller-assigned VBAC after prior cesarean used"},{"name":"recurrent_indication","type":"boolean","description":"Caller-assigned recurring cesarean indication used"},{"name":"linear_predictor","type":"number","description":"Grobman 2007 logit w, 3 decimals"},{"name":"vbac_probability","type":"number","description":"exp(w)/(1+exp(w)) on 0-1, 3 decimals. A published probability, not a counseling band or trial-of-labor order."},{"name":"citation","type":"object","description":"Grobman et al. Obstet Gynecol 2007 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age":"30","bmi_kg_m2":"25","ethnicity":"other","prior_vaginal":"false","prior_vbac":"false","recurrent_indication":"false"},{"age":"30","bmi_kg_m2":"25","ethnicity":"other","prior_vaginal":"false","prior_vbac":"false","recurrent_indication":"false"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/grobman-vbac","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/grobman-vbac?age=30&bmi_kg_m2=25&ethnicity=other&prior_vaginal=false&prior_vbac=false&recurrent_indication=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/grobman-vbac","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/puqe","description":"Koren 2002 12-hour PUQE: three caller-assigned integers 1-5 (nausea duration, vomiting episodes, and retching episodes over the last 12 hours as in that paper's table). Sum 3-15. magent does not interview the patient. Koren 2002 published no 3-6 / 7-12 / ≥13 total-score cuts; later 24-hour and trimester-long forms are not scored. Not an antiemetic order and not a medical device.","parameters":[{"in":"query","name":"nausea_duration","type":"integer","description":"Caller-assigned Koren 2002 PUQE nausea duration in the last 12 hours (integer 1-5): 1 not at all; 2 1 hour or less; 3 2-3 hours; 4 4-6 hours; 5 more than 6 hours. magent does not interview the patient.","required":true,"example":"1"},{"in":"query","name":"vomiting_episodes","type":"integer","description":"Caller-assigned Koren 2002 PUQE vomiting episodes in the last 12 hours (integer 1-5): 1 did not throw up; 2 1-2 times; 3 3-4 times; 4 5-6 times; 5 7 or more times. magent does not interview the patient.","required":true,"example":"1"},{"in":"query","name":"retching_episodes","type":"integer","description":"Caller-assigned Koren 2002 PUQE retching or dry heaves without bringing anything up in the last 12 hours (integer 1-5): 1 no time; 2 1-2 times; 3 3-4 times; 4 5-6 times; 5 7 or more times. magent does not interview the patient.","required":true,"example":"1"}],"errors":[{"code":"invalid_puqe","message":"PUQE inputs must match Koren 2002 nausea duration, vomiting episodes, and retching episodes from that paper. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/puqe","citation":{"authors":"Koren G, Boskovic R, Hard M, Maltepe C, Navioz Y, Einarson A","doi":"10.1067/mob.2002.123054","id":"koren-2002","pmid":"12011891","source":"Am J Obstet Gynecol. 2002;186(5 Suppl Understanding):S228-S231","title":"Motherisk-PUQE (pregnancy-unique quantification of emesis and nausea) scoring system for nausea and vomiting of pregnancy","url":"https://doi.org/10.1067/mob.2002.123054"},"formula_expression":"PUQE = nausea_duration + vomiting_episodes + retching_episodes; each caller-assigned 1-5 as in Koren 2002 (last 12 hours); total 3-15; Koren 2002 published no 3-6 / 7-12 / ≥13 total-score severity bands","purpose":"Sum three caller-assigned Koren 2002 12-hour PUQE items (nausea_duration, vomiting_episodes, retching_episodes; each integer 1-5) and return the published 3-15 total. Does not apply later 24-hour, trimester-long, or 3-6 / 7-12 / ≥13 cuts.","markdown_url":"https://magentlab.com/docs/puqe.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"puqe"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Koren 2002 12-hour PUQE sum of three caller-assigned 1-5 items (3-15). No later total-score severity band."},{"name":"max_score","type":"integer","description":"Always 15"},{"name":"components","type":"array","description":"Per-item caller-assigned points"},{"name":"citation","type":"object","description":"Koren et al. Am J Obstet Gynecol 2002 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"nausea_duration":"1","retching_episodes":"1","vomiting_episodes":"1"},{"nausea_duration":"1","retching_episodes":"1","vomiting_episodes":"1"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/puqe","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/puqe?nausea_duration=1&vomiting_episodes=1&retching_episodes=1","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/puqe","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/gir","description":"Neonatal glucose infusion rate (GIR, mg/kg/min) from the unit conversion used with AAP 2011 postnatal glucose homeostasis: GIR = (dextrose_percent x rate_ml_h) / (6 x weight_kg), or (dextrose_percent x rate_ml_kg_h) / 6. Provide rate_ml_h plus weight_kg, or rate_ml_kg_h, not both rate styles. Dextrose 2.5-25% and weight 0.4-10 kg are magent clamps, not AAP input bands. Reports GIR only. Does not order dextrose or TPN. Not a medical device.","parameters":[{"in":"query","name":"dextrose_percent","type":"number","description":"Dextrose concentration as percent (2.5-25, magent clamp; AAP 2011 does not publish an input band). 10 is D10W. magent does not order dextrose.","required":true,"example":"10"},{"in":"query","name":"rate_ml_h","type":"number","description":"Infusion rate in ml/h (0.5-200, magent clamp; AAP 2011 does not publish an input band). Provide this with weight_kg, or provide rate_ml_kg_h, not both rate styles.","required":false,"example":"7.5"},{"in":"query","name":"weight_kg","type":"number","description":"Weight in kg (0.4-10, magent clamp; AAP 2011 does not publish an input band). Required with rate_ml_h. Not required when rate_ml_kg_h is the only rate. magent does not weigh the infant.","required":false,"example":"3"},{"in":"query","name":"rate_ml_kg_h","type":"number","description":"Infusion rate in ml/kg/h (0.5-20, magent clamp). GIR = (dextrose_percent × rate_ml_kg_h) / 6. Provide this or rate_ml_h plus weight_kg, not both rate styles.","required":false,"example":"2.5"}],"errors":[{"code":"invalid_gir","message":"GIR needs dextrose percent and either rate_ml_h plus weight_kg, or rate_ml_kg_h, as used for neonatal glucose infusion (mg/kg/min). Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/gir","citation":{"authors":"Adamkin DH; Committee on Fetus and Newborn, American Academy of Pediatrics","doi":"10.1542/peds.2010-3851","id":"aap-2011-glucose","pmid":"21357346","source":"Pediatrics. 2011;127(3):575-579","title":"Postnatal glucose homeostasis in late-preterm and term infants","url":"https://doi.org/10.1542/peds.2010-3851"},"formula_expression":"gir_mg_kg_min = (dextrose_percent × rate_ml_h) / (6 × weight_kg); equivalently (dextrose_percent × rate_ml_kg_h) / 6","purpose":"Compute neonatal glucose infusion rate in mg/kg/min from dextrose concentration and infusion rate using the unit conversion used with the 2011 AAP postnatal glucose homeostasis report.","markdown_url":"https://magentlab.com/docs/gir.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"gir"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"dextrose_percent","type":"number","description":"Dextrose concentration used, percent"},{"name":"rate_ml_h","type":"number","description":"Infusion rate in ml/h when that rate style is supplied"},{"name":"weight_kg","type":"number","description":"Weight in kg when rate_ml_h is used"},{"name":"rate_ml_kg_h","type":"number","description":"Infusion rate in ml/kg/h (supplied, or rate_ml_h / weight_kg)"},{"name":"gir_mg_kg_min","type":"number","description":"Glucose infusion rate in mg/kg/min, 1 decimal"},{"name":"citation","type":"object","description":"AAP 2011 postnatal glucose citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"dextrose_percent":"10","rate_ml_h":"7.5","weight_kg":"3"},{"dextrose_percent":"10","rate_ml_h":"7.5","weight_kg":"3"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/gir","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/gir?dextrose_percent=10&rate_ml_h=7.5&weight_kg=3","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/gir","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/eat-sleep-console","description":"Grossman 2018 Eat, Sleep, Console functional assessment. well_managed iff eat ≥1 oz per feed or breastfeed well, sleep undisturbed ≥1 hour, and console within 10 minutes if crying. needs_increased_treatment iff not well_managed (boolean only; not a morphine dose). Not modified Finnegan. Not the later ESC Care Tool item list. magent does not examine the infant. Not a diagnosis or medical device.","parameters":[{"in":"query","name":"eat_ok","type":"boolean","description":"Able to eat ≥1 oz per feed or breastfeed well, as assigned by the caller (Grossman 2018 Eat, Sleep, Console). true or false. magent does not observe feeding.","required":true,"example":"true"},{"in":"query","name":"sleep_ok","type":"boolean","description":"Able to sleep undisturbed ≥1 hour, as assigned by the caller (Grossman 2018 Eat, Sleep, Console). true or false. magent does not observe sleep.","required":true,"example":"true"},{"in":"query","name":"console_ok","type":"boolean","description":"Able to be consoled, if crying, within 10 minutes, as assigned by the caller (Grossman 2018 Eat, Sleep, Console). true or false. magent does not observe consolability.","required":true,"example":"true"}],"errors":[{"code":"invalid_flag","message":"boolean clinical flags must be true or false Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/eat-sleep-console","citation":{"authors":"Grossman MR, Lipshaw MJ, Osborn RR, Berkwitt AK","doi":"10.1542/hpeds.2017-0128","id":"grossman-2018","pmid":"29263121","source":"Hosp Pediatr. 2018;8(1):1-6","title":"A Novel Approach to Assessing Infants With Neonatal Abstinence Syndrome","url":"https://doi.org/10.1542/hpeds.2017-0128"},"formula_expression":"well_managed iff eat_ok AND sleep_ok AND console_ok (Grossman 2018 Eat, Sleep, Console). eat_ok = eat ≥1 oz per feed or breastfeed well; sleep_ok = sleep undisturbed ≥1 hour; console_ok = consoled within 10 minutes if crying. needs_increased_treatment iff not well_managed. Not modified Finnegan. Not the later ESC Care Tool item list. magent does not examine the infant. Not a morphine order.","purpose":"Apply the Grossman 2018 Eat, Sleep, Console functional assessment from caller-assigned eat, sleep, and console flags. magent does not examine the infant.","markdown_url":"https://magentlab.com/docs/eat-sleep-console.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"eat_sleep_console"},{"name":"formula_expression","type":"string","description":"Published Grossman 2018 Eat, Sleep, Console well-managed rule"},{"name":"well_managed","type":"boolean","description":"true iff eat_ok, sleep_ok, and console_ok all hold. Not a diagnosis. Not modified Finnegan."},{"name":"needs_increased_treatment","type":"boolean","description":"true iff not well_managed. Alert the team / increase nonpharm or start morphine per Grossman 2018. magent returns the boolean only, not a dose."},{"name":"criteria","type":"array","description":"Per-factor Tree rows eat_ok, sleep_ok, and console_ok, each with factor and met"},{"name":"citation","type":"object","description":"Grossman 2018 Hosp Pediatr Eat, Sleep, Console citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"console_ok":"true","eat_ok":"true","sleep_ok":"true"},{"console_ok":"true","eat_ok":"true","sleep_ok":"true"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/eat-sleep-console","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/eat-sleep-console?eat_ok=true&sleep_ok=true&console_ok=true","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/eat-sleep-console","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/finnegan","description":"Modified Finnegan NAS from Maguire 2013 Table 1 (operational modified FNAS; not a 31-item website variant; not Maguire's 7-item short form). Exclusive cry, sleep, Moro, tremor, fever, respiratory, and stool bands plus true/false CNS, vasomotor, and GI items. Sum 0-46. at_or_above_8 iff score >= 8. magent does not examine the infant. Not Eat Sleep Console. Not a morphine order, diagnosis, or medical device.","parameters":[{"in":"query","name":"crying","type":"string","enum":["none","excessive_high_pitched","continuous_high_pitched"],"description":"Caller-assigned Maguire 2013 Table 1 crying (none, excessive_high_pitched, or continuous_high_pitched). Exclusive. none 0, excessive_high_pitched 2, continuous_high_pitched 3. magent does not examine the infant.","required":true,"example":"none"},{"in":"query","name":"sleep","type":"string","enum":["none","lt_3h","lt_2h","lt_1h"],"description":"Caller-assigned Maguire 2013 Table 1 sleep after feeding (none, lt_3h, lt_2h, or lt_1h). Exclusive. Sleeps less than 3/2/1 h after feeding: lt_3h 1, lt_2h 2, lt_1h 3. magent does not observe sleep.","required":true,"example":"none"},{"in":"query","name":"moro","type":"string","enum":["none","hyperactive","markedly_hyperactive"],"description":"Caller-assigned Maguire 2013 Table 1 Moro reflex (none, hyperactive, or markedly_hyperactive). Exclusive. hyperactive 2, markedly_hyperactive 3. magent does not examine the infant.","required":true,"example":"none"},{"in":"query","name":"tremors","type":"string","enum":["none","mild_disturbed","moderate_severe_disturbed","mild_undisturbed","moderate_severe_undisturbed"],"description":"Caller-assigned Maguire 2013 Table 1 tremors (none, mild_disturbed, moderate_severe_disturbed, mild_undisturbed, or moderate_severe_undisturbed). Exclusive. mild_disturbed 1, moderate_severe_disturbed 2, mild_undisturbed 3, moderate_severe_undisturbed 4. magent does not examine the infant.","required":true,"example":"none"},{"in":"query","name":"increased_muscle_tone","type":"boolean","description":"Caller-assigned Maguire 2013 Table 1 increased muscle tone. true scores 2. magent does not examine the infant.","required":true,"example":"false"},{"in":"query","name":"myoclonic_jerk","type":"boolean","description":"Caller-assigned Maguire 2013 Table 1 myoclonic jerks. true scores 3. magent does not examine the infant.","required":true,"example":"false"},{"in":"query","name":"generalized_convulsions","type":"boolean","description":"Caller-assigned Maguire 2013 Table 1 generalized convulsions. true scores 5. magent does not examine the infant. Not a seizure diagnosis.","required":true,"example":"false"},{"in":"query","name":"excoriation","type":"boolean","description":"Caller-assigned Maguire 2013 Table 1 excoriation. Single item (not per-site nose, knees, or toes). true scores 1. magent does not inspect the skin.","required":true,"example":"false"},{"in":"query","name":"sweating","type":"boolean","description":"Caller-assigned Maguire 2013 Table 1 sweating. true scores 1. magent does not examine the infant.","required":true,"example":"false"},{"in":"query","name":"fever","type":"string","enum":["none","lt_101f","gt_101f"],"description":"Caller-assigned Maguire 2013 Table 1 fever (none, lt_101f, or gt_101f). Exclusive. Maguire <101°F scores 1; >101°F scores 2. magent does not take a temperature.","required":true,"example":"none"},{"in":"query","name":"frequent_yawning","type":"boolean","description":"Caller-assigned Maguire 2013 Table 1 frequent yawning (>3). true scores 1. magent does not observe yawning.","required":true,"example":"false"},{"in":"query","name":"mottling","type":"boolean","description":"Caller-assigned Maguire 2013 Table 1 mottling. true scores 1. magent does not examine the infant.","required":true,"example":"false"},{"in":"query","name":"nasal_stuffiness","type":"boolean","description":"Caller-assigned Maguire 2013 Table 1 nasal stuffiness. true scores 1. magent does not examine the infant.","required":true,"example":"false"},{"in":"query","name":"sneezing","type":"boolean","description":"Caller-assigned Maguire 2013 Table 1 sneezing (>3). true scores 1. magent does not count sneezes.","required":true,"example":"false"},{"in":"query","name":"nasal_flaring","type":"boolean","description":"Caller-assigned Maguire 2013 Table 1 nasal flaring. true scores 2. magent does not examine the infant.","required":true,"example":"false"},{"in":"query","name":"respiratory","type":"string","enum":["none","gt_60","gt_60_retractions"],"description":"Caller-assigned Maguire 2013 Table 1 respiratory rate (none, gt_60, or gt_60_retractions). Exclusive. Rate >60/min scores 1; >60 with retractions scores 2. magent does not count respirations.","required":true,"example":"none"},{"in":"query","name":"excessive_sucking","type":"boolean","description":"Caller-assigned Maguire 2013 Table 1 excessive sucking. true scores 1. magent does not observe feeding.","required":true,"example":"false"},{"in":"query","name":"poor_feeding","type":"boolean","description":"Caller-assigned Maguire 2013 Table 1 poor feeding. true scores 2. magent does not observe feeding.","required":true,"example":"false"},{"in":"query","name":"regurgitation","type":"boolean","description":"Caller-assigned Maguire 2013 Table 1 regurgitation. true scores 2. magent does not observe feeding.","required":true,"example":"false"},{"in":"query","name":"projectile_vomiting","type":"boolean","description":"Caller-assigned Maguire 2013 Table 1 projectile vomiting. true scores 3. magent does not observe feeding.","required":true,"example":"false"},{"in":"query","name":"stools","type":"string","enum":["none","loose","watery"],"description":"Caller-assigned Maguire 2013 Table 1 stools (none, loose, or watery). Exclusive. loose 2, watery 3. magent does not inspect stools.","required":true,"example":"none"}],"errors":[{"code":"invalid_finnegan","message":"Finnegan inputs must match Maguire 2013 Table 1 modified FNAS exclusive bands and true/false items from that table. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/finnegan","citation":{"authors":"Finnegan LP, Connaughton JF Jr, Kron RE, Emich JP","id":"finnegan-1975","pmid":"1163358","source":"Addict Dis. 1975;2(1-2):141-158","title":"Neonatal abstinence syndrome: assessment and management","url":"https://pubmed.ncbi.nlm.nih.gov/1163358"},"formula_expression":"FNAS = crying + sleep + moro + tremors + increased_muscle_tone + myoclonic_jerk + generalized_convulsions + excoriation + sweating + fever + frequent_yawning + mottling + nasal_stuffiness + sneezing + nasal_flaring + respiratory + excessive_sucking + poor_feeding + regurgitation + projectile_vomiting + stools; Maguire 2013 Table 1 modified Finnegan (exclusive cry/sleep/moro/tremors/fever/respiratory/stools; remaining items true/false); max 46; at_or_above_8 iff total >= 8 (Zimmermann-Baer / Maguire suspicion and pharmacologic-treatment threshold). Not Eat Sleep Console. Not Maguire 7-item short form. magent does not examine the infant. Not a morphine order.","purpose":"Sum Maguire 2013 Table 1 modified Finnegan items from caller-assigned exclusive cry, sleep, Moro, tremor, fever, respiratory, and stool bands plus true/false CNS, vasomotor, and GI flags. Return the 0–46 total and at_or_above_8 (true iff score ≥ 8).","markdown_url":"https://magentlab.com/docs/finnegan.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"finnegan"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"score","type":"integer","description":"Maguire 2013 Table 1 modified Finnegan sum of 21 caller-assigned items (0-46)"},{"name":"max_score","type":"integer","description":"Always 46"},{"name":"at_or_above_8","type":"boolean","description":"true iff score ≥ 8 (Zimmermann-Baer / Maguire suspicion and pharmacologic-treatment threshold). Not a morphine order. Not a mild/moderate/severe stage."},{"name":"components","type":"array","description":"Per-item caller-assigned points"},{"name":"citation","type":"object","description":"Finnegan et al. Addict Dis 1975 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"crying":"none","excessive_sucking":"false","excoriation":"false","fever":"none","frequent_yawning":"false","generalized_convulsions":"false","increased_muscle_tone":"false","moro":"none","mottling":"false","myoclonic_jerk":"false","nasal_flaring":"false","nasal_stuffiness":"false","poor_feeding":"false","projectile_vomiting":"false","regurgitation":"false","respiratory":"none","sleep":"none","sneezing":"false","stools":"none","sweating":"false","tremors":"none"},{"crying":"none","excessive_sucking":"false","excoriation":"false","fever":"none","frequent_yawning":"false","generalized_convulsions":"false","increased_muscle_tone":"false","moro":"none","mottling":"false","myoclonic_jerk":"false","nasal_flaring":"false","nasal_stuffiness":"false","poor_feeding":"false","projectile_vomiting":"false","regurgitation":"false","respiratory":"none","sleep":"none","sneezing":"false","stools":"none","sweating":"false","tremors":"none"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/finnegan","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/finnegan?crying=none&sleep=none&moro=none&tremors=none&increased_muscle_tone=false&myoclonic_jerk=false&generalized_convulsions=false&excoriation=false&sweating=false&fever=none&frequent_yawning=false&mottling=false&nasal_stuffiness=false&sneezing=false&nasal_flaring=false&respiratory=none&excessive_sucking=false&poor_feeding=false&regurgitation=false&projectile_vomiting=false&stools=none","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/finnegan","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/pregnancy-due-dates","description":"Pregnancy estimated due date from a certain LMP using ACOG Committee Opinion 700 Naegele: edd_days_from_lmp = 280 + (cycle_length_days - 28). Inputs are numeric days_since_lmp (0-294) and cycle_length_days (21-35); those bands are magent clamps. Reports gestational_age_days and days_until_edd (negative if past EDD). Not a dating ultrasound. magent does not interpret imaging. Not a delivery date order.","parameters":[{"in":"query","name":"days_since_lmp","type":"integer","description":"Completed days since the first day of a certain last menstrual period (integer 0-294 inclusive). magent clamp; ACOG 700 publishes the 280-day Naegele interval, not this input band. Numeric days only. Not a calendar date.","required":true,"example":"0"},{"in":"query","name":"cycle_length_days","type":"integer","description":"Usual cycle length in days (integer 21-35 inclusive). magent clamp; ACOG 700 adjusts the 280-day interval by (cycle_length_days - 28) and does not publish this input band. 28 is the Naegele reference cycle.","required":true,"example":"28"}],"errors":[{"code":"invalid_due_date","message":"Due-date inputs must match ACOG Committee Opinion 700 cycle length and days since LMP from that opinion. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/pregnancy-due-dates","citation":{"authors":"Committee on Obstetric Practice; American Institute of Ultrasound in Medicine; Society for Maternal-Fetal Medicine","doi":"10.1097/AOG.0000000000002046","id":"acog-2017-700","pmid":"28426621","source":"Obstet Gynecol. 2017;129(5):e150-e154","title":"Methods for Estimating the Due Date","url":"https://doi.org/10.1097/AOG.0000000000002046"},"formula_expression":"edd_days_from_lmp = 280 + (cycle_length_days - 28); gestational_age_days = days_since_lmp; days_until_edd = edd_days_from_lmp - days_since_lmp","purpose":"Return ACOG Committee Opinion 700 Naegele estimated due date in days from a certain last menstrual period, adjusting the 280-day interval when cycle length is not 28 days.","markdown_url":"https://magentlab.com/docs/pregnancy-due-dates.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"pregnancy_due_dates"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"days_since_lmp","type":"integer","description":"Completed days since the first day of the certain LMP"},{"name":"cycle_length_days","type":"integer","description":"Usual cycle length in days used for the Naegele adjustment"},{"name":"edd_days_from_lmp","type":"integer","description":"Estimated due date as days from the first day of the LMP"},{"name":"gestational_age_days","type":"integer","description":"Gestational age in days, equal to days_since_lmp"},{"name":"days_until_edd","type":"integer","description":"Days from today-in-LMP-days to the EDD; negative if past EDD"},{"name":"citation","type":"object","description":"ACOG Committee Opinion 700 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"cycle_length_days":"28","days_since_lmp":"0"},{"cycle_length_days":"28","days_since_lmp":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/pregnancy-due-dates","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/pregnancy-due-dates?days_since_lmp=0&cycle_length_days=28","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/pregnancy-due-dates","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/intrauterine-rbc","description":"Mandelbrot 1988 intrauterine RBC transfusion volume: fetoplacental_volume_ml = 1.046 + estimated_fetal_weight_g * 0.14; volume_ml uses the unrounded fetoplacental volume times (hct_final_percent - hct_initial_percent) / hct_donor_percent. Hematocrit arm only; the paper also allowed platelet count — magent does not implement platelets. Caller-assigned estimated fetal weight; magent does not estimate weight from biometry. Not a medical device or transfusion order.","parameters":[{"in":"query","name":"estimated_fetal_weight_g","type":"number","description":"Caller-assigned estimated fetal weight in grams (200-4000). Required. magent does not estimate fetal weight from biometry.","required":true,"example":"1000"},{"in":"query","name":"hct_initial_percent","type":"number","description":"Initial fetal hematocrit as a percent (5-50). Must be strictly less than hct_final_percent.","required":true,"example":"20"},{"in":"query","name":"hct_final_percent","type":"number","description":"Target fetal hematocrit as a percent (20-60). Must be strictly greater than hct_initial_percent and strictly less than hct_donor_percent.","required":true,"example":"40"},{"in":"query","name":"hct_donor_percent","type":"number","description":"Donor unit hematocrit as a percent (60-90). Must be strictly greater than hct_final_percent.","required":true,"example":"80"}],"errors":[{"code":"invalid_iut","message":"Intrauterine transfusion inputs must match Mandelbrot 1988 estimated fetal weight and hematocrit window from that paper. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/intrauterine-rbc","citation":{"authors":"Mandelbrot L, Daffos F, Forestier F, MacAleese J, Descombey D","doi":"10.1159/000263335","id":"mandelbrot-1988","pmid":"3257068","source":"Fetal Ther. 1988;3(1-2):60-66","title":"Assessment of fetal blood volume for computer-assisted management of in utero transfusion","url":"https://doi.org/10.1159/000263335"},"formula_expression":"fetoplacental_volume_ml = 1.046 + estimated_fetal_weight_g * 0.14; volume_ml = fetoplacental_volume_ml * (hct_final_percent - hct_initial_percent) / hct_donor_percent","purpose":"Compute Mandelbrot 1988 intrauterine RBC transfusion volume from caller-assigned estimated fetal weight and initial, target, and donor hematocrits. Hematocrit arm only.","markdown_url":"https://magentlab.com/docs/intrauterine-rbc.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"mandelbrot_hct"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"estimated_fetal_weight_g","type":"number","description":"Caller-assigned estimated fetal weight in grams"},{"name":"hct_initial_percent","type":"number","description":"Initial fetal hematocrit percent used"},{"name":"hct_final_percent","type":"number","description":"Target fetal hematocrit percent used"},{"name":"hct_donor_percent","type":"number","description":"Donor unit hematocrit percent used"},{"name":"fetoplacental_volume_ml","type":"number","description":"Mandelbrot 1988 fetoplacental volume in mL, 1 decimal"},{"name":"volume_ml","type":"number","description":"Intrauterine RBC transfusion volume in mL, 1 decimal"},{"name":"citation","type":"object","description":"Mandelbrot et al. Fetal Ther 1988 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"estimated_fetal_weight_g":"1000","hct_donor_percent":"80","hct_final_percent":"40","hct_initial_percent":"20"},{"estimated_fetal_weight_g":"1000","hct_donor_percent":"80","hct_final_percent":"40","hct_initial_percent":"20"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/intrauterine-rbc","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/intrauterine-rbc?estimated_fetal_weight_g=1000&hct_initial_percent=20&hct_final_percent=40&hct_donor_percent=80","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/intrauterine-rbc","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/neonatal-partial-exchange","description":"Partial-exchange volume from Kumar 2004: volume_ml = (actual_hct_percent - 55) / actual_hct_percent * blood_volume_ml. Desired hematocrit is the trial's 55 percent only. Caller assigns blood volume; magent does not choose millilitres per kilogram or saline versus plasma. Not a transfusion order or indication (the trial found no long-term benefit in asymptomatic LBW). Deterministic published arithmetic with citation.","parameters":[{"in":"query","name":"actual_hct_percent","type":"number","description":"Actual hematocrit as percent (56-90). Must be above the trial desired 55.","required":true,"example":"70"},{"in":"query","name":"blood_volume_ml","type":"number","description":"Caller-assigned blood volume in millilitres (40-600). magent does not choose millilitres per kilogram.","required":true,"example":"270"}],"errors":[{"code":"invalid_pet","message":"Partial-exchange inputs must match Kumar 2004 actual hematocrit above 55 percent and caller-assigned blood volume from that trial. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/neonatal-partial-exchange","citation":{"authors":"Kumar A, Ramji S","id":"kumar-2004","pmid":"15123865","source":"Indian Pediatr. 2004;41(4):366-372","title":"Effect of partial exchange transfusion in asymptomatic polycythemic LBW babies","url":"https://pubmed.ncbi.nlm.nih.gov/15123865"},"formula_expression":"volume_ml = (actual_hct_percent - 55) / actual_hct_percent * blood_volume_ml","purpose":"Compute the Kumar 2004 partial-exchange transfusion volume from actual hematocrit and caller-assigned blood volume, using the trial's printed desired hematocrit of 55 percent.","markdown_url":"https://magentlab.com/docs/neonatal-partial-exchange.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"neonatal_partial_exchange"},{"name":"formula_expression","type":"string","description":"Exact expression used"},{"name":"actual_hct_percent","type":"number","description":"Input actual hematocrit in percent"},{"name":"blood_volume_ml","type":"number","description":"Caller-assigned blood volume in mL"},{"name":"desired_hct_percent","type":"number","description":"Kumar 2004 printed desired hematocrit (55)"},{"name":"volume_ml","type":"number","description":"Partial-exchange volume in mL, 1 decimal"},{"name":"citation","type":"object","description":"Kumar and Ramji 2004 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"actual_hct_percent":"70","blood_volume_ml":"270"},{"actual_hct_percent":"70","blood_volume_ml":"270"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/neonatal-partial-exchange","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/neonatal-partial-exchange?actual_hct_percent=70&blood_volume_ml=270","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/neonatal-partial-exchange","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/oocyte-live-birth","description":"Goldman 2017 counseling for elective mature-oocyte cryopreservation. Autologous: thaw survival 0.95 if age <36 else 0.85; p_blast = survival × exp(2.8043 − 0.1112 × equation_age) with equation_age 35 at age ≤35; p_euploid from that paper's SI table. Donor: p_blast 0.3583, p_euploid 0.647. p_oocyte = 0.6 × p_euploid × p_blast. Returns nearest-integer percents of at least 1, 2, and 3 live births. Surrogate ICSI cohort; not a live-birth guarantee. Not oncofertility.","parameters":[{"in":"query","name":"age_years","type":"integer","description":"Integer age in years (24-44) at the time of the oocyte retrieval as assigned by the caller. Autologous Equation 1 groups age ≤35 as equation_age 35. Donor rates do not change with age, but age is still required. magent does not read an identity document.","required":true,"example":37},{"in":"query","name":"mature_oocytes","type":"integer","description":"Count of mature (MII) oocytes to bank, integer 1-80, as assigned by the caller. Each oocyte is an independent Bernoulli trial at p_oocyte. magent does not count oocytes.","required":true,"example":20},{"in":"query","name":"egg_donor","type":"boolean","description":"true when the mature oocytes are from a donor as assigned by the caller; false for autologous oocytes. Donor path uses p_blast 0.3583 and p_euploid 0.647. true or false.","required":true,"example":false}],"errors":[{"code":"invalid_oocyte_live_birth","message":"Goldman 2017 oocyte counseling inputs must match age 24-44 years, mature oocyte count, and egg_donor flag from that paper. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/oocyte-live-birth","citation":{"authors":"Goldman RH, Racowsky C, Farland LV, Munné S, Ribustello L, Fox JH","doi":"10.1093/humrep/dex008","id":"goldman-2017","pmid":"28166330","source":"Hum Reprod. 2017;32(4):853-859","title":"Predicting the likelihood of live birth for elective oocyte cryopreservation: a counseling tool for physicians and patients","url":"https://doi.org/10.1093/humrep/dex008"},"formula_expression":"p_oocyte = 0.6 * p_euploid * p_blast; autologous p_blast = survival * exp(2.8043 - 0.1112 * equation_age), survival = 0.95 if age_years < 36 else 0.85, equation_age = 35 if age_years <= 35 else age_years; autologous p_euploid from Goldman 2017 SI / main text by integer age (<=35 0.574, 36 0.564, 37 0.486, 38 0.466, 39 0.440, 40 0.359, 41 0.327, 42 0.285, 43 0.206, 44 0.127); donor p_blast = 0.3583, p_euploid = 0.647; p_at_least_k = 1 - sum_{i=0}^{k-1} C(n,i) * p_oocyte^i * (1-p_oocyte)^{n-i} for k=1,2,3 with n = mature_oocytes; percents nearest integer 0-100 (Goldman 2017 Equations 1-2)","purpose":"Compute Goldman 2017 counseling probabilities of at least one, two, or three live births from a planned count of mature oocytes after elective cryopreservation, using that paper's autologous blastocyst and euploid rates or the donor-egg rates.","markdown_url":"https://magentlab.com/docs/oocyte-live-birth.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"oocyte_live_birth"},{"name":"formula_expression","type":"string","description":"Goldman 2017 Equations 1-2 plus SI p(euploid) and donor rates"},{"name":"age_years","type":"integer","description":"Integer age 24-44 used"},{"name":"mature_oocytes","type":"integer","description":"Mature oocyte count n (1-80)"},{"name":"egg_donor","type":"boolean","description":"true uses donor p_blast and p_euploid; false is autologous Equation 1"},{"name":"p_blast","type":"number","description":"Per-oocyte blastocyst probability, 4 decimals. Autologous: survival × exp(2.8043 − 0.1112 × equation_age). Donor: 0.3583."},{"name":"p_euploid","type":"number","description":"Per-blastocyst euploid probability, 4 decimals. Autologous SI / main text by integer age. Donor: 0.647."},{"name":"p_oocyte","type":"number","description":"0.6 × p_euploid × p_blast, 4 decimals (60% live birth per transferred euploid blastocyst)"},{"name":"p_at_least_1_percent","type":"integer","description":"Nearest-integer percent (0-100) of at least one live birth from n oocytes"},{"name":"p_at_least_2_percent","type":"integer","description":"Nearest-integer percent (0-100) of at least two live births from n oocytes"},{"name":"p_at_least_3_percent","type":"integer","description":"Nearest-integer percent (0-100) of at least three live births from n oocytes"},{"name":"citation","type":"object","description":"Goldman 2017 Hum Reprod citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"age_years":"37","egg_donor":"false","mature_oocytes":"20"},{"age_years":"37","egg_donor":"false","mature_oocytes":"20"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/oocyte-live-birth","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/oocyte-live-birth?age_years=37&mature_oocytes=20&egg_donor=false","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/oocyte-live-birth","maxTimeoutSeconds":600,"x402Version":2},{"scheme":"exact","status":"live","path":"/api/calc/neonatal-eos","description":"Puopolo 2011 neonatal early-onset sepsis prior at birth (≥34 weeks) from maternal temperature, gestational age, ROM, GBS, and antibiotic timing, then Escobar 2014 posterior after a caller-assigned well, equivocal, or ill exam. Incidence intercepts 0.3-0.6 per 1000 replace the printed 47.8398 constant. Not a sepsis diagnosis or antibiotic order. magent does not examine the infant.","parameters":[{"in":"query","name":"gestational_age_weeks","type":"number","description":"Gestational age in weeks (34.0-43.0). Days as fractional weeks (39+4/7 ≈ 39.5714). Infants below 34 weeks are rejected (Puopolo 2011).","required":true,"example":40.0},{"in":"query","name":"maternal_temp_f","type":"number","description":"Highest maternal intrapartum temperature in °F (94.0-108.0), used to 0.1°F.","required":true,"example":98.6},{"in":"query","name":"rom_hours","type":"number","description":"Duration of rupture of membranes in hours (0-240). Transformed as (hours+0.05)^0.2.","required":true,"example":0},{"in":"query","name":"gbs","type":"string","enum":["negative","positive","unknown"],"description":"Maternal GBS status: negative, positive, or unknown (Puopolo 2011).","required":true,"example":"negative"},{"in":"query","name":"gbs_or_any_abx_2h","type":"boolean","description":"true if GBS-specific antibiotics ≥2 h before delivery or any antibiotics 2-3.9 h before delivery. Caller assigns. true or false.","required":true,"example":false},{"in":"query","name":"broad_spectrum_abx_4h","type":"boolean","description":"true if broad-spectrum antibiotics ≥4 h before delivery. Caller assigns. true or false.","required":true,"example":false},{"in":"query","name":"eos_incidence_per_1000","type":"number","enum":[0.3,0.4,0.5,0.6],"description":"Local EOS incidence per 1000 live births. Only 0.3, 0.4, 0.5, or 0.6 (published intercepts).","required":true,"example":0.5},{"in":"query","name":"clinical_category","type":"string","enum":["well","equivocal","ill"],"description":"Caller-assigned Escobar 2014 exam category: well, equivocal, or ill. magent does not examine the infant.","required":true,"example":"well"}],"errors":[{"code":"invalid_neonatal_eos","message":"Puopolo 2011 / Escobar 2014 EOS inputs must match gestational age, maternal temperature, ROM hours, GBS, antibiotics, incidence, and clinical category. Returned before settlement; you are not charged.","status":400},{"code":"invalid_gestational_age_weeks","message":"gestational_age_weeks must be at least 34 weeks as in Puopolo 2011 (infants ≥34 weeks). Returned before settlement; you are not charged.","status":400},{"code":"invalid_eos_incidence","message":"eos_incidence_per_1000 must be 0.3, 0.4, 0.5, or 0.6 as published for the Puopolo 2011 intercepts. Returned before settlement; you are not charged.","status":400},{"code":"invalid_eos_clinical","message":"clinical_category must be well, equivocal, or ill as in Escobar 2014. Returned before settlement; you are not charged.","status":400},{"code":"invalid_items","message":"POST body must be a JSON object with only an items array Returned before settlement; you are not charged.","status":400},{"code":"invalid_item_count","message":"items must be an array of 1 to 25 objects Returned before settlement; you are not charged.","status":400},{"code":"invalid_item","message":"each items entry must be a JSON object Returned before settlement; you are not charged.","status":400},{"code":"payment_required","message":"Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header","status":402},{"code":"payment_in_progress","message":"The same authorization nonce is already being settled; retry shortly","status":409},{"code":"rate_limited","message":"Too many requests from this client","status":429},{"code":"settlement_uncertain","message":"Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE","status":503},{"code":"settle_failed","message":"Settlement failed; retry with the same PAYMENT-SIGNATURE shortly","status":503},{"code":"facilitator_unavailable","message":"Payment facilitator unavailable","status":503},{"code":"facilitator_misconfigured","message":"Payment facilitator is not configured","status":503},{"code":"facilitator_unauthorized","message":"Payment facilitator rejected credentials","status":503},{"code":"kyt_risk_detected","message":"Payment facilitator declined this request after compliance screening","status":503},{"code":"request_blocked_by_location","message":"Payment facilitator blocked this request by location","status":503},{"code":"opaque_403","message":"Payment facilitator returned HTTP 403 without a JSON reason","status":503},{"code":"ledger_unavailable","message":"Payment ledger unavailable","status":503},{"code":"payment_unavailable","message":"Payment processing unavailable","status":503}],"docs":{"url":"https://magentlab.com/docs/neonatal-eos","citation":{"authors":"Puopolo KM, Draper D, Wi S, Newman TB, Zupancic J, Lieberman E, Smith M, Escobar GJ","doi":"10.1542/peds.2010-3464","id":"puopolo-2011","pmid":"22025590","source":"Pediatrics. 2011;128(5):e1155-e1163","title":"Estimating the probability of neonatal early-onset infection on the basis of maternal risk factors","url":"https://doi.org/10.1542/peds.2010-3464"},"formula_expression":"SRS = 1/(1+exp(−βx)); βx = intercept(eos_incidence_per_1000) + 0.8680×maternal_temp_f + (−6.9325)×GA + 0.0877×GA² + 1.2256×(ROM_h+0.05)^0.2 + (−1.0488)×gbs_or_any_abx_2h + (−1.1861)×broad_spectrum_abx_4h + GBS(positive 0.5771, unknown 0.0427, negative 0). Intercepts replace the printed 47.8398 case-control constant: 0.3→40.0528, 0.4→40.3415, 0.5→40.5656, 0.6→40.7489. Posterior odds = prior odds × Escobar 2014 conservative upper-95% CI LRs (well 0.41, equivocal 5.0, ill 21.2). Infants ≥34 weeks. Not a sepsis diagnosis or antibiotic order.","purpose":"Return the Puopolo 2011 logistic prior probability of neonatal early-onset infection at birth from maternal temperature, gestational age, rupture of membranes, GBS, and intrapartum antibiotics, then the Escobar 2014 posterior after a caller-assigned well, equivocal, or ill exam. Infants ≥34 weeks.","markdown_url":"https://magentlab.com/docs/neonatal-eos.md"},"amount":"5000","method":"GET","response_fields":[{"name":"formula","type":"string","description":"neonatal_eos"},{"name":"formula_expression","type":"string","description":"Puopolo 2011 prior logistic with incidence intercepts replacing 47.8398, then Escobar 2014 posterior"},{"name":"gestational_age_weeks","type":"number","description":"Input gestational age in weeks"},{"name":"maternal_temp_f","type":"number","description":"Highest maternal intrapartum temperature in °F, to 0.1"},{"name":"rom_hours","type":"number","description":"Rupture of membranes in hours"},{"name":"gbs","type":"string","description":"negative, positive, or unknown"},{"name":"gbs_or_any_abx_2h","type":"boolean","description":"GBS-specific ≥2 h or any antibiotics 2-3.9 h flag"},{"name":"broad_spectrum_abx_4h","type":"boolean","description":"Broad-spectrum antibiotics ≥4 h flag"},{"name":"eos_incidence_per_1000","type":"number","description":"Incidence used to select the intercept (0.3, 0.4, 0.5, or 0.6)"},{"name":"clinical_category","type":"string","description":"Caller-assigned well, equivocal, or ill"},{"name":"clinical_lr","type":"number","description":"Escobar 2014 conservative upper-95% CI likelihood ratio"},{"name":"prior_risk_per_1000","type":"number","description":"Puopolo 2011 sepsis risk at birth per 1000 live births, 4 decimals"},{"name":"posterior_risk_per_1000","type":"number","description":"Escobar 2014 posterior risk per 1000 after the clinical LR, 4 decimals"},{"name":"citation","type":"object","description":"Puopolo et al. Pediatrics 2011 citation"},{"name":"disclaimer","type":"string","description":"Not-a-device notice"}],"bulk":{"status":"preview","method":"POST","example":{"items":[{"broad_spectrum_abx_4h":"false","clinical_category":"well","eos_incidence_per_1000":"0.5","gbs":"negative","gbs_or_any_abx_2h":"false","gestational_age_weeks":"40.0","maternal_temp_f":"98.6","rom_hours":"0"},{"broad_spectrum_abx_4h":"false","clinical_category":"well","eos_incidence_per_1000":"0.5","gbs":"negative","gbs_or_any_abx_2h":"false","gestational_age_weeks":"40.0","maternal_temp_f":"98.6","rom_hours":"0"}]},"max_items":25,"paywall_url":"https://api.magentlab.com/paywall/bulk/neonatal-eos","extra_item_display":"$0.002","extra_item_amount":"2000","amount_formula":"unit_amount + extra_item_amount * (n - 1)","unit_amount":"5000"},"example_url":"https://api.magentlab.com/api/calc/neonatal-eos?gestational_age_weeks=40.0&maternal_temp_f=98.6&rom_hours=0&gbs=negative&gbs_or_any_abx_2h=false&broad_spectrum_abx_4h=false&eos_incidence_per_1000=0.5&clinical_category=well","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","canary":null,"display_price":"$0.005","network":"eip155:8453","docs_url":"https://magentlab.com/docs/neonatal-eos","maxTimeoutSeconds":600,"x402Version":2}],"channel":{"heading":"Payment channels (batch-settlement)","lead":"Deposit USDC into the x402 channel contract, then sign cumulative vouchers. Exact remains accepts[0] for one-off EIP-3009.","rules":["Not the same as POST {items} bulk (that is still exact).","Product GET only. Ping, POST {items}, paywall.js, and canary stay exact.","Verify (and deposit settle) before the tool. Charge commit after HTTP 2xx.","Refund skips the tool. Full drain closes locally; a later deposit reopens the same channelId."],"contract":"0x4020074e9dF2ce1deE5A9C1b5c3f541D02a10003","withdraw_delay":86400,"accepts_index":"accepts[0] is always exact. accepts[1] is batch-settlement on product GET only, and only while offered. Ping and POST {items} stay exact.","offered":true},"base_url":"https://api.magentlab.com","mcp":{"args":["-y","@magentlab/mcp"],"command":"npx","docs_path":"/docs/mcp","purpose":"Local stdio client for MCP hosts. It pages every paid Magent tool and pays each call with the caller's x402 key. The paid product remains the HTTP API.","package":"@magentlab/mcp"},"codes":{"coverage":"full","coverage_meaning":"Gold-gated Current Prescribable RxNorm + ICD-10-CM + LOINC. Not complete monthly RxNorm or UMLS.","icd10cm_fy":"FY2026-04","license":{"icd10cm":"ICD-10-CM from CMS/NCHS. US claims codes, not WHO ICD-10.","loinc":"This material contains content from LOINC (http://loinc.org). LOINC is copyright © Regenstrief Institute, Inc. and the Logical Observation Identifiers Names and Codes (LOINC) Committee and is available at no cost under the license at http://loinc.org/license. LOINC® is a registered United States trademark of Regenstrief Institute, Inc.","rxnorm":"This product uses publicly available data courtesy of the U.S. National Library of Medicine (NLM), National Institutes of Health, Department of Health and Human Services; NLM is not responsible for the product and does not endorse or recommend this or any other product."},"loinc_version":"2.82","notes":"ICD-10 entries are ICD-10-CM (US claims), not WHO ICD-10. RxNorm is Current Prescribable Content until a licensed full monthly ingest lands. coverage=full is that gold-gated trio, not complete monthly RxNorm or UMLS.","rxnorm_release":"2026-08-03","source":"postgres ingest","stale":true,"systems":["rxnorm","icd10","loinc"],"verified_at":"2026-08-18T04:22:50.230718Z","version":"icd10:FY2026-04|loinc:2.82|rxnorm:2026-08-03"},"playbooks":[{"name":"Prior authorization coding","description":"Map a chart phrase to ICD-10-CM or RxNorm, then look up the preferred term from an exact code.","docs_path":"/docs/playbooks/prior-auth","slug":"prior-auth","indexed?":true,"docs_url":"https://magentlab.com/docs/playbooks/prior-auth","sequence":[{"path":"/api/codes/search","method":"GET","docs_path":"/docs/code-search","example_url":"https://api.magentlab.com/api/codes/search?query=Tylenol%20500mg&system=rxnorm"},{"path":"/api/codes/search","method":"GET","docs_path":"/docs/code-search","example_url":"https://api.magentlab.com/api/codes/search?query=type%202%20diabetes&system=icd10"},{"path":"/api/codes/lookup","method":"GET","docs_path":"/docs/code-lookup","example_url":"https://api.magentlab.com/api/codes/lookup?system=rxnorm&code=198440"}],"bundle_path":null,"bundle_url":null},{"name":"BSA and ANC","description":"Compute Mosteller BSA, then ANC from WBC and a neutrophil differential.","docs_path":"/docs/playbooks/oncology-bsa","slug":"oncology-bsa","indexed?":true,"docs_url":"https://magentlab.com/docs/playbooks/oncology-bsa","sequence":[{"path":"/api/calc/bsa","method":"GET","docs_path":"/docs/bsa","example_url":"https://api.magentlab.com/api/calc/bsa?height_cm=170&weight_kg=70"},{"path":"/api/calc/anc","method":"GET","docs_path":"/docs/anc","example_url":"https://api.magentlab.com/api/calc/anc?wbc_k_ul=6.0&neutrophil_percent=50&band_percent=3"}],"bundle_path":null,"bundle_url":null},{"name":"Kidney function + stroke risk","description":"eGFR then CHA2DS2-VASc when a chart needs both kidney function and AF stroke risk.","docs_path":"/docs/playbooks/risk-calcs","slug":"risk-calcs","indexed?":true,"docs_url":"https://magentlab.com/docs/playbooks/risk-calcs","sequence":[{"path":"/api/calc/egfr","method":"GET","docs_path":"/docs/egfr","example_url":"https://api.magentlab.com/api/calc/egfr?creatinine_mg_dl=1.1&age=65&sex=female"},{"path":"/api/calc/cha2ds2-vasc","method":"GET","docs_path":"/docs/cha2ds2-vasc","example_url":"https://api.magentlab.com/api/calc/cha2ds2-vasc?age=78&sex=female&chf=false&hypertension=true&diabetes=true&stroke_tia=false&vascular_disease=false"}],"bundle_path":null,"bundle_url":null},{"name":"GLP-1 prior-auth BMI","description":"Compute Keys/Quetelet BMI from height and weight for prior-auth arithmetic.","docs_path":"/docs/playbooks/glp1-bmi","slug":"glp1-bmi","indexed?":false,"docs_url":"https://magentlab.com/docs/playbooks/glp1-bmi","sequence":[{"path":"/api/calc/bmi","method":"GET","docs_path":"/docs/bmi","example_url":"https://api.magentlab.com/api/calc/bmi?height_cm=170&weight_kg=70"}],"bundle_path":null,"bundle_url":null},{"name":"Renal dosing CrCl","description":"Cockcroft-Gault creatinine clearance when a label still doses on CrCl rather than CKD-EPI eGFR.","docs_path":"/docs/playbooks/renal-crcl","slug":"renal-crcl","indexed?":false,"docs_url":"https://magentlab.com/docs/playbooks/renal-crcl","sequence":[{"path":"/api/calc/crcl","method":"GET","docs_path":"/docs/crcl","example_url":"https://api.magentlab.com/api/calc/crcl?age=65&sex=female&weight_kg=70&creatinine_mg_dl=1.1"}],"bundle_path":null,"bundle_url":null},{"name":"MASH / NASH FIB-4","description":"FIB-4 from age, AST, ALT, and platelets for fibrosis prior-auth arithmetic.","docs_path":"/docs/playbooks/mash-fib4","slug":"mash-fib4","indexed?":false,"docs_url":"https://magentlab.com/docs/playbooks/mash-fib4","sequence":[{"path":"/api/calc/fib4","method":"GET","docs_path":"/docs/fib4","example_url":"https://api.magentlab.com/api/calc/fib4?age=50&ast_u_l=100&alt_u_l=40&platelets_10e9_l=200"}],"bundle_path":null,"bundle_url":null},{"name":"Ideal / adjusted body weight","description":"Devine IBW and 0.4 AdjBW from height, sex, and actual weight. Not a dosing recommendation.","docs_path":"/docs/playbooks/ibw-devine","slug":"ibw-devine","indexed?":false,"docs_url":"https://magentlab.com/docs/playbooks/ibw-devine","sequence":[{"path":"/api/calc/ibw","method":"GET","docs_path":"/docs/ibw","example_url":"https://api.magentlab.com/api/calc/ibw?height_in=70&sex=male&weight_kg=90"}],"bundle_path":null,"bundle_url":null},{"name":"Liver MELD-Na","description":"OPTN/UNOS 2016 MELD-Na from creatinine, bilirubin, INR, sodium, and dialysis.","docs_path":"/docs/playbooks/liver-meld-na","slug":"liver-meld-na","indexed?":false,"docs_url":"https://magentlab.com/docs/playbooks/liver-meld-na","sequence":[{"path":"/api/calc/meld-na","method":"GET","docs_path":"/docs/meld-na","example_url":"https://api.magentlab.com/api/calc/meld-na?creatinine_mg_dl=1.9&bilirubin_mg_dl=4.2&inr=1.2&sodium_mmol_l=128&dialysis=false"}],"bundle_path":null,"bundle_url":null},{"name":"Pneumonia CURB-65","description":"CURB-65 from age and discrete clinical flags.","docs_path":"/docs/playbooks/pneumonia-curb65","slug":"pneumonia-curb65","indexed?":false,"docs_url":"https://magentlab.com/docs/playbooks/pneumonia-curb65","sequence":[{"path":"/api/calc/curb65","method":"GET","docs_path":"/docs/curb65","example_url":"https://api.magentlab.com/api/calc/curb65?age=70&confusion=true&urea_high=true&respiratory_rate_ge_30=false&low_blood_pressure=false"}],"bundle_path":null,"bundle_url":null},{"name":"Wells PE probability","description":"Wells PE from discrete clinical flags. Not a diagnosis.","docs_path":"/docs/playbooks/pe-wells","slug":"pe-wells","indexed?":false,"docs_url":"https://magentlab.com/docs/playbooks/pe-wells","sequence":[{"path":"/api/calc/wells-pe","method":"GET","docs_path":"/docs/wells-pe","example_url":"https://api.magentlab.com/api/calc/wells-pe?signs_dvt=true&pe_number_one=true&hr_gt_100=false&immobilization_or_surgery=false&previous_dvt_pe=false&hemoptysis=false&malignancy=false"}],"bundle_path":null,"bundle_url":null}],"docs_url":"https://magentlab.com/docs","maxTimeoutSeconds":600,"payment":{"steps":["GET the tool with Accept: application/json (do not send Accept: text/html unless you want the human paywall).","HTTP 402 means you have not paid. Decode the base64 PAYMENT-REQUIRED header. HTTP 503 is not a new quote.","Sign accepts[0] (exact, EIP-3009) with validBefore = now + maxTimeoutSeconds (600 seconds), or accepts[1] (batch-settlement deposit/voucher) on product GET. Ping and POST {items} stay exact. Magent retries transient facilitator 429/5xx before answering.","Retry the same URL with PAYMENT-SIGNATURE (base64 JSON of accepted and payload). Magent attaches canonical extensions.bazaar on CDP verify/settle; echoing 402 bazaar is optional.","Success is HTTP 200 JSON plus PAYMENT-RESPONSE. exact settles before the tool. batch-settlement verifies (and deposit-settles) before the tool and commits the charge after HTTP 2xx. HTTP 503: retry the same PAYMENT-SIGNATURE. Mint a new exact nonce only after a new HTTP 402."],"guarantees":["HTTP 402 is unpaid, including a missing query. After PAYMENT-SIGNATURE, invalid parameters return HTTP 400 before settlement. You are not charged. HTTP 402 never includes the tool JSON.","exact: settlement finishes before the tool (paymentFlow upfront). batch-settlement: verify/deposit before the tool; chargedCumulativeAmount commits after HTTP 2xx. Uncertain or failed settlement fails closed (HTTP 503). Retry the same PAYMENT-SIGNATURE.","HTTP 402 is unpaid only. Do not sign a second authorization because of a 503.","Execution is timeout-bounded and concurrency-capped.","Calculator inputs are stored encrypted for allowlisted operators (Magent Console). They are not in public logs, SSH lookups, catalog, or rollups. Request logs store path without query."],"params_before_settle":"Unpaid requests return HTTP 402 even if query parameters or POST items are missing or invalid, so CDP and agents can index the path. After a PAYMENT-SIGNATURE, invalid params return HTTP 400 JSON before settlement. Magent does not charge. Fix the params, then request a new 402 quote for that complete URL. Catalog misses (empty matches, found=false) are valid paid 200s."},"schemes":{"bulk":"Same-path POST {items} is still scheme exact: one EIP-3009 authorization for GET unit plus $0.002 per extra item. That is not x402 batch-settlement (payment channels / vouchers).","offered":[{"id":"exact","summary":"Fixed-price USDC on Base. The buyer authorizes the advertised amount (EIP-3009). magent settles before the tool runs (paymentFlow upfront).","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","network":"eip155:8453","asset_transfer_method":"eip3009","payment_flow":"upfront","offered":true},{"id":"batch-settlement","summary":"Payment-channel vouchers claimed later in batches. Exact stays accepts[0]. Same-path POST {items} is still exact.","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","network":"eip155:8453","asset_transfer_method":"eip3009","payment_flow":"authorization","offered":true,"when_to_enable":"Production claim and settle credited payTo. Keep exact as accepts[0]. POST bulk stays exact. See docs/BATCH_SETTLEMENT.md."}],"not_offered":[{"id":"upto","summary":"Not offered. Usage-based: buyer authorizes a ceiling, seller settles the actual amount after work. Reserved for a future metered tool. Not for current calculators or code search.","asset_transfer_method":"permit2","payment_flow":"authorization","offered":false,"when_to_enable":"A product whose price is unknown until after execution (token/compute). Never on /api/calc/* or /api/codes/*."}]},"x402Version":2}