AnsweredAssumed Answered

Script problem

Question asked by EP on Sep 18, 2013
Latest reply on Sep 18, 2013 by philmodjunk

Title

Script problem

Post

     I'm working on a solution that allows a healthcare intake department to create new cases in the database.  They track "NEW" referrals and want new referrals tagged in the system. Basically, I created a field (OfficePatients::CaseCount) to track how many cases the patient has attached to their record.  I'm attaching the script that I created to tag "new" referrals.  I imported old referrals, so part of my IF statement accounts for that by specifying that the _pkClientID must be a number lager than 244 (serial ID).  The next part of my statement specifies that OfficePatients::CaseCount field has to equal 1.  If it is equal to 1, then the OfficeCases::NewPatient field is set to "NEW", which is later viewed on a cases referral report of "NEW" patients.  I think the problem lies in having the script identify the OfficePatients::CaseCount field as 1, as it has been working reliably for a few months, but every so often a patient gets tagged incorrectly as "new" (maybe a connection issue, or the order in which the end user is entering info?).  This has me puzzled and I am wondering how I can make this script foolproof.  

     Thanks

Edit_Script__OFFICECreateNewCaseConfirmation___Score_crm_.jpg

Outcomes