Class Diagram
Transcript: Back-end development team 09/11/2019 Class Diagram Accounts Accounts Model Django_UserManager Django_AbstractUser Django_Model Python_timezone Location MyUser + string province + bool is_doctor + bool is_patient + bool is_hospital + __str__(self) UserManager + create_superuser(self, username, email, password, **extra_fields) + MyUser user Patient + MyUser user + string social_number + __str__(self) + string gender + string phone_number + string mobile_number + string address + date date_of_birth + image picture + float wallet Hospital + MyUser user + string phone_number + __str__(self) + string address + string post_code + list<Doctor> doctors + string bio + image picture + float rate + bigInteger rate_number + Location location Doctor + MyUser user + string medical_system_number + __str__(self) + string gender + string bio + string mobile_number + string expertise + date date_of_birth + image picture + float rate + bigInteger rate_number Serializer HospitalRateSerializer HospitalCommentSerializer DoctorRateSerializer DoctorCommentSerializer Patient Hospital Doctor User User Django_HyperlinkedModelSerializer LocationSerializer PatientSerializer + InnerUserSerializer user + readOnlyField wallet + update(self, instance, validate_data) + model model + tuple fileds + int depth +validate(self, attrs) HospitalSerializer + InnerUserSerializer user + HospitalRateSerializer hospital_rates + update(self, instance, validate_data) + model model + tuple fileds + int depth +validate(self, attrs) + HospitalCommentSerializer hospital_comments + readOnlyField rate + readOnlyField rate_number + LocationSerializer location DoctorSerializer + InnerUserSerializer user + DoctorRateSerializer doctor_rates + update(self, instance, validate_data) + model model + tuple fileds + int depth +validate(self, attrs) + DoctorCommentSerializer doctor_comments + readOnlyField rate + readOnlyField rate_number InnerUserSerializer + string username + static update_user (validate_data, user) + model model + tuple fileds + static rollback_user(user, previous_info) UserSerializer + string social_number + string gender + update(self, instance, validate_data) + model model + tuple fileds +validate(self, attrs) + string phone_number + string mobile_number + string address + string medical_system_number + string expertise + string post_code + create(self, validate_data) View UserSerializer IsSameUserSuperuserOrReadOnly Django_UpdateModelMixin DoctorSerializer IsOwnerSuperuserOr ReadOnly Django_SearchFilter DjangoFilterBackend HospitalSerializer IsOwnerSuperuserOr ReadOnly Django_SearchFilter PatientSerializer IsOwnerSuperuserOr ReadOnly Patient Hospital Doctor User Django_RetrieveModelMixin Django_DestroyModelMixin Django_CreateModelMixin Django_GenericViewSet Django_ListModelMixin Python_Response Python_Response DoctorViewSet + tuple permission_class + list(self, request, *args, **kwargs) + tuple filter_backends + tuple search_fields + tuple filterset_fields + destroy(self, request, *args, **kwargs) + queryset queryset + serializer serializer_class UserViewSet + tuple permission_class + queryset queryset + serializer serializer_class HospitalViewSet + tuple permission_class + list(self, request, *args, **kwargs) + tuple filter_backends + tuple search_fields + destroy(self, request, *args, **kwargs) + queryset queryset + serializer serializer_class PatientViewSet + tuple permission_class + list(self, request, *args, **kwargs) + destroy(self, request, *args, **kwargs) + queryset queryset + serializer serializer_class Chat Chat Server Python_django Django_timezone MyUser Python_websocket Django_token Message Python_asyncio Python_json Server + dictionary<string, MyUser> users + dictionary<websocket, string> usernames + __init__(self): + dictionary<string, websocket> clients + client_handler(self, websocket, path) + login (self, websocket, token) Model Django_Model MyUser Message + int id + MyUser sender + __str__(self) + MyUser receiver + string message + DateTime date_time Serializer Django_HyperlinkedModelSerializer Message MessageSerializer + StringRelatedField sender + StringRelatedField receiver + ReadOnlyFeild message + ReadOnlyFeild date_time + Model model + tuple fileds View MessageSerializer IsNotAuthenticated DjangoFilterBackend Message Django_ModelViewSet <<decorator>> get_senders <<decorates>> {target = 'list' MessageViewSet + tuple permission_class + tuple filter_backends + tuple filterset_fields + queryset queryset + serializer serializer_class <<decorated>> + list(self, request, *args, **kwargs) Medical History Medical History Model Django_Model Medical History + int id + date date + string content + Patient patient + Doctor doctor Serializer Doctor Django_HyperlinkedModelSerializer MedicalHistory AppointmentTime Python_timezone MedicalHistorySerializer + HyperlinkedRelatedField doctor + Create(self, validated_data) + string expertise + readOnlyField date + model model + tuple fileds View MedicalHistorySerializer IsSameDoctorIsDoctorOr Map