New API Endpoints
Two new, fully supported endpoints work specifically with PHI.
ScienceIO is now offering two new endpoints, Identify_PHI and Redact_PHI, which were first released in beta as part of our Analyze - Web App. These endpoints can now be used in your code to identify or redact protected health information (PHI).
Calling the new endpoints is as simple as updating the SDK (Python SDK users only) and changing only one or two lines of code (all users).
Why Try the Endpoints
Use these two PHI endpoints to:
- Test our PHI identification and redaction capabilities against another tool in the market, or against your own internal capabilities
- Identify and redact HIPAA-protected information in your data, so that you can safely use the file within your organization or outside of it
- Work toward creating a structured, comprehensive patient profile/record from multiple documents by identifying, aggregating, and disambiguating the PHI
Full Instructions
For full instructions, more details, and troubleshooting:
Quick Instructions
Seasoned ScienceIO API users may wish to follow these abbreviated instructions.
Step 1: Update the SDK (Python SDK users only)
pip install scienceio --upgrade
Step 2: Change a single line of code (Python users) or two lines of code (HTTP users)
Python users, edit this line to include the new endpoint (identify_phi
or redact_phi
):
response = scio.identify_phi(query_text)
or
response = scio.redact_phi(query_text)
HTTP users, edit the first line to include the new endpoint (identify-phi
or redact-phi
), and the last line to say input_text
instead of text
:
Make sure to edit your code in both the POST and GET requests. If you are calling the API via HTTP, you must use dashes instead of underscores. So for HTTP users, the endpoints you should use in your code are
identify-phi
andredact-phi
.
curl https://api.aws.science.io/v2/identify-phi \
or
curl https://api.aws.science.io/v2/redact-phi
and
--data '{ "input_text": "Patient: John Doe\nAddress: 112 First Ave, New York, NY\nPhone: 555-555-1212\nAdmission date: December 13, 2022\nDiagnosis: UTI\nPhysician: Dr. Jane Smith\nNPI: 1234567890\nPhysician number: 555-555-9876\nClinical note: Mr. Doe is a 75-year-old male with a history of urinary tract infections. He presented to the Pearson clinic today with symptoms of dysuria and frequency. A urine culture was performed by Dr. Jones and showed significant growth of Escherichia coli.The patient was started on a course of oral antibiotics and will follow up with the clinic in one week for a repeat urine culture.If no improvement, patient will be referred to St. Joseph Hospital."}'
The change to
input_text
is part of a larger standardization of underlying schemas. It will be rolled out to other endpoints in future releases.In the interim, you should continue to use
text
when calling thestructure
orstructure-ontologies
endpoints. Useinput_text
only when calling theidentify-phi
andredact-phi
endpoints.
Updated about 2 months ago