{"id":19709209,"url":"https://github.com/leebrian/aws-cm-test","last_synced_at":"2026-05-10T20:37:46.894Z","repository":{"id":49162446,"uuid":"162513013","full_name":"leebrian/aws-cm-test","owner":"leebrian","description":"Running synthetic chief complaints through AWS Comprehend Medical","archived":false,"fork":false,"pushed_at":"2021-06-25T15:24:00.000Z","size":8803,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-24T08:51:49.463Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leebrian.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-12-20T02:01:37.000Z","updated_at":"2023-08-17T17:13:44.000Z","dependencies_parsed_at":"2022-09-09T05:50:56.016Z","dependency_job_id":null,"html_url":"https://github.com/leebrian/aws-cm-test","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leebrian%2Faws-cm-test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leebrian%2Faws-cm-test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leebrian%2Faws-cm-test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leebrian%2Faws-cm-test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leebrian","download_url":"https://codeload.github.com/leebrian/aws-cm-test/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241025962,"owners_count":19896536,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T21:46:54.452Z","updated_at":"2026-05-10T20:37:41.839Z","avatar_url":"https://github.com/leebrian.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Test AWS Comprehend Medical\n\nRunning synthetic chief complaints through AWS Comprehend Medical.\n\nUsing Scott Lee's public data sets from \u003chttps://gitlab.com/gte577z/ml-workshop\u003e\n\nQuestion- how does CM diagnosis compare to process that generated these codes using the process described in [Scott's paper](https://www.nature.com/articles/s41746-018-0070-0)? Using the set of 42,364 synthetic chief complaints and HCUP CCS diagnosis codes.\n\n## Results\n\nMultiple different types of entity types found ['SYSTEM_ORGAN_SITE', 'DX_NAME', 'ACUITY', 'DIRECTION', 'ID', 'PROCEDURE_NAME', 'TEST_NAME', 'TREATMENT_NAME', 'PHONE_OR_FAX', 'GENERIC_NAME', 'ADDRESS', 'BRAND_NAME', 'DATE', 'NAME', 'PROFESSION']\n\nMultiple different types of entity categories found ['ANATOMY', 'MEDICAL_CONDITION', 'PROTECTED_HEALTH_INFORMATION', 'TEST_TREATMENT_PROCEDURE', 'MEDICATION']\n\nMultiple different types of trait names found ['SYMPTOM', 'DIAGNOSIS', 'SIGN', 'NEGATION']\n\nMultiple different tuples of type, caegory, trait found [('DX_NAME', 'MEDICAL_CONDITION', 'SYMPTOM'), ('DX_NAME', 'MEDICAL_CONDITION', 'DIAGNOSIS'), ('DX_NAME', 'MEDICAL_CONDITION', 'SIGN'), ('DX_NAME', 'MEDICAL_CONDITION', 'NEGATION')]\n\n## Requirements\n\nRemember to [configure your local environment](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html#cli-quick-configuration) with an aws access key, secret key, and default region. Entire exploration done using free tier (thanks AWS) and in the us-east-1 region, although I don't think that matters.\n\n## References\n\n[CCS Users Guide with descriptions of 259 diagnosis categories](https://www.hcup-us.ahrq.gov/toolssoftware/ccs/CCSUsersGuide.pdf)\n[AWS CM Docs](https://docs.aws.amazon.com/comprehend/latest/dg/comprehend-medical.html)\n[AWS CM API Docs](https://docs.aws.amazon.com/comprehend/latest/dg/API_Reference.html)\n[AWS CM Python Boto3 Docs](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/comprehendmedical.html)\n\n## Screenshots\n\n![Default Amazon Example Screenshot](/doc/amazon-example-screenshot.png)\n![Example input and insight screenshot from CM console using a synthetic chief complaint screenshot](doc/synthetic-syndromic-example-screenshot.png)\n![Example insight and results screenshot from CM console using same synthetic chief complaint](doc/synthetic-syndromic-example-results-screenshot.png)\n\n## Data Maps\n\n```json\n[\n    {\n        \"data-source\": \"ML-Workshop-Synthetic-Chief-Complaints\",\n        \"data-owner\": \"https://gitlab.com/gte577z\",\n        \"data-custodian\": \"https://gitlab.com/gte577z\",\n        \"address\": \"https://gitlab.com/gte577z/ml-workshop/raw/master/data/text.csv\",\n        \"extract-date\": \"2018-12-20\",\n        \"format\": \"CSV\",\n        \"methods\": \"https://doi.org/10.1038/s41746-018-0070-0\",\n        \"fields\": [\n            \"text\",\n            \"diagnosis\"\n        ]\n    },\n    {\n        \"data-source\": \"AWS-Medical-Comprehend-Assess-Chief-Complaints\",\n        \"data-owner\": \"OCIO\",\n        \"data-custodian\": \"OCIO\",\n        \"address\": \"https://github.com/leebrian/aws-cm-test/blob/master/dat/text-acm.csv\",\n        \"format\": \"CSV\",\n        \"methods\": \"https://github.com/leebrian/aws-cm-test\",\n        \"tags\": [\n            \"AWS\",\n            \"Comprehend Medical\"\n        ],\n        \"fields\": [\n            \"text\",\n            \"diagnosis\",\n            \"aws-text\",\n            \"aws-score\",\n            \"aws-category\",\n            \"aws-category\",\n            \"aws-trait\"\n        ],\n        \"upstream\": \"ML-Workshop-Synthetic-Chief-Complaints\"\n    }\n]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleebrian%2Faws-cm-test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleebrian%2Faws-cm-test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleebrian%2Faws-cm-test/lists"}