Skip to content
This repository has been archived by the owner on Nov 11, 2021. It is now read-only.

Commit

Permalink
Added django project
Browse files Browse the repository at this point in the history
  • Loading branch information
rcotrina94 committed May 8, 2015
1 parent 6f33bd2 commit 4a39ea8
Show file tree
Hide file tree
Showing 22 changed files with 223 additions and 0 deletions.
49 changes: 49 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Práctica 02: Gestión de citas y diagnósticos

Un hospital funciona con un sistema de cita previa. Cada vez que un paciente pide una cita, puede solicitarla él mismo vía web, por teléfono o personalmente en el centro hospitalario. En los dos últimos casos será atendido por un administrativo, independientemente de cómo se pida la cita, el sisema le asigna un día, una hora y su médico de cabecera. Para guardar esta información se utiliza un listado con el Nnúmero de Seguridad Social (NSS) del paciente, su nombre, apellidos, teléfono para comunicarle cualquier cambio en el día, hora y número de colegiado de su médico de cabecera.

Una vez que llega a la consulta, el médico tiene un historial (datos personales, fecha de visitas, diagnóstico, o visita a otros médicos especialista) y le indica un diagnóstico con su correspondiente tratamiento. Si es enfermedad común, el paciente puede recibir el tratamiento en casa y, si no lo es, debe ir al especialista. Si le manda al especialista, se tendrá en cuenta que hay muchos especialistas, según el problema presentado, y que de nuevo se pedirá cita previa (igual para el de cabecera).
Cuando llega el día, el paciente visita el especialista y éste realiza un diagnóstico que se anota en su ficha de diagnóstico, identificando al paciente, al ´médico en general que lo envió a su consulta, el diagnóstico y el tratamiento que se le va a aplicar.

En el tratamiento pueden ser necesarias la intervención de una o varias operaciones, que serán realizadas por el médico especialista, así como radiografías, ecografías, inyecciones, etc., que van a ser realizadas, por distintas personas no médicas del hospital: ATS (Ayudante Técnico Sanitaro: practicantes, enfermer@s) , técnicos, auxiliares, etc.)

Se sabe que en el hospital los médicos van identificados por su número de colegiado y el resto del personal por su número de registro personal.


## ACTORES

- PACIENTE
- PERSONAL (ADMINISTRATIVO)
- MEDICO
* GENERAL
* ESPECIALISTA


## PROCESOS PRINCIPALES

- REGISTRAR CITA SOLICITADA POR PACIENTE
- PACIENTE ASISTE A CONSULTA


## ACTIVIDADES POR PROCESO PRINCIPAL

### REGISTRO DE CITA SOLICITADA POR PACIENTE

- PACIENTE SOLICITA CITA
- PACIENTE ======= SOLICITA CITA VIA WEB ======> SISTEMA
- PACIENTE ==== SOLICITA CITA PERSONALMENTE ===> SISTEMA

- CITA ES ASIGNADA A PACIENTE
- SISTEMA === ASIGNA CITA ==> PACIENTE

### PACIENTE ASISTE A CONSULTA

- MEDICO ATIENDE PACIENTE
- MEDICO ===== CONSULTA HISTORIAL PACIENTE ====> SISTEMA
- SISTEMA == RETORNA DATOS+HISTORIAL PACIENTE => MEDICO
- MEDICO ============== ANALIZA ===============> PACIENTE
- MEDICO ====== ACTUALIZA DATOS PACIENTE ======> SISTEMA
- MEDICO =========== DIAGNOSTICA ==============> PACIENTE
- MEDICO ====== ANOTA DIAGNOSTICO PACIENTE ====> SISTEMA

-
Empty file added src/apps/__init__.py
Empty file.
Empty file added src/apps/api/__init__.py
Empty file.
3 changes: 3 additions & 0 deletions src/apps/api/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.contrib import admin

# Register your models here.
3 changes: 3 additions & 0 deletions src/apps/api/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.db import models

# Create your models here.
3 changes: 3 additions & 0 deletions src/apps/api/tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.test import TestCase

# Create your tests here.
3 changes: 3 additions & 0 deletions src/apps/api/views.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.shortcuts import render

# Create your views here.
Empty file added src/apps/main/__init__.py
Empty file.
3 changes: 3 additions & 0 deletions src/apps/main/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.contrib import admin

# Register your models here.
3 changes: 3 additions & 0 deletions src/apps/main/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.db import models

# Create your models here.
3 changes: 3 additions & 0 deletions src/apps/main/tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.test import TestCase

# Create your tests here.
3 changes: 3 additions & 0 deletions src/apps/main/views.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.shortcuts import render

# Create your views here.
Empty file added src/apps/web/__init__.py
Empty file.
3 changes: 3 additions & 0 deletions src/apps/web/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.contrib import admin

# Register your models here.
3 changes: 3 additions & 0 deletions src/apps/web/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.db import models

# Create your models here.
3 changes: 3 additions & 0 deletions src/apps/web/tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.test import TestCase

# Create your tests here.
3 changes: 3 additions & 0 deletions src/apps/web/views.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.shortcuts import render

# Create your views here.
Empty file added src/citasalud/__init__.py
Empty file.
102 changes: 102 additions & 0 deletions src/citasalud/settings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
"""
Django settings for citasalud project.
Generated by 'django-admin startproject' using Django 1.8.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os

BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))


# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '7bi(=w#x%*#62)zx4mfl7*9p4r(543+xl-!$08-lj(loxchg*3'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = []


# Application definition

INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
)

MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.middleware.security.SecurityMiddleware',
)

ROOT_URLCONF = 'citasalud.urls'

TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]

WSGI_APPLICATION = 'citasalud.wsgi.application'


# Database
# https://docs.djangoproject.com/en/1.8/ref/settings/#databases

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}


# Internationalization
# https://docs.djangoproject.com/en/1.8/topics/i18n/

LANGUAGE_CODE = 'en-us'

TIME_ZONE = 'UTC'

USE_I18N = True

USE_L10N = True

USE_TZ = True


# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.8/howto/static-files/

STATIC_URL = '/static/'
10 changes: 10 additions & 0 deletions src/citasalud/urls.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from django.conf.urls import include, url
from django.contrib import admin

urlpatterns = [
# Examples:
# url(r'^$', 'citasalud.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),

url(r'^admin/', include(admin.site.urls)),
]
16 changes: 16 additions & 0 deletions src/citasalud/wsgi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
"""
WSGI config for citasalud project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/
"""

import os

from django.core.wsgi import get_wsgi_application

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "citasalud.settings")

application = get_wsgi_application()
10 changes: 10 additions & 0 deletions src/manage.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env python
import os
import sys

if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "citasalud.settings")

from django.core.management import execute_from_command_line

execute_from_command_line(sys.argv)

0 comments on commit 4a39ea8

Please sign in to comment.