@awell-health/awell-extensions 2.1.74 → 2.1.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/extensions/documo/index.js +1 -1
- package/dist/extensions/documo/index.js.map +1 -1
- package/dist/extensions/documo/webhooks/lib/extractPatientInfoFromOCR/parser.js +1 -1
- package/dist/extensions/documo/webhooks/lib/extractPatientInfoFromOCR/parser.js.map +1 -1
- package/dist/extensions/documo/webhooks/lib/extractPatientInfoFromOCR/prompt.d.ts +1 -1
- package/dist/extensions/documo/webhooks/lib/extractPatientInfoFromOCR/prompt.js +10 -6
- package/dist/extensions/documo/webhooks/lib/extractPatientInfoFromOCR/prompt.js.map +1 -1
- package/package.json +1 -1
|
@@ -8,7 +8,7 @@ exports.Documo = {
|
|
|
8
8
|
key: 'documo',
|
|
9
9
|
title: 'Documo',
|
|
10
10
|
description: 'Documo extension for Awell',
|
|
11
|
-
icon_url: 'https://res.cloudinary.com/da7x4rzl4/image/upload/
|
|
11
|
+
icon_url: 'https://res.cloudinary.com/da7x4rzl4/image/upload/v1766186926/Awell%20Extensions/documo_logo.png',
|
|
12
12
|
category: extensions_core_1.Category.DEMO,
|
|
13
13
|
author: {
|
|
14
14
|
authorType: extensions_core_1.AuthorType.AWELL,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../extensions/documo/index.ts"],"names":[],"mappings":";;;AAAA,yCAAqC;AAErC,yCAAqC;AACrC,mEAAoE;AAEvD,QAAA,MAAM,GAAc;IAC/B,GAAG,EAAE,QAAQ;IACb,KAAK,EAAE,QAAQ;IACf,WAAW,EAAE,4BAA4B;IACzC,QAAQ,EACN,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../extensions/documo/index.ts"],"names":[],"mappings":";;;AAAA,yCAAqC;AAErC,yCAAqC;AACrC,mEAAoE;AAEvD,QAAA,MAAM,GAAc;IAC/B,GAAG,EAAE,QAAQ;IACb,KAAK,EAAE,QAAQ;IACf,WAAW,EAAE,4BAA4B;IACzC,QAAQ,EACN,kGAAkG;IACpG,QAAQ,EAAE,0BAAQ,CAAC,IAAI;IACvB,MAAM,EAAE;QACN,UAAU,EAAE,4BAAU,CAAC,KAAK;KAC7B;IACD,QAAQ,EAAR,mBAAQ;IACR,OAAO,EAAE,EAAE;IACX,QAAQ,EAAR,mBAAQ;CACT,CAAA"}
|
|
@@ -26,7 +26,7 @@ exports.PatientInfoSchema = zod_1.z.object({
|
|
|
26
26
|
patient_phone: zod_1.z
|
|
27
27
|
.string()
|
|
28
28
|
.nullable()
|
|
29
|
-
.describe("Patient's phone number (
|
|
29
|
+
.describe("Patient's phone number in E.164 format (e.g. +14155551234)"),
|
|
30
30
|
insurance_name: zod_1.z
|
|
31
31
|
.string()
|
|
32
32
|
.nullable()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parser.js","sourceRoot":"","sources":["../../../../../../extensions/documo/webhooks/lib/extractPatientInfoFromOCR/parser.ts"],"names":[],"mappings":";;;AAAA,6DAAiE;AACjE,6BAAuB;AAEvB;;GAEG;AACU,QAAA,iBAAiB,GAAG,OAAC,CAAC,MAAM,CAAC;IACxC,kBAAkB,EAAE,OAAC;SAClB,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,4BAA4B,CAAC;IACzC,iBAAiB,EAAE,OAAC;SACjB,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,4BAA4B,CAAC;IACzC,iBAAiB,EAAE,OAAC;SACjB,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,kCAAkC,CAAC;IAC/C,WAAW,EAAE,OAAC;SACX,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,oCAAoC,CAAC;IACjD,aAAa,EAAE,OAAC;SACb,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"parser.js","sourceRoot":"","sources":["../../../../../../extensions/documo/webhooks/lib/extractPatientInfoFromOCR/parser.ts"],"names":[],"mappings":";;;AAAA,6DAAiE;AACjE,6BAAuB;AAEvB;;GAEG;AACU,QAAA,iBAAiB,GAAG,OAAC,CAAC,MAAM,CAAC;IACxC,kBAAkB,EAAE,OAAC;SAClB,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,4BAA4B,CAAC;IACzC,iBAAiB,EAAE,OAAC;SACjB,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,4BAA4B,CAAC;IACzC,iBAAiB,EAAE,OAAC;SACjB,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,kCAAkC,CAAC;IAC/C,WAAW,EAAE,OAAC;SACX,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,oCAAoC,CAAC;IACjD,aAAa,EAAE,OAAC;SACb,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,4DAA4D,CAAC;IACzE,cAAc,EAAE,OAAC;SACd,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,gCAAgC,CAAC;IAC7C,uBAAuB,EAAE,OAAC;SACvB,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,yBAAyB,CAAC;IACtC,sBAAsB,EAAE,OAAC;SACtB,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,yBAAyB,CAAC;IACtC,uBAAuB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,oBAAoB,CAAC;IAC7E,wBAAwB,EAAE,OAAC;SACxB,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,sCAAsC,CAAC;IACnD,gBAAgB,EAAE,OAAC;SAChB,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,GAAG,CAAC,GAAG,CAAC;SACR,QAAQ,CAAC,4CAA4C,CAAC;IACzD,gBAAgB,EAAE,OAAC;SAChB,MAAM,EAAE;SACR,QAAQ,CAAC,0CAA0C,CAAC;CACxD,CAAC,CAAA;AAIF;;GAEG;AACU,QAAA,MAAM,GAAG,uCAAsB,CAAC,aAAa,CAAC,yBAAiB,CAAC,CAAA"}
|
|
@@ -13,4 +13,4 @@ import { ChatPromptTemplate } from '@langchain/core/prompts';
|
|
|
13
13
|
* - Insurance details
|
|
14
14
|
* - Referring physician information
|
|
15
15
|
*/
|
|
16
|
-
export declare const systemPrompt: ChatPromptTemplate<import("@langchain/core/prompts").ParamsFromFString<"\nYou are an expert medical document analyst specializing in extracting patient information from OCR-processed faxed documents.\n\nYour task is to carefully analyze the provided OCR text and extract structured patient information. This text may come from various medical documents including referral forms, insurance cards, lab results, or intake forms.\n\nIMPORTANT EXTRACTION RULES:\n1. Extract ONLY information that is explicitly present in the document.\n2. Be careful to distinguish between different phone numbers:\n - The patient's phone number (mobile preferred, then home)\n - Fax numbers (DO NOT use these as patient phone)\n - Office/clinic phone numbers (DO NOT use these as patient phone)\n3. For date of birth, convert to YYYY-MM-DD format if possible.\
|
|
16
|
+
export declare const systemPrompt: ChatPromptTemplate<import("@langchain/core/prompts").ParamsFromFString<"\nYou are an expert medical document analyst specializing in extracting patient information from OCR-processed faxed documents.\n\nYour task is to carefully analyze the provided OCR text and extract structured patient information. This text may come from various medical documents including referral forms, insurance cards, lab results, or intake forms.\n\nIMPORTANT EXTRACTION RULES:\n1. Extract ONLY information that is explicitly present in the document.\n2. Be careful to distinguish between different phone numbers:\n - The patient's phone number (mobile preferred, then home)\n - Fax numbers (DO NOT use these as patient phone)\n - Office/clinic phone numbers (DO NOT use these as patient phone)\n3. For phone numbers, format in E.164 format assuming US country code (+1).\n - Example: (415) 555-1234 → +14155551234\n - Example: 415-555-1234 → +14155551234\n - Only include digits after the +1 prefix (no spaces, dashes, or parentheses)\n4. For date of birth, convert to YYYY-MM-DD format if possible.\n5. For insurance information, extract:\n - Insurance company/plan name\n - Policy/Member ID number\n - Group number (if present)\n - Policy holder name (if different from patient)\n6. For referring physician, extract their full name as shown.\n7. If information cannot be found, use null for that field.\n8. Do not guess or infer information that is not clearly stated.\n\nCONFIDENCE GUIDELINES:\n- 90-100: All fields clearly found with unambiguous values\n- 70-89: Most important fields found, some minor ambiguity\n- 50-69: Key fields found but with moderate uncertainty\n- 30-49: Limited information extracted, significant uncertainty\n- 0-29: Very little information could be reliably extracted\n\nRespond exclusively with a valid JSON object containing these keys:\n- patient_first_name: string | null (patient's first/given name)\n- patient_last_name: string | null (patient's last/family name)\n- patient_full_name: string | null (full name as written in document)\n- patient_dob: string | null (date of birth in YYYY-MM-DD format)\n- patient_phone: string | null (patient's phone in E.164 format e.g. +14155551234, prefer mobile, NEVER use fax numbers)\n- insurance_name: string | null (insurance company or plan name)\n- insurance_policy_number: string | null (policy/member ID)\n- insurance_group_number: string | null (group number if present)\n- insurance_policy_holder: string | null (policy holder name if different from patient)\n- referring_physician_name: string | null (name of referring physician/provider)\n- confidence_level: number (0-100 indicating extraction reliability)\n- extraction_notes: string (brief notes about the extraction, any challenges or ambiguities)\n\nOCR Text from Document:\n{ocrText}\n">, any>;
|
|
@@ -27,15 +27,19 @@ IMPORTANT EXTRACTION RULES:
|
|
|
27
27
|
- The patient's phone number (mobile preferred, then home)
|
|
28
28
|
- Fax numbers (DO NOT use these as patient phone)
|
|
29
29
|
- Office/clinic phone numbers (DO NOT use these as patient phone)
|
|
30
|
-
3. For
|
|
31
|
-
|
|
30
|
+
3. For phone numbers, format in E.164 format assuming US country code (+1).
|
|
31
|
+
- Example: (415) 555-1234 → +14155551234
|
|
32
|
+
- Example: 415-555-1234 → +14155551234
|
|
33
|
+
- Only include digits after the +1 prefix (no spaces, dashes, or parentheses)
|
|
34
|
+
4. For date of birth, convert to YYYY-MM-DD format if possible.
|
|
35
|
+
5. For insurance information, extract:
|
|
32
36
|
- Insurance company/plan name
|
|
33
37
|
- Policy/Member ID number
|
|
34
38
|
- Group number (if present)
|
|
35
39
|
- Policy holder name (if different from patient)
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
40
|
+
6. For referring physician, extract their full name as shown.
|
|
41
|
+
7. If information cannot be found, use null for that field.
|
|
42
|
+
8. Do not guess or infer information that is not clearly stated.
|
|
39
43
|
|
|
40
44
|
CONFIDENCE GUIDELINES:
|
|
41
45
|
- 90-100: All fields clearly found with unambiguous values
|
|
@@ -49,7 +53,7 @@ Respond exclusively with a valid JSON object containing these keys:
|
|
|
49
53
|
- patient_last_name: string | null (patient's last/family name)
|
|
50
54
|
- patient_full_name: string | null (full name as written in document)
|
|
51
55
|
- patient_dob: string | null (date of birth in YYYY-MM-DD format)
|
|
52
|
-
- patient_phone: string | null (patient's phone
|
|
56
|
+
- patient_phone: string | null (patient's phone in E.164 format e.g. +14155551234, prefer mobile, NEVER use fax numbers)
|
|
53
57
|
- insurance_name: string | null (insurance company or plan name)
|
|
54
58
|
- insurance_policy_number: string | null (policy/member ID)
|
|
55
59
|
- insurance_group_number: string | null (group number if present)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt.js","sourceRoot":"","sources":["../../../../../../extensions/documo/webhooks/lib/extractPatientInfoFromOCR/prompt.ts"],"names":[],"mappings":";;;AAAA,qDAA4D;AAE5D;;;;;;;;;;;;;GAaG;AACU,QAAA,YAAY,GAAG,4BAAkB,CAAC,YAAY,CAAC
|
|
1
|
+
{"version":3,"file":"prompt.js","sourceRoot":"","sources":["../../../../../../extensions/documo/webhooks/lib/extractPatientInfoFromOCR/prompt.ts"],"names":[],"mappings":";;;AAAA,qDAA4D;AAE5D;;;;;;;;;;;;;GAaG;AACU,QAAA,YAAY,GAAG,4BAAkB,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgD3D,CAAC,CAAA"}
|