Jump to content

gadol87

Newbies
  • Posts

    1
  • Joined

  • Last visited

gadol87's Achievements

Newbie

Newbie (1/14)

  • First Post
  • Conversation Starter
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

0

Reputation

  1. I am a medic at an overnight camp and am trying to create a database to track the camper's medication delivery and all their illnesses and injuries while at camp. I am trying to create a script that will automatically, when executed, create records based on a record in one layout in another layout. I want to give it a date range and time of delivery range and have it generate each event (or time when pills are delivered). I attached my script, be kind, this is my first time making a script. Thanks for any and all your help! If [ MedicationLine::Times ≠ "" and MedicationLine::StartDate ≠ "" and MedicationLine::EndDate ≠ "" and MedicationLine::StartTime ≠ "" and MedicationLine::EndTime ≠ "" ] Set Variable [ $medicationline; Value:MedicationLine::MedicationLineID ] Set Variable [ $begindate; Value:Date ( 6 ; 15 ; 2008 ) ] Set Variable [ $enddate; Value:Date ( Month ( MedicationLine::EndDate ) ; Day ( MedicationLine::EndDate ) ; Year ( MedicationLine::EndDate ) ) - $begindate ] Set Variable [ $days; Value:Date ( Month ( MedicationLine::StartDate ) ; Day ( MedicationLine::StartDate ) ; Year ( MedicationLine::StartDate ) ) - $begindate ] Set Variable [ $times; Value:MedicationLine::StartTime ] Go to Layout [ “Pill Call” (Pill Call) ] Loop Loop If [ MedicationLine::Times = $times ] New Record/Request Set Field [ Pill Call::MedicationLineFK; $medicationline ] Set Field [ Pill Call::TimeFK; $times ] Set Field [ Pill Call::DayFK; $days ] End If Set Variable [ $times; Value:MedicationLine::Times + 1 ] Exit Loop If [ If ( $enddate = $days ; $times = MedicationLine::EndTime ; $times = 10 ) ] End Loop Exit Loop If [ $enddate = $days ] Set Variable [ $days; Value:$days + 1 ] Set Variable [ $times; Value:1 ] End Loop End If pillcall_script.pdf relationship_map.pdf
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.