Merge remote-tracking branch 'origin/develop' into guanyu
This commit is contained in:
@@ -5,6 +5,8 @@ import com.healthlink.his.administration.domain.Patient;
|
|||||||
import com.healthlink.his.administration.service.IPatientService;
|
import com.healthlink.his.administration.service.IPatientService;
|
||||||
import com.healthlink.his.empi.domain.EmpiPerson;
|
import com.healthlink.his.empi.domain.EmpiPerson;
|
||||||
import com.healthlink.his.empi.domain.EmpiPersonIdMapping;
|
import com.healthlink.his.empi.domain.EmpiPersonIdMapping;
|
||||||
|
import com.healthlink.his.empi.domain.EmpiMergeLog;
|
||||||
|
import com.healthlink.his.empi.service.IEmpiMergeLogService;
|
||||||
import com.healthlink.his.empi.service.IEmpiPersonIdMappingService;
|
import com.healthlink.his.empi.service.IEmpiPersonIdMappingService;
|
||||||
import com.healthlink.his.empi.service.IEmpiPersonService;
|
import com.healthlink.his.empi.service.IEmpiPersonService;
|
||||||
import com.healthlink.his.web.empi.appservice.IEmpiAppService;
|
import com.healthlink.his.web.empi.appservice.IEmpiAppService;
|
||||||
@@ -19,6 +21,7 @@ public class EmpiAppServiceImpl implements IEmpiAppService {
|
|||||||
@Autowired private IEmpiPersonService personService;
|
@Autowired private IEmpiPersonService personService;
|
||||||
@Autowired private IEmpiPersonIdMappingService mappingService;
|
@Autowired private IEmpiPersonIdMappingService mappingService;
|
||||||
@Autowired private IPatientService patientService;
|
@Autowired private IPatientService patientService;
|
||||||
|
@Autowired private IEmpiMergeLogService mergeLogService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public EmpiPerson registerPerson(EmpiPerson p) {
|
public EmpiPerson registerPerson(EmpiPerson p) {
|
||||||
@@ -42,6 +45,16 @@ public class EmpiAppServiceImpl implements IEmpiAppService {
|
|||||||
}
|
}
|
||||||
sec.setMergeStatus("MERGED");
|
sec.setMergeStatus("MERGED");
|
||||||
personService.updateById(sec);
|
personService.updateById(sec);
|
||||||
|
|
||||||
|
EmpiMergeLog logRecord = new EmpiMergeLog();
|
||||||
|
logRecord.setSourcePatientId(primaryId);
|
||||||
|
logRecord.setTargetPatientId(secId);
|
||||||
|
logRecord.setMergeType("MERGE");
|
||||||
|
logRecord.setMergeReason("EMPI合并");
|
||||||
|
logRecord.setMergeBy("system");
|
||||||
|
logRecord.setMergeTime(new java.util.Date());
|
||||||
|
logRecord.setStatus("MERGED");
|
||||||
|
mergeLogService.save(logRecord);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
-- V45: Create lab_activity_def_device_def table
|
||||||
|
-- 检验活动定义与耗材/设备定义关联表
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS lab_activity_def_device_def (
|
||||||
|
id BIGINT PRIMARY KEY,
|
||||||
|
activity_definition_id BIGINT,
|
||||||
|
device_definition_id BIGINT,
|
||||||
|
device_definition_name VARCHAR(255),
|
||||||
|
instrument_id BIGINT,
|
||||||
|
instrument_name VARCHAR(255),
|
||||||
|
device_quantity INTEGER DEFAULT 0,
|
||||||
|
delete_flag VARCHAR(1) DEFAULT '0',
|
||||||
|
activity_definition_name VARCHAR(255),
|
||||||
|
create_by VARCHAR(64),
|
||||||
|
create_time TIMESTAMP,
|
||||||
|
update_by VARCHAR(64),
|
||||||
|
update_time TIMESTAMP,
|
||||||
|
tenant_id INTEGER
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE INDEX IF NOT EXISTS idx_lab_act_dev_act_def_id ON lab_activity_def_device_def(activity_definition_id);
|
||||||
|
CREATE INDEX IF NOT EXISTS idx_lab_act_dev_tenant ON lab_activity_def_device_def(tenant_id);
|
||||||
Reference in New Issue
Block a user