Exemplo n.º 1
0
 def schedule_visits_for(self, date, **kwargs):
     args = {
         "te_visit_id": kwargs.get("te_visit_id", random_string()[:20]),
         "date": date,
         "status": kwargs.get("status", "m"),
         "clinic": kwargs.get("clinic", self.clinic),
         "visit_type": kwargs.get("visit_type", "arv"),
     }
     return [self.patient.visit_set.create(**args) for idx in range(0, kwargs.get("amount", 1))]
Exemplo n.º 2
0
 def schedule_visits_for(self, date, **kwargs):
     args = {
         'te_visit_id': kwargs.get('te_visit_id', random_string()[:20]),
         'date': date,
         'status': kwargs.get('status', 'm'),
         'clinic': kwargs.get('clinic', self.clinic),
         'visit_type': kwargs.get('visit_type', 'arv'),
     }
     return [self.patient.visit_set.create(**args) for idx in \
                                         range(0, kwargs.get('amount',1))]
Exemplo n.º 3
0
 def schedule_visits_for(self, date, **kwargs):
     args = {
         'te_visit_id': kwargs.get('te_visit_id',
                                   random_string()[:20]),
         'date': date,
         'status': kwargs.get('status', 'm'),
         'clinic': kwargs.get('clinic', self.clinic),
         'visit_type': kwargs.get('visit_type', 'arv'),
     }
     return [self.patient.visit_set.create(**args) for idx in \
                                         range(0, kwargs.get('amount',1))]
Exemplo n.º 4
0
 def send_one_sms(self, user, msisdn, smstext, delivery=None, expiry=None,
                     priority='standard', receipt='Y'):
     delivery = delivery or datetime.now()
     expiry = expiry or (datetime.now() + timedelta(days=1))
     return SendSMS.objects.create(
                                     user=user, 
                                     msisdn=msisdn, 
                                     smstext=smstext, 
                                     delivery=delivery, 
                                     expiry=expiry, 
                                     priority=priority, 
                                     receipt=receipt, 
                                     identifier=random_string()[:8])
Exemplo n.º 5
0
 def send_one_sms(self,
                  user,
                  msisdn,
                  smstext,
                  delivery=None,
                  expiry=None,
                  priority='standard',
                  receipt='Y'):
     delivery = delivery or datetime.now()
     expiry = expiry or (datetime.now() + timedelta(days=1))
     sms = SendSMS.objects.create(user=user,
                                  msisdn=msisdn,
                                  smstext=smstext,
                                  delivery=delivery,
                                  expiry=expiry,
                                  priority=priority,
                                  receipt=receipt,
                                  identifier=random_string()[:8])
     print sms
     return sms