Hi John:
You know I'm using my version of SeedCode Complete as an electronic medical record (Contacts = patients; Appointments = progress notes for office visits). From the Daily view, clicking an appointment takes me to that patient's progress note for that day's appointment. I want to allow the user the option of inserting values (e.g. text in my Appt::Data or Appt::Assessment fields) from that same patient's previous visits. That way, instead of having to type "Anxiety Disorder" in the Assessment field every time, the user could simply get that frequently used text by clicking the appropriate button.
That brings me to the design part -- as I have envisioned it, I would edit that layout (MiniWindowEditAppointment) by adding a button that would run a script which goes to that patient's previous visit, gets the appropriate text, then inserts that text into the current record.
Can you help me achieve this daunting task?
Yours,
Jim Recht
Need script that will insert values from previous appt
2 posts
• Page 1 of 1
Posts: 116
Joined: Mon Sep 04, 2006 1:19 pm |
|
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am |
Hi Jim,
Sounds like you want to grab data from the patient's most recent previous appointment. You'll do this by creating a relationship that can identify this most recent previous appointment, and then use this relationship from the context of the current appointment to pull the info you need in to the current appointment. Something like Set Field [ CalDailyAppointents::Assessment ; Last ( CalDailyApptLastAppointment::Assessment ) ] So, what does the new relationship CalDailyApptLastAppointment look like? Well if you DON'T create future appointments for your patients, you can just create a new table occurrence for appointments related to CalDailyAppointents where PatientID = PatientID ApptID_kprime <> ApptID_kprime With this relationship in place, the any field from the last appointment (the most recent previous appointment) can be referenced like this: Last ( CalDailyApptLastAppointment::Assessment ) Now if you DO create future appointments for your patients, then Last() above would return the most future appointment. Probably not a good thing. In that case your relationship would need to be: PatientID = PatientID ApptDateStart_k > ApptDateStart_k (In this example, CalDailyAppointments is on the left, and CalDailyApptLastAppointment is on the right.) Hope that helps, John John Sindelar
SeedCode |
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: Google [Bot] and 3 guests