abjasrees commited on
Commit
b5d9ab1
·
verified ·
1 Parent(s): fa5ce11

Update hedis_engine.py

Browse files
Files changed (1) hide show
  1. hedis_engine.py +10 -0
hedis_engine.py CHANGED
@@ -4,6 +4,12 @@ from crewai import Agent, Task, Crew, Process
4
  from crewai_tools import tool
5
  from langchain_community.vectorstores import Chroma
6
 
 
 
 
 
 
 
7
  class HedisComplianceEngine:
8
  """
9
  Crew that: (1) states official HEDIS measure criteria,
@@ -14,6 +20,7 @@ class HedisComplianceEngine:
14
  self.vectordb = vectordb
15
  self.measure_code = measure_code
16
  self.measurement_year = measurement_year
 
17
 
18
  @tool("patient_chart_search")
19
  def patient_chart_search(query: str) -> str:
@@ -35,6 +42,7 @@ class HedisComplianceEngine:
35
  "Healthcare quality expert with deep knowledge of NCQA HEDIS specifications. "
36
  "Must compute concrete absolute date ranges given the measurement year."
37
  ),
 
38
  )
39
 
40
  # 2) Patient chart analyzer (RAG over embeddings)
@@ -45,6 +53,7 @@ class HedisComplianceEngine:
45
  memory=False,
46
  tools=[patient_chart_search],
47
  backstory="Specialist in retrieving structured clinical data from patient chart embeddings.",
 
48
  )
49
 
50
  # 3) Reporter who composes a clean markdown report
@@ -58,6 +67,7 @@ class HedisComplianceEngine:
58
  "Clinical documentation specialist who organizes evidence and highlights "
59
  "relevant data for quality measure analysis."
60
  ),
 
61
  )
62
 
63
  # Tasks
 
4
  from crewai_tools import tool
5
  from langchain_community.vectorstores import Chroma
6
 
7
+ from langchain_openai import ChatOpenAI
8
+
9
+
10
+
11
+
12
+
13
  class HedisComplianceEngine:
14
  """
15
  Crew that: (1) states official HEDIS measure criteria,
 
20
  self.vectordb = vectordb
21
  self.measure_code = measure_code
22
  self.measurement_year = measurement_year
23
+ self.model = ChatOpenAI(model="gpt-4o", temperature=0, max_new_tokens=10000)
24
 
25
  @tool("patient_chart_search")
26
  def patient_chart_search(query: str) -> str:
 
42
  "Healthcare quality expert with deep knowledge of NCQA HEDIS specifications. "
43
  "Must compute concrete absolute date ranges given the measurement year."
44
  ),
45
+ llm=self.model,
46
  )
47
 
48
  # 2) Patient chart analyzer (RAG over embeddings)
 
53
  memory=False,
54
  tools=[patient_chart_search],
55
  backstory="Specialist in retrieving structured clinical data from patient chart embeddings.",
56
+ llm=self.model,
57
  )
58
 
59
  # 3) Reporter who composes a clean markdown report
 
67
  "Clinical documentation specialist who organizes evidence and highlights "
68
  "relevant data for quality measure analysis."
69
  ),
70
+ llm=self.model,
71
  )
72
 
73
  # Tasks