Inheritance: extends InternalService
 /**
  * Pass through wrapper to generate Queue Resource.
  *
  * @param OEModule\PatientTicketing\models\Ticket $ticket
  *
  * @return resource
  */
 public function modelToResource($ticket)
 {
     $res = parent::modelToResource($ticket);
     foreach (array('patient_id', 'priority_id', 'report', 'assignee_user_id', 'assignee_date', 'created_user_id', 'created_date', 'last_modified_user_id', 'last_modified_date', 'event_id') as $pass_thru) {
         $res->{$pass_thru} = $ticket->{$pass_thru};
     }
     return $res;
 }
 /**
  * Pass through wrapper to generate Queue Resource.
  *
  * @param OEModule\PatientTicketing\models\QueueSetCategory $queue
  *
  * @return resource
  */
 public function modelToResource($queuesetcategory)
 {
     $res = parent::modelToResource($queuesetcategory);
     foreach (array('name', 'active', 'display_order') as $pass_thru) {
         $res->{$pass_thru} = $queuesetcategory->{$pass_thru};
     }
     return $res;
 }
 /**
  * Pass through wrapper to generate Queue Resource.
  *
  * @param OEModule\PatientTicketing\models\Queue $queue
  *
  * @return resource
  */
 public function modelToResource($queue)
 {
     $res = parent::modelToResource($queue);
     foreach (array('name', 'description', 'action_label', 'active', 'is_initial') as $pass_thru) {
         $res->{$pass_thru} = $queue->{$pass_thru};
     }
     if ($queue->assignment_fields) {
         $res->assignment_fields = \CJSON::decode($queue->assignment_fields);
     }
     return $res;
 }
 /**
  * Pass through wrapper to generate QueueSet Resource.
  *
  * @param OEModule\PatientTicketing\models\QueueSet $queueset
  *
  * @return resource
  */
 public function modelToResource($queueset)
 {
     $res = parent::modelToResource($queueset);
     foreach (array('name', 'description', 'active', 'filter_priority', 'filter_subspecialty', 'filter_firm', 'filter_my_tickets', 'filter_closed_tickets') as $pass_thru) {
         $res->{$pass_thru} = $queueset->{$pass_thru};
     }
     $qsvc = Yii::app()->service->getService(self::$QUEUE_SERVICE);
     $qscsvc = Yii::app()->service->getService(self::$QUEUESETCATEGORY_SERVICE);
     if ($queueset->initial_queue_id) {
         $res->initial_queue = $qsvc->read($queueset->initial_queue_id);
     }
     if ($queueset->permissioned_users) {
         foreach ($queueset->permissioned_users as $u) {
             $res->permissioned_user_ids[] = $u->id;
         }
     }
     if ($queueset->category_id) {
         $res->category = $qscsvc->read($queueset->category_id);
     }
     if ($queueset->default_queue_id) {
         $res->default_queue = $qsvc->read($queueset->default_queue_id);
     }
     return $res;
 }