daily_med package¶
Subpackages¶
Submodules¶
Module contents¶
-
class
daily_med.
DailyMed
[source]¶ Bases:
object
It provides Python bindings to the Daily Med API.
Additional documentation regarding the API endpoints is available at https://dailymed.nlm.nih.gov/dailymed/app-support-web-services.cfm
-
API_BASE
= 'https://dailymed.nlm.nih.gov/dailymed/services/v2'¶
-
call
(endpoint, output_type, params=None)[source]¶ It calls the remote endpoint and returns the result, if success.
Parameters: Returns: - Iterator representing all pages of the call
result.
Return type: Raises: DailyMedRemoteException
– In the event of something that is TBD.
-
get_spl
(set_id)[source]¶ get_spl returns an SPLDocument for the set_id.
Parameters: set_id (str) – Set ID of the label. Returns: Object containing both the metadada and document. Return type: SPL
-
get_spls
(**kwargs)[source]¶ get_spls returns an iterator of matching SPL Meta Data.
For more information about SPLs (Structured Product Labels), please visit the FDA documentation.
Parameters: - application_number (str) – New Drug Application (NDA) number. See the documentation for resource /applicationnumbers for more information.
- boxed_warning (bool) – Whether or not a drug contains a boxed warning.
- dea_schedule_code (str) –
Code representing a Drug Enforcement Administration Schedule for drugs. See the FDA documentation for DEA Schedules for more information. Acceptable values are listed below:
- none - Not Scheduled.
- C48672 - CI.
- C48675 - CII.
- C48676 - CIII.
- C48677 - CIV.
- C48679 - CV.
- doctype (str) – FDA’s Logical Observation Identifiers Names and Codes system. Determines the type of document or content of a label.
- drug_class_code (str) – Code representing a pharmacologic drug class. See the documentation for resource /drugclasses for more information.
- drug_class_coding_system (str) –
Used with drug_class_code to specify the coding system of the drug class code. Acceptable values are listed below:
- 2.16.840.1.113883.3.26.1.5 - National Drug File Reference Terminology. (Default value)
- drug_name (str) – Generic or brand name. See the documentation for resource /drugnames for more information.
- name_type (str) –
Used with drug_name to specify whether the given name is a generic name or brand name. Acceptable values are listed below:
- g or generic - Generic name.
- b or brand - Brand name.
- both - Either generic or brand name. (Default value)
- labeler (str) – Name of labeler for the drug.
- manufacturer (str) – Name of manufacturer for the drug.
- marketing_category_code (str) – FDA’s Marketing Categories for types of drugs. See the FDA documentation for Marketing Category for more information.
- ndc (str) – National Drug Code (NDC). See the documentation for resource /ndcs for more information.
- published_date (str) – The date that the drug was published on DailyMed. The accepted date format is YYYY-MM-DD (ex. 2015-09-10)
- published_date_comparison (str) –
Used with published_date to specify the type of comparison used with the date. Acceptable values are listed below:
- lt - Drugs that have a published date Less Than the published_date parameter.
- lte - Drugs that have a published date Less Than or Equal To the published_date parameter.
- gt - Drugs that have a published date Greater Than
- the published_date parameter.
- gte - Drugs that have a published date Greater Than
- or Equal To the published_date parameter.
- eq - Drugs that have a published date Equal To the published_date parameter (Default value)
- rxcui (str) – RxNorm Concept Unique Identifier (RXCUI) code. See the documentation for resource /rxcuis for more information.
- setid (str) – Set ID of a label.
- unii_code (str) – Unique Ingredient Identifier (UNII) code. See the documentation for resource /uniis for more information.
Returns: Object containing metadata, but no document.
Return type:
-