30 lines
1.1 KiB
Python
30 lines
1.1 KiB
Python
from django.urls import include, path
|
|
from rest_framework.routers import DefaultRouter
|
|
|
|
from .ui_views import SurveyTemplateMappingViewSet, survey_mapping_settings
|
|
from .views import (
|
|
EventMappingViewSet,
|
|
HISPatientDataView,
|
|
InboundEventViewSet,
|
|
IntegrationConfigViewSet,
|
|
)
|
|
|
|
app_name = 'integrations'
|
|
|
|
router = DefaultRouter()
|
|
router.register(r'configs', IntegrationConfigViewSet, basename='integration-config')
|
|
router.register(r'mappings', EventMappingViewSet, basename='event-mapping')
|
|
router.register(r'legacy-events', InboundEventViewSet, basename='inbound-event')
|
|
router.register(r'survey-template-mappings', SurveyTemplateMappingViewSet, basename='survey-template-mapping')
|
|
|
|
urlpatterns = [
|
|
# Survey template mapping settings page
|
|
path('settings/survey-mappings/', survey_mapping_settings, name='survey-mapping-settings'),
|
|
|
|
# Main HIS integration endpoint - receives complete patient data
|
|
path('events/', HISPatientDataView.as_view(), name='his-patient-data'),
|
|
|
|
# Legacy event-based endpoint (deprecated, kept for backward compatibility)
|
|
path('', include(router.urls)),
|
|
]
|