database-all
Version:
MIMS Drug Database integration
434 lines (364 loc) • 10.8 kB
text/typescript
export interface IBrandSearchObj {
brandName?: string;
activeIngredient?: string;
multi?: boolean;
mimsClass?: string;
indication?: string;
mimsCode?: string;
offMarket?: boolean;
include?: boolean;
term?: string;
page?: number;
limit?: number;
}
export type IFields = 'blackTriangle' | 'innovator' | 'products' | 'productPacks' | 'mimsClasses' | 'monographs' | 'cmis' | 'companies' | 'offMarket';
export interface IBrandDetailsReceiveFields {
fields: IFields[]
}
export interface IBrands {
brandId: string;
brandName: string;
}
export interface IProduct {
productId: string;
productName: string;
offMarket: boolean;
}
export interface IProducts extends Array<IProduct>{};
export interface IProductPack {
productPackId: string;
productPackName: string;
productId: string;
}
export interface IProductPacks extends Array<IProductPack>{};
export interface IMIMSClasses {
[index: number]: string
}
export interface IMonoGraph {
monographId: string;
monographType: string;
}
export interface IMonoGraphs extends Array<IMonoGraph>{};
// TODO - get the structure for this data from brand details API
export interface ICMI {
}
export interface ICompany {
companyId: string;
companyName: string;
companyType: string;
}
export interface ICompanies extends Array<ICompany>{};
export interface IBrandDetail {
brandId: string;
brandName: string;
blackTriangle?: boolean;
innovator?: boolean;
products?: IProducts;
productPacks?: IProductPacks,
mimsClasses?: IMIMSClasses
monographs?: IMonoGraphs,
cmis?: any; // TODO -Check CMIS in brand details API and make an interface
companies?: ICompanies,
offMarket?: boolean
}
/**
* Product Interfaces
*/
export interface IProductSearchObj {
productName?: string;
brandId?: string;
brandName?: string;
activeIngredient?: string;
multi?: boolean;
mimsClass?: string;
indication?: string;
pbsCode?: string;
mtCode?: string;
artg?: string;
mimsCode?: string;
offMarket?: boolean;
include?: boolean;
term?: string;
page?: number;
limit?: number;
}
export type IProductSearchFields = 'brand' | 'productPacks' | 'offMarket' | 'roas' | 'mimsClasses' | 'atcCodes' | 'productImages' | 'indications' | 'acgs' | 'vp' | 'vis' | 'monographs' | 'cmis' | 'blackTriangle' | 'poisonClassification' | 'productRegistration' | 'pregnancyCategory' | 'pbs' | 'amt' | 'aip' | 'stateSchedules' | 'rtpmStates';
export interface IProductDetailsReceiveFields {
fields: IProductSearchFields[]
}
/**
* Product Packs Interfaces
*/
export interface IProductPackSearchObj {
productId?: string;
productName?: string;
brandId?: string;
brandName?: string;
mtCode?: string;
mimsCode?: string;
activeIngredient?: string;
multi?: boolean;
include?: boolean;
term?: string;
page?: number;
limit?: number;
}
export type IProductPackSearchFields = 'brand' | 'product' | 'productPackItems' | 'atcCodes' | 'acg' | 'vp' | 'vis' | 'monographs' | 'cmis' | 'blackTriangle' | 'poisonClassification' | 'productRegistration' | 'stateSchedules' | 'rtpmStates' | 'pregnancyCategory' | 'pbs' | 'amt' | 'aip';
export interface IProductPackDetailsReceiveFields {
fields: IProductPackSearchFields[]
}
/**
* Virtual Products Interfaces
*/
export interface IVirtualProductSearchObj {
vpName?: string;
activeIngredient?: string;
multi?: boolean;
include?: boolean;
mtCode?: string;
page?: number;
limit?: number;
}
export type IVirtualProductSearchFields = 'products' | 'vis' | 'pbs' | 'amt' | 'aip' | 'stateSchedules' | 'rtpmStates';
export interface IVirtualProductDetailsReceiveFields {
fields: IVirtualProductSearchFields[]
}
/**
* Virtual Items Interfaces
*/
export interface IVirtualItemSearchObj {
viName?: string;
activeIngredient?: string;
multi?: boolean;
include?: boolean;
page?: number;
limit?: number;
}
export type IVirtualItemSearchFields = 'vps' | 'products' | 'vpg' | 'dosageForm' | 'hl7DosageForm' | 'roa' | 'molecules' | 'pbs';
export interface IVirtualItemDetailsReceiveFields {
fields: IVirtualItemSearchFields[]
}
/**
* Virtual Product Group Interfaces
* ? Under development
*/
export interface IVirtualProductGroupsSearchObj {
vpgName?: string;
activeIngredient?: string;
multi?: boolean;
include?: boolean;
page?: number;
limit?: number;
}
/**
* Active Composition Group Interfaces
*/
export interface IACGSearchObj {
acgName?: string;
activeIngredient?: string;
multi?: boolean;
include?: boolean;
page?: number;
limit?: number;
}
export type IACGSearchFields = 'vpgs' | 'molecules';
export interface IACGDetailsReceiveFields {
fields: IACGSearchFields[]
}
/**
* Molecules Interfaces
*/
export interface IMoleculesSearchObj {
moleculeName?: string;
showSynonym?: boolean;
page?: number;
limit?: number;
}
export type IMoleculesSearchFields = 'synonyms' | 'acgs' | 'rtpmStates';
export interface IMoleculesReceiveFields {
fields: IMoleculesSearchFields[]
}
/**
* PBS Code Search Interface
*/
export type IPBSSearchFields = 'pbsCode' | 'pbsType' | 'pbsProgram' | 'prescriberTypes' | 'restrictions' | 'prices' | 'fees' | 'repeats' | 'maxQtyPacks' | 'maxQtyUnits' | 'notToBeBroken' | 'mpps' | 'pbsBrands';
export interface IPBSSearchObj {
fields?: IPBSSearchFields[];
manufacturerCode?: string;
}
/**
* Abbreviated Product Information Interface
*/
export interface IABBREVPIsSearchObj {
brandName?: string;
productName?: string;
productPackName?: string;
include?: boolean;
page?: number;
limit?: number;
}
/**
* Full Product Information Search Object interface
*/
export interface IFullPISearchObj {
brandName?: string;
productName?: string;
productPackName?: string;
include?: boolean;
page?: number;
limit?: number;
}
/**
* Consumer Medicines Information (CMI) Search Object Interface
*/
export interface ICMISearchObj {
cmiName?: string;
activeIngredient?: string;
multi?: boolean;
include?: boolean;
term?: string;
page?: number;
limit?: number;
}
/**
* Drug Interaction Alert (DIA) SearchObj interface
*/
export type IDIASearchTypes = 'DDInteraction_2Products' | 'DDInteraction_2VP' | 'DDInteraction_mixed' | 'DDInteraction_mixed_severity';
export type IDIASearchInputType = 'product' | 'vp';
export type IDIASeverityOptions = 'Severe' | 'Moderate' | 'Minor' | 'Caution';
export type IDIADocumentationOptions = 'Well Established' | 'Good' | 'Limited' | 'Not Established';
export interface IDIASearchInputs {
id: string,
type: IDIASearchInputType
}
export interface IDIASearchObj {
inputs: IDIASearchInputs[],
severity?: IDIASeverityOptions,
documentation?: IDIADocumentationOptions
}
/**
* Drug Allergy Alert (DAA) SearchObj interface
*/
export interface IDAASearchObj {
productName?: string;
activeIngredient?: string;
multi?: boolean;
term?: string;
page?: number;
limit?: number;
}
/**
* Drug Allergy Alert (DIA) SearchObj interface
*/
export type IDAASearchTypes = 'Allergy_Same_Ingredient_As_Allergen' | 'Allergy_Same_Allergy_Class' | 'Allergy_Cross_Sensitivity';
export type IDAAAllergenType = 'acg' | 'allergyClass' | 'product';
export type IDAASearchInputType = 'product' | 'vp';
export interface IDAASearchInput {
id: string,
type: IDAASearchInputType
}
export interface IDAAAllergens {
allergenId: string;
allergenType: IDAAAllergenType;
}
export interface IDAAAllergenSearchObj {
allergens?: IDAAAllergens[];
inputs?: IDAASearchInput[];
}
/**
* Drug Health Alert (DHA) SearchObj interface
*/
export type IDHAIssueCodesTypes = 'ICD10' | 'ICPC2+';
export type IDHASearchInputType = 'product' | 'vp';
export type IDHAServerityTypes = 'Contraindicated' | 'Extreme Caution' | 'Caution';
export type IDHADocumentationOptions = 'Well Established' | 'Good' | 'Limited' | 'Not Established';
export type IDHASearchTypes = 'Interaction_Risperdal_Parkinson' | 'Interaction_risperidone_Parkinson' | 'Interaction_mixed_Health' | 'Interaction_mixed_Health_Severity' | 'Interaction_mixed_IssueCodes';
export interface IDHAIssueCodes {
code: string;
codeType: IDHAIssueCodesTypes;
}
export interface IDHAInputs {
id: string;
type: IDHASearchInputType;
}
export interface IDHAAllergenSearchObj {
issueCodes: IDHAIssueCodes[];
inputs: IDHAInputs[];
severity?: IDHAServerityTypes;
documentation?: IDHADocumentationOptions;
}
/**
* Drug Duplicate Alert (DDA) SearchObj interface
*/
export type IDDASearchInputType = 'product' | 'vp';
export type IDDASearchTypes = 'Dup_2Products' | 'Dup_3VP' | 'Dup_mixed_warningLevel2' | 'Dup_noCheck_sameID';
export type IDDAWarningLevel = '1' | '2' | '3';
export interface IDDAInputs {
id: string;
type: IDDASearchInputType;
}
export interface IDDAAllergenSearchObj {
inputs: IDDAInputs[],
warningLevel?: IDDAWarningLevel,
duplicateIdAlert?: boolean,
}
/**
* TGA Poison Schedules SearchObj Interface
*/
export interface ITGAPoisonSchedules {
class?: string;
}
/**
* TGA Pragnancy Categories SearchObj Interface
*/
export interface ITGAPregnancyCate {
category?: string;
}
/**
* TGA Sports Drug Categories SearchObj Interface
*/
export interface ITGASportDrugCate {
category?: string;
}
/**
* Document Level Alert SearchObj Interface
*/
export type IDocLevelTypes = 'Well Established' | 'Good' | 'Limited' | 'Not Established';
export interface IDocLevelAlert {
documentation: IDocLevelTypes;
}
/**
* Drug Interaction severity level
*/
export type IDISeverityLevels = 'Severe' | 'Moderate' | 'Minor' | 'Caution';
export interface IDISeverityAlert {
severity: IDISeverityLevels;
}
/**
* Drug Health Alert Document Level
*/
export type IDHDocLevelTypes = 'Well Established' | 'Good' | 'Limited' | 'Not Established';
export interface IDHDocLevelAlert {
documentation: IDHDocLevelTypes;
}
/**
* Drug Health Alert Severity Level
*/
export type IDHSeverityLevelTypes = 'Contraindicated' | 'Extreme caution' | 'Caution';
export interface IDHSeverityLevelAlert {
severity: IDHSeverityLevelTypes;
}
/**
* Drug Duplicate Alert Warning Level
*/
export type IDDWarningLevelTypes = '1' | '2' | '3';
export interface IDDWarningLevelAlert {
level: IDDWarningLevelTypes;
}
/**
* Drug Duplicate Alert Duplicate Types
*/
export type IDDDuplicateAlertTypes = 'Same Ingredient' | 'Same ATC Chemical Subgroup' | 'Same ATC Pharmacological Subgroup';
export interface IDDDuplicateAlert {
type: IDDDuplicateAlertTypes;
}