Beispiel #1
0
def get_reference_apps(request):
    if request.method == 'GET':
        from .ui import ui as UI
        apps = UI.get_module('ReferenceApp')
        data = {'success': True,'apps': [app._meta.app_label.replace('_',' ').upper() for app in apps]}
        jsondata = json.dumps(data)
        app_objs = [{'app_url': app.get_pane_url(),
                     'app_name':app._meta.app_label.replace('_',' ').upper()
                    } 
                    for app in apps]
        variable = RequestContext(request,
                                   {'user': request.user,
                                    #'apps': [app._meta.app_label.replace('_',' ').upper() for app in apps],
                                    'app_objs': app_objs
                                   })

        return render_to_response('header_pane/reference_apps.html', variable)
        #print("Reference Apps are: ")
        #print(apps)
        #return HttpResponse(jsondata,content_type='application/json')
    else:
        raise Http404("Bad Request Method")
Beispiel #2
0
from cStringIO import StringIO
import yaml

# General Django Imports----------------------------------
from django.http import Http404, HttpResponse
from django.utils import simplejson
from django.core.urlresolvers import reverse
from django.template import Template, Context, RequestContext
from django.contrib.auth.decorators import login_required

from AuShadha.core.views.dijit_tree import DijitTreeNode, DijitTree
from AuShadha.apps.ui.ui import ui as UI

#from patient.models import PatientDetail
#from visit.visit.models import VisitDetail, VisitFollowUp
PatientDetail = UI.get_module("PatientRegistration")
VisitDetail = UI.get_module("OPD_Visit")
VisitFollowUp = UI.get_module("OPD_Visit_Followup")
from visit.visit import MODULE_LABEL





@login_required
def render_visit_pane(request, patient_id = None):
  
  user = request.user
  
  if request.method == 'GET' and request.is_ajax():
Beispiel #3
0
#from django.core.serializers import json
#from django.core.serializers.json import DjangoJSONEncoder



# Application Specific Model Imports-----------------------
import AuShadha.settings as settings
from AuShadha.settings import APP_ROOT_URL
from AuShadha.core.serializers.data_grid import generate_json_for_datagrid
from AuShadha.apps.ui.ui import ui as UI
from AuShadha.apps.ui.data.json import ModelInstanceJson

from registry.inv_and_imaging.models import LabInvestigationRegistry, ImagingInvestigationRegistry


PatientDetail = UI.get_module("PatientRegistration")

Demographics = UI.get_module("Demographics")
Contact = UI.get_module("Contact")
Phone = UI.get_module("Phone")
Guardian = UI.get_module("Guardian")
EmailAndFax = UI.get_module("EmailAndFax")

SocialHistory  = UI.get_module("SocialHistory")
FamilyHistory = UI.get_module("FamilyHistory")
MedicalHistory = UI.get_module("MedicalHistory")
SurgicalHistory = UI.get_module("SurgicalHistory")

MedicationList = UI.get_module("MedicationList")
Allergy = UI.get_module("AllergyList")
Beispiel #4
0
from django.http import Http404, HttpResponse, HttpResponseRedirect
from django.template import RequestContext
from django.contrib.auth.models import User
import json
from django.core.urlresolvers import reverse
from django.contrib.auth.decorators import login_required

# Application Specific Model Imports-----------------------
import AuShadha.settings as settings
from AuShadha.settings import APP_ROOT_URL
from AuShadha.apps.ui.ui import ui as UI
from AuShadha.core.serializers.data_grid import generate_json_for_datagrid
from AuShadha.utilities.forms import aumodelformerrorformatter_factory

#from patient.models import PatientDetail
PatientDetail = UI.get_module("PatientRegistration")
from .models import Contact, ContactForm



# Views start here -----------------------------------------

@login_required
def contact_json(request, patient_id = None):
    try:
      if patient_id:
        patient_id = int(patient_id)
      else:
        patient_id = int(request.GET.get('patient_id'))
      patient_detail_obj = PatientDetail.objects.get(pk=patient_id)
      contact_obj = Contact.objects.filter(patient_detail=patient_detail_obj)
