Tuesday, February 22, 2011

Finding a needle in a haystack

Implementing a fix for our bug doesn't seem like it would be to hard but first we just had to located where to implement our fix. After searching tons of .java,.js, and .jsp files. I finally came across two files that might help with shortPatientForm.jsp contained the code that deal with prefered identifiers so this was probably the best way to look.


code:
for (var x = 0; x < inputs.length; x++) {
            var input = inputs[x];
            if (input && input.name == 'identifier' && input.type == 'text') {
                input.name = 'identifiers[' + index + '].identifier';
            }
            else if (input && input.name == 'preferred' && input.type == 'radio') {
                input.name = 'identifiers[' + index + '].preferred';
                input.id = 'identifiers[' + index + '].preferred';
            }




I suppose that  a loop can be added to test if the user has not clicked the preferred check box and has more than one identifier and If the user has not clicked preferred they will not be able to add/update a patient.
    

No comments:

Post a Comment