USP_DATAFORMTEMPLATE_EDIT_ITINERARYITEMDAILYADMISSION
The save procedure used by the edit dataform template "Itinerary Item Daily Admission Edit Data Form".
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@ID | uniqueidentifier | IN | The input ID parameter indicating the ID of the record being edited. |
@CHANGEAGENTID | uniqueidentifier | IN | Input parameter indicating the ID of the change agent invoking the procedure. |
@ITINERARYID | uniqueidentifier | IN | Itinerary ID |
@PROGRAMID | uniqueidentifier | IN | Program |
@STARTDATE | date | IN | Start date |
@STARTTIME | UDT_HOURMINUTE | IN | Start time |
@ENDTIME | UDT_HOURMINUTE | IN | End time |
@NOTES | nvarchar(500) | IN | Notes |
@RESOURCES | xml | IN | Supplies/Equipment resources |
@IGNORECONFLICTS | bit | IN | Ignore conflicts when saving |
@STAFFRESOURCES | xml | IN | Staffing resources |
Definition
Copy
CREATE procedure dbo.USP_DATAFORMTEMPLATE_EDIT_ITINERARYITEMDAILYADMISSION (
@ID uniqueidentifier,
@CHANGEAGENTID uniqueidentifier = null,
@ITINERARYID uniqueidentifier,
@PROGRAMID uniqueidentifier,
@STARTDATE date,
@STARTTIME dbo.UDT_HOURMINUTE,
@ENDTIME dbo.UDT_HOURMINUTE,
@NOTES nvarchar(500),
@RESOURCES xml,
@IGNORECONFLICTS bit,
@STAFFRESOURCES xml
)
as
set nocount on;
if @CHANGEAGENTID is null
exec dbo.USP_CHANGEAGENT_GETORCREATECHANGEAGENT @CHANGEAGENTID output
declare @CURRENTDATE datetime
set @CURRENTDATE = getdate()
begin try
exec dbo.USP_ITINERARYITEMDAILYADMISSION_EDIT
@ID,
@CHANGEAGENTID,
@CURRENTDATE,
@ITINERARYID,
@PROGRAMID,
@STARTDATE,
@STARTTIME,
@ENDTIME,
@NOTES,
@RESOURCES,
@IGNORECONFLICTS,
@STAFFRESOURCES;
end try
begin catch
exec dbo.USP_RAISE_ERROR
return 1
end catch
return 0;