Beispiel #5
0
from cStringIO import StringIO

# General Django Imports----------------------------------
from django.http import Http404, HttpResponse
from django.utils import simplejson
from django.core.urlresolvers import reverse
from django.template import Template, Context
from django.contrib.auth.decorators import login_required
from django.template import RequestContext

from AuShadha.apps.ui.ui import ui as UI

from patient import MODULE_LABEL
#from patient.models import PatientDetail

PatientDetail = UI.get_module('PatientRegistration')



@login_required
def render_medical_history_pane(request, patient_id = None):
  
  user = request.user
  
  if request.method == 'GET' and request.is_ajax():

    try:

      if patient_id:
        patient_id = int(patient_id)
      else:
Beispiel #6
0
import cStringIO as StringIO
from collections import OrderedDict
import importlib

# Application Specific Model Imports-----------------------
from AuShadha.utilities.forms import AuModelFormErrorFormatter, aumodelformerrorformatter_factory
from AuShadha.apps.ui.data.json import ModelInstanceJson
from AuShadha.apps.aushadha_users.models import AuShadhaUser
from AuShadha.apps.clinic.models import Clinic, Staff
from AuShadha.apps.ui.ui import ui as UI

from registry.inv_and_imaging.models import LabInvestigationRegistry, ImagingInvestigationRegistry

#from patient.models import PatientDetail
#from admission.models import AdmissionDetail
PatientDetail = UI.get_module('PatientRegistration')
AdmissionDetail = UI.get_module('Admission')
VisitDetail = UI.get_module('OPD_Visit')

from .models import VisitROS, VisitROSForm

ROS_FIELDS = [
    'const_symp', 'eye_symp', 'ent_symp', 'cvs_symp', 'resp_symp', 'gi_symp',
    'gu_symp', 'ms_symp', 'integ_symp', 'neuro_symp', 'psych_symp',
    'endocr_symp', 'immuno_symp', 'hemat_symp'
]

# views start here;;


@login_required
Beispiel #7
0
# import xhtml2pdf.pisa as pisa
import cStringIO as StringIO
from collections import OrderedDict
import importlib

# Application Specific Model Imports-----------------------
from AuShadha.utilities.forms import AuModelFormErrorFormatter, aumodelformerrorformatter_factory
from AuShadha.apps.ui.data.json import ModelInstanceJson
from AuShadha.apps.aushadha_users.models import AuShadhaUser
from AuShadha.apps.clinic.models import Clinic, Staff
from AuShadha.apps.ui.ui import ui as UI

# from AuShadha.apps.clinic.models import Clinic
from registry.inv_and_imaging.models import LabInvestigationRegistry, ImagingInvestigationRegistry

PatientDetail = UI.get_module("PatientRegistration")
AdmissionDetail = UI.get_module("Admission")
# from patient.models import PatientDetail
# from admission.models import AdmissionDetail

from .models import VisitDetail, VisitDetailForm
from dijit_widgets.tree import VisitTree

VisitComplaint = UI.get_module("OPD_VisitComplaints")
VisitHPI = UI.get_module("OPD_VisitHPI")
VisitROS = UI.get_module("OPD_VisitROS")

VitalExam = UI.get_module("OPD_Visit_VitalExam")
GenExam = UI.get_module("OPD_Visit_GenExam")
SysExam = UI.get_module("OPD_Visit_SysExam")
MusculoSkeletalExam = UI.get_module("OPD_Visit_MusculoSkeletalExam")
Beispiel #8
0
import cStringIO as StringIO
from collections import OrderedDict
import importlib

# Application Specific Model Imports-----------------------
from AuShadha.utilities.forms import AuModelFormErrorFormatter, aumodelformerrorformatter_factory
from AuShadha.apps.ui.data.json import ModelInstanceJson
from AuShadha.apps.aushadha_users.models import AuShadhaUser
from AuShadha.apps.clinic.models import Clinic, Staff
from AuShadha.apps.ui.ui import ui as UI

from registry.inv_and_imaging.models import LabInvestigationRegistry, ImagingInvestigationRegistry

#from patient.models import PatientDetail
#from admission.models import AdmissionDetail
PatientDetail = UI.get_module('PatientRegistration')
AdmissionDetail = UI.get_module('Admission')
VisitDetail = UI.get_module('OPD_Visit')

from .models import VisitROS, VisitROSForm

ROS_FIELDS = [ 'const_symp',
               'eye_symp',
               'ent_symp',
               'cvs_symp',
               'resp_symp',
               'gi_symp',
               'gu_symp',
               'ms_symp',
               'integ_symp',
               'neuro_symp',
Beispiel #9
0

# Django Specific Imports
from django.db import models
from django.forms import ModelForm, ModelChoiceField, Textarea, TextInput

# Application model imports
from AuShadha.apps.ui.ui import ui as UI
from AuShadha.apps.aushadha_base_models.models import AuShadhaBaseModel,AuShadhaBaseModelForm
from AuShadha.apps.clinic.models import Clinic, Staff

from registry.inv_and_imaging.models import ImagingInvestigationRegistry, LabInvestigationRegistry
#from patient.models import PatientDetail
#from admission.models import AdmissionDetail

PatientDetail = UI.get_module("PatientRegistration")
#AdmissionDetail = UI.get_module("Admission")
VisitComplaint = UI.get_module('OPD_Visit_Complaint')

from dijit_fields_constants import VISIT_DETAIL_FORM_CONSTANTS

DEFAULT_VISIT_DETAIL_FORM_EXCLUDES = ('patient_detail','op_surgeon')


CONSULT_NATURE_CHOICES = (
    ('initial', 'Initial'),
    ('fu', 'Follow-Up'),
    ('emer', 'Emergency'),
)

Beispiel #10
0
from django.core.urlresolvers import reverse
from django.contrib.auth.decorators import login_required


# Application Specific Model Imports-----------------------
import AuShadha.settings as settings
from AuShadha.settings import APP_ROOT_URL
from AuShadha.core.serializers.data_grid import generate_json_for_datagrid
from AuShadha.utilities.forms import aumodelformerrorformatter_factory
from AuShadha.apps.ui.ui import ui as UI

#from patient.models import PatientDetail

from history.medical_history.models import MedicalHistory, MedicalHistoryForm

PatientDetail = UI.get_module('PatientRegistration')





# Views start here -----------------------------------------
@login_required
def medical_history_json(request, patient_id = None):
    try:
      if patient_id:
        patient_id  = int(patient_id)
      else:
        action = unicode(request.GET.get('action'))
        patient_id = int(request.GET.get('patient_id'))
Beispiel #11
0
from cStringIO import StringIO
import yaml

# General Django Imports----------------------------------
from django.http import Http404, HttpResponse
import json
from django.core.urlresolvers import reverse
from django.template import Template, Context, RequestContext
from django.contrib.auth.decorators import login_required

from AuShadha.core.views.dijit_tree import DijitTreeNode, DijitTree
from AuShadha.apps.ui.ui import ui as UI

#from patient.models import PatientDetail
#from visit.visit.models import VisitDetail, VisitFollowUp
PatientDetail = UI.get_module("PatientRegistration")
VisitDetail = UI.get_module("OPD_Visit")
VisitFollowUp = UI.get_module("OPD_Visit_Followup")
from visit.visit import MODULE_LABEL


@login_required
def render_visit_pane(request, patient_id=None):

    user = request.user

    if request.method == 'GET' and request.is_ajax():

        try:

            if patient_id:
Beispiel #12
0

# Django Specific Imports
from django.db import models
from django.forms import ModelForm, ModelChoiceField, Textarea, TextInput

# Application model imports
from AuShadha.apps.ui.ui import ui as UI
from AuShadha.apps.aushadha_base_models.models import AuShadhaBaseModel,AuShadhaBaseModelForm
from AuShadha.apps.clinic.models import Clinic, Staff

from registry.inv_and_imaging.models import ImagingInvestigationRegistry, LabInvestigationRegistry
#from patient.models import PatientDetail
#from admission.models import AdmissionDetail

PatientDetail = UI.get_module("PatientRegistration")
AdmissionDetail = UI.get_module("Admission")


from dijit_fields_constants import VISIT_DETAIL_FORM_CONSTANTS,\
                                   VISIT_COMPLAINTS_FORM_CONSTANTS,\
                                   VISIT_HPI_FORM_CONSTANTS,\
                                   VISIT_PAST_HISTORY_FORM_CONSTANTS,\
                                   VISIT_IMAGING_FORM_CONSTANTS,\
                                   VISIT_INVESTIGATION_FORM_CONSTANTS,\
                                   VISIT_ROS_FORM_CONSTANTS,\
                                   VISIT_FOLLOW_UP_FORM_CONSTANTS,\
                                   VISIT_SOAP_FORM_CONSTANTS

DEFAULT_VISIT_DETAIL_FORM_EXCLUDES = ('patient_detail',)
Beispiel #13
0
#import ho.pisa                      as pisa
#import xhtml2pdf.pisa as pisa
import cStringIO as StringIO
from collections import OrderedDict
import importlib

# Application Specific Model Imports-----------------------
from AuShadha.utilities.forms import AuModelFormErrorFormatter, aumodelformerrorformatter_factory
from AuShadha.apps.ui.data.json import ModelInstanceJson
from AuShadha.apps.aushadha_users.models import AuShadhaUser
from AuShadha.apps.clinic.models import Clinic, Staff
from AuShadha.apps.ui.ui import ui as UI
#from AuShadha.apps.clinic.models import Clinic
from registry.inv_and_imaging.models import LabInvestigationRegistry, ImagingInvestigationRegistry

PatientDetail = UI.get_module('PatientRegistration')
AdmissionDetail = UI.get_module('Admission')
#from patient.models import PatientDetail
#from admission.models import AdmissionDetail

from .models import VisitDetail, VisitDetailForm
from dijit_widgets.tree import VisitTree

VisitComplaint = UI.get_module("OPD_VisitComplaints")
VisitHPI = UI.get_module("OPD_VisitHPI")
VisitROS = UI.get_module("OPD_VisitROS")

VitalExam = UI.get_module("OPD_Visit_VitalExam")
GenExam = UI.get_module("OPD_Visit_GenExam")
SysExam = UI.get_module("OPD_Visit_SysExam")
MusculoSkeletalExam = UI.get_module("OPD_Visit_MusculoSkeletalExam")
Beispiel #14
0
from datetime import datetime, date, time
#import xhtml2pdf.pisa as pisa
import cStringIO as StringIO
from collections import OrderedDict
import importlib

# Application Specific Model Imports-----------------------
from AuShadha.utilities.forms import AuModelFormErrorFormatter, aumodelformerrorformatter_factory
from AuShadha.apps.ui.data.json import ModelInstanceJson
from AuShadha.apps.aushadha_users.models import AuShadhaUser
from AuShadha.apps.clinic.models import Clinic, Staff
from AuShadha.apps.ui.ui import ui as UI

from registry.inv_and_imaging.models import LabInvestigationRegistry, ImagingInvestigationRegistry

PatientDetail = UI.get_module("PatientRegistration")
VisitDetail  = UI.get_module("OPD_Visit")
MedicalHistory = UI.get_module("MedicalHistory")

from .models import VisitComplaint


def check_duplicates(complaint_to_check, visit_obj):

    all_complaints = lambda :[x.complaint for x in VisitComplaint.objects.filter(visit_detail =visit_obj) if x]
    if complaint_to_check.complaint not in all_complaints(): 
        return True
    return False
       

@login_required
Beispiel #15
0
# Application Specific Model Imports-----------------------
import AuShadha.settings as settings
from AuShadha.settings import APP_ROOT_URL
from AuShadha.core.serializers.data_grid import generate_json_for_datagrid
from AuShadha.core.views.dijit_tree import DijitTreeNode, DijitTree
from AuShadha.apps.ui.data.json import ModelInstanceJson
from AuShadha.apps.ui.data.summary import ModelInstanceSummary
from AuShadha.utilities.forms import aumodelformerrorformatter_factory
from AuShadha.apps.clinic.models import Clinic
from AuShadha.apps.ui.ui import ui as UI

from .models import VisitPrescription, VisitPrescriptionForm 
from dijit_widgets.tree import VisitPrescriptionTree

VisitDetail = UI.get_module('OPD_Visit')


# Views start here -----------------------------------------


@login_required
def visit_prescription_list(request, visit_detail_id = None):
   """ lists the prescriptions for a visit """

   try:
        if visit_detail_id: 
            visit_detail_id = int(visit_detail_id)
        else:
            try:
                visit_detail_id = int( request.GET.get('visit_detail_id') )
Beispiel #16
0
from datetime import datetime, date, time
##import xhtml2pdf.pisa as pisa
#import cStringIO as StringIO
#from collections import OrderedDict
#import importlib

# Application Specific Model Imports-----------------------
from AuShadha.utilities.forms import AuModelFormErrorFormatter, aumodelformerrorformatter_factory
from AuShadha.apps.ui.data.json import ModelInstanceJson
from AuShadha.apps.ui.ui import ui as UI

#from AuShadha.apps.aushadha_users.models import AuShadhaUser
#from AuShadha.apps.clinic.models import Clinic, Staff
#from registry.inv_and_imaging.models import LabInvestigationRegistry, ImagingInvestigationRegistry

PatientDetail = UI.get_module("PatientRegistration")
VisitDetail  = UI.get_module("OPD_Visit")

from .models import VisitROS

ROS_FIELDS = [ 'const_symp',
               'eye_symp',
               'ent_symp',
               'cvs_symp',
               'resp_symp',
               'gi_symp',
               'gu_symp',
               'ms_symp',
               'integ_symp',
               'neuro_symp',
               'psych_symp',
Beispiel #17
0
from AuShadha.settings import APP_ROOT_URL
from AuShadha.core.serializers.data_grid import generate_json_for_datagrid
from AuShadha.core.views.dijit_tree import DijitTreeNode, DijitTree
from AuShadha.apps.ui.data.json import ModelInstanceJson
from AuShadha.apps.ui.data.summary import ModelInstanceSummary
from AuShadha.utilities.forms import aumodelformerrorformatter_factory
from AuShadha.apps.clinic.models import Clinic
from AuShadha.apps.ui.ui import ui as UI


######################## Import Models using UI.get_module() ###################

from .models import PatientDetail, PatientDetailForm
from dijit_widgets.tree import PatientTree

Demographics = UI.get_module('Demographics')
Contact = UI.get_module('Contact')
Phone = UI.get_module('Phone')
Guardian = UI.get_module('Guardian')
EmailAndFax = UI.get_module('EmailAndFax')

MedicalHistory = UI.get_module('MedicalHistory')
SurgicalHistory = UI.get_module('SurgicalHistory')
SocialHistory = UI.get_module('SocialHistory')
FamilyHistory = UI.get_module('FamilyHistory')
Immunisation = UI.get_module('Immunisation')

Allergy = UI.get_module('AllergyList')
MedicationList = UI.get_module("MedicationList")

AdmissionDetail = UI.get_module("Admission")
Beispiel #18
0
from django.http import Http404, HttpResponse
from django.utils import simplejson
from django.core.urlresolvers import reverse
from django.template import RequestContext
from django.template import Template, Context
from django.contrib.auth.decorators import login_required

from AuShadha.apps.ui.ui import ui as UI
#from patient.models import PatientDetail
#from demographics.demographics.models import Demographics
#from demographics.contact.models import Contact
#from demographics.phone.models import Phone
#from demographics.guardian.models import Guardian
from aushadha_demographics_us import MODULE_LABEL

PatientDetail = UI.get_module("PatientRegistration")
Demographics = UI.get_module("Demographics")
Contact = UI.get_module("Contact")
Phone = UI.get_module("Phone")
Guardian = UI.get_module("Guardian")


@login_required
def render_demographics_pane(request, patient_id=None):

    user = request.user

    if request.method == 'GET' and request.is_ajax():

        try:
Beispiel #19
0
# Application specific django imports::
from AuShadha.apps.ui.ui import ui as UI
from AuShadha.apps.aushadha_base_models.models import AuShadhaBaseModel,AuShadhaBaseModelForm
#from AuShadha.apps.aushadha_users.models import AuShadhaUser
#from AuShadha.apps.clinic.models import Clinic, Staff

#from physician.models import *
#from patient.models import PatientDetail
#from admission.models import AdmissionDetail
#from visit.models import VisitDetail

#PatientDetail  = UI.get_module("PatientRegistration")
#AdmissionDetail = UI.get_module("Admission")

VisitDetail = UI.get_module("OPD_Visit")


# Imports the needed Constants
from .phyexam_constants import *
from .phy_exam_constants import PC
from presentation_classes import vitalexamobjpresentationclass_factory,\
                                 genexamobjpresentationclass_factory,\
                                 sysexamobjpresentationclass_factory,\
                                 musexamobjpresentationclass_factory,\
                                 neuroexamobjpresentationclass_factory,\
                                 vascexamobjpresentationclass_factory,\
                                 vascexamobjpresentationclass_querysetfactory

from dijit_fields_constants import VITAL_FORM_CONSTANTS, \
                                    GEN_EXAM_FORM_CONSTANTS, \
Beispiel #20
0
from django.http import Http404, HttpResponse
import json
from django.core.urlresolvers import reverse
from django.template import RequestContext
from django.template import Template, Context
from django.contrib.auth.decorators import login_required

from AuShadha.apps.ui.ui import ui as UI
#from patient.models import PatientDetail
#from demographics.demographics.models import Demographics
#from demographics.contact.models import Contact
#from demographics.phone.models import Phone
#from demographics.guardian.models import Guardian
from demographics import MODULE_LABEL

PatientDetail = UI.get_module("PatientRegistration")
Demographics  = UI.get_module("Demographics")
Contact = UI.get_module("Contact")
Phone = UI.get_module("Phone")
Guardian = UI.get_module("Guardian")




@login_required
def render_demographics_pane(request, patient_id = None):
  
  user = request.user
  
  if request.method == 'GET' and request.is_ajax():
Beispiel #21
0
import datetime
import yaml

from django.db import models
from django.contrib.auth.models import User

from AuShadha.apps.aushadha_base_models.models import AuShadhaBaseModel, AuShadhaBaseModelForm
from AuShadha.settings import APP_ROOT_URL
from AuShadha.apps.ui.ui import ui as UI
from AuShadha.apps.clinic.models import Clinic, Staff

from .dijit_fields_constants import VISIT_PRESCRIPTION_FORM_CONSTANTS

DEFAULT_VISIT_PRESCRIPTION_FORM_EXCLUDES = ('visit_detail', )

VisitDetail = UI.get_module("OPD_Visit")

# Put all Models and ModelForms below this

ROUTE_CHOICES = (
    ('oral', "Oral"),
    ('sub_lingual', "Sub-Lingual"),
    ('intra_nasal', "Intra Nasal"),
    ('into_the_eye', "Into the Eye"),
    ('into_the_ear', "Into the Ear"),
    ('per_rectal', "Per Rectal"),
    ('per_vaginal', "Per Vaginal"),
    ('topical_application', "Topical Application"),
    ('intra_oral_application', "Intra Oral Application"),
    ('gargle', "Gargle"),
    ('sub_cutaneous', "Sub-Cutaneous"),
Beispiel #22
0

# Django Specific Imports
from django.db import models
from django.forms import ModelForm, ModelChoiceField, Textarea, TextInput

# Application model imports
from AuShadha.apps.ui.ui import ui as UI
from AuShadha.apps.aushadha_base_models.models import AuShadhaBaseModel,AuShadhaBaseModelForm
from AuShadha.apps.clinic.models import Clinic, Staff

from registry.inv_and_imaging.models import ImagingInvestigationRegistry, LabInvestigationRegistry
#from patient.models import PatientDetail
#from admission.models import AdmissionDetail

PatientDetail = UI.get_module("PatientRegistration")
AdmissionDetail = UI.get_module("Admission")
VisitComplaint = UI.get_module('OPD_Visit_Complaint')

from dijit_fields_constants import VISIT_DETAIL_FORM_CONSTANTS

DEFAULT_VISIT_DETAIL_FORM_EXCLUDES = ('patient_detail',)


CONSULT_NATURE_CHOICES = (
    ('initial', 'Initial'),
    ('fu', 'Follow-Up'),
    ('emer', 'Emergency'),
)

Beispiel #23
0
from AuShadha.settings import APP_ROOT_URL
from AuShadha.core.serializers.data_grid import generate_json_for_datagrid
from AuShadha.core.views.dijit_tree import DijitTreeNode, DijitTree
from AuShadha.apps.ui.data.json import ModelInstanceJson
from AuShadha.apps.ui.data.summary import ModelInstanceSummary
from AuShadha.utilities.forms import aumodelformerrorformatter_factory
from AuShadha.apps.clinic.models import Clinic
from AuShadha.apps.ui.ui import ui as UI


######################## Import Models using UI.get_module() ###################

from .models import PatientDetail, PatientDetailForm
from dijit_widgets.tree import PatientTree

Demographics = UI.get_module("Demographics")
Contact = UI.get_module("Contact")
Phone = UI.get_module("Phone")
Guardian = UI.get_module("Guardian")
EmailAndFax = UI.get_module("EmailAndFax")

MedicalHistory = UI.get_module("MedicalHistory")
SurgicalHistory = UI.get_module("SurgicalHistory")
SocialHistory = UI.get_module("SocialHistory")
FamilyHistory = UI.get_module("FamilyHistory")
Immunisation = UI.get_module("Immunisation")

Allergy = UI.get_module("AllergyList")
MedicationList = UI.get_module("MedicationList")

AdmissionDetail = UI.get_module("Admission")
Beispiel #24
0
from AuShadha.settings import APP_ROOT_URL
from AuShadha.core.serializers.data_grid import generate_json_for_datagrid
from AuShadha.core.views.dijit_tree import DijitTreeNode, DijitTree
from AuShadha.apps.ui.data.json import ModelInstanceJson
from AuShadha.apps.ui.data.summary import ModelInstanceSummary
from AuShadha.utilities.forms import aumodelformerrorformatter_factory
from AuShadha.apps.clinic.models import Clinic
from AuShadha.apps.ui.ui import ui as UI


######################## Import Models using UI.get_module() ###################

from .models import PatientDetail, PatientDetailForm
from dijit_widgets.tree import PatientTree

Demographics = UI.get_module('Demographics')
Contact = UI.get_module('Contact')
Phone = UI.get_module('Phone')
Guardian = UI.get_module('Guardian')
EmailAndFax = UI.get_module('EmailAndFax')

MedicalHistory = UI.get_module('MedicalHistory')
SurgicalHistory = UI.get_module('SurgicalHistory')
SocialHistory = UI.get_module('SocialHistory')
FamilyHistory = UI.get_module('FamilyHistory')
Immunisation = UI.get_module('Immunisation')

Allergy = UI.get_module('AllergyList')
MedicationList = UI.get_module("MedicationList")

AdmissionDetail = UI.get_module("Admission")
Beispiel #25
0
from django.contrib.auth.models import User
import json
from django.core.urlresolvers import reverse
from django.contrib.auth.decorators import login_required

# Application Specific Model Imports-----------------------
import AuShadha.settings as settings
from AuShadha.settings import APP_ROOT_URL
from AuShadha.core.serializers.data_grid import generate_json_for_datagrid
from AuShadha.utilities.forms import aumodelformerrorformatter_factory
from AuShadha.apps.ui.ui import ui as UI

#from patient.models import PatientDetail
from history.surgical_history.models import SurgicalHistory, SurgicalHistoryForm

PatientDetail = UI.get_module("PatientRegistration")


# Views start here -----------------------------------------
@login_required
def surgical_history_json(request, patient_id=None):
    try:
        if patient_id:
            patient_id = int(patient_id)
        else:
            action = unicode(request.GET.get('action'))
            patient_id = int(request.GET.get('patient_id'))

            if action == 'add':
                return surgical_history_add(request, patient_id)
Beispiel #26
0
import importlib


# Django Specific Imports
from django.db import models
from django.forms import ModelForm, ModelChoiceField, Textarea, TextInput

# Application model imports
from AuShadha.apps.ui.ui import ui as UI
from AuShadha.apps.aushadha_base_models.models import AuShadhaBaseModel,AuShadhaBaseModelForm
from AuShadha.apps.clinic.models import Clinic, Staff
from registry.inv_and_imaging.models import ImagingInvestigationRegistry, LabInvestigationRegistry
#from patient.models import PatientDetail
#from admission.models import AdmissionDetail

PatientDetail = UI.get_module("PatientRegistration")
AdmissionDetail = UI.get_module("Admission")
VisitDetail = UI.get_module("OPD_Visit")


from dijit_fields_constants import VISIT_HPI_FORM_CONSTANTS

DEFAULT_VISIT_HPI_FORM_EXCLUDES = ('patient_detail',)


class VisitHPI(AuShadhaBaseModel):
    
    def __init__(self, *args, **kwargs):
      super(VisitHPI,self).__init__(*args, **kwargs)      
      self.__model_label__ = "hpi"
      self._parent_model = 'visit_detail'
Beispiel #27
0
#from django.shortcuts import render_to_response
from django.http import Http404, HttpResponse, HttpResponseRedirect
from django.template import RequestContext
#from django.contrib.auth.models import User

from django.utils import simplejson
from django.core.urlresolvers import reverse
from django.contrib.auth.decorators import login_required

# Application Specific Model Imports-----------------------
import AuShadha.settings as settings
#from AuShadha.settings import APP_ROOT_URL
#from AuShadha.core.views.dijit_tree import DijitTreeNode, DijitTree
from AuShadha.apps.ui.ui import ui as UI

PatientDetail = UI.get_module("PatientRegistration")
AdmissionDetail = UI.get_module("Admission")

try:
  from admission import MODULE_LABEL
except (AttributeError, ImportError):
  MODULE_LABEL = "Admission"

#from patient.models import PatientDetail
#from admission.models import AdmissionDetail


@login_required
def render_admission_pane(request, patient_id = None):
  
  user = request.user
Beispiel #28
0
from django.contrib.auth.decorators import login_required

from AuShadha.apps.ui.ui import ui as UI

# from .models import VisitDetail, VisitComplaint

PatientDetail = UI.get_module("PatientRegistration")
VisitDetail = UI.get_module("OPD_Visit")
VisitComplaint = UI.get_module("OPD_Visit_Complaint")


def get_all_complaints(visit):

    v_id = visit.id
    pat_obj = visit.patient_detail

    visit_obj = VisitDetail.objects.filter(patient_detail=pat_obj).order_by("-visit_date")
    visit_complaint_list = []

    if visit_obj:

        for visit in visit_obj:
            visit_complaints = VisitComplaint.objects.filter(visit_detail=visit)

            if visit_complaints:
                for complaint in visit_complaints:
                    dict_to_append = {}
                    dict_to_append["complaint"] = complaint.complaint
                    dict_to_append["duration"] = complaint.duration
                    dict_to_append["visit_date"] = complaint.visit_detail.visit_date.date().isoformat()
                    dict_to_append["is_active"] = complaint.visit_detail.is_active