Details

    • Type: Story
    • Status: Accepted
    • Priority: Must
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Complexity:
      Medium
    • Sprint:
      Allergies Sprint 1, Allergies Sprint 2, Allergies Sprint 3

      Description

      This API should have the following:

      interface PatientService {
      
        /** Returns the patient's allergies */
        Allergies getAllergies(Patient patient);
      
        /** Updates the patient's allergies */
        Allergies setAllergies(Patient patient, Allergies newAllergies);
      
      }
      

      When setting allergies, the API should update the allergy status of the patient object passed in as well. For example:

      // Given a patient with allergy status unknown
      assertEquals(myPatient.getAllergyStatus(), Allergies.UNKNOWN);
      Allergies allergies = patientService.getAllergies(myPatient);
      assertEquals(allergies, Allergies.UNKNOWN);
      
      // Confirm that patient has No Known Allergies
      allergies.confirmNoKnownAllergies(); // won't throw exception, because allergies unknown
      patientService.setAllergies(myPatient, allergies);
      
      // Patient object should be updated by API as well within the setAllergies method
      // so I don't end up with a Patient object that's allergy status is out of sync.
      assertEquals(myPatient.getAllergyStatus(), Allergies.NO_KNOWN_ALLERGIES);
      

        Attachments

          Activity

            People

            • Assignee:
              wyclif Wyclif Luyima
              Reporter:
              dkayiwa Daniel Kayiwa
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: