riseworksco / clinicAI

SOJO: A toolbox that makes music-therapist-patient interactions easier before, between, and after sessions.
https://www.sojoai.com
Apache License 2.0
4 stars 1 forks source link

Features/test form models to admins #27

Closed XJerrY1029 closed 7 months ago

XJerrY1029 commented 7 months ago

test forms

chenyuan99 commented 7 months ago

test results show is wrong,

see https://github.com/sojoai/Music-Therapy-API/actions/runs/8530755688/job/23369130357?pr=27

{'TherapistEmail': 'therapist@example.com', 'VITALSExistsInEPIC': <Sign.Positive: 1>, 'VITALSSingle': 'Example Vitals', 'BPExistsInEPIC': <Sign.Positive: 1>, 'BPSingle': '120/80', 'BPLocationExistsInEPIC': <Sign.Positive: 1>, 'BPLocationSingle': 'Arm', 'PatientPositionExistsInEPIC': <Sign.Positive: 1>, 'PatientPositionSingle': 'Sitting', 'HRExistsInEPIC': <Sign.Positive: 1>, 'HRSingle': '72', 'RRExistsInEPIC': <Sign.Positive: 1>, 'RRSingle': '18', 'O2ExistsInEPIC': <Sign.Positive: 1>, 'O2Single': '98%', 'PulseExistsInEPIC': <Sign.Positive: 1>, 'PulseSingle': '72', 'PulseOxLocationExistsInEPIC': <Sign.Positive: 1>, 'PulseOxLocationSingle': 'Finger'} {'TherapistEmail': 'therapist@example.com', 'VITALSExistsInEPIC': <Sign.Positive: 1>, 'VITALSSingle': 'Example Vitals', 'BPExistsInEPIC': <Sign.Positive: 1>, 'BPSingle': '120/80', 'BPLocationExistsInEPIC': <Sign.Positive: 1>, 'BPLocationSingle': 'Arm', 'PatientPositionExistsInEPIC': <Sign.Positive: 1>, 'PatientPositionSingle': 'Sitting', 'HRExistsInEPIC': <Sign.Positive: 1>, 'HRSingle': '72', 'RRExistsInEPIC': <Sign.Positive: 1>, 'RRSingle': '18', 'O2ExistsInEPIC': <Sign.Positive: 1>, 'O2Single': '98%', 'PulseExistsInEPIC': <Sign.Positive: 1>, 'PulseSingle': '72', 'PulseOxLocationExistsInEPIC': <Sign.Positive: 1>, 'PulseOxLocationSingle': 'Finger'} Traceback (most recent call last): File "/home/runner/work/Music-Therapy-API/Music-Therapy-API/assessment/test/tests_PHQ9Form.py", line 35, in test_calculate_total_score self.assertEqual(total_score, expected_score) AssertionError: 15 != 18

could you double check if it is a code issue or test issue

XJerrY1029 commented 7 months ago

I CAN RUN THE CODE ON MY PYCHARM.

PS D:\Music-Therapy-API-main (1)> python manage.py test assessment C:\anaconda3\python.exe: can't open file 'D:\Music-Therapy-API-main (1)\manage.py': [Errno 2] No such file or directory PS D:\Music-Therapy-API-main (1)> cd Music-Therapy-API-main
PS D:\Music-Therapy-API-main (1)\Music-Therapy-API-main> python manage.py test assessment Found 19 test(s). System check identified no issues (0 silenced). ........{'TherapistEmail': 'therapist@example.com', 'feature1': <Sign.Positive: 1>, 'feature1ExistsInEPIC': <Sign.Positive: 1>, 'feature1Single': 'Test Feature 1', 'feature2': <Sign.Ne gative: 2>, 'feature2ExistsInEPIC': <Sign.Negative: 2>, 'feature2Single': 'Test Feature 2', 'feature3': <Sign.Positive: 1>, 'feature3ExistsInEPIC': <Sign.Positive: 1>, 'feature3Single': 'Test Feature 3', 'feature4': <Sign.Negative: 2>, 'feature4ExistsInEPIC': <Sign.Negative: 2>, 'feature4Single': 'Test Feature 4'} .{'TherapistEmail': 'therapist@example.com', 'feature1': <Sign.Positive: 1>, 'feature1ExistsInEPIC': <Sign.Positive: 1>, 'feature1Single': 'Test Feature 1', 'feature2': <Sign.Negative: 2>, 'feature2ExistsInEPIC': <Sign.Negative: 2>, 'feature2Single': 'Test Feature 2', 'feature3': <Sign.Positive: 1>, 'feature3ExistsInEPIC': <Sign.Positive: 1>, 'feature3Single': 'Test Feature 3', 'feature4': <Sign.Negative: 2>, 'feature4ExistsInEPIC': <Sign.Negative: 2>, 'feature4Single': 'Test Feature 4'} ....{'TherapistEmail': 'therapist@example.com', 'VITALSExistsInEPIC': <Sign.Positive: 1>, 'VITALSSingle': 'Example Vitals', 'BPExistsInEPIC': <Sign.Positive: 1>, 'BPSingle': '120/80', 'BPLocationExistsInEPIC': <Sign.Positive: 1>, 'BPLocationSingle': 'Arm', 'PatientPositionExistsInEPIC': <Sign.Positive: 1>, 'PatientPositionSingle': 'Sitting', 'HRExistsInEPIC': <Sign. Positive: 1>, 'HRSingle': '72', 'RRExistsInEPIC': <Sign.Positive: 1>, 'RRSingle': '18', 'O2ExistsInEPIC': <Sign.Positive: 1>, 'O2Single': '98%', 'PulseExistsInEPIC': <Sign.Positive: 1>, 'PulseSingle': '72', 'PulseOxLocationExistsInEPIC': <Sign.Positive: 1>, 'PulseOxLocationSingle': 'Finger'} .{'TherapistEmail': 'therapist@example.com', 'VITALSExistsInEPIC': <Sign.Positive: 1>, 'VITALSSingle': 'Example Vitals', 'BPExistsInEPIC': <Sign.Positive: 1>, 'BPSingle': '120/80', 'BP LocationExistsInEPIC': <Sign.Positive: 1>, 'BPLocationSingle': 'Arm', 'PatientPositionExistsInEPIC': <Sign.Positive: 1>, 'PatientPositionSingle': 'Sitting', 'HRExistsInEPIC': <Sign.Pos itive: 1>, 'HRSingle': '72', 'RRExistsInEPIC': <Sign.Positive: 1>, 'RRSingle': '18', 'O2ExistsInEPIC': <Sign.Positive: 1>, 'O2Single': '98%', 'PulseExistsInEPIC': <Sign.Positive: 1>, 'PulseSingle': '72', 'PulseOxLocationExistsInEPIC': <Sign.Positive: 1>, 'PulseOxLocationSingle': 'Finger'} .....

Ran 19 tests in 0.049s

OK