コード例 #1
0
 public static function &buildForModule($json)
 {
     $markerSite = MarkerSite::findOrFail($json['atlas_id']);
     $markerSite->patients = intval($json['patients']);
     $markerSite->encounters = intval($json['encounters']);
     $markerSite->observations = intval($json['observations']);
     $markerSite->openmrs_version = empty($json['data']) ? "" : $json['data']['version'];
     $markerSite->data = json_encode($json['data']);
     $markerSite->atlas_version = $json['atlasVersion'];
     $markerSite->date_created = new DateTime();
     return $markerSite;
 }
コード例 #2
0
 public function delete()
 {
     $markerSite = MarkerSite::findOrFail(Input::get('id'));
     $this->auditService->auditDeletedSite($markerSite);
     $this->markerSiteService->deleteSite($markerSite);
 }