Skip to content

Commit

Permalink
feat: Support SDoH v1 features
Browse files Browse the repository at this point in the history
  • Loading branch information
dlangst committed Nov 29, 2021
1 parent a21f37d commit 0fbffcb
Show file tree
Hide file tree
Showing 2 changed files with 124 additions and 1 deletion.
116 changes: 116 additions & 0 deletions annotator-for-clinical-data/v1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2108,6 +2108,121 @@ namespace AnnotatorForClinicalDataV1 {
diagnosis?: DiagnosisInsight;
medication?: MedicationInsight;
normality?: NormalityInsight;
tobacco?: InsightModelTobacco;
alcohol?: InsightModelAlcohol;
illicitDrug?: InsightModelIllicitDrug;
substance?: InsightModelSubstanceAbuse;
}

/** InsightModelAlcohol. */
export interface InsightModelAlcohol {
usage?: InsightModelAlcoholUsage;
useStatus?: InsightModelAlcoholUseStatus;
useQualifier?: InsightModelAlcoholUseQualifier;
exposureScore?: number;
nonPatientScore?: number;
treatmentScore?: number;
}

/** InsightModelAlcoholUsage. */
export interface InsightModelAlcoholUsage {
useScore?: number;
noneScore?: number;
unknownScore?: number;
discussedScore?: number;
}

/** InsightModelAlcoholUseQualifier. */
export interface InsightModelAlcoholUseQualifier {
lightScore?: number;
moderateScore?: number;
heavyScore?: number;
abuseScore?: number;
}

/** InsightModelAlcoholUseStatus. */
export interface InsightModelAlcoholUseStatus {
stoppedScore?: number;
neverScore?: number;
}

/** InsightModelIllicitDrug. */
export interface InsightModelIllicitDrug {
usage?: InsightModelIllicitDrugUsage;
useStatus?: InsightModelIllicitDrugUseStatus;
useQualifier?: InsightModelIllicitDrugUseQualifier;
useDimension?: InsightModelIllicitDrugUseDimension;
exposureScore?: number;
nonPatientScore?: number;
treatmentScore?: number;
}

/** InsightModelIllicitDrugUsage. */
export interface InsightModelIllicitDrugUsage {
useScore?: number;
noneScore?: number;
unknownScore?: number;
discussedScore?: number;
treatmentScore?: number;
}

/** InsightModelIllicitDrugUseDimension. */
export interface InsightModelIllicitDrugUseDimension {
abuseScore?: number;
medicalScore?: number;
}

/** InsightModelIllicitDrugUseQualifier. */
export interface InsightModelIllicitDrugUseQualifier {
lightScore?: number;
moderateScore?: number;
heavyScore?: number;
}

/** InsightModelIllicitDrugUseStatus. */
export interface InsightModelIllicitDrugUseStatus {
currentScore?: number;
stoppedScore?: number;
neverScore?: number;
complianceScore?: number;
}

/** InsightModelSubstanceAbuse. */
export interface InsightModelSubstanceAbuse {
treatmentScore?: number;
nonPatientScore?: number;
treatment?: InsightModelSubstanceAbuseTreatment;
}

/** InsightModelSubstanceAbuseTreatment. */
export interface InsightModelSubstanceAbuseTreatment {
discussedScore?: number;
complianceScore?: number;
}

/** InsightModelTobacco. */
export interface InsightModelTobacco {
usage?: InsightModelTobaccoUsage;
useStatus?: InsightModelTobaccoUseStatus;
exposureScore?: number;
familyHistoryScore?: number;
nonPatientScore?: number;
treatmentScore?: number;
}

/** InsightModelTobaccoUsage. */
export interface InsightModelTobaccoUsage {
useScore?: number;
noneScore?: number;
unknownScore?: number;
discussedScore?: number;
}

/** InsightModelTobaccoUseStatus. */
export interface InsightModelTobaccoUseStatus {
currentScore?: number;
stoppedScore?: number;
neverScore?: number;
}

/** LabValueAnnotation. */
Expand Down Expand Up @@ -2149,6 +2264,7 @@ namespace AnnotatorForClinicalDataV1 {
sectionSurfaceForm?: string;
insightModelData?: InsightModel;
temporal?: Temporal[];
disambiguationData?: Disambiguation;
}

/** MedicationInsight. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const archive = props.get('archive');
let authenticatorType = new NoAuthAuthenticator();
const disableSsl = true;
const analyzeText =
'The patient has cancer and patient is currently taking 400 ml sisplatin chemotherapy. CT scan detected tumor in left lung. Aspirin from once daily to twice daily.\nHISTORY: Patient is allergic to latex. Patient cannot walk and needs help bathing and getting around. The lab values were: white blood cell count 4.6, hemoglobin 12.2. Echocardiogram demonstrated ejection fraction of approx 60%. Patient cannot dress or feed without help as the patient can not see. Patient may die soon but has not died yet. Patient smoked for 20 years. Patient can not clean up after defacating in toilet. Jone Doe was seen at Baylor Hospitall in Austin, TX. [email protected] - (555) 555-5555. The patient started on metformin because his blood sugar was too high. She had gallbladder removal September 19 2020';
'The patient has cancer and patient is currently taking 400 ml sisplatin chemotherapy. CT scan detected tumor in left lung. Aspirin from once daily to twice daily.\nHISTORY: Patient is allergic to latex. Patient cannot walk and needs help bathing and getting around. The lab values were: white blood cell count 4.6, hemoglobin 12.2. Echocardiogram demonstrated ejection fraction of approx 60%. Patient cannot dress or feed without help as the patient can not see. Patient may die soon but has not died yet. Patient smoked for 20 years. Patient can not clean up after defacating in toilet. Jone Doe was seen at Baylor Hospitall in Austin, TX. [email protected] - (555) 555-5555. The patient started on metformin because his blood sugar was too high. She had gallbladder removal September 19 2020. CT scan showed a tumor in his left lung. Her father had lung cancer. Her other had asthma and diabetes. Past addictions history: by report, pt with history of ETOH abuse; BAL 147. Patient abuses vodka and smokes cigarettes and marijuana. Patiet attends monthly AA meetings.';

if (apikey !== 'undefined' && apikey !== null && apikey.length > 0) {
const baseOptions = {
Expand Down Expand Up @@ -307,6 +307,13 @@ describe('AnnotatorForClinicalDataAcdV1_integration', () => {
expect(attributeValue.begin).not.toBeNull();
expect(attributeValue.end).not.toBeNull();
expect(attributeValue.coveredText).not.toBeNull();
if (typeof attributeValue.insightModelData !== 'undefined') {
if (typeof attributeValue.insightModelData.illicitDrug !== 'undefined') {
expect(attributeValue.insightModelData.illicitDrug.exposureScore).not.toBeNull();
expect(attributeValue.insightModelData.illicitDrug.usage).not.toBeNull();
expect(attributeValue.insightModelData.illicitDrug.useStatus).not.toBeNull();
}
}
});
});
});
Expand Down

0 comments on commit 0fbffcb

Please sign in to comment.