Service logic
Create job and return it’s id.
Update Composition record with following:
status = $.status
status_reason = $.status_reason
explanatory_letter =$.explanatory_letter
updated_at = current datetime
updated_by = user_id from token
Send SMS to patient with composition number via template
MARK_IN_ERROR_{{COMPOSITION_TYPE}}_COMPOSITION_SMS_TEMPLATE
If $.inform_with
authorize_withis submitted - use it as patient’s authentication method