TranscriptWriting / create_sample_transcripts.py
jmisak's picture
Upload 57 files
52d0298 verified
raw
history blame
23.6 kB
"""
Generate realistic sample transcript data for testing
Creates both HCP and Patient interview transcripts in DOCX format
"""
from docx import Document
from datetime import datetime
import os
def create_hcp_transcript_1():
"""Oncologist discussing cancer treatment and prior authorization barriers"""
doc = Document()
doc.add_heading('Interview Transcript - Oncologist #1', 0)
doc.add_paragraph(f'Date: {datetime.now().strftime("%B %d, %Y")}')
doc.add_paragraph('Interviewee Type: HCP (Oncologist)')
doc.add_paragraph('Location: Major Academic Medical Center')
doc.add_paragraph('Years in Practice: 15 years')
doc.add_paragraph('')
doc.add_heading('Interview Content', 1)
content = """
Interviewer: Thank you for taking the time to speak with us today. Can you start by telling us about your current patient population?
HCP: Sure. I primarily see patients with advanced solid tumors, mostly lung cancer and breast cancer. I probably have about 150-200 active patients at any given time. The majority are on some form of systemic therapy.
Interviewer: When you're considering treatment options for a new patient, what factors influence your prescribing decisions?
HCP: It's really a combination of things. Obviously, the tumor type and stage are critical. But honestly, in 2024, prior authorization has become one of my biggest considerations. I hate to say it, but it's true. By the time insurance approves some of these therapies, the patient's cancer has often progressed to the point where we need to consider more aggressive options. I've had patients wait 6-8 weeks for approval, and in oncology, that's an eternity.
Interviewer: Can you quantify how often prior authorization is an issue?
HCP: I'd say 8 out of 10 new prescriptions require prior auth. For novel therapies or anything off-label, it's basically 100%. The process is incredibly time-consuming for my staff too. We have two full-time people just managing prior auths.
Interviewer: How does this impact your treatment choices?
HCP: I'm embarrassed to admit this, but sometimes I'll choose a therapy that I know will get approved faster, even if it's not my first choice clinically. For example, I had a patient last month who would have been perfect for Drug X based on her biomarkers, but I prescribed Drug Y instead because I know Drug Y gets approved in 3-5 days versus 4-6 weeks for Drug X.
Interviewer: Have you noticed any competitors handling this better?
HCP: Yes, actually. Company Z launched a bridge program about six months ago where they provide medication to patients during the prior auth process. It's been a game-changer. I've switched at least 15 patients to their product line specifically because of this program. My patients can start therapy immediately, and there's no gap in care.
Interviewer: What about efficacy concerns? How do you evaluate if a treatment is working?
HCP: I typically do imaging at 6-8 weeks for solid tumors. If I'm not seeing at least stable disease or ideally some tumor shrinkage, I'll consider switching. But here's the problem - many patients don't make it to that first scan because of side effects or because they're still waiting for insurance approval to even start.
Interviewer: Tell me more about side effects and tolerability.
HCP: That's huge. Even if a drug is highly effective, if patients can't tolerate it, it doesn't matter. I've found that about 30-40% of my patients on newer immunotherapy combinations need dose reductions or delays due to immune-related adverse events. Fatigue, rash, and diarrhea are the most common issues I see. The patients who do best are those who have really good support systems at home and can come in for frequent monitoring.
Interviewer: What would help you prescribe more confidently?
HCP: Three things immediately come to mind. First, streamline the prior authorization process - maybe a universal form or faster approvals for guideline-concordant care. Second, better patient assistance programs during that authorization window. And third, more real-world evidence about which patients are likely to respond. The clinical trial populations often don't reflect my actual patient population in terms of age, comorbidities, and performance status.
Interviewer: Any other thoughts?
HCP: Just that the landscape is changing so rapidly. Five years ago, I had maybe 5-6 treatment options for advanced lung cancer. Now I have 15-20, which is amazing for patients. But it's also overwhelming. I find myself relying heavily on tumor boards and colleagues for the more complex cases. The guidelines help, but they can't cover every scenario.
"""
doc.add_paragraph(content.strip())
return doc
def create_hcp_transcript_2():
"""Cardiologist discussing heart failure medications and patient adherence"""
doc = Document()
doc.add_heading('Interview Transcript - Cardiologist #2', 0)
doc.add_paragraph(f'Date: {datetime.now().strftime("%B %d, %Y")}')
doc.add_paragraph('Interviewee Type: HCP (Cardiologist)')
doc.add_paragraph('Location: Community Hospital')
doc.add_paragraph('Years in Practice: 22 years')
doc.add_paragraph('')
doc.add_heading('Interview Content', 1)
content = """
Interviewer: Thank you for joining us. Can you describe your typical heart failure patient?
HCP: Absolutely. Most of my heart failure patients are over 65, often with multiple comorbidities - diabetes, kidney disease, hypertension. Many are on 10-15 different medications. Adherence is a constant challenge.
Interviewer: When you prescribe a new heart failure medication, what's your primary concern?
HCP: Honestly, my biggest concern is whether they'll actually take it. I can prescribe the best medication in the world, but if it costs $500 a month out of pocket, they're not filling that prescription. I've learned to ask about insurance coverage upfront. About 60% of the time, I need to adjust my prescribing based on formulary restrictions or cost concerns.
Interviewer: How do you handle patients who can't afford their medications?
HCP: I work closely with our pharmacist and social worker. We look for patient assistance programs, manufacturer coupons, or sometimes switch to older, generic alternatives. It's frustrating because the newer SGLT2 inhibitors and ARNI medications have such strong evidence for reducing hospitalizations and mortality, but they're expensive. I've had patients end up in the hospital because they couldn't afford their meds, which ultimately costs the system way more than the medication would have.
Interviewer: What percentage of your patients would you say are fully adherent to their heart failure regimen?
HCP: If I'm being honest, probably only 40-50%. And that's not just about cost. Some patients take 4-5 pills twice a day, and they get confused or overwhelmed. I had an 80-year-old patient last week who was taking her morning meds at night and vice versa. She ended up with symptomatic hypotension and fell. Simplification is key, but it's hard when every medication addresses a different aspect of heart failure.
Interviewer: Have you tried any of the newer combination pills?
HCP: Yes, the combination ARNI/ARB medications have been helpful. Instead of two separate pills, it's one. Patients respond better to that. I'd say adherence improves by maybe 20-30% when we can reduce pill burden. The problem is those combination products are often more expensive than the individual components as generics.
Interviewer: What about monitoring and follow-up?
HCP: I like to see new heart failure patients every 2-4 weeks initially until we get their regimen optimized. Then maybe every 3 months for stable patients. But getting them to come in is another challenge. Many of my patients live 30-40 miles away, they're elderly, some don't drive anymore. Telehealth has helped during COVID, but there are still limitations. I can't examine them or draw labs through a computer screen.
Interviewer: If you could change one thing about managing heart failure patients, what would it be?
HCP: Better coordination of care. These patients need their cardiologist, primary care doctor, pharmacist, sometimes nephrologist, endocrinologist. Everyone needs to be on the same page. I've had situations where the PCP changes a medication I prescribed without telling me, or the patient gets conflicting advice. A really good care coordinator or nurse navigator would be invaluable, but most practices can't afford that.
"""
doc.add_paragraph(content.strip())
return doc
def create_hcp_transcript_3():
"""Rheumatologist discussing biologic therapies and patient selection"""
doc = Document()
doc.add_heading('Interview Transcript - Rheumatologist #3', 0)
doc.add_paragraph(f'Date: {datetime.now().strftime("%B %d, %Y")}')
doc.add_paragraph('Interviewee Type: HCP (Rheumatologist)')
doc.add_paragraph('Location: Private Practice')
doc.add_paragraph('Years in Practice: 10 years')
doc.add_paragraph('')
doc.add_heading('Interview Content', 1)
content = """
Interviewer: What's your approach to prescribing biologic therapies for rheumatoid arthritis?
HCP: I typically start with conventional DMARDs like methotrexate first, per the guidelines. But if patients aren't achieving low disease activity within 3-6 months, I move to biologics. The challenge is there are now so many options - TNF inhibitors, IL-6 inhibitors, JAK inhibitors, B-cell depletion agents. The evidence shows they're all pretty comparable in terms of efficacy, so it often comes down to patient preference, insurance coverage, and safety profile.
Interviewer: How do patients respond when you recommend an injectable biologic?
HCP: It's really mixed. Some patients are terrified of needles and beg for an oral option, which is why the JAK inhibitors have been so popular. Other patients actually prefer injections because it's something they do themselves at home every week or two, versus daily pills. I'd say about 70% of my patients adapt well to self-injection with proper training.
Interviewer: What about the recent safety concerns with JAK inhibitors?
HCP: The FDA's black box warning definitely changed the conversation. I'm much more cautious now, especially in older patients with cardiovascular risk factors or history of malignancy. I probably prescribe JAK inhibitors for maybe 20-30% of patients who need a biologic, whereas two years ago it was closer to 50%. I'm doing more TNF inhibitors again, even though they're injectables.
Interviewer: How long do you typically try a biologic before deciding if it's working?
HCP: I give it a good 3-4 months. Biologics don't work overnight. I see patients back at 6 weeks, 12 weeks, then quarterly if they're stable. I'm looking for reduction in tender and swollen joint counts, improvement in inflammatory markers like CRP, and most importantly, how the patient feels functionally. Can they open jars, button shirts, work, exercise? If I'm not seeing meaningful improvement by 3-4 months, I'll switch to a different mechanism of action.
Interviewer: What percentage of your patients fail their first biologic?
HCP: About 30-40% either don't respond adequately or lose response over time. Then we're into second-line, third-line biologics. Some patients have tried 4-5 different biologics before finding one that works. It's really trial and error, which is frustrating for everyone. I wish we had better biomarkers to predict who's going to respond to what.
Interviewer: Are there any emerging therapies you're excited about?
HCP: The bispecific antibodies in development are interesting. Also, there's more focus on achieving remission rather than just low disease activity. I'm seeing more aggressive treat-to-target strategies, which I think is the right direction. The data shows that if you can get patients to true remission early, you can potentially prevent long-term joint damage.
Interviewer: What barriers do you face in getting patients to remission?
HCP: Insurance is number one. Prior authorization for biologics can take 2-4 weeks, and during that time, the disease can progress. Also, cost-sharing. Even with insurance, some patients have copays of $100-200 per month for biologics. And then there's the subset of patients who are just resistant to multiple therapies. Maybe 10-15% of my RA patients never achieve good control despite trying everything.
"""
doc.add_paragraph(content.strip())
return doc
def create_patient_transcript_1():
"""Patient with rheumatoid arthritis discussing treatment experience"""
doc = Document()
doc.add_heading('Interview Transcript - Patient #1', 0)
doc.add_paragraph(f'Date: {datetime.now().strftime("%B %d, %Y")}')
doc.add_paragraph('Interviewee Type: Patient')
doc.add_paragraph('Condition: Rheumatoid Arthritis')
doc.add_paragraph('Age: 52 years old')
doc.add_paragraph('')
doc.add_heading('Interview Content', 1)
content = """
Interviewer: Thank you for sharing your experience with us. Can you tell me when you were first diagnosed?
Patient: I was diagnosed about 4 years ago. I started noticing my hands were really stiff in the mornings, like I couldn't make a fist or hold my coffee cup. At first, I thought it was just getting older, you know? But then my knees started swelling and I couldn't walk up stairs without pain. That's when I finally went to the doctor.
Interviewer: What was your first treatment?
Patient: They started me on methotrexate pills. I took them once a week. Honestly, they made me feel terrible. I was nauseous for 2-3 days after each dose. And I didn't really feel like they were helping my joints that much. I stuck with it for about 6 months because my doctor said to give it time, but I was miserable.
Interviewer: What happened next?
Patient: My doctor recommended trying a biologic injection. I was scared at first - giving myself shots every week sounded awful. But I was desperate because I could barely type at work anymore, and I'm an accountant. I need my hands. The drug company sent a nurse to my house to teach me how to inject, which was really helpful. It took me about three months, but I started feeling so much better. The morning stiffness improved, the swelling went down. I could function again.
Interviewer: Are you still on that medication?
Patient: No, actually. It worked great for about two years, then it just stopped working. My doctor said that happens sometimes - your body builds up antibodies or something. So we switched to a different biologic, and that one seems to be working well. I've been on it for about a year now.
Interviewer: How does the arthritis impact your daily life now?
Patient: It's so much better than before, but I still have limitations. I can't open tight jar lids. I have trouble with buttons and zippers some days. I had to give up my hobby of knitting, which was really hard emotionally. I also get fatigued easily - by 3 or 4 PM, I'm just exhausted. But compared to where I was four years ago, it's night and day. I can work full time, I can play with my grandkids, I can go for walks. I'm grateful for that.
Interviewer: What about side effects from your current medication?
Patient: I get injection site reactions sometimes - redness and itching where I inject. And I've had more infections this year than usual. Just colds and sinus infections, nothing serious, but it's annoying. My doctor said the medication suppresses my immune system a bit, so I'm more susceptible. I have to be really careful about hand washing and avoiding sick people.
Interviewer: How's the cost? Does insurance cover it?
Patient: Insurance does cover most of it, thank goodness, because the list price is something like $5,000 a month. Can you imagine? I pay a $75 copay every month, which is manageable. There was one time when I changed jobs and had a gap in coverage, and the drug company had a patient assistance program that helped me bridge that month. Without insurance, I couldn't afford this medication, and I don't know what I'd do.
Interviewer: If you could change anything about your treatment, what would it be?
Patient: I wish there was a pill instead of an injection. Even after doing it for years, I still dread injection day. And I wish the medication worked all month - I feel like I get more symptoms towards the end of the month before my next dose. Also, just more consistency. Not knowing if the medication will stop working again is stressful. Will I have to keep switching medications every few years? What happens when I run out of options? Those thoughts keep me up at night sometimes.
"""
doc.add_paragraph(content.strip())
return doc
def create_patient_transcript_2():
"""Patient with heart failure discussing medication management"""
doc = Document()
doc.add_heading('Interview Transcript - Patient #2', 0)
doc.add_paragraph(f'Date: {datetime.now().strftime("%B %d, %Y")}')
doc.add_paragraph('Interviewee Type: Patient')
doc.add_paragraph('Condition: Congestive Heart Failure')
doc.add_paragraph('Age: 68 years old')
doc.add_paragraph('')
doc.add_heading('Interview Content', 1)
content = """
Interviewer: Can you describe what it's like living with heart failure?
Patient: It's challenging. Every day is different. Some days I feel pretty good - I can do light housework, go to the grocery store. Other days, I'm so short of breath just walking from my bedroom to the kitchen that I have to sit down and rest. And my ankles swell up like balloons. It's frustrating because I used to be so active. I played golf three times a week, worked in my garden. Now I'm lucky if I can water my plants without getting winded.
Interviewer: Tell me about your medications. How many are you taking?
Patient: Oh boy, let me think. I have a pill organizer with morning and evening sections. I'm taking... probably 12 or 13 different medications. There's the water pill, the blood pressure pills - I think I'm on three different ones. Then there's the heart medication, the diabetes medication, the cholesterol medication. It's a lot. Sometimes I look at that pill bottle lineup on my counter and just feel overwhelmed.
Interviewer: Do you ever have trouble remembering to take them all?
Patient: Honestly, yes. Especially the evening ones. I'll be watching TV and realize at 10 PM that I forgot my evening meds. A couple times I've taken my morning pills twice by accident because I couldn't remember if I'd already taken them. My daughter bought me this automatic pill dispenser that beeps, which has helped a lot. But I still mess up sometimes.
Interviewer: What about the cost? Is that an issue?
Patient: It's a huge issue. I'm on Medicare, but even with Part D coverage, my copays add up to about $300-400 a month. That's on my fixed income. Last year, I was supposed to start a new heart failure medication that my cardiologist was really excited about, but my share was going to be $180 a month just for that one drug. I couldn't afford it. We had to go with an older medication instead.
Interviewer: Have you ever skipped doses or stretched out medications to make them last longer?
Patient: I'm embarrassed to say yes. When I was in the Medicare donut hole last year, I started taking some of my medications every other day instead of every day to make them last. I know I wasn't supposed to, but I couldn't afford to refill them all. I ended up in the emergency room with fluid overload - they said my heart failure had gotten worse. Spent three days in the hospital. That hospital bill was way more than the medications would have cost, but in the moment, I couldn't see another option.
Interviewer: How do you feel about your doctor and the care you're receiving?
Patient: My cardiologist is wonderful. He really listens and he's patient with all my questions. I see him every three months. But I wish there was more help with the day-to-day management. Like, how much fluid should I drink? When should I call if my symptoms get worse? I have phone numbers I can call, but I always feel like I'm bothering someone. A nurse who could check in on me once a week or something would be amazing.
Interviewer: What would improve your quality of life?
Patient: Honestly, just having more energy. I want to be able to do simple things without feeling like I ran a marathon. And less swelling - my feet and ankles swell so much that I can only wear these ugly slip-on shoes. I'd love to wear my nice shoes again. Also, not worrying about money and medications would take such a weight off my shoulders. Every month I'm juggling which medications I can afford to refill on time.
Interviewer: How has heart failure affected your emotional well-being?
Patient: It's been hard. I feel like a burden to my family. My daughter has to drive me to appointments because I don't feel safe driving when I'm short of breath. I've had to give up so many activities I loved. Sometimes I feel depressed about it all. The doctor offered antidepressants, but that's just another pill to take and another copay. I'm trying to stay positive, but some days it's really hard.
"""
doc.add_paragraph(content.strip())
return doc
def main():
"""Generate all sample transcripts"""
output_dir = '/home/john/TranscriptorEnhanced/sample_data'
# Create HCP transcripts
print("Creating HCP transcripts...")
hcp1 = create_hcp_transcript_1()
hcp1.save(f'{output_dir}/HCP_Oncologist_Interview.docx')
print("βœ“ Created: HCP_Oncologist_Interview.docx")
hcp2 = create_hcp_transcript_2()
hcp2.save(f'{output_dir}/HCP_Cardiologist_Interview.docx')
print("βœ“ Created: HCP_Cardiologist_Interview.docx")
hcp3 = create_hcp_transcript_3()
hcp3.save(f'{output_dir}/HCP_Rheumatologist_Interview.docx')
print("βœ“ Created: HCP_Rheumatologist_Interview.docx")
# Create Patient transcripts
print("\nCreating Patient transcripts...")
patient1 = create_patient_transcript_1()
patient1.save(f'{output_dir}/Patient_RA_Interview.docx')
print("βœ“ Created: Patient_RA_Interview.docx")
patient2 = create_patient_transcript_2()
patient2.save(f'{output_dir}/Patient_HeartFailure_Interview.docx')
print("βœ“ Created: Patient_HeartFailure_Interview.docx")
print("\n" + "="*60)
print("Sample transcript generation complete!")
print("="*60)
print(f"\nFiles created in: {output_dir}")
print("\nHCP Transcripts (3):")
print(" - HCP_Oncologist_Interview.docx")
print(" - HCP_Cardiologist_Interview.docx")
print(" - HCP_Rheumatologist_Interview.docx")
print("\nPatient Transcripts (2):")
print(" - Patient_RA_Interview.docx")
print(" - Patient_HeartFailure_Interview.docx")
print("\nThese transcripts include:")
print(" βœ“ Realistic medical terminology")
print(" βœ“ Direct quotes and participant voice")
print(" βœ“ Specific numbers and percentages")
print(" βœ“ Business insights (prior auth, cost, adherence)")
print(" βœ“ Emotional content for high-impact quotes")
print(" βœ“ Competitive mentions")
print("\nReady for testing!")
if __name__ == "__main__":
main()