Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⚡️ add API and Input validation #8

Merged
merged 6 commits into from
Dec 19, 2023
Merged

⚡️ add API and Input validation #8

merged 6 commits into from
Dec 19, 2023

Conversation

juanesarango
Copy link
Contributor

@juanesarango juanesarango commented Dec 19, 2023

  • ⚡️ Add API with expressJS
  • 🕵🏻‍♂️ Add object Validation with Joi
  • 🚀 Deploy to AWS with serverless

Working at: https://api.mds-risk-model.com

IPSS-M endpoint: /ipssm

curl \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"HB": 10, "PLT":150, "BM_BLAST":2, "CYTO_IPSSR": "Poor"}' \
    https://api.mds-risk-model.com/ipssm
    
{
  "patient": {
    "HB": 10,
    "PLT": 150,
    "BM_BLAST": 2,
    "CYTO_IPSSR": "Poor",
    "del5q": 0,
    "del7_7q": 0,
    "del17_17p": 0,
    "complex": 0,
    "TP53mut": "0",
    "TP53maxvaf": 0,
    "TP53loh": 0,
    "MLL_PTD": 0,
    "FLT3": 0,
    "ASXL1": 0,
    "CBL": 0,
    "DNMT3A": 0,
    "ETV6": 0,
    "EZH2": 0,
    "IDH2": 0,
    "KRAS": 0,
    "NPM1": 0,
    "NRAS": 0,
    "RUNX1": 0,
    "SF3B1": 0,
    "SRSF2": 0,
    "U2AF1": 0,
    "BCOR": 0,
    "BCORL1": 0,
    "CEBPA": 0,
    "ETNK1": 0,
    "GATA2": 0,
    "GNB1": 0,
    "IDH1": 0,
    "NF1": 0,
    "PHF6": 0,
    "PPM1D": 0,
    "PRPF8": 0,
    "PTPN11": 0,
    "SETBP1": 0,
    "STAG2": 0,
    "WT1": 0
  },
  "ipssm": {
    "means": {
      "riskScore": -0.35,
      "riskCat": "Moderate Low"
    },
    "worst": {
      "riskScore": -0.35,
      "riskCat": "Moderate Low"
    },
    "best": {
      "riskScore": -0.35,
      "riskCat": "Moderate Low"
    }
 }

IPSS-R endpoint: /ipssr

$ curl \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"HB": 10, "ANC": 1.8, "PLT": 150, "BM_BLAST": 2, "CYTO_IPSSR": "Poor", "AGE": 28}' \
    https://api.mds-risk-model.com/ipssr

{
  "IPSSR_SCORE": 3, 
  "IPSSR_CAT": "Low", 
  "IPSSRA_SCORE": 1.53,
  "IPSSRA_CAT": "Low"
}

@juanesarango juanesarango merged commit 0b3c04b into main Dec 19, 2023
2 checks passed
@juanesarango juanesarango deleted the use-serverless branch November 1, 2024 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant