def main():
    global_init('curae_domo')
    p = Patients()
    p.name = "Karl"
    p.address = "Berlin"
    p.phone = "00000000"
    p.care_level = "high"
    p.caretaker = "Alex"
    p.save()
Example #2
0
 def test_unique_genes_of_wilms(self):
     possible_values = Patients().get_values_of_multiple_criteria(
         criteria=[{
             'cancer_type': 'Wilms tumor'
         }, {
             'gene': ''
         }])
     self.assertEqual(3, len(possible_values))  # ['CTNNB1', 'REST', 'PAX6']
Example #3
0
 def test_unique_significance_multiple_criteria(self):
     possible_values = Patients().get_values_of_multiple_criteria(
         criteria=[{
             'gene': 'CTNNB1'
         }, {
             'significance': ''
         }])
     self.assertEqual(2, len(possible_values))  # ['pathogenic',
Example #4
0
 def test_two_criteria_and(self):
     patients_two_criteria = Patients().get_by_multiple_criteria(
         criteria=[{
             'gender': 'male'
         }, {
             'age': 30
         }], syntax='AND')
     self.assertEqual(2, len(patients_two_criteria))
Example #5
0
 def test_three_criteria_and(self):
     patients_three_criteria = Patients().get_by_multiple_criteria(
         criteria=[{
             'gender': 'male'
         }, {
             'age': 30
         }, {
             'variant_type': 'SNV'
         }],
         syntax='AND')
     self.assertEqual(1, len(patients_three_criteria))
 def package_count(cls):
     return Patients.objects().count()
    def popular_packages(cls, limit: int) -> List[Patients]:
        packages = Patients.objects()\
            .order_by('name')\
            .limit(limit)

        return list(packages)
 def find_package_by_name(cls, name):
     package = Patients.objects(name=name).first()
     return package
Example #9
0
 def __init__(self):
     #also adding dummy data
     doctor = Doctor("Turnip Cow", "christine lu", "nina chen")
     patient1 = Patients("Nina Chen", "Male", "*****@*****.**", "SWAG")
     patient2 = Patients("Christine Lu", "Female", "*****@*****.**",
                         "COOL")
     patient1.add_medication("Weed")
     patient1.add_task("Run 100km")
     patient2.add_medication("Cigs")
     patient2.add_task("Run 100km")
     patient1.add_appointment(
         Appointment("05/05/2020", "panadol", "just a mild fever"))
     doctor.add_patients(patient1)
     doctor.add_patients(patient2)
     self.users = [doctor]
Example #10
0
 def test_all_unique_significance(self):
     possible_values = Patients().get_values_of_criterion(
         criterion={'significance': ''})
     self.assertEqual(5, len(possible_values))  # ['pathogenic',
Example #11
0
 def test_all_unique_genes(self):
     possible_values = Patients().get_values_of_criterion(
         criterion={'gene': ''})
     self.assertEqual(8, len(possible_values))  # ['CTNNB1', 'REST', 'PAX6',
Example #12
0
 def test_patient_age_number(self):
     patient_30_years = Patients().get_by_criterion(criterion={'age': 30})
     self.assertEqual(3, len(patient_30_years))
Example #13
0
 def test_patient_male_number(self):
     males = Patients().get_by_criterion(criterion={'gender': 'male'})
     self.assertEqual(6, len(males))
Example #14
0
 def test_patient_female_number(self):
     females = Patients().get_by_criterion(criterion={'gender': 'female'})
     self.assertEqual(4, len(females))
Example #15
0
 def test_patient_ids(self):
     patients = Patients().get_all_data()
     ids = [patient['id'] for patient in patients]
     self.assertEqual(list(range(10)), ids)
Example #16
0
 def test_number_of_patients(self):
     patients = Patients().get_all_data()
     self.assertEqual(len(patients), 10)