5 Replies Latest reply on Aug 10, 2011 12:31 PM by philmodjunk

    Complex Case Calculation vs. Script

    CaitlinM

      Title

      Complex Case Calculation vs. Script

      Post

      Hello,

       

      I'm working with a set of clinical trials that have many different criteria, i.e. age ranges, disease status, type of disease, etc.

      So far I have fields set up that are patient specific:

      Patient Info:PatientID

      Patient Info:Disease

      Patient Info:Disease Status

      Patient Info:Current Age

      Patient Info:Protocol Number

       

      I then have a related table (Protocols), which have all the information about the specific protocol:

      Protocols:Protocol Number

      Protocols:Age Range

      Protocols:Patient Population (i.e. Disease Status)

      Protocols:Contact Info

      Etc.

       

      I was wondering if there was a way to create a portal showing the protocols that a patient would be eligible for, based on their disease status, current age, disease, etc. without having to use a long list of Case functions, and if a script would be easier to use.

       

      Thank you,

      Caitlin

        • 1. Re: Complex Case Calculation vs. Script
          rjlevesque

          You can setup a set of checks in a script, for example if a person must qualify for at least 4 of these protocols to be listed under that protocol set.

          There are several ways to do it that way, would like a few more details.

          • 2. Re: Complex Case Calculation vs. Script
            philmodjunk

            With a small change in one field, I don't think you need a script, nor a calculation for your portal to work.

            Change "age range" to two number fields: MinAge, MaxAge.

            Now you can set up this relationship for your portal (I'm just using the fields you explicitly identified, you'll have to add the rest.)

            patient info::Current Age > Protocols::MinAge AND
            patient info::Current Age < Protocols::MaxAge AND
            Patient info::Disease Status = Protocols::Disease Status AND
            Patient info::Disease = Protocols::Disease

            I'm making some assumptions here that may not apply to reality here. I'm assuming either just one value in Protocols for Disease Status and Disease or that these two fields are formatted as check box fields where multiple values for status and disease can be selected for the same protocol.

            Also, Current Age is almost certain to be an unstored calculation (so it can update as time progresses). This will not keep the relationship from working for this portal as fields on the "one" side of a one to many relationship can be unstored or global.

            • 3. Re: Complex Case Calculation vs. Script
              CaitlinM

              For some of the protocols, there are options of more than one disease status, and moreso, more than 1 disease, referring to:

               I'm making some assumptions here that may not apply to reality here. I'm assuming either just one value in Protocols for Disease Status and Disease or that these two fields are formatted as check box fields where multiple values for status and disease can be selected for the same protocol


              Therefore, I want to change my data (that have more than one option) to check boxes via the inspector, instead of a drop down menu?

              • 4. Re: Complex Case Calculation vs. Script
                rjlevesque

                I was thinking each subject would have to fit inside a specific criteria, which could possibly be a number range...which is why I suggested the script sets...just sounds like we need a little calculation here.

                i.e. If the patient meets a minimum of 60% of the criteria they are placed into that protocol

                @Phil - Brilliant idea you had there! Made me look at it differently...

                • 5. Re: Complex Case Calculation vs. Script
                  philmodjunk

                  Checkboxes are my preferred method for managing a list of multiple values in a field. As long as there are multiple values in this field separated by returns and the field can be indexed, this method will work.