def get_claim_diagnosis_code_by_id(cls, diagnosis_id):
     code = None
     if diagnosis_id is not None:
         diagnosis = DbManagerUtils.get_object_or_none(ClaimDiagnosisCode,
                                                       pk=diagnosis_id)
         if diagnosis:
             code = diagnosis.code
     return code
 def get_imis_obj_by_fhir_reference(cls, reference, errors=None):
     imis_insuree_chf_id = cls.get_resource_id_from_reference(reference)
     return DbManagerUtils.get_object_or_none(Insuree, chf_id=imis_insuree_chf_id)
Ejemplo n.º 3
0
 def __create_superuser(self):
     User.objects.create_superuser(username=self._TEST_SUPERUSER_NAME, password=self._TEST_SUPERUSER_PASS)
     return DbManagerUtils.get_object_or_none(User, username=self._TEST_SUPERUSER_NAME)
Ejemplo n.º 4
0
 def login(self):
     user = DbManagerUtils.get_object_or_none(User, username=self._TEST_SUPERUSER_NAME)
     if user is None:
         user = self.__create_superuser()
     self.client.force_authenticate(user=user)
 def get_imis_obj_by_fhir_reference(cls, reference, errors=None):
     imis_claim_admin_uuid = cls.get_resource_id_from_reference(reference)
     return DbManagerUtils.get_object_or_none(ClaimAdmin, uuid=imis_claim_admin_uuid)
 def get_imis_obj_by_fhir_reference(cls, reference, errors=None):
     location_code = cls.get_resource_id_from_reference(reference)
     return DbManagerUtils.get_object_or_none(HealthFacility,
                                              code=location_code)
 def get_imis_obj_by_fhir_reference(cls, reference, errors=None):
     imis_claim_code = cls.get_resource_id_from_reference(reference)
     return DbManagerUtils.get_object_or_none(Claim, code=imis_claim_code)
Ejemplo n.º 8
0
 def get_imis_obj_by_fhir_reference(cls, reference, errors=None):
     imis_feedback_id = cls.get_resource_id_from_reference(reference)
     return DbManagerUtils.get_object_or_none(Feedback, pk=imis_feedback_id)