scriptDetail
Query prescription details such as active ingredient, company labeler, and categorical details for all FDA National Drug Codes (NDCs).
Get Started with scriptEncounter
If you have already setup CareQuery, run the below code to get started with your first scriptDetail query.
Example:
Request all blood coagulation national drug codes (NDCs) details
# import package
from care_query.care_query import CareQuery
# instantiate and connect
cq = CareQuery(email = "your-email",
token = "your-api-token")
# construct query
query = cq.scriptDetail(pharm_class = ["blood coagulation factor [epc]",
"blood coagulation factors [cs]"])
# estimate query size (optional)
estimate = query.estimate()
# return query sample data (optional)
sample = query.sample()
# execute query to return results
data = query.execute()
Query Parameters
The following a parameters are available within the scriptDetail query, including details on the parameter values.
description | options |
---|---|
FDA National Drug Code version 11 standardized code for a dispensed drug | Any Valid National Drug Code |
Classifications of a drug product based on its therapeutic action, or how it works in the body | |
The active ingredient in a drug product | |
Classification of a drug product based on its regulatory status and how it is marketed | |
Number of rows returned in the data request | Integer or False |
Binary indicator as to whether you'd like | True or False |
Query Speed
scriptDetail - depending on the complexity and size of the query, most queries will return results within 30 seconds to 3 minutes.
Median Query Speed: 1 minute and 30 seconds
Query Return Data
The scriptDetail query returns the SCRIPT_DETAIL_TABLE for all encounters that meet the criterion specified within the query.
The SCRIPT_DETAIL_TABLE provides comprehensive drug and provider details by NDC code.
feature | description | example |
---|---|---|
ndc | FDA standardized National Drug Code 11 for a dispensed drug | 00002021301 |
labeler | A company or organization that is a manufacturer, repackager, relabeler, or distributor of drugs | eli lilly and company |
product_type | A classification of a drug product based on its intended use and how it is regulated by the FDA | human otc drug |
substance | A substance is the active ingredient in a drug product | insulin |
substance_unit | The unit of measurement for the active ingredient in a drug product | [iU]/mL |
dosage_form | The type of pharmaceutical formulation, such as a tablet, capsule, liquid, or injection, that a drug product is available in | injection, solution |
route | Method by which a drug product is administered to the body | parenteral |
marketing_category | A classification of a drug product based on its regulatory status and how it is marketed | bla |
application_number | A unique identifier for an NDC labeler's request to obtain an NDC labeler code | BLA018780 |
pharm_class | A list of classifications of a drug product based on its therapeutic action, or how it works in the body | insulin [cs], |
Advanced Query Logic & Recipes
As one thinks about what the healthcare encounter's they'd like returned in a query...the diagnosis, procedure, location, time and specialty criterion...things can get quite complex.
scriptDetail gives users categorical groupings for ease of use, as well as SQL-like capabilities to tactfully specify AND and OR logic, right within the CareQuery API!
Please reference the following resources to better understand how to create rockstar queries!
Updated about 1 month ago