540co / ads-bpa

Drug Reactions Explained (DRE) provides clear definitions to complex medical terms used to describe the adverse reactions patients have experienced when taking certain drugs (18F Agile BPA Development Prototype)
https://dre.540.co
Creative Commons Zero v1.0 Universal
12 stars 5 forks source link

Find a medical term that will test serviceManager.getDefinitionsFromDictionaryApi #246

Open jobrieniii opened 9 years ago

jobrieniii commented 9 years ago

For the 3rd pathway of code:


                    } else {

                      if (typeof v.def[0].sensb[0].sens[0].dt === "string") {

                        var definition = new Definition();
                        var dt = new Date();

                        definition.definition = v.def[0].sensb[0].sens[0].dt;
                        definition.source = 'dictionaryapi.com';
                        definition.created_at = dt.getTime();
                        definition.created_by = "";
                        definition.votes = new Votes();
                        console.log(term + ' PATH 3'); // comment temporarily added - may not be in current build
                        definitions.push(definition);

                      }

                      }

                    }

(This pathway was found during initial build - just need to recall a definition that ends up running down that pathway.)

jobrieniii commented 9 years ago

This pathway may no longer be valid in light of another bug fix that was done previously on how matching was done on definitions in XML response. This needs more investigation - and possibly this chunk of code can be removed.