† admission_insert ( session, case, program, date{, subscription} )
DEPRECATED: use admission_create () instead
Is a function to enrol a case into a program. It creates a new admission inserting the forms associated to the program enrolment. The admission status is “pre-admission” until all the program forms are completed. The admission will be created in the active center related with session. | |
Input parameters: | session: is the session id obtained in the session_init call case: is a case reference ID obtained by the URL or with the calls: case_list(), case_search() or case_get() program: is a program object with the ID of an existing program. It is obtained by calling source_get_url ( session, source_id or by calling action_list ( session, case, type {, admission}{, id}{, library}) passing an “ENROLL” action type. date: The date to be reported as “enrollment date”. subscription: ID of subscription in program where new admission will be created, if is null subscription should be set previously with /wiki/spaces/DES/pages/16974337 |
Output parameters: | result: is a reference to a new admission or NULL if the enrol fails ErrorMsg: any fault in the call, either in the validation of input parameters, errors in the connection to the database or any other error, this parameter returns the error message produced |
Request sample: | admission_insert ( “LCAAAAAAAAAAAAAAAA”, “{label:}case_id{@source}”, “program_id{@source}”, “2012-01-01 00:00:00”); |
Response sample: | <?xml version="1.0" encoding="utf-8" standalone="yes"?> <result>1234</result> <ErrorMsg></ErrorMsg> |
Notes: |
|