fix patvisit
This commit is contained in:
parent
60df79ed02
commit
6c809d4905
@ -8,17 +8,14 @@ class PatVisitModel extends BaseModel {
|
|||||||
protected $table = 'patvisit';
|
protected $table = 'patvisit';
|
||||||
protected $primaryKey = 'InternalPVID';
|
protected $primaryKey = 'InternalPVID';
|
||||||
protected $allowedFields = ['PVID', 'InternalPID', 'EpisodeID', 'CreateDate', 'EndDate', 'ArchivedDate', 'DelDate'];
|
protected $allowedFields = ['PVID', 'InternalPID', 'EpisodeID', 'CreateDate', 'EndDate', 'ArchivedDate', 'DelDate'];
|
||||||
protected $visnum_prefix;
|
|
||||||
|
|
||||||
protected $useTimestamps = true;
|
protected $useTimestamps = true;
|
||||||
protected $createdField = 'CreateDate';
|
protected $createdField = 'CreateDate';
|
||||||
protected $updatedField = '';
|
protected $updatedField = '';
|
||||||
protected $useSoftDeletes = true;
|
protected $useSoftDeletes = true;
|
||||||
protected $deletedField = 'EndDate';
|
protected $deletedField = 'EndDate';
|
||||||
|
|
||||||
public function __construct() {
|
protected $visnum_prefix = "DV";
|
||||||
$this->visnum_prefix = "DV";
|
|
||||||
}
|
|
||||||
|
|
||||||
public function show($PVID) {
|
public function show($PVID) {
|
||||||
$rows = $this->join('patdiag pd', 'pd.InternalPVID=patvisit.InternalPVID', 'left')
|
$rows = $this->join('patdiag pd', 'pd.InternalPVID=patvisit.InternalPVID', 'left')
|
||||||
@ -45,7 +42,7 @@ class PatVisitModel extends BaseModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$InternalPVID = $this->insert($input, true);
|
$InternalPVID = $this->insert($input, true);
|
||||||
/*
|
|
||||||
if(!empty($input['PatDiag'])) {
|
if(!empty($input['PatDiag'])) {
|
||||||
$input['PatDiag']['InternalPVID'] = $InternalPVID;
|
$input['PatDiag']['InternalPVID'] = $InternalPVID;
|
||||||
$db->table('patdiag')->insert($input['PatDiag']);
|
$db->table('patdiag')->insert($input['PatDiag']);
|
||||||
@ -54,9 +51,9 @@ class PatVisitModel extends BaseModel {
|
|||||||
$input['PatVisitADT']['InternalPVID'] = $InternalPVID;
|
$input['PatVisitADT']['InternalPVID'] = $InternalPVID;
|
||||||
$db->table('patvisitadt')->insert($input['PatVisitADT']);
|
$db->table('patvisitadt')->insert($input['PatVisitADT']);
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
$db->transComplete();
|
$db->transComplete();
|
||||||
//$data = [ "PVID"=>$input['PVID'], "InternalPVID"=>$InternalPVID ];
|
$data = [ "PVID"=>$input['PVID'], "InternalPVID"=>$InternalPVID ];
|
||||||
return $data;
|
return $data;
|
||||||
|
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user